From 19b38c7c740461b572d0801ce58a244dc0659bc4 Mon Sep 17 00:00:00 2001 From: Neo <321592+Neo-Desktop@users.noreply.github.com> Date: Fri, 19 Dec 2025 00:26:08 -0800 Subject: [PATCH] Version 2.3.6 --- .../jscripts/dom-drag.js | 240 + .../jscripts/folder_rte_files/blank.html | 14 + .../jscripts/folder_rte_files/index.html | 1 + .../folder_rte_files/module_bbcodeloader.php | 246 + .../jscripts/folder_rte_files/module_div.php | 264 + .../folder_rte_files/module_email.php | 208 + .../folder_rte_files/module_image.php | 231 + .../jscripts/folder_rte_files/module_link.php | 260 + .../folder_rte_files/module_table.php | 299 + .../folder_rte_files/rte_html_functions.js | 143 + .../jscripts/folder_rte_files/rte_popup.css | 81 + .../jscripts/index.html | 1 + .../jscripts/ipb_board.js | 15 + .../jscripts/ipb_finduser.js | 75 + .../jscripts/ipb_forum.js | 965 + .../jscripts/ipb_global.js | 1349 + .../jscripts/ipb_global_xmlenhanced.js | 463 + .../jscripts/ipb_pm.js | 179 + .../jscripts/ipb_poll.js | 440 + .../jscripts/ipb_profile.js | 36 + .../jscripts/ipb_register.js | 959 + .../jscripts/ipb_topic.js | 1119 + .../jscripts/ipb_usercp.js | 238 + .../jscripts/ipb_xhr_findnames.js | 720 + .../jscripts/ips_attach.js | 666 + .../jscripts/ips_ipsclass.js | 597 + .../jscripts/ips_menu.js | 559 + .../jscripts/ips_profile_portal.js | 1282 + .../jscripts/ips_text_editor.js | 3794 +++ .../jscripts/ips_text_editor_func.js | 569 + .../jscripts/ips_text_editor_lite.js | 819 + .../jscripts/ips_xmlhttprequest.js | 397 + .../skin_acp/clientscripts/index.html | 1 + .../skin_acp/clientscripts/ipd_cell_select.js | 311 + .../skin_acp/clientscripts/ipd_dragmove.js | 910 + .../clientscripts/ipd_form_functions.js | 402 + .../skin_acp/clientscripts/ipd_tab_factory.js | 184 + .../skin_acp/clientscripts/ipd_titleedit.js | 559 + .../skin_acp/clientscripts/ips_calendar_us.js | 299 + .../clientscripts/ips_hierarchical.js | 147 + .../Installation Guide/data/Thumbs.db | Bin 9728 -> 0 bytes .../Installation Guide/data/help.html | 180 - .../Installation Guide/data/install.html | 326 - .../Installation Guide/data/logo4.gif | Bin 5476 -> 0 bytes .../Installation Guide/data/logobg.gif | Bin 3295 -> 0 bytes .../Installation Guide/data/menu.html | 114 - .../Installation Guide/data/tile_back.gif | Bin 488 -> 0 bytes .../Installation Guide/data/welcome.html | 89 - .../Installation Guide/install_guide.html | 32 - .../InstallationGuide/data/chmod.html | 232 + Documentation/InstallationGuide/data/docs.css | 228 + .../InstallationGuide/data/help.html | 293 + .../data/images/addresses.gif | Bin 0 -> 1236 bytes .../InstallationGuide/data/images/admin.gif | Bin 0 -> 1152 bytes .../InstallationGuide/data/images/box.gif | Bin 0 -> 1652 bytes .../data/images/bullet_doing.gif | Bin 0 -> 1008 bytes .../data/images/bullet_done.gif | Bin 0 -> 1009 bytes .../data/images/bullet_notdone.gif | Bin 0 -> 1010 bytes .../InstallationGuide/data/images/check.gif | Bin 0 -> 1383 bytes .../InstallationGuide/data/images/db.gif | Bin 0 -> 1250 bytes .../data/images}/file.gif | Bin .../data/images}/folder.gif | Bin .../InstallationGuide/data/images/help.gif | Bin 0 -> 1396 bytes .../InstallationGuide/data/images/index.html | 11 + .../data/images/install_done.gif | Bin 0 -> 1693 bytes .../InstallationGuide/data/images/link.gif | Bin 0 -> 1057 bytes .../InstallationGuide/data/images/main_bg.gif | Bin 0 -> 2116 bytes .../data/images/package_bg.gif | Bin 0 -> 34431 bytes .../data/images/package_icon.gif | Bin 0 -> 1169 bytes .../InstallationGuide/data/images/pixel.gif | Bin 0 -> 43 bytes .../data/images/title_bar.gif | Bin 0 -> 295 bytes .../InstallationGuide/data/images/warning.gif | Bin 0 -> 1520 bytes .../InstallationGuide/data/images/wizard.gif | Bin 0 -> 1591 bytes .../InstallationGuide/data/install1.html | 42 + .../InstallationGuide/data/install2.html | 47 + .../InstallationGuide/data/install3.html | 32 + .../InstallationGuide/data/requirements.html | 37 + .../InstallationGuide/data/welcome.html | 40 + .../InstallationGuide/install_guide.html | 57 + .../InstallationGuide/upgrading.html | 63 + Documentation/START_HERE.html | 61 + Documentation/upgradefromipb_1x.html | 114 - Tools/ipchat.php | 266 + Tools/rebuildposts/readme.txt | 18 + Tools/rebuildposts/rebuildposts.php | 654 + {Tools_and_Scripts => Tools}/ssi.php | 1520 +- Tools/ssi_templates/active.html | 1 + Tools/ssi_templates/index.html | 1 + Tools/ssi_templates/news.html | 1 + Tools/ssi_templates/stats.html | 1 + .../ssi_templates/syndicate_rss.html | 2 +- Tools/ssi_templates/syndicate_xml.html | 1 + Tools_and_Scripts/portal/index_rename.php | 28 - Tools_and_Scripts/portal/readme.txt | 44 - Tools_and_Scripts/show.php | 55 - Tools_and_Scripts/ssi_templates/active.html | 16 - Tools_and_Scripts/ssi_templates/index.html | 15 - Tools_and_Scripts/ssi_templates/news.html | 13 - Tools_and_Scripts/ssi_templates/stats.html | 17 - .../ssi_templates/syndicate_xml.html | 39 - readme.html | 119 - upload/admin.php | 17 +- upload/admin/Thumbs.db | Bin 3072 -> 3072 bytes upload/admin/index.php | 28 +- upload/cache/index.html | 11 +- .../cache/lang_cache/en/acp_lang_acpperms.php | 5 +- upload/cache/lang_cache/en/index.html | 11 +- upload/cache/lang_cache/en/lang_editors.php | 3 + .../lang_cache/en/lang_email_content.php | 84 +- upload/cache/lang_cache/en/lang_error.php | 12 +- upload/cache/lang_cache/en/lang_global.php | 49 +- upload/cache/lang_cache/en/lang_javascript.js | 2 + upload/cache/lang_cache/en/lang_mod.php | 5 +- upload/cache/lang_cache/en/lang_msg.php | 20 +- upload/cache/lang_cache/en/lang_post.php | 9 + upload/cache/lang_cache/en/lang_profile.php | 14 +- upload/cache/lang_cache/en/lang_register.php | 40 +- upload/cache/lang_cache/en/lang_topic.php | 15 +- upload/cache/lang_cache/en/lang_ucp.php | 27 +- upload/cache/lang_cache/index.html | 11 +- .../cache/lang_cache/ru/acp_lang_acpperms.php | 196 - .../cache/lang_cache/ru/acp_lang_member.php | 28 - .../cache/lang_cache/ru/acp_lang_portal.php | 23 - upload/cache/lang_cache/ru/index.html | 10 - upload/cache/lang_cache/ru/lang_boards.php | 110 - upload/cache/lang_cache/ru/lang_buddy.php | 56 - upload/cache/lang_cache/ru/lang_calendar.php | 115 - upload/cache/lang_cache/ru/lang_chatpara.php | 19 - upload/cache/lang_cache/ru/lang_chatsigma.php | 19 - upload/cache/lang_cache/ru/lang_editors.php | 127 - .../lang_cache/ru/lang_email_content.php | 611 - upload/cache/lang_cache/ru/lang_emails.php | 73 - upload/cache/lang_cache/ru/lang_error.php | 330 - upload/cache/lang_cache/ru/lang_forum.php | 142 - upload/cache/lang_cache/ru/lang_global.php | 298 - upload/cache/lang_cache/ru/lang_help.php | 19 - upload/cache/lang_cache/ru/lang_javascript.js | 64 - upload/cache/lang_cache/ru/lang_legends.php | 36 - upload/cache/lang_cache/ru/lang_login.php | 70 - upload/cache/lang_cache/ru/lang_mlist.php | 90 - upload/cache/lang_cache/ru/lang_mod.php | 276 - upload/cache/lang_cache/ru/lang_msg.php | 295 - upload/cache/lang_cache/ru/lang_online.php | 52 - upload/cache/lang_cache/ru/lang_portal.php | 54 - upload/cache/lang_cache/ru/lang_post.php | 227 - upload/cache/lang_cache/ru/lang_printpage.php | 27 - upload/cache/lang_cache/ru/lang_profile.php | 274 - upload/cache/lang_cache/ru/lang_register.php | 247 - upload/cache/lang_cache/ru/lang_search.php | 164 - upload/cache/lang_cache/ru/lang_stats.php | 40 - .../lang_cache/ru/lang_subscriptions.php | 83 - upload/cache/lang_cache/ru/lang_tar.php | 31 - upload/cache/lang_cache/ru/lang_topic.php | 223 - upload/cache/lang_cache/ru/lang_ucp.php | 647 - upload/cache/skin_cache/index.html | 11 +- upload/conf_global.php.dist | 4 - .../converge_local/apis/allowed_methods.php | 75 +- upload/converge_local/apis/index.html | 11 +- .../converge_local/apis/server_functions.php | 95 +- upload/converge_local/converge.php | 26 +- upload/converge_local/converge_server.php | 15 +- upload/converge_local/index.html | 11 +- upload/index.php | 132 +- upload/init.php | 60 +- upload/install/core/actions/address.php | 38 +- upload/install/core/actions/admin.php | 36 +- upload/install/core/actions/db.php | 55 +- upload/install/core/actions/done.php | 28 +- upload/install/core/actions/eula.php | 28 +- upload/install/core/actions/index.html | 11 +- upload/install/core/actions/install.php | 2014 +- upload/install/core/actions/requirements.php | 28 +- upload/install/core/class_installer.php | 682 +- upload/install/core/class_tar.php | 1747 +- upload/install/core/conf.php | 4 +- upload/install/core/index.html | 11 +- upload/install/core/ipsclass.php | 117 +- upload/install/core/template.php | 105 +- upload/install/custom/app.php | 808 +- upload/install/custom/index.html | 11 +- upload/install/images/Thumbs.db | Bin 19968 -> 0 bytes upload/install/images/index.html | 11 +- upload/install/index.php | 40 +- upload/install/installfiles/config.xml | 87 +- upload/install/installfiles/groups.xml | 12 +- upload/install/installfiles/index.html | 11 +- upload/install/installfiles/loginauth.xml | 14 +- upload/install/installfiles/sequence.xml | 14 +- .../install/installfiles/writeablefiles.xml | 4 + upload/install/sql/index.html | 11 +- upload/install/sql/mysql_fulltext.php | 28 - upload/install/sql/mysql_inserts.php | 59 +- upload/install/sql/mysql_install.php | 229 +- upload/install/sql/mysql_tables.php | 2645 +- upload/interface/board/index.php | 261 + upload/interface/board/modules/ipb/api.php | 1100 + upload/interface/board/modules/ipb/config.php | 31 + upload/interface/board/modules/ipb/index.html | 1 + .../interface/board/modules/ipb/methods.php | 154 + upload/ips_kernel/PEAR/Text/Diff.php | 32 +- upload/ips_kernel/PEAR/Text/Diff/Renderer.php | 2 +- .../PEAR/Text/Diff/Renderer/index.html | 1 + .../PEAR/Text/Diff/Renderer/inline.php | 2 +- .../PEAR/Text/Diff/Renderer/unified.php | 2 +- upload/ips_kernel/PEAR/Text/Diff/index.html | 1 + upload/ips_kernel/PEAR/Text/Diff3.php | 2 +- upload/ips_kernel/PEAR/Text/index.html | 1 + upload/ips_kernel/PEAR/index.html | 1 + upload/ips_kernel/class_ajax.php | 40 +- upload/ips_kernel/class_api_server.php | 49 +- upload/ips_kernel/class_cache_apc.php | 13 +- upload/ips_kernel/class_cache_diskcache.php | 11 +- .../ips_kernel/class_cache_eaccelerator.php | 16 +- upload/ips_kernel/class_cache_memcache.php | 11 +- upload/ips_kernel/class_cache_mmcache.php | 11 +- upload/ips_kernel/class_cache_xcache.php | 11 +- upload/ips_kernel/class_captcha.php | 706 +- .../class_captcha_plugin/default.php | 819 + .../class_captcha_plugin/recaptcha.php | 281 + upload/ips_kernel/class_communication.php | 27 +- upload/ips_kernel/class_converge.php | 10 +- upload/ips_kernel/class_convert_charset.php | 21 +- upload/ips_kernel/class_db.php | 97 +- upload/ips_kernel/class_db_mysql.php | 19 +- upload/ips_kernel/class_db_mysql_client.php | 188 +- upload/ips_kernel/class_db_mysqli_client.php | 204 +- upload/ips_kernel/class_difference.php | 28 +- upload/ips_kernel/class_email.php | 387 +- upload/ips_kernel/class_file_management.php | 37 +- upload/ips_kernel/class_image.php | 15 +- upload/ips_kernel/class_ipsclass_core.php | 13 +- upload/ips_kernel/class_profiling.php | 396 + upload/ips_kernel/class_resources_reader.php | 553 - upload/ips_kernel/class_rss.php | 398 +- upload/ips_kernel/class_template.php | 10 +- upload/ips_kernel/class_template_engine.php | 119 +- upload/ips_kernel/class_upload.php | 89 +- upload/ips_kernel/class_xml.php | 27 +- upload/ips_kernel/class_xml_rpc.php | 98 +- upload/ips_kernel/class_xmlarchive.php | 19 +- upload/ips_kernel/db_lib/index.html | 1 + upload/ips_kernel/db_lib/mysql_tools.php | 372 + .../convertcharset/ConvertCharset.class.php | 1204 +- .../convertcharset/ConvertTables/index.html | 1 + .../convertcharset/ConvertTables/windows-874 | 286 + .../ips_kernel/i18n/convertcharset/index.html | 1 + upload/ips_kernel/i18n/index.html | 1 + upload/ips_kernel/index.html | 11 +- upload/jscripts/folder_rte_files/index.html | 11 +- .../folder_rte_files/module_bbcodeloader.php | 101 +- .../jscripts/folder_rte_files/module_div.php | 62 +- .../folder_rte_files/module_email.php | 18 +- .../folder_rte_files/module_image.php | 26 +- .../jscripts/folder_rte_files/module_link.php | 26 +- .../folder_rte_files/module_table.php | 76 +- upload/jscripts/index.html | 11 +- upload/jscripts/ipb_forum.js | 1260 +- upload/jscripts/ipb_global.js | 2 +- upload/jscripts/ipb_global_xmlenhanced.js | 2 +- upload/jscripts/ipb_register.js | 960 +- upload/jscripts/ipb_usercp.js | 239 +- upload/jscripts/ips_ipsclass.js | 2 +- upload/jscripts/ips_menu.js | 2 +- upload/jscripts/ips_profile_portal.js | 2 +- upload/jscripts/ips_text_editor.js | 3873 ++- upload/jscripts/ips_text_editor_func.js | 2 +- upload/jscripts/ips_text_editor_lite.js | 2 +- upload/lofiversion/index.php | 64 +- upload/lofiversion/lofi_skin.php | 21 +- upload/lofiversion/lofiscreen.css | 4 +- upload/modules/index.html | 11 +- upload/modules/ipb_member_sync.php | 17 +- upload/modules/mod_example.php | 14 +- upload/modules/module_loader.php | 10 +- upload/resources/acpperms.xml | 2 +- upload/resources/bbcode.xml | 260 +- upload/resources/components.xml | 206 +- upload/resources/faq.xml | 220 +- upload/resources/help_sections.xml | 969 + upload/resources/help_settings.xml | 470 + upload/resources/index.html | 11 +- upload/resources/ipb_images-pro.xml.gz | Bin 0 -> 247310 bytes upload/resources/ipb_skin-pro.xml.gz | Bin 0 -> 135672 bytes upload/resources/ipb_templates.xml | 25653 ++++++++-------- upload/resources/macro.xml | 938 +- upload/resources/settings.xml | 13601 ++++---- upload/resources/skinsets.xml | 933 +- upload/resources/tasks.xml | 62 +- upload/resources/version_history.php | 13 + upload/retail/chatauth.php | 19 +- upload/retail/chatservice.php | 17 +- upload/retail/index.html | 11 +- upload/skin_acp/IPB2_Standard/acp_css.css | 107 +- upload/skin_acp/IPB2_Standard/acp_js.js | 30 +- .../IPB2_Standard/acp_js_skin/index.html | 11 +- .../acp_js_skin/ips_menu_html.js | 210 +- upload/skin_acp/IPB2_Standard/acp_perms.js | 12 +- .../acp_skin_html/cp_skin_admin.php | 163 +- .../acp_skin_html/cp_skin_api.php | 317 + .../acp_skin_html/cp_skin_attachments.php | 170 +- .../acp_skin_html/cp_skin_bbcode_badword.php | 339 +- .../acp_skin_html/cp_skin_components.php | 64 +- .../acp_skin_html/cp_skin_dashboard.php | 1073 + .../acp_skin_html/cp_skin_diagnostics.php | 45 +- .../acp_skin_html/cp_skin_editors.php | 10 +- .../acp_skin_html/cp_skin_forums.php | 301 +- .../acp_skin_html/cp_skin_global.php | 179 +- .../acp_skin_html/cp_skin_groups.php | 840 +- .../acp_skin_html/cp_skin_index.php | 803 - .../acp_skin_html/cp_skin_lookandfeel.php | 400 +- .../acp_skin_html/cp_skin_management.php | 634 +- .../acp_skin_html/cp_skin_member.php | 1238 +- .../acp_skin_html/cp_skin_paysubs.php | 8 - .../acp_skin_html/cp_skin_rss.php | 132 +- .../acp_skin_html/cp_skin_security.php | 1195 +- .../acp_skin_html/cp_skin_settings.php | 214 +- .../acp_skin_html/cp_skin_taskmanager.php | 830 +- .../acp_skin_html/cp_skin_tools.php | 1419 +- .../IPB2_Standard/acp_skin_html/index.html | 11 +- upload/skin_acp/IPB2_Standard/acp_template.js | 2 +- upload/skin_acp/IPB2_Standard/colours.html | 2 +- upload/skin_acp/IPB2_Standard/css.html | 2 +- .../skin_acp/IPB2_Standard/images/about.png | Bin 0 -> 875 bytes .../IPB2_Standard/images/acp-login-logo.gif | Bin 9979 -> 3394 bytes .../IPB2_Standard/images/acp-logo.gif | Bin 3327 -> 3894 bytes .../IPB2_Standard/images/emo_delete.gif | Bin 387 -> 410 bytes .../folder_components/diagnostics/index.html | 10 - .../images/folder_components/index.html | 11 +- .../folder_components/index/bulkmail.png | Bin 0 -> 1530 bytes .../images/folder_components/index/emos.png | Bin 0 -> 1164 bytes .../images/folder_components/index/forums.png | Bin 0 -> 1533 bytes .../images/folder_components/index/groups.png | Bin 0 -> 1711 bytes .../images/folder_components/index/index.html | 11 +- .../folder_components/index/languages.png | Bin 0 -> 1796 bytes .../folder_components/index/members.png | Bin 0 -> 1449 bytes .../folder_components/index/settings.png | Bin 0 -> 1605 bytes .../images/folder_components/index/skins.png | Bin 0 -> 1593 bytes .../folder_components/index/validating.png | Bin 0 -> 1413 bytes .../folder_components/security/index.html | 11 +- .../folder_components/skinremap/index.html | 1 + .../folder_components/skinremap/remap_row.png | Bin 0 -> 1581 bytes .../folder_components/xmlrpc/api_user.png | Bin 0 -> 1620 bytes .../folder_components/xmlrpc/index.html | 1 + .../folder_components/xmlrpc/log_row.png | Bin 0 -> 753 bytes .../folder_css_images/dropshadow-alpha.png | Bin 2698 -> 13086 bytes .../images/folder_css_images/index.html | 11 +- .../IPB2_Standard/images/icon_help.png | Bin 0 -> 3554 bytes .../images/icons_form/index.html | 11 +- .../images/icons_menu/index.html | 11 +- .../skin_acp/IPB2_Standard/images/iframe.html | 1 + .../skin_acp/IPB2_Standard/images/index.html | 11 +- .../IPB2_Standard/images/ipsnews_item.gif | Bin 0 -> 517 bytes .../images/tabs_main/dashboard.png | Bin 0 -> 1109 bytes .../IPB2_Standard/images/tabs_main/index.html | 11 +- .../IPB2_Standard/images/te_remove.gif | Bin 139 -> 333 bytes .../IPB2_Standard/images/te_revert.gif | Bin 144 -> 333 bytes .../images/update_icons/index.html | 1 + .../images/update_icons/update_available.gif | Bin 0 -> 3410 bytes .../images/update_icons/update_info.png | Bin 0 -> 10404 bytes .../images/update_icons/update_security.gif | Bin 0 -> 8720 bytes .../images/update_icons/update_warning.png | Bin 0 -> 10086 bytes .../images/update_icons/uptodate.gif | Bin 0 -> 3501 bytes upload/skin_acp/IPB2_Standard/index.html | 11 +- upload/skin_acp/clientscripts/index.html | 11 +- upload/skin_acp/index.html | 11 +- upload/sources/acp_loaders/acp_admin.php | 236 +- upload/sources/acp_loaders/acp_components.php | 323 +- upload/sources/acp_loaders/acp_content.php | 209 +- upload/sources/acp_loaders/acp_dashboard.php | 92 + upload/sources/acp_loaders/acp_help.php | 185 +- .../sources/acp_loaders/acp_lookandfeel.php | 202 +- .../sources/acp_loaders/acp_pages_admin.php | 124 +- .../acp_loaders/acp_pages_components.php | 173 +- .../sources/acp_loaders/acp_pages_content.php | 231 +- upload/sources/acp_loaders/acp_pages_help.php | 138 +- .../acp_loaders/acp_pages_lookandfeel.php | 68 +- .../sources/acp_loaders/acp_pages_tools.php | 106 +- upload/sources/acp_loaders/acp_tools.php | 205 +- upload/sources/acp_loaders/index.html | 11 +- .../sources/action_admin/acppermissions.php | 2724 +- .../sources/action_admin/administration.php | 1528 +- upload/sources/action_admin/adminlogs.php | 279 +- upload/sources/action_admin/api.php | 580 + upload/sources/action_admin/attachments.php | 715 +- upload/sources/action_admin/banandbadword.php | 495 +- upload/sources/action_admin/bbcode.php | 418 +- upload/sources/action_admin/calendars.php | 1979 +- upload/sources/action_admin/components.php | 2483 +- .../action_admin/{index.php => dashboard.php} | 1108 +- upload/sources/action_admin/diagnostics.php | 893 +- upload/sources/action_admin/emailerror.php | 262 +- upload/sources/action_admin/emaillogs.php | 318 +- upload/sources/action_admin/emoticons.php | 822 +- upload/sources/action_admin/forums.php | 1256 +- upload/sources/action_admin/groups.php | 1552 +- upload/sources/action_admin/help.php | 1156 +- upload/sources/action_admin/index.html | 11 +- upload/sources/action_admin/ips.php | 256 +- upload/sources/action_admin/languages.php | 970 +- upload/sources/action_admin/login.php | 737 +- upload/sources/action_admin/login_auth.php | 436 +- upload/sources/action_admin/logs_login.php | 366 +- upload/sources/action_admin/member.php | 3065 +- upload/sources/action_admin/member_tools.php | 816 +- upload/sources/action_admin/moderator.php | 1521 +- upload/sources/action_admin/modlogs.php | 294 +- .../sources/action_admin/multi_moderate.php | 1096 +- .../sources/action_admin/paysubscriptions.php | 63 +- upload/sources/action_admin/portal.php | 778 +- upload/sources/action_admin/postoffice.php | 2144 +- upload/sources/action_admin/prefs.php | 400 +- upload/sources/action_admin/profilefields.php | 1154 +- upload/sources/action_admin/quickhelp.php | 341 +- upload/sources/action_admin/rebuild.php | 1946 +- .../sources/action_admin/remote_template.php | 1994 +- upload/sources/action_admin/rssexport.php | 1190 +- upload/sources/action_admin/rssimport.php | 838 +- upload/sources/action_admin/security.php | 554 +- upload/sources/action_admin/settings.php | 463 +- upload/sources/action_admin/skin_css.php | 2148 +- upload/sources/action_admin/skin_diff.php | 378 +- upload/sources/action_admin/skin_import.php | 845 +- upload/sources/action_admin/skin_macros.php | 974 +- upload/sources/action_admin/skin_remap.php | 378 + upload/sources/action_admin/skin_sets.php | 3850 ++- .../action_admin/skin_template_bits.php | 2725 +- upload/sources/action_admin/skin_wrappers.php | 163 +- upload/sources/action_admin/skintools.php | 1091 +- upload/sources/action_admin/spiderlogs.php | 617 +- upload/sources/action_admin/sql.php | 136 +- upload/sources/action_admin/sql_mysql.php | 1040 +- upload/sources/action_admin/statistics.php | 1153 +- upload/sources/action_admin/support.php | 112 +- upload/sources/action_admin/task_manager.php | 563 +- upload/sources/action_admin/warnlogs.php | 424 +- upload/sources/action_admin/xmlout.php | 681 +- .../sources/action_public/announcements.php | 67 +- upload/sources/action_public/attach.php | 37 +- upload/sources/action_public/boards.php | 28 +- upload/sources/action_public/browsebuddy.php | 22 +- upload/sources/action_public/calendar.php | 5980 ++-- upload/sources/action_public/captcha.php | 92 + upload/sources/action_public/findpost.php | 42 +- upload/sources/action_public/forums.php | 105 +- upload/sources/action_public/help.php | 26 +- upload/sources/action_public/index.html | 11 +- upload/sources/action_public/login.php | 55 +- upload/sources/action_public/memberlist.php | 83 +- upload/sources/action_public/messenger.php | 171 +- .../action_public/misc/contact_member.php | 1625 +- .../action_public/misc/forward_page.php | 18 +- upload/sources/action_public/misc/index.html | 11 +- upload/sources/action_public/misc/legends.php | 121 +- .../action_public/misc/multi_moderate.php | 22 +- .../sources/action_public/misc/print_page.php | 48 +- upload/sources/action_public/misc/stats.php | 20 +- upload/sources/action_public/misc/tracker.php | 32 +- upload/sources/action_public/misc/warn.php | 75 +- upload/sources/action_public/moderate.php | 93 +- upload/sources/action_public/online.php | 27 +- .../action_public/paysubscriptions.php | 38 +- upload/sources/action_public/portal.php | 30 +- upload/sources/action_public/post.php | 21 +- upload/sources/action_public/profile.php | 8677 +++--- upload/sources/action_public/register.php | 5659 ++-- upload/sources/action_public/rssout.php | 26 +- upload/sources/action_public/search.php | 4008 ++- upload/sources/action_public/taskloader.php | 16 +- upload/sources/action_public/topics.php | 5481 ++-- upload/sources/action_public/usercp.php | 8067 ++--- upload/sources/action_public/xmlout.php | 4642 ++- upload/sources/api/api_components.php | 135 +- upload/sources/api/api_core.php | 97 +- upload/sources/api/api_forums.php | 126 +- upload/sources/api/api_language.php | 38 +- upload/sources/api/api_member.php | 325 + upload/sources/api/api_settings.php | 831 +- upload/sources/api/api_skins.php | 684 +- upload/sources/api/api_tasks.php | 41 +- .../sources/api/api_topic_subscriptions.php | 170 + upload/sources/api/api_topic_view.php | 144 +- upload/sources/api/api_topics_and_posts.php | 229 +- upload/sources/api/index.html | 11 +- .../sources/classes/attach/class_attach.php | 2396 +- upload/sources/classes/attach/index.html | 11 +- upload/sources/classes/attach/plugin_msg.php | 89 +- upload/sources/classes/attach/plugin_post.php | 102 +- .../sources/classes/bbcode/class_bbcode.php | 1568 +- .../classes/bbcode/class_bbcode_core.php | 505 +- .../classes/bbcode/class_bbcode_legacy.php | 18 +- upload/sources/classes/bbcode/index.html | 11 +- .../sources/classes/class_custom_fields.php | 26 +- upload/sources/classes/class_display.php | 127 +- upload/sources/classes/class_email.php | 518 +- upload/sources/classes/class_forums.php | 31 +- upload/sources/classes/class_session.php | 134 +- .../sources/classes/class_virus_checker.php | 962 +- .../classes/class_virus_checker/index.html | 11 +- .../class_virus_checker/lib_known_names.php | 17 +- .../class_virus_checker/lib_lang_files.php | 17 +- .../lib_writeable_dirs.php | 17 +- .../sources/classes/editor/class_editor.php | 24 +- .../classes/editor/class_editor_rte.php | 38 +- .../classes/editor/class_editor_std.php | 12 +- upload/sources/classes/editor/index.html | 11 +- upload/sources/classes/index.html | 11 +- .../paymentgateways/class_gw_2checkout.php | 32 +- .../paymentgateways/class_gw_authorizenet.php | 43 +- .../classes/paymentgateways/class_gw_core.php | 4 +- .../paymentgateways/class_gw_manual.php | 20 + .../paymentgateways/class_gw_nochex.php | 34 +- .../paymentgateways/class_gw_paypal.php | 53 +- .../paymentgateways/class_gw_protx.php | 72 +- .../paymentgateways/class_gw_safshop.php | 25 +- .../classes/paymentgateways/class_gw_test.php | 5 + .../paymentgateways/custom/cus_example.php | 4 +- .../classes/paymentgateways/custom/index.html | 11 +- .../classes/paymentgateways/index.html | 11 +- upload/sources/classes/post/class_post.php | 5022 ++- .../sources/classes/post/class_post_edit.php | 1815 +- .../sources/classes/post/class_post_new.php | 83 +- .../sources/classes/post/class_post_reply.php | 119 +- upload/sources/classes/post/index.html | 11 +- upload/sources/components_acp/blog.php | 5 +- upload/sources/components_acp/chatpara.php | 39 +- upload/sources/components_acp/chatsigma.php | 385 +- upload/sources/components_acp/copyright.php | 476 +- upload/sources/components_acp/default.php | 16 +- upload/sources/components_acp/downloads.php | 111 + upload/sources/components_acp/gallery.php | 103 +- upload/sources/components_acp/index.html | 11 +- .../components_acp/setting_plugins/index.html | 11 +- .../setting_plugins/securityandprivacy.php | 298 +- .../setting_plugins/trashcan.php | 16 +- upload/sources/components_init/chatpara.php | 14 +- upload/sources/components_init/chatsigma.php | 16 +- upload/sources/components_init/index.html | 11 +- .../sources/components_location/chatpara.php | 14 +- .../sources/components_location/chatsigma.php | 16 +- upload/sources/components_location/index.html | 11 +- upload/sources/components_public/chatpara.php | 24 +- .../sources/components_public/chatsigma.php | 22 +- upload/sources/components_public/index.html | 11 +- .../profile/aboutme.conf.php | 35 + .../components_public/profile/aboutme.php | 120 + .../components_public/profile/index.html | 11 +- .../components_public/profile/posts.conf.php | 4 +- .../components_public/profile/posts.php | 52 +- .../components_public/profile/topics.conf.php | 4 +- .../components_public/profile/topics.php | 52 +- upload/sources/components_ucp/index.html | 11 +- upload/sources/handlers/han_editor.php | 193 +- upload/sources/handlers/han_login.php | 115 +- upload/sources/handlers/han_parse_bbcode.php | 104 +- .../sources/handlers/han_paysubscriptions.php | 2684 +- upload/sources/handlers/han_post.php | 16 +- upload/sources/handlers/index.html | 11 +- upload/sources/index.html | 11 +- upload/sources/ipsclass.php | 1036 +- upload/sources/lib/admin_cache_functions.php | 2261 +- upload/sources/lib/admin_forum_functions.php | 1096 +- upload/sources/lib/admin_functions.php | 878 +- upload/sources/lib/admin_pages.php | 477 +- upload/sources/lib/admin_skin.php | 1533 +- .../sources/lib/admin_template_functions.php | 255 +- upload/sources/lib/func_boardstats.php | 44 +- upload/sources/lib/func_chat.php | 364 +- upload/sources/lib/func_chat_legacy.php | 31 +- upload/sources/lib/func_digest.php | 181 +- upload/sources/lib/func_mod.php | 70 +- upload/sources/lib/func_msg.php | 3162 +- upload/sources/lib/func_taskmanager.php | 28 +- upload/sources/lib/func_topic_linear.php | 25 +- upload/sources/lib/func_topic_threaded.php | 46 +- upload/sources/lib/func_usercp.php | 140 +- upload/sources/lib/index.html | 11 +- upload/sources/lib/post_parser.php | 20 +- upload/sources/lib/search_mysql_ftext.php | 194 +- upload/sources/lib/search_mysql_man.php | 63 +- upload/sources/lib/skin_info.php | 250 +- upload/sources/lib/tar.php | 20 +- upload/sources/loginauth/convert/auth.php | 281 +- .../sources/loginauth/convert/auth_sha256.php | 24 +- upload/sources/loginauth/convert/index.html | 11 +- upload/sources/loginauth/external/auth.php | 100 +- upload/sources/loginauth/external/index.html | 11 +- upload/sources/loginauth/index.html | 11 +- upload/sources/loginauth/internal/auth.php | 25 +- upload/sources/loginauth/internal/index.html | 11 +- upload/sources/loginauth/ipconverge/auth.php | 394 +- .../sources/loginauth/ipconverge/index.html | 11 +- upload/sources/loginauth/ldap/auth.php | 42 +- upload/sources/loginauth/ldap/conf.php | 9 + upload/sources/loginauth/ldap/index.html | 11 +- upload/sources/loginauth/login_core.php | 89 +- .../sources/portal_plugins/calendar-cfg.php | 20 +- upload/sources/portal_plugins/calendar.php | 470 +- upload/sources/portal_plugins/index.html | 11 +- .../portal_plugins/online_users-cfg.php | 20 +- .../sources/portal_plugins/online_users.php | 16 +- upload/sources/portal_plugins/poll-cfg.php | 20 +- upload/sources/portal_plugins/poll.php | 16 +- .../portal_plugins/recent_topics-cfg.php | 22 +- .../sources/portal_plugins/recent_topics.php | 80 +- upload/sources/sql/index.html | 11 +- upload/sources/sql/mysql_admin_queries.php | 26 +- upload/sources/sql/mysql_api_queries.php | 12 +- upload/sources/sql/mysql_extra_queries.php | 20 +- upload/sources/sql/mysql_queries.php | 1594 +- upload/sources/sql/mysql_subsm_queries.php | 18 +- upload/sources/tasks/announcements.php | 20 +- upload/sources/tasks/bulkmail.php | 18 +- upload/sources/tasks/calendarevents.php | 20 +- upload/sources/tasks/cleanout.php | 20 +- upload/sources/tasks/dailycleanout.php | 35 +- upload/sources/tasks/dailydigest.php | 20 +- upload/sources/tasks/doexpiresubs.php | 20 +- upload/sources/tasks/expiresubs.php | 48 +- upload/sources/tasks/index.html | 11 +- upload/sources/tasks/logprune.php | 20 +- upload/sources/tasks/rebuildstats.php | 20 +- upload/sources/tasks/removevalidating.php | 49 +- upload/sources/tasks/rssimport.php | 41 +- upload/sources/tasks/update_profile_views.php | 18 +- upload/sources/tasks/updateviews.php | 20 +- upload/sources/tasks/weeklydigest.php | 20 +- .../IPB_Community_Pack/Thumbs.db | Bin 66048 -> 0 bytes .../IPB_Community_Pack/index.html | 1 + upload/style_avatars/Smiley_Avatars/Thumbs.db | Bin 10240 -> 0 bytes .../style_avatars/Smiley_Avatars/index.html | 1 + upload/style_avatars/Thumbs.db | Bin 12800 -> 0 bytes upload/style_avatars/index.html | 11 +- .../captcha_backgrounds/captcha1.jpg | Bin 0 -> 2279 bytes .../captcha_backgrounds/captcha10.jpg | Bin 0 -> 3121 bytes .../captcha_backgrounds/captcha2.jpg | Bin 0 -> 3105 bytes .../captcha_backgrounds/captcha3.jpg | Bin 0 -> 3343 bytes .../captcha_backgrounds/captcha4.jpg | Bin 0 -> 3004 bytes .../captcha_backgrounds/captcha5.jpg | Bin 0 -> 2973 bytes .../captcha_backgrounds/captcha6.jpg | Bin 0 -> 3386 bytes .../captcha_backgrounds/captcha7.jpg | Bin 0 -> 6286 bytes .../captcha_backgrounds/captcha8.jpg | Bin 0 -> 7701 bytes .../captcha_backgrounds/captcha9.jpg | Bin 0 -> 3712 bytes .../captcha_backgrounds/index.html | 1 + upload/style_captcha/captcha_fonts/bboron.ttf | Bin 0 -> 32480 bytes .../style_captcha/captcha_fonts/colophon.ttf | Bin 0 -> 42820 bytes upload/style_captcha/captcha_fonts/davis.ttf | Bin 0 -> 37784 bytes upload/style_captcha/captcha_fonts/hockey.ttf | Bin 0 -> 46560 bytes upload/style_captcha/captcha_fonts/index.html | 11 +- upload/style_captcha/captcha_fonts/px10.ttf | Bin 0 -> 29480 bytes upload/style_captcha/captcha_fonts/robot.ttf | Bin 0 -> 45072 bytes upload/style_captcha/captcha_fonts/tomnr.ttf | Bin 0 -> 53760 bytes upload/style_captcha/index.html | 11 +- upload/style_emoticons/default/closedeyes.gif | Bin 472 -> 0 bytes upload/style_emoticons/default/glare.gif | Bin 468 -> 0 bytes upload/style_emoticons/default/index.html | 11 +- upload/style_emoticons/default/ninja.gif | Bin 481 -> 0 bytes upload/style_emoticons/default/wink.gif | Bin 696 -> 696 bytes upload/style_emoticons/index.html | 11 +- upload/style_images/1/cal_addevent.gif | Bin 2646 -> 1987 bytes upload/style_images/1/cal_newevent.gif | Bin 2599 -> 1944 bytes upload/style_images/1/click2enlarge.gif | Bin 393 -> 304 bytes .../1/folder_attach_images/index.html | 11 +- .../1/folder_editor_images/css_rte.css | 12 +- .../1/folder_editor_images/index.html | 11 +- .../style_images/1/folder_js_skin/index.html | 11 +- .../1/folder_js_skin/ips_menu_html.js | 2 +- .../1/folder_mime_types/index.html | 11 +- .../1/folder_post_icons/index.html | 11 +- .../1/folder_profile_portal/index.html | 11 +- .../1/folder_team_icons/index.html | 11 +- .../1/folder_topic_view/index.html | 11 +- upload/style_images/1/index.html | 11 +- upload/style_images/1/login-button.gif | Bin 1226 -> 1226 bytes upload/style_images/1/nophoto.gif | Bin 3253 -> 3288 bytes upload/style_images/1/p_aim.gif | Bin 1281 -> 1294 bytes upload/style_images/1/p_card.gif | Bin 1856 -> 1557 bytes upload/style_images/1/p_delete.gif | Bin 1781 -> 1583 bytes upload/style_images/1/p_edit.gif | Bin 1813 -> 1438 bytes upload/style_images/1/p_email.gif | Bin 1596 -> 1574 bytes upload/style_images/1/p_icq.gif | Bin 1286 -> 1290 bytes upload/style_images/1/p_im.gif | Bin 1194 -> 1200 bytes upload/style_images/1/p_move.gif | Bin 1920 -> 1586 bytes upload/style_images/1/p_mq_add.gif | Bin 1683 -> 1633 bytes upload/style_images/1/p_mq_remove.gif | Bin 1637 -> 1578 bytes upload/style_images/1/p_msn.gif | Bin 1309 -> 1310 bytes upload/style_images/1/p_offline.gif | Bin 784 -> 815 bytes upload/style_images/1/p_online.gif | Bin 1230 -> 1231 bytes upload/style_images/1/p_pin.gif | Bin 1724 -> 1415 bytes upload/style_images/1/p_pm.gif | Bin 1486 -> 1222 bytes upload/style_images/1/p_quote.gif | Bin 1734 -> 1516 bytes upload/style_images/1/p_report.gif | Bin 1681 -> 1601 bytes upload/style_images/1/p_unpin.gif | Bin 1816 -> 1553 bytes upload/style_images/1/p_up.gif | Bin 695 -> 1402 bytes upload/style_images/1/p_www.gif | Bin 1517 -> 1523 bytes upload/style_images/1/rate1.gif | Bin 311 -> 297 bytes upload/style_images/1/rate2.gif | Bin 319 -> 296 bytes upload/style_images/1/rate3.gif | Bin 319 -> 298 bytes upload/style_images/1/rate4.gif | Bin 308 -> 294 bytes upload/style_images/1/rate5.gif | Bin 226 -> 212 bytes upload/style_images/1/t_addpoll.gif | Bin 2510 -> 1911 bytes upload/style_images/1/t_closed.gif | Bin 1873 -> 1817 bytes upload/style_images/1/t_comments.gif | Bin 1929 -> 1953 bytes upload/style_images/1/t_ecard.gif | Bin 2024 -> 1834 bytes upload/style_images/1/t_favorite.gif | Bin 2208 -> 2102 bytes upload/style_images/1/t_media.gif | Bin 2682 -> 2241 bytes upload/style_images/1/t_moved.gif | Bin 2127 -> 2520 bytes upload/style_images/1/t_new.gif | Bin 2248 -> 1947 bytes upload/style_images/1/t_newimage.gif | Bin 2086 -> 2108 bytes upload/style_images/1/t_options.gif | Bin 1841 -> 1932 bytes upload/style_images/1/t_poll.gif | Bin 2404 -> 1891 bytes upload/style_images/1/t_qr.gif | Bin 2318 -> 1972 bytes upload/style_images/1/t_reply.gif | Bin 1936 -> 1957 bytes upload/style_images/1/t_slideshow.gif | Bin 2071 -> 2176 bytes upload/style_images/css_1.css | 13 +- upload/style_images/index.html | 11 +- upload/upgrade/core/actions/done.php | 26 - upload/upgrade/core/actions/eula.php | 31 - upload/upgrade/core/actions/index.html | 1 + upload/upgrade/core/actions/install.php | 396 +- upload/upgrade/core/actions/overview.php | 58 +- upload/upgrade/core/class_installer.php | 62 +- upload/upgrade/core/conf.php | 6 +- upload/upgrade/core/index.html | 1 + upload/upgrade/core/template.php | 104 +- upload/upgrade/custom/app.php | 104 +- upload/upgrade/custom/index.html | 1 + upload/upgrade/images/index.html | 17 +- upload/upgrade/index.php | 223 +- upload/upgrade/installfiles/config.xml | 87 +- upload/upgrade/installfiles/index.html | 1 + upload/upgrade/installfiles/sequence.xml | 9 +- ..._upgrade.php => version_upgrade_mysql.php} | 1346 +- ..._upgrade.php => version_upgrade_mysql.php} | 468 +- ..._upgrade.php => version_upgrade_mysql.php} | 1242 +- .../installfiles/upg_20004/mysql_updates.php | 37 +- .../installfiles/upg_20005/mysql_updates.php | 12 +- .../installfiles/upg_20007/mysql_updates.php | 66 +- .../installfiles/upg_20009/components.php | 1356 - .../installfiles/upg_20009/mysql_updates.php | 10 +- .../upg_20009/version_upgrade.php | 68 - .../installfiles/upg_20010/components.php | 1349 - .../upg_20010/version_upgrade.php | 68 - .../installfiles/upg_21003/components.php | 1675 - .../upg_21003/mysql_updates_4.php | 27 +- .../upg_21003/version_upgrade.php | 230 +- .../upg_21007/version_upgrade.php | 44 +- .../installfiles/upg_21008/mysql_updates.php | 2 +- .../upg_21008/version_upgrade.php | 28 +- .../installfiles/upg_21009/mysql_updates.php | 42 +- .../upg_21009/version_upgrade.php | 32 +- .../upg_22005/mysql_updates_3.php | 4 +- .../upg_22005/version_upgrade.php | 230 +- .../upg_22006/version_upgrade.php | 58 +- .../installfiles/upg_23000/mysql_updates.php | 29 + .../installfiles/upg_23002/mysql_updates.php | 19 + .../installfiles/upg_23003/mysql_updates.php | 6 + .../upg_23003/version_upgrade.php | 104 + .../installfiles/upg_23005/mysql_updates.php | 36 + .../installfiles/upg_23007/mysql_updates.php | 5 + .../installfiles/upg_23008/mysql_updates.php | 11 + .../installfiles/upg_23010/mysql_updates.php | 6 + upload/upgrade/sql/mysql_install.php | 130 - upload/uploads/index.html | 11 +- upload/uploads/profile/index.html | 1 + 764 files changed, 143731 insertions(+), 118164 deletions(-) create mode 100644 Development/javascript_uncompressed/jscripts/dom-drag.js create mode 100644 Development/javascript_uncompressed/jscripts/folder_rte_files/blank.html create mode 100644 Development/javascript_uncompressed/jscripts/folder_rte_files/index.html create mode 100644 Development/javascript_uncompressed/jscripts/folder_rte_files/module_bbcodeloader.php create mode 100644 Development/javascript_uncompressed/jscripts/folder_rte_files/module_div.php create mode 100644 Development/javascript_uncompressed/jscripts/folder_rte_files/module_email.php create mode 100644 Development/javascript_uncompressed/jscripts/folder_rte_files/module_image.php create mode 100644 Development/javascript_uncompressed/jscripts/folder_rte_files/module_link.php create mode 100644 Development/javascript_uncompressed/jscripts/folder_rte_files/module_table.php create mode 100644 Development/javascript_uncompressed/jscripts/folder_rte_files/rte_html_functions.js create mode 100644 Development/javascript_uncompressed/jscripts/folder_rte_files/rte_popup.css create mode 100644 Development/javascript_uncompressed/jscripts/index.html create mode 100644 Development/javascript_uncompressed/jscripts/ipb_board.js create mode 100644 Development/javascript_uncompressed/jscripts/ipb_finduser.js create mode 100644 Development/javascript_uncompressed/jscripts/ipb_forum.js create mode 100644 Development/javascript_uncompressed/jscripts/ipb_global.js create mode 100644 Development/javascript_uncompressed/jscripts/ipb_global_xmlenhanced.js create mode 100644 Development/javascript_uncompressed/jscripts/ipb_pm.js create mode 100644 Development/javascript_uncompressed/jscripts/ipb_poll.js create mode 100644 Development/javascript_uncompressed/jscripts/ipb_profile.js create mode 100644 Development/javascript_uncompressed/jscripts/ipb_register.js create mode 100644 Development/javascript_uncompressed/jscripts/ipb_topic.js create mode 100644 Development/javascript_uncompressed/jscripts/ipb_usercp.js create mode 100644 Development/javascript_uncompressed/jscripts/ipb_xhr_findnames.js create mode 100644 Development/javascript_uncompressed/jscripts/ips_attach.js create mode 100644 Development/javascript_uncompressed/jscripts/ips_ipsclass.js create mode 100644 Development/javascript_uncompressed/jscripts/ips_menu.js create mode 100644 Development/javascript_uncompressed/jscripts/ips_profile_portal.js create mode 100644 Development/javascript_uncompressed/jscripts/ips_text_editor.js create mode 100644 Development/javascript_uncompressed/jscripts/ips_text_editor_func.js create mode 100644 Development/javascript_uncompressed/jscripts/ips_text_editor_lite.js create mode 100644 Development/javascript_uncompressed/jscripts/ips_xmlhttprequest.js create mode 100644 Development/javascript_uncompressed/skin_acp/clientscripts/index.html create mode 100644 Development/javascript_uncompressed/skin_acp/clientscripts/ipd_cell_select.js create mode 100644 Development/javascript_uncompressed/skin_acp/clientscripts/ipd_dragmove.js create mode 100644 Development/javascript_uncompressed/skin_acp/clientscripts/ipd_form_functions.js create mode 100644 Development/javascript_uncompressed/skin_acp/clientscripts/ipd_tab_factory.js create mode 100644 Development/javascript_uncompressed/skin_acp/clientscripts/ipd_titleedit.js create mode 100644 Development/javascript_uncompressed/skin_acp/clientscripts/ips_calendar_us.js create mode 100644 Development/javascript_uncompressed/skin_acp/clientscripts/ips_hierarchical.js delete mode 100644 Documentation/Installation Guide/data/Thumbs.db delete mode 100644 Documentation/Installation Guide/data/help.html delete mode 100644 Documentation/Installation Guide/data/install.html delete mode 100644 Documentation/Installation Guide/data/logo4.gif delete mode 100644 Documentation/Installation Guide/data/logobg.gif delete mode 100644 Documentation/Installation Guide/data/menu.html delete mode 100644 Documentation/Installation Guide/data/tile_back.gif delete mode 100644 Documentation/Installation Guide/data/welcome.html delete mode 100644 Documentation/Installation Guide/install_guide.html create mode 100644 Documentation/InstallationGuide/data/chmod.html create mode 100644 Documentation/InstallationGuide/data/docs.css create mode 100644 Documentation/InstallationGuide/data/help.html create mode 100644 Documentation/InstallationGuide/data/images/addresses.gif create mode 100644 Documentation/InstallationGuide/data/images/admin.gif create mode 100644 Documentation/InstallationGuide/data/images/box.gif create mode 100644 Documentation/InstallationGuide/data/images/bullet_doing.gif create mode 100644 Documentation/InstallationGuide/data/images/bullet_done.gif create mode 100644 Documentation/InstallationGuide/data/images/bullet_notdone.gif create mode 100644 Documentation/InstallationGuide/data/images/check.gif create mode 100644 Documentation/InstallationGuide/data/images/db.gif rename Documentation/{Installation Guide/data => InstallationGuide/data/images}/file.gif (100%) rename Documentation/{Installation Guide/data => InstallationGuide/data/images}/folder.gif (100%) create mode 100644 Documentation/InstallationGuide/data/images/help.gif create mode 100644 Documentation/InstallationGuide/data/images/index.html create mode 100644 Documentation/InstallationGuide/data/images/install_done.gif create mode 100644 Documentation/InstallationGuide/data/images/link.gif create mode 100644 Documentation/InstallationGuide/data/images/main_bg.gif create mode 100644 Documentation/InstallationGuide/data/images/package_bg.gif create mode 100644 Documentation/InstallationGuide/data/images/package_icon.gif create mode 100644 Documentation/InstallationGuide/data/images/pixel.gif create mode 100644 Documentation/InstallationGuide/data/images/title_bar.gif create mode 100644 Documentation/InstallationGuide/data/images/warning.gif create mode 100644 Documentation/InstallationGuide/data/images/wizard.gif create mode 100644 Documentation/InstallationGuide/data/install1.html create mode 100644 Documentation/InstallationGuide/data/install2.html create mode 100644 Documentation/InstallationGuide/data/install3.html create mode 100644 Documentation/InstallationGuide/data/requirements.html create mode 100644 Documentation/InstallationGuide/data/welcome.html create mode 100644 Documentation/InstallationGuide/install_guide.html create mode 100644 Documentation/InstallationGuide/upgrading.html create mode 100644 Documentation/START_HERE.html delete mode 100644 Documentation/upgradefromipb_1x.html create mode 100644 Tools/ipchat.php create mode 100644 Tools/rebuildposts/readme.txt create mode 100644 Tools/rebuildposts/rebuildposts.php rename {Tools_and_Scripts => Tools}/ssi.php (79%) create mode 100644 Tools/ssi_templates/active.html create mode 100644 Tools/ssi_templates/index.html create mode 100644 Tools/ssi_templates/news.html create mode 100644 Tools/ssi_templates/stats.html rename {Tools_and_Scripts => Tools}/ssi_templates/syndicate_rss.html (73%) create mode 100644 Tools/ssi_templates/syndicate_xml.html delete mode 100644 Tools_and_Scripts/portal/index_rename.php delete mode 100644 Tools_and_Scripts/portal/readme.txt delete mode 100644 Tools_and_Scripts/show.php delete mode 100644 Tools_and_Scripts/ssi_templates/active.html delete mode 100644 Tools_and_Scripts/ssi_templates/index.html delete mode 100644 Tools_and_Scripts/ssi_templates/news.html delete mode 100644 Tools_and_Scripts/ssi_templates/stats.html delete mode 100644 Tools_and_Scripts/ssi_templates/syndicate_xml.html delete mode 100644 readme.html delete mode 100644 upload/cache/lang_cache/ru/acp_lang_acpperms.php delete mode 100644 upload/cache/lang_cache/ru/acp_lang_member.php delete mode 100644 upload/cache/lang_cache/ru/acp_lang_portal.php delete mode 100644 upload/cache/lang_cache/ru/index.html delete mode 100644 upload/cache/lang_cache/ru/lang_boards.php delete mode 100644 upload/cache/lang_cache/ru/lang_buddy.php delete mode 100644 upload/cache/lang_cache/ru/lang_calendar.php delete mode 100644 upload/cache/lang_cache/ru/lang_chatpara.php delete mode 100644 upload/cache/lang_cache/ru/lang_chatsigma.php delete mode 100644 upload/cache/lang_cache/ru/lang_editors.php delete mode 100644 upload/cache/lang_cache/ru/lang_email_content.php delete mode 100644 upload/cache/lang_cache/ru/lang_emails.php delete mode 100644 upload/cache/lang_cache/ru/lang_error.php delete mode 100644 upload/cache/lang_cache/ru/lang_forum.php delete mode 100644 upload/cache/lang_cache/ru/lang_global.php delete mode 100644 upload/cache/lang_cache/ru/lang_help.php delete mode 100644 upload/cache/lang_cache/ru/lang_javascript.js delete mode 100644 upload/cache/lang_cache/ru/lang_legends.php delete mode 100644 upload/cache/lang_cache/ru/lang_login.php delete mode 100644 upload/cache/lang_cache/ru/lang_mlist.php delete mode 100644 upload/cache/lang_cache/ru/lang_mod.php delete mode 100644 upload/cache/lang_cache/ru/lang_msg.php delete mode 100644 upload/cache/lang_cache/ru/lang_online.php delete mode 100644 upload/cache/lang_cache/ru/lang_portal.php delete mode 100644 upload/cache/lang_cache/ru/lang_post.php delete mode 100644 upload/cache/lang_cache/ru/lang_printpage.php delete mode 100644 upload/cache/lang_cache/ru/lang_profile.php delete mode 100644 upload/cache/lang_cache/ru/lang_register.php delete mode 100644 upload/cache/lang_cache/ru/lang_search.php delete mode 100644 upload/cache/lang_cache/ru/lang_stats.php delete mode 100644 upload/cache/lang_cache/ru/lang_subscriptions.php delete mode 100644 upload/cache/lang_cache/ru/lang_tar.php delete mode 100644 upload/cache/lang_cache/ru/lang_topic.php delete mode 100644 upload/cache/lang_cache/ru/lang_ucp.php delete mode 100644 upload/install/images/Thumbs.db create mode 100644 upload/interface/board/index.php create mode 100644 upload/interface/board/modules/ipb/api.php create mode 100644 upload/interface/board/modules/ipb/config.php create mode 100644 upload/interface/board/modules/ipb/index.html create mode 100644 upload/interface/board/modules/ipb/methods.php create mode 100644 upload/ips_kernel/PEAR/Text/Diff/Renderer/index.html create mode 100644 upload/ips_kernel/PEAR/Text/Diff/index.html create mode 100644 upload/ips_kernel/PEAR/Text/index.html create mode 100644 upload/ips_kernel/PEAR/index.html create mode 100644 upload/ips_kernel/class_captcha_plugin/default.php create mode 100644 upload/ips_kernel/class_captcha_plugin/recaptcha.php create mode 100644 upload/ips_kernel/class_profiling.php delete mode 100644 upload/ips_kernel/class_resources_reader.php create mode 100644 upload/ips_kernel/db_lib/index.html create mode 100644 upload/ips_kernel/db_lib/mysql_tools.php create mode 100644 upload/ips_kernel/i18n/convertcharset/ConvertTables/index.html create mode 100644 upload/ips_kernel/i18n/convertcharset/ConvertTables/windows-874 create mode 100644 upload/ips_kernel/i18n/convertcharset/index.html create mode 100644 upload/ips_kernel/i18n/index.html create mode 100644 upload/resources/help_sections.xml create mode 100644 upload/resources/help_settings.xml create mode 100644 upload/resources/ipb_images-pro.xml.gz create mode 100644 upload/resources/ipb_skin-pro.xml.gz create mode 100644 upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_api.php create mode 100644 upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_dashboard.php delete mode 100644 upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_index.php create mode 100644 upload/skin_acp/IPB2_Standard/images/about.png delete mode 100644 upload/skin_acp/IPB2_Standard/images/folder_components/diagnostics/index.html create mode 100644 upload/skin_acp/IPB2_Standard/images/folder_components/index/bulkmail.png create mode 100644 upload/skin_acp/IPB2_Standard/images/folder_components/index/emos.png create mode 100644 upload/skin_acp/IPB2_Standard/images/folder_components/index/forums.png create mode 100644 upload/skin_acp/IPB2_Standard/images/folder_components/index/groups.png create mode 100644 upload/skin_acp/IPB2_Standard/images/folder_components/index/languages.png create mode 100644 upload/skin_acp/IPB2_Standard/images/folder_components/index/members.png create mode 100644 upload/skin_acp/IPB2_Standard/images/folder_components/index/settings.png create mode 100644 upload/skin_acp/IPB2_Standard/images/folder_components/index/skins.png create mode 100644 upload/skin_acp/IPB2_Standard/images/folder_components/index/validating.png create mode 100644 upload/skin_acp/IPB2_Standard/images/folder_components/skinremap/index.html create mode 100644 upload/skin_acp/IPB2_Standard/images/folder_components/skinremap/remap_row.png create mode 100644 upload/skin_acp/IPB2_Standard/images/folder_components/xmlrpc/api_user.png create mode 100644 upload/skin_acp/IPB2_Standard/images/folder_components/xmlrpc/index.html create mode 100644 upload/skin_acp/IPB2_Standard/images/folder_components/xmlrpc/log_row.png create mode 100644 upload/skin_acp/IPB2_Standard/images/icon_help.png create mode 100644 upload/skin_acp/IPB2_Standard/images/iframe.html create mode 100644 upload/skin_acp/IPB2_Standard/images/ipsnews_item.gif create mode 100644 upload/skin_acp/IPB2_Standard/images/tabs_main/dashboard.png create mode 100644 upload/skin_acp/IPB2_Standard/images/update_icons/index.html create mode 100644 upload/skin_acp/IPB2_Standard/images/update_icons/update_available.gif create mode 100644 upload/skin_acp/IPB2_Standard/images/update_icons/update_info.png create mode 100644 upload/skin_acp/IPB2_Standard/images/update_icons/update_security.gif create mode 100644 upload/skin_acp/IPB2_Standard/images/update_icons/update_warning.png create mode 100644 upload/skin_acp/IPB2_Standard/images/update_icons/uptodate.gif create mode 100644 upload/sources/acp_loaders/acp_dashboard.php create mode 100644 upload/sources/action_admin/api.php rename upload/sources/action_admin/{index.php => dashboard.php} (57%) create mode 100644 upload/sources/action_admin/skin_remap.php create mode 100644 upload/sources/action_public/captcha.php create mode 100644 upload/sources/api/api_member.php create mode 100644 upload/sources/api/api_topic_subscriptions.php create mode 100644 upload/sources/components_acp/downloads.php create mode 100644 upload/sources/components_public/profile/aboutme.conf.php create mode 100644 upload/sources/components_public/profile/aboutme.php delete mode 100644 upload/style_avatars/IPB_Community_Pack/Thumbs.db create mode 100644 upload/style_avatars/IPB_Community_Pack/index.html delete mode 100644 upload/style_avatars/Smiley_Avatars/Thumbs.db create mode 100644 upload/style_avatars/Smiley_Avatars/index.html delete mode 100644 upload/style_avatars/Thumbs.db create mode 100644 upload/style_captcha/captcha_backgrounds/captcha1.jpg create mode 100644 upload/style_captcha/captcha_backgrounds/captcha10.jpg create mode 100644 upload/style_captcha/captcha_backgrounds/captcha2.jpg create mode 100644 upload/style_captcha/captcha_backgrounds/captcha3.jpg create mode 100644 upload/style_captcha/captcha_backgrounds/captcha4.jpg create mode 100644 upload/style_captcha/captcha_backgrounds/captcha5.jpg create mode 100644 upload/style_captcha/captcha_backgrounds/captcha6.jpg create mode 100644 upload/style_captcha/captcha_backgrounds/captcha7.jpg create mode 100644 upload/style_captcha/captcha_backgrounds/captcha8.jpg create mode 100644 upload/style_captcha/captcha_backgrounds/captcha9.jpg create mode 100644 upload/style_captcha/captcha_backgrounds/index.html create mode 100644 upload/style_captcha/captcha_fonts/bboron.ttf create mode 100644 upload/style_captcha/captcha_fonts/colophon.ttf create mode 100644 upload/style_captcha/captcha_fonts/davis.ttf create mode 100644 upload/style_captcha/captcha_fonts/hockey.ttf create mode 100644 upload/style_captcha/captcha_fonts/px10.ttf create mode 100644 upload/style_captcha/captcha_fonts/robot.ttf create mode 100644 upload/style_captcha/captcha_fonts/tomnr.ttf delete mode 100644 upload/style_emoticons/default/closedeyes.gif delete mode 100644 upload/style_emoticons/default/glare.gif delete mode 100644 upload/style_emoticons/default/ninja.gif create mode 100644 upload/upgrade/core/actions/index.html create mode 100644 upload/upgrade/core/index.html create mode 100644 upload/upgrade/custom/index.html create mode 100644 upload/upgrade/installfiles/index.html rename upload/upgrade/installfiles/upg_10002/{version_upgrade.php => version_upgrade_mysql.php} (62%) rename upload/upgrade/installfiles/upg_10003/{version_upgrade.php => version_upgrade_mysql.php} (80%) rename upload/upgrade/installfiles/upg_10004/{version_upgrade.php => version_upgrade_mysql.php} (77%) delete mode 100644 upload/upgrade/installfiles/upg_20009/components.php delete mode 100644 upload/upgrade/installfiles/upg_20009/version_upgrade.php delete mode 100644 upload/upgrade/installfiles/upg_20010/components.php delete mode 100644 upload/upgrade/installfiles/upg_20010/version_upgrade.php delete mode 100644 upload/upgrade/installfiles/upg_21003/components.php create mode 100644 upload/upgrade/installfiles/upg_23000/mysql_updates.php create mode 100644 upload/upgrade/installfiles/upg_23002/mysql_updates.php create mode 100644 upload/upgrade/installfiles/upg_23003/mysql_updates.php create mode 100644 upload/upgrade/installfiles/upg_23003/version_upgrade.php create mode 100644 upload/upgrade/installfiles/upg_23005/mysql_updates.php create mode 100644 upload/upgrade/installfiles/upg_23007/mysql_updates.php create mode 100644 upload/upgrade/installfiles/upg_23008/mysql_updates.php create mode 100644 upload/upgrade/installfiles/upg_23010/mysql_updates.php delete mode 100644 upload/upgrade/sql/mysql_install.php create mode 100644 upload/uploads/profile/index.html diff --git a/Development/javascript_uncompressed/jscripts/dom-drag.js b/Development/javascript_uncompressed/jscripts/dom-drag.js new file mode 100644 index 00000000..0da3991b --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/dom-drag.js @@ -0,0 +1,240 @@ +/************************************************** + * dom-drag.js + * 09.25.2001 + * www.youngpup.net + ************************************************** + * 10.28.2001 - fixed minor bug where events + * sometimes fired off the handle, not the root. + ************************************************** + * IPS CHANGES + * 06.01.2005 - Added "cursorchange" to change + * 07.18.2005 - Added cookie to store values + * 07.18.2005 - Made it impossible to drag < 0 height (keeponscreen) + * mouse cursor when over drag handle + * 07.29.2005 - Added "AddEvent" handler to prevent + * event clashes / overwrites + **************************************************/ + + +var Drag = { + + obj : null, + fx : null, + fy : null, + cookiename : null, + keeponscreen: true, + + init : function(o, oRoot, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper) + { + o.onmousedown = Drag.start; + o.onmouseover = Drag.cursorchange; + + o.hmode = bSwapHorzRef ? false : true ; + o.vmode = bSwapVertRef ? false : true ; + + o.root = oRoot && oRoot != null ? oRoot : o ; + + if (o.hmode && isNaN(parseInt(o.root.style.left ))) o.root.style.left = "0px"; + if (o.vmode && isNaN(parseInt(o.root.style.top ))) o.root.style.top = "0px"; + if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right = "0px"; + if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px"; + + o.minX = typeof minX != 'undefined' ? minX : null; + o.minY = typeof minY != 'undefined' ? minY : null; + o.maxX = typeof maxX != 'undefined' ? maxX : null; + o.maxY = typeof maxY != 'undefined' ? maxY : null; + + o.xMapper = fXMapper ? fXMapper : null; + o.yMapper = fYMapper ? fYMapper : null; + + //---------------------------------- + // Figure width and height + //---------------------------------- + + if ( Drag.keeponscreen ) + { + Drag.my_width = 0; + Drag.my_height = 0; + + if ( typeof( window.innerWidth ) == 'number' ) + { + //---------------------------------- + // Non IE + //---------------------------------- + + Drag.my_width = window.innerWidth; + Drag.my_height = window.innerHeight; + } + else if ( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) + { + //---------------------------------- + // IE 6+ + //---------------------------------- + + Drag.my_width = document.documentElement.clientWidth; + Drag.my_height = document.documentElement.clientHeight; + } + else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) + { + //---------------------------------- + // Old IE + //---------------------------------- + + Drag.my_width = document.body.clientWidth; + Drag.my_height = document.body.clientHeight; + } + } + + o.root.onDragStart = new Function(); + o.root.onDragEnd = new Function(); + o.root.onDrag = new Function(); + }, + + cursorchange : function(e) + { + var o = Drag.obj = this; + o.style.cursor = 'move'; + }, + + start : function(e) + { + var o = Drag.obj = this; + e = Drag.fixE(e); + var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom); + var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right ); + o.root.onDragStart(x, y); + + o.lastMouseX = e.clientX; + o.lastMouseY = e.clientY; + + if (o.hmode) { + if (o.minX != null) o.minMouseX = e.clientX - x + o.minX; + if (o.maxX != null) o.maxMouseX = o.minMouseX + o.maxX - o.minX; + } else { + if (o.minX != null) o.maxMouseX = -o.minX + e.clientX + x; + if (o.maxX != null) o.minMouseX = -o.maxX + e.clientX + x; + } + + if (o.vmode) { + if (o.minY != null) o.minMouseY = e.clientY - y + o.minY; + if (o.maxY != null) o.maxMouseY = o.minMouseY + o.maxY - o.minY; + } else { + if (o.minY != null) o.maxMouseY = -o.minY + e.clientY + y; + if (o.maxY != null) o.minMouseY = -o.maxY + e.clientY + y; + } + + //Drag.addEvent( document, 'mousemove', Drag.drag , false ); + //Drag.addEvent( document, 'mouseup' , Drag.end , false ); + + document.onmousemove = Drag.drag; + document.onmouseup = Drag.end; + + return false; + }, + + drag : function(e) + { + e = Drag.fixE(e); + var o = Drag.obj; + + var ey = e.clientY; + var ex = e.clientX; + var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom); + var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right ); + var nx, ny; + + if (o.minX != null) ex = o.hmode ? Math.max(ex, o.minMouseX) : Math.min(ex, o.maxMouseX); + if (o.maxX != null) ex = o.hmode ? Math.min(ex, o.maxMouseX) : Math.max(ex, o.minMouseX); + if (o.minY != null) ey = o.vmode ? Math.max(ey, o.minMouseY) : Math.min(ey, o.maxMouseY); + if (o.maxY != null) ey = o.vmode ? Math.min(ey, o.maxMouseY) : Math.max(ey, o.minMouseY); + + nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1)); + ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1)); + + if (o.xMapper) nx = o.xMapper(y); + else if (o.yMapper) ny = o.yMapper(x); + + //---------------------------------- + // Keep on screen? + //---------------------------------- + + if ( Drag.keeponscreen ) + { + ny = ny < 0 ? 0 : ny; + nx = nx < 0 ? 0 : nx; + + if ( Drag.my_width ) + { + nx = nx > Drag.my_width - parseInt(o.root.style.width) ? Drag.my_width - parseInt(o.root.style.width) : nx; + } + } + + Drag.obj.root.style[o.hmode ? "left" : "right"] = nx + "px"; + Drag.obj.root.style[o.vmode ? "top" : "bottom"] = ny + "px"; + Drag.obj.lastMouseX = ex; + Drag.obj.lastMouseY = ey; + + Drag.obj.root.onDrag(nx, ny); + return false; + }, + + end : function() + { + document.onmousemove = null; + document.onmouseup = null; + Drag.obj.root.onDragEnd( parseInt(Drag.obj.root.style[Drag.obj.hmode ? "left" : "right"]), + parseInt(Drag.obj.root.style[Drag.obj.vmode ? "top" : "bottom"])); + + var o = Drag.obj; + + fy = parseInt( o.root.style.top ); + fx = parseInt( o.root.style.left ); + + //---------------------------------- + // Store in a cookie? + //---------------------------------- + + if ( Drag.cookiename ) + { + try + { + ipsclass.my_setcookie( Drag.cookiename, fx+','+fy, 1 ); + } + catch(e) + { + } + } + + Drag.obj = null; + + }, + + addEvent: function(elm, evType, fn, useCapture) + { + // Cross-browser event handling for IE5+, NS6 and Mozilla + // By Scott Andrew + + if ( elm.addEventListener ) + { + elm.addEventListener(evType, fn, useCapture); + return true; + } + else if ( elm.attachEvent ) + { + var r = elm.attachEvent('on' + evType, fn); + return r; + } + else + { + elm['on' + evType] = fn; + } + }, + + fixE : function(e) + { + if (typeof e == 'undefined') e = window.event; + if (typeof e.layerX == 'undefined') e.layerX = e.offsetX; + if (typeof e.layerY == 'undefined') e.layerY = e.offsetY; + return e; + } +}; \ No newline at end of file diff --git a/Development/javascript_uncompressed/jscripts/folder_rte_files/blank.html b/Development/javascript_uncompressed/jscripts/folder_rte_files/blank.html new file mode 100644 index 00000000..65238c08 --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/folder_rte_files/blank.html @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/Development/javascript_uncompressed/jscripts/folder_rte_files/index.html b/Development/javascript_uncompressed/jscripts/folder_rte_files/index.html new file mode 100644 index 00000000..b49fc27d --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/folder_rte_files/index.html @@ -0,0 +1 @@ + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/Development/javascript_uncompressed/jscripts/folder_rte_files/module_bbcodeloader.php b/Development/javascript_uncompressed/jscripts/folder_rte_files/module_bbcodeloader.php new file mode 100644 index 00000000..25fcf5e7 --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/folder_rte_files/module_bbcodeloader.php @@ -0,0 +1,246 @@ + + + Insert Custom BBCode + + + + + + + +
Insert
+ +
+Example +
+
+ +
+ +
+ + + +
+Content Text +
+ + + + + + +
+
+ +
+ + +
+
+ + +
+ +
+ + + diff --git a/Development/javascript_uncompressed/jscripts/folder_rte_files/module_div.php b/Development/javascript_uncompressed/jscripts/folder_rte_files/module_div.php new file mode 100644 index 00000000..c0766e73 --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/folder_rte_files/module_div.php @@ -0,0 +1,264 @@ + + + Insert Div/Span + + + + + + + +
Insert DIV/SPAN
+ +
+ + + + + + + +
Type: +
+ +
+ +
+Font + + + + + + + + + + + + + + + +
Family:
Size:
Color:
+
+ +
+ +
+Background + + + + + + + + + + + + + + + +
Image:
Repeat:
Color:
+
+ +
+ +
+Box Model + + + + + + + + + + + + + + + +
Border:
Padding:
Margin:
+
+ +
+Custom Elements + + + + + + +
+
+ + +
+
+ + +
+ +
+ + + diff --git a/Development/javascript_uncompressed/jscripts/folder_rte_files/module_email.php b/Development/javascript_uncompressed/jscripts/folder_rte_files/module_email.php new file mode 100644 index 00000000..adae2f9e --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/folder_rte_files/module_email.php @@ -0,0 +1,208 @@ + + + Insert Div/Span + + + + + + + +
Insert Email
+ +
+ +
+Email Address + + + + + + +
+
+ +
+ +
+Email Text + + + + + + +
+
+ +
+ +
+
+ + +
+ +
+ + + diff --git a/Development/javascript_uncompressed/jscripts/folder_rte_files/module_image.php b/Development/javascript_uncompressed/jscripts/folder_rte_files/module_image.php new file mode 100644 index 00000000..f05849f6 --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/folder_rte_files/module_image.php @@ -0,0 +1,231 @@ + + + Insert Div/Span + + + + + + + +
Insert Image
+ +
+ +
+Image Location + + + + + + +
+
+ + + + +
+ + + + + +
+
+ + +
+ +
+ + + diff --git a/Development/javascript_uncompressed/jscripts/folder_rte_files/module_link.php b/Development/javascript_uncompressed/jscripts/folder_rte_files/module_link.php new file mode 100644 index 00000000..288e7535 --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/folder_rte_files/module_link.php @@ -0,0 +1,260 @@ + + + Insert Div/Span + + + + + + + +
Insert Link
+ +
+ +
+Link Location + + + + + + +
+
+ +
+ +
+Link Text + + + + + + +
+
+ + + +
+ + + + + +
+
+ + +
+ +
+ + + diff --git a/Development/javascript_uncompressed/jscripts/folder_rte_files/module_table.php b/Development/javascript_uncompressed/jscripts/folder_rte_files/module_table.php new file mode 100644 index 00000000..614352f0 --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/folder_rte_files/module_table.php @@ -0,0 +1,299 @@ + + + + + + Insert Table + + + + + + + + +
Insert Table
+ +
+
+Basics + + + + + + + + + + + + + + + +
Rows:
Cols:
Width: + +
+
+ +
+ +
+Layout + + + + + + + +
Alignment: + +
+
+ +
+ +
+Spacing + + + + + + + + + + + + + + + +
Cell Spacing:
Cell Padding:
Border thickness: +
+
+ +
+
+ + +
+ +
+ + + diff --git a/Development/javascript_uncompressed/jscripts/folder_rte_files/rte_html_functions.js b/Development/javascript_uncompressed/jscripts/folder_rte_files/rte_html_functions.js new file mode 100644 index 00000000..b5d8a683 --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/folder_rte_files/rte_html_functions.js @@ -0,0 +1,143 @@ +//------------------------------------------------------------------------------ +// IPS Cross-Browser Global Text Editor HTML +//------------------------------------------------------------------------------ +// Supports all "v5" browsers (inc. Opera, Safari, etc) +// Used for non RTE applications. +// (c) 2005 Invision Power Services, Inc. +// http://www.invisionpower.com +//------------------------------------------------------------------------------ + + +/** +* Rich Text Editor HTML Functions +*/ +function rte_html_functions() +{ + /** + * Main control bar object + * @var object Main control bar object + */ + this.control_obj = false; + /** + * Editor ID + */ + this.editor_id = false; + /** + * Current open bar object + */ + this.current_bar_object = null; + + /** + * Main init function + * Nothing much to do + */ + this.init = function() + { + } + + /** + * Show new control bar + * + * @param type Type of control bar (must be same as function key) + */ + this.show_control_bar = function( type ) + { + if ( ! this.control_obj ) + { + return; + } + + //----------------------------------------- + // Already open? Kill it + //----------------------------------------- + + if ( this.current_bar_object ) + { + this.remove_control_bar(); + } + + var mainbar = document.getElementById( 'rte-main-bar'); + var addtobar = document.getElementById( 'rte-hidden-items' ); + + //----------------------------------------- + // Spawn new DIV object + //----------------------------------------- + + var newdiv = document.createElement('div'); + + newdiv.id = this.editor_id + '_htmlblock_' + type + '_menu'; + newdiv.style.display = ''; + newdiv.className = 'rte-buttonbar'; + newdiv.style.zIndex = parseInt( this.control_obj.style.zIndex ) + 1; + newdiv.style.position = 'absolute'; + newdiv.style.width = '220px'; + newdiv.style.height = '400px'; + newdiv.style.top = ipsclass.get_obj_toppos( mainbar ) + 'px'; + newdiv.style.left = ipsclass.get_obj_leftpos( mainbar ) - ( parseInt(newdiv.style.width) + 10 ) + 'px'; + + var tmpheight = parseInt(newdiv.style.height) - 15; + newdiv.innerHTML = this.wrap_html_panel( "" ); + + //----------------------------------------- + // Add and show + //----------------------------------------- + + addtobar.appendChild(newdiv); + + ipsclass.set_unselectable( newdiv ); + + //----------------------------------------- + // INIT Drag + //----------------------------------------- + + var phdl = document.getElementById('rte-pallete-handle'); + + Drag.init( phdl, newdiv ); + + this.current_bar_object = newdiv; + } + + /** + * Remove control bar + * Removes the control bar. + */ + this.remove_control_bar = function() + { + if ( ! this.current_bar_object ) + { + return; + } + + var addtobar = document.getElementById( 'rte-hidden-items' ); + + //----------------------------------------- + // Kill old bar + //----------------------------------------- + + addtobar.removeChild( this.current_bar_object ); + + //----------------------------------------- + // Reset bar object + //----------------------------------------- + + this.current_bar_object = null; + } + + /** + * Wrap HTML block with basic control panel stuff + */ + this.wrap_html_panel = function( html ) + { + var newhtml = ""; + newhtml += "
"; + newhtml += "
"; + newhtml += "
"; + newhtml += "
"; + newhtml += "
"; + newhtml += "
" + html + "
"; + newhtml += "
"; + newhtml += "
"; + + return newhtml; + } +} \ No newline at end of file diff --git a/Development/javascript_uncompressed/jscripts/folder_rte_files/rte_popup.css b/Development/javascript_uncompressed/jscripts/folder_rte_files/rte_popup.css new file mode 100644 index 00000000..24540963 --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/folder_rte_files/rte_popup.css @@ -0,0 +1,81 @@ +html, body +{ + color: #000; + font: 10px Verdana,sans-serif; + background-color: transparent; + margin: 0px; + padding: 0px; +} +body +{ + padding: 5px; +} + +table +{ + font: 10px Verdana,sans-serif; +} + +.tblbutton +{ + border:1px solid #999; + background-color: #CCC; + font-family:Verdana, Arial; + font-size:10px; + font-weight:bold; + padding:2px; +} + +form p +{ + margin-top: 5px; + margin-bottom: 5px; +} +.fl +{ + width: 9em; float: left; padding: 2px 5px; text-align: right; +} + +.fr +{ + width: 7em; float: left; padding: 2px 5px; text-align: right; +} + +.frlarge +{ + width: 10em; float: left; padding: 2px 5px; text-align: right; +} + +fieldset +{ + padding: 0px 10px 5px 5px; +} + +select, input, button +{ + font: 10px Verdana,sans-serif; +} + +button +{ + width: 70px; +} +.space +{ + padding: 2px; +} + +.title +{ + color: #000; + font-weight: bold; + font-size: 120%; + padding: 3px 10px; + margin-bottom: 10px; + border-bottom: 1px solid black; + letter-spacing: 2px; +} +form +{ + padding: 0px; margin: 0px; +} \ No newline at end of file diff --git a/Development/javascript_uncompressed/jscripts/index.html b/Development/javascript_uncompressed/jscripts/index.html new file mode 100644 index 00000000..af2fbe79 --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/index.html @@ -0,0 +1 @@ + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/Development/javascript_uncompressed/jscripts/ipb_board.js b/Development/javascript_uncompressed/jscripts/ipb_board.js new file mode 100644 index 00000000..9a8ee5eb --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/ipb_board.js @@ -0,0 +1,15 @@ +//------------------------------------------ +// Invision Power Board v2.1 +// Boards JS File +// (c) 2005 Invision Power Services, Inc. +// +// http://www.invisionboard.com +//------------------------------------------ + + + +/*--------------------------------------------*/ +// Send request to update marker +// NO LONGER USED +/*--------------------------------------------*/ + diff --git a/Development/javascript_uncompressed/jscripts/ipb_finduser.js b/Development/javascript_uncompressed/jscripts/ipb_finduser.js new file mode 100644 index 00000000..efa82801 --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/ipb_finduser.js @@ -0,0 +1,75 @@ +//------------------------------------------ +// Invision Power Board v2.0 +// Find User JS File +// (c) 2004 Invision Power Services, Inc. +// +// http://www.invisionboard.com +//------------------------------------------ + + + +function add_to_form() +{ + var name = document.finduser.username.options[document.finduser.username.selectedIndex].value; + + if (separator == 'line') + { + separator = '\n'; + } + + if (separator == 'none') + { + separator = ''; + } + + if (entry == 'textarea') + { + // Where shall we put the separator? + + var tbox = eval('opener.document.REPLIER.'+in_name+'.value'); + var tboxSize = eval('opener.document.REPLIER.'+in_name+'.value.length'); + + // Remove leading spaces... + + while ( tbox.slice(0,1) == " " ) + { + tbox = tbox.substr(1, tboxSize - 1); + tboxSize = tboxSize; + } + + // Remove trailing spaces... + + while ( tbox.slice(tboxSize - 1, tboxSize) == " " ) + { + tbox = tbox.substr(0, tboxSize - 1); + tboxSize = tboxSize; + } + + // Do we have a leading comma? + + while ( tbox.slice(0,1) == "\n" ) + { + tbox = tbox.substr(1, tboxSize - 1); + tboxSize = tboxSize; + } + + // Do we have a trailing comma?... + + while ( tbox.slice(tboxSize - 1, tboxSize) == "\n" ) + { + tbox = tbox.substr(0, tboxSize - 1); + tboxSize = tboxSize; + } + + // First in box? + + if ( tboxSize == 0) + { + eval('opener.document.REPLIER.'+in_name+'.value += name'); + } + else + { + eval('opener.document.REPLIER.'+in_name+'.value += separator + name'); + } + } +} \ No newline at end of file diff --git a/Development/javascript_uncompressed/jscripts/ipb_forum.js b/Development/javascript_uncompressed/jscripts/ipb_forum.js new file mode 100644 index 00000000..09ea9b64 --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/ipb_forum.js @@ -0,0 +1,965 @@ +//------------------------------------------ +// Invision Power Board v2.1 +// Forums JS File +// (c) 2005 Invision Power Services, Inc. +// +// http://www.invisionboard.com +//------------------------------------------ + +/*--------------------------------------------*/ +// INIT +/*--------------------------------------------*/ + +var topic_dates = {}; +var topic_flags = {}; +var topic_state = {}; +var forum_mark_time; +var newer_topics = new Array; +var newer_count = 0; +var flags_count = 0; +var forum_id; +var url_extra = ''; +var start_int = 0; +var forum_mark_sent = 0; +var span_html = new Array; +var desc_html = new Array; +var text_html = new Array; +var folders = new Array; +var _desc_clicked = 0; +var topic_links_init = 0; + +var _this_select_all = 0; + +var tid_date = new Array(); + +var click_delay = 1200; //microseconds (1.2 seconds) + +/*--------------------------------------------*/ +// Pop up mod options +/*--------------------------------------------*/ + +function forum_mod_pop( fid ) +{ + try + { + menu_action_close(); + } + catch(e) { } + + PopUp( ipb_var_base_url + 'act=mod&CODE=prune_start&f='+fid+'&auth_key='+ipb_md5_check, 'PRUNE', 600,500); +} + +/*--------------------------------------------*/ +// INIT topic links... +/*--------------------------------------------*/ + +function forum_init_topic_links() +{ + //---------------------------------- + // Get page links... + // Gah.. another safari bug + //---------------------------------- + + var pagelinks = document.getElementsByTagName('a'); + + //---------------------------------- + // Sort through and grab topic links + //---------------------------------- + + for ( var i = 0 ; i <= pagelinks.length ; i++ ) + { + try + { + if ( ! pagelinks[i].id ) + { + continue; + } + } + catch(e) + { + continue; + } + + var linkid = pagelinks[i].id; + var linkname = linkid.replace( /^(.*)-(\d+)$/, "$1" ); + + if ( linkname == 'tid-link' ) + { + pagelinks[i].onmousedown = topic_link_event_mousedown; + pagelinks[i].onmouseup = topic_link_event_mouseup; + //pagelinks[i].style.cursor = 'text'; + + if ( ! topic_links_init ) + { + pagelinks[i].title = pagelinks[i].title + '. ' + lang_clickhold; + } + } + } + + topic_links_init = 1; +} + +/*--------------------------------------------*/ +// Mousedown, start timer +/*--------------------------------------------*/ + +function topic_link_event_mousedown( event ) +{ + //---------------------------------- + // Prevent link loading + //---------------------------------- + + event = global_cancel_bubble( event, true ); + + //---------------------------------- + // Get TID + //---------------------------------- + + var tid = _get_tid_from_id( this.id ); + + //---------------------------------- + // Start... + //---------------------------------- + + tid_date[ tid ] = _get_time_now(); + + //---------------------------------- + // Start loop + //---------------------------------- + + setTimeout( "topic_link_event_timer("+tid+")", 5 ); +} + +/*--------------------------------------------*/ +// Event, loop +/*--------------------------------------------*/ + +function topic_link_event_timer( tid ) +{ + //---------------------------------- + // Get time now + //---------------------------------- + + var timenow = _get_time_now(); + + //---------------------------------- + // Click held for 1.5 s+? + //---------------------------------- + + if ( timenow > 0 && tid_date[tid] > 0 && ( (timenow - tid_date[tid] ) > click_delay ) ) + { + //---------------------------------- + // Yeah.. wipe tid time and convert + //---------------------------------- + + tid_date[tid] = 0; + span_to_input( tid ); + return false; + } + + //---------------------------------- + // Not wiped? loop on! + //---------------------------------- + + if ( tid_date[tid] > 0 ) + { + setTimeout( "topic_link_event_timer("+tid+")", 5 ); + } + else + { + return false; + } +} + +/*--------------------------------------------*/ +// Mouseup? Cancel timer to kill the loop +/*--------------------------------------------*/ + +function topic_link_event_mouseup( event ) +{ + //---------------------------------- + // Prevent link loading + //---------------------------------- + + event = global_cancel_bubble( event, true ); + + //---------------------------------- + // Get TID + //---------------------------------- + + var tid = _get_tid_from_id( this.id ); + + //---------------------------------- + // Reset timer + //---------------------------------- + + tid_date[tid] = 0; +} + +/*--------------------------------------------*/ +// Get time now +/*--------------------------------------------*/ + +function _get_time_now() +{ + var mydate = new Date(); + return mydate.getTime(); +} + +/*--------------------------------------------*/ +// Get TID from ID +/*--------------------------------------------*/ + +function _get_tid_from_id( id ) +{ + return id.replace( /.*\-(\d+)/, "$1" ); +} + + +/*--------------------------------------------*/ +// Turn topic title into text input +/*--------------------------------------------*/ + +function topic_toggle_folder( tid, state ) +{ + //---------------------------------- + // Using fancy js? + //---------------------------------- + + if ( ! use_enhanced_js ) + { + return false; + } + + //---------------------------------- + // Can edit? + //---------------------------------- + + if ( ! perm_can_open && ! perm_can_close ) + { + return false; + } + + var td_content = document.getElementById( 'tid-folder-' + tid ).innerHTML; + + if ( topic_state[ tid ] ) + { + state = topic_state[ tid ]; + } + + if ( state == 'closed' ) + { + //---------------------------------- + // Can? + //---------------------------------- + + if ( ! perm_can_open ) + { + return false; + } + + //---------------------------------- + // Topic is locked + //---------------------------------- + + if ( folders[ tid ] ) + { + td_content = folders[ tid ]; + } + + state = 'open'; + } + else + { + //---------------------------------- + // Can? + //---------------------------------- + + if ( ! perm_can_close ) + { + return false; + } + + //---------------------------------- + // Topic isn't locked + //---------------------------------- + + folders[ tid ] = td_content; + state = 'closed'; + } + + //----------------------------------------- + // Store state + //----------------------------------------- + + topic_state[ tid ] = state; + + /*--------------------------------------------*/ + // Main function to do on request + // Must be defined first!! + /*--------------------------------------------*/ + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj.readystate_ready_and_ok() ) + { + // Could do a little loading graphic here? + return; + } + + //---------------------------------- + // INIT + //---------------------------------- + + var returned = xmlobj.xmlhandler.responseText; + + td_content = returned; + document.getElementById( 'tid-folder-' + tid ).innerHTML = td_content; + }; + + //---------------------------------- + // LOAD XML + //---------------------------------- + + xmlobj = new ajax_request(); + xmlobj.onreadystatechange( do_request_function ); + + xmlobj.process( ipb_var_base_url + 'act=xmlout&do=save-topic&type=openclose&name='+state+'&md5check='+ipb_md5_check+'&tid='+tid ); + + return false; +} + +/*--------------------------------------------*/ +// Turn topic title into text input +/*--------------------------------------------*/ + +function span_to_input( tid ) +{ + //---------------------------------- + // Using fancy js? + //---------------------------------- + + if ( ! use_enhanced_js ) + { + return false; + } + + //---------------------------------- + // Can? + //---------------------------------- + + if ( ! perm_can_edit ) + { + return false; + } + + //---------------------------------- + // Prevent double click when desc open + //---------------------------------- + + if ( _desc_clicked ) + { + return false; + } + + span_html[ tid ] = document.getElementById( 'tid-span-' + tid ).innerHTML; + text_html[ tid ] = document.getElementById( 'tid-link-' + tid ).innerHTML; + + //---------------------------------- + // Topic title + //---------------------------------- + + perm_max_length = perm_max_length ? perm_max_length : 50; + + document.getElementById( 'tid-span-' + tid ).innerHTML = ''; //"' + document.getElementById( 'edit-' + tid ).onkeyup = function( event ) { tid_keypress(event, tid) } + document.getElementById( 'edit-' + tid ).onblur = function( event ) { tid_blur(tid) } + document.getElementById( 'edit-' + tid ).focus(); + + return false; +} + +/*--------------------------------------------*/ +// Turn topic DESC into text input +/*--------------------------------------------*/ + +function span_desc_to_input( tid ) +{ + //---------------------------------- + // Using fancy js? + //---------------------------------- + + if ( ! use_enhanced_js ) + { + return false; + } + + //---------------------------------- + // Can? + //---------------------------------- + + if ( ! perm_can_edit ) + { + return false; + } + + //---------------------------------- + // Prevent double click when desc open + //---------------------------------- + + if ( _desc_clicked ) + { + return false; + } + + _desc_clicked = 1; + + desc_html[ tid ] = document.getElementById( 'tid-desc-' + tid ).innerHTML; + + //---------------------------------- + // Topic desc + //---------------------------------- + + document.getElementById( 'tid-desc-' + tid ).innerHTML = ''; //"' + document.getElementById( 'edit-' + tid ).focus(); + + return false; +} + +/*--------------------------------------------*/ +// BLUR HANDLER +/*--------------------------------------------*/ + +tid_blur = function( tid, type ) +{ + new_text = document.getElementById( 'edit-' + tid ).value; + + if( type == 'desc' ) + { + tid_save( tid, new_text, type ); + } + else + { + if ( new_text != "" ) + { + tid_save( tid, new_text, type ); + } + } +} + +/*--------------------------------------------*/ +// KEY PRESS HANDLER +/*--------------------------------------------*/ + +tid_keypress = function( evt, tid, type ) +{ + if ( is_safari ) + { + return false; + } + + evt = evt ? evt : window.event; + + new_text = document.getElementById( 'edit-' + tid ).value; + + if ( ( evt.keyCode == 13 || evt.keyCode == 3 ) && new_text != "" ) + { + tid_save( tid, new_text, type ); + } + else if( evt.keyCode == 27 ) + { + if( type == 'desc' ) + { + document.getElementById( 'tid-desc-' + tid ).innerHTML = desc_html[ tid ]; + } + else + { + document.getElementById( 'tid-span-' + tid ).innerHTML = span_html[ tid ]; + document.getElementById( 'tid-link-' + tid ).innerHTML = text_html[ tid ]; + } + return false; + } +} + +/*--------------------------------------------*/ +// UDPATE DB +/*--------------------------------------------*/ + +tid_save = function( tid, new_text, type ) +{ + var donotedit = 0; + + if ( type == 'desc' ) + { + if ( new_text == desc_html[ tid ] ) + { + donotedit = 1; + } + + _desc_clicked = 0; + + document.getElementById( 'tid-desc-' + tid ).innerHTML = new_text; + } + else + { + if ( new_text == text_html[ tid ] ) + { + donotedit = 1; + } + + type = 'title'; + document.getElementById( 'tid-span-' + tid ).innerHTML = span_html[ tid ]; + document.getElementById( 'tid-link-' + tid ).innerHTML = new_text; + + //---------------------------------- + // Re-check topic links + //---------------------------------- + + forum_init_topic_links(); + } + + if ( donotedit ) + { + return false; + } + + var url = ipb_var_base_url + 'act=xmlout&do=save-topic&type='+type+'&md5check='+ipb_md5_check+'&tid='+tid; + var fields = new Array(); + + //---------------------------------- + // Populate fields + //---------------------------------- + + fields['md5check'] = ipb_md5_check; + fields['tid'] = tid; + fields['act'] = 'xmlout'; + fields['do'] = 'save-topic'; + fields['type'] = type; + fields['name'] = new_text; + + /*--------------------------------------------*/ + // Main function to do on request + // Must be defined first!! + /*--------------------------------------------*/ + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj.readystate_ready_and_ok() ) + { + // Could do a little loading graphic here? + return; + } + + //---------------------------------- + // INIT + //---------------------------------- + + var returned = xmlobj.xmlhandler.responseText; + + if ( type != 'desc' && ! returned.match( /s<\/null>/ ) ) + { + document.getElementById( 'tid-link-' + tid ).innerHTML = returned; + } + }; + + //---------------------------------- + // LOAD XML + //---------------------------------- + + xmlobj = new ajax_request(); + xmlobj.onreadystatechange( do_request_function ); + xmlobj.process( url, 'POST', xmlobj.format_for_post(fields) ); + + + return false; +} + + +/*--------------------------------------------*/ +// Who posted +/*--------------------------------------------*/ + +function who_posted(tid) +{ + window.open( ipb_var_base_url+ "act=Stats&CODE=who&t="+tid, "WhoPosted", "toolbar=no,scrollbars=yes,resizable=yes,width=230,height=300"); +} + +/*--------------------------------------------*/ +// Check delete +/*--------------------------------------------*/ + +function checkdelete() +{ + if ( ! document.modform.selectedtids.value ) + { + return false; + } + + isDelete = document.modform.tact.options[document.modform.tact.selectedIndex].value; + + if (isDelete == 'delete') + { + formCheck = confirm( lang_suredelete ); + + if (formCheck == true) + { + return true; + } + else + { + return false; + } + } +} + +/*--------------------------------------------*/ +// Toggle selection +/*--------------------------------------------*/ + +function forum_select_all() +{ + clean = new Array(); + saved = new Array(); + var topics_this_page = new Array(); + + tmp = document.modform.selectedtids.value; + + if ( tmp != "" ) + { + saved = tmp.split(","); + } + + if( _this_select_all == 0 ) + { + var the_topics = document.getElementsByTagName('input'); + + for ( var i = 0 ; i <= the_topics.length ; i++ ) + { + var e = the_topics[i]; + + if ( e && (e.type == 'hidden') && (! e.disabled) ) + { + var s = e.id; + var a = s.replace( /^tid_(.+?)$/, "$1" ); + + if ( a ) + { + try + { + document.getElementById( 'ipb-topic-' + a ).src = selectedbutton; + clean[clean.length] = a; + topics_this_page[ a ] = 1; + } + catch(err) + { + } + } + } + } + + document.getElementById( 'ipb-topics-all' ).src = selectedbutton; + + _this_select_all = 1; + } + else + { + var the_topics = document.getElementsByTagName('input'); + + for ( var i = 0 ; i <= the_topics.length ; i++ ) + { + var e = the_topics[i]; + + if ( e && (e.type == 'hidden') && (! e.disabled) ) + { + var s = e.id; + var a = s.replace( /^tid_(.+?)$/, "$1" ); + + if ( a ) + { + try + { + document.getElementById( 'ipb-topic-' + a ).src = unselectedbutton; + topics_this_page[ a ] = 1; + } + catch(err) + { + } + } + } + } + + document.getElementById( 'ipb-topics-all' ).src = unselectedbutton; + + _this_select_all = 0; + } + + for( i = 0 ; i < saved.length; i++ ) + { + if ( saved[i] != "" && topics_this_page[ saved[i] ] != 1 ) + { + clean[clean.length] = saved[i]; + } + } + + newvalue = clean.join(','); + + var oldvalue = 0; + + for( var k = 0; k < clean.length; k++ ) + { + if( topics_this_page[ clean[ k ] ] != 1 ) + { + oldvalue++; + } + } + + my_setcookie( 'modtids', newvalue, 0 ); + + document.modform.selectedtids.value = newvalue; + + newcount = stacksize(clean); + + if( oldvalue > 0 ) + { + document.modform.gobutton.value = ipsclass.html_entity_decode( lang_gobutton ) + ' (' + newcount + ') (' + oldvalue + ' ' + ipsclass.html_entity_decode( lang_otherpage ) +' )'; + } + else + { + document.modform.gobutton.value = ipsclass.html_entity_decode( lang_gobutton ) + ' (' + newcount + ')'; + } + + return false; +} + +function forum_toggle_tid( tid ) +{ + var saved = new Array(); + var clean = new Array(); + var add = 1; + var _img = document.getElementById( 'ipb-topic-' + tid ); + + //----------------------------------- + // Get form info + //----------------------------------- + + tmp = document.modform.selectedtids.value; + + if( tmp != "" ) + { + saved = tmp.split(","); + } + + //----------------------------------- + // Remove bit if exists + //----------------------------------- + + for( i = 0 ; i < saved.length; i++ ) + { + if ( saved[i] != "" ) + { + if ( saved[i] == tid ) + { + add = 0; + } + else + { + clean[clean.length] = saved[i]; + } + } + } + + //----------------------------------- + // Add? + //----------------------------------- + + if ( add ) + { + clean[ clean.length ] = tid; + _img.src = selectedbutton; + } + else + { + _img.src = unselectedbutton; + } + + newvalue = clean.join(','); + var topics_this_page = new Array(); + var oldvalue = 0; + var the_topics = document.getElementsByTagName('input'); + + for ( var i = 0 ; i <= the_topics.length ; i++ ) + { + var e = the_topics[i]; + + if ( e && (e.type == 'hidden') && (! e.disabled) ) + { + var s = e.id; + var a = s.replace( /^tid_(.+?)$/, "$1" ); + + if ( a ) + { + topics_this_page[ a ] = 1; + } + } + } + + for( var k = 0; k < clean.length; k++ ) + { + if ( topics_this_page[ clean[ k ] ] != 1 ) + { + oldvalue++; + } + } + + my_setcookie( 'modtids', newvalue, 0 ); + + document.modform.selectedtids.value = newvalue; + + newcount = stacksize(clean); + + if ( oldvalue > 0 ) + { + document.modform.gobutton.value = ipsclass.html_entity_decode( lang_gobutton ) + ' (' + newcount + ') (' + oldvalue + ' ' + ipsclass.html_entity_decode( lang_otherpage ) +' )'; + } + else + { + document.modform.gobutton.value = ipsclass.html_entity_decode( lang_gobutton ) + ' (' + newcount + ')'; + } + + return false; +} + +/*--------------------------------------------*/ +// Do multi page jump +/*--------------------------------------------*/ + +function multi_page_jump( url_bit, total_posts, per_page ) +{ + pages = 1; + cur_st = ipb_var_st; + cur_page = 1; + + if ( total_posts % per_page == 0 ) + { + pages = total_posts / per_page; + } + else + { + pages = Math.ceil( total_posts / per_page ); + } + + msg = ipb_lang_tpl_q1 + " " + pages; + + if ( cur_st > 0 ) + { + cur_page = cur_st / per_page; cur_page = cur_page -1; + } + + show_page = 1; + + if ( cur_page < pages ) + { + show_page = cur_page + 1; + } + + if ( cur_page >= pages ) + { + show_page = cur_page - 1; + } + else + { + show_page = cur_page + 1; + } + + userPage = prompt( msg, show_page ); + + if ( userPage > 0 ) + { + if ( userPage < 1 ) { userPage = 1; } + if ( userPage > pages ) { userPage = pages; } + if ( userPage == 1 ) { start = 0; } + else { start = (userPage - 1) * per_page; } + + window.location = url_bit + "&st=" + start + "&start=" + start; + } +} + + +function boards_send_marker_update( fid, is_subforum ) +{ + //---------------------------------- + // Get current image... + //---------------------------------- + + try + { + var imgsrc = document.getElementById( 'f-'+fid ).innerHTML; + + if ( imgsrc ) + { + //---------------------------------- + // Find out what img its using... + //---------------------------------- + + var regex = new RegExp( "src=['\"](.*/)("+regex_markers+")['\"]" ); + + var results = imgsrc.match( regex ); + + //---------------------------------- + // Got a replacement? + //---------------------------------- + + if ( img_markers[ results[2] ] ) + { + imgsrc = imgsrc.replace( regex, "src='$1"+img_markers[ results[2] ]+"'" ); + + document.getElementById( 'f-'+fid ).innerHTML = imgsrc; + } + } + } + catch(e){} + + var text_return = 0; + + /*--------------------------------------------*/ + // Main function to do on request + // Must be defined first!! + /*--------------------------------------------*/ + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj.readystate_ready_and_ok() ) + { + // Could do a little loading graphic here? + return; + }; + + //---------------------------------- + // Do nothing + //---------------------------------- + + text_return = xmlobj.xmlhandler.responseText; + }; + + xmlobj = new ajax_request(); + xmlobj.onreadystatechange( do_request_function ); + + xmlobj.process( ipb_var_base_url + 'act=xmlout&do=mark-forum&fid='+fid+'&sf='+is_subforum ); + + if ( text_return == 1 ) + { + return false; + } +} \ No newline at end of file diff --git a/Development/javascript_uncompressed/jscripts/ipb_global.js b/Development/javascript_uncompressed/jscripts/ipb_global.js new file mode 100644 index 00000000..343c0d8c --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/ipb_global.js @@ -0,0 +1,1349 @@ +//------------------------------------------ +// Invision Power Board v2.0 +// Global JS File +// (c) 2003 Invision Power Services, Inc. +// +// http://www.invisionboard.com +//------------------------------------------ + +//========================================== +// Set up +//========================================== + +var input_red = 'input-warn'; +var input_green = 'input-ok'; +var input_ok_box = 'input-ok-content'; +var input_warn_box = 'input-warn-content'; + +var img_blank = 'blank.gif'; +var img_tick = 'aff_tick.gif'; +var img_cross = 'aff_cross.gif'; + +var uagent = navigator.userAgent.toLowerCase(); +// Konqueror works best when treated as Safari, especially for attachment manager +var is_safari = ( (uagent.indexOf('safari') != -1) || (navigator.vendor == "Apple Computer, Inc.") || (uagent.indexOf('konqueror') != -1) || (uagent.indexOf('khtml') != -1) ); +var is_opera = (uagent.indexOf('opera') != -1); +var is_webtv = (uagent.indexOf('webtv') != -1); +var is_ie = ( (uagent.indexOf('msie') != -1) && (!is_opera) && (!is_safari) && (!is_webtv) ); +var is_ie4 = ( (is_ie) && (uagent.indexOf("msie 4.") != -1) ); +var is_ie7 = ( (is_ie) && (uagent.indexOf("msie 7.") != -1) ); +var is_moz = (navigator.product == 'Gecko'); +var is_ns = ( (uagent.indexOf('compatible') == -1) && (uagent.indexOf('mozilla') != -1) && (!is_opera) && (!is_webtv) && (!is_safari) ); +var is_ns4 = ( (is_ns) && (parseInt(navigator.appVersion) == 4) ); +//var is_kon = (uagent.indexOf('konqueror') != -1); + +var is_win = ( (uagent.indexOf("win") != -1) || (uagent.indexOf("16bit") !=- 1) ); +var is_mac = ( (uagent.indexOf("mac") != -1) || (navigator.vendor == "Apple Computer, Inc.") ); +var ua_vers = parseInt(navigator.appVersion); + +var ipb_pages_shown = 0; +var ipb_pages_array = new Array(); + +var ipb_skin_url = ipb_skin_url ? ipb_skin_url : ipb_var_image_url; + +/*-------------------------------------------------------------------------*/ +// Check check checkity box +/*-------------------------------------------------------------------------*/ + +function gbl_check_search_box() +{ + try + { + var _cb = document.getElementById( 'gbl-search-checkbox' ); + var _fd = document.getElementById( 'gbl-search-forums' ); + + if ( _cb.checked && ipb_input_f ) + { + _fd.value = ipb_input_f; + } + else + { + _fd.value = 'all'; + } + } + catch(error) + { + } +}; + +/*-------------------------------------------------------------------------*/ +// Display in-line messages... +/*-------------------------------------------------------------------------*/ + +function show_inline_messages() +{ + var _string = window.location.toString(); + var _msg_box = null; + + if ( _string.indexOf( '?___msg=' ) != -1 || _string.indexOf( ';___msg=' ) != -1 || _string.indexOf( '&___msg=' ) != -1 ) + { + // Is this a frame? Move it to the parent... + try + { + if ( parent.document.getElementById( 'ipd-msg-text' ) ) + { + _msg_box = parent.document.getElementById( 'ipd-msg-text' ); + } + else + { + _msg_box = document.getElementById( 'ipd-msg-text' ); + } + } + catch( error ) + { + alert( error ); + } + + var message = _string.replace( /^.*[\?;&]___msg=(.+?)(&.*$|$)/, "$1" ); + message = unescape( message ); + + if ( message_pop_up_lang[ message ] ) + { + try + { + _msg_box.innerHTML = message_pop_up_lang[ message ]; + + centerdiv = new center_div(); + centerdiv.divname = 'ipd-msg-wrapper'; + centerdiv.move_div(); + + var _this_to = setTimeout("hide_inline_messages_instant()",2000); + } + catch( anerror) + { + alert( message_pop_up_lang[ message ] ); + } + } + } +}; + +function show_inline_messages_instant( msg ) +{ + _msg_box = document.getElementById( 'ipd-msg-text' ); + _msg_box.innerHTML = message_pop_up_lang[ msg ]; + + centerdiv = new center_div(); + centerdiv.divname = 'ipd-msg-wrapper'; + centerdiv.move_div(); + + var _this_to = setTimeout("hide_inline_messages_instant()",2000); +}; + +function hide_inline_messages_instant() +{ + try + { + document.getElementById( 'ipd-msg-wrapper' ).style.display = 'none'; + parent.document.getElementById( 'ipd-msg-wrapper' ).style.display = 'none'; + } + catch(acold) + { + } +}; + +/*-------------------------------------------------------------------------*/ +// Generate new iframe include +/*-------------------------------------------------------------------------*/ + +function iframe_include() +{ + this.iframe_id = null; + this.iframe_obj = null; + this.iframe_add_to_div = null; + this.iframe_add_to_div_obj = null; + this.iframe_main_wrapper = null; + this.iframe_classname = 'GBL-component-iframe'; + this.ok_to_go = 1; + this.iframe_height = 300; + this.ajax = ''; +}; + +iframe_include.prototype.init = function() +{ + try + { + this.iframe_add_to_div_obj = document.getElementById( this.iframe_add_to_div ); + } + catch( error ) + { + this.ok_to_go = 0; + } +}; + +iframe_include.prototype.include = function( url ) +{ + //----------------------------------------- + // Check + //----------------------------------------- + + if ( ! this.ok_to_go ) + { + return false; + } + + //----------------------------------------- + // INIT + //----------------------------------------- + + var iheight = parseInt( this.iframe_add_to_div_obj.style.height ); + var iwidth = parseInt( this.iframe_add_to_div_obj.style.width ); + + //----------------------------------------- + // Generate iFrame box + //----------------------------------------- + + if ( this.iframe_obj ) + { + this.iframe_add_to_div_obj.removeChild( this.iframe_obj ); + } + + this.iframe_obj = document.createElement( 'IFRAME' ); + + this.iframe_obj.src = url; + this.iframe_obj.id = this.iframe_id; + this.iframe_obj.name = this.iframe_id; + this.iframe_obj.scrolling = 'no'; + this.iframe_obj.frameBorder = 'no'; + this.iframe_obj.border = '0'; + this.iframe_obj.className = this.iframe_classname; + this.iframe_obj.style.width = iwidth ? iwidth + 'px' : '100%'; + this.iframe_obj.style.height = iheight ? iheight - 5 + 'px' : this.iframe_height + 'px'; + this.iframe_obj.style.overflow = 'hidden'; + this.iframe_obj.style.padding = '0px'; + this.iframe_obj.style.margin = '0px'; + + // Ajax object + this.ajax = new ajax_request(); + + // Fix up padding + this.iframe_add_to_div_obj.style.padding = '0px'; + this.iframe_add_to_div_obj.style.margin = '0px'; + + if( is_ie && !is_ie7 ) + { + this.iframe_add_to_div_obj.style.paddingLeft = '6px'; + this.iframe_add_to_div_obj.style.paddingRight = '6px'; + } + + // Add environmentals.. + this.iframe_obj.iframe_loaded = 0; + this.iframe_obj.iframe_init = 0; + this.iframe_obj._this = this; + + // Attach iFrame inside our DIV + this.iframe_add_to_div_obj.style.overflow = ''; + this.iframe_add_to_div_obj.appendChild( this.iframe_obj ); + + this.ajax.show_loading( ajax_load_msg ); + + // Add handler + if ( is_ie ) + { + this.iframe_obj.allowTransparency = true; + this.iframe_obj.onreadystatechange = this.iframe_on_load_ie; + } + else + { + this.iframe_obj.onload = this.iframe_onload; + } +}; + +/** +* Each time the window is loaded, close +* any open messages +*/ +iframe_include.prototype.iframe_onload = function( e ) +{ + //----------------------------------------- + // First load? + //----------------------------------------- + + //window.frames[ this.id ].document + + var _document= this._this.iframe_obj.contentDocument; + + if ( is_safari ) + { + _document = window.frames[ this.id ].document; + } + + if ( ! this.iframe_init ) + { + this.iframe_init = 1; + this.iframe_loaded = 1; + + + _document.onmousedown = menu_action_close; + } + else + { + this.iframe_loaded = 1; + + _document.onmousedown = menu_action_close; + } + + this._this.ajax.hide_loading(); + + //----------------------------------------- + // Attempt to fix up padding issues + //----------------------------------------- + + try + { + _document.getElementsByTagName( 'body' )[0].style.padding = '0px'; + _document.getElementsByTagName( 'body' )[0].style.margin = '0px'; + } + catch(error) + { + } + + //----------------------------------------- + // Resize... + //----------------------------------------- + + var _new_height = parseInt( _document.getElementById( this._this.iframe_main_wrapper ).offsetHeight ); + + if ( _new_height > 0 ) + { + if ( is_safari ) + { + _new_height += 3; + } + + this._this.iframe_obj.style.height = _new_height + "px"; + this._this.iframe_add_to_div_obj.style.height = _new_height + "px"; + } + + //----------------------------------------- + // Fix up style sheets + //----------------------------------------- + + var style = document.getElementsByTagName( 'style' ); + var _new_style = ''; + + for( i in style ) + { + _new_style += "\n" + style[i].innerHTML; + } + + try + { + _document.getElementsByTagName( 'style' )[0].innerHTML = _new_style; + } + catch(error) + { + } +}; + +/** +* IE only calls onload once... So subsequent loads +* don't do anything.. hence the readystate change +*/ +iframe_include.prototype.iframe_on_load_ie = function( e ) +{ + //----------------------------------------- + // First load? + //----------------------------------------- + + if ( this.readyState == 'complete' ) + { + var _document = ''; + + if ( this._this.iframe_obj.contentWindow ) + { + _document = this._this.iframe_obj.contentWindow.document; + } + else if ( this._this.iframe_obj.document ) + { + _document = this._this.iframe_obj.document; + } + else + { + _document = window.frames[ this.id ].document; + } + + if ( ! this.iframe_init ) + { + this.iframe_init = 1; + this.iframe_loaded = 1; + _document.onmousedown = menu_action_close; + } + else + { + this.iframe_loaded = 1; + _document.onmousedown = menu_action_close; + } + + //----------------------------------------- + // Fix up style sheets + //----------------------------------------- + + var style = document.getElementsByTagName( 'style' ); + var _new_style = ''; + + for( i in style ) + { + if ( style[i].innerHTML ) + { + _new_style += "\n" + style[i].innerHTML; + } + } + + var _urls = _new_style.match( /@import\s+?url\(\s+?['"](.+?)['"]\s+?\);/ig ); + + if ( _urls && _urls.length ) + { + for( i = 0 ; i <= _urls.length ; i++ ) + { + if ( typeof( _urls[i] ) != 'undefined' ) + { + _urls[i] = _urls[i].replace( /@import\s+?url\(\s+?['"](.+?)['"]\s+?\);/ig, "$1" ); + + if ( typeof( _urls[i] ) != 'undefined' ) + { + _document.createStyleSheet( _urls[i] ); + } + } + } + } + + this._this.ajax.hide_loading(); + + //----------------------------------------- + // Attempt to fix up padding issues + //----------------------------------------- + + try + { + _document.getElementsByTagName( 'body' )[0].style.padding = '0px'; + _document.getElementsByTagName( 'body' )[0].style.margin = '0px'; + } + catch(error) + { + } + + //----------------------------------------- + // Resize... + //----------------------------------------- + + var _new_height = parseInt( _document.getElementById( this._this.iframe_main_wrapper ).offsetHeight ); + var _new_width = parseInt( _document.getElementById( this._this.iframe_main_wrapper ).offsetWidth ); + + if ( _new_height > 0 ) + { + this._this.iframe_obj.style.height = _new_height + "px"; + this._this.iframe_add_to_div_obj.style.height = _new_height + "px"; + } + + if ( _new_width > 0 ) + { + this._this.iframe_obj.style.width = _new_width + "px"; + this._this.iframe_add_to_div_obj.style.width = _new_width + "px"; + } + } +}; + +/*-------------------------------------------------------------------------*/ +// Fix IE PNG images +/*-------------------------------------------------------------------------*/ + +function ie_fix_png() +{ + if ( is_ie ) + { + document.onreadystatechange = ie_fix_png_do; + } +} + +function ie_fix_png_do() +{ + if ( document.readyState == 'complete' ) + { + var pos = navigator.userAgent.indexOf("MSIE "); + var version = navigator.userAgent.substring(pos + 5); + var blanky = ipb_skin_url + "/blank.gif"; + var _sw = screen.width * ( parseInt( ipsclass.settings['resize_percent'] ) / 100 ); + + if (pos == -1) + { + return false; + } + + if ( ! ((version.indexOf("5.5") == 0) || (version.indexOf("6") == 0)) && (navigator.platform == ("Win32")) ) + { + return; + } + + var images = document.getElementsByTagName( 'IMG' ); + var _len = images.length; + + if ( _len ) + { + for ( var i = 0 ; i < _len ; i++ ) + { + if ( images[i].src.match( /\.png$/ ) ) + { + var element = images[i]; + var _width = 0; + var _height = 0; + var _src = 0; + + element._width = element._width ? parseInt( element._width ) : 0; + element._resized = parseInt( element._resized ); + + if ( ! element.style.width ) + { + _width = element.width; + } + + if ( ! element.style.height ) + { + _height = element.height; + } + + _src = element.src; + + //----------------------------------------- + // Prevent PNG clash with topic overwrite + //----------------------------------------- + + if ( _width < _sw && ! element._resized && element._width < _sw ) + { + element.src = blanky; + + if ( _width ) + { + element.style.width = _width+"px"; + } + if ( _height ) + { + element.style.height = _height+"px"; + } + + element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + _src + "',sizingMethod='scale')"; + } + else + { + //alert( 'Skipped: ' + images[i].src ); + } + } + } + } + } +} + +/*-------------------------------------------------------------------------*/ +// Add onload event +/*-------------------------------------------------------------------------*/ + +function add_onload_event( func ) +{ + var oldonload = window.onload; + + if (typeof window.onload != 'function') + { + window.onload = func; + + } + else + { + window.onload = function() + { + if ( oldonload ) + { + oldonload(); + }; + + func(); + }; + } +} + +/*-------------------------------------------------------------------------*/ +// Add shadow to an ID +/*-------------------------------------------------------------------------*/ + +function add_shadow( wrapname, divname ) +{ + var divobj = document.getElementById( divname ); + var wrapobj = document.getElementById( wrapname ); + + //---------------------------------- + // Transform the DIV + //---------------------------------- + + if ( is_ie ) + { + wrapobj.className = 'shadow-ie'; + wrapobj.style.width = divobj.offsetWidth + 1 + 'px'; + wrapobj.style.height = divobj.offsetHeight + 1 + 'px'; + } + else + { + wrapobj.className = 'shadow-moz'; + wrapobj.style.width = divobj.offsetWidth + 0 + 'px'; + wrapobj.style.height = divobj.offsetHeight + 0 + 'px'; + } +} + +/*-------------------------------------------------------------------------*/ +// DST Auto correction +/*-------------------------------------------------------------------------*/ + +function global_dst_check( tzo, dst ) +{ + var op = tzo < 0 ? 'plus' : 'minus'; + tzo = Math.abs( tzo ); + var dstoffset = Math.abs( new Date().getTimezoneOffset() / 60 ); + var dstset = 0; + var url = ipb_var_base_url + 'act=xmlout&do=dst-autocorrection&md5check=' + ipb_md5_check; + + if( op == 'plus' ) + { + var thisoffset = tzo - dst; + } + else + { + var thisoffset = tzo + dst; + } + + var math = Math.abs( thisoffset - dstoffset ); + + if ( math != 0 ) + { + try + { + //---------------------------------- + // Fancy first... + //---------------------------------- + + xml_dst_set( url + '&xml=1' ); + dstset = 1; + } + catch(e) + { + dstset = 0; + } + + //---------------------------------- + // No fancy? + //---------------------------------- + + if ( dstset == 0 ) + { + window.location = url; + } + } +} + +/*-------------------------------------------------------------------------*/ +// Get cookie +/*-------------------------------------------------------------------------*/ + +function my_getcookie( name ) +{ + return ipsclass.my_getcookie( name ); +} + +/*-------------------------------------------------------------------------*/ +// Set cookie +/*-------------------------------------------------------------------------*/ + +function my_setcookie( name, value, sticky ) +{ + return ipsclass.my_setcookie( name, value, sticky ); +} + +/*-------------------------------------------------------------------------*/ +// Lang replace +/*-------------------------------------------------------------------------*/ + +function lang_build_string() +{ + if ( ! arguments.length || ! arguments ) + { + return; + } + + var string = arguments[0]; + + for( var i = 1 ; i < arguments.length ; i++ ) + { + var match = new RegExp('<%' + i + '>', 'gi'); + string = string.replace( match, arguments[i] ); + } + + return string; +} + +/*-------------------------------------------------------------------------*/ +// Pop up friends window +/*-------------------------------------------------------------------------*/ + +function friends_pop( extra_url ) +{ + ipb_var_base_url = ipb_var_base_url.replace( '&', '&' ); + + if ( extra_url ) + { + extra_url = extra_url.replace( '&', '&' ); + } + else + { + extra_url = ''; + } + + ipsclass.pop_up_window( ipb_var_base_url + 'act=profile&CODE=friends_list_popup' + extra_url, 450, 400, 'Friends' ); +} + +/*-------------------------------------------------------------------------*/ +// Pop up MyAssistant window +/*-------------------------------------------------------------------------*/ + +function buddy_pop() +{ + var not_loaded_yet = 0; + + if ( use_enhanced_js ) + { + try + { + xml_myassistant_init(); + not_loaded_yet = 1; + } + catch( e ) + { + //alert(e); + not_loaded_yet = 0; + } + } + + if ( ! not_loaded_yet ) + { + ipb_var_base_url = ipb_var_base_url.replace( '&', '&' ); + window.open( ipb_var_base_url + 'act=buddy','BrowserBuddy','width=250,height=500,resizable=yes,scrollbars=yes'); + } +} + +/*-------------------------------------------------------------------------*/ +// Multi Page jumps +/*-------------------------------------------------------------------------*/ + +function check_enter( pages_id, e ) +{ + var keypress = e.keyCode ? e.keyCode : e.which ? e.which : e.charCode; + + if( keypress == 13 ) + { + do_multi_page_jump( pages_id ); + } +} + +function do_multi_page_jump( pages_id ) +{ + var pages = 1; + var cur_st = ipb_var_st; + var cur_page = 1; + var total_posts = ipb_pages_array[ pages_id ][2]; + var per_page = ipb_pages_array[ pages_id ][1]; + var url_bit = ipb_pages_array[ pages_id ][0]; + var userPage = parseInt( document.getElementById( 'st-'+pages_id ).value ); + + var st_type = document.getElementById( 'st-type-'+pages_id ).value; + + st_type = st_type ? st_type : 'st'; + + //----------------------------------- + // Fix up URL BIT + //----------------------------------- + + url_bit = url_bit.replace( new RegExp( "&", "g" ) , '&' ); + + //----------------------------------- + // Work out pages + //----------------------------------- + + if ( total_posts % per_page == 0 ) + { + pages = total_posts / per_page; + } + else + { + pages = Math.ceil( total_posts / per_page ); + } + + if ( cur_st > 0 ) + { + cur_page = cur_st / per_page; cur_page = cur_page -1; + } + + if ( userPage > 0 ) + { + if ( userPage < 1 ) { userPage = 1; } + if ( userPage > pages ) { userPage = pages; } + if ( userPage == 1 ) { start = 0; } + else { start = (userPage - 1) * per_page; } + + if ( start ) + { + window.location = url_bit + "&" + st_type + "=" + start; + } + else + { + window.location = url_bit; + } + + return false; + } +} + +/*-------------------------------------------------------------------------*/ +// Hide / Unhide menu elements +/*-------------------------------------------------------------------------*/ + +function pages_st_focus( pages_id ) +{ + document.getElementById( 'st-'+pages_id ).focus(); +} + +/*-------------------------------------------------------------------------*/ +// Hide / Unhide menu elements +/*-------------------------------------------------------------------------*/ + +function ShowHide(id1, id2) +{ + if (id1 != '') toggleview(id1); + if (id2 != '') toggleview(id2); +} + +/*-------------------------------------------------------------------------*/ +// Get element by id +/*-------------------------------------------------------------------------*/ + +function my_getbyid(id) +{ + itm = null; + + if (document.getElementById) + { + itm = document.getElementById(id); + } + else if (document.all) + { + itm = document.all[id]; + } + else if (document.layers) + { + itm = document.layers[id]; + } + + return itm; +} + +/*-------------------------------------------------------------------------*/ +// Show/hide toggle +/*-------------------------------------------------------------------------*/ + +function toggleview(id) +{ + if ( ! id ) return; + + if ( itm = my_getbyid(id) ) + { + if (itm.style.display == "none") + { + my_show_div(itm); + } + else + { + my_hide_div(itm); + } + } +} + +/*-------------------------------------------------------------------------*/ +// Set DIV ID to hide +/*-------------------------------------------------------------------------*/ + +function my_hide_div(itm) +{ + if ( ! itm ) return; + + itm.style.display = "none"; +} + +/*-------------------------------------------------------------------------*/ +// Set DIV ID to show +/*-------------------------------------------------------------------------*/ + +function my_show_div(itm) +{ + if ( ! itm ) return; + + itm.style.display = ""; +} + +/*-------------------------------------------------------------------------*/ +// Change cell colour +/*-------------------------------------------------------------------------*/ + +function change_cell_color( id, cl ) +{ + itm = my_getbyid(id); + + if ( itm ) + { + itm.className = cl; + } +} + +/*-------------------------------------------------------------------------*/ +// Toggle category +/*-------------------------------------------------------------------------*/ + +function togglecategory( fid, add ) +{ + saved = new Array(); + clean = new Array(); + + //----------------------------------- + // Get any saved info + //----------------------------------- + + if ( tmp = ipsclass.my_getcookie('collapseprefs') ) + { + saved = tmp.split(","); + } + + //----------------------------------- + // Remove bit if exists + //----------------------------------- + + for( i = 0 ; i < saved.length; i++ ) + { + if ( saved[i] != fid && saved[i] != "" ) + { + clean[clean.length] = saved[i]; + } + } + + //----------------------------------- + // Add? + //----------------------------------- + + if ( add ) + { + clean[ clean.length ] = fid; + my_show_div( my_getbyid( 'fc_'+fid ) ); + my_hide_div( my_getbyid( 'fo_'+fid ) ); + } + else + { + my_show_div( my_getbyid( 'fo_'+fid ) ); + my_hide_div( my_getbyid( 'fc_'+fid ) ); + } + + ipsclass.my_setcookie( 'collapseprefs', clean.join(','), 1 ); +} + +/*-------------------------------------------------------------------------*/ +// locationjump +/*-------------------------------------------------------------------------*/ + +function locationjump(url) +{ + window.location = ipb_var_base_url + url; +} + +/*-------------------------------------------------------------------------*/ +// CHOOSE SKIN +/*-------------------------------------------------------------------------*/ + +function chooseskin(obj) +{ + choosebox = obj.options[obj.selectedIndex].value; + extravars = ''; + + if ( choosebox != -1 && ! isNaN( choosebox ) ) + { + if ( document.skinselectorbox.skinurlbits.value ) + { + extravars = '&' + document.skinselectorbox.skinurlbits.value; + + //---------------------------------- + // Strip out old skin change stuff + // setskin=1&skinid=2 + //---------------------------------- + + extravars = extravars.replace( /setskin=\d{1,}/g, '' ); + extravars = extravars.replace( /skinid=\d{1,}/g , '' ); + extravars = extravars.replace( /cal_id=&/g, '' ); + extravars = extravars.replace( /&{1,}/g , '&' ); + extravars = extravars.replace( /s=&/g , '' ); + } + + locationjump( 'setskin=1&skinid=' + choosebox + extravars ); + } +} + +/*-------------------------------------------------------------------------*/ +// CHOOSE LANG +/*-------------------------------------------------------------------------*/ + +function chooselang(obj) +{ + choosebox = obj.options[obj.selectedIndex].value; + extravars = ''; + + if ( document.langselectorbox.langurlbits.value ) + { + extravars = '&' + document.langselectorbox.langurlbits.value; + + //---------------------------------- + // Strip out old skin change stuff + // setskin=1&skinid=2 + //---------------------------------- + + extravars = extravars.replace( /setlanguage=\d{1,}/g, '' ); + extravars = extravars.replace( /cal_id=&/g, '' ); + extravars = extravars.replace( /langid=\w{1,}/g , '' ); + extravars = extravars.replace( /&{1,}/g , '&' ); + extravars = extravars.replace( /s=&/g , '' ); + } + + locationjump( 'setlanguage=1&langid=' + choosebox + extravars ); +} + +/*-------------------------------------------------------------------------*/ +// pop up window +/*-------------------------------------------------------------------------*/ + +function PopUp(url, name, width,height,center,resize,scroll,posleft,postop) +{ + showx = ""; + showy = ""; + + if (posleft != 0) { X = posleft } + if (postop != 0) { Y = postop } + + if (!scroll) { scroll = 1 } + if (!resize) { resize = 1 } + + if ((parseInt (navigator.appVersion) >= 4 ) && (center)) + { + X = (screen.width - width ) / 2; + Y = (screen.height - height) / 2; + } + + if ( X > 0 ) + { + showx = ',left='+X; + } + + if ( Y > 0 ) + { + showy = ',top='+Y; + } + + if (scroll != 0) { scroll = 1 } + + var Win = window.open( url, name, 'width='+width+',height='+height+ showx + showy + ',resizable='+resize+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no'); +} + +/*-------------------------------------------------------------------------*/ +// Array: Get stack size +/*-------------------------------------------------------------------------*/ + +function stacksize(thearray) +{ + for (i = 0 ; i < thearray.length; i++ ) + { + if ( (thearray[i] == "") || (thearray[i] == null) || (thearray == 'undefined') ) + { + return i; + } + } + + return thearray.length; +} + +/*-------------------------------------------------------------------------*/ +// Array: Push stack +/*-------------------------------------------------------------------------*/ + +function pushstack(thearray, newval) +{ + arraysize = stacksize(thearray); + thearray[arraysize] = newval; +} + +/*-------------------------------------------------------------------------*/ +// Array: Pop stack +/*-------------------------------------------------------------------------*/ + +function popstack(thearray) +{ + arraysize = stacksize(thearray); + theval = thearray[arraysize - 1]; + delete thearray[arraysize - 1]; + return theval; +} + +/*-------------------------------------------------------------------------*/ +// Converts "safe" innerHTML back to normal template +/*-------------------------------------------------------------------------*/ + +function innerhtml_template_to_html( t ) +{ + t = t.replace( /<%(\d+?)>/ig, "<%$1>" ); + t = t.replace( /%3C%(\d+?)%3E/ig , "<%$1>" ); + return t; +} + +/*-------------------------------------------------------------------------*/ +// Global freeze events +/*-------------------------------------------------------------------------*/ + +function global_cancel_bubble(obj, extra) +{ + if ( ! obj || is_ie) + { + if ( extra ) + { + window.event.returnValue = false; + } + + window.event.cancelBubble = true; + + return window.event; + } + else + { + obj.stopPropagation(); + + if ( extra ) + { + obj.preventDefault(); + } + + return obj; + } +} + +/*-------------------------------------------------------------------------*/ +// Get left posititon of object +/*-------------------------------------------------------------------------*/ + +function _get_obj_leftpos(obj) +{ + var left = obj.offsetLeft; + + while( (obj = obj.offsetParent) != null ) + { + left += obj.offsetLeft; + } + + return left; +} + +/*-------------------------------------------------------------------------*/ +// Get top position of object +/*-------------------------------------------------------------------------*/ + +function _get_obj_toppos(obj) +{ + var top = obj.offsetTop; + + while( (obj = obj.offsetParent) != null ) + { + top += obj.offsetTop; + } + + return top; +} + +/*-------------------------------------------------------------------------*/ +// Center a div on the screen +/*-------------------------------------------------------------------------*/ + +function center_div() +{ + this.divname = ''; + this.divobj = ''; + this.shimobj = ''; +} + +/*-------------------------------------------------------------------------*/ +// Main run function +/*-------------------------------------------------------------------------*/ + +center_div.prototype.move_div = function() +{ + try + { + if ( parent.document.getElementById( this.divname ) ) + { + this._document = parent.document; + this._window = parent.window; + } + } + catch(e) + { + return; + } + + this.divobj = this._document.getElementById( this.divname ); + + //---------------------------------- + // Figure width and height + //---------------------------------- + + var my_width = 0; + var my_height = 0; + + if ( typeof( this._window.innerWidth ) == 'number' ) + { + //---------------------------------- + // Non IE + //---------------------------------- + + my_width = this._window.innerWidth; + my_height = this._window.innerHeight; + } + else if ( this._document.documentElement && ( this._document.documentElement.clientWidth || this._document.documentElement.clientHeight ) ) + { + //---------------------------------- + // IE 6+ + //---------------------------------- + + my_width = this._document.documentElement.clientWidth; + my_height = this._document.documentElement.clientHeight; + } + else if ( this._document.body && ( this._document.body.clientWidth || this._document.body.clientHeight ) ) + { + //---------------------------------- + // Old IE + //---------------------------------- + + my_width = this._document.body.clientWidth; + my_height = this._document.body.clientHeight; + } + + //---------------------------------- + // Show (but behind the zIndex... + //---------------------------------- + + this.divobj.style.position = 'absolute'; + this.divobj.style.display = 'block'; + this.divobj.style.zIndex = -1; + + if ( is_ie ) + { + var layer_html = this.divobj.innerHTML; + var full_html = "" + layer_html; + + this.divobj.innerHTML = full_html; + } + + //---------------------------------- + // Stop IE showing select boxes over + // floating div [ 2 ] + //---------------------------------- + + //if ( is_ie ) + //{ + // this.shimobj = this._document.getElementById( this.divname + "-shim" ); + // this.shimobj.style.width = (parseInt(this.divobj.offsetWidth) -5) + "px"; + // this.shimobj.style.height = this.divobj.offsetHeight; + // this.shimobj.style.zIndex = this.divobj.style.zIndex - 1; + // this.shimobj.style.top = this.divobj.style.top; + // this.shimobj.style.left = this.divobj.style.left; + // this.shimobj.style.display = ""; + //} + + //---------------------------------- + // Get div height && width + //---------------------------------- + + var divheight = parseInt( this.divobj.style.height ) ? parseInt( this.divobj.style.height ) : parseInt( this.divobj.offsetHeight ); + var divwidth = parseInt( this.divobj.style.width ) ? parseInt( this.divobj.style.width ) : parseInt( this.divobj.offsetWidth ); + + divheight = divheight ? divheight : 200; + divwidth = divwidth ? divwidth : 400; + + //---------------------------------- + // Get current scroll offset + //---------------------------------- + + var scrolly = this.getYscroll(); + + //---------------------------------- + // Finalize... + //---------------------------------- + + var setX = ( my_width - divwidth ) / 2; + var setY = ( my_height - divheight ) / 2 + scrolly; + + setX = ( setX < 0 ) ? 0 : setX; + setY = ( setY < 0 ) ? 0 : setY; + + this.divobj.style.left = setX + "px"; + this.divobj.style.top = setY + "px"; + + //---------------------------------- + // Show for real... + //---------------------------------- + + this.divobj.style.zIndex = 99; +}; + +/*-------------------------------------------------------------------------*/ +// Hide div +/*-------------------------------------------------------------------------*/ + +center_div.prototype.hide_div = function() +{ + try + { + if ( ! this.divobj ) + { + return; + } + else + { + this.divobj.style.display = 'none'; + } + } + catch(e) + { + return; + } +}; + +/*-------------------------------------------------------------------------*/ +// Get YScroll +/*-------------------------------------------------------------------------*/ + +center_div.prototype.getYscroll = function() +{ + var scrollY = 0; + + if ( this._document.documentElement && this._document.documentElement.scrollTop ) + { + scrollY = this._document.documentElement.scrollTop; + } + else if ( this._document.body && this._document.body.scrollTop ) + { + scrollY = this._document.body.scrollTop; + } + else if ( this._window.pageYOffset ) + { + scrollY = this._window.pageYOffset; + } + else if ( this._window.scrollY ) + { + scrollY = this._window.scrollY; + } + + return scrollY; +}; \ No newline at end of file diff --git a/Development/javascript_uncompressed/jscripts/ipb_global_xmlenhanced.js b/Development/javascript_uncompressed/jscripts/ipb_global_xmlenhanced.js new file mode 100644 index 00000000..2d4926c6 --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/ipb_global_xmlenhanced.js @@ -0,0 +1,463 @@ +//------------------------------------------------------------------------------ +// IPS XML HTTP REQUEST:: GET NEW POSTS +//------------------------------------------------------------------------------ +// Supports Safari, Mozilla 1.3+ (Firefox, etc) and IE 5.5+ +// (c) 2005 Invision Power Services, Inc. +// http://www.invisionpower.com +//------------------------------------------------------------------------------ + +/*--------------------------------------------*/ +// INIT VARS +/*--------------------------------------------*/ + +var gnp_div = 'get-new-posts_menu'; +var msg_div = 'get-new-msgs_menu'; +var mem_div = 'get-members'; +var divobj; +var divopen = 0; +var xmlobj; +var reg_img = ''; + +var myass_main; +var myass_loaded = 0; +var pm_cycle_count = 0; +var search_cache = {}; +var posts_st = 0; + +/*--------------------------------------------*/ +// Get NEXT posts link +/*--------------------------------------------*/ + +function xml_show_new_posts( st ) +{ + posts_st = st; + xml_myassistant_init( 'posts' ); +} + +/*--------------------------------------------*/ +// Load MyASSISTANT! +/*--------------------------------------------*/ + +function xml_myassistant_init( tab ) +{ + myass_main = document.getElementById( 'get-myassistant' ); + myass_drag = document.getElementById( 'myass-drag' ); + myass_content = document.getElementById( 'myass-content' ); + + /*--------------------------------------------*/ + // Main function to do on request + // Must be defined first!! + /*--------------------------------------------*/ + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj_myass.readystate_ready_and_ok() ) + { + // Could do a little loading graphic here? + return; + } + + //---------------------------------- + // INIT + //---------------------------------- + + var html = xmlobj_myass.xmlhandler.responseText; + + //---------------------------------- + // Stop IE showing select boxes over + // floating div [ 1 ] + //---------------------------------- + + if ( is_ie ) + { + html = "" + html; + } + + myass_content.innerHTML = html; + + //---------------------------------- + // Stop IE showing select boxes over + // floating div [ 1 ] + //---------------------------------- + + if ( is_ie ) + { + drag_html = myass_drag.innerHTML; + main_drag_html = "" + drag_html; + + myass_drag.innerHTML = main_drag_html; + } + + //---------------------------------- + // Stop IE showing select boxes over + // floating div [ 2 ] + //---------------------------------- + + if ( is_ie ) + { + myass_shim = document.getElementById('myass-shim'); + myass_shim.style.width = myass_content.offsetWidth; + myass_shim.style.height = myass_content.offsetHeight; + myass_shim.style.zIndex = myass_content.style.zIndex - 1; + myass_shim.style.top = myass_content.style.top; + myass_shim.style.left = myass_content.style.left; + myass_shim.style.display = "block"; + + myass_shim_d = document.getElementById('myass-shim-two'); + myass_shim_d.style.width = myass_drag.offsetWidth; + myass_shim_d.style.height = myass_drag.offsetHeight; + myass_shim_d.style.zIndex = myass_drag.style.zIndex - 1; + myass_shim_d.style.top = myass_drag.style.top; + myass_shim_d.style.left = myass_drag.style.left; + myass_shim_d.style.display = "block"; + } + }; + + xmlobj_myass = new ajax_request(); + xmlobj_myass.onreadystatechange( do_request_function ); + + //---------------------------------- + // LOAD XML + //---------------------------------- + + if ( ! tab ) + { + xmlobj_myass.process( ipb_var_base_url + 'act=buddy&xml=1' ); + } + else if ( tab == 'newpms' ) + { + //---------------------------------- + // Figure out where we are.. + //---------------------------------- + + var limit_a = 0; + + pm_cycle_count++; + + if ( pm_cycle_count <= ipb_new_msgs ) + { + limit_a = pm_cycle_count - 1; + } + else + { + pm_cycle_count = 1; + } + + xmlobj_myass.process( ipb_var_base_url + 'act=buddy&xml=1&tab=' + tab + '&limit=' + limit_a ); + + myass_content.style.width = '398px'; + myass_content.style.overflow = 'auto'; + myass_content.style.overflowX = 'hidden'; + } + else if ( tab == 'posts' ) + { + xmlobj_myass.process( ipb_var_base_url + 'act=buddy&xml=1&tab=' + tab + '&st=' + posts_st ); + } + else + { + xmlobj_myass.process( ipb_var_base_url + 'act=buddy&xml=1&tab=' + tab ); + } + + myass_main.style.position = 'absolute'; + myass_main.style.display = 'block'; + myass_main.style.zIndex = 99; + + //---------------------------------- + // Not loaded? INIT + //---------------------------------- + + if ( ! myass_loaded ) + { + //---------------------------------- + // Figure width and height + //---------------------------------- + + var my_width = 0; + var my_height = 0; + + if ( typeof( window.innerWidth ) == 'number' ) + { + //---------------------------------- + // Non IE + //---------------------------------- + + my_width = window.innerWidth; + my_height = window.innerHeight; + } + else if ( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) + { + //---------------------------------- + // IE 6+ + //---------------------------------- + + my_width = document.documentElement.clientWidth; + my_height = document.documentElement.clientHeight; + } + else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) + { + //---------------------------------- + // Old IE + //---------------------------------- + + my_width = document.body.clientWidth; + my_height = document.body.clientHeight; + } + + //---------------------------------- + // Get div height && width + //---------------------------------- + + var divheight = parseInt( myass_main.style.Height ); + var divwidth = parseInt( myass_main.style.Width ); + + divheight = divheight ? divheight : 400; + divwidth = divwidth ? divwidth : 400; + + //---------------------------------- + // Got it stored in a cookie? + //---------------------------------- + + var divxy = my_getcookie( 'ipb-myass-div' ); + var co_ords; + + if ( divxy && divxy != null ) + { + co_ords = divxy.split( ',' ); + + //---------------------------------- + // Got co-ords? + //---------------------------------- + + if ( co_ords.length ) + { + var final_width = co_ords[0]; + var final_height = co_ords[1]; + + if ( co_ords[0] > my_width ) + { + //---------------------------------- + // Keep it on screen + //---------------------------------- + + final_width = my_width - divwidth; + } + + if ( co_ords[1] > my_height ) + { + //---------------------------------- + // Keep it on screen + //---------------------------------- + + final_height = my_height - divheight; + } + + myass_main.style.left = final_width + 'px'; + myass_main.style.top = final_height + 'px'; + } + } + else + { + //---------------------------------- + // Reposition DIV roughly centered + //---------------------------------- + + myass_main.style.left = my_width / 2 - (divwidth / 2) + 'px'; + myass_main.style.top = my_height / 2 - (divheight / 2 ) + 'px'; + } + + Drag.cookiename = 'ipb-myass-div'; + Drag.init( myass_drag, myass_main ); + + myass_loaded = 1; + } +}; + +/*--------------------------------------------*/ +// Alter DST Retrieve XML document +/*--------------------------------------------*/ + +function xml_myassistant_search( url ) +{ + var keywords = document.getElementById('myass-search-input').value; + var msg_field = document.getElementById('myass-search-message'); + var url = ipb_var_base_url+'act=Search&CODE=01&forums=all&cat_forum=forum&joinname=1&search_in=posts&result_type=topics&xml=1&keywords='+escape(keywords); + + if ( keywords.length < 4 ) + { + msg_field.innerHTML = ipb_myass_chars_lang; + return false; + } + + //---------------------------------- + // Already cached? + //---------------------------------- + + if ( search_cache[ keywords ] ) + { + msg_field.innerHTML = search_cache[ keywords ]; + return; + } + + /*--------------------------------------------*/ + // Main function to do on request + // Must be defined first!! + /*--------------------------------------------*/ + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj.readystate_ready_and_ok() ) + { + xmlobj.show_loading(); + return; + } + + xmlobj.hide_loading(); + + //---------------------------------- + // INIT + //---------------------------------- + + var html = xmlobj.xmlhandler.responseText; + + msg_field.innerHTML = html; + search_cache[ keywords ] = html; + }; + + //---------------------------------- + // LOAD XML + //---------------------------------- + + xmlobj = new ajax_request(); + xmlobj.onreadystatechange( do_request_function ); + + xmlobj.process( url ); +}; + +/*--------------------------------------------*/ +// Alter DST Retrieve XML document +/*--------------------------------------------*/ + +function xml_dst_set( url ) +{ + /*--------------------------------------------*/ + // Main function to do on request + // Must be defined first!! + /*--------------------------------------------*/ + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj.readystate_ready_and_ok() ) + { + // Could do a little loading graphic here? + return; + } + + //---------------------------------- + // INIT + //---------------------------------- + + var html = xmlobj.xmlhandler.responseText; + + if ( html == 'error' ) + { + window.location = url.replace( '&xml=1', '&xml=0'); + } + }; + + //---------------------------------- + // LOAD XML + //---------------------------------- + + xmlobj = new ajax_request(); + xmlobj.onreadystatechange( do_request_function ); + + xmlobj.process( url ); +}; + + +/*-------------------------------------------------------------------------*/ +// INIT Post GD Image +/*-------------------------------------------------------------------------*/ + +function init_gd_image() +{ + var reg_img = document.getElementById('gd-antispam'); + + try + { + reg_img.style.cursor = 'pointer'; + } + catch(e) + { + reg_img.style.cursor = 'hand'; + }; + + reg_img._ready = 1; + + reg_img.onclick = do_change_img; +}; + +function do_change_img() +{ + var rc = ''; + var act = 'Reg'; + var code = 'image'; + var reg_img = document.getElementById('gd-antispam'); + + if ( ! reg_img._ready ) + { + return false; + } + + var url = ipb_var_base_url+'act=xmlout&do=change-gd-img&img='+rc; + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj.readystate_ready_and_ok() ) + { + // Could do a little loading graphic here? + return; + } + + //---------------------------------- + // INIT + //---------------------------------- + + var html = xmlobj.xmlhandler.responseText; + + reg_img.src = ipb_var_base_url+'act=captcha&showImage®id='+html; + + var reg_field = document.getElementById('regid'); + reg_field.value = html; + + reg_img._ready = 1; + }; + + //---------------------------------- + // LOAD XML + //---------------------------------- + + reg_img._ready = 0; + + xmlobj = new ajax_request(); + xmlobj.onreadystatechange( do_request_function ); + xmlobj.process( url ); +} + + diff --git a/Development/javascript_uncompressed/jscripts/ipb_pm.js b/Development/javascript_uncompressed/jscripts/ipb_pm.js new file mode 100644 index 00000000..bdf1ac3b --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/ipb_pm.js @@ -0,0 +1,179 @@ +//------------------------------------------ +// Invision Power Board v2.1 +// PM JS File +// (c) 2005 Invision Power Services, Inc. +// +// http://www.invisionboard.com +//------------------------------------------ + +//========================================== +// Check All boxes +//========================================== + +function CheckAll(fmobj) +{ + for (var i=0;i maxid ) + { + maxid = parseInt(i); + } + } + + maxid = maxid + 1; + + poll_write_form_to_array(); + + poll_questions[ maxid ] = ''; + poll_multi[ maxid ] = ''; + + poll_draw_main_box(); + + return false; +} + + +/*--------------------------------------------*/ +// ADD POLL CHOICE +/*--------------------------------------------*/ + +function poll_add_choice( qid ) +{ + var maxid = 0; + + //------------------------------- + // Get max choice ID + //------------------------------- + + for ( var c in poll_choices ) + { + //------------------------------- + // Is this a choice for this q? + //------------------------------- + + var id = c.replace( new RegExp( "^" + qid + "_(\\d+)$" ), "$1" ); + + if ( ! isNaN( id ) ) + { + if ( id > maxid ) + { + maxid = parseInt(id); + } + } + } + + maxid = maxid + 1; + + poll_write_form_to_array(); + + poll_choices[ qid +'_'+maxid ] = ''; + + if ( is_mod ) + { + poll_votes[ qid +'_'+maxid ] = 0; + } + + poll_draw_main_box(); + + return false; +} + + +/*--------------------------------------------*/ +// REMOVE POLL CHOICE +/*--------------------------------------------*/ + +function poll_remove_choice( mainid ) +{ + if ( confirm( js_lang_confirm ) ) + { + delete( poll_choices[ mainid ] ); + + if ( is_mod ) + { + delete( poll_votes[ mainid ] ); + } + + poll_write_form_to_array(); + poll_draw_main_box(); + } + + return false; +} + +/*--------------------------------------------*/ +// REMOVE POLL QUESTION +/*--------------------------------------------*/ + +function poll_remove_question( mainid ) +{ + if ( confirm( js_lang_confirm ) ) + { + //------------------------------- + // Delete question + //------------------------------- + + delete( poll_questions[ mainid ] ); + + //------------------------------- + // Delete choices + //------------------------------- + + for ( var c in poll_choices ) + { + //------------------------------- + // Is this a choice for this q? + //------------------------------- + + var id = c.replace( new RegExp( "^" + mainid + "_(\\d+)$" ), "$1" ); + + if ( ! isNaN( id ) ) + { + delete( poll_choices[ c ] ); + + if ( is_mod ) + { + delete( poll_votes[ c ] ); + } + } + } + + poll_write_form_to_array(); + poll_draw_main_box(); + } + + return false; +} + +/*--------------------------------------------*/ +// UPDATE POLL STATE +/*--------------------------------------------*/ + +function poll_update_state() +{ + used = max_poll_questions - used_questions; + + var tmp_lang = lang_build_string( poll_stat_lang, used, max_poll_choices ); + statobj.innerHTML = lang_build_string( html_stat_wrap, tmp_lang ); +} + +/*--------------------------------------------*/ +// SHOW POLL FORM +/*--------------------------------------------*/ + +function show_poll_form() +{ + my_show_div( openobj ); + my_hide_div( closedobj ); +} + +/*--------------------------------------------*/ +// CLOSE POLL FORM +/*--------------------------------------------*/ + +function close_poll_form() +{ + my_show_div( closedobj ); + my_hide_div( openobj ); +} + +/*--------------------------------------------*/ +// FORM MAKE SAFE +/*--------------------------------------------*/ + +function _poll_make_form_safe( t ) +{ + t = t.replace( /'/g, ''' ); + t = t.replace( /"/g, '"' ); + + return t; +} + + + + + + + diff --git a/Development/javascript_uncompressed/jscripts/ipb_profile.js b/Development/javascript_uncompressed/jscripts/ipb_profile.js new file mode 100644 index 00000000..dcd31797 --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/ipb_profile.js @@ -0,0 +1,36 @@ +//------------------------------------------ +// Invision Power Board v2.1 +// Profile JS File +// (c) 2005 Invision Power Services, Inc. +// +// http://www.invisionboard.com +//------------------------------------------ + + + +/*--------------------------------------------*/ +// Profile: Open pop-up window +/*--------------------------------------------*/ + +function profile_dname_history( mid ) +{ + //---------------------------------- + // Attempt to close the menu + //---------------------------------- + + try + { + menu_action_close(); + } + catch(e) + { + } + + //---------------------------------- + // Launch Pop Up + //---------------------------------- + + PopUp( ipb_var_base_url + 'act=profile&CODE=show-display-names&id=' + mid, 'DNAMETITLE', 400, 300 ); + + return false; +} \ No newline at end of file diff --git a/Development/javascript_uncompressed/jscripts/ipb_register.js b/Development/javascript_uncompressed/jscripts/ipb_register.js new file mode 100644 index 00000000..54a493e8 --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/ipb_register.js @@ -0,0 +1,959 @@ +//------------------------------------------ +// Invision Power Board v2.1 +// Register JS File +// (c) 2005 Invision Power Services, Inc. +// +// http://www.invisionboard.com +//------------------------------------------ + +var user_display_name_max_length = 26; +var reg_got_dname = 0; +var reg_oktogo = 0; +var reg_field_ids = new Array(); +var reg_img_ids = new Array(); +var reg_box_ids = new Array(); +var reg_msg_ids = new Array(); + +var ucp_dname_illegal_chars = new Array( '[', ']', '|', ',', ';', '$', '"', '<', '>', '\\' ); +var ucp_dname_illegal_regex = ''; + +for ( var i in ucp_dname_illegal_chars ) +{ + ucp_dname_illegal_regex += '\\' + ucp_dname_illegal_chars[i]; +} + +var error_email = 0; + +var in_member_id = 0; + +RegExp.escape = function(text) +{ + if (!arguments.callee.sRE) + { + var specials = [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\', '$' ]; + + arguments.callee.sRE = new RegExp( '(\\' + specials.join('|\\') + ')', 'g' ); + } + + return text.replace(arguments.callee.sRE, '\\$1'); +}; + +/*-------------------------------------------------------------------------*/ +// INIT Reg form +/*-------------------------------------------------------------------------*/ + +function init_reg_form( got_dname, register_method ) +{ + //------------------------------------------ + // INIT objects + //------------------------------------------ + + reg_got_dname = got_dname; + + //------------------------------------------ + // Fields... + //------------------------------------------ + + if( register_method == 'username' ) + { + reg_field_ids['name'] = document.getElementById( 'reg-name' ); + } + + reg_field_ids['password'] = document.getElementById( 'reg-password' ); + reg_field_ids['password-check'] = document.getElementById( 'reg-password-check' ); + reg_field_ids['emailaddress'] = document.getElementById( 'reg-emailaddress' ); + reg_field_ids['emailaddress-two'] = document.getElementById( 'reg-emailaddress-two' ); + + //------------------------------------------ + // Images + //------------------------------------------ + + if( register_method == 'username' ) + { + reg_img_ids['name'] = document.getElementById( 'img-name' ); + } + + reg_img_ids['password'] = document.getElementById( 'img-password' ); + reg_img_ids['emailaddress'] = document.getElementById( 'img-emailaddress' ); + + //------------------------------------------ + // Boxes + //------------------------------------------ + + if( register_method == 'username' ) + { + reg_box_ids['name'] = document.getElementById( 'box-name' ); + } + + reg_box_ids['password'] = document.getElementById( 'box-password' ); + reg_box_ids['emailaddress'] = document.getElementById( 'box-emailaddress' ); + + //------------------------------------------ + // Messages + //------------------------------------------ + + if ( register_method == 'username' ) + { + reg_msg_ids['name'] = document.getElementById( 'msg-name' ); + } + + reg_msg_ids['password'] = document.getElementById( 'msg-password' ); + reg_msg_ids['emailaddress'] = document.getElementById( 'msg-emailaddress' ); + + //------------------------------------------ + // Set up onblur + //------------------------------------------ + + if( register_method == 'username' ) + { + reg_field_ids['name'].onblur = check_user_name; + } + + reg_field_ids['password-check'].onblur = check_passwords; + reg_field_ids['emailaddress'].onblur = check_email_addresses_one; + reg_field_ids['emailaddress-two'].onblur = check_email_addresses; + + //------------------------------------------ + // Already got error messages? + //------------------------------------------ + + if ( register_method == 'username' ) + { + if ( ! reg_msg_ids['name'].innerHTML ) + { + reg_box_ids['name'].style.display = 'none'; + } + } + + if ( ! reg_msg_ids['password'].innerHTML ) + { + reg_box_ids['password'].style.display = 'none'; + } + + if ( ! reg_msg_ids['emailaddress'].innerHTML ) + { + reg_box_ids['emailaddress'].style.display = 'none'; + } + + //------------------------------------------ + // Display name. .. + //------------------------------------------ + + if ( reg_got_dname ) + { + reg_field_ids['dname'] = document.getElementById( 'reg-members-display-name' ); + reg_box_ids['dname'] = document.getElementById( 'box-dname' ); + reg_msg_ids['dname'] = document.getElementById( 'msg-dname' ); + reg_img_ids['dname'] = document.getElementById( 'img-members-display-name' ); + + if ( ! reg_msg_ids['dname'].innerHTML ) + { + reg_box_ids['dname'].style.display = 'none'; + } + + reg_field_ids['dname'].onblur = check_display_name; + } +}; + +/*-------------------------------------------------------------------------*/ +// INIT Reg form +/*-------------------------------------------------------------------------*/ + +function init_complete_login_form() +{ + //------------------------------------------ + // INIT objects + //------------------------------------------ + + reg_got_dname = got_dname; + + if ( ! reg_email_ok ) + { + //------------------------------------------ + // Fields... + //------------------------------------------ + + reg_field_ids['emailaddress'] = document.getElementById( 'reg-emailaddress' ); + reg_field_ids['emailaddress-two'] = document.getElementById( 'reg-emailaddress-two' ); + + //------------------------------------------ + // Images + //------------------------------------------ + + reg_img_ids['emailaddress'] = document.getElementById( 'img-emailaddress' ); + + //------------------------------------------ + // Boxes + //------------------------------------------ + + reg_box_ids['emailaddress'] = document.getElementById( 'box-emailaddress' ); + + //------------------------------------------ + // Messages + //------------------------------------------ + + reg_msg_ids['emailaddress'] = document.getElementById( 'msg-emailaddress' ); + + //------------------------------------------ + // Set up onblur + //------------------------------------------ + + reg_field_ids['emailaddress'].onblur = check_email_addresses_one; + reg_field_ids['emailaddress-two'].onblur = check_email_addresses; + + //------------------------------------------ + // Already got error messages? + //------------------------------------------ + + if ( ! reg_msg_ids['emailaddress'].innerHTML ) + { + reg_box_ids['emailaddress'].style.display = 'none'; + } + } + + //------------------------------------------ + // Display name... + //------------------------------------------ + + if ( reg_got_dname ) + { + reg_field_ids['dname'] = document.getElementById( 'reg-members-display-name' ); + reg_box_ids['dname'] = document.getElementById( 'box-dname' ); + reg_msg_ids['dname'] = document.getElementById( 'msg-dname' ); + reg_img_ids['dname'] = document.getElementById( 'img-members-display-name' ); + + if ( ! reg_msg_ids['dname'].innerHTML ) + { + reg_box_ids['dname'].style.display = 'none'; + } + + reg_field_ids['dname'].onblur = check_display_name; + } + + in_member_id = member_id; +}; + +/*-------------------------------------------------------------------------*/ +// Check email address validity +/*-------------------------------------------------------------------------*/ + +function check_email_addresses_one( event ) +{ + if( !event ) + { + event = window.event; + } + + //---------------------------------- + // INIT + //---------------------------------- + + var error_found = ''; + + //---------------------------------- + // Ajax: check for existing email address + //---------------------------------- + + if ( use_enhanced_js && reg_field_ids['emailaddress'].value ) + { + var url = ipb_var_base_url+'act=xmlout&do=check-email-address&email='+encodeURIComponent( reg_field_ids['emailaddress'].value ); + + /*--------------------------------------------*/ + // Main function to do on request + // Must be defined first!! + /*--------------------------------------------*/ + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj.readystate_ready_and_ok() ) + { + // Could do a little loading graphic here? + return; + } + + //---------------------------------- + // INIT + //---------------------------------- + + var html = xmlobj.xmlhandler.responseText; + + if ( html == 'found' ) + { + error_found += reg_error_email_taken + "
"; + } + if ( html == 'banned' ) + { + error_found += reg_error_email_ban + "
"; + } + if ( html == 'invalid' ) + { + error_found += reg_error_email_invalid + "
"; + } + + //---------------------------------- + // Show errors + //---------------------------------- + + if ( error_found ) + { + reg_field_ids['emailaddress'].className = input_red; + reg_img_ids['emailaddress'].src = ipb_var_image_url + '/' + img_cross; + reg_msg_ids['emailaddress'].innerHTML = error_found; + reg_box_ids['emailaddress'].style.display = 'block'; + error_email = 1; + } + else + { + error_email = 0; + } + + error_found = ''; + }; + + //---------------------------------- + // LOAD XML + //---------------------------------- + + xmlobj = new ajax_request(); + xmlobj.onreadystatechange( do_request_function ); + xmlobj.process( url ); + } +}; + +/*-------------------------------------------------------------------------*/ +// Check email addresses +/*-------------------------------------------------------------------------*/ + +function check_email_addresses( event ) +{ + if( !event ) + { + event = window.event; + } + + //---------------------------------- + // INIT + //---------------------------------- + + var error_found = ''; + + //---------------------------------- + // Check + //---------------------------------- + + if ( ! reg_field_ids['emailaddress'].value.match( /[@\.]/ ) ) + { + error_found += reg_error_email_missing + "
"; + } + + if ( ! error_found && ( ! reg_field_ids['emailaddress'].value || ! reg_field_ids['emailaddress-two'].value ) ) + { + error_found += reg_error_email_missing + "
"; + } + + if ( reg_field_ids['emailaddress'].value.toLowerCase() != reg_field_ids['emailaddress-two'].value.toLowerCase() ) + { + error_found += reg_error_email_nm + "
"; + } + + if ( error_found ) + { + reg_field_ids['emailaddress'].className = input_red; + reg_field_ids['emailaddress-two'].className = input_red; + reg_img_ids['emailaddress'].src = ipb_var_image_url + '/' + img_cross; + reg_msg_ids['emailaddress'].innerHTML = error_found; + reg_box_ids['emailaddress'].style.display = 'block'; + error_email = 1; + } + else + { + error_email = 0; + } + + //---------------------------------- + // No error.... + //---------------------------------- + + if ( error_email == 0 && event.type != 'submit' ) + { + check_email_addresses_one(); + } + + //---------------------------------- + // Still no errors... + //---------------------------------- + + if ( error_email == 0 ) + { + reg_field_ids['emailaddress'].className = input_green; + reg_field_ids['emailaddress-two'].className = input_green; + reg_img_ids['emailaddress'].src = ipb_var_image_url + '/' + img_tick; + reg_box_ids['emailaddress'].style.display = 'none'; + reg_msg_ids['emailaddress'].innerHTML = ''; + } + + if( reg_field_ids['emailaddress'].className == input_red ) + { + reg_field_ids['emailaddress-two'].className = input_red; + } +}; + + +/*-------------------------------------------------------------------------*/ +// Check passwords match +/*-------------------------------------------------------------------------*/ + +function check_passwords( event ) +{ + if( !event ) + { + event = window.event; + } + + //---------------------------------- + // INIT + //---------------------------------- + + var error_found = ''; + + //---------------------------------- + // Check + //---------------------------------- + + if ( ! reg_field_ids['password'].value || ! reg_field_ids['password-check'].value ) + { + error_found += reg_error_no_pass + "
"; + } + + if ( reg_field_ids['password'].value != reg_field_ids['password-check'].value ) + { + error_found += reg_error_pass_nm + "
"; + } + + if ( error_found ) + { + reg_field_ids['password'].className = input_red; + reg_field_ids['password-check'].className = input_red; + reg_img_ids['password'].src = ipb_var_image_url + '/' + img_cross; + reg_msg_ids['password'].innerHTML = error_found; + reg_box_ids['password'].style.display = 'block'; + } + else + { + reg_field_ids['password'].className = input_green; + reg_field_ids['password-check'].className = input_green; + reg_img_ids['password'].src = ipb_var_image_url + '/' + img_tick; + reg_box_ids['password'].style.display = 'none'; + reg_msg_ids['password'].innerHTML = ''; + } +}; + +/*-------------------------------------------------------------------------*/ +// Check display name +/*-------------------------------------------------------------------------*/ + +function check_display_name( event ) +{ + if( !event ) + { + event = window.event; + } + + //---------------------------------- + // INIT + //---------------------------------- + + var error_found = ''; + + //---------------------------------- + // Make sure we have sommat + //---------------------------------- + + if ( ! reg_field_ids['dname'].value || reg_field_ids['dname'].value.length < 3 || reg_field_ids['dname'].value.length > user_display_name_max_length ) + { + error_found += reg_error_no_name + "
"; + } + + //---------------------------------- + // Check for illegal chars + //---------------------------------- + + if ( reg_field_ids['dname'].value.match( new RegExp( "[" + ucp_dname_illegal_regex + "]" ) ) ) + { + error_found += reg_error_chars + "
"; + } + + if ( allowed_chars != "" ) + { + var test_regex = new RegExp(); + test_regex.compile( "^[" + RegExp.escape(allowed_chars) + "]+$" ); + + if ( !test_regex.test( reg_field_ids['dname'].value ) ) + { + error_found += allowed_error + "
"; + } + } + + //---------------------------------- + // Ajax: check for existing member name + //---------------------------------- + + if ( use_enhanced_js && reg_field_ids['dname'].value && event.type != 'submit' ) + { + var url = ipb_var_base_url+'act=xmlout&do=check-display-name&name='+escape( reg_field_ids['dname'].value ); + + // Complete reg form? + + if ( in_member_id ) + { + url += '&id=' + in_member_id; + } + + /*--------------------------------------------*/ + // Main function to do on request + // Must be defined first!! + /*--------------------------------------------*/ + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj.readystate_ready_and_ok() ) + { + // Could do a little loading graphic here? + return; + } + + //---------------------------------- + // INIT + //---------------------------------- + + var html = xmlobj.xmlhandler.responseText; + + if ( html == 'found' ) + { + error_found += reg_error_taken + "
"; + } + + //---------------------------------- + // Show errors + //---------------------------------- + + if ( error_found ) + { + reg_field_ids['dname'].className = input_red; + reg_img_ids['dname'].src = ipb_var_image_url + '/' + img_cross; + reg_msg_ids['dname'].innerHTML = error_found; + reg_box_ids['dname'].style.display = 'block'; + } + else + { + reg_field_ids['dname'].className = input_green; + reg_img_ids['dname'].src = ipb_var_image_url + '/' + img_tick; + reg_box_ids['dname'].style.display = 'none'; + reg_msg_ids['dname'].innerHTML = ''; + } + + error_found = ''; + }; + + //---------------------------------- + // LOAD XML + //---------------------------------- + + xmlobj = new ajax_request(); + xmlobj.onreadystatechange( do_request_function ); + xmlobj.process( url ); + } + else + { + //---------------------------------- + // Show errors + //---------------------------------- + + if ( error_found ) + { + reg_field_ids['dname'].className = input_red; + reg_img_ids['dname'].src = ipb_var_image_url + '/' + img_cross; + reg_msg_ids['dname'].innerHTML = error_found; + reg_box_ids['dname'].style.display = 'block'; + } + else + { + reg_field_ids['dname'].className = input_green; + reg_img_ids['dname'].src = ipb_var_image_url + '/' + img_tick; + reg_box_ids['dname'].style.display = 'none'; + reg_msg_ids['dname'].innerHTML = ''; + } + + error_found = ''; + } +}; + + +/*-------------------------------------------------------------------------*/ +// Check username +/*-------------------------------------------------------------------------*/ + +function check_user_name( event ) +{ + if( !event ) + { + event = window.event; + } + + //---------------------------------- + // INIT + //---------------------------------- + + var error_found = ''; + + //---------------------------------- + // Make sure we have sommat + //---------------------------------- + + if ( ! reg_field_ids['name'].value || reg_field_ids['name'].value.length < 3 || reg_field_ids['name'].value.length > user_display_name_max_length ) + { + error_found += reg_error_username_none + "
"; + } + + if ( allowed_chars != "" ) + { + var test_regex = new RegExp(); + test_regex.compile( "^[" + RegExp.escape(allowed_chars) + "]+$" ); + + if ( !test_regex.test( reg_field_ids['name'].value ) ) + { + error_found += allowed_error + "
"; + } + } + + //---------------------------------- + // Ajax: check for existing member name + //---------------------------------- + + if ( use_enhanced_js && reg_field_ids['name'].value && event.type != 'submit' ) + { + // + symbols get stripped due to escape + reg_field_ids['name'].value = reg_field_ids['name'].value.replace("+", "+"); + + //---------------------------------- + // Get new xhttp obj + //---------------------------------- + + var url = ipb_var_base_url+'act=xmlout&do=check-user-name&name='+escape( reg_field_ids['name'].value ); + + /*--------------------------------------------*/ + // Main function to do on request + // Must be defined first!! + /*--------------------------------------------*/ + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj.readystate_ready_and_ok() ) + { + // Could do a little loading graphic here? + return; + } + + //---------------------------------- + // INIT + //---------------------------------- + + var html = xmlobj.xmlhandler.responseText; + + if ( html == 'found' ) + { + error_found += reg_error_username_taken + "
"; + } + + //---------------------------------- + // Show errors + //---------------------------------- + + if ( error_found ) + { + reg_field_ids['name'].className = input_red; + reg_img_ids['name'].src = ipb_var_image_url + '/' + img_cross; + reg_msg_ids['name'].innerHTML = error_found; + reg_box_ids['name'].style.display = 'block'; + } + else + { + reg_field_ids['name'].className = input_green; + reg_img_ids['name'].src = ipb_var_image_url + '/' + img_tick; + reg_box_ids['name'].style.display = 'none'; + reg_msg_ids['name'].innerHTML = ''; + } + + error_found = ''; + }; + + //---------------------------------- + // LOAD XML + //---------------------------------- + + xmlobj = new ajax_request(); + xmlobj.onreadystatechange( do_request_function ); + xmlobj.process( url ); + } + else + { + //---------------------------------- + // Show errors + //---------------------------------- + + if ( error_found ) + { + reg_field_ids['name'].className = input_red; + reg_img_ids['name'].src = ipb_var_image_url + '/' + img_cross; + reg_msg_ids['name'].innerHTML = error_found; + reg_box_ids['name'].style.display = 'block'; + } + else + { + reg_field_ids['name'].className = input_green; + reg_img_ids['name'].src = ipb_var_image_url + '/' + img_tick; + reg_box_ids['name'].style.display = 'none'; + reg_msg_ids['name'].innerHTML = ''; + } + + error_found = ''; + } + + reg_field_ids['name'].value = reg_field_ids['name'].value.replace("+", "+"); +}; + +/*-------------------------------------------------------------------------*/ +// Validate the complete log in form +/*-------------------------------------------------------------------------*/ + +function validate_complete_login_form( event ) +{ + if( !event ) + { + event = window.event; + } + + //------------------------------------------ + // Simply run the functions + //------------------------------------------ + + reg_oktogo = 1; + + if ( ! email_ok ) + { + check_email_addresses( event ); + + //------------------------------------------ + // Got error messages + //------------------------------------------ + + if ( reg_msg_ids['emailaddress'].innerHTML ) + { + reg_oktogo = 0; + } + } + + //------------------------------------------ + // Display name... + //------------------------------------------ + + if ( reg_got_dname ) + { + check_display_name( event ); + + if ( reg_msg_ids['dname'].innerHTML ) + { + reg_oktogo = 0; + } + } + + //------------------------------------------ + // Return + //------------------------------------------ + + return reg_oktogo ? true : false; +}; + +/*-------------------------------------------------------------------------*/ +// Validate the registration form +/*-------------------------------------------------------------------------*/ + +function validate_reg_form( event ) +{ + if( !event ) + { + event = window.event; + } + + //------------------------------------------ + // Simply run the functions + //------------------------------------------ + + reg_oktogo = 1; + + check_email_addresses( event ); + + check_passwords( event ); + + if( register_method == 'username' ) + { + check_user_name( event ); + } + + //------------------------------------------ + // Got error messages + //------------------------------------------ + + if( register_method == 'username' ) + { + if ( reg_msg_ids['name'].innerHTML ) + { + reg_oktogo = 0; + } + } + + if ( reg_msg_ids['password'].innerHTML ) + { + reg_oktogo = 0; + } + + if ( reg_msg_ids['emailaddress'].innerHTML ) + { + reg_oktogo = 0; + } + + //------------------------------------------ + // Display name... + //------------------------------------------ + + if ( reg_got_dname ) + { + check_display_name( event ); + + if ( reg_msg_ids['dname'].innerHTML ) + { + reg_oktogo = 0; + } + } + + //------------------------------------------ + // Return + //------------------------------------------ + + return reg_oktogo ? true : false; +}; + +/*-------------------------------------------------------------------------*/ +// They are a COPPA :D +/*-------------------------------------------------------------------------*/ + +function coppa_save() +{ + //------------------------------------------ + // Set cookie + //------------------------------------------ + + my_setcookie( 'coppa', 'yes', 1 ); + my_setcookie( 'coppabday', bday_m + '-' + bday_d + '-' + bday_y, 1 ); +}; + +/*-------------------------------------------------------------------------*/ +// Run from the COPPA +/*-------------------------------------------------------------------------*/ + +function coppa_cancel() +{ + //------------------------------------------ + // Set cookie + //------------------------------------------ + + //my_setcookie( 'coppa', '0', 1 ); + locationjump( '' ); +}; + +/*-------------------------------------------------------------------------*/ +// Run from the COPPA +/*-------------------------------------------------------------------------*/ + +function coppa_check() +{ + //------------------------------------------ + // Set cookie + //------------------------------------------ + + var coppa_check = my_getcookie( 'coppa' ); + + if ( coppa_check == 'yes' ) + { + alert( coppa_bounce ); + + var bdays = my_getcookie( 'coppabday' ); + var dates = bdays.split( '-' ); + + locationjump( 'act=reg&CODE=coppa_two&m=' + dates[0] + '&d=' + dates[1] + '&y=' + dates[2] ); + } +}; + +/*-------------------------------------------------------------------------*/ +// Show a more info button? +/*-------------------------------------------------------------------------*/ + + +function reg_get_more_check() +{ + var dropdown = document.getElementById( 'subspackage' ); + var chosenid = dropdown.options[dropdown.selectedIndex].value; + + if ( ! chosenid ) + { + chosenid = 0; + } + + if ( subdesc[chosenid] ) + { + document.getElementById( 'reg-get-more-info' ).style.display = ''; + } + else + { + document.getElementById( 'reg-get-more-info' ).style.display = 'none'; + } +}; + + +/*-------------------------------------------------------------------------*/ +// Show subs more info form +/*-------------------------------------------------------------------------*/ + +function get_more_info() +{ + var dropdown = document.getElementById( 'subspackage' ); + var chosenid = dropdown.options[dropdown.selectedIndex].value; + + if ( ! chosenid ) + { + chosenid = 0; + } + + //------------------------------------------ + // Toggle view... + //------------------------------------------ + + if ( subdesc[chosenid] ) + { + document.getElementById('pkdesc').innerHTML = subdesc[chosenid]; + + toggleview('subspkdiv'); + } +}; \ No newline at end of file diff --git a/Development/javascript_uncompressed/jscripts/ipb_topic.js b/Development/javascript_uncompressed/jscripts/ipb_topic.js new file mode 100644 index 00000000..b1c2b73d --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/ipb_topic.js @@ -0,0 +1,1119 @@ +//------------------------------------------ +// Invision Power Board v2.1 +// Topics JS File +// (c) 2005 Invision Power Services, Inc. +// +// http://www.invisionboard.com +//------------------------------------------ + +var mystored_selection = ''; +var post_cache = new Array(); +var ajax_loaded = 1; +var ignore_cache = new Array(); +var rate_value = 0; + +/*--------------------------------------------*/ +// Add onload event +/*--------------------------------------------*/ + +add_onload_event( fix_linked_image_sizes ); + +/*--------------------------------------------*/ +// Fix linked images (attach thumbs) +/*--------------------------------------------*/ + +function fix_linked_image_sizes_attach_thumb( attach_id, width, height, file_size ) +{ + //----------------------------------------- + // INIT + //----------------------------------------- + + var _img = ''; + var img_obj = document.getElementById( 'ipb-attach-img-' + attach_id ); + var div_obj = document.getElementById( 'ipb-attach-div-' + attach_id ); + var ct_obj = document.getElementById( 'ipb-attach-ct-' + attach_id ); + var cb_obj = document.getElementById( 'ipb-attach-cb-' + attach_id ); + var url_obj = document.getElementById( 'ipb-attach-url-' + attach_id ); + var tbl_obj = document.getElementById( 'ipb-attach-table-' + attach_id ); + + var _width = parseInt( img_obj.width ) ? parseInt( img_obj.width ) : parseInt( img_obj.style.width ); + var _height = parseInt( img_obj.height ) ? parseInt( img_obj.height ) : parseInt( img_obj.style.height ); + var _padding = 5; + var _percent = 0; + + if ( is_ie ) + { + //----------------------------------------- + // Well done MS.. more bugs and workarounds + //----------------------------------------- + + _width = parseInt( img_obj.currentStyle['width'] ); + _height = parseInt( img_obj.currentStyle['height'] ); + } + + if ( is_safari ) + { + //----------------------------------------- + // Nice. Safari you suck! I hate you! + // You're the black sheep of the apple family! + //----------------------------------------- + + tbl_obj.style.display = 'inline-block'; + } + + //----------------------------------------- + // Got width / height? + //----------------------------------------- + + if ( width && height ) + { + _percent = Math.ceil( 100 - parseInt( _width / width * 100 ) ); + } + + //----------------------------------------- + // Stylize + //----------------------------------------- + + // Remove IMG class to stop gray border + img_obj.className = 'ipb'; + img_obj.title = ipb_global_lang['click_to_view']; + img_obj.onmouseover = fix_attach_images_mouseover; + img_obj.onclick = function(event) { ipsclass.pop_up_window( url_obj.href, width + 20, height + 20 ); ipsclass.cancel_bubble(event); }; + + // Re-style the main div obj + div_obj.style.width = ( _width > 140 ? _width : 140 ) + 'px'; + div_obj.style.height = _height + ( _padding * 2 ) + 28 + 'px'; + div_obj.className = 'resized-linked-image'; + div_obj.style.paddingTop = _padding + "px"; + div_obj.style.paddingBottom = _padding + "px"; + div_obj.style.paddingLeft = _padding + 3 + "px"; + div_obj.style.paddingRight = _padding + 3 + "px"; + div_obj.style.textAlign = 'center'; + div_obj.title = ipb_global_lang['click_to_view']; + //div_obj.onmouseover = fix_linked_images_mouseover; + //div_obj.onclick = function(event) { ipsclass.pop_up_window( url_obj.href, width + 20, height + 20 ); ipsclass.cancel_bubble(event); }; + + // Add content to the top div + ct_obj.style.fontSize = '9px'; + cb_obj.style.fontSize = '9px'; + cb_obj.style.textAlign = 'center'; + + if ( _percent > 0 ) + { + ct_obj.innerHTML = _img + ' ' + ipsclass.lang_build_string( ipb_global_lang['image_attach_percent'], _percent ); + } + else + { + ct_obj.innerHTML = _img + ' ' + ipb_global_lang['image_attach_no_percent']; + } + + cb_obj.innerHTML = ""; + + if ( width && height ) + { + cb_obj.innerHTML = ipsclass.lang_build_string( ipb_global_lang['image_attach_dims'], width, height ); + } + + cb_obj.innerHTML += ipsclass.lang_build_string( ipb_global_lang['image_attach_size'], file_size ); +} + +/*--------------------------------------------*/ +// Fix linked images (normal IMGs) +/*--------------------------------------------*/ + +function fix_linked_image_sizes() +{ + if ( ipsclass.settings['do_linked_resize'] != 1 ) + { + return true; + } + + var images = document.getElementsByTagName( 'IMG' ); + var _padding = 2; + var _count = 0; + var _img = ''; + var _img2 = ''; + var _sw = screen.width * ( parseInt( ipsclass.settings['resize_percent'] ) / 100 ); + + for ( var i = 0 ; i < images.length; i++ ) + { + if ( images[i].className == 'linked-image' ) + { + //----------------------------------------- + // Inc. counter + //----------------------------------------- + + _count++; + + //----------------------------------------- + // Set up basics... + //----------------------------------------- + + if ( images[i].width > _sw ) + { + //----------------------------------------- + // Grab some details... + //----------------------------------------- + + var _width = images[i].width; + var _height = images[i].height; + var _percent = 0; + + //----------------------------------------- + // Work out percentage + //----------------------------------------- + + images[i].width = _sw; + + if ( images[i].width < _width && _width > 0 && images[i].width > 0 ) + { + _percent = Math.ceil( parseInt( images[i].width / _width * 100 ) ); + } + + images[i].id = '--ipb-img-resizer-' + _count; + images[i]._resized = 1; + images[i]._width = _width; + + //----------------------------------------- + // Add in wrapper + //----------------------------------------- + + var div = document.createElement( 'div' ); + + + div.innerHTML = _img + ' ' + ipsclass.lang_build_string( ipb_global_lang['image_resized'], _percent, _width, _height ); + div.style.width = images[i].width - ( _padding * 2 ) + 'px'; + div.className = 'resized-linked-image'; + div.style.paddingTop = _padding + "px"; + div.style.paddingBottom = _padding + "px"; + div.style.paddingLeft = _padding + "px"; + div.style.paddingRight = _padding + "px"; + div._is_div = 1; + div._resize_id = _count; + div.onclick = fix_linked_images_onclick; + div.onmouseover = fix_linked_images_mouseover; + div.title = ipb_global_lang['click_to_view' ]; + div._src = images[i].src; + + //----------------------------------------- + // Add it all... + //----------------------------------------- + + //if ( is_ie && ! is_ie7 ) + //{ + // images[i].outerHTML = div.outerHTML + images[i].outerHTML; + //} + //else + //{ + images[i].parentNode.insertBefore( div, images[i] ); + //} + } + } + } +} + +function fix_linked_images_onclick(e) +{ + //----------------------------------------- + // Div clicked + //----------------------------------------- + + PopUp( this._src, 'popup',screen.width,screen.height,1,1,1); + + e = ipsclass.cancel_bubble_all( e ); + + return false; +}; + +function fix_attach_images_mouseover(e) +{ + //----------------------------------------- + // Change cursor... + //----------------------------------------- + + try + { + this.style.cursor='pointer'; + } + catch(acold) + { + } +} + +function fix_linked_images_mouseover(e) +{ + try + { + this.style.cursor='pointer'; + } + catch(acold) + { + } + +} + + +/*--------------------------------------------*/ +// Fast reply stuff +/*--------------------------------------------*/ + +function emoticon( ecode, eobj, eurl ) +{ + ecode = ' ' + ecode + ' '; + var obj_ta = document.getElementById( 'fastreplyarea' ); + + if ( (ua_vers >= 4) && is_ie && is_win) + { + if (obj_ta.isTextEdit) + { + obj_ta.focus(); + var sel = document.selection; + var rng = sel.createRange(); + rng.colapse; + if((sel.type == "Text" || sel.type == "None") && rng != null) + { + if(ecode != "" && rng.text.length > 0) + ecode = rng.text + ecode ; + + rng.text = ecode; + } + } + else + { + obj_ta.value += ecode; + } + } + //---------------------------------------- + // It's MOZZY! + //---------------------------------------- + + else if ( obj_ta.selectionEnd ) + { + var ss = obj_ta.selectionStart; + var st = obj_ta.scrollTop; + var es = obj_ta.selectionEnd; + + if (es <= 2) + { + es = obj_ta.textLength; + } + + var start = (obj_ta.value).substring(0, ss); + var middle = (obj_ta.value).substring(ss, es); + var end = (obj_ta.value).substring(es, obj_ta.textLength); + + //----------------------------------- + // text range? + //----------------------------------- + + if (obj_ta.selectionEnd - obj_ta.selectionStart > 0) + { + middle = ecode + middle; + } + else + { + middle = ecode + middle; + + } + + obj_ta.value = start + middle + end; + + var cpos = ss + (middle.length); + + obj_ta.selectionStart = cpos; + obj_ta.selectionEnd = cpos; + obj_ta.scrollTop = st; + } + //---------------------------------------- + // It's CRAPPY! + //---------------------------------------- + else + { + obj_ta.value += ecode; + } + + obj_ta.focus(); + + if ( (ua_vers >= 4) && is_ie && is_win && emowindow != 'undefined' ) + { + emowindow.focus(); + } + + //document.getElementById( 'fastreplyarea' ).value += ' ' + ecode + ' '; +} + +/*--------------------------------------------*/ +// Topic: Scroll to post: IE fix +/*--------------------------------------------*/ + +function topic_scroll_to_post( post_id ) +{ + //---------------------------------- + // Check for PID + //---------------------------------- + + if ( ! post_id ) + { + return false; + } + + try + { + var post_main_obj = document.getElementById( 'post-main-' + post_id ); + } + catch(error) + { + var post_main_obj; + } + + if ( post_main_obj ) + { + var post_box_top = _get_obj_toppos( post_main_obj ); + + if ( post_box_top ) + { + scroll( 0, post_box_top - 30 ); + } + } +} + +/*--------------------------------------------*/ +// Show hidden post +/*--------------------------------------------*/ + +function topic_show_ignored_post( pid ) +{ + try + { + // Set up + var post_main = document.getElementById( 'post-main-' + pid ); + var post_ignore = document.getElementById( 'post-ignore-' + pid ); + + // Show it + post_main.innerHTML = ignore_cache[ pid ]; + } + catch( e ) + { + //alert( e ); + } + + return false; +} + + +/*--------------------------------------------*/ +// Initiate topic hide +/*--------------------------------------------*/ + +function topic_init_ignored_post( pid ) +{ + try + { + // Set up + var post_main = document.getElementById( 'post-main-' + pid ); + var post_ignore = document.getElementById( 'post-ignore-' + pid ); + + // Cache it... + ignore_cache[ pid ] = post_main.innerHTML; + + // Display "ignored" msg + post_main.innerHTML = post_ignore.innerHTML; + } + catch( e ) + { + //alert( e ); + } +} + + +/*--------------------------------------------*/ +// Ajax: Use full editor +/*--------------------------------------------*/ + +function ajax_fulleditor_for_edit( post_id ) +{ + if ( post_id && ipb_input_t && ipb_input_f ) + { + var _form = document.getElementById( 'quick-edit-form-' + post_id ); + var _url = ipb_var_base_url + 'act=post&do=edit_post&f=' + ipb_input_f + '&t=' + ipb_input_t + '&p=' + post_id + '&st=' + ipb_var_st + '&_from=quickedit'; + + _form.action = _url; + _form.method = 'POST'; + + _form.submit(); + + xmlobj.show_loading(); + + return false; + } + else + { + return false; + } +} + +/*--------------------------------------------*/ +// Ajax: Cancel for edit +/*--------------------------------------------*/ + +function ajax_cancel_for_edit( post_id ) +{ + if ( post_cache[ post_id ] != "" ) + { + document.getElementById( 'post-'+post_id ).innerHTML = post_cache[ post_id ]; + } + + return false; +} + +/*--------------------------------------------*/ +// Ajax: Save for edit +/*--------------------------------------------*/ + +function ajax_save_for_edit( post_id ) +{ + //---------------------------------- + // INIT + //---------------------------------- + + var url = ipb_var_base_url+'act=xmlout&do=post-edit-save&p='+post_id+'&t='+ipb_input_t+'&f='+ipb_input_f; + var fields = new Array(); + + //---------------------------------- + // Populate fields + //---------------------------------- + + fields['md5check'] = ipb_md5_check; + fields['t'] = ipb_input_t; + fields['f'] = ipb_input_f; + fields['p'] = post_id; + fields['act'] = 'xmlout'; + fields['do'] = 'post-edit-save'; + fields['Post'] = document.getElementById( post_id + '_textarea' ).value; + fields['std_used'] = 1; // Make sure STD BBCode parser is used + + //----------------------------------------- + // Got a reason to be jolly? + //----------------------------------------- + + try + { + fields['post_edit_reason'] = document.getElementById( 'post_edit_reason' ).value; + } + catch(err) + { + } + + //---------------------------------- + // Is there a post? + //---------------------------------- + + var post_check = fields['Post']; + + if ( post_check.replace( /^\s*|\s*$/g, "" ) == "" ) + { + alert( js_no_empty_post ); + return false; + } + + /*--------------------------------------------*/ + // Main function to do on request + // Must be defined first!! + /*--------------------------------------------*/ + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj.readystate_ready_and_ok() ) + { + xmlobj.show_loading(); + return; + } + + xmlobj.hide_loading(); + + //---------------------------------- + // INIT + //---------------------------------- + + var html = xmlobj.xmlhandler.responseText; + + //----------------------------------------- + // Execute JS... + //----------------------------------------- + + if ( html == 'nopermission' ) + { + alert( js_error_no_permission ); + document.getElementById( 'post-'+post_id ).innerHTML = post_cache[ post_id ]; + } + else if ( html != 'error' ) + { + document.getElementById( 'post-'+post_id ).innerHTML = html; + xmlobj.execute_javascript( html ); + fix_linked_image_sizes(); + } + }; + + //---------------------------------- + // LOAD XML + //---------------------------------- + + xmlobj = new ajax_request(); + xmlobj.onreadystatechange( do_request_function ); + var xmlreturn = xmlobj.process( url, 'POST', xmlobj.format_for_post(fields) ); + + return false; +} + +/*--------------------------------------------*/ +// Ajax: Prep for edit +/*--------------------------------------------*/ + +function ajax_prep_for_edit( post_id, event ) +{ + //---------------------------------- + // Cancel bubble (Prevent IE scroll...) + //---------------------------------- + + global_cancel_bubble( event, true ); + + var post_main_obj = document.getElementById( 'post-main-' + post_id ); + var post_box_top = _get_obj_toppos( post_main_obj ); + + //---------------------------------- + // INIT + //---------------------------------- + + var url = ipb_var_base_url+'act=xmlout&do=post-edit-show&p='+post_id+'&t='+ipb_input_t+'&f='+ipb_input_f; + + post_cache[ post_id ] = document.getElementById( 'post-'+post_id ).innerHTML; + + //---------------------------------- + // Attempt to close open menus + //---------------------------------- + + try + { + menu_action_close(); + } + catch(e) + { + //alert( e ); + } + + /*--------------------------------------------*/ + // Main function to do on request + // Must be defined first!! + /*--------------------------------------------*/ + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj.readystate_ready_and_ok() ) + { + xmlobj.show_loading(); + return; + } + + xmlobj.hide_loading(); + + //---------------------------------- + // INIT + //---------------------------------- + + var html = xmlobj.xmlhandler.responseText; + + if ( html == 'nopermission' ) + { + alert( js_error_no_permission ); + } + else if ( html != 'error' ) + { + if ( post_box_top ) + { + scroll( 0, post_box_top - 30 ); + } + + document.getElementById( 'post-' + post_id ).innerHTML = html; + + //----------------------------------------- + // Set up new editor + //----------------------------------------- + + IPS_Lite_Editor[ post_id ] = new ips_text_editor_lite( post_id ); + IPS_Lite_Editor[ post_id ].init(); + } + }; + + //---------------------------------- + // LOAD XML + //---------------------------------- + + xmlobj = new ajax_request(); + xmlobj.onreadystatechange( do_request_function ); + + xmlobj.process( url ); + + return false; +} + +/*--------------------------------------------*/ +// check selection +/*--------------------------------------------*/ + +function checkselection() +{ + var myselection = ''; + + if ( window.getSelection ) + { + myselection = window.getSelection(); + } + else if ( document.selection ) + { + myselection = document.selection.createRange().text; + } + else if ( document.getSelection ) + { + myselection = document.getSelection(); + } + + if ( myselection != '' && myselection != null ) + { + if ( myselection != mystored_selection ) + { + document.getElementById('fastreply-pastesel').style.display = ''; + mystored_selection = (myselection.toString() != '') ? myselection.toString() : null; + } + } + else + { + mystored_selection = null; + } +} + +/*--------------------------------------------*/ +// Paste selection +/*--------------------------------------------*/ + +function pasteselection() +{ + if ( mystored_selection != '' && mystored_selection != null ) + { + var fr = document.getElementById('fastreplyarea'); + if (fr) + { + fr.value += '[quote]'+mystored_selection+'[/quote]\n'; + fr.focus(); + } + } + + return false; +} + +/*--------------------------------------------*/ +// Link to a post +/*--------------------------------------------*/ + +function link_to_post(pid) +{ + temp = prompt( ipb_lang_tt_prompt, ipb_var_base_url + "showtopic=" + ipb_input_t + "&view=findpost&p=" + pid ); + return false; +} + +/*--------------------------------------------*/ +// Delete post +/*--------------------------------------------*/ + +function delete_post(theURL) +{ + if (confirm( ipb_lang_js_del_1 )) + { + window.location.href=theURL; + } + else + { + alert ( ipb_lang_js_del_2 ); + } +} + +/*--------------------------------------------*/ +// Multi quote +/*--------------------------------------------*/ + +function multiquote_add(id) +{ + saved = new Array(); + clean = new Array(); + add = 1; + + //----------------------------------- + // Get any saved info + //----------------------------------- + + if ( tmp = my_getcookie('mqtids') ) + { + saved = tmp.split(","); + } + + //----------------------------------- + // Remove bit if exists + //----------------------------------- + + for( i = 0 ; i < saved.length; i++ ) + { + if ( saved[i] != "" ) + { + if ( saved[i] == id ) + { + add = 0; + } + else + { + clean[clean.length] = saved[i]; + } + } + } + + //----------------------------------- + // Add? + //----------------------------------- + + if ( add ) + { + clean[ clean.length ] = id; + eval("document.mad_"+id+".src=removequotebutton"); + eval("document.mad_"+id+".title='-'"); + } + else + { + eval(" document.mad_"+id+".src=addquotebutton"); + eval("document.mad_"+id+".title='+'"); + } + + my_setcookie( 'mqtids', clean.join(','), 0 ); + + return false; +} + +/*--------------------------------------------*/ +// Check delete +/*--------------------------------------------*/ + +function checkdelete() +{ + if ( ! document.modform.selectedpids.value ) + { + return false; + } + + isDelete = document.modform.tact.options[document.modform.tact.selectedIndex].value; + + if (isDelete == 'delete') + { + formCheck = confirm( lang_suredelete ); + + if (formCheck == true) + { + return true; + } + else + { + return false; + } + } +} + +/*--------------------------------------------*/ +// Toggle selection +//*--------------------------------------------*/ + +function topic_toggle_pid( pid ) +{ + //----------------------------------- + // Got a number? + //----------------------------------- + + if ( isNaN( pid ) ) + { + return false; + } + + saved = new Array(); + clean = new Array(); + add = 1; + + //----------------------------------- + // Get form info + //----------------------------------- + + tmp = document.modform.selectedpids.value; + + saved = tmp.split(","); + + //----------------------------------- + // Remove bit if exists + //----------------------------------- + + for( i = 0 ; i < saved.length; i++ ) + { + if ( saved[i] != "" ) + { + if ( saved[i] == pid ) + { + add = 0; + } + else + { + clean[clean.length] = saved[i]; + } + } + } + + //----------------------------------- + // Add? + //----------------------------------- + + if ( add ) + { + clean[ clean.length ] = pid; + eval("document.img"+pid+".src=selectedbutton"); + } + else + { + eval(" document.img"+pid+".src=unselectedbutton"); + } + + newvalue = clean.join(','); + + my_setcookie( 'modpids', newvalue, 0 ); + + document.modform.selectedpids.value = newvalue; + + newcount = stacksize(clean); + + document.modform.gobutton.value = lang_gobutton + ' (' + newcount + ')'; + + return false; +}; + + +function topic_rate() +{ + /** + * Settings + */ + this.settings = { + 'allow_rating' : 0, + 'default_rating' : 3, + 'img_star_on' : 'star_filled.gif', + 'img_star_selected' : 'star_selected.gif', + 'img_star_off' : 'star_empty.gif', + 'img_main_star_0' : 'rating_0.gif', + 'img_main_star_1' : 'rating_1.gif', + 'img_main_star_2' : 'rating_2.gif', + 'img_main_star_3' : 'rating_3.gif', + 'img_main_star_4' : 'rating_4.gif', + 'img_main_star_5' : 'rating_5.gif', + 'img_base_url' : '', + 'div_rating_wrapper' : 'topic-rating-wrapper', + 'text_rating_image' : 'topic-rating-img-', + 'topic-rating-img-main' : 'topic-rating-img-main', + 'topic-rating-my-rating' : 'topic-rating-my-rating', + 'topic-rating-hits' : 'topic-rating-hits' + }; + + this.languages = { + 'img_alt_rate' : '', + 'rate_me' : '' + }; + + /** + * INIT rating images + */ + this.init_rating_images = function() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + var html = ''; + + //----------------------------------------- + // Can rate this member? + //----------------------------------------- + + if ( ! this.settings[ 'allow_rating' ] ) + { + return false; + } + + //----------------------------------------- + // Still here? OK... + //----------------------------------------- + + for( var i = 1 ; i <= 5 ; i++ ) + { + var _onmouseover = ''; + var _onmouseout = ''; + var _onclick = ''; + var _title = ''; + + _onmouseover = ' onmouseover="this.style.cursor=\'pointer\'; topic_rate.show_rating_images(' + i + ', 0)"'; + _onmouseout = ' onmouseout="topic_rate.show_rating_images(-1, 1)"'; + _onclick = ' onclick="topic_rate.send_rating(' + i + ')"'; + _title = this.languages['img_alt_rate']; + + html += "-"; + } + + document.getElementById( this.settings['div_rating_wrapper'] ).innerHTML = this.languages['rate_me'] + ' ' + html; + + //----------------------------------------- + // Now set the image... + //----------------------------------------- + + this.show_rating_images( this.settings['default_rating'], 1 ); + }; + + /** + * Send rating.. + */ + this.send_rating = function( rating ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + rating = rating ? rating : 0; + + //----------------------------------------- + // Got a rating? + //----------------------------------------- + + if ( rating ) + { + //---------------------------------- + // INIT + //---------------------------------- + + var url = ipb_var_base_url+'act=xmlout&do=topic_rate&t='+ipb_input_t+'&rating='+rating; + + /*--------------------------------------------*/ + // Main function to do on request + // Must be defined first!! + /*--------------------------------------------*/ + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj.readystate_ready_and_ok() ) + { + xmlobj.show_loading( '' ); + return; + } + + xmlobj.hide_loading(); + + //---------------------------------- + // INIT + //---------------------------------- + + var html = xmlobj.xmlhandler.responseText; + + if ( html == 'no_permission' ) + { + alert( js_error_no_permission ); + } + else if ( html != 'error' ) + { + var _result = html.split(','); + var _new_value = _result[0]; + var _new_hits = _result[1]; + var _new_stars = _result[2]; + var _type = _result[3]; + + //----------------------------------------- + // Now set the image... + //----------------------------------------- + + topic_rate.settings['default_rating'] = parseInt( _new_stars ); + + topic_rate.show_rating_images( topic_rate.settings['default_rating'], 1 ); + + menu_action_close(); + + //----------------------------------------- + // Update counts + //----------------------------------------- + + document.getElementById('topic-rating-hits').innerHTML = _new_hits; + document.getElementById('topic-rating-my-rating').innerHTML = rating; + + show_inline_messages_instant( 'rating_updated' ); + } + }; + + //---------------------------------- + // LOAD XML + //---------------------------------- + + xmlobj = new ajax_request(); + xmlobj.onreadystatechange( do_request_function ); + + xmlobj.process( url ); + + return false; + } + }; + + /** + * Show rating images.. + */ + this.show_rating_images = function( rating, restore_default ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + rating = restore_default ? this.settings['default_rating'] : parseInt( rating ); + var star = restore_default ? this.settings['img_star_on'] : this.settings['img_star_selected']; + + //----------------------------------------- + // Set to 0 + //----------------------------------------- + + for( var i = 1 ; i <= 5 ; i++ ) + { + var _img = document.getElementById( this.settings['text_rating_image'] + i ); + _img.src = this.settings['img_base_url'] + '/' + this.settings['img_star_off']; + } + + //----------------------------------------- + // Show ones coloured... + //----------------------------------------- + + for( var i = 1 ; i <= rating ; i++ ) + { + var _img = document.getElementById( this.settings['text_rating_image'] + i ); + _img.src = this.settings['img_base_url'] + '/' + star; + } + + //----------------------------------------- + // Set main image + //----------------------------------------- + + document.getElementById( this.settings['topic-rating-img-main'] ).src = this.settings['img_base_url'] + '/' + this.settings['img_main_star_' + rating ]; + }; + +}; \ No newline at end of file diff --git a/Development/javascript_uncompressed/jscripts/ipb_usercp.js b/Development/javascript_uncompressed/jscripts/ipb_usercp.js new file mode 100644 index 00000000..4bfcb849 --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/ipb_usercp.js @@ -0,0 +1,238 @@ +//------------------------------------------ +// Invision Power Board v2.1 +// User CP JS File +// (c) 2005 Invision Power Services, Inc. +// +// http://www.invisionboard.com +//------------------------------------------ + +var ucp_dname_name; +var ucp_dname_pass; +var ucp_dname_name_img; +var ucp_dname_pass_img; +var ucp_dname_form; +var ucp_dname_warn; +var ucp_dname_warn_content; +var dname_max_length = 26; + +var ucp_dname_ok_to_go = 0; +var ucp_dname_illegal_chars = new Array( '[', ']', '|', ',', ';', '$' ); +var ucp_dname_illegal_regex = ''; + +for ( var i in ucp_dname_illegal_chars ) +{ + ucp_dname_illegal_regex += '\\' + ucp_dname_illegal_chars[i]; +} + +var error_found = ''; + +RegExp.escape = function(text) +{ + if (!arguments.callee.sRE) + { + var specials = [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\', '$' ]; + + arguments.callee.sRE = new RegExp( '(\\' + specials.join('|\\') + ')', 'g' ); + } + + return text.replace(arguments.callee.sRE, '\\$1'); +}; + +/*-------------------------------------------------------------------------*/ +// INIT Display name change stuff +/*-------------------------------------------------------------------------*/ + +function ucp_dname_init( name, pass, form, wbox ) +{ + ucp_dname_name = document.getElementById( name ); + ucp_dname_pass = document.getElementById( pass ); + ucp_dname_form = document.getElementById( form ); + ucp_dname_warn = document.getElementById( wbox ); + + ucp_dname_warn_content = document.getElementById( wbox+'-content' ); + ucp_dname_name_img = document.getElementById( name+'-img' ); + ucp_dname_pass_img = document.getElementById( pass+'-img' ); + + ucp_dname_name.onblur = ucp_dname_check; + ucp_dname_form.onsubmit = ucp_dname_form_check; + + if ( ucp_dname_warn_content.innerHTML ) + { + ucp_dname_warn.style.display = 'block'; + } +} + +/*-------------------------------------------------------------------------*/ +// EVENT: Check display name +/*-------------------------------------------------------------------------*/ + +function ucp_dname_check( event ) +{ + //---------------------------------- + // INIT + //---------------------------------- + + //---------------------------------- + // Make sure we have sommat + //---------------------------------- + + if ( ! ucp_dname_name.value || ucp_dname_name.value.length < 3 || ucp_dname_name.value.length > dname_max_length ) + { + error_found += dname_error_no_name + "
"; + } + + //---------------------------------- + // Check for illegal chars + //---------------------------------- + + if ( ucp_dname_name.value.match( new RegExp( "[" + ucp_dname_illegal_regex + "]" ) ) ) + { + error_found += dname_error_chars + "
"; + } + + if ( allowed_chars != "" ) + { + var test_regex = new RegExp(); + + test_regex.compile( "^[" + RegExp.escape(allowed_chars) + "]+$" ); + + if ( !test_regex.test( ucp_dname_name.value ) ) + { + error_found += allowed_error + "
"; + } + } + + //---------------------------------- + // Ajax: check for existing member name + //---------------------------------- + + if ( use_enhanced_js && ucp_dname_name.value ) + { + var url = ipb_var_base_url+'act=xmlout&do=check-display-name&name='+escape( ucp_dname_name.value ); + + /*--------------------------------------------*/ + // Main function to do on request + // Must be defined first!! + /*--------------------------------------------*/ + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj.readystate_ready_and_ok() ) + { + // Could do a little loading graphic here? + return; + } + + //---------------------------------- + // INIT + //---------------------------------- + + var html = xmlobj.xmlhandler.responseText; + + if ( html == 'found' ) + { + error_found += dname_error_taken + "
"; + } + + //---------------------------------- + // Show errors + //---------------------------------- + + if ( error_found ) + { + ucp_dname_name.className = input_red; + ucp_dname_name_img.src = ipb_var_image_url + '/' + img_cross; + ucp_dname_warn_content.innerHTML = error_found; + ucp_dname_warn.style.display = 'block'; + } + else + { + ucp_dname_name.className = input_green; + ucp_dname_name_img.src = ipb_var_image_url + '/' + img_tick; + ucp_dname_warn.style.display = 'none'; + ucp_dname_warn_content.innerHTML = ''; + } + + error_found = ''; + }; + + //---------------------------------- + // LOAD XML + //---------------------------------- + + xmlobj = new ajax_request(); + xmlobj.onreadystatechange( do_request_function ); + xmlobj.process( url ); + } + else + { + //---------------------------------- + // Show errors + //---------------------------------- + + if ( error_found ) + { + ucp_dname_name.className = input_red; + ucp_dname_name_img.src = ipb_var_image_url + '/' + img_cross; + ucp_dname_warn_content.innerHTML = error_found; + ucp_dname_warn.style.display = 'block'; + } + else + { + ucp_dname_name.className = input_green; + ucp_dname_name_img.src = ipb_var_image_url + '/' + img_tick; + ucp_dname_warn.style.display = 'none'; + ucp_dname_warn_content.innerHTML = ''; + } + + error_found = ''; + } +} + +/*-------------------------------------------------------------------------*/ +// EVENT: Check display name +/*-------------------------------------------------------------------------*/ + +function ucp_dname_form_check( event ) +{ + //---------------------------------- + // DO pass fields + //---------------------------------- + + if ( ! ucp_dname_pass.value ) + { + error_found += dname_error_no_pass + "
"; + } + + //---------------------------------- + // Check name + //---------------------------------- + + ucp_dname_check( event ); + + if ( error_found ) + { + ucp_dname_ok_to_go = 0; + } + else + { + ucp_dname_ok_to_go = 1; + } + + //---------------------------------- + // Return + //---------------------------------- + + if ( ucp_dname_ok_to_go ) + { + return true; + } + else + { + return false; + } +} \ No newline at end of file diff --git a/Development/javascript_uncompressed/jscripts/ipb_xhr_findnames.js b/Development/javascript_uncompressed/jscripts/ipb_xhr_findnames.js new file mode 100644 index 00000000..de4987a2 --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/ipb_xhr_findnames.js @@ -0,0 +1,720 @@ +//------------------------------------------------------------------------------ +// IPS XML HTTP REQUEST:: GET NEW POSTS +//------------------------------------------------------------------------------ +// Supports Safari, Mozilla 1.3+ (Firefox, etc) and IE 5.5+ +// (c) 2005 Invision Power Services, Inc. +// http://www.invisionpower.com +//------------------------------------------------------------------------------ + +/*--------------------------------------------*/ +// INIT VARS +/*--------------------------------------------*/ + +var mem_div = 'ipb-get-members'; +var divobj; +var iframeobj; +var formobj; +var xmlobj; +var _result_cache = new Array(); +var _div_rows = 0; +var _cur_updown_pressed = 0; +var _last_key_code = 0; +var _event_key_code = 0; +var _cur_input_val = ''; +var _old_input_val = ''; +var _hiliteindex = -1; +var _hilite_sug_div; +var _complete_div_list; +var delay_action = false; +var _allow_update = true; +var _form_onsubmit_saved; +var _urllookup; +var _timemout_main = 0; +var _timeout_blur = 0; +var _in_focus = 0; + +/*--------------------------------------------*/ +// SHOW POSSIBLE MEMBER NAME MATCHES +/*--------------------------------------------*/ + +main_loop = function() +{ + if ( ( _old_input_val != _cur_input_val ) && ( _cur_input_val.length >= 3 ) && ( _in_focus == 1 ) ) + { + if ( ! delay_action && _allow_update ) + { + //---------------------------------- + // Try cache + //---------------------------------- + + var cached = _result_cache[ _cur_input_val ]; + + if ( cached ) + { + returnSearch( _cur_input_val, cached[0], cached[1] ); + } + else + { + /*--------------------------------------------*/ + // Main function to do on request + // Must be defined first!! + /*--------------------------------------------*/ + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj.readystate_ready_and_ok() ) + { + // Could do a little loading graphic here? + return; + } + + //---------------------------------- + // INIT + //---------------------------------- + + var returned = xmlobj.xmlhandler.responseText; + + //---------------------------------- + // Did we get something? + //---------------------------------- + + if ( returned.charAt(0) == '<' ) + { + return false; + } + else + { + eval( returned ); + } + }; + + xmlobj = new ajax_request(); + xmlobj.onreadystatechange( do_request_function ); + + xmlobj.process( ipb_var_base_url + '&act=xmlout&do='+_urllookup+'&name='+escape(inobj.value) ); + + inobj.focus(); + } + } + + delay_action = false; + } + + _old_input_val = _cur_input_val; + + _timemout_main = setTimeout( 'main_loop()', 10 ); + + return false; +}; + +/*--------------------------------------------*/ +// Initalize... +/*--------------------------------------------*/ + +function init_js( formobjname, fieldobjname, urllookup ) +{ + //---------------------------------- + // Set up + //---------------------------------- + + if ( ! urllookup ) + { + _urllookup = 'get-member-names'; + } + else + { + _urllookup = urllookup; + } + + formobj = document.getElementById( formobjname ); + inobj = document.getElementById( fieldobjname ); + divobj = document.getElementById( mem_div ); + + inobj.setAttribute( "autocomplete", "off" ); + inobj.onfocus = function () { _in_focus = 1; }; + inobj.onblur = onblurhandler; + inobj.onsubmit = submit_handler; + + //---------------------------------- + // Already got a submit handler? + //---------------------------------- + + if ( formobj.onsubmit ) + { + _form_onsubmit_saved = formobj.onsubmit; + } + + formobj.onsubmit = submit_handler; + + if ( inobj.createTextRange ) + { + inobj.onkeyup = new Function( "return onkeyuphandler(event);" ); + } + else + { + inobj.onkeyup = onkeyuphandler; + } + + cache_name_results("",new Array(),new Array()); + + _cur_input_val = inobj.value; + + document.onkeydown = keydownhandler; + + set_up_key_down(); +} + +/*--------------------------------------------*/ +// Set up key down +/*--------------------------------------------*/ + +function set_up_key_down() +{ + if ( document.createEventObject ) + { + var y = document.createEventObject(); + y.ctrlKey = true; + y.keyCode = 70; + document.fireEvent( "onkeydown", y ) + } +} + +/*--------------------------------------------*/ +// Key down handler +/*--------------------------------------------*/ + +function keydownhandler( event ) +{ + if( ! event && window.event ) + { + event = window.event; + } + if ( event ) + { + _last_key_code = event.keyCode; + } +} + +/*--------------------------------------------*/ +// On blur handler +/*--------------------------------------------*/ + +function onblurhandler( event ) +{ + if ( ! event && window.event ) + { + event = window.event; + } + + if ( ! _cur_updown_pressed ) + { + _in_focus = 0; + + my_xr_hide_div( divobj ); + _hiliteindex = -1; + + // Tab? + + if ( _last_key_code == 9 ) + { + _last_key_code = -1; + } + } + + _cur_updown_pressed = false; +} + +/*--------------------------------------------*/ +// On key up handler +/*--------------------------------------------*/ + +function key_handler_function() +{ + //---------------------------------- + // trap up/down cursor + //---------------------------------- + + if ( _event_key_code == 40 || _event_key_code == 38 ) + { + _allow_update = false; + blur_then_focus(); + } + else + { + _cur_updown_pressed = false; + _allow_update = true; + } + + _cur_input_val = inobj.value; + + handle_cursor_press( _event_key_code ); +} + +/*--------------------------------------------*/ +// Handle cursor press +/*--------------------------------------------*/ + +function handle_cursor_press( eventcode ) +{ + if ( eventcode == 40 ) + { + hilite_new_value( _hiliteindex + 1 ); + } + else if ( eventcode == 38 ) + { + hilite_new_value( _hiliteindex - 1 ); + } + else if ( eventcode == 13 || eventcode == 3 ) + { + //---------------------------------- + // Are we looking through the divs? + //---------------------------------- + + if ( _hiliteindex != -1 ) + { + my_xr_hide_div( divobj ); + _hiliteindex = -1; + } + + return false; + } + + return true; +} + +/*--------------------------------------------*/ +// Highlight new value (cursor keys pressed) +/*--------------------------------------------*/ + +function hilite_new_value( index ) +{ + if ( _div_rows <= 0 ) + { + return; + } + + my_show_div( divobj ); + + if ( index > _div_rows ) + { + index = _div_rows - 1; + } + + if ( _hiliteindex != -1 && index != _hiliteindex ) + { + set_style_for_element( _hilite_sug_div, 'wrapdiv' ); + } + + if ( index < 0 ) + { + _hiliteindex = -1; + inobj.focus(); + return; + } + + _hiliteindex = index; + _hilite_sug_div = divobj.getElementsByTagName('DIV').item( index ); + + set_style_for_element( _hilite_sug_div, 'spanhilite' ); + + newval = find_span_value_for_class( _hilite_sug_div, 'namespan' ); + + if ( newval && typeof(newval) != 'undefined' ) + { + inobj.value = find_span_value_for_class( _hilite_sug_div, 'namespan' ); + } +} + +/*--------------------------------------------*/ +// Blur then focus +/*--------------------------------------------*/ + +function blur_then_focus() +{ + _cur_updown_pressed = true; + + inobj.blur(); + + _timemout_blur = setTimeout( "set_input_field_focus();", 10 ); + return; +} + +/*--------------------------------------------*/ +// Set input field focus +/*--------------------------------------------*/ + +function set_input_field_focus() +{ + inobj.focus(); +} + +/*--------------------------------------------*/ +// Styles element +/*--------------------------------------------*/ + +function set_style_for_element( c, name ) +{ + try + { + if ( ! c ) + { + return; + } + } + catch(e) + { + return; + } + + c.className = name; + + switch( name ) + { + case 'wrapdiv': + c.style.backgroundColor = "white"; + c.style.color = "black"; + + if ( c.displaySpan ) + { + c.displaySpan.style.color = "green"; + } + + break; + case 'wrapspan': + c.style.display = "block"; + c.style.paddingLeft = "3"; + c.style.paddingRight = "3"; + c.style.height = "16px"; + c.style.overflow = "hidden"; + break; + case 'namespan': + c.style.cssFloat = "left"; + c.style.width = '100%'; + break; + case 'idspan': + c.style.cssFloat = "right"; + c.style.display = 'none'; + break; + case 'spanhilite': + c.style.backgroundColor = "#3366cc"; + c.style.color = "white"; + + if ( c.displaySpan ) + { + c.displaySpan.style.color = "white"; + } + + break; + } +} + +/*--------------------------------------------*/ +// Get value of named span +/*--------------------------------------------*/ + +function find_span_value_for_class( i, dc ) +{ + try + { + if ( ! i ) + { + return; + } + } + catch(e) + { + return; + } + + var ga = i.getElementsByTagName('span'); + + if ( ga ) + { + for( var f=0; f < ga.length; ++f ) + { + if ( ga[f].className == dc ) + { + var value = ga[f].innerHTML; + + if ( value == " " ) + { + return ""; + } + else + { + return value; + } + } + } + } + else + { + return ""; + } +} + + +/*--------------------------------------------*/ +// Displays the actual list +/*--------------------------------------------*/ + +function display_suggested_list( na, ia ) +{ + //---------------------------------- + // Clear div + //---------------------------------- + + while( divobj.childNodes.length > 0 ) + { + divobj.removeChild( divobj.childNodes[0] ); + } + + //---------------------------------- + // Write Div + //---------------------------------- + + _div_rows = 0; + + for( var f = 0 ; f < na.length; ++f ) + { + _div_rows++; + var od = document.createElement("DIV"); + set_style_for_element( od, 'wrapdiv' ); + od.onmousedown = sb_mdown; + od.onmouseover = sb_mover; + od.onmouseout = sb_mout; + + var span_wrap = document.createElement("SPAN"); + set_style_for_element( span_wrap, 'wrapspan' ); + + var span_name = document.createElement("SPAN"); + span_name.innerHTML = na[f]; + + var span_id = document.createElement("SPAN"); + + set_style_for_element( span_name, 'namespan' ); + set_style_for_element( span_id, 'idspan' ); + + od.displaySpan = span_id; + + span_id.innerHTML = ia[f]; + + span_wrap.appendChild( span_name ); + span_wrap.appendChild( span_id ); + od.appendChild( span_wrap ); + divobj.appendChild( od ); + } + + //---------------------------------- + // Calc pos. + //---------------------------------- + + var mid = inobj; + var left_px = _get_obj_leftpos(mid); + var top_px = _get_obj_toppos(mid) + mid.offsetHeight; + var width = parseInt( divobj.style.width ); + var height = parseInt( divobj.style.height ); + + //---------------------------------- + // Show menu DIV + //---------------------------------- + + divobj.style.position = "absolute"; + + //---------------------------------- + // Try and keep it on screen + //---------------------------------- + + if ( (left_px + width) >= document.body.clientWidth ) + { + left_px = left_px + mid.offsetWidth - width; + } + + //---------------------------------- + // Try and keep it on screen + //---------------------------------- + + if ( (top_px + height) >= document.body.clientHeight ) + { + top_px = top_px - height; + } + + //---------------------------------- + // Finalize menu position + //---------------------------------- + + divobj.style.left = left_px + "px"; + divobj.style.top = top_px + "px"; + divobj.style.display = "block"; + + _hiliteindex= -1; + + //---------------------------------- + // Workaround for IE bug which shows + // select boxes and other windows GUI + // over divs. SHOW IFRAME + //---------------------------------- + + if ( is_ie ) + { + try + { + if ( ! document.getElementById( 'if_xhr_' + mem_div ) ) + { + iframeobj = document.createElement('iframe'); + + iframeobj.src = 'javascript:;'; + iframeobj.id = 'if_xhr_' + mem_div; + + document.getElementsByTagName('body')[0].appendChild( iframeobj ); + } + else + { + iframeobj = document.getElementById( 'if_xhr_' + mem_div ); + } + + iframeobj.scrolling = 'no'; + iframeobj.frameborder = 'no'; + iframeobj.className = 'iframeshim'; + iframeobj.style.position = 'absolute'; + + iframeobj.style.width = parseInt(divobj.offsetWidth) + 'px'; + iframeobj.style.height = parseInt(divobj.offsetHeight) + 'px'; + iframeobj.style.top = divobj.style.top; + iframeobj.style.left = divobj.style.left; + iframeobj.style.zIndex = divobj.style.zIndex - 1; + iframeobj.style.display = "block"; + + } + catch(error) + { + //alert(error); // Oh dear, someones stolen the iframe + } + } +} + +/*--------------------------------------------*/ +// Caches the results +/*--------------------------------------------*/ + +function cache_name_results( mstring, na, ia ) +{ + _result_cache[mstring] = new Array( na, ia ); +} + +/*--------------------------------------------*/ +// This is the function the response XML text gives +/*--------------------------------------------*/ + +returnSearch = function( mstring, namearray, idarray ) +{ + //---------------------------------- + // Cache.. + //---------------------------------- + + cache_name_results( mstring, namearray, idarray ); + + if ( _in_focus != 1 ) + { + return false; + } + + //---------------------------------- + // Display + //---------------------------------- + + display_suggested_list( namearray, idarray ); + + //---------------------------------- + // Resize or hide? + //---------------------------------- + + if ( _div_rows > 0 ) + { + divobj.style.height = 16 * _div_rows + 4; + } + else + { + my_xr_hide_div( divobj ); + _hiliteindex = -1; + } +}; + +/*--------------------------------------------*/ +// Submit handler +/*--------------------------------------------*/ + +submit_handler = function ( event ) +{ + delay_action = true; + var retval = true; + + if ( _hiliteindex != -1 ) + { + return false; + } + else + { + if ( _form_onsubmit_saved ) + { + eval( 'tmpsubmit = ' + _form_onsubmit_saved ); + retval = tmpsubmit(); + } + + return retval; + } +}; + +/*--------------------------------------------*/ +// On key up handler +/*--------------------------------------------*/ + +onkeyuphandler = function( event ) +{ + _event_key_code = event.keyCode; + key_handler_function(); +}; + +/*--------------------------------------------*/ +// Div mouse events +/*--------------------------------------------*/ + +sb_mdown = function() +{ + delay_action = true; + inobj.value = find_span_value_for_class( this, 'namespan' ); +}; + +sb_mover = function() +{ + set_style_for_element( this, 'spanhilite' ); +}; + +sb_mout = function() +{ + set_style_for_element( this, 'wrapdiv' ); +}; + +function my_xr_hide_div ( dobj ) +{ + dobj.style.display = "none"; + + if ( is_ie ) + { + try + { + document.getElementById( 'if_xhr_' + mem_div ).style.display = "none"; + } + catch(e) + { + //alert(e);// Oh dear, someones stolen the iframe + } + } +} + + + diff --git a/Development/javascript_uncompressed/jscripts/ips_attach.js b/Development/javascript_uncompressed/jscripts/ips_attach.js new file mode 100644 index 00000000..e5a166e3 --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/ips_attach.js @@ -0,0 +1,666 @@ +//------------------------------------------------------------------------------ +// IPS JS: Attach Functions +// (c) 2005 Invision Power Services, Inc. +// http://www.invisionpower.com +// Matt Mecham (16/12/05) +//------------------------------------------------------------------------------ + +var ipsattach = new ips_attach(); + +function ips_attach() +{ + /** + * iFrame id + */ + this.iframe_id = 'ips--iframe-obj-attach'; + /** + * iFrame Object + */ + this.iframe_obj = null; + /** + * Init URL + * URL to load to display current attachments, etc + */ + this.iframe_init_url = ''; + /** + * URL for removing attachment + */ + this.iframe_remove_url = ''; + /** + * The name of the DIV that this iframe is attached to + */ + this.iframe_add_to_div = 'ips-attach-div-iframe'; + this.iframe_add_to_div_obj = null; + /** + * The name of the DIV that this iframe is attached to + */ + this.iframe_parent_div = 'ips-attach-div-parent'; + this.iframe_parent_div_obj = null; + /** + * The name of the DIV that the status bar is in + */ + this.status_div = 'ips-attach-div-status'; + this.status_div_obj = null; + /** + * The name of the DIV that the dropdown menu text is in + */ + this.dropdown_text = 'ips-attach-menu-text'; + this.dropdown_text_obj = null; + /** + * Default iframe height + */ + this.iframe_height = 300; + /** + * css class names + */ + this.iframe_classname = 'attach-iframe'; + /** + * Message cover + */ + this.message_div_id = 'ips-attach-message'; + this.message_div_obj = null; + this.message_span_id = 'ips-attach-message-span'; + this.message_span_obj = null; + /** + * Default Status message + */ + this.status_msg = ''; + this.status_is_error = ''; + /** + * Current items array + */ + this.current_items = new Array(); + /** + * Current items' menu + */ + this.current_item_menu = 'ips-attach-menu'; + this.current_item_menu_obj = null; + /** + * Images URL + */ + this.images_url = null; + /** + * Language array + */ + this.lang = new Array(); + /** + * CSS classes + */ + this.css_menu_row = 'attach-menu-row'; + this.css_menu_row_over = 'attach-menu-row-over'; + /** + * Show attachments menu + */ + this.show_attach_menu = 1; + /** + * Onload command + */ + this.onload_function = ''; + + /** + * Has an upload... + */ + this.has_upload_pending = 0; + + /** + * INIT + */ + this.init = function() + { + //----------------------------------------- + // INIT objects + //----------------------------------------- + + this.iframe_add_to_div_obj = document.getElementById( this.iframe_add_to_div ); + this.iframe_parent_div_obj = document.getElementById( this.iframe_parent_div ); + this.message_div_obj = document.getElementById( this.message_div_id ); + this.message_span_obj = document.getElementById( this.message_span_id ); + this.status_div_obj = document.getElementById( this.status_div ); + this.dropdown_text_obj = document.getElementById( this.dropdown_text ); + + //----------------------------------------- + // INIT Current button + //----------------------------------------- + + if ( this.show_attach_menu ) + { + // INIT div + this.current_item_menu_obj = document.getElementById( this.current_item_menu ); + + ipsmenu.register( this.current_item_menu ); + + this.current_item_menu_obj._onclick = this.current_item_menu_obj.onclick; + this.current_item_menu_obj.onmouseover = this.current_item_menu_obj.onmouseout = this.current_item_menu_obj.onclick = this.current_menu_mouseover; + + ipsmenu.menu_registered[ this.current_item_menu ]._open = ipsmenu.menu_registered[ this.current_item_menu ].open; + ipsmenu.menu_registered[ this.current_item_menu ].open = this.current_menu_button_show; + } + }; + + /** + * Dynamically builds the HTML for the IPS Menu system + * + * @var object Javascript object clicked + */ + this.init_current_menu = function( obj ) + { + //----------------------------------------- + // Old menu? + //----------------------------------------- + + var menu = ''; + + try + { + menu = document.getElementById( ipsattach.current_item_menu + '_menu' ); + menu.innerHTML = ''; + } + catch(error) + { + menu = document.createElement('div'); + } + + //----------------------------------------- + // Create menu wrapper + //----------------------------------------- + + var _items = 0; + + menu.id = ipsattach.current_item_menu + '_menu'; + menu.className = 'attach-popupmenu'; + menu.style.display = 'none'; + menu.style.cursor = 'default'; + menu.style.padding = '3px'; + menu.style.width = 'auto'; + menu.style.overflow = 'auto'; + + //----------------------------------------- + // What are we doing? + //----------------------------------------- + + for( var i in ipsattach.current_items ) + { + var option = document.createElement('div'); + option.innerHTML = ipsattach.current_items[i]; + option.style.width = ipsattach.current_item_menu_obj.style.width; + option.className = 'attach-menu-row'; + option.onmouseover = option.onmouseout = ipsattach.menu_onmouse_event; + menu.appendChild(option); + + _items++; + } + + if ( ! _items ) + { + var option = document.createElement('div'); + option.innerHTML = ipsattach.lang['no_items']; + option.style.width = ipsattach.current_item_menu_obj.style.width; + option.className = 'attach-menu-row'; + option.onmouseover = option.onmouseout = ipsattach.menu_onmouse_event; + menu.appendChild(option); + } + + // Set status counter correct + ipsattach.set_attach_count_status( _items ); + + ipsattach.iframe_parent_div_obj.appendChild(menu); + + ipsclass.set_unselectable( menu ); + }; + + /** + * Recounts number of current attachments and sets counter + * + * @param integer Cached count + */ + this.set_attach_count_status = function( _items ) + { + if ( ! ipsattach.show_attach_menu ) + { + return; + } + + if ( typeof( _items ) == 'undefined' ) + { + _items = 0; + + for( var i in ipsattach.current_items ) + { + _items++; + } + } + + try + { + ipsattach.dropdown_text_obj.innerHTML = " (" + _items + ")"; + } + catch(error) + { + } + }; + + /** + * Add item into current_attachments menu + */ + this.add_current_item = function( attach_id, attach_name, attach_size, attach_image ) + { + //----------------------------------------- + // Fix up attach_name + //----------------------------------------- + + if ( attach_name.length > 22 ) + { + var _ext = attach_name.replace( /^.*\.(\S+?)$/ , "$1" ); + var _main = attach_name.replace( /^(.*)\.\S+?$/ , "$1" ); + var _a = _main.substr( 0, 8 ); + var _b = _main.substr( _main.length - 8 , _main.length ); + + attach_name = _a + '...' + _b + '.' + _ext; + } + + var html = ''; + + html += '  '; + html += ' '; + + html += '  '; + html += '' + attach_name + ''; + html += '  ('+attach_size+')'; + + this.current_items[ this.current_items.length ] = html; + }; + + /** + * Adds the IPD attach tag into the current editor + * + * @param integer Attachment ID + * @param string Attachment name + */ + this.add_attachment_into_editor = function( id, name ) + { + // Form tag + var tag = "[attachment=" + id + ":" + name + "]"; + + // Add + ipsclass.add_editor_contents( tag ); + }; + + /** + * Removes an attachment + * + * @param integer Attachment ID + */ + this.remove_attachment = function( id ) + { + menu_action_close(); + + if ( confirm( ipsattach.lang['remove_warn'] + ' ['+ id + ']' ) ) + { + ipsattach.iframe_obj.src = ipsattach.iframe_remove_url + "&attach_id=" + id; + + ipsattach.iframe_on_un_load( 'attach_removal' ); + } + }; + + /** + * Show upload field and attachments + * Draws the iFrame and sets the source + */ + this.show_attach_box = function() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + var iheight = parseInt( this.iframe_add_to_div_obj.style.height ); + var iwidth = this.iframe_add_to_div_obj.style.width; + + //----------------------------------------- + // Generate iFrame box + //----------------------------------------- + + if ( ! this.iframe_obj ) + { + this.iframe_obj = document.createElement( 'IFRAME' ); + + this.iframe_obj.src = this.iframe_init_url; + this.iframe_obj.id = this.iframe_id; + this.iframe_obj.name = this.iframe_id; + this.iframe_obj.scrolling = 'no'; + this.iframe_obj.frameBorder = 'no'; + this.iframe_obj.border = '0'; + this.iframe_obj.className = this.iframe_classname; + this.iframe_obj.style.width = iwidth ? iwidth : '100%'; + this.iframe_obj.style.height = iheight ? iheight - 5 + 'px' : this.iframe_height + 'px'; + this.iframe_obj.style.overflow = 'hidden'; + this.iframe_obj.style.display = ''; + + // Add environmentals.. + this.iframe_obj.msg_open = 1; + this.iframe_obj.iframe_loaded = 0; + this.iframe_obj.iframe_init = 0; + + // Attach iFrame inside our DIV + this.iframe_add_to_div_obj.appendChild( this.iframe_obj ); + + // Add handler + if ( is_ie ) + { + this.iframe_obj.style.backgroundColor = 'transparent'; + this.iframe_obj.allowTransparency = true; + this.iframe_obj.onreadystatechange = this.iframe_on_load_ie; + } + else + { + this.iframe_obj.onload = this.iframe_onload; + } + + //----------------------------------------- + // Safari bug: Onload events don't fire + // when the parent DIV is hidden. + //----------------------------------------- + + if ( is_safari ) + { + this.iframe_parent_div_obj.style.display = ''; + } + else + { + this.iframe_parent_div_obj.style.display = 'none'; + } + } + + //----------------------------------------- + // INIT cover div + //----------------------------------------- + + if ( typeof this.message_div_obj != 'undefined' ) + { + this.message_div_obj.style.width = typeof this.iframe_parent_div_obj.style.width != 'undefined' ? this.iframe_parent_div_obj.style.width : '100%'; + this.message_div_obj.style.height = this.iframe_parent_div_obj.offsetHeight ? this.iframe_parent_div_obj.offsetHeight : '120px'; + this.message_div_obj.style.position = 'relative'; + this.message_div_obj.style.display = 'none'; + } + + //----------------------------------------- + // Show cover div during INIT + //----------------------------------------- + + this.show_message( this.lang['init_progress'] ); + }; + + /** + * Draws status bar + * Using "ipsattach" as is called in an event function + */ + this.init_status_bar = function() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + var _html = ''; + + if ( typeof ipsattach.status_div_obj != 'undefined' ) + { + try + { + ipsattach.status_msg = ipsattach.lang[ ipsattach.status_msg ]; + } + catch(error) { } + + if ( ipsattach.status_msg ) + { + if ( ipsattach.status_is_error ) + { + _html += "" + ipb_global_lang[ " + ipsattach.status_msg; + } + else + { + _html += "" + ipb_global_lang[ " + ipsattach.status_msg; + } + } + + ipsattach.status_div_obj.innerHTML = _html; + } + + //----------------------------------------- + // Reset pending... + //----------------------------------------- + + ipsattach.has_upload_pending = 0; + }; + + /** + * Manually show the iframe message + */ + this.iframe_on_un_load = function( msg ) + { + //----------------------------------------- + // Message... + //----------------------------------------- + + msg = typeof(msg) != 'undefined' ? ipsattach.lang[ msg ] : ipsattach.lang['uploading_file']; + + //----------------------------------------- + // Show... + //----------------------------------------- + + if ( this.iframe_obj.iframe_loaded ) + { + this.iframe_obj.iframe_loaded = 0; + this.iframe_obj.msg_open = 1; + + ipsattach.show_message( msg ); + } + }; + + /** + * Each time the window is loaded, close + * any open messages + */ + this.iframe_onload = function( e ) + { + //----------------------------------------- + // First load? + //----------------------------------------- + + if ( ! this.iframe_init ) + { + this.iframe_init = 1; + this.iframe_loaded = 1; + + if ( this.msg_open ) + { + this.msg_open = 0; + + ipsattach.hide_message(); + } + + window.frames[ this.id ].document.onmousedown = menu_action_close; + } + else + { + this.iframe_loaded = 1; + window.frames[ this.id ].document.onmousedown = menu_action_close; + + if ( this.msg_open ) + { + this.msg_open = 0; + + ipsattach.hide_message(); + } + + //----------------------------------------- + // Run command? + //----------------------------------------- + + if ( ipsattach.onload_function ) + { + ipsattach.onload_function(); + } + } + + // INIT stuff + ipsattach.init_status_bar(); + // Set status counter correct + ipsattach.set_attach_count_status(); + }; + + /** + * IE only calls onload once... So subsequent loads + * don't do anything.. hence the readystate change + */ + this.iframe_on_load_ie = function( e ) + { + //----------------------------------------- + // First load? + //----------------------------------------- + + if ( this.readyState == 'complete' ) + { + if ( ! this.iframe_init ) + { + this.iframe_init = 1; + this.iframe_loaded = 1; + window.frames[ this.id ].document.onmousedown = menu_action_close; + + if ( this.msg_open ) + { + this.msg_open = 0; + + ipsattach.hide_message(); + } + + } + else + { + this.iframe_loaded = 1; + window.frames[ this.id ].document.onmousedown = menu_action_close; + + if ( this.msg_open ) + { + this.msg_open = 0; + ipsattach.hide_message(); + } + } + + //window.frames[ this.id ].document.getElementsByTagName('html')[0].allowTransparency = true; + window.frames[ this.id ].document.getElementsByTagName('html')[0].style.background = 'transparent'; + + //alert( window.frames[ this.id ].document.getElementsByTagName('html')[0].outerHTML ); + + //----------------------------------------- + // Run command? + //----------------------------------------- + + if ( ipsattach.onload_function ) + { + ipsattach.onload_function(); + } + + // INIT stuff + ipsattach.init_status_bar(); + // Set status counter correct + ipsattach.set_attach_count_status(); + } + }; + + /** + * Show message DIV + */ + this.show_message = function( msg ) + { + //----------------------------------------- + // Safari bug: Onload events don't fire + // when the parent DIV is hidden. + //----------------------------------------- + + if ( is_safari ) + { + return; + } + + if ( typeof ipsattach.message_div_obj != 'undefined' ) + { + ipsattach.message_div_obj.style.display = ''; + ipsattach.message_span_obj.innerHTML = msg; + + // Hide other div + ipsattach.iframe_parent_div_obj.style.display = 'none'; + } + }; + + /** + * Hide message DIV + */ + this.hide_message = function() + { + //----------------------------------------- + // Safari bug: Onload events don't fire + // when the parent DIV is hidden. + //----------------------------------------- + + if ( is_safari ) + { + return; + } + + if ( typeof ipsattach.message_div_obj != 'undefined' ) + { + ipsattach.message_div_obj.style.display = 'none'; + ipsattach.message_span_obj.innerHTML = ''; + + // Show other div + ipsattach.iframe_parent_div_obj.style.display = ''; + } + }; + + /** + * Mouseover events + * + * @param Event Object + */ + this.current_menu_mouseover = function(e) + { + e = ipsclass.cancel_bubble(e, true); + + if ( e.type == 'click' ) + { + this._onclick(e); + } + }; + + /** + * Shows the pop-up menu + * First, dynamically writes menu - then passes to ipsmenu class to show + * + * @param Object Object + */ + this.current_menu_button_show = function(obj) + { + ipsattach.init_current_menu(obj); + this._open(obj); + }; + + /** + * Roll over effect for the menu + * ^^ + * + * @param Event Object + */ + this.menu_onmouse_event = function( e ) + { + e = ipsclass.cancel_bubble(e, true); + + if ( e.type == 'mouseover' ) + { + this.className = ipsattach.css_menu_row_over; + } + else if ( e.type == 'mouseout' ) + { + this.className = ipsattach.css_menu_row; + } + }; + +} diff --git a/Development/javascript_uncompressed/jscripts/ips_ipsclass.js b/Development/javascript_uncompressed/jscripts/ips_ipsclass.js new file mode 100644 index 00000000..e922b93d --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/ips_ipsclass.js @@ -0,0 +1,597 @@ +//------------------------------------------------------------------------------ +// IPS Global JS functions +//------------------------------------------------------------------------------ +// Matt Mecham Woz Here +// (c) 2005 Invision Power Services, Inc. +// http://www.invisionpower.com +//------------------------------------------------------------------------------ + + +function ipsclass() +{ + this.cookies = new Array(); + this.ignore_cookies = new Array( ipb_var_cookieid + 'ipb_stronghold', + ipb_var_cookieid + 'session_id', + ipb_var_cookieid + 'ipb_admin_session_id', + ipb_var_cookieid + 'member_id', + ipb_var_cookieid + 'pass_hash' ); + + this.settings = { + 'do_linked_resize' : 0, + 'resize_percent' : 50 + }; + + /*-------------------------------------------------------------------------*/ + // Sort out cookies + /*-------------------------------------------------------------------------*/ + + this.init = function() + { + var _tmp = document.cookie.split(';'); + + if ( _tmp.length ) + { + for( i = 0 ; i < _tmp.length ; i++ ) + { + if ( _tmp[i].match( new RegExp( ipb_var_cookieid + ".*$" ) ) ) + { + var _data = _tmp[i].split('='); + var _key = this.trim( _data[0] ); + var _value = unescape( this.trim( _data[1] ) ); + + if ( _key && ( ! this.in_array( _key, this.ignore_cookies ) ) ) + { + this.cookies[ _key.replace( ipb_var_cookieid, '' ) ] = _value; + } + } + } + } + + _tmp = null; + }; + + //============================================================================= + // PHP EMULATION + //============================================================================= + + /** + * Emulate PHPs trim function + */ + this.trim = function( text ) + { + if( typeof(text) == 'undefined' ) + { + return ''; + } + + text = text.replace(/^\s+/, ''); + return text.replace(/\s+$/, ''); + }; + + /** + * Emulate PHPs html_entity_decode function + */ + this.html_entity_decode = function( text ) + { + if( typeof ca == 'undefined' ) + { + var ca = document.createElement( 'textarea' ); + } + + ca.innerHTML = text.replace( //g, '>' ); + + return ca.value; + }; + + /** + * Emulate PHPs in_array function + */ + this.in_array = function( needle, haystack ) + { + if ( ! haystack.length ) + { + return false; + } + + for ( var i = 0 ; i < haystack.length ; i++) + { + if ( haystack[i] === needle ) + { + return true; + } + } + + return false; + }; + + /** + * Emulate PHPs htmlspecial chars function + */ + this.htmlspecialchars = function( text ) + { + text = text.replace( //g, '>' ); + text = text.replace( /"/g, '"' ); + + return text; + }; + + /** + * Emulate PHPs un htmlspecial chars function + */ + this.un_htmlspecialchars = function( text ) + { + text = text.replace( /</g , '<' ); + text = text.replace( />/g , '>' ); + text = text.replace( /"/g, '"' ); + + return text; + }; + + //============================================================================= + // EDITOR FUNCTIONS + //============================================================================= + + /** + * Get contents from an open editor + */ + this.get_editor_contents = function( editor_id, editor_array ) + { + var aIPS_editor = editor_array ? editor_array : IPS_editor; + + if ( ! editor_id ) + { + //----------------------------------------- + // Assume we don't care, and get first box + //----------------------------------------- + + for( var i in aIPS_editor ) + { + if( typeof( aIPS_editor[i] ) != 'object' ) + { + continue; + } + + editor_id = i; + break; + } + } + + return aIPS_editor[ editor_id ].editor_get_contents; + }; + + /** + * Add contents to an open editor + */ + this.add_editor_contents = function( text, editor_id, editor_array ) + { + var aIPS_editor = editor_array ? editor_array : IPS_editor; + + if ( ! editor_id ) + { + //----------------------------------------- + // Assume we don't care, and get first box + //----------------------------------------- + + for( var i in aIPS_editor ) + { + if( typeof( aIPS_editor[i] ) != 'object' ) + { + continue; + } + + editor_id = i; + break; + } + } + + return aIPS_editor[ editor_id ].insert_text( text ); + }; + + /** + * Convert saved tags to display tags + */ + this.convert_saved_tags_to_display_tags = function( text ) + { + text = text.replace( /(<|<|<)!--/, "{" ); + text = text.replace( /--(>|>|>)/ , "}" ); + + return text; + }; + + //============================================================================= + // MISC FUNCTIONS + //============================================================================= + + /** + * Include a script... + */ + this.include_javascript = function( _file, div_id ) + { + /* INIT */ + var _doc = ( div_id ) ? document.getElementById( div_id ) : document.getElementsByTagName( 'head' ).item(0); + var _js = document.createElement('script' ); + + /* Create attribute */ + _js.setAttribute( 'language', 'javascript' ); + _js.setAttribute( 'type', 'text/javascript' ); + _js.setAttribute( 'src', _file ); + _doc.appendChild( _js ); + + return false; + }; + + /** + * Fade in colour... + */ + this.fade_in_element = function( div ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + var hash = '#'; + var color_items = "0123456789abcdef"; + var start_color = '#ffff66'; + var orig_color = document.getElementById( div ).style.backgroundColor; + var temp_end = '#ffffff'; + var iter = 20; + var time = 80; + + var rbeg = color_items.indexOf(start_color.substr(1,1))*16 + color_items.indexOf(start_color.substr(2,1)); + var gbeg = color_items.indexOf(start_color.substr(3,1))*16 + color_items.indexOf(start_color.substr(4,1)); + var bbeg = color_items.indexOf(start_color.substr(5,1))*16 + color_items.indexOf(start_color.substr(6,1)); + var rend = color_items.indexOf(temp_end.substr(1,1))*16 + color_items.indexOf(temp_end.substr(2,1)); + var gend = color_items.indexOf(temp_end.substr(3,1))*16 + color_items.indexOf(temp_end.substr(4,1)); + var bend = color_items.indexOf(temp_end.substr(5,1))*16 + color_items.indexOf(temp_end.substr(6,1)); + + for ( i = 1, r = rbeg, g = gbeg, b = bbeg; + i <= iter; + r = Math.round(rbeg + i * ((rend - rbeg) / (iter-1))), + g = Math.round(gbeg + i * ((gend - gbeg) / (iter-1))), + b = Math.round(bbeg + i * ((bend - bbeg) / (iter-1))), i++ + ) + { + hstr = '#' + color_items.charAt(Math.floor(r/16)) + color_items.charAt(r%16) + color_items.charAt(Math.floor(g/16)) + color_items.charAt(g%16) + color_items.charAt(Math.floor(b/16)) + color_items.charAt(b%16); + + setTimeout('var div = document.getElementById("' + div + '"); div.style.backgroundColor = "' + hstr + '";', i * time); + } + + setTimeout('var div = document.getElementById("' + div + '"); div.style.backgroundColor = "' + orig_color + '";', (i+1) * time); + }; + + /** + * Accepts a string followed by a list of replacements + */ + + this.lang_build_string = function() + { + if ( ! arguments.length || ! arguments ) + { + return; + } + + var string = arguments[0]; + + for( var i = 1 ; i < arguments.length ; i++ ) + { + var match = new RegExp('<%' + i + '>', 'gi'); + string = string.replace( match, arguments[i] ); + } + + return string; + }; + + /** + * Return the ID from an ID title string + * + * @param string ID title + * @return integar ID + */ + this.get_id_from_text = function( id ) + { + return id.replace( /.*(\-|_)(\S+)/, "$2" ); + }; + + /** + * Return the name from an ID string + * + * @param string ID title + * @return integar ID + */ + this.get_name_from_text = function( id ) + { + return id.replace( /(.*)(\-|_)(\S+)/, "$1" ); + }; + + /** + * Location jump + * @param string URL to redirect to + * @param boolean Do not prepend normal URL + */ + this.location_jump = function( url, full ) + { + url = url.replace( /&/g, '&' ); + + if ( full ) + { + window.location.href = url; + } + else + { + window.location.href = ipb_var_base_url + url; + } + }; + + /** + * Confirm an action + */ + this.confirm_action = function(url, msg) + { + if ( ! msg ) + { + msg = 'PLEASE CONFIRM:\nOK to proceed?'; + } + + if ( url ) + { + url = url.replace( '&', '&' ); + } + else + { + url = ''; + } + + if ( confirm( msg ) ) + { + window.location.href = url; + } + else + { + alert ( ipb_global_lang['action_cancelled'] ); + return false; + } + }; + + /** + * Create pop-up window + */ + this.pop_up_window = function(url, width, height, name) + { + if ( ! name ) + { + var mydate = new Date(); + name = mydate.getTime(); + } + + var Win = window.open( url.replace( '&', '&' ), name, 'width='+width+',height='+height + ',resizable=1,scrollbars=1,location=no,directories=no,status=no,menubar=no,toolbar=no'); + + Win.focus(); + + return false; + }; + + /** + * Set stuff unselectable + */ + this.set_unselectable = function(obj) + { + if ( ! is_ie4 && typeof( obj.tagName ) != 'undefined' ) + { + if ( obj.hasChildNodes() ) + { + for (var i = 0; i < obj.childNodes.length; i++) + { + this.set_unselectable( obj.childNodes[i] ); + } + } + obj.unselectable = 'on'; + } + }; + + /** + * GET LEFT OBJECT POSITION + * Safari friendly version... + */ + this.get_obj_leftpos = function(obj) + { + var curleft = 0; + + if (obj.offsetParent) + { + while (obj.offsetParent) + { + curleft += obj.offsetLeft; + obj = obj.offsetParent; + } + } + else if (obj.x) + { + curleft += obj.x; + } + + return curleft; + }; + + /** + * GET TOP OBJECT POSITION + * Safari friendly version... + */ + this.get_obj_toppos = function(obj) + { + var curtop = 0; + + if (obj.offsetParent) + { + while (obj.offsetParent) + { + curtop += obj.offsetTop; + obj = obj.offsetParent; + } + } + else if (obj.y) + { + curtop += obj.y; + } + + return curtop; + }; + + //============================================================================= + // CANCEL BUBBLE FUNCTIONS + //============================================================================= + + /** + * Stop the browser bubbling events + */ + this.cancel_bubble = function(obj, extra) + { + if ( extra !== false ) + { + extra = true; + } + + if ( ! obj || is_ie) + { + if ( extra ) + { + window.event.returnValue = false; + } + + window.event.cancelBubble = true; + + return window.event; + } + else + { + obj.stopPropagation(); + + if ( extra ) + { + obj.preventDefault(); + } + + return obj; + } + }; + + this.cancel_bubble_all = function( obj ) + { + return ipsclass.cancel_bubble( obj, true ); + }; + + this.cancel_bubble_low = function( obj ) + { + return ipsclass.cancel_bubble( obj, false ); + }; + + //============================================================================= + // COOKIE FUNCTIONS + //============================================================================= + + /** + * Cookie: Get Cookie + */ + this.my_getcookie = function( name ) + { + return this.cookies[ name ]; + /*cname = ipb_var_cookieid + name + '='; + cpos = document.cookie.indexOf( cname ); + + if ( cpos != -1 ) + { + cstart = cpos + cname.length; + cend = document.cookie.indexOf(";", cstart); + + if (cend == -1) + { + cend = document.cookie.length; + } + + return unescape( document.cookie.substring(cstart, cend) ); + } + + return null;*/ + }; + + /** + * Cookie: Set Cookie + */ + this.my_setcookie = function( name, value, sticky ) + { + expire = ""; + domain = ""; + path = "/"; + + if ( sticky ) + { + expire = "; expires=Wed, 1 Jan 2020 00:00:00 GMT"; + } + + if ( ipb_var_cookie_domain != "" ) + { + domain = '; domain=' + ipb_var_cookie_domain; + } + + if ( ipb_var_cookie_path != "" ) + { + path = ipb_var_cookie_path; + } + + document.cookie = ipb_var_cookieid + name + "=" + value + "; path=" + path + expire + domain + ';'; + + //----------------------------------------- + // Update internal array + //----------------------------------------- + + this.cookies[ name ] = value; + }; + + //============================================================================= + // ARRAY FUNCTIONS + //============================================================================= + + /** + * Array: Get stacksize + * @param array Array + * @return int Array length + */ + this.array_stacksize = function( thearray ) + { + for (i = 0 ; i < thearray.length; i++ ) + { + if ( (thearray[i] == "") || (thearray[i] == null) || (thearray == 'undefined') ) + { + return i; + } + } + + return thearray.length; + }; + + /** + * Array: Add element to the stack + * @param array Array + * @param mixed New value + */ + this.array_pushstack = function ( thearray, newval ) + { + var arraysize = this.array_stacksize(thearray); + thearray[arraysize] = newval; + }; + + /** + * Array: Remove last array element + * @param array Array + * @return int Array length + */ + this.array_popstack = function( thearray ) + { + var arraysize = this.array_stacksize( thearray ); + var theval = thearray[arraysize - 1]; + + delete thearray[arraysize - 1]; + return theval; + }; + +} diff --git a/Development/javascript_uncompressed/jscripts/ips_menu.js b/Development/javascript_uncompressed/jscripts/ips_menu.js new file mode 100644 index 00000000..baef2da8 --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/ips_menu.js @@ -0,0 +1,559 @@ +/*-------------------------------------------------------------------------*/ +// IPS BASIC MENU CLASS +// (c) 2005 Invision Power Services, Inc +// ASSUMES "ips_global.js" has been loaded +/*-------------------------------------------------------------------------*/ + +ipsmenu = new ips_menu(); + +/*-------------------------------------------------------------------------*/ +// INIT Handler class +/*-------------------------------------------------------------------------*/ + +function ips_menu() +{ + this.menu_registered = new Array(); + this.menu_openfuncs = new Array(); + this.menu_over_css = new Array(); + this.menu_out_css = new Array(); + this.menu_open_event = new Array(); + this.dynamic_register = new Array(); + this.menu_cur_open = null; + this.dynamic_html = null; +} + +/*-------------------------------------------------------------------------*/ +// Register menu control ID (add to array) +/*-------------------------------------------------------------------------*/ + +ips_menu.prototype.register = function ( cid, callback, menu_over_css, menu_out_css, event_type ) +{ + if ( event_type ) + { + this.menu_open_event[ cid ] = ( event_type == 'onmouseover' ) ? 'onmouseover' : 'onclick'; + } + + this.menu_registered[ cid ] = new ips_menu_class( cid ); + + if ( callback ) + { + this.menu_openfuncs[ cid ] = callback; + } + + if ( menu_over_css && menu_out_css ) + { + this.menu_over_css[ cid ] = menu_over_css; + this.menu_out_css[ cid ] = menu_out_css; + } + + return this.menu_registered[ cid ]; +}; + +/*-------------------------------------------------------------------------*/ +// Register menu control ID (add to array) +/*-------------------------------------------------------------------------*/ + +ips_menu.prototype.close = function () +{ + if ( this.menu_cur_open ) + { + this.menu_registered[ this.menu_cur_open ].close(); + } +}; + +/*-------------------------------------------------------------------------*/ +// ips_menu_class: Object for each menu +/*-------------------------------------------------------------------------*/ + +function ips_menu_class( cid ) +{ + this.cid = cid; + this.initialized = false; + + this.init_control_object(); + this.init_menu(); +}; + +/*-------------------------------------------------------------------------*/ +// ips_menu_class: Initiate a single menu +/*-------------------------------------------------------------------------*/ + +ips_menu_class.prototype.init_control_object = function() +{ + this.cid_obj = document.getElementById( this.cid ); + + //---------------------------------- + // Change cursor to show link + //---------------------------------- + + try + { + this.cid_obj.style.cursor = "pointer"; + } + catch(e) + { + this.cid_obj.style.cursor = "hand"; + } + + this.cid_obj.unselectable = true; + + if ( ipsmenu.menu_open_event[ this.cid ] == 'onmouseover' ) + { + this.cid_obj.onmouseover = ips_menu_events.prototype.event_onclick; + } + else + { + this.cid_obj.onclick = ips_menu_events.prototype.event_onclick; + this.cid_obj.onmouseover = ips_menu_events.prototype.event_onmouseover; + } + + this.cid_obj.onmouseout = ips_menu_events.prototype.event_onmouseout; +}; + +/*-------------------------------------------------------------------------*/ +// ips_menu_class: Initiate a single menu +/*-------------------------------------------------------------------------*/ + +ips_menu_class.prototype.init_menu = function() +{ + this.cid_menu_obj = document.getElementById( this.cid + '_menu' ); + + if ( this.cid_menu_obj ) + { + //---------------------------------- + // Save CPU - already init? + //---------------------------------- + + if ( this.initialized ) + { + return; + } + + //---------------------------------- + // Pop-up menu obj (hidden div) + //---------------------------------- + + this.cid_menu_obj.style.display = "none"; + this.cid_menu_obj.style.position = "absolute"; + this.cid_menu_obj.style.left = "0px"; + this.cid_menu_obj.style.top = "0px"; + this.cid_menu_obj.onclick = ipsclass.cancel_bubble_low; + this.cid_menu_obj.zIndex = 50; + + this.initialized = true; + } +}; + +/*-------------------------------------------------------------------------*/ +// ips_menu_class: Open menu +/*-------------------------------------------------------------------------*/ + +ips_menu_class.prototype.open = function( obj ) +{ + //---------------------------------- + // Not init? + //---------------------------------- + + if ( ! this.cid_menu_obj ) + { + this.initialized = false; + this.init_menu(); + } + + //---------------------------------- + // Close current menu(s) + //---------------------------------- + + if ( ipsmenu.menu_cur_open != null ) + { + ipsmenu.menu_registered[ ipsmenu.menu_cur_open ].close(); + } + + //---------------------------------- + // Save CPU - cur open clicked? + //---------------------------------- + + if ( ipsmenu.menu_cur_open == obj.id ) + { + return false; + } + + //---------------------------------- + // Set current open menu + //---------------------------------- + + ipsmenu.menu_cur_open = obj.id; + + //---------------------------------- + // Get ID of menu DIV to show + //---------------------------------- + + var left_px = ipsclass.get_obj_leftpos(obj); + var top_px = ipsclass.get_obj_toppos(obj) + obj.offsetHeight; + var ifid = obj.id; + + //try + //{ + // if ( is_safari && ! ipb_is_acp ) + // { + // top_px += 20; + // } + //} + //catch(error) + //{ + // if ( is_safari ) + // { + // top_px += 20; + // } + //} + + //---------------------------------- + // Show menu DIV.. but keep it underneath + //---------------------------------- + + this.cid_menu_obj.style.zIndex = -1; + this.cid_menu_obj.style.display = ""; + + //---------------------------------- + // Try and keep it on screen + //---------------------------------- + + var width = parseInt( this.cid_menu_obj.style.width ) ? parseInt( this.cid_menu_obj.style.width ) : this.cid_menu_obj.offsetWidth; + + if ( (left_px + width) >= document.body.clientWidth ) + { + left_px = left_px + obj.offsetWidth - width; + } + + //----------------------------------------- + // Firefox bump + //----------------------------------------- + + if ( is_moz ) + { + top_px -= 1; + } + + //---------------------------------- + // Finalize menu position + //---------------------------------- + + this.cid_menu_obj.style.left = left_px + "px"; + this.cid_menu_obj.style.top = top_px + "px"; + this.cid_menu_obj.style.zIndex = 100; + + //---------------------------------- + // Run a custom function? + //---------------------------------- + + if ( ipsmenu.menu_openfuncs[ obj.id ] ) + { + eval( ipsmenu.menu_openfuncs[ obj.id ] ); + } + + //---------------------------------- + // Workaround for IE bug which shows + // select boxes and other windows GUI + // over divs. SHOW IFRAME + //---------------------------------- + + if ( is_ie ) + { + try + { + if ( ! document.getElementById( 'if_' + obj.id ) ) + { + var iframeobj = document.createElement('iframe'); + + iframeobj.src = 'javascript:;'; + iframeobj.id = 'if_' +obj.id; + + document.getElementsByTagName('body').appendChild( iframeobj ); + } + else + { + var iframeobj = document.getElementById( 'if_' +obj.id ); + } + + iframeobj.scrolling = 'no'; + iframeobj.frameborder = 'no'; + iframeobj.className = 'iframeshim'; + iframeobj.style.position = 'absolute'; + + iframeobj.style.width = parseInt(this.cid_menu_obj.offsetWidth) + 'px'; + iframeobj.style.height = parseInt(this.cid_menu_obj.offsetHeight) + 'px'; + iframeobj.style.top = this.cid_menu_obj.style.top; + iframeobj.style.left = this.cid_menu_obj.style.left; + iframeobj.style.zIndex = 99; + iframeobj.style.display = "block"; + + } + catch(error) + { + //alert(error); // Oh dear, someones stolen the iframe + } + } + + //---------------------------------- + // Work around for safari which doesnt + // allow a hrefs top be clickable in + // a pop up div + //---------------------------------- + + if ( is_safari ) + { + try + { + mlinks = this.cid_menu_obj.getElementsByTagName('a'); + + for ( var i = 0 ; i <= mlinks.length ; i++ ) + { + //---------------------------------- + // Ignore non links and links that end with # + // As safari likes to do that with href='#' links + //---------------------------------- + + if ( mlinks[i] != null + && mlinks[i].href != null + && mlinks[i].href + && ( mlinks[i].href.indexOf( '#', 0 ) != (mlinks[i].href.length - 1) ) + ) + { + mlinks[i].onmousedown = ips_menu_events.prototype.event_safari_onclick_handler; + mlinks[i].id = 'saf-link-' + this.cid + i; + } + } + } + catch( error ) + { + //alert( error ); + } + } + + if ( this.cid_obj.editor_id ) + { + this.cid_obj.state = true; + IPS_editor[this.cid_obj.editor_id].set_menu_context(this.cid_obj, 'mousedown'); + } + + return false; +}; + +/*-------------------------------------------------------------------------*/ +// ips_menu_class: Close a menu +/*-------------------------------------------------------------------------*/ + +ips_menu_class.prototype.close = function() +{ + if ( this.cid_menu_obj != null ) + { + this.cid_menu_obj.style.display = "none"; + } + else if ( ipsmenu.menu_cur_open != null ) + { + ipsmenu.menu_registered[ ipsmenu.menu_cur_open ].cid_menu_obj.style.display = 'none'; + } + + ipsmenu.menu_cur_open = null; + + if ( this.cid_obj ) + { + if ( ipsmenu.menu_out_css[ this.cid_obj.id ] ) + { + this.cid_obj.className = ipsmenu.menu_out_css[ this.cid_obj.id ]; + } + } + + //---------------------------------- + // Workaround for IE bug which shows + // select boxes and other windows GUI + // over divs. Hide IFRAME + //---------------------------------- + + if ( is_ie ) + { + try + { + document.getElementById( 'if_' + this.cid ).style.display = "none"; + } + catch(error) + { + //alert(e);// Oh dear, someones stolen the iframe + } + } + + //----------------------------------------- + // IPS Editor stuff + //----------------------------------------- + + if ( this.cid_obj.editor_id ) + { + this.cid_obj.state = false; + IPS_editor[ this.cid_obj.editor_id ].set_menu_context( this.cid_obj, 'mouseout' ); + } +}; + +/*-------------------------------------------------------------------------*/ +// ACTION: If menu open and hover over another cid, close cur open new +/*-------------------------------------------------------------------------*/ + +ips_menu_class.prototype.hover = function(e) +{ + if ( ipsmenu.menu_cur_open != null ) + { + if ( ipsmenu.menu_registered[ ipsmenu.menu_cur_open ].cid != this.id ) + { + this.open(e); + } + } +}; + +/*-------------------------------------------------------------------------*/ +// INIT: ips menu events +/*-------------------------------------------------------------------------*/ + +function ips_menu_events() +{ +}; + +/*-------------------------------------------------------------------------*/ +// Safari: bug fix +/*-------------------------------------------------------------------------*/ + +ips_menu_events.prototype.event_safari_onclick_handler = function() +{ + if ( this.id ) + { + window.location = document.getElementById( this.id ).href; + } +}; + +/*-------------------------------------------------------------------------*/ +// Event: On mouseover +/*-------------------------------------------------------------------------*/ + +ips_menu_events.prototype.event_onmouseover = function(e) +{ + e = ipsclass.cancel_bubble(e, true); + ipsmenu.menu_registered[ this.id ].hover(this); + + if ( ipsmenu.menu_over_css[ this.id ] ) + { + this.className = ipsmenu.menu_over_css[ this.id ]; + } +}; + +/*-------------------------------------------------------------------------*/ +// Event: On mouseout +/*-------------------------------------------------------------------------*/ + +ips_menu_events.prototype.event_onmouseout = function(e) +{ + e = ipsclass.cancel_bubble(e, true); + + if ( ipsmenu.menu_out_css[ this.id ] && ipsmenu.menu_cur_open != this.id ) + { + this.className = ipsmenu.menu_out_css[ this.id ]; + } +}; + +/*-------------------------------------------------------------------------*/ +// Event: On click +/*-------------------------------------------------------------------------*/ + +ips_menu_events.prototype.event_onclick = function(e) +{ + e = ipsclass.cancel_bubble(e, true); + + if ( ipsmenu.menu_cur_open == null ) + { + if ( ipsmenu.menu_over_css[ this.id ] ) + { + this.className = ipsmenu.menu_over_css[ this.id ]; + } + + ipsmenu.menu_registered[ this.id ].open(this); + } + else + { + // For the RTE, if we click from font to size, for example + // we want the menu to open... + + //ipsmenu.menu_registered[ this.id ].close(); + + if ( ipsmenu.menu_cur_open == this.id ) + { + ipsmenu.menu_registered[ this.id ].close(); + + if ( ipsmenu.menu_out_css[ this.id ] ) + { + this.className = ipsmenu.menu_out_css[ this.id ]; + } + } + else + { + if ( ipsmenu.menu_over_css[ this.id ] ) + { + this.className = ipsmenu.menu_over_css[ this.id ]; + } + + ipsmenu.menu_registered[ this.id ].open(this); + }; + } +}; + +/*-------------------------------------------------------------------------*/ +// Global INIT +/*-------------------------------------------------------------------------*/ + +function menu_do_global_init() +{ + //---------------------------------- + // Close all menus on click + //---------------------------------- + + document.onclick = menu_action_close; + + //---------------------------------- + // Write HTML + //---------------------------------- + + if ( ipsmenu.dynamic_html != null && ipsmenu.dynamic_html != '' ) + { + + } + + //---------------------------------- + // Register + //---------------------------------- + + if ( ipsmenu.dynamic_register.length ) + { + for( var i=0; i < ipsmenu.dynamic_register.length; i++ ) + { + if ( ipsmenu.dynamic_register[i] ) + { + ipsmenu.register( ipsmenu.dynamic_register[i] ); + } + } + } +}; + +/*-------------------------------------------------------------------------*/ +// Global: Close menus from any app +/*-------------------------------------------------------------------------*/ + +function menu_action_close(e) +{ + try { + if( e.button == 2 || e.button == 3 ) + { + return; + } + } + catch( acold ) {}; + + ipsmenu.close(e); +}; + + diff --git a/Development/javascript_uncompressed/jscripts/ips_profile_portal.js b/Development/javascript_uncompressed/jscripts/ips_profile_portal.js new file mode 100644 index 00000000..801b0217 --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/ips_profile_portal.js @@ -0,0 +1,1282 @@ +//------------------------------------------------------------------------------ +// IPS JS: Attach Functions +// (c) 2005 Invision Power Services, Inc. +// http://www.invisionpower.com +// Matt Mecham (16/12/05) +//------------------------------------------------------------------------------ + +var ips_personal_portal = new ips_personal_portal(); + +function ips_personal_portal() +{ + /** + * Rating wrapper + */ + this.div_rating_wrapper = 'pp-rating-wrapper'; + + /** + * Rating image text piece + */ + this.text_rating_image = 'pp-rating-img-'; + + /** + * CSS classes + */ + this.css_classes = { + 'pp-tabon' : 'pp-tabon', + 'pp-taboff' : 'pp-taboff', + 'pp-tabshaded' : 'pp-tabshaded', + 'pp-contentbox-back' : 'pp-contentbox-back', + 'pp-contentbox-entry-noheight' : 'pp-contentbox-entry-noheight', + 'pp-contentbox-entry-noheight-mod' : 'pp-contentbox-entry-noheight-mod', + 'pp-contentbox-entry-noheight-sel' : 'pp-contentbox-entry-noheight-sel' + }; + + /** + * Contact types + */ + this.contact_types = { 'aim' : 'aim', + 'msn' : 'msn', + 'icq' : 'icq', + 'yahoo' : 'yahoo' + }; + /** + * Content Tabs + */ + this.content_tabs = { }; + + /** + * Stored tabs + */ + this.stored_tabs = { }; + + /** + * Stored div classes + */ + this.stored_div_classes = { }; + + /** + * iframe tabs + */ + this.iframe_tabs = { + 'comments' : ipb_var_base_url + 'act=profile&CODE=personal_iframe_comments', + 'settings' : ipb_var_base_url + 'act=profile&CODE=personal_iframe_settings', + 'friends' : ipb_var_base_url + 'act=profile&CODE=personal_iframe_friends' + }; + + /** + * Stored tabs + */ + this.stored_tabs_css = { }; + + /** + * Other wrappers + */ + this.div_names = { + 'pp-entry-gender-wrap' : 'pp-entry-gender-wrap', + 'pp-entry-gender-text' : 'pp-entry-gender-text', + 'pp-entry-gender-img' : 'pp-entry-gender-img', + 'pp-entry-gender-imgwrap' : 'pp-entry-gender-imgwrap', + 'pp-entry-location-wrap' : 'pp-entry-location-wrap', + 'pp-entry-location-text' : 'pp-entry-location-text', + 'pp-entry-born-wrap' : 'pp-entry-born-wrap', + 'pp-entry-born-text' : 'pp-entry-born-text', + 'pp-entry-age-wrap' : 'pp-entry-age-wrap', + 'pp-entry-age-text' : 'pp-entry-age-text', + 'pp-entry-age-yearsold' : 'pp-entry-age-yearsold', + 'pp-main-tab-content' : 'pp-main-tab-content', + 'pp-content-tab' : 'pp-content-tab', + 'pp-comment-textarea' : 'pp-comment-textarea', + 'pp-comments-wrap' : 'pp-comments-wrap', + 'pp-comment-entry' : 'pp-comment-entry', + 'pp-comment-entry-main' : 'pp-comment-entry-main', + 'pp-iframe-wrap' : 'pp-iframe-wrap', + 'pp-entry-contact-wrap' : 'pp-entry-contact-wrap', + 'pp-entry-contact-entry' : 'pp-entry-contact-entry', + 'pp-main-photo' : 'pp-main-photo', + 'pp-personal_statement' : 'pp-personal_statement', + 'pp-checked' : 'pp-checked', + 'pp-friend-img' : 'pp-friend-img', + 'pp-friend-text' : 'pp-friend-text', + 'pp-friend-wrap' : 'pp-friend-wrap' + }; + + /** + * Settings + */ + this.settings = { + 'allow_rating' : 0, + 'default_rating' : 3, + 'edit_allowed' : 0, + 'member_id' : 0, + 'viewer_id' : 0, + 'img_star_on' : 'star_filled.gif', + 'img_star_selected' : 'star_selected.gif', + 'img_star_off' : 'star_empty.gif', + 'img_gender_male' : 'gender_male.png', + 'img_gender_female' : 'gender_female.png', + 'img_gender_mystery': 'gender_mystery.png', + 'img_base_url' : '', + 'img_menu_icon' : '', + 'default_tab' : '', + 'photo_def_width' : '150', + 'photo_def_height' : '150', + 'photo_def_src' : ipb_var_image_url + '/folder_profile_portal/pp-blank-large.png', + 'img_friend_remove' : ipb_var_image_url + '/folder_profile_portal/friend_remove_small.png', + 'img_friend_add' : ipb_var_image_url + '/folder_profile_portal/friend_add_small.png' + }; + /** + * Language + */ + this.languages = { + 'rate_me' : 'Rate Me', + 'img_alt_rate' : 'Rate this member, click on desired star to send rating', + 'gender_male' : 'Male', + 'gender_female' : 'Female', + 'gender_mystery' : 'Gender Not Set', + 'saving_comment' : 'Saving Comment...', + 'loading_tab' : ajax_load_msg, + 'deleting_comment' : 'Deleting Comment...', + 'friend_add' : 'Add as Friend', + 'friend_remove' : 'Remove Friend' + }; + + /** + * Loaded tab + */ + var loaded_tab = null; + + /** + * INIT + */ + this.init = function() + { + //----------------------------------------- + // INIT tabs + //----------------------------------------- + + var divs = document.getElementsByTagName( 'DIV' ); + var divcount = 0; + + //---------------------------------- + // Sort through and grab divs + //---------------------------------- + + for ( var i = 0 ; i <= divs.length ; i++ ) + { + try + { + if ( ! divs[i].id ) + { + continue; + } + } + catch(error) + { + continue; + } + + var divid = divs[i].id; + var divname = ipsclass.get_name_from_text( divs[i].id ); + var divnum = ipsclass.get_id_from_text( divs[i].id ); + + //---------------------------------- + // Work with it? + //---------------------------------- + + if ( divname == this.div_names['pp-content-tab'] ) + { + var _highlight = 0; + + this.stored_tabs[ divnum ] = divs[i]; + this.stored_tabs_css[ divnum ] = divs[i].className; + + divs[i].style.cursor = 'pointer'; + divs[i].onclick = this.tab_onclick; + + //----------------------------------------- + // Show this tab? + //----------------------------------------- + + if ( this.settings['default_tab'] != "" ) + { + if ( this.settings['default_tab'] == divnum ) + { + _highlight = 1; + } + } + else if ( divcount == 0 ) + { + _highlight = 1; + } + + //---------------------------------- + // Set correct classes / display + //---------------------------------- + + if ( _highlight == 1) + { + // First tab... + divs[i].className = this.css_classes['pp-tabon']; + divs[i].style.display = 'block'; + } + else + { + // Second tab + + if ( divs[i].className != this.css_classes['pp-tabshaded'] ) + { + divs[i].className = this.css_classes['pp-taboff']; + } + + divs[i].style.display = 'block'; + } + + divcount++; + } + } + + //----------------------------------------- + // Draw rating images... + //----------------------------------------- + + this.init_rating_images(); + + //----------------------------------------- + // Render drop down boxes + //----------------------------------------- + + this.show_dropdown_boxes(); + }; + + /** + * Show friend add/remove + */ + this.show_friend_add_or_remove = function( add_friend ) + { + try + { + var _div = document.getElementById( this.div_names['pp-friend-wrap'] ); + var _html = ''; + + if ( _div.id ) + { + if ( add_friend ) + { + _html = " "; + _html += "" + this.languages['friend_add'] + ""; + } + else + { + _html = " "; + _html += "" + this.languages['friend_remove'] + ""; + + } + + _div.innerHTML = _html; + } + } + catch(error) + { + } + }; + + /** + * Toggle DIV class for a comment box + */ + this.toggle_comment_box = function( comment_id, from_iframe ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + comment_id = parseInt( comment_id ); + from_iframe = parseInt( from_iframe ); + + //----------------------------------------- + // Work out document... + //----------------------------------------- + + var _document = document; + + if ( from_iframe ) + { + var iframe = document.getElementById( 'pp-main-tab-content-iframe' ); + + if ( iframe.contentDocument ) + { + _document = iframe.contentDocument; + } + else if ( iframe.contentWindow ) + { + _document = iframe.contentWindow.document; + } + else if ( iframe.document ) + { + _document = iframe.document; + } + } + + //----------------------------------------- + // Continue... + //----------------------------------------- + + if ( comment_id ) + { + var _div = _document.getElementById( this.div_names['pp-comment-entry-main'] + '-' + comment_id ); + var _box = _document.getElementById( this.div_names['pp-checked'] + '-' + comment_id ); + var _class = _div.className; + + if ( _class == this.css_classes['pp-contentbox-entry-noheight'] || _class == this.css_classes['pp-contentbox-entry-noheight-mod'] ) + { + this.stored_div_classes[ this.div_names['pp-comment-entry'] + '-' + comment_id ] = _class; + + _div.className = this.css_classes['pp-contentbox-entry-noheight-sel']; + } + else if ( this.stored_div_classes[ this.div_names['pp-comment-entry'] + '-' + comment_id ] ) + { + _div.className = this.stored_div_classes[ this.div_names['pp-comment-entry'] + '-' + comment_id ]; + } + else + { + _div.className = this.css_classes['pp-contentbox-entry-noheight']; + } + } + + return true; + }; + + /** + * Convert some stuff to drop down boxes + */ + this.show_dropdown_boxes = function() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + var html = ''; + + //----------------------------------------- + // Are we the same ID as the viewer + //----------------------------------------- + + if ( ( this.settings['member_id'] == this.settings['viewer_id'] ) && ( this.settings['viewer_id'] ) && ( this.settings['edit_allowed'] == 1 ) ) + { + try + { + //----------------------------------------- + // Gender box... + //----------------------------------------- + + var _wrap = document.getElementById( this.div_names['pp-entry-gender-wrap'] ); + + _wrap.className = 'popmenubutton-new'; + + ipsmenu.register( "pp-entry-gender-wrap" ); + + //----------------------------------------- + // Location box... + //----------------------------------------- + + var _wrap = document.getElementById( this.div_names['pp-entry-location-wrap'] ); + + _wrap.className = 'popmenubutton-new'; + + ipsmenu.register( "pp-entry-location-wrap" ); + + //----------------------------------------- + // Birthdate box... + //----------------------------------------- + + var _wrap = document.getElementById( this.div_names['pp-entry-born-wrap'] ); + + _wrap.className = 'popmenubutton-new'; + + ipsmenu.register( "pp-entry-born-wrap" ); + } + catch( error ) + { + } + + //----------------------------------------- + // Contact messengers... + //----------------------------------------- + + for ( var i in this.contact_types ) + { + try + { + var _wrap = document.getElementById( this.div_names['pp-entry-contact-wrap'] + '-' + this.contact_types[i] ); + + _wrap.className = 'popmenubutton-new'; + + ipsmenu.register( "pp-entry-contact-wrap" + '-' + this.contact_types[i] ); + } + catch(error) + { + } + } + } + }; + + /** + * INIT rating images + */ + this.init_rating_images = function() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + var html = ''; + + //----------------------------------------- + // Can rate this member? + //----------------------------------------- + + if ( ! this.settings[ 'allow_rating' ] ) + { + return false; + } + + //----------------------------------------- + // Still here? OK... + //----------------------------------------- + + for( var i = 1 ; i <= 5 ; i++ ) + { + var _onmouseover = ''; + var _onmouseout = ''; + var _onclick = ''; + var _title = ''; + + if ( ( this.settings['member_id'] != this.settings['viewer_id'] ) && ( this.settings['viewer_id'] ) ) + { + _onmouseover = ' onmouseover="this.style.cursor=\'pointer\'; ips_personal_portal.show_rating_images(' + i + ', 0)"'; + _onmouseout = ' onmouseout="ips_personal_portal.show_rating_images(-1, 1)"'; + _onclick = ' onclick="ips_personal_portal.send_rating(' + i + ')"'; + _title = this.languages['img_alt_rate']; + } + + html += "-"; + } + + try + { + if ( ( this.settings['member_id'] != this.settings['viewer_id'] ) && ( this.settings['viewer_id'] ) ) + { + document.getElementById( this.div_rating_wrapper ).innerHTML = this.languages['rate_me'] + ' ' + html; + } + else + { + document.getElementById( this.div_rating_wrapper ).innerHTML = html; + } + + //----------------------------------------- + // Now set the image... + //----------------------------------------- + + this.show_rating_images( this.settings['default_rating'], 1 ); + } + catch( e ) { } + }; + + /** + * Send rating.. + */ + this.load_content_tab = function( tab ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + var html = ''; + + //----------------------------------------- + // IE is a pain... + //----------------------------------------- + + if ( is_ie && !is_ie7 ) + { + var _div = document.getElementById( ips_personal_portal.div_names['pp-main-tab-content'] ); + var _width = parseInt( _div.offsetWidth - 12 ); + + // IE adds the 12 px from the padding set below back into the width.. + } + + //----------------------------------------- + // Got a rating? + //----------------------------------------- + + if ( tab ) + { + //----------------------------------------- + // Make sure messages are hidden + //----------------------------------------- + + hide_inline_messages_instant(); + + //----------------------------------------- + // Loaded tab... + //----------------------------------------- + + this.loaded_tab = tab; + + //----------------------------------------- + // iFrame tab + //----------------------------------------- + + if ( this.iframe_tabs[ tab ] ) + { + var url = this.iframe_tabs[ tab ] + '&member_id=' + this.settings['member_id'] + '&md5check=' + ipb_md5_check; + + document.getElementById( this.div_names['pp-main-tab-content'] ).innerHTML = ''; + + var iframeinclude = new iframe_include(); + iframeinclude.iframe_id = 'pp-main-tab-content-iframe'; + iframeinclude.iframe_add_to_div = 'pp-main-tab-content'; + iframeinclude.iframe_main_wrapper = 'pp-iframe-wrap'; + iframeinclude.init(); + iframeinclude.include( url ); + } + //----------------------------------------- + // Normal tab + //----------------------------------------- + + else + { + //---------------------------------- + // INIT + //---------------------------------- + + var url = ipb_var_base_url+'act=profile&CODE=personal_ajax_load_tab&member_id=' + this.settings['member_id'] + '&tab=' + tab + '&md5check=' + ipb_md5_check; + + /*--------------------------------------------*/ + // Main function to do on request + // Must be defined first!! + /*--------------------------------------------*/ + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj.readystate_ready_and_ok() ) + { + xmlobj.show_loading( ips_personal_portal.languages['loading_tab'] ); + return; + } + + xmlobj.hide_loading(); + + //---------------------------------- + // INIT + //---------------------------------- + + var html = xmlobj.xmlhandler.responseText; + + if ( html != 'error' ) + { + document.getElementById( ips_personal_portal.div_names['pp-main-tab-content'] ).innerHTML = html; + + //----------------------------------------- + // Topic attachment sizes... + //----------------------------------------- + + try + { + fix_linked_image_sizes(); + xmlobj.execute_javascript( html ); + + //----------------------------------------- + // Resize box nicely... + //----------------------------------------- + + document.getElementById( ips_personal_portal.div_names['pp-main-tab-content'] ).style.height = 'auto'; + document.getElementById( ips_personal_portal.div_names['pp-main-tab-content'] ).style.padding = '6px'; + document.getElementById( ips_personal_portal.div_names['pp-main-tab-content'] ).className = ips_personal_portal.css_classes['pp-contentbox-back']; + + //----------------------------------------- + // IE is still a pain + //----------------------------------------- + + if ( is_ie ) + { + _div.style.width = ( _width ) ? _width + "px" : 'auto'; + _div.style.overflowX = 'auto'; + } + } + catch(error) + { + //alert(error); + } + } + else + { + alert( js_error_no_permission ); + } + }; + + //---------------------------------- + // LOAD XML + //---------------------------------- + + xmlobj = new ajax_request(); + xmlobj.onreadystatechange( do_request_function ); + + xmlobj.process( url ); + + return false; + } + } + }; + + /** + * Send rating.. + */ + this.send_rating = function( rating ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + rating = rating ? rating : 0; + + //----------------------------------------- + // Got a rating? + //----------------------------------------- + + if ( rating ) + { + //---------------------------------- + // INIT + //---------------------------------- + + var url = ipb_var_base_url+'act=xmlout&do=member-rate&member_id=' + this.settings['member_id'] + '&rating=' + rating + '&md5check=' + ipb_md5_check; + + /*--------------------------------------------*/ + // Main function to do on request + // Must be defined first!! + /*--------------------------------------------*/ + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj.readystate_ready_and_ok() ) + { + xmlobj.show_loading( '' ); + return; + } + + xmlobj.hide_loading(); + + //---------------------------------- + // INIT + //---------------------------------- + + var html = xmlobj.xmlhandler.responseText; + + if ( html == 'no_permission' ) + { + alert( js_error_no_permission ); + } + else if ( html != 'error' ) + { + var _result = html.split(','); + var _new_value = _result[0]; + var _new_hits = _result[1]; + var _new_stars = _result[2]; + var _type = _result[3]; + + //----------------------------------------- + // Now set the image... + //----------------------------------------- + + ips_personal_portal.settings['default_rating'] = parseInt( _new_stars ); + + ips_personal_portal.show_rating_images( ips_personal_portal.settings['default_rating'], 1 ); + + ipsclass.fade_in_element( ips_personal_portal.div_rating_wrapper ); + + show_inline_messages_instant( 'rating_updated' ); + } + }; + + //---------------------------------- + // LOAD XML + //---------------------------------- + + xmlobj = new ajax_request(); + xmlobj.onreadystatechange( do_request_function ); + + xmlobj.process( url ); + + return false; + } + }; + + /** + * Show rating images.. + */ + this.show_rating_images = function( rating, restore_default ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + rating = restore_default ? this.settings['default_rating'] : parseInt( rating ); + var star = restore_default ? this.settings['img_star_on'] : this.settings['img_star_selected']; + + //----------------------------------------- + // Set to 0 + //----------------------------------------- + + for( var i = 1 ; i <= 5 ; i++ ) + { + var _img = document.getElementById( this.text_rating_image + i ); + _img.src = this.settings['img_base_url'] + '/' + this.settings['img_star_off']; + } + + //----------------------------------------- + // Show ones coloured... + //----------------------------------------- + + for( var i = 1 ; i <= rating ; i++ ) + { + var _img = document.getElementById( this.text_rating_image + i ); + _img.src = this.settings['img_base_url'] + '/' + star; + } + }; + + /** + * Delete comment + */ + this.delete_comment = function( comment_id ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + var url = ipb_var_base_url+'act=profile&CODE=personal_ajax_delete_comment&member_id=' + this.settings['member_id']; + var final_fields = new Array(); + + //----------------------------------------- + // Populate the form fields + //----------------------------------------- + + final_fields['md5check'] = ipb_md5_check; + final_fields['comment_id'] = comment_id; + + //----------------------------------------- + // Ajaxify mah bad self! + //----------------------------------------- + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj.readystate_ready_and_ok() ) + { + xmlobj.show_loading( ips_personal_portal.languages['deleting_comment'] ); + return; + } + + xmlobj.hide_loading(); + + //---------------------------------- + // INIT + //---------------------------------- + + var html = xmlobj.xmlhandler.responseText; + + if ( html == 'nopermission' ) + { + alert( message_pop_up_lang['no_permission'] ); + + } + else if ( html != 'error' ) + { + document.getElementById( ips_personal_portal.div_names['pp-comments-wrap'] ).innerHTML = html; + + //----------------------------------------- + // Reload comments tab + //----------------------------------------- + + if ( ips_personal_portal.loaded_tab == 'comments' ) + { + ips_personal_portal.load_content_tab( 'comments' ); + } + } + }; + + //---------------------------------- + // LOAD XML + //---------------------------------- + + xmlobj = new ajax_request(); + xmlobj.onreadystatechange( do_request_function ); + var xmlreturn = xmlobj.process( url, 'POST', xmlobj.format_for_post(final_fields) ); + + return false; + }; + + /** + * Reload comments + */ + this.reload_comments = function() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + var url = ipb_var_base_url+'act=profile&CODE=personal_ajax_reload_comments&member_id=' + this.settings['member_id']; + var final_fields = new Array(); + + //----------------------------------------- + // Populate the form fields + //----------------------------------------- + + final_fields['md5check'] = ipb_md5_check; + + //----------------------------------------- + // Ajaxify mah bad self! + //----------------------------------------- + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj_gender.readystate_ready_and_ok() ) + { + return; + } + + //---------------------------------- + // INIT + //---------------------------------- + + var html = xmlobj_gender.xmlhandler.responseText; + + if ( html != 'error' && html != 'no_permission' ) + { + document.getElementById( ips_personal_portal.div_names['pp-comments-wrap'] ).innerHTML = html; + } + }; + + //---------------------------------- + // LOAD XML + //---------------------------------- + + xmlobj_gender = new ajax_request(); + xmlobj_gender.onreadystatechange( do_request_function ); + var xmlreturn = xmlobj_gender.process( url, 'POST', xmlobj_gender.format_for_post(final_fields) ); + + return false; + }; + + /** + * Save comment + */ + this.save_comment = function() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + var url = ipb_var_base_url+'act=profile&CODE=personal_ajax_add_comment&member_id=' + this.settings['member_id']; + var final_fields = new Array(); + + //----------------------------------------- + // Close menu + //----------------------------------------- + + menu_action_close(); + + //----------------------------------------- + // Populate the form fields + //----------------------------------------- + + final_fields['md5check'] = ipb_md5_check; + final_fields['comment'] = document.getElementById( this.div_names['pp-comment-textarea'] ).value; + + //----------------------------------------- + // Ajaxify mah bad self! + //----------------------------------------- + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj.readystate_ready_and_ok() ) + { + xmlobj.show_loading( ips_personal_portal.languages['saving_comment'] ); + return; + } + + xmlobj.hide_loading(); + + //---------------------------------- + // INIT + //---------------------------------- + + var html = xmlobj.xmlhandler.responseText; + + if ( html == 'nopermission' ) + { + alert( message_pop_up_lang['no_permission'] ); + return; + } + else if ( html == 'error-no-comment' ) + { + show_inline_messages_instant( 'pp_comment_error' ); + return; + } + else if ( html != 'error' ) + { + document.getElementById( ips_personal_portal.div_names['pp-comments-wrap'] ).innerHTML = html; + xmlobj.execute_javascript( html ); + + //----------------------------------------- + // Reload comments tab + //----------------------------------------- + + if ( ips_personal_portal.loaded_tab == 'comments' ) + { + ips_personal_portal.load_content_tab( 'comments' ); + } + + document.getElementById( ips_personal_portal.div_names['pp-comment-textarea'] ).value = ''; + } + }; + + //---------------------------------- + // LOAD XML + //---------------------------------- + + xmlobj = new ajax_request(); + xmlobj.onreadystatechange( do_request_function ); + var xmlreturn = xmlobj.process( url, 'POST', xmlobj.format_for_post(final_fields) ); + + return false; + + }; + + /** + * Updates the personal photo + */ + this.update_personal_photo = function( img_url, width, height ) + { + if ( ! img_url || ! img_url.match( "/photo-" ) ) + { + img_url = this.settings['photo_def_src']; + width = this.settings['photo_def_width']; + height = this.settings['photo_def_height']; + } + + var _img = document.getElementById( this.div_names['pp-main-photo'] ); + var mydate = new Date(); + + _img.src = img_url + '?__time=' + mydate.getTime(); + _img.width = width; + _img.height = height; + }; + + /** + * Updates the personal statement + */ + this.update_personal_statement = function( content, website ) + { + var _statement = document.getElementById( this.div_names['pp-personal_statement'] ); + + content = content.replace( /\[b\](.+?)\[\/b\]/gi, "$1" ); + content = content.replace( /\[i\](.+?)\[\/i\]/gi, "$1" ); + content = content.replace( /\[u\](.+?)\[\/u\]/gi, "$1" ); + + // Word wrap + content = content.replace( /(\S{19})(\S+?)/g , "$1 $2" ); + + _statement.innerHTML = content; + + if ( website ) + { + if ( website.length > 30 ) + { + _statement.innerHTML += "

" + ipb_global_lang['visit_my_website'] + ""; + } + else + { + _statement.innerHTML += "

"+website+""; + } + } + }; + + /** + * Saves settings to the Deebee. + */ + this.save_settings = function( func_name, field_data, get_data_from_this_id ) + { + //----------------------------------------- + // INIT objects + //----------------------------------------- + + var url = ipb_var_base_url+'act=xmlout&do=profile-save-settings&member_id=' + this.settings['member_id']; + var final_fields = new Array(); + + //----------------------------------------- + // Close menu + //----------------------------------------- + + menu_action_close(); + + //----------------------------------------- + // Populate the form fields + //----------------------------------------- + + final_fields['md5check'] = ipb_md5_check; + final_fields['cmd'] = func_name; + + try + { + for( var i in field_data ) + { + final_fields[ i ] = field_data[i]; + } + } + catch(error) + { + } + + if ( func_name == 'birthdate' ) + { + final_fields['pp_b_day'] = document.getElementById('pp_b_day').options[ document.getElementById('pp_b_day').selectedIndex ].value; + final_fields['pp_b_month'] = document.getElementById('pp_b_month').options[ document.getElementById('pp_b_month').selectedIndex ].value; + final_fields['pp_b_year'] = document.getElementById('pp_b_year').options[ document.getElementById('pp_b_year').selectedIndex ].value; + } + + if ( get_data_from_this_id != '' ) + { + final_fields['value'] = document.getElementById( get_data_from_this_id ).value; + } + + //----------------------------------------- + // Ajaxify mah bad self! + //----------------------------------------- + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj.readystate_ready_and_ok() ) + { + xmlobj.show_loading(); + return; + } + + xmlobj.hide_loading(); + + //---------------------------------- + // INIT + //---------------------------------- + + var html = xmlobj.xmlhandler.responseText; + + if ( html == 'nopermission' ) + { + alert( message_pop_up_lang['no_permission'] ); + + } + else if ( html != 'error' ) + { + switch( final_fields['cmd'] ) + { + case 'gender': + var _txt = document.getElementById( ips_personal_portal.div_names['pp-entry-gender-text'] ); + var _imgwrap = document.getElementById( ips_personal_portal.div_names['pp-entry-gender-imgwrap'] ); + var _date = new Date(); + var _src = ''; + + if ( html == 'male' ) + { + _src = ips_personal_portal.settings['img_base_url'] + '/' + ips_personal_portal.settings['img_gender_male'] + "?__=" + _date.getTime(); + _txt.innerHTML = ips_personal_portal.languages['gender_male']; + } + else if ( html == 'female' ) + { + _src = ips_personal_portal.settings['img_base_url'] + '/' + ips_personal_portal.settings['img_gender_female'] + "?__=" + _date.getTime(); + _txt.innerHTML = ips_personal_portal.languages['gender_female']; + } + else + { + _src = ips_personal_portal.settings['img_base_url'] + '/' + ips_personal_portal.settings['img_gender_mystery'] + "?__=" + _date.getTime(); + _txt.innerHTML = ips_personal_portal.languages['gender_mystery']; + } + + _imgwrap.innerHTML = ""; + + // Update gender icons... + ips_personal_portal.reload_comments(); + + ipsclass.fade_in_element( ips_personal_portal.div_names['pp-entry-gender-wrap'] ); + + break; + case 'contact': + if ( html == 'icqerror' ) + { + show_inline_messages_instant( 'pp_icq_error' ); + } + else + { + document.getElementById( ips_personal_portal.div_names['pp-entry-contact-entry'] + '-' + field_data['contacttype'] ).innerHTML = html; + + ipsclass.fade_in_element( ips_personal_portal.div_names['pp-entry-contact-wrap'] + '-' + field_data['contacttype'] ); + } + break; + case 'location': + document.getElementById( ips_personal_portal.div_names['pp-entry-location-text'] ).innerHTML = html; + + ipsclass.fade_in_element( ips_personal_portal.div_names['pp-entry-location-wrap'] ); + + break; + case 'birthdate': + + if ( html == 'dateerror' ) + { + show_inline_messages_instant( 'pp_date_error' ); + } + else + { + document.getElementById( ips_personal_portal.div_names['pp-entry-born-text'] ).innerHTML = html; + + var _dates = html.split('-'); + + if ( _dates[2] ) + { + var today = new Date(); + var _years = today.getFullYear(); + var _days = today.getDate(); + var _mos = today.getMonth() + 1; + var _age = _years - _dates[2]; + + _dates[0] = month[ _dates[0] ]; + + if ( _dates[0] > _mos ) + { + _age -= 1; + } + else if ( _dates[0] == _mos ) + { + if ( _dates[1] > _days ) + { + _age -= 1; + } + } + + document.getElementById( ips_personal_portal.div_names['pp-entry-age-text'] ).innerHTML = _age; + document.getElementById( ips_personal_portal.div_names['pp-entry-age-yearsold'] ).style.display = ''; + + ipsclass.fade_in_element( ips_personal_portal.div_names['pp-entry-age-wrap'] ); + } + else + { + document.getElementById( ips_personal_portal.div_names['pp-entry-age-text'] ).innerHTML = ips_personal_portal.languages['age_unknown']; + document.getElementById( ips_personal_portal.div_names['pp-entry-age-yearsold'] ).style.display = 'none'; + + ipsclass.fade_in_element( ips_personal_portal.div_names['pp-entry-age-wrap'] ); + document.getElementById( ips_personal_portal.div_names['pp-entry-born-pretext'] ).style.display = ''; + } + + ipsclass.fade_in_element( ips_personal_portal.div_names['pp-entry-born-wrap'] ); + } + } + } + }; + + //---------------------------------- + // LOAD XML + //---------------------------------- + + xmlobj = new ajax_request(); + xmlobj.onreadystatechange( do_request_function ); + var xmlreturn = xmlobj.process( url, 'POST', xmlobj.format_for_post(final_fields) ); + + return false; + }; + + /** + * On mouseover event + */ + this.tab_onclick = function( event ) + { + //------------------------------- + // No? Get one then + //------------------------------- + + var tabid = ipsclass.get_id_from_text( this.id ); + + // Stop scrolling to top of the page... + ipsclass.cancel_bubble( event ); + + //---------------------------------- + // Load tab + //---------------------------------- + + ips_personal_portal.tab_load( tabid ); + + return false; + }; + + /** + * On mouseover event + */ + this.tab_load = function( tabid ) + { + //------------------------------- + // Got it? + //------------------------------- + + for ( var i in ips_personal_portal.stored_tabs ) + { + if ( i == tabid ) + { + ips_personal_portal.stored_tabs[ i ].style.display = 'block'; + ips_personal_portal.stored_tabs[ i ].className = ips_personal_portal.css_classes['pp-tabon']; + } + else + { + ips_personal_portal.stored_tabs[ i ].style.display = 'block'; + + if ( ips_personal_portal.stored_tabs_css[ i ] == ips_personal_portal.css_classes['pp-tabshaded'] ) + { + ips_personal_portal.stored_tabs[ i ].className = ips_personal_portal.css_classes['pp-tabshaded']; + } + else + { + ips_personal_portal.stored_tabs[ i ].className = ips_personal_portal.css_classes['pp-taboff']; + } + } + } + + //---------------------------------- + // Load tab + //---------------------------------- + + ips_personal_portal.load_content_tab( tabid ); + + return false; + }; + + +} diff --git a/Development/javascript_uncompressed/jscripts/ips_text_editor.js b/Development/javascript_uncompressed/jscripts/ips_text_editor.js new file mode 100644 index 00000000..cfa16392 --- /dev/null +++ b/Development/javascript_uncompressed/jscripts/ips_text_editor.js @@ -0,0 +1,3794 @@ +//------------------------------------------------------------------------------ +// IPS Cross-Browser Global Text Editor Functions +//------------------------------------------------------------------------------ +// Supports all "v5" browsers (inc. Opera, Safari, etc) +// Used for non RTE applications. +// (c) 2005 Invision Power Services, Inc. +// http://www.invisionpower.com +//------------------------------------------------------------------------------ + +//----------------------------------------------------------- +// This setting makes hitting the enter key in IE turn into a +// newline (br tag) instead of the default action of using a +// paragraph tag. This causes the indent and list options not +// to work properly in IE, so do not enable this unless you +// don't care about those options. This functionality will be +// expanded upon in a future release, however this is not due +// to an issue with IPB, but rather due to how IE handles the +// javascript exec_command functions, and is beyond our control +// without a lot of javascript rewriting of those functions, +// specific to IE behaviors. +//----------------------------------------------------------- + +var ie_ptags_to_newlines = true; + +var IPS_editor = new Array(); + +//------------------------------- +// Define which buttons change +// when clicked +//------------------------------- + +var buttons_update = new Array( + "bold", + "italic", + "underline", + "justifyleft", + "justifycenter", + "justifyright", + "insertorderedlist", + "insertunorderedlist" +); + +var ips_primary_colors = new Array( + '#000000' , + '#A0522D' , + '#556B2F' , + '#006400' , + '#483D8B' , + '#000080' , + '#4B0082' , + '#2F4F4F' , + '#8B0000' , + '#FF8C00' , + '#808000' , + '#008000' , + '#008080' , + '#0000FF' , + '#708090' , + '#696969' , + '#FF0000' , + '#F4A460' , + '#9ACD32' , + '#2E8B57' , + '#48D1CC' , + '#4169E1' , + '#800080' , + '#808080' , + '#FF00FF' , + '#FFA500' , + '#FFFF00' , + '#00FF00' , + '#00FFFF' , + '#00BFFF' , + '#9932CC' , + '#C0C0C0' , + '#FFC0CB' , + '#F5DEB3' , + '#FFFACD' , + '#98FB98' , + '#AFEEEE' , + '#ADD8E6' , + '#DDA0DD' , + '#FFFFFF' +); + +//------------------------------- +// Define font faces +//------------------------------- + +var ips_primary_fonts = new Array( + "Arial", + "Arial Black", + "Arial Narrow", + "Book Antiqua", + "Century Gothic", + "Comic Sans MS", + "Courier New", + "Franklin Gothic Medium", + "Garamond", + "Georgia", + "Impact", + "Lucida Console", + "Lucida Sans Unicode", + "Microsoft Sans Serif", + "Palatino Linotype", + "Tahoma", + "Times New Roman", + "Trebuchet MS", + "Verdana" +); + +//------------------------------- +// Remap font sizes +//------------------------------- + +var ips_primary_sizes = new Array( + 1, + 2, + 3, + 4, + 5, + 6, + 7 +); + +//----------------------------------------- +// Insert Special Items +//----------------------------------------- + +var ips_format_items = +{ + 'cmd_subscript' : 'Sub-script', + 'cmd_superscript' : 'Super-script', + 'cmd_strikethrough' : 'Strikethrough' +}; + +//----------------------------------------- +// Special item images +//----------------------------------------- + +var ips_format_item_images = +{ + 'cmd_subscript' : 'rte-subscript.gif', + 'cmd_superscript' : 'rte-superscript.gif', + 'cmd_strikethrough' : 'rte-strike.gif' +}; + +//----------------------------------------- +// Language array +//----------------------------------------- + +ips_language_array = {}; + +/** +* Main function. +* Creates instance of an IPS editor +*/ +function ips_text_editor( editor_id, mode, use_bbcode, file_path, initial_text ) +{ + /** + * @var string Unique editor ID (allows multiple editors) + * @var INT Is Rich Text Mode (WYSIWYG) + * @var boolean Is initialized + * @var array Buttons to track + * @var array Fonts to track + * @var array Item State + * @var object Text Area object + * @var object Controls Bar + * @var object Font drop down object + * @var object Size drop down object + * @var object Special drop down object + * @var object Font format drop down object + * @var object Main bar object + * @var boolean Use IPS menus + * @var boolean Is Internet Explorer + * @var boolean Is Mozilla + * @var boolean Is Opera + * @var boolean Is Safari + * @var string RTE files path + * @var string Current font-face + * @var string Current font-size + * @var boolean Using BBCode inplace of HTML + * @var string Opening brace + * @var string Closing brace + * @var boolean Allow advanced options + * @var string IPS Editor Frame HTML + * @var array Array of pop-ups + * @var string Character set of page + * @var int Fix up IE

to
tags + * @var object Emoticon window ID + * @var int Editor is loading + * @var array Array of hidden objects + */ + this.editor_id = editor_id; + this.is_rte = mode; + this.initialized = false; + this.buttons = new Array(); + this.fonts = new Array(); + this.state = new Array(); + this.text_obj = document.getElementById( this.editor_id + '_textarea' ); + this.control_obj = document.getElementById( this.editor_id + '_controls' ); + this.font_obj = document.getElementById( this.editor_id + '_out_fontname' ); + this.size_obj = document.getElementById( this.editor_id + '_out_fontsize' ); + this.special_obj = document.getElementById( this.editor_id + '_out_special' ); + this.format_obj = document.getElementById( this.editor_id + '_out_format' ); + this.mainbar = document.getElementById( this.editor_id + '_main-bar'); + this.use_menus = ( typeof( ipsmenu ) == 'undefined' ? false : true ); + this.is_ie = is_ie; + this.is_moz = is_moz; + this.is_opera = is_opera; + this.is_safari = is_safari; + this.file_path = file_path ? file_path : global_rte_includes_url; + this.font_state = null; + this.size_state = null; + this.use_bbcode = use_bbcode; + this.open_brace = this.use_bbcode ? '[' : '<'; + this.close_brace = this.use_bbcode ? ']' : '>'; + this.allow_advanced = this.use_bbcode ? 0 : 1; + this.ips_frame_html = ''; + this.popups = new Array(); + this.char_set = global_rte_char_set ? global_rte_char_set : 'UTF-8'; + this.forum_fix_ie_newlines = 0; + this.emoticon_window_id = ''; + this.is_loading = 0; + this.hidden_objects = new Array(); + + /** + * History stuff + */ + this.history_pointer = -1; + this.history_recordings = new Array(); + /** + * HTML Toggle status + */ + this._showing_html = 0; + + /** + * IE Range cache. + * Prevents selection being lost when + * iframe / popup is loaded + */ + this._ie_cache = null; + + /** + * Current open bar object + */ + this.current_bar_object = null; + + /** + * Special items menu + */ + this.ips_special_items = + { + /*'cmd_loader_link' : new Array( ips_language_array['js_rte_link'] ? ips_language_array['js_rte_link'] : 'Insert Link...' , 'rte-hyperlink.png' ), + 'cmd_loader_unlink': new Array( ips_language_array['js_rte_unlink'] ? ips_language_array['js_rte_unlink'] : 'Unlink Text...' , 'rte-unlink.png', 'this.format_text( e, "unlink", false );' ), + 'cmd_loader_image' : new Array( ips_language_array['js_rte_image'] ? ips_language_array['js_rte_image'] : 'Insert Image...' , 'rte-image.png' ), + 'cmd_loader_email' : new Array( ips_language_array['js_rte_email'] ? ips_language_array['js_rte_email'] : 'Insert Email...' , 'rte-email.png' ), + 'cmd_loader_table' : new Array( ips_language_array['js_rte_table'] ? ips_language_array['js_rte_table'] : 'Insert Table...' , 'rte-table.png' ), + 'cmd_loader_div' : new Array( ips_language_array['js_rte_div'] ? ips_language_array['js_rte_div'] : 'Insert Div...' , 'rte-div.png' )*/ + }; + + /** + * Reset lang on format items menu + */ + ips_format_items['cmd_subscript'] = ips_language_array['js_rte_sub'] ? ips_language_array['js_rte_sub'] : 'Sub-script'; + ips_format_items['cmd_superscript'] = ips_language_array['js_rte_sup'] ? ips_language_array['js_rte_sup'] : 'Super-script'; + ips_format_items['cmd_strikethrough'] = ips_language_array['js_rte_strike'] ? ips_language_array['js_rte_strike'] : 'Strikethrough'; + ips_language_array['emos_show_all'] = ips_language_array['emos_show_all'] ? ips_language_array['emos_show_all'] : 'Show All'; + + /** + * INIT Text editor + */ + this.init = function() + { + if ( this.initialized ) + { + return; + } + + //----------------------------------------- + // Show control bar that's hidden for non-js + //----------------------------------------- + + this.control_obj.style.display = ''; + + //----------------------------------------- + // Reset WYSIWYG flag + //----------------------------------------- + + try + { + document.getElementById( this.editor_id + '_wysiwyg_used' ).value = parseInt(this.is_rte); + } + catch(err) { } + + //----------------------------------------- + // Get default frame HTML + //----------------------------------------- + + this.ips_frame_html = this.get_frame_html(); + + //----------------------------------------- + // Set editor up + //----------------------------------------- + + this.editor_set_content( initial_text ); + + //----------------------------------------- + // Set mouse events + //----------------------------------------- + + this.editor_set_functions(); + + //----------------------------------------- + // Set controls up + //----------------------------------------- + + this.editor_set_controls(); + + + this.initialized = true; + }; + + /** + * Returns frame HTML + * + * @return string Frame HTML + */ + this.get_frame_html = function() + { + var ips_frame_html = ""; + ips_frame_html += "\n"; + ips_frame_html += "\n"; + ips_frame_html += ""; + ips_frame_html += "\n"; + ips_frame_html += "\n"; + ips_frame_html += "\n"; + ips_frame_html += "{:content:}\n"; + ips_frame_html += "\n"; + ips_frame_html += ""; + + return ips_frame_html; + }; + + /** + * Refocus editor check + */ + this.editor_check_focus = function() + { + if ( ! this.editor_window.has_focus ) + { + if ( this.is_opera ) + { + this.editor_window.focus(); + } + + this.editor_window.focus(); + } + }; + + /** + * INIT control bar + * Goes through control bar images and sets up buttons + * and drop down menus, adds classnames and sets up + * onmouse events + */ + this.editor_set_controls = function() + { + var controls = new Array(); + var _c = 0; + + if ( ! this.control_obj ) + { + return; + } + + //----------------------------------------- + // Grab all buttons + // 2 step 'cos moz goes into infinite loop otherwise + //----------------------------------------- + + var items = this.control_obj.getElementsByTagName("DIV"); + + for ( var i = 0 ; i < items.length ; i++ ) + { + if ( ( items[i].className == 'rte-normal' || items[i].className == 'rte-menu-button' || items[i].className == 'rte-normal-menubutton' ) && items[i].id ) + { + controls[ controls.length ] = items[i].id; + } + } + + for ( var i = 0 ; i < controls.length ; i++ ) + { + var control = document.getElementById( controls[i] ); + + if ( control.className == 'rte-normal' ) + { + this.init_editor_button( control ); + } + else if ( control.className == 'rte-menu-button' || control.className == 'rte-normal-menubutton' ) + { + this.init_editor_popup_button( control ); + } + } + + ipsclass.set_unselectable( this.control_obj ); + }; + + /** + * INIT Popup Menu + * Dynamically builds up the context sensitive options + * + * @param object Button object + * + */ + this.init_editor_popup_button = function( obj ) + { + //----------------------------------------- + // Add to IPS Menu system + //----------------------------------------- + + if ( ! this.use_menus ) + { + return; + } + + ipsmenu.register( obj.id ); + + obj.cmd = obj.id.replace( new RegExp( '^' + this.editor_id + '_popup_(.+?)$' ), '$1' ); + obj.editor_id = this.editor_id; + obj.state = false; + + //----------------------------------------- + // Add to buttons array + //----------------------------------------- + + this.buttons[ obj.cmd ] = obj; + + //----------------------------------------- + // Set Up Popup button display + //----------------------------------------- + + if (obj.cmd == 'fontname') + { + this.fontout = this.font_obj; + this.fontout.innerHTML = obj.title; + this.fontoptions = {'' : this.fontout}; + + for (var option in ips_primary_fonts) + { + var div = document.createElement('div'); + div.id = this.editor_id + '_fontoption_' + ips_primary_fonts[option]; + div.style.width = this.fontout.style.width; + div.style.display = 'none'; + div.innerHTML = ips_primary_fonts[option]; + this.fontoptions[ips_primary_fonts[option]] = this.fontout.parentNode.appendChild(div); + } + } + else if (obj.cmd == 'fontsize') + { + this.sizeout = this.size_obj; + this.sizeout.innerHTML = obj.title; + this.sizeoptions = {'' : this.sizeout}; + + for (var option in ips_primary_sizes) + { + var div = document.createElement('div'); + div.id = this.editor_id + '_sizeoption_' + ips_primary_sizes[option]; + div.style.width = this.sizeout.style.width; + div.style.display = 'none'; + div.innerHTML = ips_primary_sizes[option]; + this.sizeoptions[ips_primary_sizes[option]] = this.sizeout.parentNode.appendChild(div); + } + } + + obj._onmouseover = obj.onmouseover; + obj._onclick = obj.onclick; + obj.onmouseover = obj.onmouseout = obj.onclick = ips_editor_events.prototype.popup_button_onmouseevent; + + ipsmenu.menu_registered[obj.id]._open = ipsmenu.menu_registered[obj.id].open; + ipsmenu.menu_registered[obj.id].open = ips_editor_events.prototype.popup_button_show; + }; + + + /** + * Dynamically builds the HTML for the IPS Menu system + * + * @var object Javascript object clicked + */ + this.init_editor_menu = function( obj ) + { + //----------------------------------------- + // Create menu wrapper + //----------------------------------------- + + var menu = document.createElement('div'); + + menu.id = this.editor_id + '_popup_' + obj.cmd + '_menu'; + menu.className = 'rte-popupmenu'; + menu.style.display = 'none'; + menu.style.cursor = 'default'; + menu.style.padding = '3px'; + menu.style.width = 'auto'; + menu.style.height = 'auto'; + menu.style.overflow = 'hidden'; + + //----------------------------------------- + // What are we doing? + //----------------------------------------- + + switch( obj.cmd ) + { + case 'fontsize': + for( var i in ips_primary_sizes ) + { + if ( typeof( ips_primary_sizes[i] ) == 'function' ) + { + continue; + } + + var option = document.createElement('div'); + + option.style.paddingTop = ips_primary_sizes[ i ]*2 + 'px'; + option.style.paddingBottom = ips_primary_sizes[ i ]*2 + 'px'; + + option.innerHTML = '' + ips_primary_sizes[ i ] + ''; + option.className = 'rte-menu-size'; + option.title = ips_primary_sizes[ i ]; + option.cmd = obj.cmd; + option.editor_id = this.editor_id; + option.onmouseover = option.onmouseout = option.onmouseup = option.onmousedown = ips_editor_events.prototype.menu_option_onmouseevent; + option.onclick = ips_editor_events.prototype.font_format_option_onclick; + + menu.style.width = this.size_obj.style.width; + + menu.appendChild(option); + } + break; + + case 'fontname': + for( var i in ips_primary_fonts ) + { + if ( typeof( ips_primary_fonts[i] ) == 'function' ) + { + continue; + } + + var option = document.createElement('div'); + option.innerHTML = '' + ips_primary_fonts[ i ] + ''; + option.className = 'rte-menu-face'; + option.title = ips_primary_fonts[ i ]; + option.cmd = obj.cmd; + option.editor_id = this.editor_id; + option.onmouseover = option.onmouseout = option.onmouseup = option.onmousedown = ips_editor_events.prototype.menu_option_onmouseevent; + option.onclick = ips_editor_events.prototype.font_format_option_onclick; + + menu.style.width = this.font_obj.style.width; + menu.appendChild(option); + } + break; + + case 'special': + for( var i in this.ips_special_items ) + { + if ( typeof( this.ips_special_items[i] ) == 'function' ) + { + continue; + } + + var option = document.createElement('div'); + var img = ( typeof this.ips_special_items[i][1] != 'undefined' ) ? ' ' : ''; + option.innerHTML = img + this.ips_special_items[i][0]; + option.className = 'rte-menu-face'; + option.cmd = 'module_load', + option.loader_key = i.replace( 'cmd_loader_', '' ); + option.editor_id = this.editor_id; + option.onmouseover = option.onclick = option.onmouseout = option.onmouseup = option.onmousedown = ips_editor_events.prototype.special_onmouse_event; + + menu.style.width = this.special_obj.style.width; + menu.appendChild(option); + } + break; + case 'format': + for( var i in ips_format_items ) + { + if ( typeof( ips_format_items[i] ) == 'function' ) + { + continue; + } + + var option = document.createElement('div'); + var img = ( typeof ips_format_item_images[i] != 'undefined' ) ? ' ' : ''; + option.innerHTML = img + ips_format_items[i]; + option.className = 'rte-menu-face'; + option.cmd = i.replace( 'cmd_', '' ); + option.editor_id = this.editor_id; + option.onmouseover = option.onclick = option.onmouseout = option.onmouseup = option.onmousedown = ips_editor_events.prototype.special_onmouse_event; + + menu.style.width = '130px'; + menu.appendChild(option); + } + break; + + case 'emoticons': + var table = document.createElement('table'); + table.cellPadding = 0; + table.cellSpacing = 0; + table.border = 0; + //table.width = 'auto'; + + if ( this.is_ie ) + { + table.style.paddingRight = '15px'; // Scrollbar fun + } + + var i = 0; + var perrow = 3; + + var tr = table.insertRow(-1); + var td = tr.insertCell(-1); + td.colSpan = perrow; + td.align = 'center'; + td.cellPadding = 0; + td.innerHTML = '

'; + + for( var emo in ips_smilie_items ) + { + if ( i % perrow == 0 ) + { + var tr = table.insertRow(-1); + } + + i++; + + var div = document.createElement('div'); + var _tmp = ips_smilie_items[ emo ].split( "," ); + var img = ' '; + div.innerHTML = img; + + var option = tr.insertCell(-1); + option.className = 'rte-menu-emo'; + option.appendChild(div); + + option.cmd = obj.cmd; + option.editor_id = this.editor_id; + option.id = this.editor_id + '_emoticon_' + _tmp[0]; + option.emo_id = _tmp[0]; + option.emo_image = _tmp[1]; + option.emo_code = emo; + option.onmouseover = option.onmouseout = option.onmouseup = option.onmousedown = ips_editor_events.prototype.menu_option_onmouseevent; + option.onclick = ips_editor_events.prototype.emoticon_onclick; + } + + if ( i > 0 ) + { + menu.style.width = 'auto'; + + if( this.is_ie ) + { + menu.style.paddingRight = '15px'; // Scrollbar fun + } + + menu.style.height = '200px'; + menu.style.overflow = 'auto'; + menu.style.overflowX = 'hidden'; + menu.appendChild(table); + break; + } + else + { + // No emo's, but show the 'show all' link + menu.style.width = 'auto'; + menu.style.height = '40px'; + menu.style.overflow = 'auto'; + menu.appendChild(table); + break; + + // document.getElementById( this.editor_id + '_popup_' + obj.cmd ).style.display = 'hidden'; + // document.getElementById( this.editor_id + '_popup_' + obj.cmd + '_menu' ).style.display = 'hidden'; + } + + case 'forecolor': + case 'backcolor': + var table = document.createElement('table'); + table.cellPadding = 0; + table.cellSpacing = 0; + table.border = 0; + var i = 0; + + for ( var hex in ips_primary_colors ) + { + if ( typeof( ips_primary_colors[hex] ) == 'function' ) + { + continue; + } + + if ( i % 8 == 0 ) + { + var tr = table.insertRow(-1); + } + + i++; + + var div = document.createElement('div'); + div.style.backgroundColor = ips_primary_colors[hex]; + div.innerHTML = ' '; + var option = tr.insertCell(-1); + option.className = 'rte-menu-color'; + option.appendChild(div); + + option.cmd = obj.cmd; + option.editor_id = this.editor_id; + option.colorname = ips_primary_colors[hex]; + option.id = this.editor_id + '_color_' + ips_primary_colors[hex]; + option.onmouseover = option.onmouseout = option.onmouseup = option.onmousedown = ips_editor_events.prototype.menu_option_onmouseevent; + option.onclick = ips_editor_events.prototype.color_cell_onclick; + } + + menu.style.overflow = 'visible'; + menu.appendChild(table); + break; + } + + this.popups[ obj.cmd ] = this.control_obj.appendChild(menu); + + ipsclass.set_unselectable( menu ); + }; + + /** + * INIT Editor Button + * Initialize an editor button (bold, italic, etc) + * + * @param object Button DIV object + */ + this.init_editor_button = function( obj ) + { + obj.cmd = obj.id.replace( new RegExp( '^' + this.editor_id + '_cmd_(.+?)$' ), '$1' ); + obj.editor_id = this.editor_id; + + //----------------------------------------- + // Add to buttons array + //----------------------------------------- + + this.buttons[ obj.cmd ] = obj; + + //----------------------------------------- + // Set up defaults + //----------------------------------------- + + obj.state = false; + obj.mode = 'normal'; + obj.real_type = 'button'; + + obj.onclick = ips_editor_events.prototype.button_onmouse_event; + obj.onmousedown = ips_editor_events.prototype.button_onmouse_event; + obj.onmouseover = ips_editor_events.prototype.button_onmouse_event; + obj.onmouseout = ips_editor_events.prototype.button_onmouse_event; + }; + + /** + * Toggle menu context + * Toggles the menu's class for mouseover, select, etc + * + * @param object Menu object + * @param object state + */ + this.set_menu_context = function(obj, state) + { + //----------------------------------------- + // Show HTML? Return... + //----------------------------------------- + + if ( this._showing_html ) + { + return false; + } + + switch (obj.state) + { + case true: + { + this.editor_set_ctl_style(obj, 'menubutton', 'down'); + break; + } + + default: + { + switch (state) + { + case 'mouseout': + { + this.editor_set_ctl_style(obj, 'menubutton', 'normal'); + break; + } + case 'mousedown': + { + this.editor_set_ctl_style(obj, 'menubutton', 'down'); + break; + } + case 'mouseup': + case 'mouseover': + { + this.editor_set_ctl_style(obj, 'menubutton', 'hover'); + break; + } + } + } + } + }; + + /** + * Toggle button context + * Toggles the menu's class for mouseover, select, etc + * + * @param object menu object + * @param object state + * @param object type + */ + this.set_button_context = function(obj, state, type) + { + //----------------------------------------- + // Showing HTML? + //----------------------------------------- + + if ( this._showing_html ) + { + return false; + } + + if (typeof type == 'undefined') + { + type = 'button'; + } + + if ( state == 'mousedown' && ( obj.cmd == 'undo' || obj.cmd == 'redo' ) ) + { + return false; + } + + switch (obj.state) + { + case true: + { + switch (state) + { + case 'mouseout': + { + this.editor_set_ctl_style(obj, 'button', 'selected'); + break; + } + case 'mouseover': + case 'mousedown': + case 'mouseup': + { + this.editor_set_ctl_style(obj, type, 'down'); + break; + } + } + break; + } + default: + { + switch (state) + { + case 'mouseout': + { + this.editor_set_ctl_style(obj, type, 'normal'); + break; + } + case 'mousedown': + { + this.editor_set_ctl_style(obj, type, 'down'); + break; + } + case 'mouseover': + case 'mouseup': + { + this.editor_set_ctl_style(obj, type, 'hover'); + break; + } + } + break; + } + } + }; + + /** + * Sets the editor button control style + * + * @var object Button Object + * @var string Control Type + * @var string Control Mode + */ + this.editor_set_ctl_style = function( obj, type, mode ) + { + if ( obj.mode != mode ) + { + //----------------------------------------- + // Add in -menu class + //----------------------------------------- + + var extra = ''; + + if ( type == 'menu' ) + { + extra = '-menu'; + } + else if ( type == 'menubutton' ) + { + extra = '-menubutton'; + } + + //----------------------------------------- + // Add in -color if it's a color box + //----------------------------------------- + + extra += obj.colorname ? '-color' : ''; + + //----------------------------------------- + // Add in -emo if it's an emo + //----------------------------------------- + + extra += obj.emo_id ? '-emo' : ''; + + //----------------------------------------- + // Set mote... + //----------------------------------------- + + obj.mode = mode; + + try + { + switch (mode) + { + case "normal": + { + // Normal + obj.className = 'rte-normal' + extra; + } + break; + + case "hover": + { + // Hover + obj.className = 'rte-hover' + extra; + } + break; + + case "selected": + case "down": + { + // On + obj.className = 'rte-selected' + extra; + } + break; + } + } + catch (e) + { + } + } + }; + + /** + * Format Text + * + * @var event Event Object + * @var string Formatted command + * @var string Formatting command extra + */ + this.format_text = function(e, command, arg) + { + e = ipsclass.cancel_bubble( e, true ); + + //----------------------------------------- + // Special considerations... + //----------------------------------------- + + if ( command.match( /resize_/ ) ) + { + this.resize_editorbox( command.replace( /resize_(up|down)/, "$1" ) ); + } + + //----------------------------------------- + // Switch editor... + //----------------------------------------- + + if ( command.match( /switcheditor/i ) ) + { + switch_editor_mode( this.editor_id ); + } + + //----------------------------------------- + // Manually recording history? + //----------------------------------------- + + if ( ! this.is_rte ) + { + if ( command != 'redo' ) + { + this.history_record_state( this.editor_get_contents() ); + } + } + + //----------------------------------------- + // Continue... + //----------------------------------------- + + this.editor_check_focus(); + + if ( this[ command ] ) + { + var return_val = this[ command ](e); + } + else + { + try + { + var return_val = this.apply_formatting( command, false, (typeof arg == 'undefined' ? true : arg) ); + } + catch(e) + { + var return_val = false; + } + } + + //----------------------------------------- + // Manually recording history? + //----------------------------------------- + + if ( ! this.is_rte ) + { + if ( command != 'undo' ) + { + this.history_record_state( this.editor_get_contents() ); + } + } + + //----------------------------------------- + // Set context + //----------------------------------------- + + this.set_context(command); + + //----------------------------------------- + // Check focus + //----------------------------------------- + + this.editor_check_focus(); + + return return_val; + }; + + /** + * Check spelling + */ + this.spellcheck = function() + { + if ( this.is_moz || this.is_opera ) + { + return false; + } + try + { + if ( this.rte_mode ) + { + var tmpis = new ActiveXObject("ieSpell.ieSpellExtension").CheckDocumentNode( this.editor_document ); + } + else + { + var tmpis = new ActiveXObject("ieSpell.ieSpellExtension").CheckAllLinkedDocuments( this.editor_document ); + } + } + catch( exception ) + { + if ( exception.number == -2146827859 ) + { + if ( confirm( ips_language_array['js_rte_erroriespell'] ? ips_language_array['js_rte_erroriespell'] : "ieSpell not detected. Click Ok to go to download page." ) ) + { + window.open("http://www.iespell.com/download.php", "DownLoad"); + } + } + else + { + alert( ips_language_array['js_rte_errorliespell'] ? ips_language_array['js_rte_errorliespell'] : "Error Loading ieSpell: Exception " + exception.number); + } + } + }; + + /** + * Removes items that you don't wish to have + * @param string Command key + */ + this.module_remove_item = function( key ) + { + //----------------------------------------- + // Remove... + //----------------------------------------- + + var tmp = this.ips_special_items; + + this.ips_special_items = new Array(); + + for( var i in tmp ) + { + if ( i != 'cmd_loader_' + key ) + { + this.ips_special_items[ i ] = tmp[i]; + } + } + }; + + /** + * Add to special items array + * @param string Command key + * @param string Menu text + * @param string Menu Image + * @param string Javascript code to eval (Optional) + */ + this.module_add_item = function( key, text, image, evalcode ) + { + //----------------------------------------- + // Add... + //----------------------------------------- + + this.ips_special_items[ 'cmd_loader_' + key ] = new Array( text, image, evalcode ); + }; + + /** + * Load module + * @param object Object + * @param object Mouse event + * @param string Loader function + */ + this.module_load = function( obj, e, loader_key ) + { + if ( ! loader_key ) + { + return false; + } + + e = ipsclass.cancel_bubble( e, true ); + + this.editor_check_focus(); + + this.preserve_ie_range(); + + menu_action_close(); + + //----------------------------------------- + // Extra args? + //----------------------------------------- + + var _m = loader_key.match( /\{(.+?)\}$/ ); + var _args = ''; + + try + { + if ( _m[1] ) + { + _args = _m[1]; + } + } + catch(internetexplorer) + { + + } + + //----------------------------------------- + // Eval or show in control bar? + //----------------------------------------- + + if ( typeof this.ips_special_items[ 'cmd_loader_' + loader_key ][2] != "undefined" ) + { + eval( this.ips_special_items[ 'cmd_loader_' + loader_key ][2] ); + return false + } + else + { + this.module_show_control_bar( loader_key, _args ); + } + }; + + /** + * Show new control bar + * + * @param type Type of control bar (must be same as function key) + */ + this.module_show_control_bar = function( type, _args ) + { + if ( ! this.control_obj ) + { + return; + } + + type = type.replace( /(\{.+?\})$/, '' ); + _args = ( typeof( _args ) != 'undefined' ) ? _args : ''; + + //----------------------------------------- + // Already open? Kill it + //----------------------------------------- + + if ( this.current_bar_object ) + { + this.module_remove_control_bar(); + } + + //----------------------------------------- + // Spawn new DIV object + //----------------------------------------- + + var newdiv = document.createElement('div'); + + newdiv.id = this.editor_id + '_htmlblock_' + type + '_menu'; + newdiv.style.display = ''; + newdiv.className = 'rte-buttonbar'; + newdiv.style.zIndex = parseInt( this.control_obj.style.zIndex ) + 1; + newdiv.style.position = 'absolute'; + newdiv.style.width = '320px'; + newdiv.style.height = '400px'; + newdiv.style.top = ipsclass.get_obj_toppos( this.mainbar ) + 'px'; + + var _left = ipsclass.get_obj_leftpos( this.mainbar ) - ( parseInt(newdiv.style.width) + 10 ); + + if ( _left < 1 ) + { + _left = ipsclass.get_obj_leftpos( this.mainbar ); + } + + newdiv.style.left = ipsclass.get_obj_leftpos( this.mainbar ) - ( parseInt(newdiv.style.width) + 10 ) + 'px'; + newdiv.style.left = _left + 'px'; + + var tmpheight = parseInt(newdiv.style.height) - 16; + newdiv.innerHTML = this.module_wrap_html_panel( "" ); + + //----------------------------------------- + // Add and show + //----------------------------------------- + + this.mainbar.appendChild(newdiv); + + if ( is_ie ) + { + document.getElementById( this.editor_id + '_iframeblock_' + type + '_menu' ).style.backgroundColor = 'transparent'; + document.getElementById( this.editor_id + '_iframeblock_' + type + '_menu' ).allowTransparency = true; + } + + ipsclass.set_unselectable( newdiv ); + + //----------------------------------------- + // INIT Drag + //----------------------------------------- + + Drag.init( document.getElementById( this.editor_id + '_pallete-handle' ), newdiv ); + + this.current_bar_object = newdiv; + }; + + /** + * Remove control bar + * Removes the control bar. + */ + this.module_remove_control_bar = function() + { + if ( ! this.current_bar_object ) + { + return; + } + + //----------------------------------------- + // Kill old bar + //----------------------------------------- + + this.mainbar.removeChild( this.current_bar_object ); + + //----------------------------------------- + // Reset bar object + //----------------------------------------- + + this.current_bar_object = null; + }; + + /** + * Wrap HTML block with basic control panel stuff + */ + this.module_wrap_html_panel = function( html ) + { + var newhtml = ""; + newhtml += "
"; + newhtml += "
"; + newhtml += "
"; + newhtml += "
"; + newhtml += "
"; + newhtml += "
" + html + "
"; + newhtml += "
"; + newhtml += "
"; + + return newhtml; + }; + + /** + * Resize editor + * + * @param string Up (smaller) Down (Larger) + */ + + this.resize_editorbox = function( direction ) + { + var inc_value = 100; + var current_height = parseInt( this.editor_box.style.height ); + var new_height = 0; + current_height = current_height ? current_height : 300; + + //----------------------------------------- + // If we're not going smaller than 300... + //----------------------------------------- + + if ( current_height >= 50 ) + { + if ( direction == 'up' ) + { + new_height = current_height - inc_value; + } + else + { + new_height = current_height + inc_value; + } + + if ( new_height > 249 ) + { + this.editor_box.style.height = new_height + 'px'; + + ipsclass.my_setcookie( 'ips_rte_height', new_height, 1 ); + } + } + }; + + /** + * Make HTML entities safe + * @param string Raw HTML + * @return string Treated HTML + */ + this.htmlspecialchars = function( html ) + { + html = html.replace(/&/g, "&"); + html = html.replace(/"/g, """); + html = html.replace(//g, ">"); + + return html; + }; + + /** + * Make HTML entities unsafe + * @param string Raw HTML + * @return string Treated HTML + */ + this.unhtmlspecialchars = function( html ) + { + html = html.replace( /"/g, '"' ); + html = html.replace( /</g , '<' ); + html = html.replace( />/g , '>' ); + html = html.replace( /&/g , '&' ); + + return html; + }; + + /** + * Remove HTML tags. Ugly. + * @param string Raw HTML + * @return string Treated HTML + */ + this.strip_html = function( html ) + { + html = html.replace( /<\/?([^>]+?)>/ig, ""); + return html; + }; + + /** + * Remove empty HTML tags. Ugly. + * @param string Raw HTML + * @return string Treated HTML + */ + this.strip_empty_html = function( html ) + { + html = html.replace( '<([^>]+?)>]+?)>', ""); + return html; + }; + + /** + * Format HTML a bit nicely + */ + this.clean_html = function( t ) + { + if ( t == "" || typeof t == 'undefined' ) + { + return t; + } + + //------------------------------- + // Sort out BR tags + //------------------------------- + + t = t.replace( /
/ig, "
"); + + //------------------------------- + // Remove empty

tags + //------------------------------- + + t = t.replace( /

(\s+?)?<\/p>/ig, ""); + + //------------------------------- + // HR issues + //------------------------------- + + t = t.replace( /


<\/p>/ig , "
"); + t = t.replace( /

 <\/p>


 <\/p>/ig, "


"); + + //------------------------------- + // Attempt to fix some formatting + // issues.... + //------------------------------- + + t = t.replace( /<(p|div)([^&]*)>/ig , "\n<$1$2>\n" ); + t = t.replace( /<\/(p|div)([^&]*)>/ig , "\n\n"); + t = t.replace( /
(?!<\/td)/ig , "
\n" ); + + //------------------------------- + // And some table issues... + //------------------------------- + + t = t.replace( /<\/(td|tr|tbody|table)>/ig , "\n"); + t = t.replace( /<(tr|tbody|table(.+?)?)>/ig , "<$1>\n" ); + t = t.replace( /<(td(.+?)?)>/ig , "\t<$1>" ); + + //------------------------------- + // Newlines + //------------------------------- + + t = t.replace( /

 <\/p>/ig , "
"); + t = t.replace( /
/ig , "
\n"); + t = t.replace( /
/ig , "
\n"); + + t = t.replace( /
\n<\/td>/ig , "
" ); + + //----------------------------------------- + // Script tags + //----------------------------------------- + + t = t.replace( /", "i" ) ) ) + { + i++; + + if ( i >= max_iteration ) + { + break; + } + else + { + text_blocks[ text_blocks.length ] = _match[1]; + source_code = source_code.replace( _match[0], '' ); + } + } + + try + { + if ( text_blocks.length ) + { + for ( i = 0 ; i < text_blocks.length ; i++ ) + { + eval( text_blocks[ i ] ); + } + } + } + catch(error) + { + } +}; + +/*--------------------------------------------*/ +// IPB thinks we can use fancy JS, lets see... +/*--------------------------------------------*/ + +try +{ + if ( use_enhanced_js ) + { + use_enhanced_js = ajax_request.prototype.xml_init() ? 1 : 0; + } +} +catch(error) +{ + var use_enhanced_js = 0; +} \ No newline at end of file diff --git a/Development/javascript_uncompressed/skin_acp/clientscripts/index.html b/Development/javascript_uncompressed/skin_acp/clientscripts/index.html new file mode 100644 index 00000000..b49fc27d --- /dev/null +++ b/Development/javascript_uncompressed/skin_acp/clientscripts/index.html @@ -0,0 +1 @@ + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/Development/javascript_uncompressed/skin_acp/clientscripts/ipd_cell_select.js b/Development/javascript_uncompressed/skin_acp/clientscripts/ipd_cell_select.js new file mode 100644 index 00000000..3b2a9603 --- /dev/null +++ b/Development/javascript_uncompressed/skin_acp/clientscripts/ipd_cell_select.js @@ -0,0 +1,311 @@ +//------------------------------------------------------------------------------ +// IPS JS: Cell select +// (c) 2005 Invision Power Services, Inc. +// http://www.invisionpower.com +// Matt Mecham (29/11/05) +//------------------------------------------------------------------------------ + +var _cell_select; + +/*-------------------------------------------------------------------------*/ +// Initiate object +/*-------------------------------------------------------------------------*/ + +function cell_select() +{ + /** + * CSS: Table cell row OFF + * + * @var INT + */ + this.css_row_off = 'tablerow1'; + + /** + * CSS: Table cell row ON + * + * @var string + */ + this.css_row_on = 'tablerow2selected'; + + /** + * String: TR row ID part + * + * @var string + */ + this.row_tr_id = 'arow'; + + /** + * String: Checkbox ID part + * + * @var string + */ + this.row_checkbox_id = 'acid'; + + /** + * String: ID name of toggle all box + * + * @var string + */ + this.toggle_all_name = 'cellselect-cball'; + + /** + * String: ID of toggle all box + * + * @var object + */ + this.toggle_all_id = ''; + + /** + * String: Flag to see if we have a toggle all box + * + * @var object + */ + this.toggle_all_flag = 0; + + /** + * Array: Selected IDs array + * + * @var array + */ + this.selected_ids = new Array(); + + /** + * Array: Total possible cbs + * + * @var array + */ + this.total_ids = 0; + + /** + * Store CSS rows for the original row + */ + this.store_css_row = new Array(); +}; + +/*-------------------------------------------------------------------------*/ +// Initiate object +/*-------------------------------------------------------------------------*/ + +cell_select.prototype.init = function() +{ + //---------------------------------- + // Check for toggle all box + //---------------------------------- + + try + { + this.toggle_all_id = document.getElementById( this.toggle_all_name ); + this.toggle_all_flag = 1; + this.toggle_all_id.checked = false; + } + catch(error) + { + this.toggle_all_flag = 0; + } + + //---------------------------------- + // Check checked boxes + //---------------------------------- + + var checkboxes = document.getElementsByTagName('INPUT'); + + _cell_select = this; + + //---------------------------------- + // Sort through and grab links + //---------------------------------- + + for ( var i = 0 ; i < checkboxes.length ; i++ ) + { + try + { + if ( ! checkboxes[i].id ) + { + continue; + } + + if ( checkboxes[i].getAttribute('type') != 'checkbox' ) + { + continue; + } + } + catch(error) + { + continue; + } + + var cbid = checkboxes[i].id; + var cbname = cbid.replace( /^(.*)-(\d+)$/, "$1" ); + var cbnum = this.get_id_from_text( checkboxes[i].id ); + + //---------------------------------- + // Work with it? + //---------------------------------- + + if ( cbname == this.row_checkbox_id ) + { + if ( checkboxes[i].getAttribute('checked') || checkboxes[i].checked ) + { + this.row_change_color( cbnum ); + this.selected_ids[ cbnum ] = 1; + this.total_ids++; + } + else + { + this.selected_ids[ cbnum ] = 0; + this.total_ids++; + } + } + } +}; + +/*-------------------------------------------------------------------------*/ +// Toggle all row has been clicked +/*-------------------------------------------------------------------------*/ + +cell_select.prototype.row_toggle_all = function() +{ + //---------------------------------- + // Using a toggle all? + //---------------------------------- + + if ( ! this.toggle_all_flag ) + { + return; + } + + //---------------------------------- + // Grab initial state + //---------------------------------- + + var checkstate = this.toggle_all_id.checked; + + //---------------------------------- + // Spread the love + //---------------------------------- + + var checkboxes = document.getElementsByTagName('INPUT'); + + //---------------------------------- + // Sort through and grab links + //---------------------------------- + + for ( var i = 0 ; i < checkboxes.length ; i++ ) + { + try + { + if ( ! checkboxes[i].id ) + { + continue; + } + + if ( checkboxes[i].getAttribute('type') != 'checkbox' ) + { + continue; + } + } + catch(error) + { + continue; + } + + var cbid = checkboxes[i].id; + var cbname = cbid.replace( /^(.*)-(\d+)$/, "$1" ); + var cbnum = this.get_id_from_text( checkboxes[i].id ); + + //---------------------------------- + // Work with it? + //---------------------------------- + + if ( cbname == this.row_checkbox_id ) + { + checkboxes[i].checked = checkstate; + this.selected_ids[ cbnum ] = checkstate ? 0 : 1; + this.row_change_color( cbnum ); + this.selected_ids[ cbnum ] = checkstate ? 1 : 0; + } + } +}; + +/*-------------------------------------------------------------------------*/ +// A row has been clicked +/*-------------------------------------------------------------------------*/ + +cell_select.prototype.row_clicked = function( row_id ) +{ + //---------------------------------- + // Change color + //---------------------------------- + + this.row_change_color( row_id ); + + //---------------------------------- + // Reset flag + //---------------------------------- + + this.selected_ids[ row_id ] = ( this.selected_ids[ row_id ] ) ? 0 : 1; + + //---------------------------------- + // Test toggle all box + //---------------------------------- + + if ( this.toggle_all_flag ) + { + var c = 0; + + for( var i in this.selected_ids ) + { + if ( this.selected_ids[i] ) + { + c++; + } + } + + //---------------------------------- + // Number of 'on' not equal to total? + //---------------------------------- + + if ( c != this.total_ids ) + { + this.toggle_all_id.checked = false; + } + else + { + this.toggle_all_id.checked = true; + } + } +}; + +/*-------------------------------------------------------------------------*/ +// Change color +/*-------------------------------------------------------------------------*/ + +cell_select.prototype.row_change_color = function( row_id ) +{ + //---------------------------------- + // Get Row TDs... + //---------------------------------- + + var tds = document.getElementById( this.row_tr_id + '-' + row_id ).getElementsByTagName('TD'); + + //---------------------------------- + // Sort through and grab links + //---------------------------------- + + var _cell = ( this.store_css_row[ row_id ] ) ? this.store_css_row[ row_id ] : this.css_row_off; + + for ( var i = 0 ; i < tds.length ; i++ ) + { + tds[i].className = ( this.selected_ids[ row_id ] ) ? _cell : this.css_row_on; + } +}; + + +/*-------------------------------------------------------------------------*/ +// Grab ID from string +/*-------------------------------------------------------------------------*/ + +cell_select.prototype.get_id_from_text = function( id ) +{ + return id.replace( /.*(?:\-|_)(\d+)/, "$1" ); +}; \ No newline at end of file diff --git a/Development/javascript_uncompressed/skin_acp/clientscripts/ipd_dragmove.js b/Development/javascript_uncompressed/skin_acp/clientscripts/ipd_dragmove.js new file mode 100644 index 00000000..ea2f2251 --- /dev/null +++ b/Development/javascript_uncompressed/skin_acp/clientscripts/ipd_dragmove.js @@ -0,0 +1,910 @@ +//------------------------------------------------------------------------------ +// IPS JS: Drag Move +// (c) 2005 Invision Power Services, Inc. +// http://www.invisionpower.com +// Matt Mecham (27/07/05) +//------------------------------------------------------------------------------ + +var drag_move = new dragmove(); + +/*-------------------------------------------------------------------------*/ +// Initiate object +/*-------------------------------------------------------------------------*/ + +function dragmove() +{ + /* + * Portion of ID name without "-{id}" for + * drag handles (object which initiates drag) + * + * @var string + */ + this.var_drag_handle_id_text = null; + + /* + * URL to redirect to after change + * + * @var string + */ + this.var_bounce_url = null; + + /* + * Portion of ID name without "-{id}" for + * hidden drag elements. These are HTML + * blobs which actually get made visible + * and are dragged. + * + * @var string + */ + this.var_drag_draggable_id_text = null; + + /* + * Portion of ID name without "-{id}" for + * drag objects (the actual drag container) + * + * @var string + */ + this.var_drag_object_id_text = null; + + /* + * Portion of ID name for the + * row which is altered when the drag is + * started AND a TARGET copy is created + * over it when dragging started + * + * @var string + */ + this.var_original_row_text = null; + + /* + * Current dragged ID + * + * @var integer + */ + this.current_id = null; + + /* + * Drag in progress + * + * @var integer + */ + this._drag_in_progress = null; + + /** + * Target IDs (Populated in DHTML) + * Must be in the format as follows: + * + * + * @var array + */ + this.var_target_ids = new Array(); + + /** + * Parent IDs (Populated in DHTML) + * Must be in the format as follows: + * + * + * @var array + */ + this.var_parent_ids = new Array(); + + /** + * Process parent IDs? + * Turn off to not restrict actions + * based on parents + * + * @var boolean + */ + this.var_parent_process = 1; + + /* + * CSS classname of layer that is + * drawn above the row when a move + * is started + * + * @var string + */ + this.var_hide_row_classname = 'dragmove-hide'; + + /* + * CSS classname of target mouseover + * + * @var string + */ + this.var_target_over_classname = 'tablerow3'; + + /* + * CSS classname of target mouseout + * + * @var string + */ + this.var_target_out_classname = 'tablerow2'; + + /* + * ID of target over + * set by mouseover. cleared by mouseout + * + * @var string + */ + this.var_target_over_id = null; + + /* + * URL of Ajax request + * + * @var string + */ + this.var_ajax_url = null; + + /* + * Array of FAKE TARGETS + * + * @var array + */ + this._TARGETS = new Array(); + + /* + * Array of FAKE TARGETS DImensions + * + * @var array + */ + this.dims = new Array(); + + /* + * Array of unmoveable objects + * + * @var array + */ + this.UNMOVEABLES = new Array(); + + /* + * ID of "Unmoveable" alert object + * + * @var array + */ + this.UNMOVEABLES_id = 'dragmove-unmoveable'; + + /* + * Array of ALL parent ids for a certain ID + * Traversing up the parent tree + * + * var @array + */ + this.parent_id_tree = new Array(); + + /* + * Array of ALL children ids for a certain ID + * Traversing up the parent tree + * + * var @array + */ + this.child_id_tree = new Array(); + + /* + * Array of ALL children ids / parent + * structure + * + * var @array + */ + this.child_id_array = new Array(); +}; + +/*-------------------------------------------------------------------------*/ +// Initiate draggable objects +/*-------------------------------------------------------------------------*/ + +dragmove.prototype.drag_init = function() +{ + //---------------------------------- + // Get page links... + // Gah.. another safari bug + //---------------------------------- + + var draghandles = document.getElementsByTagName('*'); + + //---------------------------------- + // Sort through and grab topic links + //---------------------------------- + + for ( var i = 0 ; i <= draghandles.length ; i++ ) + { + try + { + if ( ! draghandles[i].id ) + { + continue; + } + } + catch(e) + { + continue; + } + + var linkid = draghandles[i].id; + var linkname = linkid.replace( /^(.*)-(\d+)$/, "$1" ); + var thisid = this.get_id_from_text( draghandles[i].id ); + + //---------------------------------- + // SET UP DRAG HANDLES + //---------------------------------- + + if ( linkname == this.var_drag_handle_id_text ) + { + var drag_main_obj = document.getElementById( this.var_drag_draggable_id_text + '-' + thisid ); + var drag_handle_obj = document.getElementById( this.var_drag_handle_id_text + '-' + thisid ); + + draghandles[i].style.cursor = "move"; + + Drag.init( drag_handle_obj, drag_main_obj ); + + drag_main_obj.onDrag = function(x, y, e) { dragmove_events.prototype.event_drag_ging( x, y, e ); }; + drag_main_obj.onDragStart = function(x, y, e) { dragmove_events.prototype.event_drag_start( x, y, e ); }; + drag_main_obj.onDragEnd = function(x, y, e) { dragmove_events.prototype.event_drag_end( x, y, e ); }; + + //---------------------------------- + // This has to be after Drag.init + // to replace mouseover handler + //---------------------------------- + + drag_handle_obj.onmouseover = dragmove_events.prototype.event_mouseover; + drag_handle_obj.onmouseout = dragmove_events.prototype.event_mouseout; + } + } + + //---------------------------------- + // Create child / parent structure + //---------------------------------- + + if ( this.var_parent_ids.length ) + { + for( var i in this.var_parent_ids ) + { + if ( ! this.child_id_array[ this.var_parent_ids[i] ] ) + { + this.child_id_array[ this.var_parent_ids[i] ] = new Array(); + } + + this.child_id_array[ this.var_parent_ids[i] ][ this.child_id_array[ this.var_parent_ids[i] ].length ] = i; + } + } +}; + +/*-------------------------------------------------------------------------*/ +// Add ID to UNMOVEABLES array +/*-------------------------------------------------------------------------*/ + +dragmove.prototype.get_parents_array = function( root_tid ) +{ + if ( this.var_parent_ids[ root_tid ] ) + { + this.parent_id_tree[ this.parent_id_tree.length ] = this.var_parent_ids[ root_tid ]; + + this.get_parents_array( this.var_parent_ids[ root_tid ] ); + } +}; + +/*-------------------------------------------------------------------------*/ +// Add ID to UNMOVEABLES array +/*-------------------------------------------------------------------------*/ + +dragmove.prototype.get_children_array = function( root_tid ) +{ + if ( this.child_id_array[ root_tid ] ) + { + for( var i in this.child_id_array[ root_tid ] ) + { + this.child_id_tree[ this.child_id_tree.length ] = this.child_id_array[ root_tid ][i]; + + this.get_children_array( this.child_id_array[ root_tid ][i] ); + } + } +}; + +/*-------------------------------------------------------------------------*/ +// Add ID to UNMOVEABLES array +/*-------------------------------------------------------------------------*/ + +dragmove.prototype.add_id_to_unmoveables = function( tid ) +{ + this.UNMOVEABLES[ tid ] = tid; +}; + +/*-------------------------------------------------------------------------*/ +// Add ID to target array +/*-------------------------------------------------------------------------*/ + +dragmove.prototype.add_id_to_targets = function( tid ) +{ + this.var_target_ids[ tid ] = 1; +}; + +/*-------------------------------------------------------------------------*/ +// Add ID to target array +/*-------------------------------------------------------------------------*/ + +dragmove.prototype.add_id_to_parents = function( tid, parent_id ) +{ + this.var_parent_ids[ tid ] = parent_id == 'root' ? 0 : parseInt(parent_id); +}; + +/*--------------------------------------------*/ +// Get TID from ID +/*--------------------------------------------*/ + +dragmove.prototype.get_id_from_text = function( id ) +{ + return id.replace( /.*\-(\d+)/, "$1" ); +}; + +/*-------------------------------------------------------------------------*/ +// Initiate events object +/*-------------------------------------------------------------------------*/ + +function dragmove_events() +{ + +}; + +/*-------------------------------------------------------------------------*/ +// TARGET EVENT: Mouseover +/*-------------------------------------------------------------------------*/ + +dragmove_events.prototype.event_TARGET_mouseover = function(e) +{ + //------------------------------- + // Already over a target + //------------------------------- + + if ( drag_move.var_target_over_id ) + { + return false; + } + + //------------------------------- + // Not dragging? + //------------------------------- + + if ( ! drag_move._drag_in_progress ) + { + return false; + } + + //------------------------------- + // No? Get one then + //------------------------------- + + drag_move.var_target_over_id = drag_move.get_id_from_text( this.id ); + + //------------------------------- + // Can we actually mouse over this? + // Check parents to make sure we're not + // trying to move a child into its existing + // parent. Also don't allow to drop over + // oneself + //------------------------------- + + if ( drag_move.var_parent_process && drag_move.current_id ) + { + //------------------------------- + // Move into self + //------------------------------- + + if ( drag_move.var_target_over_id == drag_move.current_id ) + { + //------------------------------- + // Yeah.. so don't do anything + //------------------------------- + + drag_move.var_target_over_id = null; + return false; + } + + //------------------------------- + // Move into current parent + //------------------------------- + + if ( drag_move.var_target_over_id == drag_move.var_parent_ids[ drag_move.current_id ] ) + { + //------------------------------- + // Yeah.. so don't do anything + //------------------------------- + + drag_move.var_target_over_id = null; + return false; + } + + //------------------------------- + // Make sure we're not moving into + // own parents + //------------------------------- + + drag_move.child_id_tree = new Array(); + + drag_move.get_children_array( drag_move.current_id ); + + // Add in current ID + drag_move.child_id_tree[ drag_move.child_id_tree.length ] = drag_move.current_id; + + for( var i in drag_move.child_id_tree ) + { + if ( drag_move.var_target_over_id == drag_move.child_id_tree[i] ) + { + //------------------------------- + // Yeah.. so don't do anything + //------------------------------- + + drag_move.var_target_over_id = null; + return false; + } + } + } + + var target_obj = document.getElementById( drag_move.var_original_row_text + '-' + drag_move.var_target_over_id ); + + //------------------------------- + // Store old classname... + //------------------------------- + + drag_move.var_target_out_classname = target_obj.className; + + //------------------------------- + // Change classname... + //------------------------------- + + target_obj.className = drag_move.var_target_over_classname; +}; + +/*-------------------------------------------------------------------------*/ +// TARGET EVENT: Mouseout +/*-------------------------------------------------------------------------*/ + +dragmove_events.prototype.event_TARGET_mouseout = function(e) +{ + //------------------------------- + // Not touched a target? + //------------------------------- + + if ( ! drag_move.var_target_over_id ) + { + return false; + } + + //------------------------------- + // Not dragging? + //------------------------------- + + if ( ! drag_move._drag_in_progress ) + { + return false; + } + + //------------------------------- + // Get obj + //------------------------------- + + var target_obj = document.getElementById( drag_move.var_original_row_text + '-' + drag_move.var_target_over_id ); + + //------------------------------- + // Store old classname... + //------------------------------- + + target_obj.className = drag_move.var_target_out_classname; + + //------------------------------- + // Clear target ID + //------------------------------- + + drag_move.var_target_over_id = null; +}; + +/*-------------------------------------------------------------------------*/ +// MAIN EVENT: Mouseover +/*-------------------------------------------------------------------------*/ + +dragmove_events.prototype.event_mouseover = function(e) +{ + //------------------------------- + // Already dragging? + //------------------------------- + + if ( drag_move.current_id ) + { + return false; + } + + //------------------------------- + // Unmoveable? + //------------------------------- + + var check_for_id = drag_move.UNMOVEABLES[ drag_move.get_id_from_text( this.id ) ]; + + if ( check_for_id ) + { + var alert_object = null; + + //------------------------------- + // Attempt to get DIV + //------------------------------- + + try + { + alert_object = document.getElementById( drag_move.UNMOVEABLES_id ); + } + catch(error) + { + drag_move.UNMOVEABLES_id = null; + } + + //------------------------------- + // Yeah, so draw alert and return + //------------------------------- + + if ( alert_object ) + { + var drag_root_obj = document.getElementById( drag_move.var_drag_handle_id_text + '-' + check_for_id ); + + alert_object.style.top = ipsclass.get_obj_toppos( drag_root_obj ) - 4 + 'px'; + alert_object.style.left = ipsclass.get_obj_leftpos( drag_root_obj ) + 22 + 'px'; + alert_object.style.position = 'absolute'; + alert_object.style.display = ''; + } + + return false; + } + + //------------------------------- + // No? Get one then + //------------------------------- + + drag_move.current_id = drag_move.get_id_from_text( this.id ); +}; + +/*-------------------------------------------------------------------------*/ +// MAIN EVENT: Mouseout +/*-------------------------------------------------------------------------*/ + +dragmove_events.prototype.event_mouseout = function(e) +{ + //------------------------------- + // Unmoveable? + //------------------------------- + + var check_for_id = drag_move.UNMOVEABLES[ drag_move.get_id_from_text( this.id ) ]; + + if ( check_for_id ) + { + var alert_object = null; + + //------------------------------- + // Attempt to get DIV + //------------------------------- + + try + { + alert_object = document.getElementById( drag_move.UNMOVEABLES_id ); + } + catch(error) + { + drag_move.UNMOVEABLES_id = null; + } + + //------------------------------- + // Yeah, so draw alert and return + //------------------------------- + + if ( alert_object ) + { + alert_object.style.display = 'none'; + } + + return false; + } + + //------------------------------- + // Release current drag ID + // only if a drag is not in + // progress + //------------------------------- + + if ( ! drag_move._drag_in_progress ) + { + drag_move.current_id = null; + } +}; + +/*-------------------------------------------------------------------------*/ +// DRAG EVENT: DRAG IN PROGRESS (No, not men in dresses) +/*-------------------------------------------------------------------------*/ + +dragmove_events.prototype.event_drag_ging = function( x, y ) +{ + if ( is_ie ) + { + var bingo = 0; + + if ( drag_move.var_target_ids.length ) + { + for ( var i in drag_move.var_target_ids ) + { + if ( x >= drag_move.dims[ i ]['x1'] + && x <= drag_move.dims[ i ]['x2'] + && y >= drag_move.dims[ i ]['y1'] + && y <= drag_move.dims[ i ]['y2'] + ) + { + bingo = 1; + this.id = i; + dragmove_events.prototype.event_TARGET_mouseover(); + break; + } + } + } + + if ( ! bingo ) + { + dragmove_events.prototype.event_TARGET_mouseout(); + } + } +}; + +/*-------------------------------------------------------------------------*/ +// DRAG START: Gentlemen, start your dresses! +/*-------------------------------------------------------------------------*/ + +dragmove_events.prototype.event_drag_start = function( x, y ) +{ + //------------------------------- + // Time for hidden div to make + // a showing... + //------------------------------- + + if ( drag_move.current_id ) + { + var drag_main_obj = document.getElementById( drag_move.var_drag_draggable_id_text + '-' + drag_move.current_id ); + var drag_root_obj = document.getElementById( drag_move.var_drag_object_id_text + '-' + drag_move.current_id ); + var drag_orig_obj = document.getElementById( drag_move.var_original_row_text + '-' + drag_move.current_id ); + + //------------------------------- + // For some reason, Safari wants + // to be relative.. + //------------------------------- + + if ( is_safari ) + { + drag_root_obj.style.position = 'relative'; + } + + drag_main_obj.style.top = ipsclass.get_obj_toppos( drag_root_obj ) + 'px'; + drag_main_obj.style.left = ipsclass.get_obj_leftpos( drag_root_obj ) + 'px'; + drag_main_obj.style.position = 'absolute'; + drag_main_obj.style.display = 'block'; + drag_main_obj.style.zIndex = 1000; + + //------------------------------- + // Set up TARGETS + //------------------------------- + + if ( drag_move.var_target_ids.length ) + { + for ( var i in drag_move.var_target_ids ) + { + var main_obj = document.getElementById( drag_move.var_original_row_text + '-' + i ); + + //------------------------------- + // For some reason, Safari wants + // to be relative.. + //------------------------------- + + if ( is_safari ) + { + main_obj.style.position = 'relative'; + } + + if ( is_ie ) + { + //------------------------------- + // IE has problems with onmouseover + // and zIndex.. couldn't resolve it + // so cheated. slower, hence IE only + // Gen co-ord maps of targets + //------------------------------- + + drag_move.dims[ i ] = new Array(); + + drag_move.dims[ i ]['x1'] = ipsclass.get_obj_leftpos(main_obj); + drag_move.dims[ i ]['x2'] = drag_move.dims[i]['x1'] + main_obj.offsetWidth; + drag_move.dims[ i ]['y1'] = ipsclass.get_obj_toppos(main_obj) - 20; + + // We need to leave a gutter at the bottom / top of each target area to allow + // the mouse out event to fire otherwise two targets together will show as one + // big target + drag_move.dims[ i ]['y2'] = drag_move.dims[i]['y1'] + main_obj.offsetHeight - 5; + } + else + { + var targetobj = document.createElement('div'); + targetobj.id = drag_move.var_original_row_text + '-TARGET-' + i; + targetobj.style.background = 'transparent'; + targetobj.style.position = 'absolute'; + targetobj.style.left = ipsclass.get_obj_leftpos(main_obj) + 'px'; + targetobj.style.top = ipsclass.get_obj_toppos(main_obj) + 'px'; + targetobj.style.width = main_obj.offsetWidth + 'px'; + targetobj.style.height = main_obj.offsetHeight + 'px'; + targetobj.style.zIndex = 1000; + + document.body.appendChild(targetobj); + + drag_move._TARGETS[ drag_move._TARGETS.length ] = targetobj; + + targetobj.onmouseover = dragmove_events.prototype.event_TARGET_mouseover; + targetobj.onmouseout = dragmove_events.prototype.event_TARGET_mouseout; + } + } + } + + //------------------------------- + // Alter original row + //------------------------------- + + if ( ! document.getElementById( drag_move.var_original_row_text + '-HIDDEN-' + drag_move.current_id ) ) + { + var newdiv = document.createElement('DIV'); + newdiv.id = drag_move.var_original_row_text + '-HIDDEN-' + drag_move.current_id; + newdiv.className = (is_ie ) ? drag_move.var_hide_row_classname+'-ie' : drag_move.var_hide_row_classname+'-moz'; + newdiv.style.position = 'absolute'; + newdiv.style.top = ipsclass.get_obj_toppos( drag_root_obj ) + 'px'; + newdiv.style.left = ipsclass.get_obj_leftpos( drag_root_obj ) + 'px'; + newdiv.style.width = drag_orig_obj.offsetWidth + 'px'; + newdiv.style.height = drag_orig_obj.offsetHeight + 'px'; + + document.body.appendChild(newdiv); + } + else + { + var newdiv = document.getElementById( drag_move.var_original_row_text + '-HIDDEN-' + drag_move.current_id ); + newdiv.style.display = ''; + } + + //------------------------------- + // Set drag flag + //------------------------------- + + drag_move._drag_in_progress = 1; + } +}; + +/*-------------------------------------------------------------------------*/ +// DRAG START: Time to remove the makeup +/*-------------------------------------------------------------------------*/ + +dragmove_events.prototype.event_drag_end = function( x, y ) +{ + //------------------------------- + // Hide DIV + //------------------------------- + + if ( drag_move.current_id ) + { + var drag_main_obj = document.getElementById( drag_move.var_drag_draggable_id_text + '-' + drag_move.current_id ); + var drag_root_obj = document.getElementById( drag_move.var_drag_object_id_text + '-' + drag_move.current_id ); + var drag_orig_obj = document.getElementById( drag_move.var_original_row_text + '-' + drag_move.current_id ); + + //------------------------------- + // Hide draggable thing + //------------------------------- + + drag_main_obj.style.display = 'none'; + + //------------------------------- + // Hide row cover + //------------------------------- + + if ( document.getElementById( drag_move.var_original_row_text + '-HIDDEN-' + drag_move.current_id ) ) + { + document.getElementById( drag_move.var_original_row_text + '-HIDDEN-' + drag_move.current_id ).style.display = 'none'; + } + } + + //------------------------------- + // CLEAR TARGETS + //------------------------------- + + if ( drag_move._TARGETS ) + { + for ( var i in drag_move._TARGETS ) + { + document.body.removeChild( drag_move._TARGETS[i] ); + } + + drag_move._TARGETS = new Array(); + } + + //------------------------------- + // Did we drop on a target? + //------------------------------- + + if ( drag_move.var_target_over_id ) + { + var new_parent_id = drag_move.var_target_over_id; + var page_id = drag_move.current_id; + + /*--------------------------------------------*/ + // Main function to do on request + // Must be defined first!! + /*--------------------------------------------*/ + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj.readystate_ready_and_ok() ) + { + xmlobj.show_loading( "Move in progress..." ); + return; + } + + xmlobj.hide_loading(); + + //---------------------------------- + // INIT + //---------------------------------- + + var returned = xmlobj.xmlhandler.responseText; + + if ( returned.match( /(0|-|\=)<\/null>/ ) ) + { + alert( "Error occured, move not completed " + returned ); + } + else + { + window.location = drag_move.var_bounce_url; + } + }; + + //---------------------------------- + // LOAD XML + //---------------------------------- + + xmlobj = new ajax_request(); + xmlobj.onreadystatechange( do_request_function ); + xmlobj.process( drag_move.var_ajax_url +'&pid='+page_id+'&new_parent_id='+new_parent_id ); + } + + //------------------------------- + // Release current drag ID + //------------------------------- + + drag_move.current_id = null; + + //------------------------------- + // Set drag flag + //------------------------------- + + drag_move._drag_in_progress = null; + + //------------------------------- + // Change colour back... + //------------------------------- + + if ( drag_move.var_target_over_id ) + { + //------------------------------- + // Get obj + //------------------------------- + + var target_obj = document.getElementById( drag_move.var_original_row_text + '-' + drag_move.var_target_over_id ); + + //------------------------------- + // Store old classname... + //------------------------------- + + target_obj.className = drag_move.var_target_out_classname; + } + + //------------------------------- + // Clear target ID + //------------------------------- + + drag_move.var_target_over_id = null; +}; \ No newline at end of file diff --git a/Development/javascript_uncompressed/skin_acp/clientscripts/ipd_form_functions.js b/Development/javascript_uncompressed/skin_acp/clientscripts/ipd_form_functions.js new file mode 100644 index 00000000..703322b1 --- /dev/null +++ b/Development/javascript_uncompressed/skin_acp/clientscripts/ipd_form_functions.js @@ -0,0 +1,402 @@ +//------------------------------------------------------------------------------ +// IPS JS: Form Functions +// (c) 2005 Invision Power Services, Inc. +// http://www.invisionpower.com +// Matt Mecham (17/10/05) +//------------------------------------------------------------------------------ + +var _form_functions = null; + +/*-------------------------------------------------------------------------*/ +// Initiate object +/*-------------------------------------------------------------------------*/ + +function form_functions() +{ + /** + * Name: Form + * + * @var string + */ + this.name_form = 'mainform'; + + /** + * ID: Form + * + * @var string + */ + this.obj_form = null; + + /** + * ID: Form Edited + * + * @var INT + */ + this.form_edited = 1; + + /** + * NAME: Edit hold + * + * @var string + */ + this.name_edit_hold = 'page-edit-hold'; + + /** + * ID: Edit hold + * + * @var string + */ + this.id_edit_hold = null; + + /** + * Saved onsubmit handlers + * + * @var string + */ + this.form_onsubmit_saved = null; + + /** + * Array of form BUTTON div id names + * + * @var array + */ + this.form_button_divs = new Array(); + + /** + * Array of form LINK div id names + * + * @var array + */ + this.form_link_divs = new Array(); + + /** + * Array of form EVAL div id names + * + * @var array + */ + this.form_eval_divs = new Array(); + + /** + * CSS styles: Button off + * + * @var string + */ + this.css_formbutton_off = 'formbutton-off'; + + /** + * CSS styles: Button on + * + * @var string + */ + this.css_formbutton_on = 'formbutton-on'; +} + +/*-------------------------------------------------------------------------*/ +// Initiate object +/*-------------------------------------------------------------------------*/ + +form_functions.prototype.init = function() +{ + //---------------------------------- + // Get form object + //---------------------------------- + + this.obj_form = document.getElementById( this.name_form ); + + //---------------------------------- + // Already got a submit handler? + //---------------------------------- + + if ( this.obj_form.onsubmit ) + { + this.form_onsubmit_saved = this.obj_form.onsubmit; + } + + //---------------------------------- + // Got the hold box? + //---------------------------------- + + try + { + this.id_edit_hold = document.getElementById( this.name_edit_hold ); + } + catch(error) + { + + } + + //---------------------------------- + // Get page links... + // Gah.. another safari bug + //---------------------------------- + + var inputs = this.obj_form.getElementsByTagName('INPUT'); + + _form_functions = this; + + //---------------------------------- + // Sort through and grab links + //---------------------------------- + + for ( var i = 0 ; i <= inputs.length ; i++ ) + { + try + { + if ( inputs[i].type == 'hidden' ) + { + continue; + } + } + catch(error) + { + continue; + } + + inputs[i].onchange = this.form_event_edited; + } + + //---------------------------------- + // Form check... + //---------------------------------- + + this.obj_form.onsubmit = this.form_submit; +}; + +/*-------------------------------------------------------------------------*/ +// Initiate object +/*-------------------------------------------------------------------------*/ + +form_functions.prototype.add_submit_event = function( div_id, field_name, init_value, onsubmit_value ) +{ + var div_obj = null; + + //---------------------------------- + // Make sure we got one... + //---------------------------------- + + try + { + div_obj = document.getElementById( div_id ); + } + catch( error ) + { + alert( "Could not initialize field: " + div_id ); + return false; + } + + //---------------------------------- + // Add hidden field to form... + //---------------------------------- + + if ( field_name ) + { + var field = document.createElement('input'); + + field.type = 'hidden'; + field.value = init_value; + field.name = field_name; + field.id = 'field--x--' + div_id; + + this.obj_form.appendChild( field ); + + this.form_button_divs[ div_id ] = onsubmit_value; + } + + //---------------------------------- + // Add event handlers... + //---------------------------------- + + div_obj.onmouseover = this.form_button_mouseover; + div_obj.onmouseout = this.form_button_mouseout; + div_obj.onclick = this.form_button_submit; + + div_obj.className = this.css_formbutton_off; +}; + +/*-------------------------------------------------------------------------*/ +// Add EVAL event +/*-------------------------------------------------------------------------*/ + +form_functions.prototype.add_eval_event = function( div_id, eval_code ) +{ + var div_obj = null; + + //---------------------------------- + // Make sure we got one... + //---------------------------------- + + try + { + div_obj = document.getElementById( div_id ); + } + catch( error ) + { + alert( "Could not initialize event: " + div_id ); + return false; + } + + this.form_eval_divs[ div_id ] = eval_code; + + //---------------------------------- + // Add event handlers... + //---------------------------------- + + div_obj.onmouseover = this.form_button_mouseover; + div_obj.onmouseout = this.form_button_mouseout; + div_obj.onclick = this.form_button_eval_click; + + div_obj.className = this.css_formbutton_off; +}; + +/*-------------------------------------------------------------------------*/ +// Add LINK event +/*-------------------------------------------------------------------------*/ + +form_functions.prototype.add_link_event = function( div_id, link_url ) +{ + var div_obj = null; + + //---------------------------------- + // Make sure we got one... + //---------------------------------- + + try + { + div_obj = document.getElementById( div_id ); + } + catch( error ) + { + alert( "Could not initialize event: " + div_id ); + return false; + } + + this.form_link_divs[ div_id ] = link_url; + + //---------------------------------- + // Add event handlers... + //---------------------------------- + + div_obj.onmouseover = this.form_button_mouseover; + div_obj.onmouseout = this.form_button_mouseout; + div_obj.onclick = this.form_button_link_click; + + div_obj.className = this.css_formbutton_off; +}; + +/*-------------------------------------------------------------------------*/ +// Div EVAL has been clicked... +/*-------------------------------------------------------------------------*/ + +form_functions.prototype.form_button_eval_click = function() +{ + try + { + eval( _form_functions.form_eval_divs[ this.id ] ); + } + catch( error ) + { + + } +}; + + +/*-------------------------------------------------------------------------*/ +// Div Link has been clicked... +/*-------------------------------------------------------------------------*/ + +form_functions.prototype.form_button_link_click = function() +{ + try + { + window.location = _form_functions.form_link_divs[ this.id ]; + } + catch( error ) + { + + } +}; + +/*-------------------------------------------------------------------------*/ +// The form has changed... +/*-------------------------------------------------------------------------*/ + +form_functions.prototype.form_button_submit = function() +{ + try + { + var field_obj = document.getElementById( 'field--x--' + this.id ); + field_obj.value = _form_functions.form_button_divs[ this.id ]; + } + catch( error ) + { + + } + + //---------------------------------- + // Submit.. + //---------------------------------- + + _form_functions.form_submit(); + _form_functions.obj_form.submit(); +}; + +/*-------------------------------------------------------------------------*/ +// The form has changed... +/*-------------------------------------------------------------------------*/ + +form_functions.prototype.form_button_mouseover = function() +{ + this.className = _form_functions.css_formbutton_on; +}; + +/*-------------------------------------------------------------------------*/ +// The form has changed... +/*-------------------------------------------------------------------------*/ + +form_functions.prototype.form_button_mouseout = function() +{ + this.className = _form_functions.css_formbutton_off; +}; + +/*-------------------------------------------------------------------------*/ +// The form has changed... +/*-------------------------------------------------------------------------*/ + +form_functions.prototype.form_event_edited = function() +{ + _form_functions.form_edited = 1; +}; + +/*-------------------------------------------------------------------------*/ +// The form has changed... +/*-------------------------------------------------------------------------*/ + +form_functions.prototype.form_submit = function() +{ + var retval = true; + + if ( _form_functions.form_edited ) + { + //alert ("Form edited" ); + } + + if ( _form_functions.form_onsubmit_saved ) + { + eval( 'tmpsubmit = ' + _form_functions.form_onsubmit_saved ); + retval = tmpsubmit(); + } + + return retval; +}; + +/*-------------------------------------------------------------------------*/ +// The form has changed... +/*-------------------------------------------------------------------------*/ + +form_functions.prototype.document_onblur = function() +{ + if ( _form_functions.form_edited ) + { + //alert ("Form edited" ); + } +}; diff --git a/Development/javascript_uncompressed/skin_acp/clientscripts/ipd_tab_factory.js b/Development/javascript_uncompressed/skin_acp/clientscripts/ipd_tab_factory.js new file mode 100644 index 00000000..38f435d8 --- /dev/null +++ b/Development/javascript_uncompressed/skin_acp/clientscripts/ipd_tab_factory.js @@ -0,0 +1,184 @@ +//------------------------------------------------------------------------------ +// IPS JS: Tabby Cat. +// (c) 2005 Invision Power Services, Inc. +// http://www.invisionpower.com +// Matt Mecham (02/11/05) +//------------------------------------------------------------------------------ + +var _tab_factory; + +/*-------------------------------------------------------------------------*/ +// Initiate object +/*-------------------------------------------------------------------------*/ + +function tab_factory() +{ + /** + * ID: CSS: Tab off class + * + * @var INT + */ + this.css_tab_off = 'taboff'; + + /** + * ID: Form + * + * @var string + */ + this.css_tab_on = 'tabon'; + + /** + * String: Part tab set up + * + * @var string + */ + this.string_tab_id = 'tabtab'; + + /** + * String: Part tab pane + * + * @var string + */ + this.string_tab_pane = 'tabpane'; + + /** + * String: Tab array + * + * @var array + */ + this.stored_tabs = new Array(); + + /** + * String: Panes array + * + * @var array + */ + this.stored_panes = new Array(); +} + +/*-------------------------------------------------------------------------*/ +// Initiate object +function tab_factory_init_tabs() { } +/*-------------------------------------------------------------------------*/ + +tab_factory.prototype.init_tabs = function() +{ + //---------------------------------- + // Get page divs... + //---------------------------------- + + var divs = document.getElementsByTagName('DIV'); + var divcount = 0; + + _tab_factory = this; + + //---------------------------------- + // Sort through and grab links + //---------------------------------- + + for ( var i = 0 ; i <= divs.length ; i++ ) + { + try + { + if ( ! divs[i].id ) + { + continue; + } + } + catch(error) + { + continue; + } + + var divid = divs[i].id; + var divname = divid.replace( /^(.*)-(\d+)$/, "$1" ); + var divnum = this.get_id_from_text( divs[i].id ); + + //---------------------------------- + // Work with it? + //---------------------------------- + + if ( divname == this.string_tab_id ) + { + this.stored_tabs[ divnum ] = divs[i]; + + divs[i].style.cursor = 'pointer'; + + divs[i].onclick = this.toggle_tabs; + + //---------------------------------- + // Set correct classes / display + //---------------------------------- + + this.stored_panes[ divnum ] = document.getElementById( this.string_tab_pane + '-' + divnum ); + + if ( divcount == 0 ) + { + // First tab... + divs[i].className = this.css_tab_on; + divs[i].style.display = 'block'; + + this.stored_panes[ divnum ].style.display = 'block'; + } + else + { + // Second tab + divs[i].className = this.css_tab_off; + divs[i].style.display = 'block'; + + this.stored_panes[ divnum ].style.display = 'none'; + } + + divcount++; + } + } +}; + +/*-------------------------------------------------------------------------*/ +// The form has changed... +/*-------------------------------------------------------------------------*/ + +tab_factory.prototype.toggle_tabs = function(event) +{ + //------------------------------- + // No? Get one then + //------------------------------- + + var tabid = _tab_factory.get_id_from_text( this.id ); + + //------------------------------- + // Got it? + //------------------------------- + + for ( var i in _tab_factory.stored_tabs ) + { + if ( i == tabid ) + { + _tab_factory.stored_tabs[ i ].style.display = 'block'; + _tab_factory.stored_tabs[ i ].className = _tab_factory.css_tab_on; + _tab_factory.stored_panes[ i ].style.display = 'block'; + } + else + { + _tab_factory.stored_tabs[ i ].style.display = 'block'; + _tab_factory.stored_tabs[ i ].className = _tab_factory.css_tab_off; + _tab_factory.stored_panes[ i ].style.display = 'none'; + } + } + + // Stop scrolling to top of the page... + ipsclass.cancel_bubble( event ); + + return false; +}; + + + +/*-------------------------------------------------------------------------*/ +// Grab ID from string +/*-------------------------------------------------------------------------*/ + +tab_factory.prototype.get_id_from_text = function( id ) +{ + return id.replace( /.*\-(\d+)/, "$1" ); +}; diff --git a/Development/javascript_uncompressed/skin_acp/clientscripts/ipd_titleedit.js b/Development/javascript_uncompressed/skin_acp/clientscripts/ipd_titleedit.js new file mode 100644 index 00000000..dcb9504c --- /dev/null +++ b/Development/javascript_uncompressed/skin_acp/clientscripts/ipd_titleedit.js @@ -0,0 +1,559 @@ +//------------------------------------------------------------------------------ +// IPS JS: Content Pages Functions +// (c) 2005 Invision Power Services, Inc. +// http://www.invisionpower.com +// Matt Mecham (27/07/05) +//------------------------------------------------------------------------------ + +var _this; + +/*-------------------------------------------------------------------------*/ +// Initiate object +/*-------------------------------------------------------------------------*/ + +function titleedit() +{ + this.var_ajax_url = null; + + // Click delay + this.var_click_delay = 1200; + + this.var_link_id_text = 'pages-link'; + this.var_span_id_text = 'pages-page'; + this.var_div_main = 'pages-main'; + + // Language + this.lang_click_and_hold = null; + + // Internal stuff + this._tid_timeout = null; + this._new_text = null; + this._tid_links_init = 0; + this._tid_date = new Array(); + this._span_contents = new Array(); + this._link_contents = new Array(); + + /** + * Array of uneditable IDs + * + */ + this.UNEDITABLES = new Array(); + + /** + * ID part of uneditable alert box + * + */ + + this.uneditable_id_text = 'titleedit-uneditable'; + + // Set up divs + this.div_main_wrap = document.getElementById( this.var_div_main ); + + /** + * Type of edit box required + * Allowed: text, textarea + */ + this.edit_box = 'text'; + this.edit_box_ta_rows = 5; + this.edit_box_ta_cols = 45; + + /** + * Allows the use of a secret DIV + * to keep the content updated + * Leave blank to not use + */ + this.var_real_id_text = ''; +} + +/*-------------------------------------------------------------------------*/ +// Initiate object +/*-------------------------------------------------------------------------*/ + +titleedit.prototype.init = function() +{ + //---------------------------------- + // Get page links... + // Gah.. another safari bug + //---------------------------------- + + var pagelinks = document.getElementsByTagName('*'); + + _this = this; + + //---------------------------------- + // Sort through and grab topic links + //---------------------------------- + + for ( var i = 0 ; i <= pagelinks.length ; i++ ) + { + try + { + if ( ! pagelinks[i].id ) + { + continue; + } + } + catch(e) + { + continue; + } + + var linkid = pagelinks[i].id; + var linkname = linkid.replace( /^(.*)-(\d+)$/, "$1" ); + var linknum = linkid.replace( /^(.*)-(\d+)$/, "$2" ); + + if ( linkname == this.var_link_id_text ) + { + if ( this.UNEDITABLES[ linknum ] ) + { + pagelinks[i].onmouseover = this.title_mouseover; + pagelinks[i].onmouseout = this.title_mouseout; + } + else + { + pagelinks[i].onmousedown = this.title_mousedown; + pagelinks[i].onmouseup = this.title_mouseup; + + if ( ! this._tid_links_init ) + { + pagelinks[i].title = pagelinks[i].title ? pagelinks[i].title + ". " + this.lang_click_and_hold : this.lang_click_and_hold; + } + } + } + } + + this._tid_links_init = 1; +}; + +/*--------------------------------------------*/ +// Mouseover: Show alert +/*--------------------------------------------*/ + + +titleedit.prototype.title_mouseover = function( event ) +{ + //---------------------------------- + // Prevent link loading + //---------------------------------- + + event = ipsclass.cancel_bubble( event, true ); + + //---------------------------------- + // Get TID + //---------------------------------- + + var tid = _this.get_tid_from_id( this.id ); + + //------------------------------- + // Unmoveable? + //------------------------------- + + var check_for_id = _this.UNEDITABLES[ tid ]; + + if ( check_for_id ) + { + var alert_object = null; + + //------------------------------- + // Attempt to get DIV + //------------------------------- + + try + { + alert_object = document.getElementById( _this.uneditable_id_text ); + } + catch(error) + { + } + + //------------------------------- + // Yeah, so draw alert and return + //------------------------------- + + if ( alert_object ) + { + var root_obj = document.getElementById( _this.var_link_id_text + '-' + check_for_id ); + + //------------------------------- + // For some reason, Safari wants + // to be relative.. + //------------------------------- + + if ( is_safari ) + { + root_obj.style.position = 'relative'; + } + + alert_object.style.top = ipsclass.get_obj_toppos( root_obj ) - 4 + 'px'; + alert_object.style.left = ipsclass.get_obj_leftpos( root_obj ) + 5 + root_obj.offsetWidth + 'px'; + alert_object.style.position = 'absolute'; + alert_object.style.display = ''; + } + + return false; + } +}; + +/*--------------------------------------------*/ +// Mouseout: Hide alert +/*--------------------------------------------*/ + + +titleedit.prototype.title_mouseout = function( event ) +{ + //---------------------------------- + // Prevent link loading + //---------------------------------- + + event = ipsclass.cancel_bubble( event, true ); + + //---------------------------------- + // Get TID + //---------------------------------- + + var tid = _this.get_tid_from_id( this.id ); + + //------------------------------- + // Unmoveable? + //------------------------------- + + var check_for_id = _this.UNEDITABLES[ tid ]; + + if ( check_for_id ) + { + var alert_object = null; + + //------------------------------- + // Attempt to get DIV + //------------------------------- + + try + { + alert_object = document.getElementById( _this.uneditable_id_text ); + } + catch(error) + { + } + + //------------------------------- + // Yeah, so draw alert and return + //------------------------------- + + if ( alert_object ) + { + alert_object.style.display = 'none'; + } + + return false; + } +}; + + +/*--------------------------------------------*/ +// Mousedown, start timer +/*--------------------------------------------*/ + + +titleedit.prototype.title_mousedown = function( event ) +{ + //---------------------------------- + // Prevent link loading + //---------------------------------- + + event = ipsclass.cancel_bubble( event, true ); + + //---------------------------------- + // Get TID + //---------------------------------- + + var tid = _this.get_tid_from_id( this.id ); + + //---------------------------------- + // Start... + //---------------------------------- + + _this._tid_date[ tid ] = _this.get_time_now(); + + //---------------------------------- + // Start loop + //---------------------------------- + + _this._tid_timeout = setTimeout( "_this.link_event_timer("+tid+")", 5 ); +}; + +/*--------------------------------------------*/ +// Event, loop +/*--------------------------------------------*/ + + +titleedit.prototype.link_event_timer = function( tid ) +{ + //---------------------------------- + // Get time now + //---------------------------------- + + var timenow = this.get_time_now(); + + //---------------------------------- + // Click held for 1.5 s+? + //---------------------------------- + + if ( timenow > 0 && this._tid_date[tid] > 0 && ( (timenow - this._tid_date[tid] ) > this.var_click_delay ) ) + { + //---------------------------------- + // Yeah.. wipe tid time and convert + //---------------------------------- + + this._tid_date[tid] = 0; + this.span_to_input( tid ); + return false; + } + + //---------------------------------- + // Not wiped? loop on! + //---------------------------------- + + if ( this._tid_date[tid] > 0 ) + { + this._tid_timeout = setTimeout( "_this.link_event_timer("+tid+")", 5 ); + } + else + { + return false; + } +}; + +/*--------------------------------------------*/ +// Turn topic title into text input +/*--------------------------------------------*/ + + +titleedit.prototype.span_to_input = function( tid ) +{ + //---------------------------------- + // Using fancy js? + //---------------------------------- + + if ( ! use_enhanced_js ) + { + return false; + } + + this._span_contents[ tid ] = document.getElementById( this.var_span_id_text + '-' + tid ).innerHTML; + this._link_contents[ tid ] = document.getElementById( this.var_link_id_text + '-' + tid ).innerHTML; + + var value = ''; + + //---------------------------------- + // Using hidden div or not? + //---------------------------------- + + if ( this.var_real_id_text ) + { + value = document.getElementById( this.var_real_id_text + '-' + tid ).innerHTML; + } + else + { + value = this._link_contents[ tid ]; + } + + //---------------------------------- + // Show edit box + //---------------------------------- + + if ( this.edit_box == 'text' ) + { + value = value.replace( /"/g, '"'); + document.getElementById(this.var_span_id_text + '-' + tid ).innerHTML = ''; + } + else + { + value = value.replace( /<\/textarea>/g, '</textarea>'); + document.getElementById(this.var_span_id_text + '-' + tid ).innerHTML = ''; + } + + document.getElementById( 'edit-' + tid ).focus(); + + return false; +}; + +/*--------------------------------------------*/ +// Mouseup? Cancel timer to kill the loop +/*--------------------------------------------*/ + +titleedit.prototype.title_mouseup = function( event ) +{ + //---------------------------------- + // Prevent link loading + //---------------------------------- + + event = ipsclass.cancel_bubble( event, true ); + + //---------------------------------- + // Get TID + //---------------------------------- + + var tid = _this.get_tid_from_id( this.id ); + + //---------------------------------- + // Reset timer + //---------------------------------- + + _this._tid_date[tid] = 0; +}; + +/*--------------------------------------------*/ +// BLUR HANDLER +/*--------------------------------------------*/ + + +titleedit.prototype.edit_blur = function( tid, type ) +{ + _this._new_text = document.getElementById( 'edit-' + tid ).value; + + if ( _this._new_text != "" ) + { + _this.title_save( tid, _this._new_text, type ); + } +}; + +/*--------------------------------------------*/ +// KEY PRESS HANDLER +/*--------------------------------------------*/ + + +titleedit.prototype.edit_keypress = function( evt, tid, type ) +{ + evt = (evt) ? evt : window.event; + _this._new_text = document.getElementById( 'edit-' + tid ).value; + + // Make sure we're not using a text area + if ( _this.edit_box == 'text' ) + { + if ( ( evt.keyCode == 13 || evt.keyCode == 3 ) && _this._new_text != "" ) + { + _this.title_save( tid, _this._new_text, type ); + } + } +}; + +/*--------------------------------------------*/ +// UDPATE DB +/*--------------------------------------------*/ + + +titleedit.prototype.title_save = function( tid, new_text, type ) +{ + var donotedit = 0; + + if ( new_text == _this._span_contents[ tid ] ) + { + donotedit = 1; + } + + document.getElementById( _this.var_span_id_text + '-' + tid ).innerHTML = _this._span_contents[ tid ]; + document.getElementById( _this.var_link_id_text + '-' + tid ).innerHTML = new_text; + + //---------------------------------- + // Using hidden div or not? + //---------------------------------- + + if ( _this.var_real_id_text ) + { + document.getElementById( _this.var_real_id_text + '-' + tid ).innerHTML = new_text; + } + + //---------------------------------- + // Re-check topic links + //---------------------------------- + + _this.init(); + + if ( donotedit ) + { + return false; + } + + var fields = new Array(); + + //---------------------------------- + // Populate fields + //---------------------------------- + + fields['tid'] = tid; + fields['name'] = new_text; + fields['md5check'] = ipb_md5_check; + + /*--------------------------------------------*/ + // Main function to do on request + // Must be defined first!! + /*--------------------------------------------*/ + + do_request_function = function() + { + //---------------------------------- + // Ignore unless we're ready to go + //---------------------------------- + + if ( ! xmlobj.readystate_ready_and_ok() ) + { + xmlobj.show_loading("Saving..."); + return; + } + + xmlobj.hide_loading(); + + //---------------------------------- + // INIT + //---------------------------------- + + var returned = xmlobj.xmlhandler.responseText; + + if ( returned.match( /(0|-|\=)<\/null>/ ) ) + { + alert( "Error occured, not saved" ); + } + }; + + //---------------------------------- + // LOAD XML + //---------------------------------- + + xmlobj = new ajax_request(); + xmlobj.onreadystatechange( do_request_function ); + xmlobj.process( _this.var_ajax_url, 'POST', xmlobj.format_for_post(fields) ); + + return false; +}; + + +/*--------------------------------------------*/ +// Get time now +/*--------------------------------------------*/ + + +titleedit.prototype.get_time_now = function() +{ + var mydate = new Date(); + return mydate.getTime(); +}; + +/*--------------------------------------------*/ +// Get TID from ID +/*--------------------------------------------*/ + + +titleedit.prototype.get_tid_from_id = function( id ) +{ + return id.replace( /.*\-(\d+)/, "$1" ); +}; + +/*-------------------------------------------------------------------------*/ +// Add ID to UNMOVEABLES array + +/*-------------------------------------------------------------------------*/ + +titleedit.prototype.add_id_to_uneditables = function( tid ) +{ + this.UNEDITABLES[ tid ] = tid; +}; \ No newline at end of file diff --git a/Development/javascript_uncompressed/skin_acp/clientscripts/ips_calendar_us.js b/Development/javascript_uncompressed/skin_acp/clientscripts/ips_calendar_us.js new file mode 100644 index 00000000..95a7424f --- /dev/null +++ b/Development/javascript_uncompressed/skin_acp/clientscripts/ips_calendar_us.js @@ -0,0 +1,299 @@ +/*-------------------------------------------------------------------------*/ +// Title: Tigra Calendar +// URL: http://www.softcomplex.com/products/tigra_calendar/ +// Version: 3.2 (American date format) +// Date: 10/14/2002 (mm/dd/yyyy) +// Note: Permission given to use this script in ANY kind of applications if +// header lines are left unchanged. +// Note: Script consists of two files: calendar?.js and calendar.html +/*-------------------------------------------------------------------------*/ + +/*--------------------------------------------*/ +// if two digit year input dates after this year +// considered 20 century. +/*--------------------------------------------*/ + +var NUM_CENTYEAR = 30; + +/*--------------------------------------------*/ +// is time input control required by default +/*--------------------------------------------*/ + +var BUL_TIMECOMPONENT = false; + +/*--------------------------------------------*/ +// are year scrolling buttons required by default +/*--------------------------------------------*/ + +var BUL_YEARSCROLL = true; + +var calendars = []; +var RE_NUM = /^\-?\d+$/; + +/*--------------------------------------------*/ +// Create object +/*--------------------------------------------*/ + +function calendar_us(obj_target) +{ + //------------------------------- + // assigning methods + //------------------------------- + + this.gen_date = cal_gen_date2; + this.gen_time = cal_gen_time2; + this.gen_tsmp = cal_gen_tsmp2; + this.prs_date = cal_prs_date2; + this.prs_time = cal_prs_time2; + this.prs_tsmp = cal_prs_tsmp2; + this.popup = cal_popup2; + + //------------------------------- + // validate input parameters + //------------------------------- + + if (!obj_target) + { + return cal_error("Error calling the calendar: no target control specified"); + } + + if (obj_target.value == null) + { + return cal_error("Error calling the calendar: parameter specified is not valid target control"); + } + + this.target = obj_target; + this.time_comp = BUL_TIMECOMPONENT; + this.year_scroll = BUL_YEARSCROLL; + + //------------------------------- + // register in global collections + //------------------------------- + + this.id = calendars.length; + calendars[this.id] = this; +} + +/*--------------------------------------------*/ +// POP-UP Calendar +/*--------------------------------------------*/ + +function cal_popup2 (str_datetime, already_opened) +{ + this.dt_current = this.prs_tsmp(str_datetime ? str_datetime : this.target.value); + + if (!this.dt_current) + { + return; + } + + //------------------------------- + // If already open, don't load path... + //------------------------------- + + if ( already_opened ) + { + calendar_url = 'calendar.html'; + } + else + { + calendar_url = ipb_skin_url + '/calendar.html'; + } + + var obj_calwindow = window.open( + calendar_url + '?datetime=' + this.dt_current.valueOf()+ '&id=' + this.id, + 'Calendar', 'width=200,height='+(this.time_comp ? 215 : 190)+ + ',status=no,resizable=no,top=200,left=200,dependent=yes,alwaysRaised=yes' + ); + + obj_calwindow.opener = window; + obj_calwindow.focus(); +} + +/*--------------------------------------------*/ +// timestamp generating function +/*--------------------------------------------*/ + +function cal_gen_tsmp2 (dt_datetime) +{ + return(this.gen_date(dt_datetime) + ' ' + this.gen_time(dt_datetime)); +} + +/*--------------------------------------------*/ +// date generating function +/*--------------------------------------------*/ + +function cal_gen_date2 (dt_datetime) +{ + return ( + (dt_datetime.getMonth() < 9 ? '0' : '') + (dt_datetime.getMonth() + 1) + "/" + + (dt_datetime.getDate() < 10 ? '0' : '') + dt_datetime.getDate() + "/" + + dt_datetime.getFullYear() + ); +} + +/*--------------------------------------------*/ +// time generating function +/*--------------------------------------------*/ + +function cal_gen_time2 (dt_datetime) +{ + return ( + (dt_datetime.getHours() < 10 ? '0' : '') + dt_datetime.getHours() + ":" + + (dt_datetime.getMinutes() < 10 ? '0' : '') + (dt_datetime.getMinutes()) + ":" + + (dt_datetime.getSeconds() < 10 ? '0' : '') + (dt_datetime.getSeconds()) + ); +} + +/*--------------------------------------------*/ +// timestamp parsing function +/*--------------------------------------------*/ + +function cal_prs_tsmp2 (str_datetime) +{ + //------------------------------- + // if no parameter specified return current timestamp + //------------------------------- + + if (!str_datetime) + { + return (new Date()); + } + + //------------------------------- + // if positive integer treat as milliseconds from epoch + //------------------------------- + + if (RE_NUM.exec(str_datetime)) + { + return new Date(str_datetime); + } + + //------------------------------- + // else treat as date in string format + //------------------------------- + + var arr_datetime = str_datetime.split(' '); + + return this.prs_time(arr_datetime[1], this.prs_date(arr_datetime[0])); +} + +/*--------------------------------------------*/ +// date parsing function +/*--------------------------------------------*/ + +function cal_prs_date2 (str_date) +{ + var arr_date = str_date.split('/'); + + if (arr_date.length != 3) return alert ("Invalid date format: '" + str_date + "'.\nFormat accepted is dd-mm-yyyy."); + if (!arr_date[1]) return alert ("Invalid date format: '" + str_date + "'.\nNo day of month value can be found."); + if (!RE_NUM.exec(arr_date[1])) return alert ("Invalid day of month value: '" + arr_date[1] + "'.\nAllowed values are unsigned integers."); + if (!arr_date[0]) return alert ("Invalid date format: '" + str_date + "'.\nNo month value can be found."); + if (!RE_NUM.exec(arr_date[0])) return alert ("Invalid month value: '" + arr_date[0] + "'.\nAllowed values are unsigned integers."); + if (!arr_date[2]) return alert ("Invalid date format: '" + str_date + "'.\nNo year value can be found."); + if (!RE_NUM.exec(arr_date[2])) return alert ("Invalid year value: '" + arr_date[2] + "'.\nAllowed values are unsigned integers."); + + var dt_date = new Date(); + dt_date.setDate(1); + + if (arr_date[0] < 1 || arr_date[0] > 12) return alert ("Invalid month value: '" + arr_date[0] + "'.\nAllowed range is 01-12."); + dt_date.setMonth(arr_date[0]-1); + + if (arr_date[2] < 100) arr_date[2] = Number(arr_date[2]) + (arr_date[2] < NUM_CENTYEAR ? 2000 : 1900); + dt_date.setFullYear(arr_date[2]); + + var dt_numdays = new Date(arr_date[2], arr_date[0], 0); + dt_date.setDate(arr_date[1]); + if (dt_date.getMonth() != (arr_date[0]-1)) return alert ("Invalid day of month value: '" + arr_date[1] + "'.\nAllowed range is 01-"+dt_numdays.getDate()+"."); + + return (dt_date) +} + +/*--------------------------------------------*/ +// time parsing function +/*--------------------------------------------*/ + +function cal_prs_time2 (str_time, dt_date) +{ + if (!dt_date) + { + return null; + } + + var arr_time = String(str_time ? str_time : '').split(':'); + + if (!arr_time[0]) + { + dt_date.setHours(0); + } + else if (RE_NUM.exec(arr_time[0])) + { + if (arr_time[0] < 24) + { + dt_date.setHours(arr_time[0]); + } + else + { + return cal_error ("Invalid hours value: '" + arr_time[0] + "'.\nAllowed range is 00-23."); + } + } + else + { + return cal_error ("Invalid hours value: '" + arr_time[0] + "'.\nAllowed values are unsigned integers."); + } + + if (!arr_time[1]) + { + dt_date.setMinutes(0); + } + else if (RE_NUM.exec(arr_time[1])) + { + if (arr_time[1] < 60) + { + dt_date.setMinutes(arr_time[1]); + } + else + { + return cal_error ("Invalid minutes value: '" + arr_time[1] + "'.\nAllowed range is 00-59."); + } + } + else + { + return cal_error ("Invalid minutes value: '" + arr_time[1] + "'.\nAllowed values are unsigned integers."); + } + + if (!arr_time[2]) + { + dt_date.setSeconds(0); + } + + else if (RE_NUM.exec(arr_time[2])) + { + if (arr_time[2] < 60) + { + dt_date.setSeconds(arr_time[2]); + } + else + { + return cal_error ("Invalid seconds value: '" + arr_time[2] + "'.\nAllowed range is 00-59."); + } + } + else + { + return cal_error ("Invalid seconds value: '" + arr_time[2] + "'.\nAllowed values are unsigned integers."); + } + + dt_date.setMilliseconds(0); + return dt_date; +} + +/*--------------------------------------------*/ +// Error +/*--------------------------------------------*/ + +function cal_error (str_message) +{ + alert (str_message); + return null; +} diff --git a/Development/javascript_uncompressed/skin_acp/clientscripts/ips_hierarchical.js b/Development/javascript_uncompressed/skin_acp/clientscripts/ips_hierarchical.js new file mode 100644 index 00000000..ed97e2b5 --- /dev/null +++ b/Development/javascript_uncompressed/skin_acp/clientscripts/ips_hierarchical.js @@ -0,0 +1,147 @@ +//------------------------------------------------------------------------------ +// IPS JS: HIERARCHICAL DISPLAY FUNCTIONS +// (c) 2005 Invision Power Services, Inc. +// http://www.invisionpower.com +// Matt Mecham (13/12/05) +//------------------------------------------------------------------------------ + +function hierarchical() +{ + /** + * Class variables. + * + * @var string Cookie name + * @var string Refresh display URL + * @var string First part of the image ID title string + */ + + this.cookie_name = ''; + this.location_url = ''; + this.toggle_image_id_name = 'hier-toggle'; + + /** + * INIT: Grabs IDs from the HTML and + * sets up the various functions + */ + + this.init = function() + { + //----------------------------------------- + // Do DIVs + //----------------------------------------- + + var divs = document.getElementsByTagName('IMG'); + + //---------------------------------- + // Sort through and grab links + //---------------------------------- + + for ( var i = 0 ; i < divs.length ; i++ ) + { + try + { + if ( ! divs[i].id ) + { + continue; + } + } + catch(error) + { + continue; + } + + var divid = divs[i].id; + var divname = ipsclass.get_name_from_text( divid ); + var divnum = ipsclass.get_id_from_text( divid ); + + //---------------------------------- + // Work with it? + //---------------------------------- + + if ( divname == this.toggle_image_id_name ) + { + divs[i].style.cursor = 'pointer'; + divs[i].toggle_image_id_name = this.toggle_image_id_name; + divs[i].location_url = this.location_url; + divs[i].cookie_name = this.cookie_name; + divs[i].toggle_id = divnum; + divs[i].onclick = hierarchical_events.prototype.toggle_folder; + } + } + }; +} + +/** +* Wrapper function +*/ +function hierarchical_events() +{ + +} + +/** +* Toggle Folder Action +* @param object Event Object +*/ +hierarchical_events.prototype.toggle_folder = function( e ) +{ + //----------------------------------------- + // Check.. + //----------------------------------------- + + if ( ! this.cookie_name ) + { + return false; + } + + //----------------------------------------- + // Cancel event bubbling + //----------------------------------------- + + e = ipsclass.cancel_bubble(e, true); + + //----------------------------------------- + // Set up + //----------------------------------------- + + var saved = new Array(); + var clean = new Array(); + var found_id = 0; + + //----------------------------------- + // Get any saved info + //----------------------------------- + + if ( tmp = ipsclass.my_getcookie( this.cookie_name ) ) + { + saved = tmp.split(","); + } + + //----------------------------------- + // Remove bit if exists + //----------------------------------- + + for( i = 0 ; i < saved.length; i++ ) + { + if ( saved[i] != this.toggle_id && saved[i] != "" ) + { + clean[clean.length] = saved[i]; + } + else if ( saved[i] == this.toggle_id ) + { + found_id = 1; + } + } + + //----------------------------------- + // Not found the ID, so add it + //----------------------------------- + + if ( ! found_id ) + { + clean[ clean.length ] = this.toggle_id; + } + + ipsclass.my_setcookie( this.cookie_name, clean.join(','), 1 ); + ipsclass.location_jump( this.location_url, true ); +}; diff --git a/Documentation/Installation Guide/data/Thumbs.db b/Documentation/Installation Guide/data/Thumbs.db deleted file mode 100644 index 662728a962fd48c120c0b71d96f0066a26b909b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9728 zcmeI2c|26z|Gv^86Bm@F>f5}fY0_&i!o4?H=11K2* zv^i%2FauZstN=CuJAeZ~n{Q4~0vCXAe>?t(O#ao???%7^;tM|h5J`vu#0QjqkYF&Q zKQ8>hV>T{FyC3|S?9EOkE!8y9L4nc}k*}J&{;a|ee8&Kxr`u?sR{lVhFDfs-bynp^ zEBqgNwDxKDKw8}VX#2D{vZe(VklkO4zy0^`*iW;0<=c&&)_2-a(B|a-i+@_&)9w|t zd%*Yc&jXHm0ek=$fFB?L5CjMTgaNea76pg_!~qfjNq`hU8XyCZ1#AJx0ptN&0owoy z07ZZjU^`$3KpC(TK=U73zi8vA3V;LD0O|k@fF@uMKntJ^&;cL-NWflzEI-~hl3Kx+>L%7XwOfCa!3a2Q|(um;!wYyoxvdw>JL5#R)H2Dkud z*EtGGSAZMf7{DEH9N+;s0q_KP0lWbx0cZfN9*uv8(0q{&P(u&=_Z@Wr!ewG;YzUzP zPJIM?Akdo|j0_BntV~RsnAus`+1Xgx*fw+UaBb$`=3ryv;^*S# z<%7Xs?3@CE{Ct8ud@w%RMd+ZQ4g(_#BO?pnX12|Ie_5zcAl%Ggj@h7e(hz!XIw&_C zwSneGbc~?4v<`n0I(pE@O-#%ztZYD`oC`!K6iUwkrS%$Uhl1}R4BU)7QoD3F@g6$L zB#q%yIiHZhETi|}Da@jET6VXqUlB5>2~V%n{sCtKgMvfCFIjJgz^n3R0=TFUhsshL^XcXM*@<>iV;E`DIlHx6IH?`(oLT85Z`pEc?T-|F)|K!VaYalLzGn0k~AG7O!?Mm@*$sSyNzxZ=wm^6HVuPL8FN%vz%+SH-5g`z@~4umwAHrwd%HZ%vj`NT_YZ zC2k|{e(D#L;@nwwvn7%+Sym-`ZLduKHNzg8dn96}3%dbkx`NQ8R$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(WL z6O}ronQVTAs{&ZN;5aYD8W^EOU;ms$~nQJAlZhi6`M#jJE9%yy8*95qhDL}ilmh_l4Wk5<@yW7)Z-$c<+t z7x<-xmODQ34O(vVOD4 z#;@8ZK`!3|p!z?wXn9oV|DxpzboIei{Q+NV(v<$1fb7~I`F~nI@<(c$1EqK06lpoz ze+r4pf713w-S6|j8|Qws z{N9^nK_!|U8{TyMo9}(EL-Qq?zi#Mktlx@(JwLzJhZTrOK0e`aOi%oAZtcR(N0m4?lEPb7VVosHlScw z%??%HOGu9GSeM^2Mk(U8k7ishV2y{meM?%e4=-o67ri{MeZ9!Uu_y1y3zayAE9#yk z&h8X_GHE7#2pKh%(eBad@4^$iXE)#YVrlpDJDxkxx#!;RE8TYt-Kb*qG{I^A(YPs+ z@`c(#_Vtt+rFT8Lg^gYm-p-sf2a+ohn^Skh**gBC{6(lJB>xV>L8b@x6(aBSu4;@u zUMW-}jCOQ%d9P%p?MmOBoWAgWMJ0M`vFNA5w7xyTdQXc5p`ELwyI)flV&n zsfqzf_K(5@s;;`(NRPO}Ou4Hj6RL#Z37COeKJrpSf|G-%&86dVPP2V`(Fukj=~`}F zMnSD(qo)K-*p{ktlF@hjN3n~FLiU#aB{S%vmIXxEY(W3=ip0_ct}c4?M6o~*6%r8I zTs~flr_7BMch6DGIZ5*C7adk?+R6^u{(dSmdK=xw0+05r{1Z72R%<80FTd{KKQF$2 M&i+Z2f9qHO1@pjwasU7T diff --git a/Documentation/Installation Guide/data/help.html b/Documentation/Installation Guide/data/help.html deleted file mode 100644 index 1dc67068..00000000 --- a/Documentation/Installation Guide/data/help.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - - Инструкция по установке IPB: Help & FAQ - - - - - - - - - - - - - - - - - - - - - -
Секции: Проблемы при установке | Проблемы в Админцентре | Проблемы с форумом | Получение дальнейшей помощи
- - - -
- - - - - - - - - - - - - - - - - - -
Проблемы при установке
- - При загрузке файла установщика я получаю страницу с кодом
-Если при загрузке в вашем браузере файла для установки форума у вас просто загружается страница с кодом вместо нормальной страницы для начала установки, это означает, что у вас не установлен либо неправильно настроен PHP. В этом случае обратитесь к вашему хостеру для разрешения проблемы.
-
- Я получаю ошибку типа «access denied for user@localhost using password YES» при нажатии на кнопку начала установки форума.
-Если вы получаете такую ошибку mySQL, это может означать, что название базы mySQL, имя пользователя mySQL, пароль mySQL или хост mySQL указан неверно. Дважды проверьте введенную вами информацию и особое внимание уделите вводимому паролю базы. Чаще всего пароли бывают чувствительны к регистру. Если данная ошибка постоянно повторяется, обратитесь к своему хостеру для проверки того, что вводимая вами информация верная.
-
- - После установки я получаю такую ошибку: «Warning: fopen("/.install.lock", "w") - Permission denied ...»
-После установки, Invision Power Board пытается создать файл-«блокировщик», который блокирует скрипт установки форума. Если вы получаете эту ошибку, это означает, что ваш файл-установщик не может создать такой файл. После первого входа в Админцентр удалите файл установки «install/index.php» со своего сервера, и можете загрузить его снова только в том случае, если хотите установить форум заново. В дальнейшем не обращайте внимания на эту ошибку.
-
- - При установке форума я получаю ошибку типа: «ВНИМАНИЕ! Невозможно определить местоположение файла 'conf_global.php'»
-Это означает, что установщик не смог определить местонахождение файла 'conf_global.php'. Проверьте наличие этого файла в корневой папке форума на сервере. Если этот файл загружен правильно, и на него установлен верный атрибут CHMOD, тогда вы можете указать установщику, где искать данный файл. Для этого откройте файл 'install/index.php' в любом текстовом редакторе. Найдите вверху строку «$root = "./";». Укажите полный реальный путь в этой переменной. Примечание: надо указать именно путь, а не URL. Если вы введете что-то типа «http://www.domain.com», вы получите ошибку. Путь надо указывать от корня до текущей папки (например, '/home/site/public_html/forums/'). Более подробная информация приведена в верхней части установщика. После окончания редактирования сохраните отредактированный файл, загрузите его на сервер и начните установку форума.
- - - -
- - - - - - - - - - - - - - -
Проблемы в Админцентре
Никак не получается войти в Админцентр
- В целях дополнительной безопасности Админцентр производит проверку вашего IP. В некоторых случаях ваш IP может изменяться (особенно, если вы используете dial-up соединение). Для разрешения проблемы вы можете отключить проверку Админцентра на IP.
- Для этого откройте файл «admin.php« в вашем текстовом редакторе. В начале файла найдите и измените строку $check_ip = 1; на $check_ip = 0;. Сохраните изменения и перезагрузите файл на сервер.
- Хоть это и не очень опасно, но вы не должны показывать ID вашей административной сессии кому-либо и не должны где-либо выкладывать ссылку, содержащую данные административной сессии.
-
- При попытке зайти в Админцентр я получаю чистую страницу
- Эта проблема может появиться по следующим причинам.
- Во-первых, откройте файл «admin.php» в вашем текстовом редакторе и измените следующую строку: $use_gzip = 1; на $use_gzip = 0;. Сохраните изменения в файле и перезагрузите его на сервер.
- Если проблема при этом не пропала, проверьте атрибут CHMOD всех под-папок вашего форума. Если вы не уверены в правильности установки CHMOD, установите этот атрибут для всех папок форума на 0777.
- - - -
- - - - - - - - - - - - - - -
Основные проблемы форума
При попытке зайти на форум я получаю чистую страницу
- А в Админцентр вы можете зайти? Если вы не знаете, как зайти в Админцентр, введите в адресную строку вашего браузера следующий адрес http://www.ваш_форум/admin.php (не забудьте изменить ссылку вашего форума!).
- Если страница Админцентра у вас загрузилась, проделайте следующее:
- Нажмите на «Системные настройки» в левом фрейме для раскрытия этого подменю. Затем нажмите там на «Все основные настройки». В правом фрейме выберите пункт «Глобальные настройки форума». После загрузки страницы правого фрейма отключите (Нет) Принудительно отправлять HTTP заголовки? и включите (Да) Отключить GZIP сжатие? Сохраните проделанные изменения и попробуйте войти на форум.
- Если все еще загружается чистая страница, проверьте атрибут CHMOD всех под-папок вашего форума. Если вы не уверены в правильности установки CHMOD, установите этот атрибут для всех папок форума на 0777.
-
- Я использую Windows-сервер, и при попытке зайти на форум я получаю Internal Server Error (внутренняя ошибка сервера)
- В движке есть опция отключения заголовков, печатаемых Invision Power Board.
- Зайдите в Админцентр, нажмите на «Системные настройки» в левом фрейме для раскрытия этого подменю. Затем нажмите там на «Все основные настройки». В правом фрейме выберите пункт «Глобальные настройки форума». После загрузки страницы правого фрейма, отключите (Нет) Отправлять HTTP заголовки?, сохраните изменения и попробуйте войти на форум.
-
- Я использую Windows-сервер, и при попытке отправки сообщения на форуме у меня загружается чистая страница
- Некоторые Windows-сервера используют другой HTTP-протокол при запросах HTTP-редиректа. Для изменения этого имеется опция в Админцентре.
- Зайдите в Админцентр, нажмите на «Системные настройки» в левом фрейме для раскрытия этого подменю. Затем нажмите там на «Все основные настройки». Выберите опцию «С использованием заголовка Refresh: (Windows)» в поле «Тип переадресации». Сохраните изменения.
- - - -
- - - - - - - - - - - - - -
Дальнейшая помощь
Если у вас появились какие-то проблемы, не надо паниковать!
- Для решения этих проблем вы можете обратиться в службу поддержки.
- Также вы можете обратиться к нам на форумы IBResource.ru. Форум посещают очень много специалистов, имеющих большой опыт использования Invision Power Board, и, возможно, они дадут вам дельный совет по устранению вашей ошибки. Рекомендуем воспользоваться поиском по нашему форуму. Вполне вероятно, что кто-то уже имел ошибку, аналогичную вашей, и к этой ошибке найдено решение.
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/Documentation/Installation Guide/data/install.html b/Documentation/Installation Guide/data/install.html deleted file mode 100644 index 7d509a77..00000000 --- a/Documentation/Installation Guide/data/install.html +++ /dev/null @@ -1,326 +0,0 @@ - - - - - Инструкция по установке: Установка - - - - - - - - - - - - - - -
Установка: Шаг 1 — Загрузка файлов
-


- Распакуйте скачанный архив форума и ознакомьтесь сначала с содержимым и необходимыми правами CHMOD. Убедитесь в том, что ваш сервер поддерживает создание папок и длинные названия файлов и папок. -

- Если вы еще не создавали папки под форум, создайте такую папку на сервере (например, если вы хотите, чтобы ваш форум вызывался по адресу 'http://www.domain.com/forums/', создайте папку с названием 'forums' в папке - 'public_html' или 'www' на вашем сервере.
-
- При помощи FTP-клиента, загрузите все содержимое папки upload в созданную под форум папку (если вы по совету выше создали папку с названием 'forums' загрузите, содержимое вышеуказанной папки в эту папку.)
-
- Используя FTP-клиент, создайте следующие папки на сервере: «cache», «install», «ips_kernel», «jscripts», «lofiversion», «modules», «retail», «skin_acp», «sources», «style_avatars», «style_emoticons», «style_images», «upgrade» и «uploads» (Совет: если ваш FTP-клиент поддерживает технологию «Drag n' Drop», вы можете сэкономить некоторое количество времени, просто выбрав все файлы распакованного ZIP-архива и перетащив их в окно вашего FTP-клиента; тем самым вы скопируете все файлы на сервер, а FTP-клиент автоматически создаст необходимые папки за вас. Если вы поступили именно так, в дальнейших инструкциях вы можете пропускать пункты, связанные с загрузкой файлов, а только выполнять инструкции по установке CHMOD). -
-
- Загрузите из распакованного ZIP-архива файлы на сервер. Заметим, что размещение файлов по папкам на сервере должно быть таким же, как и в архиве. После окнчания загрузки, установите CHMOD для папок «skin_cache» и «uploads» на 0755 (при дальнейшей настройке, если у вас появится сообщение об ошибках CHMOD, измените данный атрибут для вышеназванных папок на - - 0777).
-
- Переименуйте файл «conf_global.php.dist» в «conf_global.php», далее установите ему CHMOD на 0666 (при дальнейшей настройке, если у вас появится сообщение об ошибках CHMOD, измените данный атрибут для этого файла на 0777).
-
- Теперь вы можете перейти к следующему шагу.

- -
- - - - - - - - -
Установка: Шаг 2 — Использование установщика (инсталлятора)
- Установщик требуется для ввода информации, необходимой для подключения Invision Power Board к базе mySQL и для создания аккаунта Администратора.
-
- Запустите установщик через ваш браузер. Введите для этого в адресную строку вашего браузера адрес (например, если вы создали для форума папку с названием forums, введите - - http://www.domain.com/forums/install/index.php, естественно, заменив 'domain.com' на адрес вашего домена.) -
-
- При загрузке страницы, если у вас появится сообщение-ошибка о неправильных атрибутах для файла «conf_global.php» измените с помощью FTP-клиента CHMOD файла «conf_global.php» на 0777.
-
-Нажмите на кнопку для продолжения. На следующей странице вы должны будете ввести имя пользователя и пароль mySQL. Если вам неизвестны эти данные, обратитесь за информацией к своему хостеру.
-
-Далее введите название сервера mySQL. Обычно используется «localhost» (без кавычек).
-Если вы создали новую базу данных для Invision Power Board или собираетесь использовать уже существующую базу данных, введите название базы в соответствующее поле.
-
-Если вы не собираетесь в дальнейшем устанавливать другой форум Invision Power Board в эту же базу данных, можете оставить пустым поле «Префикс таблиц». При отсутствии пароля mySQL (к примеру, если вы устанавливаете Invision Power Board на локальный сервер) оставьте пустым и поле пароля.
-После нажатия на кнопку продолжения установки, при наличии каких-либо ошибок, вы будете проинформированы об имеющихся ошибках; например, ошибка типа «permission denied for user@localhost using password YES» — может означать, что введенные вами имя пользователя или пароль, либо название базы mySQL являются ошибочными. Обратитесь в этом случае за точной информацией к своему хостеру.
-
-После успешного завершения установки форума вы будете уведомлены об этом.
-После полного завершения установки нажмите на ссылку авторизации на форуме и введите имя пользователя и пароль Администратора, указанные вами на начальной стадии установки.
-По завершении авторизации на форуме нажмите на ссылку «Админцентр», находящуюся в верхней части вашего форума.
- - -
- - - - - - - - -
Установка: Шаг 3 — Админцентр и первые шаги
- Админцентр форума Invision Power Board очень многофункционален. Здесь вы можете создавать новые категории и разделы форума, - - редактировать фильтры нецензурных слов, смайлики, изменять цвета форума и т.д.

Рекомендуем вам прочесть документацию на Invision Power Board перед попыткой редактирования каких-либо более сложных функций. - - -

- Важные замечания!
-Самое первое, что вы должны сделать — удалить файл «install/index.php» с вашего сервера; хотя Invision Power Board и блокирует этот файл после успешной установки форума, кто-нибудь может удалить файл блокировки установщика и при запуске файла-установщика - - удалить все существующие таблицы вашей базы данных.
-
- Поздравляем! Вы установили и настроили ваш форум Invision Power Board. При возникновении каких-либо затруднений нажмите на ссылку «Помощь» в верхней части этой документации.
-
- Благодарим за использование и поддержку Invision Power Board
- -
-
-
-
- - - - - - - - - - - - -
Структура файлов и CHMOD-атрибуты
Ниже вы можете увидеть таблицу с рекомендуемыми атрибутами CHMOD для файлов (и, при необходимости, для папок).
- Установка CHMOD не обязательна для Windows-серверов и может быть проигнорирована. Необходимое значение CHMOD может быть разным для разных серверов. Если вы сомневаетесь, используйте для всего атрибут — 0777.
- На некоторых системах вообще не требуется установка CHMOD-атрибутов для успешной инсталляции форума. Используйте таблицу ниже для ознакомления с атрибутами, необходимыми для установки форума и после установки.
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Название файла/папкиНеобходимый CHMODCHMOD для содержимого папкиCHMOD для установки форумаCHMOD после установки
PHP fileadmin.php- - - - - - - -
foldercache0755 - - - ДА - - -
foldercache/skin_cache0755 - - - ДА - - -
foldercache/lang_cache0755 - - - - - - -
PHP fileconf_global.php0666 - - - ДА - - -
PHP fileipb_templates.xml- - - - - - - -
PHP fileindex.php- - - - - - - -
folderinstall- - - - - - - -
folderips_kernel- - - - - - - -
folderjscripts- - - - - - - -
folderlofiversion- - - - - - - -
foldermodules- - - - - - - -
folderretail- - - - - - - -
folderskin_acp- - - - - - - -
foldersources- - - - - - - -
folderstyle_avatars- - - - - - - -
folderstyle_emoticons0755 - - - - - ДА -
folderstyle_images0755 - - - - - - -
folderupgrade- - - - - - - -
folderuploads0777 - - - ДА - - -
-
-
- - - - - \ No newline at end of file diff --git a/Documentation/Installation Guide/data/logo4.gif b/Documentation/Installation Guide/data/logo4.gif deleted file mode 100644 index 84421a18cd7d92bf2a0a6b20d6073e8c40d64476..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5476 zcmWlY`9IT-TK zb8gN#(p1hi&5;V#I^R0*{eGT5JpX~`tx?;^$TL+_|3c?sqU_nvKJ{mxRK@Ykfy(ZW zuB?in^!D?j(Sr7`uIC<~zoiUJY4u8K3%%OqeD=|yxQ1}Spj%{piEJ`Y{?YStV?@#0 z#47E+h&o0}cU<`_BdvEQ^L~zW()&_FMp6I8!to1*Z`egDFOH(5aojuQsoVLgv6;D| zuJ882CDYnpZs#iK(Y2A{sS`H_eABx3hD$s_nIBgfCmJ}DJK}n=)}Pz$&1v(v)b{Sv zTzvj;Vg1DUf=OSn@z~Xu7xQ0(xxKs3R38DG?Ls7{v--S1xldZR)43Xt_@V@pKiKKj6=4W@hwWt9)}Xx~5$D>&WF6ACBTkT-~W#{ocv#;W;Y$ zrOqRlngY0rs@^YA_s34#*vd%m@=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U#U7d zX2_AA9-$lBQqv-pJk{p5D>I7x=r~I)RH=e;v?#mqr$f2Dp*Dm_1}=dG8+e5<1fI^Q zdKa|4*ei8@EXXDnY_g~41*=cjmcRgDEG^y$n)6PPUw7Oc(& zxewEq>1r{egHV^lc;$1gfFET2!nC8YCRps3i4?5E1})S%aS!4QvGA zhE!xMAGcXj(@PuNBto4f;DX463$_E74F;V>sB`-Vc^~j+HV%dCADpKToHZCs-Z&8c z^o28j_%a_CnlRMMAIg{?1_{HQ@_~8&NJ+y;nR?{k`4Nf1s|wp!RerCk6JFIk9dVYt zs#m{ioPQ-VP&M1CTK!b*2`Yt9)%D@kCZ(!(UZpfpKetuC^ivNcsE35=kp{JjpzgKT zsx=0qH(+#7u>d}uINBhXHzu3P1=J)zX!s|KV>t7A8|EOOt%)bWK TXrOi)xW5K@Nwa7`26p}*E3g#; diff --git a/Documentation/Installation Guide/data/logobg.gif b/Documentation/Installation Guide/data/logobg.gif deleted file mode 100644 index b8ec25f76721f915fc8a15e53a9bf25901b43b8c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3295 zcmV<53?TDINk%w1VQ~O70QUd@bgJx3b-T&b>20CocBJ9u>h${i{Zxa?UyRH{X{|(U zv{;79?C|$jf4*_2>7lpVPjv5*%cB9{Trs8?1<9e&- ze68tyuIhfT>wdBAfU@s_wDE$q@q)GTg0}Nqh{;cPxMh~z*yQ$Ih{^4#O_UVgc9pWJ4Lz+R8of3)&sm*7TkwpWMIL~prysN{dB;drU% zSb@P+eY}3H=&HTmXqw@Hw)DNt=x?6hkEhX9dAqR7?@)Zie6a7a%3OT`b*b!o zvGI4R?EnA&A^8LV00000EC2ui0C4~`000R80FwxeN3P$OCfc-ZG7BCXDA^J#Ud*_$({Vj%bqQnvI8h%eCXcIySMM(zsEpvAglH3UdWRxU#@(x zA~t#)B%DsYy7lYW6CQKm&K|LDAHs|OA5Xr#dGg(e<@4s_||mtck|CYWOQz{WX1G^yr-X=IUylweLE=b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DHt^x6UkK*GX54p%kPV$nA+yVjr$HBu* zF7kGSVj6^yfc+RG01I5B9V{P3JDv~<>@vszcpyX@o`Ca^x8vwYPrA~V&h(}){Rvj! z_RXEHbPGU03pl8P2?`K}u6I2JH}HTkEI{>kSbz^xa7GHe?sYieApu%|Kqy3^bWzy- z?s(6;-uKS;y0fgwmG)NE%*IOVIe3(WL zXm9)C!`%v-&_VA>AByHX|M}35zVxS0eH~B$>j{uM^_|ZL5>UVjJqW+N_^mLFP4Hp+ z+$X^_z%Tyrlb;0Vm%a|>PyhPc|Ni*Tzy9YB0V^Cn0VJ@0^T!9>M*af+(1RD!76uxCvIE z1szBTyT^hwSc5jWf|`(nI=F*8*n>X!gFxtm&;WjfV0$tcgh-f#O6Y@|(1cF-gisiT dQaFWFScU61d - - - - - - - - - - Invision Power Board Меню - - - - - - - - - -
-
-
-
-
- - - - - - - diff --git a/Documentation/Installation Guide/data/tile_back.gif b/Documentation/Installation Guide/data/tile_back.gif deleted file mode 100644 index 330833bbb36e28d9eab84af313264885b39be08c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 488 zcmZ?wbhEHb!+5TUn`b9YT5BMqVZsC=gEdm?_)Yn1eR|rTk@cK z&5MNIvr#RFlO|k9o^&a(|9tcIFCo>t>ejywuiqEma3H8+d(*bhRjZ#jZvGJ8bEahB z-I%sx(XB^=Dt81|?X2JUu59uB+I6p*cYF;f+uFG0W9h=XAvL>e*1nAEIvrZOr+n$d z$fiS;D<0Qvd|S8SP1DwoVRd_}Rz77Q4k-R)0V~u2ksv=Yu>E&vEbtH!=sTg3cqGTl zed3A|shtt)Z+Iu1e#@5dV1q=M*6j03d#cW!lezcd2cygS+m7q@)V;6z`M*J5xVfcO zSgE74OG%@*uU~_E(&Q=J64PhQlrWkzci#L3M!JiaEY)RRv2qo&_S$vpwYfHJ-omB0 zeaB8kwLN?HsYxF^bXc1I*zptme5cQxnnUK@`wud*pTB&S<^A#V7q8CWfB$v3IAlCFIJ7o%2!|~=uwkJym!Xo^90}*v zqummrb8ej2_?VMZ!MSV7hlNW{PL{V>5p(iVbL(`2 - - - - Invision Power Board Инструкция по установке: Добро пожаловать - - - - - - - - - - - - - - -
Добро пожаловать в Invision Power Board!
-
- Добро пожаловать в Invision Power Board, который является быстрым и эффективным решением, написанным на языке PHP с использованием базы данных MySQL.
-
-Данное руководство ознакомит вас с процессом установки Invision Power Board. После прочтения этого документа вы сможете самостоятельно установить и настроить свой форум Invision Power Board.
-Процесс загрузки всех файлов форума на сервер, установка форума и ваша авторизация в админцентр собственного форума отнимет у вас не более 30 минут.
-
-Во-первых, необходим какой-нибудь FTP клиент. Если у вас нет никакого FTP клиента, вы можете скачать Smart FTP или Total Commander для Windows, либо InterArchy для Macintosh.
-Не обязательно иметь какие-либо знания в области PHP-программирования для установки Invision Power Board, но неплохо было бы кратко ознакомиться с основными FTP-функциями.
-
- Это руководство предполагает, что вы уже скачали самую последнюю версию русской версии Invision Power Board, «распаковали» ZIP-файл и готовы приступить к действиям.
- В дальнейшем в этой инструкции ZIP-файл, скачанный вами, будет называться «zip-архив», папки, полученные при распаковке архива — «локальными папками», а папки вашего сайта — «папки на сервере». -
-
- Если вы все-таки испытываете какие-либо трудности с FTP-функциями, CHMOD-атрибутами и т.д., вы можете воспользоваться нашими услугами по установке форума. Установка форума на сервер клиента бесплатна! -
- -
- - - - - - - - - -
Требования
-
Требования сервера -
- Для использования этого движка, необходимо наличие установки на вашем сервере PHP 4.3.0 (или выше) и mySQL 3.22 (или выше). Если вам незнакомы эти показатели, вы можете обратиться с данным вопросом к своему хостеру. Если вы имеете собственный сервер и хорошо знакомы с этим, вы можете скачать PHP - и mySQL и установить их сами. Если ваш хостинг не поддерживает PHP и mySQL, вы можете приобрести хостинг по доступным ценам в сервисе IPS Hosting. -
Invision Power Board хорошо работает под сервером Apache. -

- Общие требования -
- Если у вас всего лишь одна база данных, предоставленная хостером, не обязательно просить новую отдельную базу данных для Invision Power Board, т.к. этот движок поддерживает префиксы таблиц, и опасность того, что какие-нибудь существующие одноименные таблицы будут перезаписаны, полностью отсутствует. -
Для начала установки, вы должны иметь название базы mySQL, имя пользователя и пароль mySQL с правами использования команд «CREATE», «DROP» и «ALTER» tables. -
Необходимо наличие как минимум 2 МБайт дискового пространства WEB-сервера и минимум 3 МБайт свободного места в базе данных mySQL для установки и первичного использования вашего форума. -
За более подробной информацией об объеме свободного места обратитесь к вашему хостеру. -

- >> Перейти к документации по установке! -
- -

- - - - - -
- - - - - \ No newline at end of file diff --git a/Documentation/Installation Guide/install_guide.html b/Documentation/Installation Guide/install_guide.html deleted file mode 100644 index 18336a2a..00000000 --- a/Documentation/Installation Guide/install_guide.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - Invision Power Board — Установка - - - - - - - - - - - - - -Вы нуждаетесь в нормальном браузере, чтобы просматривать страницы - -Internet Explorer 2 уже не браузер :)! - - - - - diff --git a/Documentation/InstallationGuide/data/chmod.html b/Documentation/InstallationGuide/data/chmod.html new file mode 100644 index 00000000..1330a38e --- /dev/null +++ b/Documentation/InstallationGuide/data/chmod.html @@ -0,0 +1,232 @@ + + + + + Invision Power Board Install Guide: Welcome + + + + +

File Structure and CHMOD values

+
+
+ Below is a table showing the file structure and recommended CHMOD values for the file (and in the case of directories, the CHMOD + values for the contents of the directories).
The CHMOD values are not needed for Windows based servers and can be safely ignored. The CHMOD + values may vary from system to system, if in doubt, CHMOD everything to 0777.
Most systems will not need to CHMOD everything to install successfully, + use the table below to determine what needs CHMOD'ding for installation, and what can be left until later. +
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 File/Folder NameItem CHMOD ValueContents CHMOD ValueCHMOD for installCan CHMOD later
PHP fileadmin- + - + - + YES +
foldercache0755 + - + YES + - +
foldercache/skin_cache0755 + - + YES + - +
foldercache/lang_cache0755 + - + - + - +
PHP fileconf_global.php.dist0666 + - + YES + - +
PHP fileindex.php- + - + - + - +
folderinstall- + - + - + - +
folderips_kernel- + - + - + - +
folderjscripts- + - + - + - +
folderlofiversion- + - + - + - +
foldermodules- + - + - + - +
folderresources- + - + - + - +
folderretail- + - + - + - +
folderskin_acp- + - + - + - +
foldersources- + - + - + - +
folderstyle_avatars- + - + - + - +
folderstyle_captcha- + - + - + - +
folderstyle_emoticons0755 + - + - + YES +
folderstyle_images0755 + - + - + - +
folderupgrade- + - + - + - +
folderuploads0777 + - + YES + - +
+
+
+ + + \ No newline at end of file diff --git a/Documentation/InstallationGuide/data/docs.css b/Documentation/InstallationGuide/data/docs.css new file mode 100644 index 00000000..fc0886b7 --- /dev/null +++ b/Documentation/InstallationGuide/data/docs.css @@ -0,0 +1,228 @@ +BODY +{ + background-color: #ffffff; + font-family: Verdana, Tahoma, "Lucida Sans", "Lucida Sans Unicode", Arial, Sans-serif; + font-size: 11px; +} + +#ipswrapper { + width: 100%; + margin: auto; +} + +.main_shell { + background-color: #6999DA; + border: 1px solid #24426A; + width: 706px; + margin-left:auto; + margin-right:auto; +} + +H1 { + margin: 0px; + background-image: url('images/title_bar.gif'); + padding: 7px 5px 6px 5px; + font-size: 13px; + color: #ffffff; + font-weight: bold; +} + +H2 { + margin: 0px; + font-size: 18px; +} + +H3 { + font-size: 11px; + margin: 0px; +} + +TABLE { + font-size: 10px; +} + +.content-text +{ + font-size: 12px; + line-height: 150%; +} + +.content-next +{ + margin-top: 10px; + font-size: 14px; + font-weight: bold; + background-color: #EEE; + padding: 6px; +} + +.content_shell { + + margin: 0px 3px 3px 3px; + border: 1px solid #24426A; + border-top: 3px solid #24426A; + background-image: url('images/main_bg.gif'); + background-repeat: repeat-x; + background-color: #EFF2F7; +} + +.package { + height: 517px; + background-image: url('images/package_bg.gif'); + background-repeat: no-repeat; + background-position: top-left; +} + +.content_wrap { + width: 70%; + height: 450px; + float: right; + margin: 6px 6px 4px 0px; + padding: 10px; + background-color: #ffffff; + border: 1px solid #000000; + line-height: 150%; + overflow-y:auto; + overflow-x:hidden; + -moz-border-radius: 10px; +} + +.install_info { + float: left; + margin: 10px 0px 0px 10px; + font-size: 12px; +} + +.install_info H3 { + font-size: 15px; + color: #6D87A9; +} + +.install_info UL { + margin: 0px; + margin-top: 15px; + padding-left: 25px; + list-style-type: none; +} + +#progress .step_done { + list-style-image: url('images/bullet_done.gif'); + color: #44638E; + font-style: italic; +} + +#progress .step_doing { + list-style-image: url('images/bullet_doing.gif'); + font-weight: bold; +} + +#progress .step_notdone { + list-style-image: url('images/bullet_notdone.gif'); +} + +.warning { + background-color: #EDF1AB; + border: 1px solid #6E704B; + padding: 5px; + font-weight: bold; + -moz-border-radius: 5px; + +} + +.hr { + margin: 4px 6px 0px 6px; + border-bottom: 1px solid #627686; +} + +.nav_button { + background-color: #B3C9E6; + border: 1px solid #24426A; + font-size: 12px; + padding: 3px 6px 3px 6px; + -moz-border-radius: 5px; +} + +.copyright { + width: 98%; + text-align: right; + font-size: 9px; + color: #9EA7B3; + padding-top: 3px; + padding-right: 5px; +} + +.eula { + height: 210px; + border: 1px solid #76774C; + background-color: #FDFDD3; + padding: 5px; + overflow: auto; +} + +#auto_progress LI { + list-style: none; + color: #029901; + font-size: 11px; + font-weight: bold; + padding: 3px; +} + +.done_text { + font-size: 14px; + font-weight: bold; +} + +#links { + margin: 0px; + padding: 5px; +} + +#links LI { + list-style: none; +} + +.float_img { + float: left; + margin-right: 5px; +} + +.info { + background-color: #DCE6F3; + border: 1px solid #5876A0; + padding: 4px; + line-height: 120%; + -moz-border-radius: 7px; + color: #1D3A60; +} + +.sql_form { + width: 100%; + font-size: 11px; + border-top: 1px solid #6A6A6A; + border-left: 1px solid #6A6A6A; + border-right: 1px solid #A8A8A8; + border-bottom: 1px solid #A8A8A8; +} + +FIELDSET { + border: 1px solid #2D4461; + background-color: #E6EBF1; + margin-top: 5px; + padding: 7px; + -moz-border-radius: 7px; + color: #2D4461; +} + +FIELDSET LEGEND { + font-weight: bold; +} + +TABLE .title { + color: #2D4461; + font-weight: bold; + padding-bottom: 3px; +} + +TABLE .content { + padding-bottom: 3px; +} \ No newline at end of file diff --git a/Documentation/InstallationGuide/data/help.html b/Documentation/InstallationGuide/data/help.html new file mode 100644 index 00000000..9bd78594 --- /dev/null +++ b/Documentation/InstallationGuide/data/help.html @@ -0,0 +1,293 @@ + + + + + + + + + Invision Install Guide: Help & FAQ + + + + + + + + + + + + + + + + + + + + + +
+ + Sections: Installation Problems | Admin CP Problems | Board Problems | Getting Further Help + +
+ + + +
+ + + + + + + + + + + + + + + + + +
Installation Problems
+ + When I run the installer, I get a page of code. + +
+ + If when accessing the installer via your web browser you receive a page of code and not the installation start screen, this means that either PHP has + + not been installed or has not been configured properly. Please consult with your web host to see if this is the case. + +

+ + I get an error like this 'access denied for user@localhost using password YES' when I submit the main form. + +
+ + If you receive this error from mySQL it means that either the mySQL database name, mySQL username, mySQL password or mySQL host information is wrong. Please double check the information you + + entered making sure that passwords are typed correctly. In some cases, this information is case sensitive. If this error persists, please consult with your web host to check that the information + + you have is correct. + +

+ + After installing, I get this error 'Warning: fopen("/.install.lock", "w") - Permission denied ...' + +
+ + After installing, Invision Power Board attempts to create a "lock" file which disables the installation script. If you receive this error, the installer + + has not been able to create this file. After you have logged into the Admin Center for the first time, you should remove the "install/index.php" script + + from your server and only re-upload it if you wish to make a fresh install. You can then safely ignore this warning. + +

+ + When installing I get an error like this: 'WARNING! Could not locate 'conf_global.php' + +
+ + This error means that the installer could not "guess" the location of the file 'conf_global.php'. Make sure you have uploaded this file into the same directory that you + + uploaded 'sm_install.php' into. If you have this file already uploaded and the CHMOD value has been set, then you can tell the installer where to look for this file by simply + + opening 'sm_install.php' in your favourite text editor. Look near the top for "$root = "./";". Edit this to reflect your "real" path. Note, this is a path - not a URL, entering "http://www.domain.com" or similar will + + result in an error. A path is literally the file path from the server root to the current directory (such as '/home/site/public_html/forums/'). More information is provided in the script near the top. When you have completed + + the edit, simply save the file and re-upload to your server and re-run through your web browser. + +
+ + + +
+ + + + + + + + + + + + + + + + + +
Admin CP Problems
+ + No matter what I do, I can't stay logged into the Admin CP. + +
+ + For extra security, the Admin CP checks your IP address as part of the admin session validation. In some cases your IP address will change with each page request (especially if you are using a dial up ISP). You can + + stop the Admin CP checking your IP address which will solve the problem. + +
To do this, open up "admin.php" in your text editor. Near the top of the script change $check_ip = 1; to $check_ip = 0;. Save the file and re-upload to your + + server. + +
Although there is no immediate security risk to doing this, you should not disclose your admin session ID to anyone or post the link you are using for that admin CP session to anyone. + +

+ + When I try to access the Admin CP, the page is completely blank + +
+ + This problem could be the result of a few things.
+ + Firstly, open up "admin.php" in a text editor and near the top change: $use_gzip = 1; to $use_gzip = 0;. Save the file and re-upload to your + + server. + +
+ + If that doesn't solve the problem, check the CHMOD values on the directories you created during the installation process. If in doubt, CHMOD them to 0777 and any directories contained within. + +
+ + + +
+ + + + + + + + + + + + + + + + + +
General Board Problems
+ + Every time I try to access a page on the forums it loads a blank page. + +
+ + Can you log into the Admin CP? If you do not know the url, enter the following into your web browser address bar http://www.your-domain-here.com/forums/admin.php (obviously using the correct URL to your board!). + +
If the Admin CP loads first time, try the following: + +
Click on "Board Settings" to expand the sub-menu. Click on "Basic Config". When the page has loaded, turn off the following: Print HTTP headers? and DISABLE GZIP encoding?. When complete, submit the form + + and try to access your board again. + +
+ + If it still loads a blank page, check the CHMOD values on the directories you created during the installation including any directories contained within. If in doubt, CHMOD to 0777. + +

+ + I am on a Windows server and I get an Internal Server Error when trying to access my board + +
+ + There is an option to disable the headers that Invision Power Board prints by default. + +
Log into your Admin Control Panel, click on "Board Settings" to expand the sub-menu. Click on "Basic Config". When the page has loaded, turn off Print HTTP headers? and submit the form + + and try to access your board again. + +

+ + I am on a Windows server and when I make a post I am taken to a blank page + +
+ + Some Windows based servers require a different HTTP protocol when redirecting HTTP requests, there is an option in the Admin Control Panel to overcome this. + +
+ + Log into your Admin Control Panel, click on "Board Settings" to expand the sub-menu. Click on "Basic Config". Choose "Refresh (Windows Savvy) from the "Type of auto-redirect?" option. Submit the form. + +
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Getting further help
+ + If you have a problem outside the ones solved in this guide, then don't panic!
+ + We have a large team of trained support professionals that will be able to provide a solution to your problems.
+ + Simply log into your client center and submit a ticket. + +

+ +If you wish to contact us for non-technical issues, please visit our Contact Page which includes a handy email form, mailing address and telephone number. + +
+ + + + + + + + + + \ No newline at end of file diff --git a/Documentation/InstallationGuide/data/images/addresses.gif b/Documentation/InstallationGuide/data/images/addresses.gif new file mode 100644 index 0000000000000000000000000000000000000000..ec274aee3a3448db7602481508b423e4d12ae651 GIT binary patch literal 1236 zcmV;_1S|VTNk%w1VHW@t0Qdg@tfru*q@upQz64jc>F4FTy1M7!*=)A+gTngl?d^nw zgjcTboSd9Rr|nyCciii-2{@$c>H zSFiHo;^Gl%!b_{}(a_IcvhiTB@0ORCtE;Q9u(0s(@S~%nuCA{0^YhBe%J%m5?(XjT z`ugkZ>%qanrKP3n>gt-BnpCRn=;-MA`T44FF?^=w`I>ACBDG;N-5&?d09o=i%Dx=I+T5M#YitnW#k zu<+8+(wUi= znVOo+(bIap_PMsR0!XkISFYFH;GmtFUas)5$==i0+=qyW5p&B6gWTcg>ub34hQIDo ztL)L&+EJnAQkmUckka7b-*30{Npz=4py-jq?{K>Gbh`DSu*4*o4@Ir*lWU}#Qw)Ane?Vh2c zsHmvv@bf{Z?31U#MWX59-rnc!@gs@a>f_u`tnhD>$vmU!cD?y#vhHK7?&0L-pP!$d zot@?7<-XVOm6n$6>gbxm>k)3qI+fjAu#B)a6R3>#W4uGk?kG@AD6K&vB*P`}g#Gy6)ZF+d7uz|NiB8PQlBq|KxrEjEzTQ3PyFFS z6icC}cb^U%fJG}12RPV*YC(r(03HYf-Bby|NS25x4mh~t0?1#D6@RRhdd2GCza`g# zC7Cg!5*-ht$eCS{!UT&AL(}3etjs?t3{cpyAVETfzY`S%lmHRtnh^xVzyV_;;U9z(7Iu^< zVIGDJ6enD8!!I~&QcD(SWRQyyVTOtufO0~U84XYmekIG07SU~K)fzXqBlmF zzK&=BUhV)eq5x9Z|EE2drP2Zyga52fH9bb-=j=*NQvc^y09fY$RpR%qSJ2nzlzDOn zHKsjhxBy4a#kPC@#CVyKjuBDBPk_4sJ+S}2ZvUk`XJ%*sGPvT$NB}~<09WGxFP;EV z*<4>^Ok%D#X~X}{f@FoS97U?$hdcd`Cu@PeGEQ^C&*yrL$0Rg~H9U+WLWFUJ#79U? zB|v;xXs`dja+#{tWP6GeLY@D!THE69i(fJY3~+~wtr{hN^|@*0-_@wF(*QB107uFI zW&QvrmIow|bB4J8tx&eW-VRmA-sSQCn>PSDtOOs1|ICAXk;ec@!vJ6P|GsYkOx^=M zunRGs06)9{L%{$gnE)r9|HF3yB8&i5;{Z_B04$yWK)L`Qi2z;sBTuu{-0lCJJO9>_ zQ)hb}PPCM$)zH}K(Aw*;fs4Y0ABIKpD_QwZ!KV=07=`1ZW;hTu<)T!2{M@g9gYAzznPl8 z07kYpZOuY~gT=-8~8x04lu!6EC z${~gVk2vDNU>vMf1`eRY$ZY|rFda{XGk{?WnuW3!5CB)~kD?}W+SS44WnnCK-nvZ# zHc8T`Z%FLCTUZZ3oFNw$;SlxYS2+=!2nLGxf(i^76OR2bK?2J*hD-rnLz7aOyh%?rVOXDPDT7j^_tdBhfMBvd+1?ZiG9!nJ0Os7}!88z2 zwG<9I5F;|o0w8w)Qq{oK``?sjyYvuU=of9ym}@0mcXU@G(FGU-*+n1&I)ZKqI9r SVG9HgY{3L6maH&PKma?B>Ju*j literal 0 HcmV?d00001 diff --git a/Documentation/InstallationGuide/data/images/box.gif b/Documentation/InstallationGuide/data/images/box.gif new file mode 100644 index 0000000000000000000000000000000000000000..e20d917b6694ef1bc92d93e6c40c757b9b32ff62 GIT binary patch literal 1652 zcmV-)28;PeNk%w1VITk?0QUd@rE&r2wK?;^OysdL|K+XQvSj4sn_Hf?BMm0|$CjvC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r?15<%->f(iN%ya0XJ@bL->MwGx4LH#ta1qu!n z^NA-FIN?DHEfg{XeaO5~fPoN7Y@q{Y1@*H*CI%QW#W^@M(S|S!03Zg<#C%{t2ZVFf yj}AykqQuqMh>?!d%%su4Y&|*DPX}8J;eZhBD1!nLYo`v;1`TXNiP}8{1OPkY)-iMd literal 0 HcmV?d00001 diff --git a/Documentation/InstallationGuide/data/images/bullet_doing.gif b/Documentation/InstallationGuide/data/images/bullet_doing.gif new file mode 100644 index 0000000000000000000000000000000000000000..8a085c3cd5491473e1b01890430c66c6d87b07c8 GIT binary patch literal 1008 zcmZ?wbhEHbp0%D`ShiC-#V!Yww*t((`8(Lr1H@m|B{dcZ>F*Sn z_$7MzpX#2I3)2==y!!Ec_RpNuOMy*K)A*XXN*)Cl+_ZE&qA9V3!DhXjPM?v~BJs#8 z28kyPf{&>D`u9io0H@3pUg1^|lf43}vxOY@N;zzGu-YKwdtAj~lU(*a?~;oiDQEPW zj?BosY^u6Ryy&u3##v*nc_I~812p>$legxX9} z_usVQ>$a_rq7%=AuKwJ)<>ckmwPh-+ME?E%-}59Q^s2t(Y|)Y%Va9tDGH?6zJddt^ z?%{t#Y4`W(pMHI`-mI0jq+GO1r0B9&-bJ$==Px?!l}fyAZnsY|@s##~a}WRj|IaWA zhzJ42pDc_F409NCKx#pGf`Q{KgC*yl62@b51U0{H5IiyApoC+ch^bYI`y~E0K8BMo zCThCyDc2u3V0mz*v#O}0nnKp)m)+uwiPI8(6fAe)k?VU@615>?a-&L%i$l_-<33U< zjaIgnk6I4QHZCpLaWX+!NPusy)!7qDiATA$=Q>EdDmm;F=2oGx)uB1{_!OxCla#AX zo;{O{qIDP<4!C+;Qwo)GnYks=w^2<`Zsv<6>P~W6L0Sc`f;bpiEj8LQqzW257}~Og eVi!6-Z{)M%vNL{iq={uFi-64^i6aII4Aua|olKMf literal 0 HcmV?d00001 diff --git a/Documentation/InstallationGuide/data/images/bullet_done.gif b/Documentation/InstallationGuide/data/images/bullet_done.gif new file mode 100644 index 0000000000000000000000000000000000000000..05cec2e0d31b755654b0f79ec816a74de451913f GIT binary patch literal 1009 zcmZ?wbhEHbbQCm$#m}y8X-Y5x6)2HTWyt5Su6Pe&wqwO zvzMRmFccZxeSd4tgK~xr;qKjw8Ky9V9ns`171Lj?{{Q!X?M73z1*!}+njJUdm~(`* z=WD9XQ0ds;$I#2Kw?VAtQmpH4d82vOQ}2{#uB_o$z`{A7L3{=G#fKM{pIqg?-_mur zlJ5a^hBoP(^>x3#{ZX5*!qCCddZtQg6=&y-#F@9Nzr6c8?REu6A79R~V7o2a4AU7n z+Sw&~r5SS7jMvKrA68di%bjpipRZVwzf>~uq<->gy|ztr1NK>~tQMSox0<0xxO?X! zhAB*(J?so~8JOlVNU!A3YBkcVH@N%umcveI{S_)9hc)$A$weO3QJ<~O&?@A%TS;Lh zf8FKCkb`D(?$s8b3VZeJP3poj{b`mAd1?%Ga+Z+^tPpP@c1{POM*2eYVQ| z_qVlHDafzj4%u(PFoWU$_y2~oEq}iH<-SLeA={E6$4YGt_y52DD=+(e{qSx1(`JTR zMW>w#40ZCnQ4XhM5fi|Nmzg1;mAb;!hSv z24H&E0VxON2?maH45pkaAClR)?JLE21Ws&V;Ifpz7t=6#+4<%+RkaldM4k$;O62Xc zxZtADq3jmEY(ZwT;)Mx33@jf4gItGqfHJvqsg{)dLG$t4(3Gus%ndmqjNdwq4HCHbw9U5KPFsJ>gIE{Tu`xNm+FB=5tUbO7)+jXC<@Q{a>wC8D)UUK^dmZ% zEG@xv7&y#qHzg-D2+N4F6m|q;URE&clu)@KvZ#~SK!DFcu#o*Cmk!Tv27ymZE=&0Q XrDBpa0uIa*4qfrU&>%9wfx#L8+tVO~ literal 0 HcmV?d00001 diff --git a/Documentation/InstallationGuide/data/images/bullet_notdone.gif b/Documentation/InstallationGuide/data/images/bullet_notdone.gif new file mode 100644 index 0000000000000000000000000000000000000000..fc5200af3e9be0e60178dd55565b55630f2556eb GIT binary patch literal 1010 zcmZ?w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!iQT_S;Wxii%%Q{uUGHc8{V8%L^-g5Tp_wDWNGoUdTr~>```!}^B z_w@KTv?)8aDv{ZCp5c0z-F3R#v-|q_9;gl^lOi8;BMzJZ4xa{Jx?d5b1$WR=w%o8G zjUX$AD=UjD5OEhjurL*U8uRk>O1L`t>H7NZ`ugwuRJ}o4y-YEzF94MT0G9#)ngCwN zEc*BRLaRamaVh|KEP&Evh0|tWykNZGxJb4(4RaMPsw@C%IR5tk`}q9*_5D6}J}IgY zdCpmLwsuImE=|8EeA7^V(pUfd|N8R$V`gJObwCZF2A14-de2`rvl+YIwg8p}AaElr zuMqzJ{{R2~A^8LV00000EC2ui02lxm000R80RIUb=nk z96MBrIy9gLDOinJRwNEo6K)&_UWbmsdKY8BfLj?v%y|Pbq8e@u1XzH#h{THzdD71%v`cmh|WpBVR3FH~_c`;f&6Mf1jG&i>IvsUMD3!Oc=02U%F@KPGtxJ#fud{ z9(Fm&Q6$Hb5_^TP5NGHOx>2IAB_QI10)ub(Dy<{c@8<;7Gsc*b_p4QtYcK+>`6Hu) zqhal$r2_Gr#V0H_{?T~VB1#Bv1QwWpa6VMECge9^(G7B!-6xhdsKq&YF6*s7p#{x)j zqKgtMs4@)&TfBkAhFNrI!Vd-ii8_;uy z9X8aEi2@NsumU&%Y~lbW7Zft%4>#DT2NQK@@y{$GoM8_!Kpde7Ax&gsf)qcbaDzEj zBmqYplR#v}9LkVlgb@mw@Fk5098g6gW^loVnF75L1`43;W9W<$7!W2EBP3yl24s8@ zkw07b;Q}K;B#?kNQ{2$a2pi}`0S6akP@t4R{seFZ9Z(Pv2s0b-Q%@O@FcAkETihCv p6|;EZ!x|c3fI%L6+))Q5kcvc*6%_ojz!g_4fQB8VDEm)906XNNcL)Fg literal 0 HcmV?d00001 diff --git a/Documentation/InstallationGuide/data/images/db.gif b/Documentation/InstallationGuide/data/images/db.gif new file mode 100644 index 0000000000000000000000000000000000000000..9ce9cac0b195984da0e44e5f63046a515d4f9be3 GIT binary patch literal 1250 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data/file.gif b/Documentation/InstallationGuide/data/images/file.gif similarity index 100% rename from Documentation/Installation Guide/data/file.gif rename to Documentation/InstallationGuide/data/images/file.gif diff --git a/Documentation/Installation Guide/data/folder.gif b/Documentation/InstallationGuide/data/images/folder.gif similarity index 100% rename from Documentation/Installation Guide/data/folder.gif rename to Documentation/InstallationGuide/data/images/folder.gif diff --git a/Documentation/InstallationGuide/data/images/help.gif b/Documentation/InstallationGuide/data/images/help.gif new file mode 100644 index 0000000000000000000000000000000000000000..a9bc7cf273e86174e987f3a250d7bbbc77cab816 GIT binary patch literal 1396 zcmV-)1&jJeNk%w1VHf}y0QUd@g{aoIwzg}n@5s^J$I8yk)!~nkltz@|GSmaKat|Kv9F4+)QQ6T z|Nj4GW@o3o(Zj#G+}hTemz8L2azcyK(bCj-w(@VV@shOH;NRbr$o$yh?pC4ehQRvz z`udEGk9oKCN|@zkYHnPm>{(r6*45Qfo#&F0l8lp^gM@^Ih>QIC`1khqsi~6x0F+1J)pSY7`7`YwFNvc=bzw9hPt-m9~{)X~s& zcY0u^>c76eg1q*ByY~M5|9O6e^78R~ui}4yf0LP_b$f!w&)dn$&0dnrsj#|pwf1MO z@osZ@W~%E*m*g*q;4z2YErr`~aBiqiuy2H-I&Di?*|6*ce zU83fJhK_Z#@~o?>nxU$Gy!q_x?0u)%hp^h|>-W64v!J4-u))*O+4JMy+*F_FgTD5` z#K-#h_Fkl*_E|6i!@uffxxo}7q?hd_?l(bU&nUtrbV z?#k8c=;q}uh~3lK^w8Vy+27~V-R*6UxI&cTK$PW9fw;ZD!FGCon#Az-^ze+96e%J1##i=(}8a&@!3#p1$a$qoJmz zrM1J;$I#nhsOyfVz)+j!W|GThoYr`myTHfK*535y=GpVedQqF>W~SsaiQe(;>NbqvUtnT% zb#>e2^4#Y0A^8LV00000EC2ui02lxm000R80RIUb=&u1ZH*So`f;Wzc3V#D5Mr1|8 zLW^5kEbUMPf!DACDkKh^K*|CKE$N_e;Q~dHzFtNiIq?HA;sg>qILtdyB8~|;p9pEd zf{MmFA$w{H#HoWF85R{vM4{77#)^ALBtbAB#LvJ67PPS2(2SNcau+T{!q%k5DW}c{0Qs)2|8ZOop_$LoRtrINvnkwf_9Iz*51TCtgfRQgA zXO^fSfCkG87PhENNmC&aJ_=6+0icGVldmLU5D^K221%T!8-iDOaj6jlPnzm<^5SGn zm_luW{K{12MHw<=%0$6bj{yT`BMvD4@ZzDGy*cWVoO36qilGuxS9!nSY6Of|4|=rA z&@V=xW2kKNi2wqaU;-VdnDIv}-xML<5E4vth!pA45K9DgAd^BGXx&QKoSBD4u~MkL)=_p1ScL~P@6Pc zY>~hn5_kbh2rlrG#SH^Mq(Uw>jPXGw5$t1!9bWXAhB3>yP)ZhTOcRnodcctb4*_I= z3lm**!Gt3rEThJyb9}K!ME(#_;VBMRXp>DSKZIa|8iP21=@&#OC6GUQEOEmu!Q_#L z6dgF=zzi|mFpVC<5~RWaLacFy2+oRd#u`El@Q_HbE>J)qM*srI5rGu2K(+q_1OPkG C^bI!v literal 0 HcmV?d00001 diff --git a/Documentation/InstallationGuide/data/images/index.html b/Documentation/InstallationGuide/data/images/index.html new file mode 100644 index 00000000..fe90a4e0 --- /dev/null +++ b/Documentation/InstallationGuide/data/images/index.html @@ -0,0 +1,11 @@ + +Invision Power Board - Bulletin Board System + +

403: Invision Power Board -> Forbidden

+
+You have reached this Page in error, please use +your back button to return to Invision Board. +
+Invision Power Board + + \ No newline at end of file diff --git a/Documentation/InstallationGuide/data/images/install_done.gif b/Documentation/InstallationGuide/data/images/install_done.gif new file mode 100644 index 0000000000000000000000000000000000000000..443281fc034ba1be8d7303a89bd7afef9fdd86df GIT binary patch literal 1693 zcmV;O24eX~Nk%w1VITk?0QUd@?YTkf(TYpEHu3TCmX?(J?fu%aWGAi(JGC4EngRL7 zTjjDelFX0duPug#hP;UYw1EPQ*=z5-NS2Fq`T6i_Dru&0*btty&?SIwFMtgNik($eU)IjwpC0G0sr zz)RYv9^|nyp>6;Yr3L@xt@OcB(47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L@=EYz(eZ43xr1AjUX{SCx0Zu!v%K_6c7MA*o`7@ literal 0 HcmV?d00001 diff --git a/Documentation/InstallationGuide/data/images/link.gif b/Documentation/InstallationGuide/data/images/link.gif new file mode 100644 index 0000000000000000000000000000000000000000..d494909b665cf3d52fd8008265be1ee4d1e26de3 GIT binary patch literal 1057 zcmeH`+fR}K9EN`&)@NpZX{|EzFspUY(vF(75>te1m1$9FVv&if6@lWC3e?10d0x4( zkxGeUwn#-I*M_Xfuowz83oF!&gQ#Q&#R+t{?O*7*crTvIcY6rL_{gXX6i}D~7#ka# zot@R|^*kPLdU_giUJVWos?}<%)oL=CL?TgRVd!F)RHi@9D?4B^sb~0zWsDIoQ5n#>H{2O{S2zUEy;a>ix)wPlq2p-lup5UC8WuK)C>&0phFi}JpwdEbj{mj z*$kadPo@^bp+}a<8UJD}TpjUB6hY-gNRis7f6FFuH`MRXafd&|SNg{GEPXZS4Ln7tRNNeW3??hX|6*wDeC0B)4u z6+cRlP7smS8Nl7F;BvOaMA~3e2+oI_qoN?g?L-llvz3G9iMW-!uXL--3h=z=#fV=; zt24&nc6*|zjjK%ZSaxXL&UfEAmAH9xkrJ#8+q)=ceM>^0PYixF0)BH6P=w^^y|O9G mCl-S*xP^6tNC`z=Qty48>kCa>)_N=nbD~%BD9Et zT8FxfKvC;R6_>UO0g?~`A$tNLgpjii=#6Ret+C^|M<@D-1D9L?aIqZ z-C9Nk4w2>ofGN<~9do#IzHdxt!Q3L1xpzzpTb(E|$CVlSg&<1I4v0X^IS-nNK7o!U z)|*imPXTLS%!bc$q!3#I$u$)0PRXO)+D&V(uZCK|F;F2*F7ZwGp%9GggDe(L1J-E_!q}6YA2L z@R4!ju-ss@Ij8h?$rK`(G)+NvwnVQt6Zm_qeMA8xcDL4qn{3V@DKs(;zv63kCSp(o z4$EPq)d^V~6Iv@vq92_wTI_DjF|S96AsHl`G$VGG!Qz~Oaj6>V8`H`(7P-c1#oYrU zy&iGkuK8ZRu3xAd6zOM-xSg0A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d;oSKFu< zlz&BfjGDB925W(v*`^-#!d2(AIgeTZl3f7eurlPcHsQK+?Ycwkxj~11Zq%U>pKKPQ zk5t;PSAB|#%A7dQs!PU~F<^hKih*F%t#pZICAx|!u!|?bkt%e4gZIQylU@VwyhiZE zUuBWa!;lE!t}A4b&$532u8uh3uPx=XEtGgMmx*7(j{y9~T-~Z8^}$pM3r8vNoLEWk${LO7wf4^gq(N})HWRlWWeZ2qx0000000000 z0000000000A^8LV00000EC2ui01^Nb000R80P_hHIO($egrq+)zFd9iKr4dabjr9NkXp@lWM;ny^ z13nxm_uzsE6Eke}@-YD(0|=F{ECP|hg8>l{5>a~fhy^G^j@V2Y0OG(b1Og&pphhg) zh++*|6tGa{Kx7XJ+F{5bD^LSfzGxI~=qBe#hYko72)L19L!Mxq7)(b+Yu+gZcMJ#! z5ov=165uouhd7>`!;2c+5F$VyCB$Hi0|5lUL@wm8^M*RNgt7zy1ULcBBoW#pqCMNJ jvkVbj453I8xIp5~i1@@PBR-g%(8@SL^e`hn0RaFz$qptz literal 0 HcmV?d00001 diff --git a/Documentation/InstallationGuide/data/images/pixel.gif b/Documentation/InstallationGuide/data/images/pixel.gif new file mode 100644 index 0000000000000000000000000000000000000000..0aa3c16e548bf211897faa3aa70e1c4482b79258 GIT binary patch literal 43 scmZ?wbhEHbWMW`qXkcK-oOz3ZfkE*n3nP$X&;b!383rb%mOut;0IA3ZYybcN literal 0 HcmV?d00001 diff --git a/Documentation/InstallationGuide/data/images/title_bar.gif b/Documentation/InstallationGuide/data/images/title_bar.gif new file mode 100644 index 0000000000000000000000000000000000000000..587654e1431a0e23267d3c70f1442af75b169464 GIT binary patch literal 295 zcmZ?wbhEHbWMWWbxXQo~QoSp@ZeQBeYtb!7(xzO^m~k_q=WJ5{`PLm@lP6xxnQ<+q z?O1I4@rZ^48PjjXb)F2V+8I>7EvRC9RP&+u?$eP?2g7RjX3o5oJmErg>(S7f-KmqW z#CM$vuiqb7wl!tarOX*O6MN64PrDvmxr2cQ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zXj>>uD1g#frA4`v>?E~u(kok5Nf;| zuNpfn@I)R&yprul77QUp5^TH>?h73(u!R#+yfFvE28k&LGf%iIFTD<=K?4XD;0#d^ z|F{vy6*#;=@B#<_5W>2!5_AO!KrlnZ9v3{ZK*bju{SgsG%wUEXWT>D*21H;`SJeht p5CIYwfI+dvdBP2m8$h%afCmy+c;U9*F~I?W06I)fcuWBS06QNgA|C(% literal 0 HcmV?d00001 diff --git a/Documentation/InstallationGuide/data/install1.html b/Documentation/InstallationGuide/data/install1.html new file mode 100644 index 00000000..ad69e849 --- /dev/null +++ b/Documentation/InstallationGuide/data/install1.html @@ -0,0 +1,42 @@ + + + + + Invision Power Board Install Guide: Welcome + + + + + +

Installing: Step 1 - Uploading

+
+
+ At this point, you should have the zip archive "unzipped" and the contents similar to those shown in the structure and CHMOD guide. If you + do not have a similar structure, check to make sure you have your zip program preferences set to allow creation of directories and to preserve case and long filenames. +

+ If you haven't done so already, create a new directory on your server named appropriately (if you wanted to access the forums via 'http://www.domain.com/forums/', create a directory called 'forums' in the + 'public_html' or 'www' directory on your webserver. +

+ Using your FTP client, move into the directory you wish to upload to (if you followed the above advice, move into the newly created 'forums' directory.) +

+ Using your FTP client, create the following directories "admin", "cache", "install", "ips_kernel", "jscripts", "lofiversion", "modules", "retail", "resources", "skin_acp", "sources", "style_avatars", "style_captcha", "style_emoticons", "style_images", "upgrade" and "uploads" (TIP: If your FTP client supports "Drag n' Drop" which most modern clients do, you can save yourself some time and effort by + simply selecting all the files from the "unzipped" zip archive and drag them into your FTP client window, this will then copy all the files, creating the directories as it goes. If you choose + to do this, you can safely ignore most of the following instruction, just remember to CHMOD as outlined in the stucture and CHMOD guide). +

+ Once the directories have been created, CHMOD "skin_cache" and "uploads" to 0755 (if you get permissions errors later on, you can CHMOD these to + "0777"). Now, upload the contents of the files in your local folders (from the zip file) into the corresponding directories you've just created on your server. Some folders will contain other + files and folders, upload them all - preserving the structure you have in your zip file (for example, upload the entire contents of the "html" folder on your computer to the "html" directory on the server). +

+ Once you have finished uploading into the directories, upload the rest of the files "conf_global.php.dist" and "index.php" to the same place as you created the directories earlier (into "forums" for our example). +

+ That's it, the hard work is now done! You can proceed to the next step. +
+ + + + + \ No newline at end of file diff --git a/Documentation/InstallationGuide/data/install2.html b/Documentation/InstallationGuide/data/install2.html new file mode 100644 index 00000000..e9330bba --- /dev/null +++ b/Documentation/InstallationGuide/data/install2.html @@ -0,0 +1,47 @@ + + + + + Invision Power Board Install Guide: Welcome + + + + + +

Installing: Step 2 - Using the Installer

+
+
+ An installer is provided to assist you in entering the information Invision Power Board needs to connect to your MySQL database and to create your new + administrators account. +

+ Run the installer file through your web browser by entering the URL to it into your browser address bar (if you have followed our example, type in + http://www.domain.com/forums/install/index.php, naturally subsituting 'domain.com' for your web address.) +

+ Clicking on proceed will present you with a simple information form. You will need to know your SQL username and password at this point. If you do not know it, please ask your web host - in most + cases it is different from the FTP log in information. +

The form is very straightfoward, with only the following points needing closer examination. If you do not know what your MySQL "host" is, try "localhost" (without the quotes). if the SQL server + is on the same server as your website (and in most cases it is) this will suffice. +
+ If you have created a new database for Invision Power Board, or wish to use an existing database, enter the name of the database in the appropriate field.

Unless you intend to install multiple copies of + Invision Power Board into the same database, you can leave the "table prefix" blank. If you do not have a MySQL password (if you are installing Invision Power Board on your local server) this can be left blank. +
+ After submitting the form, you will be informed of any errors - if you do get an error similar to "permission denied for user@localhost using password YES" - the chances are you have either your MySQL username, MySQL password + or MySQL database name wrong. Consult with your webhost for the correct information and resubmit the form. +

+ If the information is correct an IP.Board can connect to your database, you will be asked for your administrator login information. This is the information you will use to login to the board, and the admin control panel area. +

+ If the installation was successful, you will receive notification to that effect. +
+ Follow the link to finish off the installation and to log into your newly installed board. When the log in page loads, enter in the information you chose for your administrator account. +
+ Once you are logged into the board, click on the "Admin CP" link found in the navigation bar to access the Administration Control Panel. +
+ + + + + \ No newline at end of file diff --git a/Documentation/InstallationGuide/data/install3.html b/Documentation/InstallationGuide/data/install3.html new file mode 100644 index 00000000..9bef7f3a --- /dev/null +++ b/Documentation/InstallationGuide/data/install3.html @@ -0,0 +1,32 @@ + + + + + Invision Power Board Install Guide: Welcome + + + + + +

Installing: Step 3 - Post Installation

+
+
+ The Invision Power Board administration control panel is a very sophisticated tool. This is where you can create new categories and forums for your board, as well + as set bad word filters, edit emoticons, change the board colours and so on. We recommend you browse the documentation at Invision Power Board before getting attempting some of the more complex operations. +

+ Lets get stuck in! +
+ The first thing you will need to do is remove the "install/index.php" file from your server; although Invision Power Board locks the installer after a successful install, it's always a good idea to remove the installer as re-running it + will delete your database tables. +

+ Congratulations! You have installed and set up your new Invision Power Board. If you ran into trouble, please click on the "Help!" link in the top menu bar for the FAQ and how to get support. +
+ + + + + \ No newline at end of file diff --git a/Documentation/InstallationGuide/data/requirements.html b/Documentation/InstallationGuide/data/requirements.html new file mode 100644 index 00000000..d6eb455a --- /dev/null +++ b/Documentation/InstallationGuide/data/requirements.html @@ -0,0 +1,37 @@ + + + + + Invision Power Board Install Guide: Welcome + + + + + +

Requirements

+
+
+ The exact requirements will depend on many factors, your estimated board traffic being one. +
+
+ You must have a webserver that has PHP 4.3.0 (or better) and MySQL 3.23 (or better) installed. If you are unsure whether your server has these + programs installed, please check with your web host now. If you are capable, you can always download PHP + and download mySQL and install it yourself. If your web host does not support PHP or mySQL, consider hosting your entire web site or forums with IPS Hosting services. +
Invision Power Board works best on an Apache server, and is Apache 1 and Apache 2 savvy. +

+ General Requirements +
+ You do not need a new mySQL database as Invision Power Board supports table prefixes to prevent tables being overwritten. +
You will also need the mySQL username and mySQL password for a mySQL user that has permission to "CREATE", "DROP" and "ALTER" tables. +
You will need about 5mb of free web space and roughly 5mb of mySQL database space to allow installation and a moderately sized community. +
If you are unsure on any of these points, please ask your webhost before proceeding. +
+ + + + + \ No newline at end of file diff --git a/Documentation/InstallationGuide/data/welcome.html b/Documentation/InstallationGuide/data/welcome.html new file mode 100644 index 00000000..e2228024 --- /dev/null +++ b/Documentation/InstallationGuide/data/welcome.html @@ -0,0 +1,40 @@ + + + + + Invision Power Board Install Guide: Welcome + + + + +

Welcome to Invision Power Board!

+
+
+ Welcome to Invision Power Board, a fast, efficient, scalable community solution written in PHP and using MySQL for database storage. +

+ Invision Power Board also supports MSSQL and Oracle for database storage. It is very important to note that if you are using an alternate database storage method that you MUST download the driver files for the database engine you are using, and upload those files with the rest of the Invision Power Board files. The additional files you need can be downloaded from your client area. If you need assistance + with this step, please do not hesitate to submit a ticket for official support. +

+ This guide will help you through the installation process and get you on your way to setting up your own Invision Power Board. +
+ Installation is very straight forward, only taking about 15 minutes from uploading the files to logging into your administration center. +
+
+ You will need an FTP (File Transfer Protocol) client, if you do not have one you can download Smart FTP for Windows or + InterArchy for Macintosh. At the time of writing both websites have freeware or free trial versions available for download. +
You do not need an indepth knowledge of PHP programming to install Invision Power Board, but a working knowledge of FTP functions is a plus. +
+
This guide assumes that you have successfully downloaded the latest release from Invision Power Board and have the Zip file "unzipped" and ready to go. +
The instructions will term the zip file you downloaded as "the zip archive", the directories created by the unzipping process as "the local folders" and the directories on your website as + "website directories" - this is to prevent confusion. +

+
+ + + + + \ No newline at end of file diff --git a/Documentation/InstallationGuide/install_guide.html b/Documentation/InstallationGuide/install_guide.html new file mode 100644 index 00000000..a3b1b7c9 --- /dev/null +++ b/Documentation/InstallationGuide/install_guide.html @@ -0,0 +1,57 @@ + + + + IPS Installer + + + + +

 

+

 

+
+
+

Welcome to the Invision Power Board

+
+
+ +
+
+ +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/Documentation/InstallationGuide/upgrading.html b/Documentation/InstallationGuide/upgrading.html new file mode 100644 index 00000000..19fe6f90 --- /dev/null +++ b/Documentation/InstallationGuide/upgrading.html @@ -0,0 +1,63 @@ + + + + IPS Installer + + + + +

 

+

 

+
+
+

Welcome to the Invision Power Board

+
+
+
+ + +
+ + +

Updating your IPB

+
+ If you're updating your IPB, then please do the following: +
    +
  • Important note: If you are using a database driver OTHER than MySQL please be sure to download the files for your + driver from your client area and upload those files along with the files in the next step. If you fail to do this, you + will not receive the SQL updates you need
  • +
  • Upload all the files contained in the "upload" folder of the download distribution. Don't forget + to update files in the "resources" and "upgrades" folder.
  • +
  • Run the upgrade system by accessing "upgrade/index.php" on your system (for example: www.domain.com/forum/upgrade/index.php) + this will determine which upgrade modules need to be run and will rebuild your templates for you.
  • +
  • Your upgrade is now complete!
  • +
+ + + + + +
+
+
+ +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/Documentation/START_HERE.html b/Documentation/START_HERE.html new file mode 100644 index 00000000..e153ac28 --- /dev/null +++ b/Documentation/START_HERE.html @@ -0,0 +1,61 @@ + + + + IPS Installer + + + + +

 

+

 

+
+
+

Welcome to the Invision Power Board

+
+
+
+ + +
+ +
+ +
+
I AM UPGRADING
+
+ Click HERE if you are upgrading your Invision Power Board from a previous version. + +
+ +
+ +
+
I AM INSTALLING
+
+
Click HERE if you are installing a new Invision Power Board. +
+ +
+
+
+ +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/Documentation/upgradefromipb_1x.html b/Documentation/upgradefromipb_1x.html deleted file mode 100644 index e0e27b8b..00000000 --- a/Documentation/upgradefromipb_1x.html +++ /dev/null @@ -1,114 +0,0 @@ - -Invision Power Board UPGRADE - - - - - - - - -
-

Добро пожаловать!

- Этот документ содержит информацию об обновлении IPB серии 1 до IPB 2.1.7. Процесс обновления производит изменения в базе данных вашего старого форума, и по этой причине мы настоятельно рекомендуем вам сделать резервную копию - SQL-базы и файлов, прежде чем начинать обновление. -
-
- Также стоит заметить, что стили от форума первой серии не совместимы с IPB 2.1.7. Поэтому они конвертируются в IPB 2.1.7-формат, но они все равно нуждаются в ручном обновлении (доводке).
-
- ВАЖНО: Отката к старой версии не существует! -

Создание резервной копии базы

- Мы настоятельно рекомендуем создать резервную копию при помощи команды mysqldump (через SSH): -
-
mysqldump --opt -uимя_пользователя -pпароль имя_базы > имя_базы.sql
- (Подставьте вместо имя_пользователя ваш логин к MySQL серверу, вместо пароль - пароль, а вместо имя_базы имя MySQL-базы форума) -
- После завершения резервирования базы (а это может быть достаточно длительным процессом для больших форумов) вам необходимо скачать старые файлы IPB с сервера. -
-

Удаление старых файлов

- Так как резервная копия старого форума создана, вы можете безопасно удалить старые файлы IPB КРОМЕ conf_global.php и папки uploads. -
- Вы также можете оставить папку style_images, а также мы советуем оставить папку html/emoticons, дабы остались смайлики в сообщениях вашего форума. Если же вы удалите эти папки, то по окончании процесса обновления вам будет необходимо обновить кеш сообщений форума. -

Закачивание новых файлов

- Закачайте содержимое ZIP-архива IPB 2.1.7 (все файлы из папки 'upload' КРОМЕ conf_global.php. Если вы по ошибке перезаписали этот файл, вам необходимо будет его отредактировать вручную, а именно вписать настройки для доступа к базе. -
- Убедитесь что вы закачали все файлы, включая папки: install, upgrade и ipb_templates.xml. -

Обновление

- Итак все готово к обновлению. Теперь вам необходимо зайти браузером по ссылке: http://domain.com/forum/upgrade/upgrade.php (замените domain.com/forum/ на ваш действительный URL-адрес форума). -
- Скрипт обновления определит текущую версию форума, обновление которого вы хотите сделать. Убедитесь в том, что текущая версия определена верно, ознакомьтесь со всеми предупреждениями, выводимыми скриптом, прежде чем приступать к обновлению. -
- Процесс обновления запущен, скрипт будет автоматически выполнять шаги по модернизации базы форума. Наберитесь терпения, процесс может занять достаточно большое количество времени. -
-
- Когда система обновления с 1.x была завершена, вы нуждаетесь в запуске системы обновления IPB 2 , находящийся по адресу — «/upgrade/index.php» (например: http://www.domain.ru/forum/upgrade/index.php). -
-
- - После того, как скрипт обновления сообщит вам об окончании обновления, вам необходимо будет зайти на форумы и в панель администратора, чтобы убедиться в успешности обновления. -
-
- Вот, собственно, и все, теперь у вас последняя IPB версии 2.1.7! -
-
-
- - \ No newline at end of file diff --git a/Tools/ipchat.php b/Tools/ipchat.php new file mode 100644 index 00000000..4863da3e --- /dev/null +++ b/Tools/ipchat.php @@ -0,0 +1,266 @@ + IP Chat => IPB Bridge Script +| > Script written by Matt Mecham +| > Date started: 17th February 2003 (Updated: 1 July 2004) +| > Updated for 2.1.x: Thu 6th October 2005 +| ++-------------------------------------------------------------------------- +*/ + + +/** +* SIGMACHAT auth file. +* +* Set-up and load module to run +* +* @package InvisionPowerBoard +* @author Matt Mecham +* @version 2.1 +*/ + +/** +* Script type +* +*/ +define( 'IPB_THIS_SCRIPT', 'public' ); +define( 'IPB_LOAD_SQL' , 'queries' ); + +require_once( './init.php' ); + +//=========================================================================== +// MAIN PROGRAM +//=========================================================================== + +$INFO = array(); + +//-------------------------------- +// Load our classes +//-------------------------------- + +require_once ROOT_PATH . "sources/ipsclass.php"; +require_once KERNEL_PATH . "class_converge.php"; +require_once ROOT_PATH . "conf_global.php"; + +# Initiate super-class +$ipsclass = new ipsclass(); +$ipsclass->vars = $INFO; + +//-------------------------------- +// The clocks a' tickin' +//-------------------------------- + +$Debug = new Debug; +$Debug->startTimer(); + +//-------------------------------- +// Load the DB driver and such +//-------------------------------- + +$ipsclass->init_db_connection(); + +//-------------------------------- +// Set up our vars +//-------------------------------- + +$ipsclass->parse_incoming(); + +//-------------------------------- +// Set converge +//-------------------------------- + +$ipsclass->converge = new class_converge( $ipsclass->DB ); + +//-------------------------------- +// Start off the cache array +//-------------------------------- + +$ipsclass->cache_array = array('rss_calendar', 'rss_export','components','banfilters', 'settings', 'group_cache', 'systemvars', 'skin_id_cache', 'forum_cache', 'moderators', 'stats', 'languages'); + + +//=========================================================================== +// Get cache... +//=========================================================================== + +$ipsclass->init_load_cache( $ipsclass->cache_array ); + +//-------------------------------- +// Initialize the FUNC +//-------------------------------- + +$ipsclass->initiate_ipsclass(); + +//=========================================================================== +// AUTHORIZE... +//=========================================================================== + +define( 'DENIED', 0 ); +define( 'ACCESS', 1 ); +define( 'ADMIN' , 2 ); + +$allowed_groups = $ipsclass->vars['chat_admin_groups']; +$access_groups = $ipsclass->vars['chat_access_groups']; +$autologin = 0; +$allow_guest_access = $ipsclass->vars['chat_allow_guest'] == 1 ? ACCESS : DENIED; + +// Stupid PHP changing it's mind on HTTP args + +$username = $_GET['username'] != "" ? $_GET['username'] : $HTTP_GET_VARS['username']; +$password = $_GET['password'] != "" ? $_GET['password'] : $HTTP_GET_VARS['password']; +$ip = $_GET['ip'] != "" ? $_GET['ip'] : $HTTP_GET_VARS['ip']; + +//---------------------------------------------- +// Test for autologin. +//---------------------------------------------- + +if ( preg_match( "/^(?:[0-9a-z]){32}$/", $password ) ) +{ + $autologin = 1; +} + +//---------------------------------------------- +// Remove URL encoding (%20, etc) +//---------------------------------------------- + +$username = $ipsclass->parse_clean_value(urldecode(trim($username))); +$password = $ipsclass->parse_clean_value(urldecode(trim($password))); +$ip = $ipsclass->parse_clean_value(urldecode(trim($ip))); + +//---------------------------------------------- +// Main code +//---------------------------------------------- + +// Start off with the lowest accessibility + +$output_int = $allow_guest_access; +$output_name = ""; + +//------------------------------ +// Attempt to find the user +//------------------------------ + +$ipsclass->DB->build_query( array( 'select' => 'm.mgroup, m.name, m.members_display_name, m.id, c.*', + 'from' => array( 'members' => 'm' ), + 'where' => "m.members_l_display_name='".$ipsclass->DB->add_slashes(strtolower($username))."'", + 'limit' => array( 0, 1 ), + 'add_join' => array( 1 => array( 'type' => 'left', + 'from' => array( 'members_converge' => 'c' ), + 'where' => 'c.converge_email=m.email', + ) ) + ) ); +$ipsclass->DB->exec_query(); + + +if ( ! $member = $ipsclass->DB->fetch_row() ) +{ + die_nice(); + + //-- script exits --// +} + + +if ( ! $member['id'] ) +{ + // No member found - allow guest access? + + die_nice($allow_guest_access); + + //-- script exits --// +} + +//------------------------------ +// Update passy +//------------------------------ + +if ( ! $autologin ) +{ + $md5_password = md5( md5( $member['converge_pass_salt'] ) . md5($password) ); +} +else +{ + $md5_password = $password; +} + +//------------------------------ +// Check password - member exists +//------------------------------ + +if ( $password != "" ) +{ + // Password was entered.. + + if ( $md5_password != $member['converge_pass_hash'] ) + { + // Password incorrect.. + + die_nice(); + + //-- script exits --// + } + else + { + $output_int = ACCESS; + } +} +else +{ + // No password entered - die! + // Do not allow guest access on reg. name + + die_nice(); + + //-- script exits --// +} + + +//------------------------------ +// Do we have any access? +//------------------------------ + + +if ( ! preg_match( "/(^|,)".$member['mgroup']."(,|$)/", $access_groups ) ) +{ + die_nice(); +} + +//------------------------------ +// Do we have admin access? +//------------------------------ + +if ( preg_match( "/(^|,)".$member['mgroup']."(,|$)/", $allowed_groups ) ) +{ + $output_int = ADMIN; +} + + +//------------------------------ +// Spill the beans +//------------------------------ + +print "SCRAS^1.1\nAUTH^".$output_int."\nUID^".intval($member['id'])."\n"; + +exit(); + + +function die_nice( $access=0 ) +{ + global $ipsclass; + + // Simply error out silently, showing guest access only for the user + $ipsclass->DB->close_db(); + print $access; + exit(); +} + +?> \ No newline at end of file diff --git a/Tools/rebuildposts/readme.txt b/Tools/rebuildposts/readme.txt new file mode 100644 index 00000000..0b26428c --- /dev/null +++ b/Tools/rebuildposts/readme.txt @@ -0,0 +1,18 @@ +----------------------------------------------------- +IP.Board 2.3.0+ Rebuild Post Tool +(c) Invision Power Services, Inc. 2007 +@author: Matt - June 2007 +----------------------------------------------------- +OVERVIEW: +This tool is run via command line to prevent the usual PHP timeout errors. It is also +significantly quicker to run as it's capable of parsing up to 10,000 posts a minute. + +USAGE: +Simply upload the file 'rebuildposts.php' into your root IP.Board folder. This is the folder +that contains your 'index.php' and 'init.php' files. + +Log into your server via SSH, then Change Directory to your root IP.Board folder. Run the tool +by typing: "php rebuildposts.php" (without the quotes). + +Follow the onscreen prompts to select which type of post you wish to rebuild along with the +starting ID you wish to use and how many posts you wish to rebuild. \ No newline at end of file diff --git a/Tools/rebuildposts/rebuildposts.php b/Tools/rebuildposts/rebuildposts.php new file mode 100644 index 00000000..5c604c94 --- /dev/null +++ b/Tools/rebuildposts/rebuildposts.php @@ -0,0 +1,654 @@ +#!/usr/local/bin/php + $Date: 2007-05-11 22:54:34 +0100 (Fri, 11 May 2007) $ +| > $Revision: 994 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > SHELL SCRIPT: Rebuild Posts +| ++-------------------------------------------------------------------------- +*/ + +/** +* Script type +* +*/ +define( 'IPB_THIS_SCRIPT', 'public' ); +define( 'IPB_LOAD_SQL' , 'queries' ); + +if ( ! file_exists( './init.php' ) ) +{ + myprint( "ERROR: This script MUST be placed in your forum's root directory.\n" ); + exit(0); +} + +require_once( './init.php' ); + +//=========================================================================== +// MAIN PROGRAM +//=========================================================================== + +$INFO = array(); + +//-------------------------------- +// Load our classes +//-------------------------------- + +require_once ROOT_PATH . "sources/ipsclass.php"; +require_once ROOT_PATH . "sources/classes/class_display.php"; +require_once ROOT_PATH . "sources/classes/class_session.php"; +require_once ROOT_PATH . "sources/classes/class_forums.php"; +require_once KERNEL_PATH . "class_converge.php"; + +if ( file_exists( ROOT_PATH . "conf_global.php" ) ) +{ + require_once ROOT_PATH . "conf_global.php"; +} + +# Initiate super-class +$ipsclass = new ipsclass(); +$ipsclass->vars = $INFO; + +//-------------------------------- +// The clocks a' tickin' +//-------------------------------- + +$Debug = new Debug; +$Debug->startTimer(); + +//-------------------------------- +// Load the DB driver and such +//-------------------------------- + +$ipsclass->init_db_connection(); + +//-------------------------------- +// Set debug mode +//-------------------------------- + +$ipsclass->DB->set_debug_mode( 0 ); + +$ipsclass->forums = new forum_functions(); +$ipsclass->forums->ipsclass =& $ipsclass; + +//-------------------------------- +// Set up our vars +//-------------------------------- + +$ipsclass->parse_incoming(); + +//-------------------------------- +// Set converge +//-------------------------------- + +$ipsclass->converge = new class_converge( $ipsclass->DB ); + +//-------------------------------- +// Start off the cache array +//-------------------------------- + +$ipsclass->cache_array = array_merge( array('badwords','emoticons','attachtypes','bbcode', 'multimod','ranks','profilefields','skin_remap', 'rss_calendar', 'rss_export', 'components', 'banfilters', 'settings', 'group_cache', 'systemvars', 'skin_id_cache', 'forum_cache', 'moderators', 'stats', 'languages') ); + +//=========================================================================== +// Get cache... +//=========================================================================== + +$ipsclass->init_cache_setup(); +$ipsclass->init_load_cache( $ipsclass->cache_array ); + +//-------------------------------- +// Initialize the FUNC +//-------------------------------- + +$ipsclass->initiate_ipsclass(); + +//-------------------------------- +// Initialize the forums +//-------------------------------- + +$ipsclass->forums->strip_invisible = 1; +$ipsclass->forums->forums_init(); + +//-------------------------------- +// Load the skin +//-------------------------------- + +$ipsclass->load_skin(); + +$ppu = 0; +$tpu = 0; + +if( isset($ipsclass->member['view_prefs']) ) +{ + list($ppu,$tpu) = explode( "&", $ipsclass->member['view_prefs'] ); +} + +$ipsclass->vars['display_max_topics'] = ($tpu > 0) ? $tpu : $ipsclass->vars['display_max_topics']; +$ipsclass->vars['display_max_posts'] = ($ppu > 0) ? $ppu : $ipsclass->vars['display_max_posts']; + +//=========================================================================== +// Set up the session ID stuff +//=========================================================================== + +if ( $ipsclass->session_type == 'cookie' ) +{ + $ipsclass->session_id = ""; + $ipsclass->base_url = $ipsclass->vars['board_url'].'/index.'.$ipsclass->vars['php_ext'].'?'; +} +else +{ + $ipsclass->base_url = $ipsclass->vars['board_url'].'/index.'.$ipsclass->vars['php_ext'].'?s='.$ipsclass->session_id.'&'; +} + +$ipsclass->js_base_url = $ipsclass->vars['board_url'].'/index.'.$ipsclass->vars['php_ext'].'?s='.$ipsclass->session_id.'&'; + +//-------------------------------- +// Set up the forum_read cookie +//-------------------------------- + +$ipsclass->hdl_forum_read_cookie(); + +//=========================================================================== +// Set up defaults +//=========================================================================== + +$ipsclass->skin_id = $ipsclass->skin['_setid']; + +$ipsclass->vars['img_url'] = $ipsclass->vars['ipb_img_url'] ? $ipsclass->vars['ipb_img_url'] . 'style_images/' . $ipsclass->skin['_imagedir'] : 'style_images/' . $ipsclass->skin['_imagedir']; +$ipsclass->vars['AVATARS_URL'] = $ipsclass->vars['ipb_img_url'] ? $ipsclass->vars['ipb_img_url'] . 'style_avatars' : 'style_avatars'; +$ipsclass->vars['EMOTICONS_URL'] = $ipsclass->vars['ipb_img_url'] ? $ipsclass->vars['ipb_img_url'] . 'style_emoticons/<#EMO_DIR#>' : 'style_emoticons/<#EMO_DIR#>'; +$ipsclass->vars['mime_img'] = $ipsclass->vars['ipb_img_url'] ? $ipsclass->vars['ipb_img_url'] . 'style_images/<#IMG_DIR#>' : 'style_images/<#IMG_DIR#>'; + +//-------------------------------- +// Set up our language choice +//-------------------------------- + +if ( !isset($ipsclass->vars['default_language']) OR $ipsclass->vars['default_language'] == "") +{ + $ipsclass->vars['default_language'] = 'en'; +} + +//----------------------------------------- +// Load language +//----------------------------------------- + +$ipsclass->load_language('lang_global'); + +//----------------------------------------- +// Continue +//----------------------------------------- + +require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); +$parser = new parse_bbcode(); +$parser->ipsclass =& $ipsclass; +$parser->allow_update_caches = 0; + +//----------------------------------------- +// Get input stream +//----------------------------------------- + +$stdin = fopen('php://stdin', 'r'); + +//----------------------------------------- +// Ask what we're doing... +//----------------------------------------- + +myprint( "--------------------------------------------\nWelcome to the IP.Board Shell Post Rebuilder\n--------------------------------------------\nWhat do you wish to rebuild? [p=Posts, c=Calendar Events, m=Personal Messages, a=Announcements, s=Signatures]\nEnter: " ); + +$option = getoption(); + +//----------------------------------------- +// What did we choose? +//----------------------------------------- + +if ( $option != 'p' AND $option != 'c' AND $option != 'm' AND $option != 'a' AND $option != 's' ) +{ + myprint( "Incorrect option chosen\n"); + exit(0); +} + +$type = ''; + +switch( $option ) +{ + case 'p': + $type = 'posts'; + $human = 'Posts'; + break; + case 'c': + $type = 'cal'; + $human = 'Calendar Events'; + break; + case 'm': + $type = 'pms'; + $human = 'Personal Messages'; + break; + case 's': + $type = 'sigs'; + $human = 'Signatures'; + break; + case 'a': + $type = 'announce'; + $human = 'Announcements'; + break; +} + +//----------------------------------------- +// CHOICE: Days or ID +//----------------------------------------- + +myprint( "You have selected to rebuild: " . $human . "\n--------------------------------------------\nDo you want to rebuild from the last X days items or start from a specific ID? [0=Rebuild from the beginning, d=Rebuild from last X days, n=Rebuild from an ID]\nEnter: " ); + +$option = getoption(); + +if ( $option == 'd' ) +{ + # DAYS + myprint( "Enter the number of days to rebuild from [Entering 30 will rebuild all items from the past 30 days]:\nEnter: " ); + + $option = intval( getoption() ); + $date = 86400 * $option; + $time = time() - $date; + + # Find starting ID + switch( $type ) + { + case 'cal': + $tmp = $ipsclass->DB->simple_exec_query( array( 'select' => 'event_id', 'from' => 'cal_events', 'where' => 'event_unixstamp >= ' . $time, 'limit' => array(1) ) ); + $max = intval( $tmp['event_id'] ); + break; + + case 'announce': + $tmp = $ipsclass->DB->simple_exec_query( array( 'select' => 'announce_id', 'from' => 'announcements', 'where' => 'announce_start >= ' . $time, 'limit' => array(1) ) ); + $max = intval( $tmp['announce_id'] ); + break; + + case 'pms': + $tmp = $ipsclass->DB->simple_exec_query( array( 'select' => 'msg_id', 'from' => 'message_text', 'where' => 'msg_date >= ' . $time, 'limit' => array(1) ) ); + $max = intval( $tmp['msg_id'] ); + break; + + case 'sigs': + $tmp = $ipsclass->DB->simple_exec_query( array( 'select' => 'id', 'from' => 'member_extra', 'where' => "signature != '' AND joined >= " . $time, 'limit' => array(1) ) ); + $max = intval( $tmp['id'] ); + break; + + case 'posts': + default: + $tmp = $ipsclass->DB->simple_exec_query( array( 'select' => 'pid', 'from' => 'posts', 'where' => 'post_date >= ' . $time, 'limit' => array(1) ) ); + $max = intval( $tmp['pid'] ); + break; + } + + $start = $max; +} +else if ( $option == 'n' ) +{ + # Number + myprint( "Enter the ID to start from:\nEnter: " ); + + $option = getoption(); + $start = intval( $option ); +} +else +{ + # All + $start = 0; +} + +myprint( "Rebuilding {$human}, starting at ID " . $start . "\nRebuild how many? [Enter how many you'd like to rebuild. Hit enter to rebuild all]:\nEnter: " ); + +$option = getoption(); + +$end = ( $end > 0 ) ? intval( $end ) : 0; +$done = 0; +$_BATCH = 500; +$_LAST_ID = intval( $start ); +$time_start = time(); +$COMPLETE = 0; + +//----------------------------------------- +// Start the loop... +//----------------------------------------- + +while( $COMPLETE == 0 ) +{ + //----------------------------------------- + // Got any more? + //----------------------------------------- + + switch( $type ) + { + case 'cal': + $tmp = $ipsclass->DB->simple_exec_query( array( 'select' => 'MAX(event_id) as max', 'from' => 'cal_events', 'where' => 'event_id > ' . $_LAST_ID ) ); + $max = intval( $tmp['max'] ); + break; + + case 'announce': + $tmp = $ipsclass->DB->simple_exec_query( array( 'select' => 'MAX(announce_id) as max', 'from' => 'announcements', 'where' => 'announce_id > ' . $_LAST_ID ) ); + $max = intval( $tmp['max'] ); + break; + + case 'pms': + $tmp = $ipsclass->DB->simple_exec_query( array( 'select' => 'MAX(msg_id) as max', 'from' => 'message_text', 'where' => 'msg_id > ' . $_LAST_ID ) ); + $max = intval( $tmp['max'] ); + break; + + case 'sigs': + $tmp = $ipsclass->DB->simple_exec_query( array( 'select' => 'MAX(id) as max', 'from' => 'member_extra', 'where' => "signature != '' AND id > " . $_LAST_ID ) ); + $max = intval( $tmp['max'] ); + break; + + case 'posts': + default: + $tmp = $ipsclass->DB->simple_exec_query( array( 'select' => 'MAX(pid) as max', 'from' => 'posts', 'where' => 'pid > ' . $_LAST_ID ) ); + $max = intval( $tmp['max'] ); + break; + } + + if ( ! $max OR $_LAST_ID > $max ) + { + $COMPLETE = 1; + } + + myprint( "\nStarting batch: Last ID=" . $_LAST_ID . " Max ID=" . $max ); + + //----------------------------------------- + // Avoid limit... + //----------------------------------------- + + switch( $type ) + { + case 'cal': + $ipsclass->DB->build_query( array( 'select' => 'e.*', + 'from' => array( 'cal_events' => 'e' ), + 'order' => 'e.event_id ASC', + 'where' => 'e.event_id > ' . $_LAST_ID, + 'limit' => array( $_BATCH ), + 'add_join' => array( 1 => array( 'type' => 'left', + 'select' => 'm.mgroup', + 'from' => array( 'members' => 'm' ), + 'where' => "m.id=e.event_member_id" + ) ) + ) ); + break; + + case 'announce': + $ipsclass->DB->build_query( array( 'select' => 'a.*', + 'from' => array( 'announcements' => 'a' ), + 'order' => 'a.announce_id ASC', + 'where' => 'a.announce_id > ' . $_LAST_ID, + 'limit' => array( $_BATCH ), + 'add_join' => array( 1 => array( 'type' => 'left', + 'select' => 'm.mgroup', + 'from' => array( 'members' => 'm' ), + 'where' => "m.id=a.announce_member_id" + ) ) + ) ); + break; + + case 'pms': + $ipsclass->DB->build_query( array( 'select' => 'p.*', + 'from' => array( 'message_text' => 'p' ), + 'order' => 'p.msg_id ASC', + 'where' => 'p.msg_id > ' . $_LAST_ID, + 'limit' => array( $_BATCH ), + 'add_join' => array( 1 => array( 'type' => 'left', + 'select' => 'm.mgroup', + 'from' => array( 'members' => 'm' ), + 'where' => "m.id=p.msg_author_id" + ) ) + ) ); + break; + + case 'sigs': + $ipsclass->DB->build_query( array( 'select' => 'me.signature, me.id', + 'from' => array( 'member_extra' => 'me' ), + 'order' => 'me.id ASC', + 'where' => "me.signature != '' AND me.id > " . $_LAST_ID, + 'limit' => array( $_BATCH ), + 'add_join' => array( 1 => array( 'type' => 'left', + 'select' => 'm.mgroup', + 'from' => array( 'members' => 'm' ), + 'where' => "m.id=me.id" + ) ) + ) ); + break; + + case 'posts': + default: + $ipsclass->DB->build_query( array( 'select' => 'p.*', + 'from' => array( 'posts' => 'p' ), + 'where' => 'p.pid > ' . $_LAST_ID, + 'limit' => array( $_BATCH ), + 'add_join' => array( 1 => array( 'type' => 'left', + 'select' => 't.forum_id', + 'from' => array( 'topics' => 't' ), + 'where' => "t.tid=p.topic_id" + ), + 2 => array( 'type' => 'left', + 'select' => 'm.mgroup', + 'from' => array( 'members' => 'm' ), + 'where' => "m.id=p.author_id" + ) ) + ) ); + break; + } + + $outer = $ipsclass->DB->exec_query(); + + //----------------------------------------- + // Process... + //----------------------------------------- + + while( $r = $ipsclass->DB->fetch_row( $outer ) ) + { + //----------------------------------------- + // Reset time limit + //----------------------------------------- + + @set_time_limit( 0 ); + + $parser->quote_open = 0; + $parser->quote_closed = 0; + $parser->quote_error = 0; + $parser->error = ''; + $parser->image_count = 0; + + $ipsclass->member['g_bypass_badwords'] = $ipsclass->cache['group_cache'][ $r['mgroup'] ]['g_bypass_badwords']; + + switch( $type ) + { + case 'cal': + $parser->parse_smilies = $r['event_smilies']; + $parser->parse_html = 0; + $parser->parse_bbcode = 1; + + $rawpost = $parser->pre_edit_parse( $r['event_content'] ); + break; + + case 'announce': + $parser->parse_smilies = 1; + $parser->parse_html = $r['announce_html_enabled']; + $parser->parse_nl2br = 1; + $parser->parse_bbcode = 1; + + $rawpost = $parser->pre_edit_parse( $r['announce_post'] ); + break; + + case 'pms': + $parser->parse_smilies = 1; + $parser->parse_nl2br = 1; + $parser->parse_html = $ipsclass->vars['msg_allow_html']; + $parser->parse_bbcode = $ipsclass->vars['msg_allow_code']; + + $rawpost = $parser->pre_edit_parse( $r['msg_post'] ); + break; + + case 'sigs': + $parser->parse_smilies = 0; + $parser->parsing_signature = 1; + $parser->parse_html = $ipsclass->vars['sig_allow_html']; + $parser->parse_bbcode = $ipsclass->vars['sig_allow_ibc']; + + $rawpost = $parser->pre_edit_parse( $r['signature'] ); + break; + + case 'posts': + default: + $parser->parse_smilies = $r['use_emo']; + $parser->parse_html = ( $ipsclass->cache['forum_cache'][ $r['forum_id'] ]['use_html'] AND + $ipsclass->cache['group_cache'][ $r['mgroup'] ]['g_dohtml'] ) ? 1 : 0; + $parser->parse_bbcode = $ipsclass->cache['forum_cache'][ $r['forum_id'] ]['use_ibc']; + + $rawpost = $parser->pre_edit_parse( $r['post'] ); + break; + } + + $newpost = $parser->pre_db_parse( $rawpost ); + + //----------------------------------------- + // Remove old \' escaping + //----------------------------------------- + + $newpost = str_replace( "\\'", "'", $newpost ); + + //----------------------------------------- + // Convert old dohtml? + //----------------------------------------- + + $htmlstate = 0; + + if ( strstr( strtolower($newpost), '[dohtml]' ) ) + { + //----------------------------------------- + // Can we use HTML? + //----------------------------------------- + + if ( $type == 'posts' AND $ipsclass->cache['forum_cache'][ $r['forum_id'] ]['use_html'] ) + { + $htmlstate = 2; + } + + $newpost = preg_replace( "#\[dohtml\]#i" , "", $newpost ); + $newpost = preg_replace( "#\[/dohtml\]#i", "", $newpost ); + } + else + { + $htmlstate = intval( $r['post_htmlstate'] ); + } + + //----------------------------------------- + // Convert old attachment tags + //----------------------------------------- + + $newpost = preg_replace( "#\[attachmentid=(\d+?)\]#is", "[attachment=\\1:attachment]", $newpost ); + + $newpost = $parser->pre_display_parse( $newpost ); + + if ( $newpost OR $type == 'sigs' ) + { + switch( $type ) + { + case 'posts': + $ipsclass->DB->do_update( 'posts', array( 'post' => $newpost, 'post_htmlstate' => $htmlstate ), 'pid='.$r['pid'] ); + $string = substr( $r['post'], 0, 30 ) . '...'; + $last = $r['pid']; + break; + + case 'pms': + $ipsclass->DB->do_update( 'message_text', array( 'msg_post' => $newpost ), 'msg_id='.$r['msg_id'] ); + $string = substr( $r['msg_post'], 0, 30 ) . '...'; + $last = $r['msg_id']; + break; + + case 'sigs': + $ipsclass->DB->do_update( 'member_extra', array( 'signature' => $newpost ), 'id='.$r['id'] ); + $string = $r['members_display_name']; + $last = $r['id']; + break; + + case 'cal': + $ipsclass->DB->do_update( 'cal_events', array( 'event_content' => $newpost ), 'event_id='.$r['event_id'] ); + $string = substr( $r['event_content'], 0, 30 ) . '...'; + $last = $r['event_id']; + break; + + case 'announce': + $ipsclass->DB->do_update( 'announcements', array( 'announce_post' => $newpost ), 'announce_id='.$r['announce_id'] ); + $string = substr( $r['announce_post'], 0, 30 ) . '...'; + $last = $r['announce_id']; + break; + } + } + + //----------------------------------------- + // Clear out DB cached queries + //----------------------------------------- + + $ipsclass->DB->obj['cached_queries'] = array(); + + $done++; + $_LAST_ID = $last; + + myprint( "[ID:" . $last . '] ' . $string ); + + if ( $end > 0 AND $done > $end ) + { + $COMPLETE = 1; + } + } +} + +$time_end = time(); + +$time_taken = ( $time_end - $time_start) / 60; + +myprint( "\nALL DONE! ($done rebuilt)" ); +myprint( "Time Taken: $time_taken minutes" ); + +@fclose( $stdin ); +exit(0); + +//----------------------------------------- +// My get +//----------------------------------------- + +function getoption() +{ + global $stdin; + //$stdin = fopen('php://stdin', 'r'); + $option = trim( fgets( $stdin ) ); + //fclose( $stdin ); + + return $option; +} + +//----------------------------------------- +// FUNC: Write out +//----------------------------------------- + +function myprint( $message, $newline="\n" ) +{ + $stdout = fopen('php://stdout', 'w'); + fwrite( $stdout, $message . $newline ); + fclose( $stdout ); +} + +?> \ No newline at end of file diff --git a/Tools_and_Scripts/ssi.php b/Tools/ssi.php similarity index 79% rename from Tools_and_Scripts/ssi.php rename to Tools/ssi.php index 47d56a12..42a6d366 100644 --- a/Tools_and_Scripts/ssi.php +++ b/Tools/ssi.php @@ -1,740 +1,782 @@ - SSI script -| > Script written by Matt Mecham -| > Date started: 29th April 2002 -| > UPDATED for 2.0: 1st July 2004 -| > UPDATED for 2.1: 13th Sept 2005 -| -+-------------------------------------------------------------------------- - -+-------------------------------------------------------------------------- -| Использование: -+-------------------------------------------------------------------------- - -Просто используйте этот скрипт через вставки PHP (include) или SSI .shtml теги -для вставки контента на страничку вашего сайта. - -+-------------------------------------------------------------------------- -| Отображение последних 10 тем и сообщений, например, из новостных форумов... -+-------------------------------------------------------------------------- - -include("http://domain.com/forums/ssi.php?a=news&show=10"); - -Вы также можете использовать атрибут "show" для показа различного числа тем. - -+-------------------------------------------------------------------------- -| Отображение статистики форума -+-------------------------------------------------------------------------- - -include("http://domain.com/forums/ssi.php?a=stats"); - -+-------------------------------------------------------------------------- -| Отображение активных пользователей (x пользователей, X гостей, и т.д.) -+-------------------------------------------------------------------------- - -include("http://domain.com/forums/ssi.php?a=active"); - -+-------------------------------------------------------------------------- -| RSS / XML Syndication.. -+-------------------------------------------------------------------------- - -RSS: http://domain.com/forums/ssi.php?a=out&f=1,2,3,4,5&show=10&type=rss -XML: http://domain.com/forums/ssi.php?a=out&f=1,2,3,4,5&show=10&type=xml - -Эти пути будут выводить последние 10 тем из всех форумов, разделенных запятой в -указанной в этом URL ссылке. - - -*/ - - -/** -* Main executable wrapper. -* -* Set-up and load module to run -* -* @package InvisionPowerBoard -* @author Matt Mecham -* @version 2.1 -*/ - -/** -* Script type -* -*/ -define( 'IPB_THIS_SCRIPT', 'public' ); -define( 'IPB_LOAD_SQL' , 'queries' ); - -require_once( './init.php' ); - -//-------------------------------- -// Other set up -//-------------------------------- - -/** -* Path to SSI templates directory -* -*/ -define( 'SSI_TEMPLATES_DIR', ROOT_PATH."ssi_templates" ); -/** -* Maximum number of topics to show -* -*/ -define( 'SSI_MAX_SHOW' , 100 ); - -/** -* Allow SSI export. Enter "0" to turn off. -* -*/ -define( 'SSI_ALLOW_SYND' , 1 ); - -//=========================================================================== -// MAIN PROGRAM -//=========================================================================== - -$INFO = array(); - -//-------------------------------- -// Load our classes -//-------------------------------- - -require_once ROOT_PATH . "sources/ipsclass.php"; -require_once ROOT_PATH . "sources/classes/class_forums.php"; -require_once ROOT_PATH . "conf_global.php"; - -# Initiate super-class -$ipsclass = new ipsclass(); -$ipsclass->vars = $INFO; - -//-------------------------------- -// The clocks a' tickin' -//-------------------------------- - -$Debug = new Debug; -$Debug->startTimer(); - -//-------------------------------- -// Load the DB driver and such -//-------------------------------- - -$ipsclass->init_db_connection(); - -//-------------------------------- -// INIT other classes -//-------------------------------- - -$ipsclass->forums = new forum_functions(); -$ipsclass->forums->ipsclass =& $ipsclass; - -//-------------------------------- -// Set up our vars -//-------------------------------- - -$ipsclass->parse_incoming(); - -//-------------------------------- -// Start off the cache array -//-------------------------------- - -$ipsclass->cache_array = array_merge( array('attachtypes','bbcode', 'multimod','ranks','profilefields'), array('rss_calendar', 'rss_export','components','banfilters', 'settings', 'group_cache', 'systemvars', 'skin_id_cache', 'forum_cache', 'moderators', 'stats', 'languages') ); - -//=========================================================================== -// Get cache... -//=========================================================================== - -$ipsclass->init_load_cache( $ipsclass->cache_array ); - -//-------------------------------- -// Set debug mode -//-------------------------------- - -$ipsclass->DB->set_debug_mode( $ipsclass->vars['sql_debug'] == 1 ? intval($_GET['debug']) : 0 ); - -//-------------------------------- -// Initialize the FUNC -//-------------------------------- - -$ipsclass->initiate_ipsclass(); - -//----------------------------------------- -// Cache md5 check -//----------------------------------------- - -$ipsclass->md5_check = $ipsclass->return_md5_check(); - -//-------------------------------- -// Initialize the forums -//-------------------------------- - -$ipsclass->forums->strip_invisible = 1; -$ipsclass->forums->forums_init(); - -//-------------------------------- -// Load the skin -//-------------------------------- - -$ipsclass->load_skin(); - -//-------------------------------- -// Set the base URL -//-------------------------------- - -$ipsclass->base_url = $ipsclass->vars['board_url'].'/index.'.$ipsclass->vars['php_ext']; - -//-------------------------------- -// INIT class and pass... -//-------------------------------- - -$runme = new ssi_autorun(); -$runme->ipsclass =& $ipsclass; -$runme->auto_run(); - - -/** -* Auto run class -*/ -class ssi_autorun -{ - /** - * Auto run function - */ - function auto_run() - { - //-------------------------------- - // What to do? - //-------------------------------- - - switch ($this->ipsclass->input['a']) - { - case 'news': - $this->do_news(); - break; - - case 'active': - $this->do_active(); - break; - - case 'stats': - $this->do_stats(); - break; - - case 'out': - if ( SSI_ALLOW_SYND == 1 ) - { - $this->do_syndication(); - } - else - { - exit(); - } - break; - - default: - echo("An error occured whilst processing this directive"); - exit(); - break; - } - } - - /** - * Do Syndication - * - * Export topics / titles from selected forums - */ - function do_syndication() - { - //---------------------------------------- - // Sort out the forum ids - //---------------------------------------- - - $tmp_forums = array(); - $forums = array(); - - if ( $this->ipsclass->input['f'] ) - { - $tmp_forums = explode( ",", $this->ipsclass->input['f'] ); - } - else - { - fatal_error("Fatal error: no forum id specified"); - } - - //---------------------------------------- - // Intval the IDs - //---------------------------------------- - - foreach ($tmp_forums as $f ) - { - $f = intval($f); - - if ( $f ) - { - $forums[] = $f; - } - } - - //---------------------------------------- - // Check... - //---------------------------------------- - - if ( count($forums) < 1 ) - { - fatal_error("Fatal error: no forum id specified"); - } - - $sql_fields = implode( ",", $forums ); - - //---------------------------------------- - // Number of topics to return? - //---------------------------------------- - - $perpage = intval($this->ipsclass->input['show']) ? intval($this->ipsclass->input['show']) : 10; - - $perpage = ( $perpage > SSI_MAX_SHOW ) ? SSI_MAX_SHOW : $perpage; - - //---------------------------------------- - // Load the template... - //---------------------------------------- - - if ( $this->ipsclass->input['type'] == 'xml' ) - { - $template = $this->load_template("syndicate_xml.html"); - } - else - { - $template = $this->load_template("syndicate_rss.html"); - } - - //---------------------------------------- - // parse.. - //---------------------------------------- - - $to_echo = ""; - $top = ""; - $row = ""; - $bottom = ""; - - preg_match( "#\[TOP\](.+?)\[/TOP\]#is", $template, $match ); - - $top = trim($match[1]); - - preg_match( "#\[ROW\](.+?)\[/ROW\]#is", $template, $match ); - - $row = trim($match[1]); - - preg_match( "#\[BOTTOM\](.+?)\[/BOTTOM\]#is", $template, $match ); - - $bottom = trim($match[1]); - - //---------------------------------------- - // Header parse... - //---------------------------------------- - - @header("Content-Type: text/xml;charset={$this->ipsclass->vars['gb_char_set']}"); - @header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT'); - @header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - @header('Pragma: public'); - - $to_echo .= $this->parse_template( $top, array ( - 'board_url' => $this->ipsclass->base_url , - 'board_name' => $this->ipsclass->vars['board_name'], - ) ); - - //---------------------------------------- - // Fix up - //---------------------------------------- - - $group = $this->ipsclass->cache['group_cache'][ $this->ipsclass->vars['guest_group'] ]; - - $this->ipsclass->perm_id_array = explode( ",", $group['g_perm_id'] ); - - //---------------------------------------- - // Get the topics, member info and other stuff - //---------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'topics', - 'where' => "forum_id IN ($sql_fields) AND approved=1", - 'order' => 'last_post DESC', - 'limit' => array( 0, $perpage ) ) ); - - $this->ipsclass->DB->simple_exec(); - - if ( ! $this->ipsclass->DB->get_num_rows() ) - { - fatal_error("Could not get the information from the database"); - } - - while ( $i = $this->ipsclass->DB->fetch_row() ) - { - $forum = $this->ipsclass->forums->forum_by_id[ $i['forum_id'] ]; - - if ( $this->ipsclass->check_perms( $forum['read_perms'] ) != TRUE ) - { - continue; - } - - if ($forum['password'] != "" ) - { - continue; - } - - $to_echo .= $this->parse_template( $row, array ( - 'topic_title' => str_replace( '&#', '&#', $i['title'] ), - 'topic_id' => $i['tid'], - 'topic_link' => $this->ipsclass->base_url."?showtopic=".$i['tid'], - 'forum_title' => htmlspecialchars($forum['name']), - 'forum_id' => $i['forum_id'], - 'last_poster_id' => $i['last_poster_id'], - 'last_post_name' => $i['last_poster_name'], - 'last_post_time' => $this->ipsclass->get_date( $i['last_post'] , 'LONG', 1 ), - 'timestamp' => $i['last_post'], - 'starter_id' => $i['starter_id'], - 'starter_name' => $i['starter_name'], - 'board_url' => $this->ipsclass->base_url , - 'board_name' => $this->ipsclass->vars['board_name'], - 'rfc_date' => date( 'r', $i['last_post'] ), - ) ) . "\r\n"; - } - - //---------------------------------------- - // Print bottom... - //---------------------------------------- - - echo $to_echo."\r\n".$bottom; - - exit(); - } - - - /** - * Do Stats - * - * Show totals - */ - function do_stats() - { - //---------------------------------------- - // Load the template... - //---------------------------------------- - - $template = $this->load_template("stats.html"); - - //---------------------------------------- - // INIT - //---------------------------------------- - - $to_echo = ""; - $time = time() - 900; - - //---------------------------------------- - // Make sure we've got something - //---------------------------------------- - - if ( ! is_array( $this->ipsclass->cache['stats'] ) ) - { - $this->ipsclass->cache['stats'] = array(); - - $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'cache_store', 'where' => "cs_key='stats'" ) ); - $this->ipsclass->DB->do_insert( 'cache_store', array( 'cs_array' => 1, 'cs_key' => 'stats', 'cs_value' => addslashes(serialize($this->ipsclass->cache['stats'])) ) ); - } - - $stats = $this->ipsclass->cache['stats']; - $total_posts = $stats['total_replies']+$stats['total_topics']; - $to_echo = $this->parse_template( $template, - array ( - 'total_posts' => $total_posts, - 'topics' => $stats['total_topics'], - 'replies' => $stats['total_replies'], - 'members' => $stats['mem_count'] - ) - ); - echo $to_echo; - - exit(); - } - - /** - * Do News - * - * Show news text - */ - function do_news() - { - //---------------------------------------- - // Check - //---------------------------------------- - - if ( (! $this->ipsclass->vars['news_forum_id']) or ($this->ipsclass->vars['news_forum_id'] == "" ) ) - { - fatal_error("No news forum assigned"); - } - - //---------------------------------------- - // INIT - //---------------------------------------- - - $perpage = intval($this->ipsclass->input['show']) > 0 ? intval($this->ipsclass->input['show']) : 10; - $perpage = ( $perpage > SSI_MAX_SHOW ) ? SSI_MAX_SHOW : $perpage; - $to_echo = ""; - - //---------------------------------------- - // Get post parser - //---------------------------------------- - - require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); - $parser = new parse_bbcode(); - $parser->ipsclass =& $this->ipsclass; - $parser->allow_update_caches = 0; - - //----------------------------------------- - // Load the template... - //----------------------------------------- - - $template = $this->load_template("news.html"); - - //----------------------------------------- - // Get the topics, member info and other stuff - //----------------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => 't.*', - 'from' => array( 'topics' => 't' ), - 'where' => "t.forum_id={$this->ipsclass->vars['news_forum_id']} AND t.approved=1", - 'order' => 't.tid DESC', - 'limit' => array( 0, $perpage ), - 'add_join' => array( 0 => array( 'select' => 'm.members_display_name as member_name, m.mgroup, m.id as member_id,m.title as member_title', - 'from' => array( 'members' => 'm' ), - 'where' => "m.id=t.starter_id", - 'type' => 'left' ), - 1 => array( 'select' => 'p.*', - 'from' => array( 'posts' => 'p' ), - 'where' => "t.topic_firstpost=p.pid", - 'type' => 'inner' ) ) - ) ); - - $this->ipsclass->DB->exec_query(); - - while ( $row = $this->ipsclass->DB->fetch_row() ) - { - - - $parser->parse_html = ( $this->ipsclass->cache['forum_cache'][ $row['forum_id'] ]['use_html'] and $this->ipsclass->cache['group_cache'][ $row['mgroup'] ]['g_dohtml'] and $row['post_htmlstate'] ) ? 1 : 0; - $parser->parse_nl2br = $row['post_htmlstate'] == 2 ? 1 : 0; - - $row['post'] = $parser->pre_display_parse( $row['post'] ); - $row['member_name'] = $row['member_name'] ? $row['member_name'] : $row['author_name']; - - $to_echo .= $this->parse_template( $template, - array ( - 'profile_link' => $this->ipsclass->base_url."?act=Profile&CODE=03&MID=".intval($row['member_id']), - 'member_name' => $row['member_name'], - 'post_date' => $this->ipsclass->get_date( $row['post_date'], 'LONG', 1 ), - 'topic_title' => $row['title'], - 'post' => $row['post'], - 'comments' => $row['posts'], - 'view_all_link' => $this->ipsclass->base_url."?showtopic={$row['tid']}" - ) - ); - } - - //----------------------------------------- - // Get the macros and replace them - //----------------------------------------- - - if ( is_array( $this->ipsclass->skin['_macros'] ) ) - { - foreach( $this->ipsclass->skin['_macros'] as $i => $row ) - { - if ( $row['macro_value'] != "" ) - { - $to_echo = str_replace( "<{".$row['macro_value']."}>", $row['macro_replace'], $to_echo ); - } - } - } - - $to_echo = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $to_echo ); - $to_echo = str_replace( "<#EMO_DIR#>", $this->ipsclass->skin['_emodir'] , $to_echo ); - - echo $to_echo; - - exit(); - } - - /** - * Do Active - * - * Show active users - */ - function do_active() - { - //-------------------------------- - // Load the template... - //-------------------------------- - - $template = $this->load_template("active.html"); - - //-------------------------------- - // INIT - //-------------------------------- - - $to_echo = ""; - - //-------------------------------- - // Make sure we have a cut off... - //-------------------------------- - - if ($this->ipsclass->vars['au_cutoff'] == "") - { - $this->ipsclass->vars['au_cutoff'] = 15; - } - - //-------------------------------- - // Get the users from the DB - //-------------------------------- - - $cut_off = $this->ipsclass->vars['au_cutoff'] * 60; - $time = time() - $cut_off; - $rows = array( 0 => array( 'login_type' => substr($this->ipsclass->member['login_anonymous'],0, 1), - 'running_time' => time(), - 'member_id' => $this->ipsclass->member['id'], - 'member_name' => $this->ipsclass->member['name'], - 'member_group' => $this->ipsclass->member['mgroup'] ) ); - - $this->ipsclass->DB->simple_construct( array( 'select' => 'id, member_id, member_name, login_type, running_time, member_group', - 'from' => 'sessions', - 'where' => "running_time > $time", - 'order' => "running_time DESC" - ) ); - - - $this->ipsclass->DB->simple_exec(); - - //----------------------------------------- - // FETCH... - //----------------------------------------- - - while ($r = $this->ipsclass->DB->fetch_row() ) - { - $rows[] = $r; - } - - //-------------------------------- - // cache all printed members so we - // don't double print them - //-------------------------------- - - $cached = array(); - $active = array(); - - foreach( $rows as $result ) - { - if ($result['member_id'] == 0) - { - $active['GUESTS']++; - } - else - { - if (empty( $cached[ $result['member_id'] ] ) ) - { - $cached[ $result['member_id'] ] = 1; - - if ($result['login_type'] == 1) - { - $active['ANON']++; - } - else - { - $active['MEMBERS']++; - } - } - } - } - - $active['TOTAL'] = $active['MEMBERS'] + $active['GUESTS'] + $active['ANON']; - - - $to_echo = $this->parse_template( $template, - array ( - 'total' => $active['TOTAL'] ? $active['TOTAL'] : 0 , - 'members' => $active['MEMBERS'] ? $active['MEMBERS'] : 0, - 'guests' => $active['GUESTS'] ? $active['GUESTS'] : 0, - 'anon' => $active['ANON'] ? $active['ANON'] : 0, - ) - ); - - - echo $to_echo; - - exit(); - } - - - /** - * Parse template - * - * Parses the template. Duh. - */ - function parse_template( $template, $assigned=array() ) - { - foreach( $assigned as $word => $replace) - { - $template = preg_replace( "/\{$word\}/i", "$replace", $template ); - } - - return $template; - } - - /** - * Load template - * - * Loads the template - */ - function load_template($template="") - { - $filename = SSI_TEMPLATES_DIR."/".$template; - - if ( file_exists($filename) ) - { - if ( $FH = fopen($filename, 'r') ) - { - $template = fread( $FH, filesize($filename) ); - fclose($FH); - } - else - { - fatal_error("Couldn't open the template file"); - } - } - else - { - fatal_error("Template file does not exist"); - } - - return $template; - } - -} + SSI script +| > Script written by Matt Mecham +| > Date started: 29th April 2002 +| > UPDATED for 2.0: 1st July 2004 +| > UPDATED for 2.1: 13th Sept 2005 +| ++-------------------------------------------------------------------------- + ++-------------------------------------------------------------------------- +| USAGE: ++-------------------------------------------------------------------------- + +Simply call this script via PHP includes, or SSI .shtml tags to generate content +on the fly, streamed into your own webpage. + ++-------------------------------------------------------------------------- +| To show the last 10 topics and posts in the news forums... ++-------------------------------------------------------------------------- + +include("http://domain.com/forums/ssi.php?a=news&show=10"); + +You can adjust the "show" attribute to display a different amount of topics. + ++-------------------------------------------------------------------------- +| To show the board statistics ++-------------------------------------------------------------------------- + +include("http://domain.com/forums/ssi.php?a=stats"); + ++-------------------------------------------------------------------------- +| To show the active users stats (x Members, X Guests, etc) ++-------------------------------------------------------------------------- + +include("http://domain.com/forums/ssi.php?a=active"); + ++-------------------------------------------------------------------------- +| RSS / XML Syndication.. ++-------------------------------------------------------------------------- + +RSS: http://domain.com/forums/ssi.php?a=out&f=1,2,3,4,5&show=10&type=rss +XML: http://domain.com/forums/ssi.php?a=out&f=1,2,3,4,5&show=10&type=xml + +Will show last 10 topics in reverse chronological last post date order from +all the forums in the comma separated list + +*/ + + +/** +* Main executable wrapper. +* +* Set-up and load module to run +* +* @package InvisionPowerBoard +* @author Matt Mecham +* @version 2.1 +*/ + +/** +* Script type +* +*/ +define( 'IPB_THIS_SCRIPT', 'public' ); +define( 'IPB_LOAD_SQL' , 'queries' ); + +require_once( './init.php' ); + +//-------------------------------- +// Other set up +//-------------------------------- + +/** +* Path to SSI templates directory +* +*/ +define( 'SSI_TEMPLATES_DIR', ROOT_PATH."ssi_templates" ); +/** +* Maximum number of topics to show +* +*/ +define( 'SSI_MAX_SHOW' , 100 ); + +/** +* Allow SSI export. Enter "0" to turn off. +* +*/ +define( 'SSI_ALLOW_SYND' , 1 ); + +//=========================================================================== +// MAIN PROGRAM +//=========================================================================== + +$INFO = array(); + +//-------------------------------- +// Load our classes +//-------------------------------- + +require_once ROOT_PATH . "sources/ipsclass.php"; +require_once ROOT_PATH . "sources/classes/class_forums.php"; +require_once ROOT_PATH . "sources/classes/class_session.php"; +require_once KERNEL_PATH . "class_converge.php"; +require_once ROOT_PATH . "conf_global.php"; + +# Initiate super-class +$ipsclass = new ipsclass(); +$ipsclass->vars = $INFO; + +//-------------------------------- +// The clocks a' tickin' +//-------------------------------- + +$Debug = new Debug; +$Debug->startTimer(); + +//-------------------------------- +// Load the DB driver and such +//-------------------------------- + +$ipsclass->init_db_connection(); + +//-------------------------------- +// INIT other classes +//-------------------------------- + +$ipsclass->sess = new session(); +$ipsclass->sess->ipsclass =& $ipsclass; + +$ipsclass->forums = new forum_functions(); +$ipsclass->forums->ipsclass =& $ipsclass; + +//-------------------------------- +// Set up our vars +//-------------------------------- + +$ipsclass->parse_incoming(); + +//-------------------------------- +// Set converge +//-------------------------------- + +$ipsclass->converge = new class_converge( $ipsclass->DB ); + +//-------------------------------- +// Start off the cache array +//-------------------------------- + +$ipsclass->cache_array = array_merge( array('attachtypes','bbcode', 'multimod','ranks','profilefields'), array('rss_calendar', 'rss_export','components','banfilters', 'settings', 'group_cache', 'systemvars', 'skin_id_cache', 'forum_cache', 'moderators', 'stats', 'languages') ); + +//=========================================================================== +// Get cache... +//=========================================================================== + +$ipsclass->init_cache_setup(); +$ipsclass->init_load_cache( $ipsclass->cache_array ); + +//-------------------------------- +// Set debug mode +//-------------------------------- + +$ipsclass->DB->set_debug_mode( $ipsclass->vars['sql_debug'] == 1 ? intval($_GET['debug']) : 0 ); + +//-------------------------------- +// Initialize the FUNC +//-------------------------------- + +$ipsclass->initiate_ipsclass(); + +//-------------------------------- +// Initialize the member info +//-------------------------------- + +$ipsclass->member = $ipsclass->sess->authorise(); + +//----------------------------------------- +// Cache md5 check +//----------------------------------------- + +$ipsclass->md5_check = $ipsclass->return_md5_check(); + +//-------------------------------- +// Initialize the forums +//-------------------------------- + +$ipsclass->forums->strip_invisible = 1; +$ipsclass->forums->forums_init(); + +//-------------------------------- +// Load the skin +//-------------------------------- + +$ipsclass->load_skin(); + +//-------------------------------- +// Set the base URL +//-------------------------------- + +$ipsclass->base_url = $ipsclass->vars['board_url'].'/index.'.$ipsclass->vars['php_ext']; + +//-------------------------------- +// INIT class and pass... +//-------------------------------- + +$runme = new ssi_autorun(); +$runme->ipsclass =& $ipsclass; +$runme->auto_run(); + + +/** +* Auto run class +*/ +class ssi_autorun +{ + /** + * Auto run function + */ + function auto_run() + { + //-------------------------------- + // What to do? + //-------------------------------- + + switch ($this->ipsclass->input['a']) + { + case 'news': + $this->do_news(); + break; + + case 'active': + $this->do_active(); + break; + + case 'stats': + $this->do_stats(); + break; + + case 'out': + if ( SSI_ALLOW_SYND == 1 ) + { + $this->do_syndication(); + } + else + { + exit(); + } + break; + + default: + echo("An error occured whilst processing this directive"); + exit(); + break; + } + } + + /** + * Do Syndication + * + * Export topics / titles from selected forums + */ + function do_syndication() + { + //---------------------------------------- + // Sort out the forum ids + //---------------------------------------- + + $tmp_forums = array(); + $forums = array(); + + if ( $this->ipsclass->input['f'] ) + { + $tmp_forums = explode( ",", $this->ipsclass->input['f'] ); + } + else + { + fatal_error("Fatal error: no forum id specified"); + } + + //---------------------------------------- + // Intval the IDs + //---------------------------------------- + + foreach ($tmp_forums as $f ) + { + $f = intval($f); + + if ( $f ) + { + $forums[] = $f; + } + } + + //---------------------------------------- + // Check... + //---------------------------------------- + + if ( count($forums) < 1 ) + { + fatal_error("Fatal error: no forum id specified"); + } + + $sql_fields = implode( ",", $forums ); + + //---------------------------------------- + // Number of topics to return? + //---------------------------------------- + + $perpage = intval($this->ipsclass->input['show']) ? intval($this->ipsclass->input['show']) : 10; + + $perpage = ( $perpage > SSI_MAX_SHOW ) ? SSI_MAX_SHOW : $perpage; + + //---------------------------------------- + // Load the template... + //---------------------------------------- + + if ( $this->ipsclass->input['type'] == 'xml' ) + { + $template = $this->load_template("syndicate_xml.html"); + } + else + { + $template = $this->load_template("syndicate_rss.html"); + } + + //---------------------------------------- + // parse.. + //---------------------------------------- + + $to_echo = ""; + $top = ""; + $row = ""; + $bottom = ""; + + preg_match( "#\[TOP\](.+?)\[/TOP\]#is", $template, $match ); + + $top = trim($match[1]); + + preg_match( "#\[ROW\](.+?)\[/ROW\]#is", $template, $match ); + + $row = trim($match[1]); + + preg_match( "#\[BOTTOM\](.+?)\[/BOTTOM\]#is", $template, $match ); + + $bottom = trim($match[1]); + + //---------------------------------------- + // Header parse... + //---------------------------------------- + + @header("Content-Type: text/xml;charset={$this->ipsclass->vars['gb_char_set']}"); + @header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT'); + @header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + @header('Pragma: public'); + + $to_echo .= $this->parse_template( $top, array ( + 'board_url' => $this->ipsclass->base_url , + 'board_name' => $this->ipsclass->vars['board_name'], + ) ); + + //---------------------------------------- + // Fix up + //---------------------------------------- + + $group = $this->ipsclass->cache['group_cache'][ $this->ipsclass->vars['guest_group'] ]; + + $this->ipsclass->perm_id_array = explode( ",", $group['g_perm_id'] ); + + //---------------------------------------- + // Get the topics, member info and other stuff + //---------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', + 'from' => 'topics', + 'where' => "forum_id IN ($sql_fields) AND approved=1", + 'order' => 'last_post DESC', + 'limit' => array( 0, $perpage ) ) ); + + $this->ipsclass->DB->simple_exec(); + + if ( ! $this->ipsclass->DB->get_num_rows() ) + { + fatal_error("Could not get the information from the database"); + } + + while ( $i = $this->ipsclass->DB->fetch_row() ) + { + $forum = $this->ipsclass->forums->forum_by_id[ $i['forum_id'] ]; + + if ( $this->ipsclass->check_perms( $forum['read_perms'] ) != TRUE ) + { + continue; + } + + if ($forum['password'] != "" ) + { + continue; + } + + $to_echo .= $this->parse_template( $row, array ( + 'topic_title' => str_replace( '&#', '&#', $i['title'] ), + 'topic_id' => $i['tid'], + 'topic_link' => $this->ipsclass->base_url."?showtopic=".$i['tid'], + 'forum_title' => htmlspecialchars($forum['name']), + 'forum_id' => $i['forum_id'], + 'last_poster_id' => $i['last_poster_id'], + 'last_post_name' => $i['last_poster_name'], + 'last_post_time' => $this->ipsclass->get_date( $i['last_post'] , 'LONG', 1 ), + 'timestamp' => $i['last_post'], + 'starter_id' => $i['starter_id'], + 'starter_name' => $i['starter_name'], + 'board_url' => $this->ipsclass->base_url , + 'board_name' => $this->ipsclass->vars['board_name'], + 'rfc_date' => date( 'r', $i['last_post'] ), + ) ) . "\r\n"; + } + + //---------------------------------------- + // Print bottom... + //---------------------------------------- + + echo $to_echo."\r\n".$bottom; + + exit(); + } + + + /** + * Do Stats + * + * Show totals + */ + function do_stats() + { + //---------------------------------------- + // Load the template... + //---------------------------------------- + + $template = $this->load_template("stats.html"); + + //---------------------------------------- + // INIT + //---------------------------------------- + + $to_echo = ""; + $time = time() - 900; + + //---------------------------------------- + // Make sure we've got something + //---------------------------------------- + + if ( ! is_array( $this->ipsclass->cache['stats'] ) ) + { + $this->ipsclass->cache['stats'] = array(); + + $this->ipsclass->update_cache( array( 'name' => 'stats', 'array' => 1, 'deletefirst' => 1 ) ); + } + + $stats = $this->ipsclass->cache['stats']; + $total_posts = $stats['total_replies']+$stats['total_topics']; + $to_echo = $this->parse_template( $template, + array ( + 'total_posts' => $total_posts, + 'topics' => $stats['total_topics'], + 'replies' => $stats['total_replies'], + 'members' => $stats['mem_count'] + ) + ); + echo $to_echo; + + exit(); + } + + /** + * Do News + * + * Show news text + */ + function do_news() + { + //---------------------------------------- + // Check + //---------------------------------------- + + if ( (! $this->ipsclass->vars['news_forum_id']) or ($this->ipsclass->vars['news_forum_id'] == "" ) ) + { + fatal_error("No news forum assigned"); + } + + //---------------------------------------- + // INIT + //---------------------------------------- + + $perpage = intval($this->ipsclass->input['show']) > 0 ? intval($this->ipsclass->input['show']) : 10; + $perpage = ( $perpage > SSI_MAX_SHOW ) ? SSI_MAX_SHOW : $perpage; + $to_echo = ""; + + //----------------------------------------- + // Load the template... + //----------------------------------------- + + $template = $this->load_template("news.html"); + + //----------------------------------------- + // Get the topics, member info and other stuff + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => 't.*', + 'from' => array( 'topics' => 't' ), + 'where' => "t.forum_id={$this->ipsclass->vars['news_forum_id']} AND t.approved=1", + 'order' => 't.tid DESC', + 'limit' => array( 0, $perpage ), + 'add_join' => array( 0 => array( 'select' => 'm.members_display_name as member_name, m.mgroup, m.id as member_id,m.title as member_title', + 'from' => array( 'members' => 'm' ), + 'where' => "m.id=t.starter_id", + 'type' => 'left' ), + 1 => array( 'select' => 'p.*', + 'from' => array( 'posts' => 'p' ), + 'where' => "t.topic_firstpost=p.pid", + 'type' => 'left' ) ) + ) ); + + $this->ipsclass->DB->exec_query(); + + while ( $row = $this->ipsclass->DB->fetch_row() ) + { + $row['member_name'] = $row['member_name'] ? $row['member_name'] : $row['author_name']; + + $to_echo .= $this->parse_template( $template, + array ( + 'profile_link' => $this->ipsclass->base_url."?showuser=".intval($row['member_id']), + 'member_name' => $row['member_name'], + 'post_date' => $this->ipsclass->get_date( $row['post_date'], 'LONG', 1 ), + 'topic_title' => $row['title'], + 'post' => $row['post'], + 'comments' => $row['posts'], + 'view_all_link' => $this->ipsclass->base_url."?showtopic={$row['tid']}" + ) + ); + } + + //----------------------------------------- + // Get the macros and replace them + //----------------------------------------- + + if ( is_array( $this->ipsclass->skin['_macros'] ) ) + { + foreach( $this->ipsclass->skin['_macros'] as $row ) + { + if ( $row['macro_value'] != "" ) + { + $to_echo = str_replace( "<{".$row['macro_value']."}>", $row['macro_replace'], $to_echo ); + } + } + } + + $to_echo = preg_replace( "#([^/])style_images/(<\#IMG_DIR\#>|".preg_quote($this->ipsclass->skin['_imagedir'], '/').")#is", "\\1".$this->ipsclass->vars['board_url']."/style_images/\\2", $to_echo ); + $to_echo = preg_replace( "#([^/])style_emoticons#is", "\\1".$this->ipsclass->vars['board_url']."/style_emoticons", $to_echo ); + $to_echo = preg_replace( "#([^/])style_avatars#is" , "\\1".$this->ipsclass->vars['board_url']."/style_avatars", $to_echo ); + $to_echo = preg_replace( "#([^/])jscripts#is" , "\\1".$this->ipsclass->vars['board_url']."/jscripts", $to_echo ); + + $to_echo = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $to_echo ); + $to_echo = str_replace( "<#EMO_DIR#>", $this->ipsclass->skin['_emodir'] , $to_echo ); + + echo $to_echo; + + exit(); + } + + /** + * Do Active + * + * Show active users + */ + function do_active() + { + //-------------------------------- + // Load the template... + //-------------------------------- + + $template = $this->load_template("active.html"); + + //-------------------------------- + // INIT + //-------------------------------- + + $to_echo = ""; + + //-------------------------------- + // Make sure we have a cut off... + //-------------------------------- + + if ($this->ipsclass->vars['au_cutoff'] == "") + { + $this->ipsclass->vars['au_cutoff'] = 15; + } + + //----------------------------------------- + // Get the users from the DB + //----------------------------------------- + + $cut_off = $this->ipsclass->vars['au_cutoff'] * 60; + $time = time() - $cut_off; + $rows = array(); + $ar_time = time(); + + if ( $this->ipsclass->member['id'] ) + { + $rows = array( $ar_time => array( 'login_type' => substr($this->ipsclass->member['login_anonymous'],0, 1), + 'running_time' => $ar_time, + 'member_id' => $this->ipsclass->member['id'], + 'member_name' => $this->ipsclass->member['members_display_name'], + 'member_group' => $this->ipsclass->member['mgroup'] ) ); + } + + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, member_id, member_name, login_type, running_time, member_group', + 'from' => 'sessions', + 'where' => "running_time > $time", + //'order' => "running_time DESC" // Sort in PHP to avoid filesort in SQL + ) ); + + + $this->ipsclass->DB->simple_exec(); + + //----------------------------------------- + // FETCH... + //----------------------------------------- + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $rows[ $r['running_time'].'.'.$r['id'] ] = $r; + } + + krsort( $rows ); + + //-------------------------------- + // cache all printed members so we + // don't double print them + //-------------------------------- + + $cached = array(); + $active = array(); + + foreach( $rows as $result ) + { + $last_date = $this->ipsclass->get_time( $result['running_time'] ); + + //----------------------------------------- + // Bot? + //----------------------------------------- + + if ( strstr( $result['id'], '_session' ) ) + { + //----------------------------------------- + // Seen bot of this type yet? + //----------------------------------------- + + $botname = preg_replace( '/^(.+?)=/', "\\1", $result['id'] ); + + if ( ! $cached[ $result['member_name'] ] ) + { + $cached[ $result['member_name'] ] = 1; + } + else + { + //----------------------------------------- + // Yup, count others as guest + //----------------------------------------- + + $active['GUESTS']++; + } + } + + //----------------------------------------- + // Guest? + //----------------------------------------- + + else if ( ! $result['member_id'] ) + { + $active['GUESTS']++; + } + + //----------------------------------------- + // Member? + //----------------------------------------- + + else + { + if ( empty( $cached[ $result['member_id'] ] ) ) + { + $cached[ $result['member_id'] ] = 1; + + if ($result['login_type']) + { + $active['ANON']++; + } + else + { + $active['MEMBERS']++; + } + } + } + } + + $active['TOTAL'] = $active['MEMBERS'] + $active['GUESTS'] + $active['ANON']; + + + $to_echo = $this->parse_template( $template, + array ( + 'total' => $active['TOTAL'] ? $active['TOTAL'] : 0 , + 'members' => $active['MEMBERS'] ? $active['MEMBERS'] : 0, + 'guests' => $active['GUESTS'] ? $active['GUESTS'] : 0, + 'anon' => $active['ANON'] ? $active['ANON'] : 0, + ) + ); + + + echo $to_echo; + + exit(); + } + + + /** + * Parse template + * + * Parses the template. Duh. + */ + function parse_template( $template, $assigned=array() ) + { + foreach( $assigned as $word => $replace) + { + $template = preg_replace( "/\{$word\}/i", "$replace", $template ); + } + + return $template; + } + + /** + * Load template + * + * Loads the template + */ + function load_template($template="") + { + $filename = SSI_TEMPLATES_DIR."/".$template; + + if ( file_exists($filename) ) + { + if ( $FH = fopen($filename, 'r') ) + { + $template = fread( $FH, filesize($filename) ); + fclose($FH); + } + else + { + fatal_error("Couldn't open the template file"); + } + } + else + { + fatal_error("Template file does not exist"); + } + + return $template; + } + +} ?> \ No newline at end of file diff --git a/Tools/ssi_templates/active.html b/Tools/ssi_templates/active.html new file mode 100644 index 00000000..77eb56ff --- /dev/null +++ b/Tools/ssi_templates/active.html @@ -0,0 +1 @@ +
Users browsing the forums: {total}
Active members: {members}
Active Guests: {guests}
Active Anonymous: {anon}

\ No newline at end of file diff --git a/Tools/ssi_templates/index.html b/Tools/ssi_templates/index.html new file mode 100644 index 00000000..af2fbe79 --- /dev/null +++ b/Tools/ssi_templates/index.html @@ -0,0 +1 @@ + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/Tools/ssi_templates/news.html b/Tools/ssi_templates/news.html new file mode 100644 index 00000000..d4a4197b --- /dev/null +++ b/Tools/ssi_templates/news.html @@ -0,0 +1 @@ +
Posted By: {member_name}
Posted On: {post_date}
Title: {topic_title}

{post}

Comments: {comments} :: View Comments

\ No newline at end of file diff --git a/Tools/ssi_templates/stats.html b/Tools/ssi_templates/stats.html new file mode 100644 index 00000000..9edd7509 --- /dev/null +++ b/Tools/ssi_templates/stats.html @@ -0,0 +1 @@ +
Board Statistics
Total Posts: {total_posts} ( Topics: {topics}, Replies {replies} )
Registered Members: {members}

\ No newline at end of file diff --git a/Tools_and_Scripts/ssi_templates/syndicate_rss.html b/Tools/ssi_templates/syndicate_rss.html similarity index 73% rename from Tools_and_Scripts/ssi_templates/syndicate_rss.html rename to Tools/ssi_templates/syndicate_rss.html index c31af964..c6c49180 100644 --- a/Tools_and_Scripts/ssi_templates/syndicate_rss.html +++ b/Tools/ssi_templates/syndicate_rss.html @@ -16,7 +16,7 @@ {topic_link} {topic_link} {forum_title} - {forum_title}
Last Poster: {last_post_name}
Last Post: {last_post_time}]]>
+ {forum_title}
Last Poster: {last_post_name}
Last Post: {last_post_time}]]>
{rfc_date} [/ROW] diff --git a/Tools/ssi_templates/syndicate_xml.html b/Tools/ssi_templates/syndicate_xml.html new file mode 100644 index 00000000..79f75785 --- /dev/null +++ b/Tools/ssi_templates/syndicate_xml.html @@ -0,0 +1 @@ +[TOP] ]> [/TOP] [ROW] {topic_title} {last_post_name} {starter_name} {forum_title} {last_post_time} [/ROW] [BOTTOM] [/BOTTOM] \ No newline at end of file diff --git a/Tools_and_Scripts/portal/index_rename.php b/Tools_and_Scripts/portal/index_rename.php deleted file mode 100644 index 412b6790..00000000 --- a/Tools_and_Scripts/portal/index_rename.php +++ /dev/null @@ -1,28 +0,0 @@ - \ No newline at end of file diff --git a/Tools_and_Scripts/portal/readme.txt b/Tools_and_Scripts/portal/readme.txt deleted file mode 100644 index 5b1c3f66..00000000 --- a/Tools_and_Scripts/portal/readme.txt +++ /dev/null @@ -1,44 +0,0 @@ -Invision Power Portal ---------------------------- - -Installation Snyopsis -..................... - -Open up index_rename.php, edit the variable at the top to relflect the actual URL of your board (instructions in the file). -If you're installing this in a different directory to your IPB, renamed 'index_rename.php' to 'index.php'. It's named as -such by default to ensure that you do not overwrite an existing file named the same. - - -INSTALLATION ------------- - -This guide assumes that you have installed IPB in /forums/ and wish for the portal to be the first page your visitors see. - -Open up index.php and edit the path to where the forums directory is: - -EXAMPLES: - -CORRECT: define( 'IPB_URL', 'http://www.mywebsite.com/forums' ); - ---WRONG: define( 'IPB_URL', 'http://www.mywebsite.com/forums/' ); ---WRONG: define( 'IPB_URL', 'http://www.mywebsite.com/forums/index.php' ); - -Make sure you don't include a trailing slash OR "index.php" on the end of the URL. - -Save the file and upload it to your root web directory folder, often called "public_html" or "www". - - -SETTING UP ----------- - -Before you can use IPB Portal, you'll need to make sure you've switched it on from the ACP. If you don't do this, you may -receive PHP errors from index.php. - -Simply log into your forums ACP and expand the "System Settings" sub-menu and click on "View all general settings" and then -find "IPB Portal". - -That's it, you're all done! - - - - diff --git a/Tools_and_Scripts/show.php b/Tools_and_Scripts/show.php deleted file mode 100644 index d5bfbfee..00000000 --- a/Tools_and_Scripts/show.php +++ /dev/null @@ -1,55 +0,0 @@ - - diff --git a/Tools_and_Scripts/ssi_templates/active.html b/Tools_and_Scripts/ssi_templates/active.html deleted file mode 100644 index 3fbe0027..00000000 --- a/Tools_and_Scripts/ssi_templates/active.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - -
Users browsing the forums: {total}
- - - - -
Active members: {members}
Active Guests: {guests}
Active Anonymous: {anon} -
-
-
\ No newline at end of file diff --git a/Tools_and_Scripts/ssi_templates/index.html b/Tools_and_Scripts/ssi_templates/index.html deleted file mode 100644 index 787531db..00000000 --- a/Tools_and_Scripts/ssi_templates/index.html +++ /dev/null @@ -1,15 +0,0 @@ - -Ошибка < Русская версия Invision Power Board - -

Ошибка < Русская версия Invision Power Board

-
-Вы попали на несуществующую страницу!
Пожалуйста нажмите на кнопочку «Назад» - в вашем браузере для возвращения на предыдущую страницу. -
-Invision Power Board: - - - diff --git a/Tools_and_Scripts/ssi_templates/news.html b/Tools_and_Scripts/ssi_templates/news.html deleted file mode 100644 index d43af795..00000000 --- a/Tools_and_Scripts/ssi_templates/news.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - -
Posted By: {member_name}
Posted On: {post_date}
- Title: {topic_title} -

-
{post}

Comments: {comments} :: View Comments -
-
\ No newline at end of file diff --git a/Tools_and_Scripts/ssi_templates/stats.html b/Tools_and_Scripts/ssi_templates/stats.html deleted file mode 100644 index 72f5b69e..00000000 --- a/Tools_and_Scripts/ssi_templates/stats.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - -
Board Statistics
- - - - -
Total Posts: {total_posts} ( Topics: {topics}, Replies {replies} )
- Registered Members: {members} -
-
-
\ No newline at end of file diff --git a/Tools_and_Scripts/ssi_templates/syndicate_xml.html b/Tools_and_Scripts/ssi_templates/syndicate_xml.html deleted file mode 100644 index 7b9cbc43..00000000 --- a/Tools_and_Scripts/ssi_templates/syndicate_xml.html +++ /dev/null @@ -1,39 +0,0 @@ -[TOP] - - - - - - - - - - - - - - - - - - - -]> - -[/TOP] - -[ROW] - - {topic_title} - {last_post_name} - {starter_name} - {forum_title} - {last_post_time} - -[/ROW] - -[BOTTOM] - -[/BOTTOM] \ No newline at end of file diff --git a/readme.html b/readme.html deleted file mode 100644 index 44e62a54..00000000 --- a/readme.html +++ /dev/null @@ -1,119 +0,0 @@ - -Добро пожаловать в Invision Power Board 2.1.7 - - - - - - - - -
-

Добро пожаловать в Invision Power Board 2.1.7

- Добро пожаловать в Invision Power Board — быстродействующее и эффективное решение для создания форумов. -
Пожалуйста, прочтите необходимую информацию, представленную ниже. -

Установка форума

-

Если вы устанавливаете Invision Power Board первый раз, то, пожалуйста, сначала прочтите
-инструкцию по установке, где можно ознакомиться с процессом установки форума.

-

Русифицирование английской версии

-

Если вы имеете английскую версию IPB 2.1.7, то, чтобы ее русифицировать, вам нужно скопировать из этого дистрибутива все файлы из папки /upload/, а потом, первоначально скопировав файл 217_eng_to_rus.php из директории /english_to_russian/ на сервер в папку /install/, - запустить его в браузере — «/install/217_eng_to_rus.php» (например: http://www.domain.ru/forum/install/217_eng_to_rus.php).
- После этого не забудьте удалить директории /install/ и /upgrade/ !!!

-Примечание: Если вы не ставили новых стилей на свою английскую версию форума и не изменяли в ней макросы, то вы можете русифицировать и их, включив параметр — $udalyaem_macros = '1'; в файле 217_eng_to_rus.php перед его запуском в браузере…

-

Обновление вашего IPB

- Мы рекомендуем вам обратиться за помощью в службу поддержки.
Наши специалисты произведут вам обновление в короткие сроки за умеренную плату.

- Но вы можете обновить ваш форум и самостоятельно, проделайте следующее: -
    -
  • ОБНОВЛЯЕТЕСЬ С IPB 1.1.x, 1.2.x или 1.3.x? ЧИТАЙТЕ ЗДЕСЬ!
  • -

    -
  • Если вы обновляетесь с любой версии 2.0.x (даже Pre Final) вам необходимо закачать из папки «upload» (вашего дистрибутива IPB 2.1.7) следующее:
    - — /cache/ (убедиться, чтобы новые lang-файлы попали именно в нужную папку)
    - — /ips_kernel/
    - — /jscripts/
    - — /lofiversion/
    - — /modules/
    - — /retail/
    - — /skin_acp/
    - — /sources/
    - — /style_avatars/
    - — /style_emoticons/
    - — /style_images/ (убедиться, что у вас папка с изображениями по умолчанию — /1/)
    - — /upgrade/
    - — admin.php
    - — index.php
    - — ipb_templates.php
    - — init.php
    - — ipchat.php
    -
  • -
  • Проверить все необходимые права доступа к файлам (CHMOD), обратите внимание, чтобы была возможность записи (0777) в папку — /skin_cache/.
  • -
  • И запустить скрипт обновления системы, находящийся по адресу — «/upgrade/index.php» (например: http://www.domain.ru/forum/upgrade/index.php).
    - В нем следуйте инструкциям на экране. После завершения работы скрипта возможны проблемы с отображением форума — это скорее всего ваши изменения в старом стиле, которые сохранились. - Чтобы все вернуть в чистый оригинальный IPB стиль, нужно через секцию управления шаблонами обратить все изменения в стиле с помощью специальной опции. -
  • -
  • Если вы обновляетесь c английских версий IPB 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6 или 2.1.7, то посмотрите пожалуйста в этой инструкции пункт «Русифицирование английской версии».
  • -
  • - После обновления не забудьте удалить или переименовать папку /upgrade/ для безопасности форума.
  • -
-
- -
- - - \ No newline at end of file diff --git a/upload/admin.php b/upload/admin.php index 47b08b69..4053cd03 100644 --- a/upload/admin.php +++ b/upload/admin.php @@ -2,26 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ======================================== | by Matthew Mecham -| (c) 2001 - 2006 Invision Power Services +| (c) 2001 - 2004 Invision Power Services | http://www.invisionpower.com | ======================================== | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 +| Email: matt@invisionpower.com | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ +| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ | > $Revision: 567 $ | > $Author: matt $ +--------------------------------------------------------------------------- diff --git a/upload/admin/Thumbs.db b/upload/admin/Thumbs.db index f3e8e7084bfc767978e18ad7a8eeb74f49e22fc8..b5dbab9255bfbe8bbbb72969efb40bc6220cf781 100644 GIT binary patch delta 31 ncmZpWXpq>D!@_>xhK<8Y)svfxS=89s(lsJxKRY&gK6fGjyHgA- delta 31 ncmZpWXpq>D!@`~*X>sXa(ecg2ENbj*++lMA $Date: 2006-05-23 15:58:32 +0100 (Tue, 23 May 2006) $ | > $Revision: 271 $ @@ -295,7 +286,8 @@ $choice = array( 'tools' => array( 'acp_tools' , 'acp_tools' , 'tools' ), 'components' => array( 'acp_components' , 'acp_components' , 'components' ), 'admin' => array( 'acp_admin' , 'acp_admin' , 'admin' ), - 'help' => array( 'acp_help' , 'acp_help' , 'help' ), + 'help' => array( 'acp_help' , 'acp_help' , 'help' ), + 'dashboard' => array( 'acp_dashboard' , 'acp_dashboard' , 'dashboard' ), # Non CP specific action 'xmlout' => array( "xmlout" , 'xmlout' ), @@ -322,7 +314,7 @@ if ( ( ! isset($ipsclass->input['section']) ) OR ( ! isset($choice[ $ipsclass-> } else { - $ipsclass->input['section'] = 'admin'; + $ipsclass->input['section'] = 'dashboard'; } } @@ -330,7 +322,7 @@ if ( ( ! isset($ipsclass->input['section']) ) OR ( ! isset($choice[ $ipsclass-> // Menu type //--------------------------------------------------- -$ipsclass->menu_type = $choice[ $ipsclass->input['section'] ][2]; +$ipsclass->menu_type = $ipsclass->input['section']; //--------------------------------------------------- // Require and run @@ -352,7 +344,7 @@ function skin_emergency() if ( $_GET['skinrebuild'] == 1 ) { - print "Произошел сбой при попытке обновить шаблоны стилей.
Свяжитесь со службой технической поддержки."; + print "Attempted to rebuild the skins and failed.
Please contact technical support for more assistance."; exit(); } diff --git a/upload/cache/index.html b/upload/cache/index.html index 250b1f72..af2fbe79 100644 --- a/upload/cache/index.html +++ b/upload/cache/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

Ошибка русской версии Invision Power Board

-Вы попали на несуществующую страницу!
Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
- - \ No newline at end of file + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/upload/cache/lang_cache/en/acp_lang_acpperms.php b/upload/cache/lang_cache/en/acp_lang_acpperms.php index 322f2588..aadf681c 100644 --- a/upload/cache/lang_cache/en/acp_lang_acpperms.php +++ b/upload/cache/lang_cache/en/acp_lang_acpperms.php @@ -2,6 +2,9 @@ #Don't complete empty sections, they are done automatically $lang = array( +'lookandfeel:skinremap' => 'Skin Remapping', +'lookandfeel:skinremap:access' => 'Access skin remapping', + 'help:diag' => "Diagnostics", 'help:diag:do' => "Perform Diagnostics", 'help:support' => "Support Pages", @@ -192,6 +195,6 @@ $lang = array( 'lookandfeel' => "Look and Feel", 'components' => "Components", 'tools' => "Tools and Settings", -'help' => "Help and Support", +'help' => "Support", ); ?> \ No newline at end of file diff --git a/upload/cache/lang_cache/en/index.html b/upload/cache/lang_cache/en/index.html index 250b1f72..af2fbe79 100644 --- a/upload/cache/lang_cache/en/index.html +++ b/upload/cache/lang_cache/en/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

Ошибка русской версии Invision Power Board

-Вы попали на несуществующую страницу!
Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
- - \ No newline at end of file + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/upload/cache/lang_cache/en/lang_editors.php b/upload/cache/lang_cache/en/lang_editors.php index 20086577..2c5119f8 100644 --- a/upload/cache/lang_cache/en/lang_editors.php +++ b/upload/cache/lang_cache/en/lang_editors.php @@ -2,6 +2,9 @@ $lang = array ( +//2.3 +'help_alt' => 'Help', + //RC2 'insert_prefix' => "Insert", 'bbcodeloader_insert' => "Insert", diff --git a/upload/cache/lang_cache/en/lang_email_content.php b/upload/cache/lang_cache/en/lang_email_content.php index 94974561..39ab388a 100644 --- a/upload/cache/lang_cache/en/lang_email_content.php +++ b/upload/cache/lang_cache/en/lang_email_content.php @@ -13,6 +13,35 @@ The <#BOARD_NAME#> team. EOF; + +//------------------------------- +// Admin created account notification +//------------------------------- + +$lang['subject__account_created'] = 'Your account has been created'; +$lang['account_created'] = <<, + +Your account has been created succesfully at <#BOARD_NAME#>. + +If we were waiting on a parental consent form, this means the form has been received and documented. + +Your details are as follows: + +Username: <#NAME#> +Email Address: <#EMAIL#> +Password: <#PASSWORD#> + +Please be aware that we do not store a plain text copy of your password, and you can change your password at any time through your control panel on the site. + +Visit this link to join into our discussions! + +<#BOARD_ADDRESS#> + +EOF; + + + /*------------------------------------------------------------------------------------*/ // IPB 2.2.0 /*------------------------------------------------------------------------------------*/ @@ -145,6 +174,28 @@ If you wish to allow your subscription to expire, you do not need to do anything EOF; +$lang['subject__subscription_expires_recurring'] = 'Subscription Expiration'; +$lang['subscription_expires_recurring'] = << to remind you that your +subscription is due to expire soon. + +---------------------------------- +Package Purchased: <#PACKAGE#> +Package Expires: <#EXPIRES#> +Subscriptions: <#LINK#> +---------------------------------- + +If you wish to continue your subscription you do not need to do anything. You should be +automatically billed for the subscription. + +If you wish to cancel your subscription you should log in to your account and cancel it before +it expires. For example, PayPal users would need to log in to their PayPal account and cancel +the subscription from there. + +EOF; + //------------------------------- // NEW MOD __TOPIC__ @@ -228,13 +279,13 @@ This is the digest of this weeks posts in forum <#NAME#>. ---------------------------------------------------------------------- -The topic can be found here: +The topic can be found here: <#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#>&view=getnewpost Unsubscribing: -------------- -You can unsubscribe at any time by logging into your control panel and clicking on the "View Subscriptions" link. +You can unsubscribe at any time by logging into your control panel and clicking on the "View Topics" link. EOF; @@ -260,13 +311,13 @@ This your daily new topics digest! ---------------------------------------------------------------------- -The forum can be found here: +The forum can be found here: <#BOARD_ADDRESS#>?showforum=<#FORUM_ID#> Unsubscribing: -------------- -You can unsubscribe at any time by logging into your control panel and clicking on the "View Subscriptions" link. +You can unsubscribe at any time by logging into your control panel and clicking on the "View Forums" link. EOF; @@ -293,13 +344,13 @@ This your weekly new topics digest! ---------------------------------------------------------------------- -The forum can be found here: +The forum can be found here: <#BOARD_ADDRESS#>?showforum=<#FORUM_ID#> Unsubscribing: -------------- -You can unsubscribe at any time by logging into your control panel and clicking on the "View Subscriptions" link. +You can unsubscribe at any time by logging into your control panel and clicking on the "View Forums" link. EOF; @@ -325,13 +376,13 @@ This is the digest of posts in topic "<#TITLE#>" for today. ---------------------------------------------------------------------- -The topic can be found here: +The topic can be found here: <#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#>&view=getnewpost Unsubscribing: -------------- -You can unsubscribe at any time by logging into your control panel and clicking on the "View Subscriptions" link. +You can unsubscribe at any time by logging into your control panel and clicking on the "View Topics" link. EOF; @@ -538,10 +589,13 @@ YOUR NEW PASSWORD ------------------------------------------------ Your username is: <#USERNAME#> +Your email address is: <#EMAIL#> Your new password is: <#PASSWORD#> Log in here: <#LOGIN#> +Please be careful to use the correct information (username or email address) to login to the site. + ------------------------------------------------ CHANGING YOUR PASSWORD ------------------------------------------------ @@ -640,7 +694,7 @@ $lang['subs_with_post'] = << ---------------------------------------------------------------------- -The topic can be found here: +The topic can be found here: <#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#>&view=getnewpost @@ -652,7 +706,7 @@ This is to limit the amount of mail that is sent to your inbox. Unsubscribing: -------------- -You can unsubscribe at any time by logging into your control panel and clicking on the "View Subscriptions" link. +You can unsubscribe at any time by logging into your control panel and clicking on the "View Topics" link. EOF; @@ -666,18 +720,18 @@ $lang['subs_new_topic'] = << ---------------------------------------------------------------------- -The topic can be found here: +The topic can be found here: <#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#> Please note that if you wish to get email notification of any replies to this topic, you will have to click on the -"Track this Topic" link shown on the topic page, or by visiting the link below: +"Track this Topic" link shown on the topic page, or by visiting the link below: <#BOARD_ADDRESS#>?act=Track&f=<#FORUM_ID#>&t=<#TOPIC_ID#> Unsubscribing: -------------- -You can unsubscribe at any time by logging into your control panel and clicking on the "View Subscriptions" link. +You can unsubscribe at any time by logging into your control panel and clicking on the "View Forums" link. If you are not subscribed to any forums and wish to stop receiving notification, uncheck the setting "Send me any updates sent by the board administrator" found in 'My Controls' under 'Email Settings'. @@ -689,7 +743,7 @@ $lang['subs_no_post'] = << has just posted a reply to a topic that you have subscribed to titled "<#TITLE#>". -The topic can be found here: +The topic can be found here: <#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#>&view=getnewpost There may be more replies to this topic, but only 1 email is sent per board visit for each subscribed topic. This is @@ -698,7 +752,7 @@ to limit the amount of mail that is sent to your inbox. Unsubscribing: -------------- -You can unsubscribe at any time by logging into your control panel and clicking on the "View Subscriptions" link. +You can unsubscribe at any time by logging into your control panel and clicking on the "View Topics" link. EOF; diff --git a/upload/cache/lang_cache/en/lang_error.php b/upload/cache/lang_cache/en/lang_error.php index 19f1d4fc..5139f9d5 100644 --- a/upload/cache/lang_cache/en/lang_error.php +++ b/upload/cache/lang_cache/en/lang_error.php @@ -2,6 +2,12 @@ $lang = array ( +'awaiting_coppa' => 'We must receive your parental consent form before your account can be created. Once it is received, we will create your account for you and send you a notification to your email address', + +// 2.3 +'han_login_create_failed' => "There was an unrecoverable error attempting to create your account. The error returned was:
<#EXTRA#>", +'han_login_pass_failed' => "The attempt to update your password failed. Please contact an administrator.", + // 2.2.2 @@ -49,7 +55,7 @@ $lang = array ( 'subs_no_selected' => "You did not select a subscription package. Please go back and select one before continuing.", 'subs_nomethod_selected' => "You did not select a payment method. Please go back and select one before continuing.", 'subs_no_api' => "Cannot locate the required API file, process cannot continue.", -'subs_no_upgrade' => "This payment method does not support upgrades. This process cannot continue.", +'subs_no_upgrade_poss' => "This payment method does not support upgrades. This process cannot continue.", 'subs_fail' => "An unspecified failure occured. Code <#EXTRA#>.", 'sub_already' => "You are already subscribed to a package that is either paid or pending. You cannot continue.", @@ -60,7 +66,7 @@ $lang = array ( // added 1.2 B3 'no_flash_av' => "You are not permitted to use flash in your avatar, post or signature", -'no_warn_max' => "This member cannot be warned in that direction any further. They have reached their maximum or minumum level", +'no_warn_max' => "This member cannot be warned in that direction any further. They have reached their maximum or minimum level", // added 1.2 'split_too_much' => "You cannot select all of the posts to split, you must leave at least one post in the original topic", @@ -216,7 +222,7 @@ $lang = array ( 'not_icq_number' => "That is not a valid ICQ number", 'rp_noemail' => "You must enter a valid email address before we can send this report", -'upload_to_big' => "The file you requested to upload was greater than the limit the administrator has set for your group.", +'upload_too_big' => "The file you requested to upload was greater than the limit the administrator has set for your group.", 'user_exists' => "We already have a member by that name, please choose another", diff --git a/upload/cache/lang_cache/en/lang_global.php b/upload/cache/lang_cache/en/lang_global.php index 8517f062..0ba720dd 100644 --- a/upload/cache/lang_cache/en/lang_global.php +++ b/upload/cache/lang_cache/en/lang_global.php @@ -2,6 +2,47 @@ $lang = array ( +'las_title' => "Security Code Confirmation", +'las_img' => 'Your unique security code', +'las_img_text' => 'If you do not see any numbers, or see broken images, please contact a board administrator to rectify the problem.', +'las_input' => 'Confirm security code', + +'las_numbers' => "Your unique security code
If you do not see any numbers, or see broken images, please contact a board administrator to rectify the problem.", +'las_text' => "Confirm security code
Please enter the 6 digit code shown above in image format.
Note: Only numbers are allowed, a '0' is a numerical zero, not the alphabetical 'O'.", + + +'partial_login' => 'The login was succesful!', +'myass_close' => 'Close Window', +'dd_my_blog' => 'View Member Blog', +'dd_my_albums' => 'View Member Albums', + +'account_inbox' => 'Inbox', +'account_sent' => 'Sent Items', + +//2.3 - Globally used +'member_no' => "Member No.:", +'m_group' => "Group:", +'m_joined' => "Joined:", +'m_posts' => "Posts:", +'m_location' => "From:", + +'dd_view_profile' => 'View Member Profile', +'dd_remove_friend' => 'Remove Friend', +'dd_add_friend' => 'Add as Friend', +'dd_send_pm' => 'Send Message', +'dd_find_posts' => "Find Member's Posts", +'dd_find_topics' => "Find Member's Topics", + +//2.3 - Moderator logs +'modlogs_pinned' => 'Pinned topic from post form', +'modlogs_closed' => 'Closed topic from post form', +'modlogs_pinclose' => 'Pinned & closed topic from post form', + +'js_gender_male' => 'Male', +'js_gender_female' => 'Female', +'js_gender_mystery' => 'Gender Not Set', + + //RC2 'ajax_loading_msg_new' => "Loading Content...", @@ -26,7 +67,7 @@ $lang = array ( // For BBCODE 'bbcode_wrap_html' => "HTML", 'bbcode_wrap_sql' => "SQL", -'bbcode_wrap_quote' => "QUOTE", +'bbcode_wrap_quote' => "QUOTE ", 'bbcode_wrap_code' => "CODE", 'bbcode_img_alt' => "IPB Image", @@ -120,8 +161,8 @@ $lang = array ( 'tpl_pages' => "Pages", 'sf_bytes' => "bytes", -'sf_mb' => "mb", -'sf_k' => "k", +'sf_mb' => "MB", +'sf_k' => "K", 'bi_markread' => "Mark forum as read?", 'bi_markallread' => "Mark all subforums as read?", @@ -230,7 +271,7 @@ $lang = array ( 'thanks' => "Thanks", 'forum_read' => "The forum has been marked as read", 'guest_stuff' => "Welcome Guest", -'offline_title' => "IBForums Offline Mode", +'offline_title' => "IP.Board Offline Mode", 'you_last_visit' => "You last visited on:", 'code_sample' => "Code Sample", 'transfer_you' => "Please wait while we transfer you...", diff --git a/upload/cache/lang_cache/en/lang_javascript.js b/upload/cache/lang_cache/en/lang_javascript.js index 9487fc26..a8310392 100644 --- a/upload/cache/lang_cache/en/lang_javascript.js +++ b/upload/cache/lang_cache/en/lang_javascript.js @@ -42,6 +42,8 @@ var message_pop_up_lang = var ipb_global_lang = { + // 2.3.2 + 'action_cancelled' : 'OK, action cancelled!', // ERROR 'post_upload_not_empty' : 'You have an item to be uploaded. Click the UPLOAD button to upload it or click OK to continue without uploading', // EDITORS diff --git a/upload/cache/lang_cache/en/lang_mod.php b/upload/cache/lang_cache/en/lang_mod.php index a316b202..e3a0fa55 100644 --- a/upload/cache/lang_cache/en/lang_mod.php +++ b/upload/cache/lang_cache/en/lang_mod.php @@ -2,6 +2,9 @@ $lang = array ( +// 2.3.4 +'acp_unapprove_topic' => "Un-Approved a topic (tid: %s)", + // 2.2 - Mod actions logged in ACP 'mod_warn_added' => "Note Added", 'mod_warn_note' => "Warn Level Unchanged", @@ -151,7 +154,7 @@ $lang = array ( 'errors_found' => "Error", 'we_no_reason' => "You must enter a reason for this warn adjustment in the relevant section below", 'we_no_subject' => "You must enter a PM / Email subject", -'pm_email_subject' => "You have a new PM", +'pm_email_subject' => "New Personal Message", 'w_title' => "Member Warning Center", 'w_restricted' => "Restriction in progress, the remaining time has been recalculated", 'w_warnfor' => "Member Warning Panel for", diff --git a/upload/cache/lang_cache/en/lang_msg.php b/upload/cache/lang_cache/en/lang_msg.php index 980ca8f8..b06e5d2a 100644 --- a/upload/cache/lang_cache/en/lang_msg.php +++ b/upload/cache/lang_cache/en/lang_msg.php @@ -2,6 +2,16 @@ $lang = array ( +'m_personal_aboutme' => "Edit 'About Me' page", +'pro_message' => 'Message', +'pro_recips' => 'Recipients', +'pro_details' => 'Message Details', + +// EDITED in 2.3 +'prefs_text_a' => "You may edit the names, or delete the name to delete this virtual directory. Please note, you will be unable to remove a directory if it contains messages.
Alpha-numerics and spaces only, please.", + + + // EDITED in 2.2 'err_no_title' => "You must enter a message title longer than 2 characters.", 'mess_contact' => "PM Block List", @@ -18,8 +28,8 @@ $lang = array ( 'dd_forward_pm' => "Forward PM", 'dd_add_to_block' => "Add to PM block list", 'deleted_user' => 'Deleted Member', -'m_personal_portal' => 'Edit Personal Portal Information', -'m_manage_friends' => 'Manage Friend List', +'m_personal_portal' => 'Edit Personal Portal Information', +'m_manage_friends' => 'Manage Friend List', 'xml_no_pms' => "No messages in your inbox", 'tt_menu' => "Menu", 'm_messenger' => "Messenger", @@ -64,6 +74,7 @@ $lang = array ( 'm_gallery' => 'Invision Gallery', 'm_gallery_albums' => 'Your Albums', 'm_gallery_favs' => 'Your Favorites', +'m_gallery_subs' => 'Image Subscriptions', 'm_gallery_controls' => 'Your Controls', 'msg_options' => "Options", @@ -208,7 +219,7 @@ $lang = array ( 'from_date' => "Date (oldest first)", 'message_date' => "Date", 'enter_a_name' => "Members name", -'to_whom' => "Recipients Name", +'to_whom' => "Recipient's Name", 'prefs' => "Preferences", 'prefs_help' => "You may set up your messenger preferences from here.", @@ -258,7 +269,6 @@ $lang = array ( 'icon_read' => "Read messages", 'cannot_remove' => "Cannot Remove", 'goto_submit' => "Go!", -'m_joined' => "Joined:", 't_title' => "Your control panel", 'message_read_state' => "Read?", 'other' => "Other", @@ -269,7 +279,6 @@ $lang = array ( 'in_box' => "Inbox", 'a_msg_new' => "You have <#NEW_MESSAGES#> new messages!", 'member_options' => "Options", -'prefs_text_a' => "You may edit the names, or delete the name to delete this virtual directory. Please note, you will be unable to remove a directory if it contains messages.", 'edit' => "Edit", 'enter_block' => "Options", 'prefs_text_b' => "You may add extra directories. You do not have to use all the input boxes.", @@ -282,7 +291,6 @@ $lang = array ( 'c_msg_total' => "You have <#NUM#> total messages in all your folders.", 'read_rec_text' => "Original message sent on:", 'button_preview' => "Preview", -'m_group' => "Group:", 'prefs_current' => "Current Virtual Directories", 'message_to' => "This message was sent to", 'message_title' => "Message Title", diff --git a/upload/cache/lang_cache/en/lang_post.php b/upload/cache/lang_cache/en/lang_post.php index 857bc732..2046fbef 100644 --- a/upload/cache/lang_cache/en/lang_post.php +++ b/upload/cache/lang_cache/en/lang_post.php @@ -1,6 +1,15 @@ 'Topic Details', +'captcha_explain_gif' => "Please enter the 6 character code shown in the image. Case sensitive.", + +'pro_poll' => 'Poll', +'pro_post' => 'Post', +'pro_postopts' => 'Options', +'pro_attach' => 'Attachment Editor', 'qe_full_edit' => "Use Full Editor", diff --git a/upload/cache/lang_cache/en/lang_profile.php b/upload/cache/lang_cache/en/lang_profile.php index 3a14d930..fc13ce33 100644 --- a/upload/cache/lang_cache/en/lang_profile.php +++ b/upload/cache/lang_cache/en/lang_profile.php @@ -2,6 +2,13 @@ $lang = array ( +// 2.3.5 +'pp_tab_aboutme' => "About Me", +'err_no_aboutme_to_show' => "This user has not configured their 'About Me' page and has not added a signature to their account yet.", +'cp_edit_aboutme' => "Edit your 'About Me' page", +'cp_edit_signature' => 'Edit your signature', + + 'page_title_pp' => "Viewing Profile", @@ -41,15 +48,12 @@ $lang = array ( 'op_add_pm_to_block' => "Add to PM Block List", 'err_no_posts_to_show' => "There are no posts to display.", -'js_img_alt_rate' => 'Rate this member, click on desired star to send rating', -'js_gender_male' => 'Male', -'js_gender_female' => 'Female', -'js_gender_mystery' => 'Gender Not Set', +'js_img_alt_rate_p' => 'Rate this member, click on desired star to send rating', + 'js_saving_comment' => 'Saving Comment...', 'js_loading_tab' => 'Loading Content...', 'js_deleting_comment' => 'Deleting Comment...', -'m_personal_statement' => 'Personal Statement', 'm_visit_website' => "Visit My Website", 'm_go' => "Go", 'm_dd_with_selected' => "With checked", diff --git a/upload/cache/lang_cache/en/lang_register.php b/upload/cache/lang_cache/en/lang_register.php index e1972b57..f61772da 100644 --- a/upload/cache/lang_cache/en/lang_register.php +++ b/upload/cache/lang_cache/en/lang_register.php @@ -2,18 +2,33 @@ $lang = array ( +'las_input_text_gif' => 'Please enter the 6 character code shown in the image. Case sensitive', + + +// 2.3.2 +'select_month' => 'Month', +'select_day' => 'Day', +'select_year' => 'Year', +'coppa_continue_button' => 'Continue..', +'coppa_form_fill' => 'You must input your birthday completely', +'coppa_additional_info' => 'COPPA Information', +'coppa_clickhere' => 'Click here to print the parental consent form', +'coppa_admin_reminder' => 'Admin Reminder', +'coppa_admin_remtext' => "Don't forget to create the account upon receipt of this consent form, and notify the user that their new account is ready for use", + + // 2.2: UPDATED 'just_admin_validation' => "After registration your account will then be entered into the administration queue for review and approval.", -'dname_text' => "This is the name shown with all your topics and posts. Between 3 and %s chars. Illegal chars: [ ] | ; , $", +'dname_text' => "This is the name shown with all your topics and posts. Between 3 and %s chars. Illegal chars: [ ] | ; , $ \ < > "", 'reg_error_dname_len' => "The display name must be between 3 and %s characters", 'reg_error_username_none' => "The username must be between 3 and %s characters", 'reg_error_no_name' => "You must enter a name longer than 3 characters and shorter than %s", 'user_name_text' => "This is the name you'll use to log in. [3 and %s characters long]", -'lp_text' => "Enter your account username in the field below. The username is case insensitive.
Once you have submitted the form, you will receive an email asking for validation of this request to ensure that no malicious use has occured. This email will also contain a link that you must click for futher instruction.", -'lp_text_email' => "Enter your account email address in the field below. The email address is case insensitive.
Once you have submitted the form, you will receive an email asking for validation of this request to ensure that no malicious use has occured. This email will also contain a link that you must click for futher instruction.", +'lp_text' => "Enter your account username in the field below. The username is case insensitive.
Once you have submitted the form, you will receive an email asking for validation of this request to ensure that no malicious use has occured. This email will also contain a link that you must click for further instruction.", +'lp_text_email' => "Enter your account email address in the field below. The email address is case insensitive.
Once you have submitted the form, you will receive an email asking for validation of this request to ensure that no malicious use has occurred. This email will also contain a link that you must click for further instruction.", 'las_input_text' => "Please enter the 6 character code shown in the image. If you cannot read the code, click the image to generate a new one. Case sensitive.", // 2.2: NEW @@ -46,7 +61,7 @@ $lang = array ( 'reg_error_no_pass' => "The password section is incomplete", 'reg_error_pass_nm' => "The passwords do not match", -'reg_error_chars' => "The display name contains one or more of these illegal characters: [ ] | ; , $", +'reg_error_chars' => "The display name contains one or more of these illegal characters: [ ] | ; , $ \ < > "", 'reg_error_taken' => "The display name is already in use by another member", 'reg_error_username_taken' => "The username is already taken by another member", @@ -82,14 +97,6 @@ $lang = array ( 'cf_optional' => "Optional Information", -'las_title' => "Security Code Confirmation", -'las_img' => 'Your unique security code', -'las_img_text' => 'If you do not see any numbers, or see broken images, please contact a board administrator to rectify the problem.', -'las_input' => 'Confirm security code', - -'las_numbers' => "Your unique security code
If you do not see any numbers, or see broken images, please contact a board administrator to rectify the problem.", -'las_text' => "Confirm security code
Please enter the 6 digit code shown above in image format.
Note: Only numbers are allowed, a '0' is a numerical zero, not the alphabetical 'O'.", - 'user_name_title' => "Username:", 'password_title' => "Password:", @@ -113,7 +120,7 @@ $lang = array ( 'rv_title' => "Resend validation email", 'rv_process' => "Revalidation Process", 'rv_done' => "Your revalidation request was successful
A revalidation email has been sent to the registered address for that member. Please check your email within the next few minutes - including any 'junk mail' or 'spam' folders you may have.", -'rv_ins' => "Please enter your registered member name below to search for any pending validation requests. If any are found, the email will be resent to the email address you registered with.", +'rv_ins' => "Please enter your %s below to search for any pending validation requests. If any are found, the email will be resent to the email address you registered with.", 'rv_name' => "Registered Member Name", 'rv_email' => "Registered Member Email", 'rv_go' => "Search and Send", @@ -150,13 +157,13 @@ $lang = array ( 'coppa_info' => "COPPA Information", 'coppa_form' => "COPPA Form", -'coppa_link' => "Please click the link that corresponds with your birth date", +'coppa_link' => "Please select your birthday", 'coppa_date_before' => "On or before", 'coppa_date_after' => "After", 'coppa_form_text' => "A parent or guardian must complete and mail or fax a signed <#FORM_LINK#> to the administrator of the board before a child under the age of 13 can complete the registration process.

For further information, please contact:", 'coppa_link_form' => "permission form", -'cp2_text' => " All users under the age of 13 must seek permission from a parent or guardian before you may participate on these forums.

If you would like to start the registration process prior to us receiving a permission form, please click the continue link below. However, please note that you will not be able to complete your registration until we have the signed form.", +'cp2_text' => " All users under the age of 13 must seek permission from a parent or guardian before you may participate on these forums.

Once the parental consent form has been received, an account will be created for you with the information supplied, and an email will be sent to the provided email address to notify you that your account is ready for use. You can then change your account details from your 'My Controls' area upon logging in with your new account.", 'cp2_continue' => "Continue", 'cp2_title' => "Our COPPA registration policy", 'cp2_cancel' => "Cancel", @@ -168,7 +175,8 @@ $lang = array ( 'cpf_fax' => "Fax Number:", 'cpf_address' => "Mailing Address:", -'cpf_sign' => "Please sign the form below and send to us.

I understand that the information that the child has supplied is correct. I understand that the profile information may be changed by entering a password and I understand that I may ask for this registration profile to be removed.", +'cpf_sign' => "Please sign the form below and send to us.

I understand that I may consent to the collection of necessary information about my child without permitting the site to disclose such information to third parties. I also understand that the site will not collect more information about my child than is reasonably necessary to participate on the site.

+ I confirm that the information that the child has supplied is correct. I understand that the profile information may be changed by entering a password and I understand that I may ask for this registration profile to be removed. I understand that I can contact the owner of this site at any time to determine what information about my child has been collected, to confirm how that information is used, and to request that the site no longer collect information about my child.", 'cpf_name' => "Parent / Legal Guardian FULL name", 'cpf_relation' => "Relation to child", diff --git a/upload/cache/lang_cache/en/lang_topic.php b/upload/cache/lang_cache/en/lang_topic.php index 99188825..da75fc2b 100644 --- a/upload/cache/lang_cache/en/lang_topic.php +++ b/upload/cache/lang_cache/en/lang_topic.php @@ -10,12 +10,7 @@ $lang = array ( 'reason_for_edit' => 'Reason for edit', 'js_rate_me' => "Rate Topic:", 'js_img_alt_rate' => 'Rate this topic, click on desired star to send rating', -'dd_view_profile' => 'View Member Profile', -'dd_remove_friend' => 'Remove Friend', -'dd_add_friend' => 'Add as Friend', -'dd_send_pm' => 'Send Message', -'dd_find_posts' => "Find Member's Posts", -'dd_find_topics' => "Find Member's Topics", + 'you_have_not_rated' => 'N/A', 'you_have_rated_x' => 'Your rating:', @@ -95,8 +90,6 @@ $lang = array ( 'search_topic' => "Search Topic", 'f_go' => "With Selected", -'m_location' => "From:", - 'tt_reply_to_post' => "Reply directly to this post", @@ -133,7 +126,7 @@ $lang = array ( 'attached_file' => "Attached File", 'qr_title' => "Fast Reply", -'qr_open' => "Open Fast Reply Window", +'qr_open' => "Toggle Fast Reply Window", 'qr_hide' => "Close Fast Reply Window", 'qr_submit' => "Add Reply", @@ -175,7 +168,6 @@ $lang = array ( 'DELETE_TOPIC' => "Delete this topic", 'topic_moved' => "This topic has moved, taking you to the correct forum", 'pic_attach' => "Attached Image", -'m_posts' => "Posts:", 'multi_page_topic' => "Pages:", 'snitch_geezer_to_a_copper' => "Report this post", @@ -184,7 +176,6 @@ $lang = array ( 'topic_page_h' => "Topic", 'member_warn_level' => "Member Warn Level", 'start_new_poll' => "Start a new poll", -'m_joined' => "Joined:", 'track_topic' => "Track this topic", 'js_del_1' => "Are you sure you want to delete this message?", 'please_log_in' => "You are not logged into this forum.", @@ -205,8 +196,6 @@ $lang = array ( 't_old' => "Next Oldest", 't_new' => "Next Newest", 'forward' => "Email this topic", -'m_group' => "Group:", 'back_top' => "Back to top", -'member_no' => "Member No.:", ); ?> \ No newline at end of file diff --git a/upload/cache/lang_cache/en/lang_ucp.php b/upload/cache/lang_cache/en/lang_ucp.php index 5296318f..77266539 100644 --- a/upload/cache/lang_cache/en/lang_ucp.php +++ b/upload/cache/lang_cache/en/lang_ucp.php @@ -2,6 +2,14 @@ $lang = array ( +'ras_text_gif' => "Confirm security code
Please enter the 6 character code shown in the image. Case sensitive.", + +// NEW 2.3.5 +'cp_edit_aboutme' => "Edit your 'About Me' page", +'cp_current_aboutme' => "Your current 'About Me' page", +'cp_submit_aboutme' => "Update my 'About Me' page", +'m_personal_aboutme' => "Edit 'About Me' page", + 'panel_gender' => 'Gender', 'panel_gender_m' => 'Male', 'panel_gender_f' => 'Female', @@ -40,7 +48,7 @@ $lang = array ( 'sub_added' => "Your subscription has been added", 'dname_change_ok' => "Display name changed successfully", 'dname_error_title' => "Errors Found:", -'dname_error_no_name' => "You must enter a name longer than 3 characters and shorter than 32", +'dname_error_no_name' => "You must enter a name longer than 3 characters and shorter than <%1>", 'dname_error_no_pass' => "The password field is empty", 'dname_error_chars' => "The display name contains illegal characters", 'dname_error_taken' => "The display name is already in use by another member", @@ -94,6 +102,7 @@ $lang = array ( 'm_gallery' => 'Invision Gallery', 'm_gallery_albums' => 'Your Albums', 'm_gallery_favs' => 'Your Favorites', +'m_gallery_subs' => 'Image Subscriptions', 'm_gallery_controls' => 'Your Controls', 'auto_track' => "Enable 'Email Notification' by default?
If ticked, choose default type:
", 'auto_track_desc' => "Enabling this option will automatically subscribe you to any topic you start or reply to.", @@ -143,6 +152,7 @@ $lang = array ( 'announce_form_forums2' => "You may choose more than one", 'announce_form_allforums' => "-- All Forums --", 'announce_use_html' => "Enable HTML?", +'announce_use_nlbr' => "Parse newlines (if HTML enabled)?", 'announce_form_options' => "Options", 'announce_page_allforums' => "All Forums", 'announce_page_numbforums' => "Forums...", @@ -415,7 +425,7 @@ $lang = array ( 'total_posts' => "Total Posts", -'aol_name' => "AOLAIM Name", +'aol_name' => "AOL/AIM Name", 'home_page' => "Home Page", 'viewing_profile' => "Viewing member profile", 'registration_date' => "Registration Date", @@ -556,7 +566,7 @@ $lang = array ( 'account_email_submit' => "Change my Email Address", 'settings' => "Account Options", 'photo' => "You may enter a URL for a personal photograph
[This will only be displayed on your profile - not with your posts]", -'js_so_far' => "characters so far", +'js_so_far' => "characters", 'email_help' => "This is where you can change your email settings", 'settings_dopopup' => "Do you wish to get a board notification when you get a new personal message?", 'settings_display' => "Board Display Settings", @@ -595,9 +605,10 @@ $lang = array ( // Time zones... -$lang['time_-12'] = "(GMT - 12:00 hours) Enitwetok, Kwajalien"; +$lang['time_-12'] = "(GMT - 12:00 hours) Enewetak, Kwajalein"; $lang['time_-11'] = "(GMT - 11:00 hours) Midway Island, Samoa"; $lang['time_-10'] = "(GMT - 10:00 hours) Hawaii"; +$lang['time_-9.5'] = "(GMT - 9:30 hours) French Polynesia"; $lang['time_-9'] = "(GMT - 9:00 hours) Alaska"; $lang['time_-8'] = "(GMT - 8:00 hours) Pacific Time (US & Canada)"; $lang['time_-7'] = "(GMT - 7:00 hours) Mountain Time (US & Canada)"; @@ -617,13 +628,21 @@ $lang['time_4'] = "(GMT + 4:00 hours) Abu Dhabi, Baku, Muscat, Tbilisi"; $lang['time_4.5'] = "(GMT + 4:30 hours) Kabul"; $lang['time_5'] = "(GMT + 5:00 hours) Ekaterinburg, Karachi, Tashkent"; $lang['time_5.5'] = "(GMT + 5:30 hours) Bombay, Calcutta, Madras, New Delhi"; +$lang['time_5.75'] = "(GMT + 5:45 hours) Kathmandu"; $lang['time_6'] = "(GMT + 6:00 hours) Almaty, Colombo, Dhaka"; +$lang['time_6.5'] = "(GMT + 6:30 hours) Yangon, Naypyidaw, Bantam"; $lang['time_7'] = "(GMT + 7:00 hours) Bangkok, Hanoi, Jakarta"; $lang['time_8'] = "(GMT + 8:00 hours) Hong Kong, Perth, Singapore, Taipei"; +$lang['time_8.75'] = "(GMT + 8:45 hours) Caiguna, Eucla"; $lang['time_9'] = "(GMT + 9:00 hours) Osaka, Sapporo, Seoul, Tokyo, Yakutsk"; $lang['time_9.5'] = "(GMT + 9:30 hours) Adelaide, Darwin"; $lang['time_10'] = "(GMT + 10:00 hours) Melbourne, Papua New Guinea, Sydney"; +$lang['time_10.5'] = "(GMT + 10:30 hours) Lord Howe Island"; $lang['time_11'] = "(GMT + 11:00 hours) Magadan, New Caledonia, Solomon Is."; +$lang['time_11.5'] = "(GMT + 11:30 hours) Burnt Pine, Kingston"; $lang['time_12'] = "(GMT + 12:00 hours) Auckland, Fiji, Marshall Island"; +$lang['time_12.75'] = "(GMT + 12:45 hours) Chatham Islands"; +$lang['time_13'] = "(GMT + 13:00 hours) Kamchatka, Anadyr"; +$lang['time_14'] = "(GMT + 14:00 hours) Kiritimati"; ?> \ No newline at end of file diff --git a/upload/cache/lang_cache/index.html b/upload/cache/lang_cache/index.html index 250b1f72..af2fbe79 100644 --- a/upload/cache/lang_cache/index.html +++ b/upload/cache/lang_cache/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

Ошибка русской версии Invision Power Board

-Вы попали на несуществующую страницу!
Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
- - \ No newline at end of file + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/acp_lang_acpperms.php b/upload/cache/lang_cache/ru/acp_lang_acpperms.php deleted file mode 100644 index 4c67827f..00000000 --- a/upload/cache/lang_cache/ru/acp_lang_acpperms.php +++ /dev/null @@ -1,196 +0,0 @@ - "Диагностика", -'help:diag:do' => "Выполнение диагностики", -'help:support' => "Страница поддержки", -'help:support:view' => "Просмотр страницы поддержки", - -// 2.1.5 -'admin:splash' => "Главн. страница админцентра", -'admin:splash:splash' => "Разрешить просмотр главной страницы", - -'admin:adminlog' => "Действия администраторов", -'admin:adminlog:remove' => "", -'admin:components' => "Система компонентов", -'admin:components:add' => "", -'admin:components:edit' => "", -'admin:components:export' => "", -'admin:components:import' => "", -'admin:emailerror' => "Журнал e-mail ошибок", -'admin:emailerror:remove' => "", -'admin:emaillog' => "E-mail отправления", -'admin:emaillog:remove' => "", -'admin:modlog' => "Действия модераторов", -'admin:modlog:remove' => "", -'admin:spiderlog' => "Действия поисковых ботов", -'admin:spiderlog:remove' => "", -'admin:stats' => "Статистика", -'admin:stats:show' => "Генерация и просмотр статистики", -'admin:warnlog' => "Журнал предупреждений", -'admin:warnlog:remove' => "", -'admin:warnlog:view' => "", -'content:attach' => "Прикрепляемые файлы", -'content:attach:add' => "", -'content:attach:edit' => "", -'content:attach:export' => "", -'content:attach:import' => "", -'content:attach:remove' => "", -'content:attach:search' => "", -'content:attach:stats' => "Разрешить ПРОСМОТР СТАТИСТИКИ", -'content:babw' => "Фильтры (блокировки и нецензурных слов)", -'content:babw:ban-add' => "Разрешить ДОБАВЛЕНИЕ фильтров блокировки", -'content:babw:ban-remove' => "Разрешить УДАЛЕНИЕ фильтров блокировки", -'content:babw:ban-view' => "Разрешить ПРОСМОТР фильтров блокировки", -'content:babw:bw-add' => "Разрешить ДОБАВЛЕНИЕ фильтров нецензуных слов", -'content:babw:bw-edit' => "Разрешить ИЗМЕНЕНИЕ фильтров нецензуных слов", -'content:babw:bw-export' => "Разрешить ЭКСПОРТ фильтров нецензуных слов", -'content:babw:bw-import' => "Разрешить ИМПОРТ фильтров нецензуных слов", -'content:babw:bw-remove' => "Разрешить ДОБАВЛЕНИЕ фильтров нецензуных слов", -'content:bbcode' => "Дополнительные BB-коды", -'content:bbcode:add' => "", -'content:bbcode:edit' => "", -'content:bbcode:export' => "", -'content:bbcode:import' => "", -'content:bbcode:remove' => "", -'content:calendars' => "Календари", -'content:calendars:add' => "", -'content:calendars:edit' => "", -'content:calendars:recache' => "", -'content:field' => "Дополнительные поля профиля", -'content:field:add' => "", -'content:field:edit' => "", -'content:field:remove' => "", -'content:forum' => "Управление форумами", -'content:forum:add' => "", -'content:forum:edit' => "", -'content:forum:empty' => "Разрешить ОЧИСТКУ форумов", -'content:forum:permedit' => "Разрешить РЕДАКТИРОВАНИЕ форумов", -'content:forum:recount' => "Разрешить ПЕРЕСЧЕТ форумов", -'content:forum:remove' => "", -'content:forum:reorder' => "Разрешить СОРТИРОВКУ форумов", -'content:forum:rules' => "Разрешить УПРАВЛЕНИЕ правилами форумов", -'content:forum:skin' => "Разрешить УПРАВЛЕНИЕ стилями форумов", -'content:group' => "Группы пользователей", -'content:group:add' => "", -'content:group:edit' => "", -'content:group:perms' => "Разрешить УПРАВЛЕНИЕ масками доступа", -'content:group:remove' => "", -'content:mem' => "Пользователи", -'content:mem:add' => "", -'content:mem:ban' => "Разрешить БЛОКИРОВАНИЕ пользователей", -'content:mem:edit' => "", -'content:mem:mod' => "Разрешить УПРАВЛЕНИЕ ожидающими публикации модератором темами", -'content:mem:remove' => "", -'content:mem:suspend' => "Разрешить ВРЕМЕННОЕ БЛОКИРОВАНИЕ пользователя", -'content:mem:title-add' => "Разрешить ДОБАВЛЕНИЕ личного звания пользователю", -'content:mem:title-edit' => "Разрешить РЕДАКТИРОВАНИЕ личного звания пользователя", -'content:mem:title-remove' => "Разрешить УДАЛЕНИЕ личного звания пользователя", -'content:mem:title-view' => "Разрешить ПРОСМОТР личного звания пользователя", -'content:mod' => "Модераторы", -'content:mod:add' => "", -'content:mod:edit' => "", -'content:mod:remove' => "", -'content:msubs' => "Подписки", -'content:msubs:add' => "", -'content:msubs:edit' => "", -'content:msubs:install' => "Разрешить УСТАНОВКУ шлюзов", -'content:msubs:remove' => "", -'content:msubs:search' => "", -'content:mtools' => "IP Утилиты", -'content:mtools:view' => "Разрешить ПРОСМОТР IP-утилит", -'content:multimod' => "Мульти-модерация тем", -'content:multimod:add' => "", -'content:multimod:edit' => "", -'content:multimod:remove' => "", -'content:rssexport' => "RSS Экспорт", -'content:rssexport:add' => "", -'content:rssexport:edit' => "", -'content:rssexport:recache' => "", -'content:rssimport' => "RSS Импорт", -'content:rssimport:add' => "", -'content:rssimport:edit' => "", -'content:rssimport:recache' => "", -'content:rssimport:remove' => "", -'lookandfeel:emoticons' => "Смайлики", -'lookandfeel:emoticons:add' => "", -'lookandfeel:emoticons:edit' => "", -'lookandfeel:emoticons:export' => "", -'lookandfeel:emoticons:import' => "", -'lookandfeel:emoticons:remove' => "", -'lookandfeel:emoticons:upload' => "", -'lookandfeel:image' => "Макросы стилей", -'lookandfeel:image:add' => "", -'lookandfeel:image:edit' => "", -'lookandfeel:image:remove' => "", -'lookandfeel:import' => "Импорт и Экспорт стилей", -'lookandfeel:import:export' => "", -'lookandfeel:import:import' => "", -'lookandfeel:lang' => "Языки", -'lookandfeel:lang:add' => "", -'lookandfeel:lang:edit' => "", -'lookandfeel:lang:export' => "", -'lookandfeel:lang:import' => "", -'lookandfeel:lang:remove' => "", -'lookandfeel:sets' => "Стили", -'lookandfeel:sets:add' => "", -'lookandfeel:sets:edit' => "", -'lookandfeel:sets:rebuild' => "", -'lookandfeel:sets:remove' => "", -'lookandfeel:skindiff' => "Различия стилей", -'lookandfeel:skindiff:rundiff' => "Разрешить ЗАПУСК УТИЛИТЫ СРАВНЕНИЯ стилей", -'lookandfeel:skintools' => "Утилиты для стилей", -'lookandfeel:skintools:changemember' => "Разрешить ИЗМЕНЕНИЕ стиля пользователей", -'lookandfeel:skintools:recache' => "Разрешить ОБНОВЛЕНИЕ КЕША стилей", -'lookandfeel:skintools:search' => "Разрешить ПОИСК И ЗАМЕНУ в HTML шаблонах", -'lookandfeel:style' => "CSS стиля", -'lookandfeel:style:edit' => "", -'lookandfeel:templ' => "HTML шаблоны стиля", -'lookandfeel:templ:add' => "", -'lookandfeel:templ:edit' => "", -'lookandfeel:templ:remove' => "", -'lookandfeel:wrap' => "Общий шаблон форума", -'lookandfeel:wrap:edit' => "", -'tools:admin' => "Кеш утилиты", -'tools:admin:recache' => "", -'tools:help' => "Разделы помощи", -'tools:help:add' => "", -'tools:help:edit' => "", -'tools:help:remove' => "", -'tools:loginauth' => "Системы авторизации", -'tools:loginauth:add' => "", -'tools:loginauth:diagnostics' => "Разрешить ДИАГНОСТИКУ системы", -'tools:loginauth:edit' => "", -'tools:loginauth:export' => "", -'tools:loginauth:import' => "", -'tools:op' => "Настройки", -'tools:portal' => "Дополнения портала", -'tools:op:add' => "", -'tools:op:edit' => "", -'tools:op:export' => "", -'tools:op:import' => "", -'tools:op:remove' => "", -'tools:op:search' => "", -'tools:postoffice' => "Работа с e-mail", -'tools:postoffice:add' => "", -'tools:postoffice:edit' => "", -'tools:postoffice:remove' => "", -'tools:postoffice:send' => "Разрешить ОТПРАВКУ РАССЫЛКИ", -'tools:rebuild' => "Пересчет и обновление", -'tools:rebuild:rebuild' => "", -'tools:rebuild:recount' => "", -'tools:task' => "Менеджер задач", -'tools:task:add' => "", -'tools:task:edit' => "", -'tools:task:log' => "", -'tools:task:remove' => "", -'tools:task:runnow' => "Разрешить использовать опцию ЗАПУСК СЕЙЧАС для задач", -'admin' => "Администрирование", -'content' => "Управление", -'lookandfeel' => "Внешний вид", -'components' => "Компоненты", -'tools' => "Инструменты и настройки", - -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/acp_lang_member.php b/upload/cache/lang_cache/ru/acp_lang_member.php deleted file mode 100644 index c02203e1..00000000 --- a/upload/cache/lang_cache/ru/acp_lang_member.php +++ /dev/null @@ -1,28 +0,0 @@ - "Использовать корзину?", -'mem_delete_posts_trash_desc' => "Сообщения и темы пользователей будут перемещены в специальный форум, откуда при необходимости их можно будет восстановить.", -'mem_delete_posts_title' => "Удалить сообщения/темы для:", -'mem_delete_delete_posts' => "Удалить ВСЕ %s СООБЩЕНИЙ этого пользователя?", -'mem_delete_delete_posts_desc' => 'Если включить: темы, открытые этим пользователем и не имеющие ответов, будет удалены, остальные темы не удаляются.', -'mem_delete_delete_topics' => "Удалить ВСЕ %s ТЕМ этого пользователя?", -'mem_delete_delete_topics_desc' => "Если включить: все темы, открытые этим пользователем, будут удалены, независимо от ответов в эту тему от других пользователей.", -'mem_delete_delete_pergo' => "Удалять по n сообщений/тем за раз", -'mem_delete_delete_pergo_desc' => "Удаление сообщений и тем происходит небыстро, не рекомендуем указывать большое число за раз", -'mem_delete_process' => "В обработке...", - -'mem_edit_pm_title' => "Отключить использование пользователем личных сообщений", -'mem_edit_pm_no' => "Нет", -'mem_edit_pm_yes' => "Да — но разрешить пользователю включать повторно", -'mem_edit_pm_yes_really' => "Да — и не разрешать пользователю включать повторно", - -'mem_delete_title' => "Удаление сообщений/тем пользователя", -'mem_delete_title_desc' => 'Эта секция позволяет вам удалить все сообщения или темы, опубликованные данным пользователем', - -'mem_posts_process_done' => "Завершено!", -'mem_posts_process_more' => "%s сообщений обработано (проверено сообщений: %s, тем: %s)...", - -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/acp_lang_portal.php b/upload/cache/lang_cache/ru/acp_lang_portal.php deleted file mode 100644 index 6623be66..00000000 --- a/upload/cache/lang_cache/ru/acp_lang_portal.php +++ /dev/null @@ -1,23 +0,0 @@ - "Дополнения портала", -'main_title' => "Дополнения портала", -'main_help' => "Дополнения портала — модули, которые находятся в директории /sources/portal_plugins/. После успешной установки каждый модуль позволит вам использовать специальные теги, которые увеличивают функциональность в пределах портала", - -'error_no_dir' => "Директория /sources/portal_plugins/ не существует. Создайте ее и попробуйте снова.", -'error_no_key' => "Не существует дополнения по указанному ключу.", -'error_no_settings' => "Настроек для этого дополнения не существует", - -'portal_main_title' => 'Установленные дополнения', -'portal_main_key' => 'Название', -'portal_pop_tags' => 'Экспортируемые теги:', -'portal_pop_name' => 'Имя тега', -'portal_pop_desc' => 'Описание тега', - -'portal_row_menu_view_tags' => "Список предоставляемых тегов", -'portal_row_menu_settings' => "Настройки модуля", - -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/index.html b/upload/cache/lang_cache/ru/index.html deleted file mode 100644 index 250b1f72..00000000 --- a/upload/cache/lang_cache/ru/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - -Ошибка русской версии Invision Power Board - -

Ошибка русской версии Invision Power Board

-Вы попали на несуществующую страницу!
Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
- - \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_boards.php b/upload/cache/lang_cache/ru/lang_boards.php deleted file mode 100644 index 148eecc3..00000000 --- a/upload/cache/lang_cache/ru/lang_boards.php +++ /dev/null @@ -1,110 +0,0 @@ - "сообщений", -'cs_members' => "пользователей", -'cs_active' => "пользователей в онлайне", -'q_topics' => "Ожидающих тем:", -'q_posts' => "сообщений:", - -// build #003 -'foruma' => "форума", -'messages' => "Сообщений:", -'polzovateley' => "Пользователей", -'v_online' => "в онлайне:", -'ozhidayushih_tem' => "Ожидающих тем:", -'soobsheniy' => "сообщений:", -'avtorizatsiya' => "Авторизация:", -'poisk_po_forumu' => "Поиск по форуму:", - -// добавлено в 2.0 - -'enter_search_words' => "Что ищем?", -'sub_forum_title' => "— подфорумы", - -// - -'whoschatting_total' => "Сейчас пользователей в чате:", -'whoschatting_loadchat' => "Чат", -'whoschatting_none' => "В чате сейчас никого нет", -'whoschatting_delay' => "Обновляется каждые %s минут", - -'rd_hits' => "Переходов", -'oul_show_more' => "Полный список по:", -'oul_click' => "последним действиям", -'oul_name' => "именам пользователей", - -'qli_title' => "Быстрый вход", -'qli_name' => "Имя пользователя", -'qli_go' => "Войти!", - -'by' => "Автор", - -'calender_f_title' => "Будущие календарные события (в пределах %s дней)", - -'no_calendar_events' => "Отсутствуют", - -'newslink' => "— последние новости: ", - -'welcome_back_text' => "С возвращением, последний раз вы были здесь", - -'sm_today_posters' => "Активные сегодня", -'sm_all_posters' => "Самые активные", -'sm_forum_leaders' => "Администрация", -'sm_todays_posts' => "Активные темы", - -'protected_forums' => "Закрытые форумы", -'no_birth_users' => "Именинников сегодня нет", -'total_forums' => "Всего форумов:", -'public_forums' => "Открытых форумов", -'public_members' => "пользователей", - -'total_word_string' => "На форуме сообщений: <#posts#>
Зарегистрировано пользователей: <#reg#>
Приветствуем последнего зарегистрированного по имени <#mem#>", - - -'birthday_header' => "Поздравляем с днем рождения наших пользователей:", - -'replies' => "Ответов", -'board_stats' => "Статистика форума", - -'guests' => "гостей", -'posts' => "сообщений", -'total_of' => "всего", -'browser_user_list' => "Полный список", - -'forum_leader' => "Модераторы: ", -'birth_user' => "пользователь празднует свой день рождения", -'forum_users' => "Пользователей в этом форуме", -'forums' => "Форумов", -'restricted_forums' => "Закрытых форумов", -'invite_submit' => "ОК", -'all_times' => "Все время", -'new_posts' => "Новые сообщения", -'anon_members' => "скрытых пользователей", -'d_post_read' => "Отметить все сообщения прочитанными", -'last_post_info' => "Последнее сообщение", -'birth_users' => "пользователей празднуют сегодня свой день рождения", -'forum_off' => "Только для чтения", - -'cat_name' => "Форум", -'in' => "Тема", -'registered_mems' => "зарегистрированных пользователей", -'topics' => "Тем", -'f_protected' => "Закрытый форум", -'d_delete_cookies' => "Удалить установленные форумом cookies", -'forum_icons' => "Иконка форума", - - - -'info' => "Информация", -'active_users' => "посетителей за последние %s минут", - -'f_none' => "----", -'most_online' => "Рекорд посещаемости форума — <#NUM#>, зафиксирован — <#DATE#>", -'no_new' => "Нет новых сообщений", - -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_buddy.php b/upload/cache/lang_cache/ru/lang_buddy.php deleted file mode 100644 index 5fa03aa4..00000000 --- a/upload/cache/lang_cache/ru/lang_buddy.php +++ /dev/null @@ -1,56 +0,0 @@ - "Вы не имеете новых/непрочитанных л.с.", - -// 2.1 - -'tab_info' => 'Информация', -'tab_posts' => 'Новые сообщения', -'tab_search' => 'Поиск', -'tab_pms' => 'Личные сообщения', -'tab_newpms' => 'НОВЫЕ личн. сообщения', -'legend_forum' => 'Информация о форуме', -'legend_post' => 'Информация о публикации', - -// Old - -'page_title' => "Помощник", -'log_in_needed' => "Требуется войти", -'no_guests' => "Эта функция недоступна для гостей.

Если вы зарегистрированы, авторизуйтесь.", -'log_in' => "Авторизация", -'lin_name' => "Имя пользователя", -'lin_pass' => "Пароль", - -'reg_text' => "Для использования этой функции необходимо быть зарегистрированным пользователем.", - - -'reg_link' => "Регистрация", - -'close_win' => "Закрыть окно", -'refresh' => "Обновить окно", - -'show_me' => "Показать:", - -'sm_today_posters' => "Самые активные сегодня", -'sm_all_posters' => "Самые активные форумчане", -'sm_forum_leaders' => "Администрация форума", -'sm_todays_posts' => "Активные темы ", -'sm_my_last_posts' => "10 ваших последних сообщений", - -'while_away' => "Пока вас не было:", -'no_new_posts' => "Новых сообщений не появилось", - -'new_posts' => "Появилось новых сообщений: %s.", -'view_link' => "Просмотр", -'my_replies' => "Ответов в ваших темах: %s", -'none' => "0", -'search_forums' => "Поиск по форуму", -'search_help' => "Поиск в разделе «Помощь»", -'go' => "ОК", - -); - -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_calendar.php b/upload/cache/lang_cache/ru/lang_calendar.php deleted file mode 100644 index 12b2e82a..00000000 --- a/upload/cache/lang_cache/ru/lang_calendar.php +++ /dev/null @@ -1,115 +0,0 @@ - "Если это событие не действует весь день, вы можете указать начальное время", -'form_timestart' => "Начальное время (ЧЧ:ММ)", - -// 2.1 (НОВОЕ) - -'cal_title_jump' => 'Переход по календарю', -'cal_title_nav' => 'Навигация', -'cal_event_add_single' => 'Однодневное событие', -'cal_event_add_ranged' => 'Многодневное событие', -'cal_event_add_recurring' => 'Повторяющееся событие', - -'cal_event_delete' => 'Событие календаря успешно удалено', -'button_delete' => "Удалить", -'button_edit' => "Изменить", -'button_approve' => "Опубликовать (сделать видимым)", -'button_unapprove' => "Скрыть (сделать невидимым)", -'new_event_mod' => "Опубликованное вами событие добавлено в список на проверку модератором, только после его одобрения оно будет опубликовано", -'day_add_event' => 'Добавить новое событие', -'show_n_events' => 'Событий: (%s)', -'form_whichcal' => 'Добавить календарь', -'form_tz' => 'Временная зона события', -'calendar_group_filter' => "Опция администраторов
(доступна только для публичных событий)", -'calendar_delete_box' => "Удалить событие", -'calendar_title' => "Заголовок события", -'calendar_event_date' => "Даты", -'calendar_event_type' => "Тип события", -'calendar_type_private' => "Приватное событие (видно только вам)", -'calendar_type_public' => "Публичное событие (видно всем)", -'calendar_submit' => "Добавить событие календаря", - -'calendar_edit_submit' => "Изменить событие", - -// 2.1 (CHANGED) - -'entry_birthdays' => "Именинников: %s", -'post_new_event' => "Управление событиями календаря", - -//------------------------------------------------ - - -// build #003 - -'add_new_event_to_calendar' => "Добавить новое событие", -'view_current_month' => "Просмотр текущего месяца", -'view_current_week' => "Просмотр текущей недели", -'delete_event' => "Удалить событие", -'edit_event' => "Изменить событие", - -'bd_birthday' => ", с днем рождения!", -'aa_add_new_event' => "Добавить событие", -'aa_cur_month' => "Текущий месяц", -'aa_view_week' => "Текущая неделя", - -// 1.2 - -'fv_single' => "Дата события", -'fv_range' => "Многодневное событие", -'fv_range_ends' => 'Завершить', -'fv_recur' => "Повторяющееся событие", -'fv_recur_every' => "", -'fv_days' => "Еженедельно", -'fv_months' => "Ежемесячно", -'fv_years' => "Ежегодно", -'fv_hidden' => '------------', -'fv_bgcolor' => "Фон", -'fv_font' => "Текст", -'fv_until' => "До", -'tbt_recur' => "Повторяющееся событие", -'js_del_1' => "Вы точно хотите удалить это событие?", -'js_del_2' => "Действие отменено!", - -'se_normal' => "Однодневное событие", -'se_recur' => "Повторяющееся событие", -'se_range' => "Многодневное событие", -'se_ends' => "до", -'month_jump' => "Перейти к месяцу", - -// --- - - -'page_title' => 'Календарь', -'table_title' => 'Календарь событий и именинников', - -'form_submit_show' => "ОК", - -'new_event_redirect' => "ваше календарное событие успешно добавлено", - -'cal_title_events' => "Календарь", - -'cal_birthdays' => "Именинники", - -'back' => "Назад", - -'private_event' => "Приватное событие", -'public_event' => "Публичное событие", -'restricted_event' => "Ограниченное событие", - -'joined' => "Регистрация:", -'posts' => "Сообщений:", -'group' => "Группа:", - -'edit_event' => "Изменить событие:", - -'edit_event_redirect' => "календарное событие отредактировано", -'delete_event_redirect' => "календарное событие удалено", - -'event_date' => "Дата события:", - -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_chatpara.php b/upload/cache/lang_cache/ru/lang_chatpara.php deleted file mode 100644 index 9e702b55..00000000 --- a/upload/cache/lang_cache/ru/lang_chatpara.php +++ /dev/null @@ -1,19 +0,0 @@ - "Основное окно чата", -'chat_help' => "Помощь по чату", -'chat_online' => "Находится в чате", -'chat_help_text' => "Если Вы работаете в Windows и видите только иконку «мертвой» ссылки, то вам необходимо скачать и установить Java Virtual Machine, после этого зайти в чат заново. Скачать это Java приложение можно по ссылке ниже:
-
- * Microsoft Virtual Machine (для Internet Explorer)
- * Sun Java™ Plugin (для Netscape, Opera и т.д.)
-
- Внимание: в старых версиях браузеров некоторых систем чат у вас может не открываться.
-
- Пользователи, использующие firewall, должны открыть доступ к client.invisionchat.com через порты 9000-9009.
-

", -'chat_chatpara' => 1, -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_chatsigma.php b/upload/cache/lang_cache/ru/lang_chatsigma.php deleted file mode 100644 index 69a3d40d..00000000 --- a/upload/cache/lang_cache/ru/lang_chatsigma.php +++ /dev/null @@ -1,19 +0,0 @@ - "Основное окно чата", -'chat_help' => "Помощь по чату", -'chat_online' => "Находится в чате", -'chat_help_text' => "Если Вы работаете в Windows и видите только иконку «мертвой» ссылки, то вам необходимо скачать и установить Java Virtual Machine, после этого зайти в чат заново. Скачать это Java приложение можно по ссылке ниже:
-
- * Microsoft Virtual Machine (для Internet Explorer)
- * Sun Java™ Plugin (для Netscape, Opera и т.д.)
-
- Внимание: в старых версиях браузеров некоторых систем чат у вас может не открываться.
-
- Пользователи, использующие firewall, должны открыть доступ к client.invisionchat.com через порты 9000-9009.
-

", -'chat_chatsigma' => 1, -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_editors.php b/upload/cache/lang_cache/ru/lang_editors.php deleted file mode 100644 index 1e0735ce..00000000 --- a/upload/cache/lang_cache/ru/lang_editors.php +++ /dev/null @@ -1,127 +0,0 @@ - "", -'bbcodeloader_insert' => "Вставить", -'bbcodeloader_title' => "Вставить доп. BB-код", -'bbcodeloader_example' => "Пример", -'bbcodeloader_option' => "Текст опции", -'bbcodeloader_content' => "Текст контента", -'bbcodeloader_ok' => "OK", -'bbcodeloader_cancel' => "Отмена", - -//2.2 -'js_rte_lite_code' => "Код", -'js_rte_lite_quote' => "Цитата", -'js_rte_lite_link' => "Вставить гиперссылку", -'js_rte_lite_img' => "Вставить изображение", -'js_rte_lite_email' => "Вставить адрес электронной почты", -'toggle_side_panel' => "Боковая панель", -'emos_show_all' => "Показать все", -'emos_show_prev' => "Предыдущие", -'emos_show_next' => "Следующие", -'ed_quick_access' => "Теги", -'js_tt_emoticons' => "Смайлики", -'js_tt_unlink' => "Удалить", -'js_tt_sub' => "Подстрочный", -'js_tt_sup' => "Надстрочный", -'js_rte_quote' => "Сделать как цитата", -'js_rte_code' => "Сделать как код", -'js_tt_spellcheck' => "Правописание", -'js_tt_switcheditor' => "Переключиться между стандартным и «Rich Text» редактором", - -'js_rte_link' => "Вставить ссылку", -'js_rte_unlink' => "Удалить ссылку", -'js_rte_image' => "Вставить изображение", -'js_rte_email' => "Вставить e-mail", -'js_rte_erroriespell' => "ieSpell не обнаружен. Нажмите «Ok» для перехода на страницу загрузки.", -'js_rte_errorliespell' => "Ошибка загрузки ieSpell: Exception ", -'js_rte_optionals' => "Введите дополнительный параметр для этого кода", - -'the_max_length' => "0", -'override' => "0", - -'js_tt_noformat' => "Очистить формат", -'js_tt_htmlsource' => "Переключить на HTML-код", -'js_tt_insert_item' => "Спец. элементы", - -//2.1.2 - -'button_init' => "Инициализация...", -'jsfile_error' => "Ошибка!", -'jsfile_error_c' => "Ошибка:", -'jsfile_mywebpage' => "Сайт", -'jsfile_alert1' => "Некоторые версии Mozilla/Firefox не поддерживают programatic ", -'jsfile_alert2' => "доступ к функциям вырезать/копировать/вставить, по причинам безопасности. ", -'jsfile_alert3' => "Ваш браузер один из них. Пожалуйста, используйте стандартные комбинации клавиш:", -'jsfile_alert4' => "CTRL-X - вырезать, CTRL-C - копировать, CTRL-V - вставить.", -'jsfile_highlight' => "Вы обязаны выделить часть текста перед созданием этой ссылки", -'jsfile_erroriespell' => "ieSpell не найден. Нажмите Ok для перехода на страницу загрузки.", -'jsfile_errorliespell' => "Ошибка загрузки ieSpell: Exception ", - - -'js_forced_change' => "У вас установлено отображение при помощи «Rich Text» редактора, но ваш браузер не поддерживает его. Для вас используется стандартный режим отображения.", -'js_tt_closeall' => "Закрыть все теги", -'js_tt_bold' => "Полужирный", -'js_tt_italic' => "Курсив", -'js_tt_underline' => "Подчеркнутый", -'js_tt_strike' => "Перечеркнутый", -'js_tt_font_col' => "Цвет шрифта", -'js_tt_back_col' => "Цвет фона", -'js_tt_link' => "Вставить ссылку", -'js_tt_image' => "Вставить изображение", -'js_tt_email' => "Вставить e-mail", -'js_tt_quote' => "Сделать цитатой", -'js_tt_left' => "По левому краю", -'js_tt_center' => "По центру", -'js_tt_right' => "По правому краю", -'js_tt_list' => "Вставить список", -'js_tt_indent' => "Увеличить отступ", -'js_tt_outdent' => "Уменьшить отступ", -'js_tt_noformat' => "Удалить форматирование", -'js_tt_undo' => "Отменить ввод", -'js_tt_redo' => "Вернуть ввод", -'js_tt_copy' => "Копировать", -'js_tt_paste' => "Вставить", -'js_tt_cut' => "Вырезать", -'js_tt_code' => "Код", - -'box_font' => "Шрифт", -'box_size' => "Размер", - -'js_bbeasy_on' => 'Обучающий режим включен', -'js_bbeasy_off' => 'Обучающий режим отключен', -'js_bbeasy_toggle' => 'Нажмите для переключения между режимами', - -'remove_attach' => "Вы действительно хотите удалить этот файл?", - -'js_close_all_tags' => "Закрыть все теги", -'js_tag_list' => "Введите пункт списка. Для завершения списка, нажмите «отмена» или оставьте очередное поле пустым", -'jscode_text_enter_url' => "Введите полный URL ссылки", -'jscode_text_enter_email' => "Введите e-mail адрес", -'jscode_text_code' => "Использование: [CODE] Здесь исходный код [/CODE]", -'jscode_error_no_title' => "Вы должны ввести название", -'jscode_text_quote' => "Использование: [QUOTE] Вставляйте сюда цитируемые тексты [/QUOTE]", -'jscode_error_no_url' => "Вы должны ввести URL", -'jscode_text_enter_image' => "Введите полный URL изображения", -'jscode_error_no_width' => "Вы должны ввести ширину", -'jscode_text_enter_url_name' => "Введите название сайта", -'jscode_error_no_email' => "Вы должны ввести e-mail адрес", -'js_used' => "Вами использовано", -'js_max_length' => "Максимально допустимая длина", -'js_post' => "Сообщение", -'js_no_message' => "Вы должны ввести текст сообщения!", -'js_current' => "Текущие символы", -'js_characters' => "символов", -'msg_no_title' => "Необходимо ввести заголовок письма", -'js_check_length' => "Проверить длину сообщения", - -'hb_open_tags' => "Открытые теги", - - -'js_text_to_format' => "Введите текст для форматирования", - -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_email_content.php b/upload/cache/lang_cache/ru/lang_email_content.php deleted file mode 100644 index b14e7d46..00000000 --- a/upload/cache/lang_cache/ru/lang_email_content.php +++ /dev/null @@ -1,611 +0,0 @@ -. -<#BOARD_ADDRESS#> - -EOF; - -/*------------------------------------------------------------------------------------*/ -// IPB 2.2.0 -/*------------------------------------------------------------------------------------*/ - -//------------------------------- -// MODERATED: Add Friend Done -//------------------------------- - -$lang['subject__new_friend_approved'] = 'Одобрение на добавление в список друзей'; -$lang['new_friend_approved'] = <<, - -<#FRIEND_NAME#> одобрил ваш запрос стать его другом! - -Авторизуйтесь для управления вашим списком друзей: <#LINK#> - -EOF; - -//------------------------------- -// MODERATED: Add Friend -//------------------------------- - -$lang['subject__new_friend_request'] = 'Запрос на добавление вас в список друзей'; -$lang['new_friend_request'] = <<, - -<#FRIEND_NAME#> хочет быть вашим другом! - -Это сообщение было отправлено, потому что <#FRIEND_NAME#> добавил вас в свой список друзей. -Поскольку вы включили премодерацию на добавление вас в друзья, вы не будете числиться в списке друзей -других пользователей до подтверждения этого вами. - -Авторизируйтесь для управления вашим списком друзей: <#LINK#> - -EOF; - -//------------------------------- -// Friend added -//------------------------------- - -$lang['subject__new_friend_added'] = 'Добавление в друзья'; -$lang['new_friend_added'] = <<, - -Пользователь <#FRIEND_NAME#> добавил вас в свой список друзей. - -Управление вашим списком друзей: <#LINK#> - -EOF; - -//------------------------------- -// MODERATED: Add Friend -//------------------------------- - -$lang['subject__new_comment_request'] = 'Новый комментарий, требующий проверки'; -$lang['new_comment_request'] = <<, - -<#COMMENT_NAME#> has left you a comment that requires your approval. - -Это сообщение было отправлено, потому что <#COMMENT_NAME#> опубликовал новый комментарий в вашем профиле. -Поскольку вы выбрали, чтобы новые комментарии в вашем профиле проходили премодерацию, они не будут опубликованы -до вашего одобрения. - -Авторизируйтесь для управления комментариями: <#LINK#> - -EOF; - -//------------------------------- -// Friend added -//------------------------------- - -$lang['subject__new_comment_added'] = 'Новый комментарий'; -$lang['new_comment_added'] = <<, - -Это сообщение было отправлено, потому что <#COMMENT_NAME#> опубликовал новый комментарий в вашем профиле. - -Управление вашими комментариями: <#LINK#> - -EOF; - -/*------------------------------------------------------------------------------------*/ -// ПОДПИСКИ -/*------------------------------------------------------------------------------------*/ - -//------------------------------- -// NEW PAID SUBSCRIPTION -//------------------------------- - - -$lang['subject__new_subscription'] = 'Покупка новых подписок'; -$lang['new_subscription'] = << как подтверждение о вашей покупки -пакета подписок. - ----------------------------------- -Дата покупки: <#PACKAGE#> -Дата окончания подписки: <#EXPIRES#> -Подписки: <#LINK#> ----------------------------------- - -EOF; - -//------------------------------- -// SUBSCRIPTION EXPIRES -//------------------------------- - -$lang['subject__subscription_expires'] = 'Истечение срока подписок'; -$lang['subscription_expires'] = << о том, что срок ваших подписок скоро истечет. - ----------------------------------- -Дата покупки: <#PACKAGE#> -Дата окончания подписки: <#EXPIRES#> -Подписки: <#LINK#> ----------------------------------- - -Если вы хотите продолжить использовать подписку, вам необходимо купить новый пакет -подписок после окончания действия этой подписки. - -EOF; - - -//------------------------------- -// NEW MOD __TOPIC__ -//------------------------------- - - -$lang['subject__new_topic_queue_notify'] = 'Новая тема, требующая проверки'; -$lang['new_topic_queue_notify'] = <<. - -Была открыта новая тема, требующая проверки перед публикацией! -Она может быть или опубликована или удалена! - ----------------------------------- -Тема: <#TOPIC#> -Форум: <#FORUM#> -Автор: <#POSTER#> -Дата: <#DATE#> -Управление темами, требующими проверки: -<#LINK#> ----------------------------------- - -Если вас такие уведомления не интересуют, то удалите ваш e-mail адрес из настроек -форума через «Управление форумами». - -<#BOARD_ADDRESS#> - - -EOF; - -//------------------------------- -// NEW MOD __POST__ -//------------------------------- - - -$lang['subject__new_post_queue_notify'] = 'Новое сообщение, требующее проверки'; -$lang['new_post_queue_notify'] = <<. - -Создано новое сообщение, требующее проверки модератором перед публикацией! -Оно может быть или опубликовано или удалено! - ----------------------------------- -Тема: <#TOPIC#> -Форум: <#FORUM#> -Автор: <#POSTER#> -Дата: <#DATE#> -Управление: <#LINK#> ----------------------------------- - -Если вас такие уведомления не интересуют, то удалите ваш e-mail адрес из настроек -форума через «Управление форумами». - -<#BOARD_ADDRESS#> - - -EOF; - -//------------------------------- -// FORUM: WEEKLY -//------------------------------- - - -$lang['subject__digest_forum_weekly'] = 'Еженедельное уведомление о новых темах'; -$lang['digest_forum_weekly'] = <<, - -Уведомление о новых сообщениях в теме «<#TITLE#>» за текущую неделю: ----------------------------------------------------------------------- - - -<#CONTENT#> - - ----------------------------------------------------------------------- - -Тема находится по адресу: -<#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#>&view=getnewpost - -Отписка: --------------- -Вы можете в любое время отписаться от такой рассылки через ссылку «Подписки» в ваших личных данных. - -EOF; - -//------------------------------- -// FORUM: DAILY -//------------------------------- - - -$lang['subject__digest_forum_daily'] = 'Ежедневное уведомление о новых темах'; -$lang['digest_forum_daily'] = <<, - -Уведомление о новых темах в разделе за день: ----------------------------------------------------------------------- - - -<#CONTENT#> - - ----------------------------------------------------------------------- - -Форум находится по адресу: -<#BOARD_ADDRESS#>?showforum=<#FORUM_ID#> - -Отписка: --------------- -Вы можете в любое время отписаться от такой рассылки через ссылку «Подписки» в ваших личных данных. - -EOF; - - -//------------------------------- -// TOPIC: WEEKLY -//------------------------------- - - -$lang['subject__digest_topic_weekly'] = 'Еженедельное уведомление о новых сообщениях'; -$lang['digest_topic_weekly'] = <<, - -Уведомление о новых темах за текущую неделю: ----------------------------------------------------------------------- - - -<#CONTENT#> - - ----------------------------------------------------------------------- - -Форум находится по адресу: -<#BOARD_ADDRESS#>?showforum=<#FORUM_ID#> - -Отписка: --------------- -Вы можете в любое время отписаться от такой рассылки через ссылку «Подписки» в ваших личных данных. - -EOF; - -//------------------------------- -// TOPIC: DAILY -//------------------------------- - - -$lang['subject__digest_topic_daily'] = 'Ежедневное уведомление о новых сообщениях'; -$lang['digest_topic_daily'] = <<, - -Уведомление о новых сообщениях в теме «<#TITLE#>» за день: ----------------------------------------------------------------------- - - -<#CONTENT#> - - ----------------------------------------------------------------------- - -Тема находится здесь: -<#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#>&view=getnewpost - -Отписка: --------------- -Вы можете в любое время отписаться от такой рассылки через ссылку «Подписки» в ваших личных данных. - -EOF; - - - -//---------- - - -$lang['subject__pm_notify'] = 'Вам новое личное сообщение!'; -$lang['pm_notify'] = <<, -Вам пришло новое личное сообщение. - -Тема: <#TITLE#> -Отправитель: <#POSTER#> - -Для прочтения сообщения пройдите по ссылке: -<#BOARD_ADDRESS#><#LINK#> - - -EOF; - - - -$lang['send_text'] = << - -С уважением, -<#USER NAME#> - -EOF; - - -$lang['report_post'] = <<, - -Всем модераторам было отправлено уведомление от <#USERNAME#> через кнопку «Жалоба». ------------------------------------------------- -Тема: <#TOPIC#> ------------------------------------------------- -Ссылка на сообщение: <#LINK_TO_POST#> ------------------------------------------------- -Жалоба: - -<#REPORT#> - ------------------------------------------------- - -EOF; - - - -$lang['pm_archive'] = <<, -Это письмо отправлено из <#BOARD_ADDRESS#>. - -Все ваши архивированные сообщения сжаты и прикреплены к этому письму. -EOF; - -$lang['reg_validate'] = << появилась регистрационная запись, -в которой был указал ваш электронный адрес (e-mail). - -При заполнении регистрационной формы было указано следующее имя пользователя: - -=================================== -Имя пользователя (login): <#NAME#> -=================================== - -Если вы не понимаете, о чем идет речь — просто проигнорируйте это сообщение! - -Если же именно вы решили зарегистрироваться в форуме по адресу <#BOARD_ADDRESS#>, -то вам следует подтвердить свою регистрацию и тем самым активировать вашу учетную запись. -Подтверждение регистрации производится один раз и необходимо для повышения безопасности форума и защиты его от злоумышленников. -Чтобы активировать вашу учетную запись, необходимо перейти по ссылке: -<#THE_LINK#> -Активация произойдет автоматически. - -Если таким способом активировать учетную запись не удалось, попробуйте сделать это вручную. Пройдите по ссылке -<#MAN_LINK#> -и введите указанные ниже ID пользователя и код активации (не пароль!) в соответствующие поля. - -=================================== -ID пользователя: <#ID#> -Код активации: <#CODE#> -=================================== - -После активации учетной записи вы сможете войти в форум, используя выбранные вами имя пользователя (login) и пароль. С этого момента вы сможете оставлять сообщения. - -Пожалуйста, не забудьте заполнить свои личные данные: -<#BOARD_ADDRESS#>?act=UserCP&CODE=00 - -Благодарим за регистрацию! -EOF; - -$lang['admin_newuser'] = << зарегистрировался <#DATE#> - -(вы можете отключить подобные уведомления в админцентре) -EOF; - -$lang['lost_pass'] = <<! - -Вы получили это письмо, поскольку был сделан запрос на восстановление вашего пароля в форуме по адресу <#BOARD_ADDRESS#>. -Если вы не делали такой запрос, проигнорируйте это сообщение. - - -Если же вы в самом деле забыли свой пароль, заново активируйте вашу учетную запись. - -Чтобы активировать вашу учетную запись, необходимо перейти по ссылке -<#THE_LINK#> -Активация произойдет автоматически. - -Если таким способом сбросить пароль не удалось, попробуйте активировать вручную. Пройдите по ссылке -<#MAN_LINK#> -и введите указанные ниже ID пользователя и код активации (не пароль!) в соответствующие поля. - -=================================== -ID пользователя: <#ID#> -Код активации: <#CODE#> -=================================== - -После активации учетной записи следуйте инструкциям по восстановлению пароля, которые будет сообщать вам форум. - -Если ничего не получается, свяжитесь с администратором форума! -(IP адрес отправителя: <#IP_ADDRESS#>) - -EOF; - - -$lang['lost_pass_email_pass'] = <<! -Вы получили это письмо, поскольку был сделан запрос на восстановление вашего пароля в форуме по адресу <#BOARD_ADDRESS#>. - ------------------------------------------------- -ВАШ НОВЫЙ ПАРОЛЬ ------------------------------------------------- - -Имя пользователя: <#USERNAME#> -Новый пароль: <#PASSWORD#> - -Вход на форум: <#LOGIN#> - -EOF; - -$lang['newemail'] = <<! - -Вы получили это письмо, потому что выслали запрос на изменение E-mail. - ------------------------------------------------- -Инструкция по активации ниже ------------------------------------------------- - -Вам необходимо будет подтвердить изменение вашего E-mail для проверки того, что это -действие выполнено именно вами. Это требуется для защиты от нежелательных -злоупотреблений и спама. - -Для активации учетной записи зайдите по ссылке: - -<#THE_LINK#> - ------------------------------------------------- -Не сработало? ------------------------------------------------- - -Если подтвердить вам не удалось, зайдите по ссылке - -<#MAN_LINK#> - -и введите указанные ниже ID пользователя и код активации (не пароль!) в соответствующие поля. - -=================================== -ID пользователя: <#ID#> -Код активации: <#CODE#> -=================================== - -Если ничего не получается, свяжитесь с администратором форума! - -EOF; - -$lang['forward_page'] = << - - -<#THE_MESSAGE#> - ---------------------------------------------------- -Помните, что администрация <#BOARD_NAME#> не несет ответственности за содержание этого письма! ---------------------------------------------------- - -EOF; - -$lang['subject__subs_with_post'] = 'Уведомление об ответе в теме'; - -$lang['subs_with_post'] = <<, - -<#POSTER#> ответил в тему «<#TITLE#>», на которую вы подписаны. - ----------------------------------------------------------------------- -<#POST#> ----------------------------------------------------------------------- - -Тема находится по адресу: -<#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#>&view=getnewpost - -Возможно, в теме гораздо больше новых ответов, но после каждого посещения вам отправляется только одно уведомление! -Если вы выбрали в ваших личных данных немедленное получение уведомлений об ответе на подписанные темы, вы будете получать -письмо на e-mail при каждом ответе в эту тему. В противном случае между вашими визитами на форум будет отправляться только одно письмо для каждой подписанной темы. -Это является пределом на количество отправляемых писем. - -Отписка: --------------- -Вы можете в любое время отписаться от такой рассылки через ссылку «Подписки» в ваших личных данных. -EOF; - -$lang['subject__subs_new_topic'] = 'Уведомление о новой теме в форуме'; -$lang['subs_new_topic'] = <<, - -<#POSTER#> открыл новую тему с заголовком «<#TITLE#>» в форуме «<#FORUM#>». - ----------------------------------------------------------------------- -<#POST#> ----------------------------------------------------------------------- - -Тема находится по адресу: -<#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#> - -Если вы хотите получать уведомления об ответах в эту тему вы должны нажать на ссылку -«Подписка на тему», которая находится на странице просмотра темы или же прямо здесь, -нажав на следующую ссылку: -<#BOARD_ADDRESS#>?act=Track&f=<#FORUM_ID#>&t=<#TOPIC_ID#> - - -Отписка: --------------- - -Вы можете в любое время отписаться от такой рассылки через ссылку «Подписки» в ваших личных данных. - -Если вы не подписывались ни на какие уведомления в форумах и желаете, чтобы форум перестал посылать вам такие письма, зайдите по ссылке «Личные данные», далее «Настройки e-mail» и снимите галочку в окошке поля -«Сообщать мне обо всех изменениях, проводимых администратором форума». - -EOF; - -$lang['subject__subs_no_post'] = 'Уведомление об ответе в подписанной теме'; -$lang['subs_no_post'] = <<! - -<#POSTER#> ответил в тему «<#TITLE#>», на которую вы подписаны. - -Тема находится по адресу: -<#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#>&view=getnewpost - -Возможно, в теме гораздо больше новых ответов, но после каждого посещения темы вам отправляется только одно уведомление! -Это является пределом на количество отправляемых писем. - -Отписка: --------------- - -Вы можете в любое время отписаться от такой рассылки через ссылку «Подписки» в ваших личных данных. -EOF; - - - -$lang['email_member'] = <<! - -Вам было отправлено письмо через форум по адресу <#BOARD_ADDRESS#> -Отправитель: <#FROM_NAME#> - -<#MESSAGE#> - ---------------------------------------------------- -Администрация <#BOARD_NAME#> не несет ответственности за содержание этого письма! ---------------------------------------------------- - - -EOF; - -$lang['complete_reg'] = <<». Вы можете авторизоваться -с вашими данными и иметь полный доступ к форуму по адресу: -<#BOARD_ADDRESS#> - -EOF; - - -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_emails.php b/upload/cache/lang_cache/ru/lang_emails.php deleted file mode 100644 index dddfbd0e..00000000 --- a/upload/cache/lang_cache/ru/lang_emails.php +++ /dev/null @@ -1,73 +0,0 @@ - "Форум", -'topic_langbit' => "Тема", - -// build #003 -'send_me_message' => "Отправь мне сообщение", -'add_me_to_contact_list'=> "Добавь меня в контакт лист", -'add_link_on_page' => "Добавить ссылку на свою страницу", -'download_aol' => "Скачать AOL Instant Messenger", - -//1.2 - -'imp_text' => "ВНИМАНИЕ: Помните, что все отправляемые через эту форму письма сохраняются в специальном журнале, доступном администраторам. Мы не рекомендуем оставлять здесь конфиденциальные данные.", - -'exceeded_quota' => "Письмо не было отправлено, так как лимит отправляемых вами писем в день исчерпан. В день можно отправить не более, чем <#EXTRA#> писем.", -'exceeded_flood' => "Письмо не отправлено, так как в течение последних <#EXTRA#> минут вы уже отправляли письмо. Должно пройти время, пока вы сможете опять отправить письмо.", -'errors_found' => "Обнаружены следующие ошибки", -'no_message' => "Вы должны ввести текст письма", -'no_subject' => "Вы должны ввести заголовок письма", -'gen_error' => "Вы не авторизованы или не имеете возможность отправлять письма", -//--- - - -'msn_send_msg' => "Отправить этому пользователю сообщение в MSN", -'msn_add_contact' => "Добавить пользователя в контакт-лист в MSN", - - - -'report_title' => "Отправить жалобу модератору на это сообщение", -'report_submit' => "Отправить жалобу", -'report_message' => "Введите текст жалобы

Примечание: вам не нужно указывать здесь тему и сообщение, модератор автоматически получит эту информацию.

Пожалуйста, используйте эту возможность форума только для жалоб о некорректном сообщении! Для связи с модератором используйте личные сообщения.", -'report_topic' => "Название темы", - - -'report_subject' => "Жалоба о сообщении в", - -'report_redirect' => "жалоба успешно отправлена. Сейчас вы будете перемещены обратно в тему", - - -'title' => "Отправка письма другу", -'send_lang' => "Язык письма", -'to_name' => "Кому (имя друга):", -'redirect' => "Письмо успешно отправлено", -'to_email' => "Отправить на (e-mail):", -'submit_send' => "Отправить", -'send_email_to' => "Отправка письма для", -'message' => "Сообщение", -'show_address_text' => "Вы можете отправить письмо на e-mail этому пользователю, нажав на ссылку ниже. Форум не показывает e-mail адреса в темах, для предотвращения спама.", -'send_header' => ", заполните все поля формы, чтобы отправить e-mail для", -'member_address_title' => "E-mail адрес пользователя", -'send_title' => "E-mail форма", -'msg_txt' => "Внимание: при использовании этой формы получатель узнает ваш e-mail адрес", -'subject' => "Тема", -'email_sent_txt' => "Ваше письмо успешно отправлено для", -'email_sent' => "Письмо отправлено", - -'invite_subject' => "<#MEMBER_NAME#> отправил вам интересную ссылку", -'subs_redirect' => "Вы подписались на эту тему", -'invite_redirect' => "Письмо отправлено для ", -'sub_added' => "Ваша подписка успешно добавлена", - -'submit' => "Отправить", - -'msg' => "Введите текст письма", -'email' => "Ваш e-mail", -'name' => "Ваше имя", -'forum_jump' => "Переход по форумам", -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_error.php b/upload/cache/lang_cache/ru/lang_error.php deleted file mode 100644 index 91801219..00000000 --- a/upload/cache/lang_cache/ru/lang_error.php +++ /dev/null @@ -1,330 +0,0 @@ - "Вы ввели некорректную дату вашего рождения.", -'search_word_long' => "Строка содержит более <#EXTRA#> символов. Пожалуйста, вернитесь назад и попробуйте ввести более короткую строку.", - - -// 2.2 Edited -'member_in_add_book' => "Указанный пользователь уже находится в вашем списке", -// 2.2 -'help_no_id' => "Указанный раздел помощи не найден", -'err_attach_not_attached' => "Выбранного файла не существует", -'csite_not_enabled' => 'Портал выключен. Пожалуйста, проверьте настройки в админцентре', -'bruteforce_account_lock' => "Ваша учетная запись была заблокирована, в связи с ограниченным количеством неудачных попыток авторизации за определенный промежуток времени. <#EXTRA#>", -'md5check_failed' => "Извините, ключ авторизации не соответствует", - -'cannot_block' => "У вас недостаточно прав для блокировки личных сообщений от этого пользователя.", -'invalid_use' => "Возникла неизвестная ошибка при обработки вашего запроса. Пожалуйста вернитесь назад и попробуйте снова. Если эта ошибка возникает постоянно, свяжитесь с администратором форума", -'no_usepm_member_full' => "Это сообщения нельзя отправить, потому что личный ящик адресата полон.", - -//2.1 -'ucp_name_change' => 'Вы уже использовали все свои попытки изменять отображаемое имя за эти 24 часа.', -'topic_rate_no_perm' => 'Вам не разрешено оценивать эту тему', -'cal_no_perm' => 'Вам не разрешено просматривать этот календарь или же он попросту не существует', -'cp_admin_user' => "Вы не можете изменять профиль администраторов из этих личных данных", - -// 2.1 changed - -'no_usepm_member' => "Невозможно отправить это сообщение, так как получатель отключил свой личный ящик, или он попросту переполнен.", -'search_word_short' => "Одно или все введенные вами ключевые слова для поиска имеет менее <#EXTRA#> символов, или же вы ввели в качестве ключевого слова недопустимые к поиску слова, такие как 'html', 'img' и т.д. Вернитесь назад и увеличьте количество символов в ключевом слове, либо измените его.", - - -// 2.0 - -'erl_email' => 'Ваш e-mail адрес', -'reg_no_agree' => "Вы не отметили галочкой, что вы согласны с правилами и положениями форума. Для продолжения регистрации сделайте это. Если вы не согласны с правилами и положениями, нажмите на эту ссылку.", -'no_upload_permission' => "Вы не можете загружать файлы", - - -// добавлено в 1.2.1 - -'banned_email' => "Вам запрещено использовать этот e-mail адрес для вашей учетной записи. Используйте другой.", -'subs_no_curid' => "Сделка не состоялась, потому что идентификатор (id) текущего пакета подписок не был передан в форму для оплаты.", -'subs_no_upgrade' => "Нет пакетов для обновления!", -'subs_no_selected' => "Вы не выбрали пакета подписок. Вернитесь назад и выберите хотя бы один пакет.", -'subs_nomethod_selected' => "Вы не указали метод оплаты. Вернитесь назад и укажите метод оплаты.", -'subs_no_api' => "Невозможно определить местоположение требуемого API файла, процесс приостановлен.", -'subs_no_upgrade' => "Данный метод оплаты больше не поддерживается. Процесс приостановлен.", -'subs_fail' => "Произошла неопределенная ошибка. Код <#EXTRA#>.", -'sub_already' => "Вы уже подписаны на данный пакет и он либо оплачен, либо срок его действия пока не истек. Процесс приостановлен.", - - -'auth_no_key_not_allow' => "Вы не можете выполнять это действие, пока администратор не подтвердил вашу регистрацию", - - -// added 1.2 B3 - -'no_flash_av' => "У вас недостаточно прав для использования flash в качестве аватара, в подписи или в сообщениях", -'no_warn_max' => "Этому пользователю больше невозможно изменить рейтинг. Уровень положительного/отрицательного рейтинга предельный", - -// added 1.2 -'split_too_much' => "Нельзя выбрать все сообщения для разделения темы. По понятным причинам необходимо оставить хотя бы одно сообщение в этой теме.", - -'ml_error' => "Данная группа пользователей не отображается в списке пользователей.", -'protected_user' => "Вы не можете продолжить это действие. Данный пользователь является защищенным от таких действий.", -'warned_already' => "Этот пользователь уже предупрежден на данный момент.", -'no_mmid' => "Это неверное действие мульти-модерации.", -'del_post' => "Неверная авторизация. Вернитесь назад и попробуйте снова. Если вы неправильно обратились к данной функции, исправьте ошибку и используйте соответствующий этой функции метод.", -'stupid_beggar' => "Нельзя использовать одновременно все опции выпадающего меню. Используйте по одной. Вернитесь назад и исправьте ошибку.", -'fd_noneselected' => "Вы не выбрали ни одной директории в личном ящике для очистки. Вернитесь назад и повторите попытку.", -'cal_range_wrong' => "Дата окончания события должна быть позже даты начала события.", -'posting_off_susp' => "Вы временно лишены прав отправки сообщений. Дата и время возобновления ваших прав — <#EXTRA#>.", -'account_susp' => "Вы временно заблокированы. Дата и время разблокирования — <#EXTRA#>.", -'email_change_v' => "Вы уже ожидаете подтверждения активации. Необходимо пройти активацию, перед выполнением этого действия.", -'is_broken_link' => "Ссылка, по которой вы попали на эту страницу является «мертвой» или удаленной.", -'pass_no_match' => "Введенные вами пароли не идентичны. Вернитесь назад и повторите попытку.", -'av_no_gallery' => "Выбранная вами галерея аватаров уже не существует. Вернитесь назад и попробуйте выбрать другую.", -'no_integ' => "Этот пользователь не имеет учетной записи в IM (Integrity Messenger).", - -'file_2_big' => "Высота или ширина изображения превышает норму допустимого. Уменьшите размеры изображения и повторите попытку.", -'no_photo_selected' => "Перед продолжением вы должны указать ссылку или загрузить фотографию с компьютера.", -'photo_invalid_ext' => "Запрещено использовать такое расширение для фотографий.", - - -// Added in RC2 - -'no_help_file' => "Невозможно найти этот раздел помощи. Повторите попытку.", - - -// Added in RC1 - -'no_member_mail' => "У вас нет прав отправки из форума писем на e-mail", - -// Added in Beta 3 - -'no_vote' => "Вы не выбрали пункт, за который хотите проголосовать. Вернитесь назад и выберите один из пунктов голосования, которому хотите отдать свой голос", - -//--- End B3 additions --- - -'me_no_forum' => "Вы не имеете прав модерирования всех форумов.", - -'no_name_search_results' => "Выбранное имя пользователя не найдено. Вернитесь назад и попробуйте снова.", - -'split_not_enough' => "Для разделения, необходимо выбрать хотя бы одно сообщение!", - -'mt_not_enough' => "Необходимо выбрать более двух тем для соединения", -'mt_no_topic' => "Тема, соответствующая введенному вами URL, не обнаружена в базе данных. Дважды проверьте введенную информацию и повторите попытку.", -'mt_same_topic' => "Невозможно соединить эту же тему", - -'forum_no_post_allowed' => "Вы не можете переместить темы в этот форум, так как в нем ответы запрещены!", - - -'no_msn' => "У этого пользователя некорректное имя в MSN.", -'no_yahoo' => "У этого пользователя некорректное имя в Yahoo!", - -'cf_to_long' => "Вы ввели слишком много данных в поле «<#EXTRA#>», вернитесь назад и проверьте введенные данные", - - -'search_flood' => "Включено ограничение на повторное использование поиска. Необходимо подождать <#EXTRA#> секунд перед тем, как воспользоваться поиском снова. Это сделано для защиты сервера от атак на форум.", - -'cal_no_events' => "В эту дату событий и именинников нет. Вернитесь назад и попробуйте снова", -'cal_date_oor' => "Дата, выбранная для этого события, не соответствует действительности (к примеру нельзя выбирать 30 февраля). Вернитесь назад, проверьте введенные данные и попробуйте снова.", - -'cal_title_none' => "Необходимо ввести название события, длиной более двух символов", -'cal_title_long' => "Введенное вами название события слишком длинное. Вы должны вводить не более 64 символов", - -'reg_off' => "В данный момент регистрация на форуме отключена.", - -'offline_title' => "Форум закрыт!", -'offline_login' => "Если у вас есть права посещения форума во время его закрытия, войдите, используя форму ниже.", - -'skin_not_found' => "Выбранный вами стиль не обнаружен. Возможно администратор удалил этот стиль. Вернитесь назад и выберите другой.", - -'no_view_board' => "Вам запрещен доступ в этот форум", - -'forum_read_only' => "Этот форум только для чтения — новые темы и сообщения не принимаются.", - -'no_av_upload' => "Вы не имеете прав загрузки аватаров или фотографий на сервер", -'no_av_type' => "Запрещено загружать файлы такого типа, в качестве аватаров или фотографий", -'no_av_name' => "Загружаемый файл не имеет названия. Вернитесь назад и проверьте данные.", - -'upload_failed' => "Неудачная загрузка. Обратитесь к администрации форума для помощи.", - -'er_log_in_title' => "Сейчас вы не авторизованы. Можете сделать это, используя форму ниже.", -'erl_enter_name' => "Имя пользователя (login)", -'erl_enter_pass' => "Пароль", -'erl_log_in_submit' => "Войти!", - -'er_useful_links' => "Полезные ссылки", -'er_lost_pass' => "Восстановление забытого пароля", -'er_register' => "Регистрация нового пользователя", -'er_contact_admin' => "Связь с администрацией форума", -'er_help_files' => "Разделы помощи", - -'no_archive_messages' => "По указанным критериям личных сообщений не найдено. Расширьте критерии и повторите попытку.", - -'no_delete_post' => "Невозможно удалять первое сообщение темы. Для удаления темы, выберите «Удалить тему» в опциях модератора, в нижней части темы.", -'exp_text' => "Обнаружена ошибка. Если вам неизвестны причины ошибки, попробуйте обратиться к разделам помощи.", -'msg_head' => "Причина:", - -'auth_no_mem' => "Не найдено ни одного пользователя по введенному вами id пользователя. Дважды проверьте URL адрес, по которому вы вошли или данные, введенные в эту форму. Если ошибка будет повторяться, обратитесь к администрации форума.", -'auth_key_wrong' => "Это неверный ключ подтверждения для этого пользователя. Дважды проверьте URL, по которому вы вошли, или данные, введенные в эту форму. Если ошибка будет повторяться, обратитесь к администрации форума. Если вы проходите процедуру подтверждения не сразу, то возможно ваша учетная запись уже удалена.", -'auth_no_key' => "Неверная активация учетной записи. Дважды проверьте введенные вами данные. Если вы проходите процедуру подтверждения не сразу, то возможно ваша учетная запись уже удалена.", - -'email_addy_mismatch' => "Введенные e-mail адреса не совпадают, вернитесь назад, проверьте введенные вами данные и попробуйте снова.", - -'lp_no_pass' => "В базе не обнаружено нового пароля для этой учетной записи. Обратитесь к администрации форума для помощи.", - -'val_key_present' => "Эта учетная запись не прошла предыдущую активацию для новой регистрации, забытого пароля или изменения e-mail адреса. Перед продолжением, необходимо завершить предыдущую активацию. Если вы считаете это ошибкой, обратитесь к администрации форума для разрешения проблемы.", - -'complete_form' => "Вы должны заполнить все поля формы. Вернитесь назад, проверьте введенные данные и попробуйте снова.", - -'forum_no_access' => "Вы не имеете прав чтения этого форума. Если данный форум защищен паролем, то вы должны авторизоваться в нем, зайдя в него с главной страницы форума.", -'name_too_long' => "Введенное имя пользователя слишком длинное.", -'msg_blocked' => "Этот пользователь не желает принимать личные сообщения.", -'no_msg_title' => "Необходимо ввести заголовок письма.", -'reg_link' => "Зарегистрироваться!", -'wrong_pass' => "Введенный пароль неверный. Повторите попытку.", -'poll_no_guests' => "Гости не могут голосовать.", -'no_such_user' => "Пользователя с таким именем не существует. Вернитесь назад и дважды проверьте введенные вами данные.", -'search_no_input' => "Необходимо ввести ключевое слово для поиска!", -'stf_no_msg' => "Необходимо ввести текст письма", -'invite_no_name' => "Вы должны ввести ваше имя", -'poll_none_found' => "Невозможно найти данный опрос", -'no_search_id' => "Невозможно найти файл с этим id, повторите попытку", -'no_guest_new_topics' => "Администратор форума запретил гостям писать в этом форуме. Если вы зарегистрированы, авторизуйтесь.", -'no_user' => "Невозможно найти такого пользователя.", -'no_search_words' => "Вы не ввели ключевых слов для поиска, либо введенные вами ключевые слова содержат очень много символов.", -'invalid_login' => "Ошибка авторизации. Неверное имя пользователя или пароль. Вернитесь назад и дважды проверьте введенные вами данные. Не забывайте, что имя пользователя и пароль, чувствительны к регистру, к примеру «ПаРОлЬ» отличается от «пароль»", -'web_too_long' => "Введенный вами адрес сайта слишком длинный.", -'stf_no_email' => "Необходимо ввести e-mail адрес, на который вы хотите отправить эту страницу", -'mem_id_wrong' => "Ваш ID пользователя в неправильном формате.", -'forum_off' => "Этот форум закрыт", -'no_newer' => "Нет тем, новее этой", -'poss_hack_attempt' => "Форум предполагает, что это попытка взлома. Данное действие уже записано в журнале администратора форума и он будет уведомлен по e-mail", -'not_logged_in' => "Вы не авторизованы", -'int_too_long' => "Введенный текст ваших интересов слишком большой.", -'no_to_member' => "Такого пользователя не обнаружено в базе данных. Проверьте орфографию введенного имени.", -'invalid_ext' => "В этом форуме запрещено использовать такой формат для изображений. Правильный формат: http://www.domain.com/picture.gif, неправильный формат: http://www.domain.com/picture.one.gif", -'subject_long' => "Заголовок письма слишком длинный", -'move_already_moved' => "Это оригинал перемещенной темы и ее невозможно переместить снова. Если вы хотите переместить эту тему, переместите ее сначала в предыдущий форум.", -'cookie_error' => "Произошла ошибка cookie, авторизуйтесь снова", -'no_attach' => "В этом форуме запрещена загрузка файлов", -'no_aol' => "У этого пользователя некорректное имя в AOL", -'name_too_short' => "Введенное вами имя пользователя слишком короткое", -'missing_files' => "Некоторые требуемые файлы отсутствуют. Если вы хотели просмотреть тему, возможно эта тема перемещена или удалена. Вернитесь назад и попробуйте снова.", -'post_too_long' => "Ваше сообщение слишком длинное. Укоротите его.", -'locked_topic' => "Эта тема закрыта", -'flash_url' => "Это неверный URL для Flash", -'profile_guest' => "Не найдено такого пользователя в базе данных. Возможно пользователь удален.", -'stf_no_subject' => "Вы должны ввести заголовок письма", -'not_icq_number' => "У этого пользователя некорректный номер ICQ", -'rp_noemail' => "Необходимо ввести корректный e-mail адрес для отправки этого сообщения", - -'upload_to_big' => "Размер загружаемого файла превышает норму, установленную администратором для вашей группы.", - - -'user_exists' => "У нас уже есть пользователь с таким именем. Выберите другое имя.", -'no_msg_chosen' => "Вы не выбрали ни одного письма. Вы можете выбрать письма, отметив окошки с правой стороны каждого письма", -'error_back' => "Вернуться назад", -'log_in_yes' => "Вы вошли как ", -'flash_number' => "Высота и ширина для Flash должны быть численными", -'no_avatar' => "Администратор запретил использование аватаров на форуме.", -'poll_you_voted' => "Вы уже проголосовали в этом опросе", -'not_url_photo' => "Это неверный URL для вашей фотографии. Динамические страницы в тегах IMG запрещены", -'no_action' => "Не регулируйте сгенерированные URL. Вернитесь назад и попробуйте снова.", -'no_guest_posting' => "Администратор запретил гостям писать в этом форуме. Если вы уже зарегистрированы, войдите", -'invalid_email' => "Необходимо ввести СУЩЕСТВУЮЩИЙ e-mail адрес", -'no_start_polls' => "Вы не можете создавать опросы", -'move_no_forum' => "Вы не выбрали форум для перемещения", -'no_use_messenger' => "Вам запрещено использовать личные сообщения на форуме", -'no_msg' => "Вы должны ввести текст письма", -'no_dynamic' => "Использование [IMG] тегов для динамических страниц запрещено", -'no_rules_show' => "Нет правил для этого форума", -'membername_none' => "Не найдена учетная запись с таким именем пользователя", -'log_in_now' => "Войти!", -'no_subject' => "Вы не ввели заголовок письма", -'pass_too_long' => "Введенный пароль слишком длинный", -'username_short' => "Введенное вами имя пользователя слишком короткое", -'already_sub' => "Вы уже подписаны на эту тему или форум.", -'forgot_pass' => "Забыли пароль?", -'no_older' => "Нет тем, старее этой", -'stf_no_name' => "Вы должны ввести имя человека, кому отправляете эту страницу", -'no_view_topic' => "У вас нет прав просмотра этой темы", -'IBForums_error' => "Ошибка форума", -'no_replies' => "У вас нет прав публиковать ответ в эту тему", -'error_title' => "Сообщение форума", -'no_chosen_member' => "Вы не ввели или не выбрали имя для отправки сообщения!", -'pass_blank' => "Вы не ввели пароль", -'flood_control' => "На форуме включена блокировка массовых сообщений (для предотвращения возможных атак на сервер), необходимо подождать <#EXTRA#> секунд для публикации повторного ответа в тему или открытия новой темы", -'no_message' => "Вы не ввели текст письма", -'posting_off' => "Вам запрещено отправлять сообщения", -'move_same_forum' => "Невозможно переместить тему в тот же форум", -'error_txt' => "Произошла ошибка", -'rp_nomsg' => "Вы должны ввести текст жалобы для модератора", -'too_many_images' => "Количество изображений в вашем сообщении, превышает норму допустимого", -'invite_no_email' => "Вы должны ввести свой e-mail адрес", -'not_op' => "У вас нет прав редактирования этого сообщения", -'no_poll_reply' => "Автор опроса, создал эту тему только для голосований", -'request_hack' => "Некоторые данные не соответствуют нашим записям. Это действие рассмотрено, как попытка взлома!", -'photo_too_long' => "Поле фотографии слишком длинное.", -'avatar_invalid_ext' => "Это неверное расширение файла", -'no_reply_polls' => "Вы не можете голосовать в этом опросе", -'no_post' => "Вы должны ввести сообщение", -'calendar_not_all' => "Полностью заполните дату рождения, либо вообще ничего не заполняйте, так как невозможно обрабатывать частично введенные данные.", -'not_authorised' => "Ваша учетная запись пока не активирована. Проверьте e-mail, указанный вами при регистрации.", -'no_email_stored' => "Данный e-mail адрес не найден в нашей базе данных", -'topictitle_too_long' => "Введенное вами название темы слишком длинное", -'no_such_msg' => "Такого сообщения не существует", -'wrong_name' => "Невозможно найти имя пользователя, соответствующее введенному вами имени (возможно это ошибка сессии или авторизации).", -'too_many_emoticons' => "Количество смайлов в вашем сообщении превышает норму. Уменьшите количество смайлов в сообщении", -'no_topic_title' => "Вы должны ввести название темы", -'guest_abuse' => "Невозможно определить статус вашего сообщения. Войдите заново, либо — если вы гость, попробуйте отправить сообщение снова", -'password_no_match' => "Пароль не соответствует введенным данным", -'already_logged_in' => "Этот пользователь уже авторизован!", -'no_guests' => "Эта функция запрещена для гостей", -'no_permission' => "У вас нет доступа к этой странице или функции. Если вы не авторизованы, можете сделать это, используя форму ниже, а затем попробовать снова.", -'server_too_busy' => "Сервер не может в данное время выполнить ваш запрос. Попробуйте позже.", -'loc_too_long' => "Введенное вами место жительства слишком длинное.", -'poll_you_created' => "Вы автор этого опроса", -'go_back' => "Вернитесь назад и исправьте ошибку", -'log_in_no' => "Вы НЕ авторизованы", -'pass_too_short' => "Введенный вами пароль слишком короткий", -'no_register' => "Регистрация отключена", -'move_no_topic' => "Этой темы нет в нашей базе данных, либо она была удалена", -'flash_too_big' => "Ширина или высота, либо оба размера Flash ролика, добавленного вами в сообщение, превышают норму", -'end_subs_value' => "Вы должны ввести числовые данные в поле «Окончание подписки»", -'no_starting' => "У вас нет прав открытия тем в этом форуме", -'no_search_forum' => "Вы не указали ни одного форума для поиска, либо вы указали защищенный паролем форум. Если это так, то вам необходимо авторизоваться в запароленном форуме, прежде чем вы сможете воспользоваться поиском там.", -'not_registered' => "Гостям запрещено использовать это действие. Если вы зарегистрированы, авторизуйтесь", -'no_icq' => "У этого пользователя некорректный номер ICQ", -'not_aol_name' => "Это неверное имя в AOL", -'private_email' => "Этот пользователь скрыл свой e-mail адрес", -'user_agent_no_match' => "Вы используете не тот компьютер, с которого авторизовывались.", -'poll_add_vote' => "Голосовать!", -'you_are_banned' => "Вы заблокированы на этом форуме", -'incorrect_use' => "Некорректный запрос. Вернитесь назад и попробуйте снова", -'no_search_results' => "По вашему запросу ничего не найдено. Расширьте критерии поиска и попробуйте снова.", -'request_error' => "Произошла ошибка. Ссылка, по которой вы вошли является неполной. Проверьте вашу ссылку на целостность. Это могло произойти, так как некоторые серверы e-mail обрезают длинные ссылки. Повторите попытку.", -'not_yahoo_name' => "Это некорректное имя в YAHOO", -'stf_invalid_email' => "Введенный вами e-mail адрес имеет неправильный формат", -'pass_link' => "Нажмите сюда!", -'no_email' => "Вы должны ввести e-mail адрес для запроса деталей авторизации", -'max_message_from' => "Ваш ящик с личными сообщениями переполнен. Вы достигли максимального количества личных сообщений на форуме. Вам нужно что-то удалить.", -'cant_use_feature' => "Вам запрещено использование этой функции форума", -'memid_too_long' => "Поле id пользователя слишком длинное", -'moderate_no_permission' => "Вам запрещено использование этой функции", -'too_many_img' => "Количество изображений превышает норму допущенного", -'no_sub_id' => "Невозможно найти подписку на тему", -'max_message_to' => "Ящик с личными сообщениями переполнен, он не может принимать новые личные сообщения.", -'error_not_registered' => "Не зарегистрированы? ", -'username_long' => "Введенное имя пользователя слишком длинное", -'memid_too_short' => "Поле id пользователя слишком короткое", -'sig_too_long' => "Ваша подпись слишком длинная.", -'no_username' => "Вы должны ввести имя пользователя", -'no_avatar_selected' => "Не выбрано ни одного аватара. Вернитесь назад и исправьте ошибку.", -'incorrect_avatar' => "Это неправильный аватар", -'avatar_invalid_url' => "Введенный URL для вашего аватара имеет некорректный формат, либо ссылка является «мертвой».", -'rp_noname' => "Вы должны ввести ваше имя перед отправкой этого сообщения", -'illegal_img_ext' => "Запрещено использовать такое расширение для тегов картинок", -'cannot_remove_dir' => "Невозможно удалить эту директорию", -'email_exists' => "Данный e-mail адрес не может быть использован, так как такой e-mail уже существует", -'please_complete_form' => "Заполните все поля, перед подачей запроса", -'invite_no_email_f' => "Вы должны ввести e-mail адрес друга", -'move_no_source' => "Не выбран исходящий форум", -'log_in' => "Не авторизованы?", -'data_incorrect' => "Одно из полей содержит неправильные данные. Проверьте дважды введенные вами URL или данные", -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_forum.php b/upload/cache/lang_cache/ru/lang_forum.php deleted file mode 100644 index d3ea115b..00000000 --- a/upload/cache/lang_cache/ru/lang_forum.php +++ /dev/null @@ -1,142 +0,0 @@ - "из других страниц", -'remember_options' => "Запомнить эти параметры", - -// 2.1.2 -'multipage_alt' => "Переход по страницам", - -// 2.1: НОВОЕ - -'forum_options' => 'Опции форума', -'moderator_options' => 'Опции модератора', -'js_clickhold' => 'Нажмите и держите для изменения заголовка', - -// 2.1 CHANGED - -'mark_as_read' => "Отметить этот форум прочитанным", -'mark_as_read2' => "Отметить этот форум прочитанным и вернуться на главную", - - -'announce_row' => "Объявление", -'mod_showallinvisible' => 'Показать все скрытые темы', -'mod_showallposts' => 'Показать все темы со скрытыми сообщениями', -'mod_resync' => 'Синхронизировать форум', -'mod_prune' => 'Удаление / массовое перемещение', - -'click_for_mod' => 'Для выбора этой темы для модерирования нажмите сюда', - -'back_to_forum' => 'Вернуться в форум', -'cpt_close' => "Закрыть", -'cpt_open' => "Открыть", -'cpt_pin' => "«Поднять»", -'cpt_unpin' => "«Опустить»", -'cpt_move' => "Переместить", -'cpt_delete' => "Удалить", -'cpt_merge' => "Соединить", -'cpt_approve' => "Опубликовать", -'cpt_unapprove' => "Скрыть", -'f_go' => "отмеченные темы", -'cp_js_delete' => "Вы действительно хотите удалить эти темы?", -'mm_title' => "Мульти-модерация", -'topic_attach' => 'прикрепленные файлы: Просмотр', -'attach_title' => 'Прикрепление', -'attach_size' => 'Размер', -'attach_post' => 'Сообщение №', -'attach_page_title' => "Прикрепления", -'attach_post_date' => 'Добавлено', - -'pinned_start' => "Важные темы", -'regular_topics' => "Темы форума", -'announce_start' => "Объявления", - -'ft_title' => "Подписаться на форум", - -'active_users_detail' => "гостей: %s, скрытых пользователей: %s", -'active_users_title' => "%s чел. просматривают этот форум", -'active_users_members' => "Пользователей: %s", - - -'enter_keywords' => "Ключевое слово", -'search_forum' => "Найти в этом форуме", - - -'pm_open_new' => "Открытая тема (есть новые ответы)", -'pm_open_no' => "Открытая тема (нет новых ответов)", -'pm_hot_no' => "Горячая тема (нет новых ответов)", -'pm_hot_new' => "Горячая тема (есть новые ответы)", -'pm_poll' => "Опрос (есть новые голоса)", -'pm_poll_no' => "Опрос (нет новых голосов)", -'pm_locked' => "Закрытая тема", -'pm_moved' => "Тема перемещена", - -'last_post_by' => "Посл. сообщение:", - -'h_topic_title' => "Название темы", -'last_updated' => "Последнее обновление:", -'logged_in' => "Вы успешно авторизовались в этом форуме", -'forum_jump' => "Переход по форумам", -'re_order_forum' => "Сортировка этого форума", -'h_last_action' => "Последнее сообщение", -'no_topics' => "Не найдено ни одной темы. Возможно в этом форуме нет тем, либо они более стары и не соответствуют текущей сортировке.", -'topic_sp_pages' => "Страницы", - - -'show_today' => "За: сегодня", -'show_5_days' => "За: 5 дней", -'show_15_days' => "За: 15 дней", -'show_25_days' => "За: 25 дней", -'show_20_days' => "За: 20 дней", -'show_10_days' => "За: 10 дней", -'show_60_days' => "За: 60 дней", -'show_30_days' => "За: 30 дней", -'show_90_days' => "За: 90 дней", -'show_year' => "За: 365 дней", -'show_all' => "За: все время", -'show_7_days' => "За: 7 дней", - - -'sort_by_date' => "По: последн. сообщению", -'sort_by_last_poster' => "По: последн. автору", -'sort_by_poster' => "По: автору темы", -'sort_by_replies' => "По: ответам", -'sort_by_topic' => "По: названиям темы", -'sort_by_start' => "По: дате открытия", -'sort_by_attach' => "По: присоединениям", -'sort_by_views' => "По: просмотрам", - -'descending_order' => "Я-А", -'ascending_order' => "А-Я", - -'topicfilter_all' => 'Темы: Все', -'topicfilter_open' => 'Темы: Открытые', -'topicfilter_hot' => 'Темы: Горячие', -'topicfilter_poll' => 'Темы: Опросы', -'topicfilter_locked' => 'Темы: Закрытые', -'topicfilter_moved' => 'Темы: Перемещенные', -'topicfilter_istarted' => 'Темы: Созданные мною', -'topicfilter_ireplied' => 'Темы: С моими ответами', - -'single_page_forum' => " ", -'h_topic_starter' => "Автор", -'f_pass_submit' => "Войти", - -'enter_pass' => "Пароль форума", - -'need_password' => "Введите пароль форума", - -'need_password_txt' => "Этот форум защищен паролем!
Вы должны ввести верный пароль для доступа в этот форум. Проверьте и убедитесь, что ваш браузер поддерживает временные cookies.", - -'topic_started_on' => "Тема создана:", - -'h_replies' => "Ответов", - -'multi_page_forum' => "Страниц:", -'h_hits' => "Просмотров", - -'sort_submit' => "ок", - -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_global.php b/upload/cache/lang_cache/ru/lang_global.php deleted file mode 100644 index c7fa0965..00000000 --- a/upload/cache/lang_cache/ru/lang_global.php +++ /dev/null @@ -1,298 +0,0 @@ - "Загрузка...", - -//2.2 - -'gbl_forum_search' => "Искать только в этом форуме?", -'gbl_more_search' => "Дополнительные параметры", -'gbl_auto_close' => "(Сообщение закроется через 2 секунды)", -'gbl_my_friends' => "Друзья", -'gbl_sitemsg_header' => 'Сообщение сайта', -'gbl_gd_reload' => 'Нажмите сюда для генерации нового изображения', -'submenu_albums' => "Альбомы", - -//2.1.4 - for IDM when released -'idm_header' => "Файловый архив", - -//2.1.3 -'ajax_topicstate' => "Измененное состояние темы (открыта/закрыта) при просмотре форума", -'ajax_topicdesc' => "Изменено описание темы при просмотре форума", -'ajax_topictitle' => "Изменен заголовок темы при просмотре форума", - -// For BBCODE -'bbcode_wrap_html' => "HTML", -'bbcode_wrap_sql' => "SQL", -'bbcode_wrap_quote' => "Цитата", -'bbcode_wrap_code' => "Код", -'bbcode_img_alt' => "Изображение", - -// registered -'licensed_to' => "Лицензия зарегистрирована на: ", - - -//2.1.2 -'mailto_erroronforums' => "Ошибка на форумах", -'stats_sec' => "сек.", -'stats_queries' => "запросов", -'myass_chars' => "Вы ввели слишком мало символов для поиска", -'global_guestname' => "Гость", - -//2.1.2 - LOFI Additions -'lofi_noperm' => "Вы не имеете доступ к просмотру этой страницы", -'lofi_attach' => "Нажмите для просмотра прикрепленного файла", -'lofi_fullversion' => "Полная версия этой страницы: ", -'lofi_maintext' => "Для просмотра полной версии этой страницы, пожалуйста, ", -'lofi_clickhere' => "пройдите по ссылке", -'lofi_posts' => "сообщений", -'lofi_replies' => "ответов", -'lofi_please' => "Страницы:", -'lofi_pinned' => 'Важно: ', -'lofi_moved' => 'Перемещено: ', - -//2.1 - -'global_unregistered' => "Гость", -'global_open_menu' => "Открыть меню", -'global_pm_title' => 'Новое личное сообщение', -'global_pm_sent' => 'Отправлено', -'global_pm_read' => 'Прочитать', -'global_pm_from' => 'От', -'global_page_jump' => 'Перейти к странице', -'ajax_loading_msg' => 'Загрузка. Пожалуйста, подождите...', -'au_reading' => '(%s) — читает', -'au_posting' => '(%s) — отвечает', - - -'global_forum_title' => "Форумы", -'rss_calendar' => 'Календарь:', -'myass_title' => 'Помощник', -'myass_drag' => 'Нажмите и задержите для перемещения этого окна', - -'time_seconds_ago' => '%s секунд назад', -'time_less_minute' => 'минуту назад', -'time_minutes_ago' => '%s минут назад', -'time_less_hour' => 'час назад', -'time_hours_ago' => '%s часов назад', -'time_less_day' => 'день назад', -'time_days_ago' => '%s дней назад', -'time_less_week' => 'неделю назад', -'time_weeks_ago' => '%s недель назад', - - -// build #003 -'program_code' => "Код", -'list' => "Список", -'queries' => "запросов", -'sec' => "сек.", - -//2.0.2 -'blog' => "Блоги", -'myblog' => "Ваш блог", - -//2.0 - -'pmp_title' => "Вам новое личное сообщение от", -'pmp_read_in_window' => "Открыть в этом окне", -'pmp_read_new_window' => 'Открыть в новом окне', -'pmp_part1' => ', пользователь группы', -'pmp_part2' => ', имеет', -'pmp_part3' => 'сообщений на форуме.', - -'global_lofi' => "Текстовая версия", -'global_timeisnow' => "Сейчас", -'global_skinselector' => "Выбор стиля", -'global_language' => "Язык", -'gallery' => "Галерея", -'time_today' => "Сегодня", -'time_yesterday' => "Вчера", -'tpl_gotolast' => 'На последнюю страницу', -'tpl_gotofirst' => 'На первую страницу', -'tpl_next' => "Следующая страница", -'tpl_prev' => "Предыдущая страница", -'resend_val' => 'Проблемы с активацией?', -'email_address' => 'E-mail адрес', - -//rc1 - -'fj_redirect' => " (Переадресация форума)", -'tb_toplist' => "Топ", - -//Добавлено в 1.2 - -'tpl_jump' => "Перейти на страницу", -'tpl_q1' => "Введите номер страницы, на которую хотите перейти.", -'tpl_pages' => "страниц", - -'sf_bytes' => " байт", -'sf_mb' => " мегабайт", -'sf_k' => " килобайт", - -'bi_markread' => "Отметить форум прочитанным?", -'bi_markallread' => "Отметить все подфорумы прочитанными?", -'err_select' => "Выбрать все", - -'err_title' => "Данные сообщения успешно сохранены!", -'err_expl' => "Данные следующего сообщения успешно сохранены. Иногда случается, что при нажатии на кнопку «Назад» заполненные в поля данные теряются, поэтому вы можете скопировать текст и только потом вернуться на предыдущую страницу.", - -'bbc_help' => 'BB-коды', - -'ml_revalidate' => "Отправка письма для активации повторно", -'tt_golast' => "К последнему сообщению", -'tt_gounread' => "К первому непрочитанному сообщению", -'tt_poll_vote' => "Проголосуйте в опросе", -'tt_poll_null' => "Просмотр результатов (вы будете лишены права голоса)", -'tt_poll_show' => "Просмотр результатов (перед добавлением вашего голоса)", -'tt_poll_svote' => "Вернуться назад и просмотреть ответы опроса", - - -'mb_disabled' => "Это меню отключено", - -'sj_title' => 'Перейти на сайт', -'sj_home' => 'Главная страница', -'sj_search' => 'Поиск', -'sj_help' => 'Помощь', -'er_links' => "Ссылки", - -// Добавлено в 1.1a - -'live_chat' => "Чат", - -// Добавлено в B3 - -'fj_subforums' => 'подфорумы', -'ps_page' => "Страницы:", -'ps_first' => 'Первая', -'ps_last' => 'Последняя', -'ps_next' => 'Следующая', -'ps_previous' => 'Предыдущая', - -//--- End B3 additions --- - -'mod_cp' => "Панель модератора", - -'tb_help' => "Помощь", -'tb_search' => "Поиск", -'tb_mlist' => "Пользователи", -'tb_calendar' => "Календарь", - -'gzip_on' => "GZIP включен", -'gzip_off' => "GZIP выключен", - -'l_qb' => 'Помощник', -'view_new_posts' => "Новые сообщения", - -'your_cp' => "Личные данные", - - -'bb_tool_tip' => "Обзор новых сообщений со времени вашего последнего посещения, список администраторов и т.д.", -'cp_tool_tip' => "Изменение личных данных, работа с личными сообщения и т.д.", - - -'find_user_names' => "Поиск по именам", -'opens_new_window' => "(открыть в новом окне)", - - -'warn_offline' => "(Offline)", - -'all_emoticons' => "Показать все", - -'jmp_go' => "ОК", -'forum_jump' => "Переход по форумам", - -'yes' => "Да", -'no' => "Нет", - -'ct_size' => "РАЗМЕР", -'ct_lrg' => "Большой", -'ct_sml' => "Маленький", -'ct_lest' => "Огромный", - -'ct_font' => "ШРИФТ", -'ct_arial' => "Arial", -'ct_times' => "Times", -'ct_courier' => "Courier", -'ct_impact' => "Impact", -'ct_geneva' => "Geneva", - -'ct_color' => "ЦВЕТ", -'ct_blue' => "Синий", -'ct_red' => "Красный", -'ct_purple' => "Фиолетовый", -'ct_orange' => "Оранжевый", -'ct_yellow' => "Желтый", -'ct_grey' => "Серый", -'ct_green' => "Зеленый", - -'msg_full' => "Ящик с личными сообщениями ПЕРЕПОЛНЕН!", - -'ba_edit' => "Изменить", -'ba_delete' => "Удалить", - -'submit_li' => "Войти", -'quote_text' => "Цитата", -'pass' => "Пароль", -'thanks' => "Спасибо", -'forum_read' => "Форум отмечен прочитанным", -'guest_stuff' => "Здравствуйте, гость", -'offline_title' => "Форум закрыт", -'you_last_visit' => "Ваше последнее посещение:", -'code_sample' => "Образец кода", -'transfer_you' => "Подождите, сейчас вы будете перемещены.", -'new_posts' => "Новые сообщения", -'admin_login' => "Вход администратора", -'you_running_time' => "Ваше последнее действие:", -'admin_cp' => "Админцентр", - -'M_1' => "Январь", -'M_2' => "Февраль", -'M_3' => "Март", -'M_4' => "Апрель", -'M_5' => "Май", -'M_6' => "Июнь", -'M_7' => "Июль", -'M_8' => "Август", -'M_9' => "Сентябрь", -'M_10' => "Октябрь", -'M_11' => "Ноябрь", -'M_12' => "Декабрь", - -'Jan' => 'янв', -'Feb' => 'фев', -'Mar' => 'марта', -'Apr' => 'апр', -'May' => 'мая', -'Jun' => 'июня', -'Jul' => 'июля', -'Aug' => 'авг', -'Sem' => 'сен', -'Oct' => 'окт', -'Nov' => 'ноя', -'Dec' => 'дек', - -'D_0' => "Воскресенье", -'D_1' => "Понедельник", -'D_2' => "Вторник", -'D_3' => "Среда", -'D_4' => "Четверг", -'D_5' => "Пятница", -'D_6' => "Суббота", - - - -'name' => "Имя", -'register' => "Регистрация", -'logged_in_as' => "Вошли как: ", - -'msg_new' => "Личных сообщений: %s", -'offline' => "Форум временно закрыт", -'log_out' => "Выход", -'dont_wait' => "Или нажмите сюда, если не хотите ждать", -'stand_by' => "Подождите.", -'your_messenger' => "Личные сообщения", -'log_in' => "Вход", -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_help.php b/upload/cache/lang_cache/ru/lang_help.php deleted file mode 100644 index e3867c43..00000000 --- a/upload/cache/lang_cache/ru/lang_help.php +++ /dev/null @@ -1,19 +0,0 @@ - "Просмотр выбранного раздела или поиск", -'results_title' => "Результаты поиска", -'choose_file' => "Выберите раздел", -'help_txt' => "Выберите нужный раздел из списка", -'submit' => "Найти!", -'search_txt' => "Введите ключевые слова для поиска", -'search_results' => "Результаты поиска", -'results_txt' => "Результаты поиска.", -'help_topics' => "Разделы помощи по форуму", -'no_results' => "Не найдено ни одного раздела, соответствующего вашему запросу. Вернитесь назад и попробуйте снова.", -'help_topic' => "Разделы помощи", -'page_title' => "Поиск по разделам помощи", - -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_javascript.js b/upload/cache/lang_cache/ru/lang_javascript.js deleted file mode 100644 index 17b0949a..00000000 --- a/upload/cache/lang_cache/ru/lang_javascript.js +++ /dev/null @@ -1,64 +0,0 @@ -/** -* Языковой файл JS: Русский -*/ - -var message_pop_up_lang = -{ - // СТАНДАРТНЫЕ - 'error' : 'Найдены ошибки', - 'no_permission' : 'У вас нет прав для выполнения этого действия', - 'cannot_cont' : 'Невозможно продолжить', - 'settings_updated' : 'Настройки обновлены', - - // Дополнительные ошибки: - 'pp_date_error' : 'Вы должны указать полную дату рождения', - 'pp_comment_error' : 'Вы не можете публиковать пустые комментарии', - 'pp_friend_exist' : 'Указанный пользователь не существует', - 'pp_friend_already' : 'Этот пользователь уже находится в вашем списке друзей', - 'pp_friend_removed' : 'Друг удален', - 'pp_icq_error' : 'Номер ICQ должен содержать только цифры', - - // Добавление друзей: - 'pp_friend_added' : 'Этот пользователь был добавлен в ваш список друзей!', - 'pp_friend_added_mod' : 'Ваш друг должен одобрить ваш запрос', - 'pp_friend_approved' : 'Запрос одобрен', - - // Обновление комментариев - 'pp_comments_updated' : 'Комментарии обновлены', - 'pp_comment_added_mod' : "Комментарии должны быть подтверждены перед выводом", - - // Модуль опроса - 'already_voted' : 'Вы уже проголосовали', - - // Модуль записей - 'rating_updated' : 'Ваш рейтинг обновлен', - 'rating_added' : 'Ваш рейтинг добавлен', - 'rating_already' : 'Вы уже проголосовали за эту запись' -}; - -/** -* Global stuff -*/ - -var ipb_global_lang = -{ - // ОШИБКА - 'post_upload_not_empty' : 'У вас есть элемент для загрузки. Нажмите «ЗАГРУЗИТЬ» для загрузки или «OK» для продолжения без загрузки файла.', - // РЕДАКТОРЫ - 'editor_enter_url' : 'Пожалуйста, введите полный URL адрес', - 'editor_enter_title' : 'Пожалуйста, введите заголовок для этого пункта', - 'editor_enter_email' : 'Пожалуйста, введите e-mail адрес', - 'editor_enter_image' : 'Пожалуйста, введите URL адрес для этого изображения', - 'editor_enter_list' : 'Введите пункт списка', - // ОСНОВНОЕ - 'general_error' : 'Ошибка', - 'general_ok' : 'OK', - 'image_resized' : 'Уменьшено: <%1>% от [ <%2> на <%3> ] — нажмите для просмотра полного изображения', - 'image_attach_percent' : 'Уменьшено до <%1>%', - 'image_attach_no_percent' : 'Изображение уменьшено', - 'image_attach_dims' : '<%1> x <%2>', - 'image_attach_size' : ' (<%1>)', - 'click_to_view' : 'Нажмите для просмотра полного изображения', - 'view_full_size' : 'Просмотр полного размера изображения', - 'visit_my_website' : 'Посетить мою домашнюю страницу' -}; \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_legends.php b/upload/cache/lang_cache/ru/lang_legends.php deleted file mode 100644 index 4cc18eec..00000000 --- a/upload/cache/lang_cache/ru/lang_legends.php +++ /dev/null @@ -1,36 +0,0 @@ - "Список элементов", -'bbc_helloworld' => "Привет, мир", -'bbc_testpage' => "Тестовая страница", - -'bbc_ex1' => "Пример", -'bbc_ex2' => "Нажмите сюда!", -'bbc_title' => "BB коды форума", -'bbc_intro' => "Что такое BB коды форума?

Они предназначены для быстрого добавления различного форматирования текстов сообщений.
Ниже представлено описание этих кодов.", -'bbc_before' => "До", -'bbc_after' => "После", - -'emo_title' => "Смайлы", -'emo_type' => "Код", -'emo_img' => "Картинка", - -'fu_title' => "Поиск пользователей", -'fu_close_win' => "Закрыть окно", -'fu_enter_name' => "Введите имя пользователя (полностью или частично)", -'fu_search_but' => "Найти!", - -'fu_error' => "Ошибка", - -'fu_no_data' => "Вы обязаны ввести имя пользователя", -'fu_no_match' => "По вашему запросу ничего не найдено", -'fu_kc_loads' => "Найдено слишком большое количество данных. Они не будут отображены. Вам необходимо вводить более точный запрос", -'fu_back' => "Назад", -'fu_add_mem' => "Добавить пользователя в поле", -'fu_add_desc' => "Выберите имя из выпадающего меню и нажмите на кнопку, для добавления в поле", - -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_login.php b/upload/cache/lang_cache/ru/lang_login.php deleted file mode 100644 index 23d26ab0..00000000 --- a/upload/cache/lang_cache/ru/lang_login.php +++ /dev/null @@ -1,70 +0,0 @@ - "Ваша учетная запись будет автоматически разблокирована через %s минут", - -#2.1 -'form_title_attention' => "Внимание!", -'wrong_auth' => "Имя пользователя и пароль неверны", - -// build #003 -'attention' => "Внимание!", - -'logged_in' => "Вы успешно авторизовались и сейчас будете перемещены на главную страницу форума", -'not_logged_in' => "Вы не авторизовались и сейчас будете перемещены на страницу авторизации", - -'reg_log_in' => "Вы зарегистрировались и авторизовались и сейчас будете перемещены на главную страницу форума", -'reg_not_log_in' => "Вы зарегистрировались и сейчас будете перемещены на страницу авторизации", - -'email_log_in' => "Ваш e-mail адрес успешно изменен. Сейчас вы будете перемещены на главную страницу форума.", -'email_not_log_in' => "Ваш e-mail адрес успешно изменен. Сейчас вы будете перемещены на страницу авторизации", - -'pass_log_in' => "Ваш пароль успешно изменен. Сейчас вы будете перемещены на главную страницу форума.", -'pass_not_log_in' => "Ваш пароль успешно изменен. Сейчас вы будете перемещены на страницу авторизации.", - -'need_validation' => "Вы еще не активировали свою учетную запись!
Перед авторизацией на форуме, проверьте свою электронную почту, на которую вам было отправлено письмо с инструкцией по активации учетной записи.
Отправить письмо для активации повторно?", - -'login_text' => "Пройти авторизацию могут только зарегистрированные пользователи.
Если вы не зарегистрированы, сделайте это, нажав на ссылку «Регистрация» в верхней части форума.", - -'force_login' => "Доступ в форум установлен только зарегистрированным пользователям", -'wrong_name' => "Невозможно найти пользователя с введенными вами данными.", -'please_log_in' => "Введите ниже ваши данные для авторизации", -'cookie_no' => "Нет", - -'options' => "Опции", -'wrong_pass' => "Неверный пароль. Все пароли чувствительны к регистру", -'admin_force_log_in' => "Доступ в форум установлен только зарегистрированным пользователям", -'log_in_submit' => "Войти!", - -'add_name' => "Да, добавить меня к списку активных пользователей", -'errors_found' => "Обнаружены следующие ошибки:", -'thanks_for_logout' => "Вы вышли", - -'forgot_pass' => "Забыли пароль?", - -'thanks_for_login' => "вы вошли как:", - -'log_out' => "Выход", - -'enter_name' => "Имя пользователя (login)", -'enter_pass' => "Пароль", -'enter_email' => "E-mail", - -'rememberme' => "Запомнить вас на этом компьютере?", -'notrecommended' => "Если поставить галочку, вы будете входить в форум автоматически, без ввода пароля. Это может быть небезопасно, если этим компьютером пользуетесь не только вы.", -'form_invisible' => "Скрытность", -'anon_name' => "Не отображать вас в списке активных пользователей?", - -'pass_link' => "Вы можете его восстановить!", - -'privacy' => "Скрытность, хотите быть видимым в списке активных пользователей?", - -'cookie_yes' => "Да", -'blank_fields_user' => "Перед продолжением, введите ваше имя пользователя и пароль", -'blank_fields_email' => "Перед продолжением, введите ваш e-mail адрес и пароль", -'log_out_submit' => "Выйти", -'log_in' => "Вход", -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_mlist.php b/upload/cache/lang_cache/ru/lang_mlist.php deleted file mode 100644 index fb20706c..00000000 --- a/upload/cache/lang_cache/ru/lang_mlist.php +++ /dev/null @@ -1,90 +0,0 @@ - "Рейтинг", - -'m_dd_views' => 'количеству просмотров профиля', -'m_gender_s' => "Пол", -'m_gender_a' => "Любой", -'m_gender_m' => "Мужской", -'m_gender_f' => "Женский", - -'m_rating' => "Рейтинг", -'m_rating_morethan' => "Более, чем", - -'m_views' => "Просмотров", -'m_view_profile' => "Просмотр профиля", -'m_remove_friend' => "Удалить из друзей", -'m_add_friend' => "Добавить в друзья", -'m_send_message' => "Отправить сообщение", -'m_find_posts' => "Найти сообщения пользователя", - -// build #003 -'menshe_chem' => "меньше, чем", -'bolshe_chem' => "больше, чем", - -'button_quickjump' => 'Имена начинаются с', -'toggle_more' => 'Дополнительные параметры', -'s_aim' => 'AIM содержит', -'s_yahoo' => 'Yahoo! содержит', -'s_icq' => 'ICQ содержит', -'s_msn' => 'MSN содержит', - -'s_posts' => 'Сообщений', -'s_joined' => 'Дата регистрации', -'s_lastpost' => 'Дата последнего сообщения', -'s_lastvisit' => 'Последний визит', - -'photo_only' => "Только с фотографией", - -'s_signature' => 'Подпись содержит', - -'s_homepage' => 'Домашняя страница содержит', - -'s_name' => 'Имя пользователя', - -'s_dateformat' => '(ММ-ДД-ГГГГ)', -'title_search' => "Фильтры поиска", -'title_messengers' => 'Пейджеры', -'title_date' => 'Сортировка по сообщениям и датам', -'title_options' => "Дополнительные параметры", -'s_morethan' => 'позднее, чем', -'s_lessthan' => 'ранее, чем', -'s_begins' => "начинается с", -'s_contains' => "содержит", -'s_any' => 'Любое', - - -//добавлено 1.2 - -'member_photo' => "Фото", - - -'qs_go' => "ок!", -'pages' => "Страниц:", -'no_results' => 'Нет результатов', - - - -'member_group' => "Группа", - -'sort_by_name' => "имени пользователя", -'member_joined' => "Регистрация", - -'sorting_text' => "<#FILTER#>, сортировать по <#SORT_KEY#> в порядке <#SORT_ORDER#> с <#MAX_RESULTS#> результатами за страницу", -'member_name' => "Имя", -'member_posts' => "Сообщений", -'multi_pages' => "Несколько страниц", -'sort_by_posts' => "количеству сообщений", -'descending_order' => "убывания", -'ascending_order' => "возрастания", -'show_admin' => "Администраторы", -'member_level' => "Уровень", -'sort_submit' => "ОК!", -'show_all' => "Все пользователи", -'member_email' => "E-mail", -'sort_by_joined' => "дате регистрации", -'page_title' => "Список пользователей", -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_mod.php b/upload/cache/lang_cache/ru/lang_mod.php deleted file mode 100644 index f771b10b..00000000 --- a/upload/cache/lang_cache/ru/lang_mod.php +++ /dev/null @@ -1,276 +0,0 @@ - "Заметка добавлена", -'mod_warn_note' => "Уровень предупреждений не изменен", -'mod_warn_new_note' => "Добавлена новая заметка", -'mod_warn_fieldset' => "Содержимое заметки", -'mod_warn_note_save' => "Сохраненная заметка", -'acp_edited_profile' => "Изменен профиль у:", -'acp_moved_posts' => "Сообщения перемещены из '%s' в '%s'", -'acp_approved_posts' => "Опубликовано %s ожидающих проверки сообщений в '%s'", -'acp_unapproved_posts' => "Отклонено %s ожидающих проверки сообщений в '%s'", -'acp_trashcan_post' => "Для удаленных сообщений применена корзина", -'acp_split_topic' => "Разделена тема", -'acp_approve_topic' => "Опубликована тема (id: %s)", -'acp_mass_moved' => "Массовое перемещение тем", -'acp_pruned_forum' => "Сокращен форум", -'acp_moved_topics' => "Перемещены темы из %s в %s", -'acp_multi_mod' => "Применена мульти-модерация '%s' в форуме %s", -'acp_altered_topics' => "Изменены темы (%s) и (%s)", -'acp_trashcan_topics' => "Применена корзина для удаленных тем с id:", -'acp_deleted_topics' => "Удалены темы (ID: %s )", -'acp_merged_topic' => "Объединены темы '%s' и '%s'", -'acp_merged_posts' => "Объединены сообщения с ID: %s", -'acp_moved_a_topic' => "Тема перемещена из %s в %s", -'acp_trashcan_a_topic' => "Применена корзина для удаленной темы с id:", -'acp_deleted_a_topic' => "Удалена тема", -'acp_edit_title' => "Модератор изменил заголовок темы: (ID: %s) с '%s' на '%s'", -'acp_opened_topic' => "Открыта тема", -'acp_locked_topic' => "Закрыта тема", -'acp_pinned_topic' => "«Поднята» тема", -'acp_unpinned_topic' => "«Опущена» тема", - -'warn_popup_title' => "Предупреждения", - -// IPB 2.1: New - -'mod_from' => "От:", -'mod_from_id' => "От темы с ID:", - -'cp_batch_done' => "пока обработано %s тем. осталось %s ...", -'cp_optional' => 'Все эти настройки опциональны', -'cp_prune_days2' => "Нет ответов более, чем n дней", -'cp_prune_action2' => "Удалить или переместить в", -'cp_per_go' => "Выполнять действия по n тем за цикл", - -// IPB 2.1: Changed - -'mps_ignorepin' => "Не «поднятые» темы", - -'cpp_close' => "Закрыть это окно", - -'cp_prune_domove' => "Переместить темы!", -'cp_prune_dorem' => "Удалить темы!", - -'cp_prune' => "Управление темами форума: ", - -'cp_prune_days' => "Удалить темы, которые", -'cp_prune_type' => "Соответствует типу тем", -'cp_pday_open' => "Только открытые темы", -'cp_pday_closed' => "Только закрытые темы", -'cp_pday_link' => "Только ссылки на перемещенные темы", -'cp_pday_all' => "Любые темы", -'cp_prune_replies' => "Имеющие менее [x] ответов
(не заполняйте, если хотите удалить темы независимо от количества ответов)", -'cp_prune_member' => "Созданные пользователем", -'cp_prune_sub1' => "Проверить форму", -'cp_prune_sub2' => "Сократить форум!", -'cp_action' => "Действие сокращения", -'cp_ac_prune' => "ТОЛЬКО СОКРАЩЕНИЕ, НЕ ПЕРЕМЕЩАТЬ", -'cp_prune_text' => "Вы можете удалить темы или переместить их в другой форум, выбранный в ваших критериях. Для перемещения тем, выберите форум расположения в выпадающем меню. Для удаления тем, выберите «ТОЛЬКО СОКРАЩЕНИЕ» в выпадающем меню. Перемещение тем не оставит ссылок на перемещенные темы в исходящем форуме", -'cp_pages' => "Страница: ", -'cp_error_no_mem' => "Невозможно определить пользователя с таким именем. Попробуйте снова", -'cp_error_no_topics' => "В этом форуме нет тем, ожидающих одобрения", -'cp_total_topics' => "Количество тем в этом форуме", -'cp_total_match' => "Количество удаляемых/перемещаемых тем", -'cp_check_result' => "Проверить результаты", -'cp_check_text' => "Продолжайте только в том случае, если вы довольны результатами. При нажатии на ссылку ниже, действие будет выполнено. Если вы все же хотите произвести какие-либо изменения, вернитесь назад и сделайте их.", - -// ---- - -'cp_remove_photo' => "Удалить фотографию пользователя?", -'cp_remove_av' => "Удалить аватар пользователя?", -'cp_edit_website' => "Сайт", -'cp_edit_location' => "Место жительства", -'cp_edit_signature' => "Подпись", -'cp_edit_interests' => "Интересы", -'cp_em_title' => "Редактирование пользователя", -'cp_vp_title' => 'Профиль', -'cp_em_sub_main' => "Основные данные пользователя", -'cp_em_sub_other' => "Дополнительные данные пользователя", -'cp_em_yahoo' => 'Yahoo! ID', -'cp_em_aim' => 'AIM ID', -'cp_em_icq' => 'ICQ номер', -'cp_em_msn' => 'MSN ID', -'cp_em_submit' => 'Сохранить изменения', - -'cm_title' => 'Объединение сообщений', -'cm_post' => 'Дата сообщений', -'cm_author' => 'Автор объединяемых сообщений', -'cm_text' => 'Текст объединяемых сообщений', -'cm_submit' => 'Объединить сообщения!', -'cm_attach' => 'Прикрепленные файлы объединяемых сообщений', -'cm_attach2' => 'Выберите прикрепленные файлы, которые желаете сохранить', -'cm_keep' => 'Сохранить!', -'cm_delete' => 'Удалить!', -'cmp_title' => "Перемещение сообщений", -'cmp_topic' => 'Введите номер (id) темы', -'cmp_topic2' => 'Необходимо ввести номер (id) темы, в которую вы хотите переместить выбранные сообщения.
(Подсказка: Вы можете просто скопировать ссылку на тему из адресной строки браузера и вставить сюда)', -'cmp_submit' => 'Переместить сообщения!', -'cmp_notopic' => 'Некорректная ссылка на тему, в которую вы хотите переместить сообщения. Вернитесь назад, перепроверьте введенные данные и попробуйте снова', - -'redirect_modified' => 'Тема отредактирована!', -'cp_redirect_posts' => "Сообщения обновлены, переходим в тему", -'cp_results' => "Результат", -'cp_result_move' => "Количество перемещаемых тем: ", -'cp_result_del' => "Количество удаляемых тем: ", - -'cp_redirect_topics' => "Темы обновлены, переходим к списку тем", -'cp_tmove_start' => "Перемещение тем из форума:", -'cp_tmove_to' => "Выберите форум для перемещения", -'cp_tmove_end' => "Переместить выбранные темы", -'cp_ttitle' => "Перемещение тем", -'cp_resync' => "Форум обновлен", -'mpt_title' => "Установки сокращений", -'mpt_help' => "Помощь по сокращению", -'mpt_confirm' => "Подтверждение сокращения", - -// Добавлено 1.2 -'w_v_pages' => "Страница", -'w_v_warnby' => "Модератор", -'w_v_none' => "Нет сохраненных записей для этого пользователя", -'w_v_add' => "Повышение уровня предупреждений", -'w_v_minus' => "Понижение уровня предупреждений", -'w_v_notes' => "Причина", -'w_v_warned_on' => "Дата поощрения/наказания", -'w_v_title' => "Журнал предупреждений пользователя", -'w_done_t' => "Результат обновления предупреждений", -'w_done_te' => "Предупреждения пользователя %s обновлены и записаны в журнале.", -'w_done_home' => "Вернуться на главную страницу форума", -'w_done_forum' => "Вернуться в форум", -'w_done_topic' => "Вернуться в тему", -'errors_found' => "Ошибка", -'we_no_reason' => "Вы обязательно должны ввести причину поощрения/наказания", -'we_no_subject' => "Вы не ввели заголовок письма-уведомления", -'pm_email_subject' => "Вам пришло новое личное сообщение", -'w_title' => "Центр предупреждений пользователя", -'w_restricted' => "Ограничение установлено. Оставшееся время пересчитано.", -'w_warnfor' => "Панель предупреждений пользователя", -'w_complete' => "Заполните обязательные поля формы", -'w_adjust_level' => "Действие с предупреждений", -'w_add' => "Повышение уровня предупреждений", -'w_remove' => 'Понижение уровня предупреждений', -'w_modq' => "Проверять модераторами все новые сообщения этого пользователя перед публикацией их?", -'w_modq_i' => "Проверять всегда", -'w_day' => "Дней", -'w_hour' => "Часов", -'w_resposts' => "Запретить пользователю отправлять сообщения", -'w_resposts_i' => "Запретить навсегда", -'w_suspend' => "Заблокировать пользователя", -'w_orfor' => "или на", -'w_susfor' => "Лишить прав на", -'w_reason' => "Введите причину", -'w_reason2' => "Эта секция обязательна к заполнению", -'w_contact' => "Отправить уведомление пользователю", -'w_c' => "Отправить на", -'w_c_subj' => "Заголовок письма", -'w_c_e' => "E-mail", -'w_c_p' => "Личное сообщение", -'w_submit' => "Изменить уровень предупреждений", -'w_contact2' => "Не заполняйте, если не хотите уведомлять пользователя", - -'mm_applied' => 'Мульти-модерация для темы %s установлена', -'pe_unused' => "Не использовано", - -// Добавлено BETA 2: - -'pe_question' => "Вариант ответа", - -'st_top' => "Разделение темы", -'st_explain' => "Разделение темы позволяет вам выбрать сообщения, для перемещения их в новую тему. Перед продолжением определите название, описание новой темы и форум расположения.
Внимание: Длинные сообщения будут возвращены для кодирования тегов и сокращения их", -'st_forum' => "Форум для новой темы", -'st_submit' => "Разделить выбранные сообщения!", -'st_post' => "Просмотр сообщения", -'st_split' => "Перенести это сообщение!", -'st_top_bit' => "Автор %s — %s", -'st_redirect' => "Тема успешно разделена! Сейчас вас переместит в форум", - -'th_title' => "История темы", -'th_topic' => "Название темы", -'th_desc' => "Описание темы", -'th_start_date' => "Тема создана", -'th_start_name' => "Автор темы", -'th_last_date' => "Последнее сообщение", -'th_last_name' => "Автор последнего сообщения", -'th_avg_post' => "Среднее количество сообщений в день", - -'ml_title' => "Журнал действий модератора", -'ml_name' => "Имя пользователя", -'ml_desc' => "Описание", -'ml_date' => "Дата", -'ml_none' => "Нет данных для этой темы", - -'mt_top' => "Объединение темы", -'mt_explain' => "Объединение тем позволяет перемещать все сообщения из одной темы в другую. Сообщения в новой теме будут отсортированы в хронологическом порядке. Опросы объединять невозможно.", -'mt_new_title' => "Название темы", -'mt_new_desc' => "Описание темы", -'mt_tid' => "Введите URL адрес темы, которую вы хотите объединить с этой.
(Подсказка: вы просто можете скопировать URL адрес из адресной строки браузера (при просмотре темы) и вставить сюда)", -'mt_submit' => "Объединить темы", -'mt_redirect' => "Темы успешно объединены. Сейчас вы будете перемещены в получившуюся тему", - -'ts_title' => 'Подписки на тему', -'ts_count' => 'Имеются %s пользователей, подписавшихся на эту тему. Вы хотите отписать их всех?', -'ts_submit' => "Отписать всех пользователей", -'ts_none' => "Нет пользователей, подписанных на эту тему.", -'ts_redirect' => "все пользователи отписаны от этой темы", - - -'leave_link' => "Оставить ссылку на новую тему в исходящем форуме?", - -'yes' => "Да", -'no' => "Нет", - -'move_exp' => "Выберите входящий форум и метод перемещения", - -'pe_top' => "Редактирование опроса: ", -'pe_option' => "Опции опроса:", - -'pe_submit' => "Редактировать этот опрос", - -'pe_pollonly' => "Только опрос (запретить новые ответы?)", -'pe_yes' => "Да", -'pe_no' => "Нет", -'pe_done' => "Опрос отредактирован", - -'pd_top' => "Удаление опроса:", - -'pd_text' => "Подтвердите удаление опроса, нажатием на кнопку ниже", -'pd_submit' => "Удалить этот опрос", -'pd_redirect' => "Опрос удален", - -'post_deleted' => "Сообщение удалено", - -'top_edit' => "Редактирование темы ", -'submit_move' => "Переместить тему", - -'t_open' => "Открыть тему", -'t_edit' => "Редактировать тему", -'p_moved' => "Тема перемещена", -'p_pinned' => "Важная тема", -'t_delete' => "Удалить тему", -'top_move' => "Перемещение темы ", -'p_edited' => "Тема отредактирована", - -'edit_f_desc' => "Описание темы", - -'t_close' => "Закрыть тему", -'delete_topic' => "Удаление темы. Продолжайте только в том случае, если вы действительно хотите удалить эту тему. Больше никаких предупреждений не будет.", -'move_from' => "Переместить эту тему из", -'p_deleted' => "Тема удалена", -'t_move' => "Переместить тему", -'edit_f_title' => "Заголовок темы", -'to' => "в", -'submit_close' => "Закрыть тему", -'p_closed' => "Тема закрыта", -'top_delete' => "Удаление темы ", -'p_opened' => "Тема открыта", -'edit_topic' => "Редактирование данных темы", -'p_pdeleted' => "Сообщение удалено", -'post_icon' => "Иконки сообщения", -'submit_edit' => "Отредактировать тему", -'submit_delete' => "Удалить тему", -'p_unpinned' => "Тема опущена", -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_msg.php b/upload/cache/lang_cache/ru/lang_msg.php deleted file mode 100644 index 0d59f17f..00000000 --- a/upload/cache/lang_cache/ru/lang_msg.php +++ /dev/null @@ -1,295 +0,0 @@ - "Заголовок сообщения должен быть более 2 символов.", -'mess_contact' => "Черный список ЛС", -'address_list_empty' => "Список друзей пуст", -'address_none' => "В данный момент в вашем списке нет пользователей.", -'address_current' => "Пользователи в вашем черном списке", -'member_add' => "Добавьте пользователя в список для игнорирования его личных сообщений", -'enter_desc' => "Причина (поле не обязательно к заполнению)", -'submit_address' => "Добавить пользователя", -'member_edit' => "Вы можете изменить эту запись.", -'add_to_book' => "Заблокировать", - -// 2.2 -'dd_forward_pm' => "Переслать", -'dd_add_to_block' => "Добавить в 'Черный список ЛС'", -'deleted_user' => 'Удалить пользователя', -'m_personal_portal' => 'Изменить настройки анкеты', -'m_manage_friends' => 'Список друзей', -'xml_no_pms' => "У вас нет входящих писем.", -'tt_menu' => "Меню", -'m_messenger' => "Личный ящик", -'mess_new' => "Новое личное сообщение", -'mess_folders' => "Изменить директории", -'mess_inbox' => "Входящие", -'mess_archive' => "Архивирование сообщений", -'mess_tracker' => "Слежение за сообщениями", -'mi_prune_msg' => "Очистка папок", -'forum_jump' => "Переход по форумам", -'mess_saved' => "Неотправленные", -'m_tracker' => "Подписки", -'m_view_subs' => "Темы", -'m_view_forum' => "Форумы", -'m_personal' => "Ваш профиль", -'m_bio_info' => "Биография", -'m_sig_info' => "Изменить подпись", -'m_avatar_info' => "Установка аватара", -'m_options' => "Настройки", -'m_email_opt' => "Настройки E-mail", -'m_board_opt' => "Настройки форума", -'m_email_change' => "Изменить E-mail", -'m_passy_opt' => "Изменить пароль", -'m_contact_info' => "Изменить личные данные", -'m_change_photo' => "Установка фотографии", -'m_dname_change' => "Изменить отображаемое имя", -'new_sub_link' => "Покупка оплачиваемых рассылок", -'m_top_list' => "Top Site List", -'tsl_home' => "Перейти к списку", -'tsl_your_sites' => "Изменить ваши сайты", -'m_attach' => "Прикрепленные файлы (attach'и)", -'m_ignore_users' => "Игнорирование пользователей", -'menu_title_mod' => 'Модерация', -'menu_ipsearch' => 'Средства IP адресов', -'menu_memsearch' => 'Поиск пользователей', -'menu_announcements' => "Объявления", -'m_blog' => "Community Blog", -'m_blog_ucp_main' => "Настройки вашего блога", -'m_blog_cblocks' => "Настройки блоков с контентом", -'m_blog_aboutme' => "Настройки «Обо мне»", -'m_blog_your_blog' => "Ваш блог", -'m_gallery' => 'Invision Gallery', -'m_gallery_albums' => 'Ваши альбомы', -'m_gallery_favs' => 'Избранное', -'m_gallery_controls' => 'Ваши настройки', -'msg_options' => "Опции", - - -// 2.1.2 -'pm_textbit' => "Л.С.: ", -'on_textbit' => "", -'sentby_textbit' => "Отправлено от ", -'sentto_textbit' => "Отправлено к ", - -// v2.1 - -'msg_ip_address' => 'IP адрес:', -'xml_go_inbox' => "Перейти во «Входящие»", - -// build #003 -'check_all' => "Отметить все", - -'pma_title' => "Архив личных сообщений", -'cc_hide_users' => 'Скрыть имена копий от других?', - -// Добавлено в 1.2 - -'arch_new' => "и более новые", -'arch_old' => "и более старые", - -'err_no_chosen_member' => "Необходимо либо вручную ввести полное имя пользователя, либо выбрать его из вашего списка контактов.", -'err_errors' => "Обнаружены следующие ошибки", -'err_no_msg' => "Необходимо ввести текст личного сообщения.", -'err_no_such_member' => "Нет такого пользователя. Проверьте введенное имя и повторите попытку.", - -'fd_text' => "Вы можете удалить ваши сохраненные личные сообщения. Выберите директорию, которую хотите очистить, и нажмите на кнопку «Далее»
Внимание: Возврат назад будет невозможен. Дважды все проверьте перед продолжением.", -'fd_name' => "Директория", -'fd_count' => "Количество сообщений", -'fd_empty' => "Очистить?", -'fd_continue' => "Далее", -'fd_unsent' => "Неотправленные сообщения", -'fd_save_unread' => "Сохранить непрочитанные личные сообщения?", - -// Добавлено в RC1 - -'msg_pages' => "Страниц", - -'pm_email_subject' => "Новое личное сообщение", - -'tk_read_messages' => "Прочитанные сообщения", -'tk_read_desc' => "Эти сообщения уже прочитаны пользователями, которым они отправлены", -'tk_read_date' => "Дата прочтения", -'tk_unread_date' => "Дата отправки", -'tk_untrack_button' => "Удалить", - -'tk_unread_messages' => "Непрочитанные сообщения", -'tk_unread_desc' => "Эти сообщения пока еще не прочитаны пользователями, которым они отправлены. Вы можете удалить их прежде, чем они будут прочитаны.", - -'vm_delete_pm' => "Удалить сообщение", -'vm_forward_pm' => "Переадресовать сообщение", -'vm_track_msg' => "Проследить за этим сообщением?", - -'vm_forward_text' => "Сообщение переадресовано от %s", - -'inbox_no_msg' => "Сообщение не обнаружено", - -'pm_reply_link' => "Ответить", - - -'pmpc_full_string' => "Ваши директории заполнены на <#PERCENT#>%", -'pmpc_info_string' => "Личных сообщений у вас: %s, из максимально возможных: %s", -'pmpc_unlimited' => "количество сообщений неограниченно", - -'pmpc_mark_read' => "Отметить прочитанные сообщения", -'pmpc_unmark_all' => "Снять все отметки", - -'pme_title' => "ОШИБКА", -'pme_none_sent' => "Это личное сообщение не отправлено", -'pms_send_later' => "Сохранить (для отправки позднее)", -'pms_redirect' => "это сообщение не отправлено, но сохранено (для отправки позднее)", - -'pms_saved_title' => "Сохраненные неотправленные сообщения", -'pms_message_to' => "Сообщение для", -'pms_cc_users' => "Копия пользователям", -'pms_saved_date' => "Дата сохранения", - -'pme_no_cc_user' => "Не найдено ни одного пользователя, чьи имена вы ввели в поле «Копия». Проверьте введенные данные и попробуйте снова.", -'pme_too_many' => "Вы не имеете прав отправки копии личных сообщений нескольким пользователям. Сократите список и попробуйте снова.", - -'pme_failed_nopm' => "Сообщение для %s не отправлено, так как его личный ящик отключен", -'pme_failed_maxed' => "Сообщение для %s не отправлено, так как у него переполнен личный ящик", -'pme_failed_nomem' => "Сообщение для %s не отправлено, так как пользователя с таким именем не существует!", -'pme_failed_block' => "Сообщение для %s не отправлено, так как %s не желает принимать личные сообщения", - -'pm_preview' => "Предпросмотр", - -'pm_pre_button' => "Предварительный просмотр", - -'pmp_title' => "Вам новое личное сообщение!", - -'pmp_get_last' => "Открыть сообщение в этом же окне", - -'pmp_string' => "Вам новое сообщение от: <#NAME#>, с заголовком: '<#TITLE#>'.
Отправлено — <#DATE#>.", - -'pmp_go_inbox' => "Перейти в директорию «Входящие»", - -'pmp_ignore' => "Закрыть это окно", - -'pmp_thiswindow' => "Открыть сообщение в этом окне", - -'carbon_copy_title' => "Копия пользователям", -'carbon_copy_desc' => "Вы можете ввести %s имен в поле «Копия пользователям».

Одно имя на строку.", - - -'forum_jump' => "Переход по форумам", - -'author' => "Автор", -'m_pmessage' => "Сообщение", -'all_folders' => "Все директории", -'archive_title' => "Архивирование сообщений", -'archive_text' => "Выберите критерии архивирования.
Архивированные сообщения будут собраны в один архив и отправлены вам на e-mail вложенным письмом.", -'arc_folders' => "Какую директорию архивировать?", -'arc_dateline' => "Архивировать сообщения, полученные за последние", -'arc_days' => "дней", -'arc_alldays' => "все", -'arc_delete' => "Удалить сообщения после архивации?", -'arc_yes' => "Да", -'arc_no' => "Нет", -'arc_submit' => "Выполнить", -'arc_complete' => "Процесс архивации успешно завершен.
Вы должны получить письмо на e-mail с вложенным архивом, содержащим <#NUM#> архивированных личных сообщений.", -'arc_comp_title' => "Архивирование завершено", - -'arc_email_subject' => "Архив с сообщениями", - -'arc_type' => "Создать архивный файл в виде", - -'arc_html' => "HTML страницы", -'arc_xls' => "Excel файла", - -'arc_max' => "Количество сообщений для архивации", - -'t_book' => "Список контактов", -'prefs_title' => "Настройки личного ящика", -'m_posts' => "Сообщений:", -'from_title' => "Сообщение", -'message_from' => "Отправитель", -'mem_read_msg' => "прочитал это сообщение", -'no' => "Нет", -'read_rec_title' => "Уведомлен о получении:", -'delete_button' => "Удалить", -'from_date' => "Дата (сначала старые)", -'message_date' => "Дата", -'enter_a_name' => "Имя пользователя", -'to_whom' => "Имена получателей", -'prefs' => "Установки", - -'prefs_help' => "Здесь вы можете изменить настройки вашего личного ящика.", -'auto_sent_add' => "Добавить копию этого сообщения в директорию «Отправленные»", -'sort_by' => "Сортировать сообщения по", -'member_added' => "Пользователь добавлен в вашу список контактов", -'move_button' => "переместить в", -'a_msg_no_new' => "У вас нет новых сообщений", -'can_contact' => "Сообщения принимаются", -'send' => "Отправить сообщение", -'sent_text' => "Ваше сообщение с заголовком «<#MESSAGE_TITLE#>» успешно отправлено. Пользователь будет уведомлен о новом личном сообщении от вас.", -'welcome' => "Добро пожаловать в личный ящик", -'cannot_contact' => "Сообщения игнорируются", -'member_name' => "Имя", -'viewing_message' => "Просмотр сообщения:", -'submit_send' => "Отправить сообщение", -'delete' => "Удалить", - -'send_header' => " выберите имя из вашего списка контактов, либо введите имя вручную — кому вы хотите отправить личное сообщение", -'yes' => "Да", -'goto_folder' => "Перейти в директорию", -'enter_name' => "ИЛИ введите имя здесь", -'enter_message' => "Введите текст сообщения", -'prefs_submit' => "Сохранить изменения", -'allow_msg' => "Разрешить пользователю отправлять вам личные сообщения?", -'sent_on' => "Отправлено", -'sent_url' => "Нажмите сюда для возврата в личный ящик", -'msg_deleted' => "Это сообщение удалено", -'out_box' => "Исходящие", -'t_welcome' => "Добро пожаловать в личный ящик", -'max_msg' => "Максимальный размер сообщения — <#MAX_MSG_SIZE#> килобайт", -'sent_title' => "Ваше сообщение отправлено", -'submit_address_edit' => "Изменить запись", -'move_or_delete' => "или", -'address_list' => "Выберите из вашего списка контактов", -'prefs_new' => "Добавить новую директорию", -'selected_msg' => "выбранные сообщения", -'from_date_new' => "Дата (новые вначале)", -'address_title' => "Ваш список контактов", -'no_msg_chosen' => "Вы не выбрали ни одного личного сообщения. Вы можете выбрать сообщения, отметив галочкой справа от каждого сообщения", -'from_name' => "Пользователь", -'new_message' => "Статус нового сообщения", -'your_options' => "Ваши опции", -'send_title' => "Отправка сообщения", -'posted' => "Отправлено", -'msg_title' => "Заголовок сообщения", -'icon_read' => "Прочитанные сообщения", -'cannot_remove' => "Невозможно удалить", -'goto_submit' => "ок!", -'m_joined' => "Регистрация:", -'t_title' => "Ваш Личный Ящик", -'message_read_state' => "Прочитано?", -'other' => "Другой", -'c_msg_full' => "
ВНИМАНИЕ: ВАШИ ДИРЕКТОРИИ ПЕРЕПОЛНЕНЫ
Для возможности получения новых личных писем вы ДОЛЖНЫ удалить некоторые сохраненные сообщения из папок", -'msg_body' => "Сообщение", -'dir_title' => "Текущая директория ящика:", -'saved_sent_msg' => "Отправлено: ", -'in_box' => "Входящие", -'a_msg_new' => "У вас <#NEW_MESSAGES#> новых личных сообщений!", -'member_options' => "Опции", -'prefs_text_a' => "Вы можете переименовать директории. Для удаления директории, необходимо удалить название директории. Помните, что вы не сможете удалить директорию, если она содержит сообщения.", -'edit' => "Редактировать", -'enter_block' => "Опции", -'prefs_text_b' => "Вы можете создать дополнительные директории. Не используйте одинаковые названия папок.", -'icon_unread' => "Непрочитанные сообщения", -'splash' => "Итог", -'current_sort' => "Сообщения отсортированы по: ", -'contact' => "Список контактов", -'message_options' => "Опции писем", -'no_reply' => "Вы не ответили на это сообщение", -'c_msg_total' => "У вас <#NUM#> писем во всех директориях.", -'read_rec_text' => "Оригинальное сообщение отправлено:", -'button_preview' => "Предпросмотр", -'m_group' => "Группа:", -'prefs_current' => "Текущие директории", -'message_to' => "Это сообщение отправлено для", -'message_title' => "Заголовок сообщения", -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_online.php b/upload/cache/lang_cache/ru/lang_online.php deleted file mode 100644 index c3ba106a..00000000 --- a/upload/cache/lang_cache/ru/lang_online.php +++ /dev/null @@ -1,52 +0,0 @@ - "Сортировать по: ", -'s_sort_key_click' => "Последним действиям", -'s_sort_key_name' => "Именам", -'s_sort_order_asc' => "В порядке возрастания", -'s_sort_order_desc' => "В порядке убывания", -'s_show_mem_guest' => "Показать только гостей", -'s_show_mem_reg' => "Показать только зарегистрированных", -'s_show_mem_all' => "Показать всех", -'s_go' => "Обновить", -'member_name' => "Имя пользователя", -'guest' => "Гость", -'board_index' => "Просмотр главной страницы форума", -'n_a' => "[ Н/О ]", -'pages' => "Страниц:", -'time' => "Время", -'where' => "Последнее действие", -'user_ops' => "Опции", -'page_title' => "Кто в онлайне", - -'WHERE_calendar' => "Просмотр календаря", -'WHERE_boardrules' => "Просмотр правил форума", -'WHERE_toplist' => "Топ сайтов", -'WHERE_sf' => "Просмотр форума:", -'WHERE_sr' => "Просмотр правил форума:", -'WHERE_st' => "Просмотр темы:", -'WHERE_login' => "Авторизуется", -'WHERE_postnew' => "Отвечает в форум:", -'WHERE_postrep' => "Отвечает в тему:", -'WHERE_reg' => "Регистрируется", -'WHERE_online' => "Просмотр списка Кто в онлайне", -'WHERE_members' => "Просмотр списка пользователей", -'WHERE_help' => "Просмотр разделов помощи", -'WHERE_search' => "Использование поиска", -'WHERE_print' => "Просмотр темы (версию для печати)", -'WHERE_forward' => "Отправка ссылки на тему на e-mail", -'WHERE_msg' => "Использование личного ящика", -'WHERE_usercp' => "Просмотр или изменение профиля", -'WHERE_mail' => "Связь с пользователем по e-mail", -'WHERE_invite' => "Сообщение другу о форуме", -'WHERE_icq' => "Связь с пользователем по ICQ", -'WHERE_aol' => "Связь с пользователем по AIM", -'WHERE_profile' => "Просмотр профиля пользователя", -'WHERE_stats' => "Просмотр статистики", - - -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_portal.php b/upload/cache/lang_cache/ru/lang_portal.php deleted file mode 100644 index 89ce9b14..00000000 --- a/upload/cache/lang_cache/ru/lang_portal.php +++ /dev/null @@ -1,54 +0,0 @@ - "Запросов к базе:", -'execution_time' => "Страница создана за:", - -'wbox_pm_string' => "%s новых сообщений", -'wbox_last_visit' => "Последний раз вы были на сайте %s", -'wbox_guest_reg' => "Для публикации новостей на сайте, вы должны %s", -'wbox_register' => "зарегистрироваться", -'wbox_g_username' => "Ваше имя", -'wbox_g_password' => "Пароль", -'wbox_g_login' => "Войти", -'wbox_guest_name' => "посетитель", -'wbox_welcome' => "Добро пожаловать", -'wbox_getnewposts' => "Новые сообщения", -'wbox_mycontrols' => "Личные данные", -'wbox_myassistant' => "Помощник", -'wbox_logout' => "Выход", -'pm_title' => "Личные сообщения", -'search_title' => "Поиск", -'search_go' => "Искать", -'search_advanced' => "Расширенный поиск", -'links_title' => "Навигация сайта", -'cskin_title' => "Стили", -'cskin_text' => "Выберите стиль", -'cskin_go' => "Изменить", -'online_title' => "Посетители", -'online_breakdown' => "Сейчас на сайте человек: %s", -'online_split' => "(пользователей: %s, гостей: %s)", -'poll_title' => "Опрос сайта", -'poll_total_votes' => "Всего голосов: %s", -'poll_voted' => "Вы уже проголосовали", -'poll_novote' => 'Вы не можете голосовать', -'poll_noguest' => 'Необходимо авторизоваться для голосования', -'poll_vote' => 'Голосовать', -'poll_finished' => 'Этот опрос уже завершен', -'poll_discuss' => 'Обсудить опрос', -'recent_title' => 'Последние новости', -'recent_read' => 'Просмотров', -'recent_comments' => 'Комментариев', -'discuss_title' => 'Последние обсуждения', -'article_postedby' => 'Автор %s — %s — %s комментариев', -'article_noreply' => 'Просмотров: %s, оставить %s', -'article_reply' => 'Просмотров: %s, последний %s от %s', -'article_comment' => 'комментарий', -'article_readmore' => 'читать далее', -'aff_title' => "Рекомендуемые ссылки", - - -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_post.php b/upload/cache/lang_cache/ru/lang_post.php deleted file mode 100644 index f43d9cc9..00000000 --- a/upload/cache/lang_cache/ru/lang_post.php +++ /dev/null @@ -1,227 +0,0 @@ - "Редактор", - -'reason_for_edit' => "Причина редактирования", -'captcha_explain' => "Введите в поле код из 6 символов, отображенных в виде изображения. Если вы не можете прочитать код с изображения, нажмите на изображение для генерации нового кода.", - -'attach_space_used' => "Использовано места", -'attach_space_of' => "из", -'max_single_attach' => "Макс. размер для одного файла", -'attach_select_file' => "Выберите файл", -'attach_but_upload' => "ЗАГРУЗИТЬ", -'attach_manage_current' => "Управление текущими файлами", -'attach_header' => "Прикрепление файлов", - -'attach_js__no_items' => "Ни одного файла не загружено", -'attach_js__uploading' => "Загрузка файла...", -'attach_js__init' => "Инициализация системы...", -'attach_js__upload_success' => "Файл успешно загружен и доступен в меню «Управление текущими файлами»", -'attach_js__upload_fail' => "Неудачная загрузка. Необходимо проверить настройки и права доступа. Пожалуйста, сообщите об этом администрации.", -'attach_js__upload_fail1' => "Неудачная загрузка. Файл имеет размер больше допустимого", -'attach_js__upload_fail2' => "Неудачная загрузка. Вам запрещено загружать такой тип файлов", -'attach_js__upload_fail3' => "Неудачная загрузка. Директория загрузок файлов не доступена. Пожалуйста, сообщите об этом администрации.", -'attach_js__upload_fail4' => "Неудачная загрузка. Невозможно произвести запись файла в директорию загрузок. Пожалуйста, сообщите об этом администрации.", -'attach_js__upload_fail5' => "Вы не выбрали файл для загрузки", -'attach_js__ready' => "Система готова для загрузки файлов", -'attach_js__delete' => "Удалить файл", -'attach_js__insert' => "Вставить файл в текстовый редактор", -'attach_js__confirm' => "Продолжить удаление файла?", -'attach_js__isremoved' => "Файл успешно удален", -'attach_js__removing' => "Удаление файла...", - - - -'poll_multichoice' => "Позволить пользователям выбирать более одного варианта ответа?", -'poll_only_title' => "Только опрос", -'poll_only_desc' => "Запретить ответы и сделать только опрос?", - -'domain_not_allowed' => "Вы ввели запрещенную гиперссылку", -'too_many_quotes' => "Вы ввели слишком много блоков с цитатой", - -// 2.2 -'quote_mismatch' => "Количество открытых тегов цитаты не совпадает с количеством закрытых кодов. Пожалуйста, вернитесь и исправьте это.", -'merge_too_many_img' => "После объединения ваших сообщений был превышен предел допустимого количества изображений.", -'merge_too_many_emoticons' => "Вы использовали слишком много смайликов в вашем сообщение. Пожалуйста, вернитесь и исправьте это.", -'guest_captcha' => "Подтвердите код", -'alt_codebit' => "Код", -'alt_loadingimg' => "Загрузка изображения", -'err_reg_code' => "Введенный вами код не соответствует сгенерированному — был сгенерирован новый код. Пожалуйста, попробуйте ещё раз.", -'reg_code_enter' => "Администрация требует обязательный ввод кода для гостей перед публикацией их сообщений. Пожалуйста, введите код, отображенный ниже, и затем нажмите «Отправить»", - - -'ignore_first_line' => "Для игнорирования вы выбрали все сообщения из:", - -//v2.1 NEW - -'qe_complete_edit' => "Применить", -'qe_cancel_edit' => "Отмена", - -'attach_button' => 'Вставить в сообщение', -'attach_button_title' => 'Вставить в сообщение тег для отображения прикрепленного файла в нужном месте в сообщении', -'picons_none' => '[ Без иконки ]', -'calendar_delete_t' => 'Проверьте это поле и нажмите на кнопку отправления для удаления этого события.', -'calendar_group_filter_t' => '
Выберите группы, которые могут видеть это событие (администраторы уже выбраны) или оставьте пустым для того, чтобы все группы могли видеть событие.
Можно выбирать несколько групп', -'mod_open_time' => 'Выберите время открытия темы', -'mod_close_time' => 'Выберите время закрытия темы', -'mod_date_format' => 'ДД/ММ/ГГГГ', -'mod_time_format' => 'ЧЧ:ММ', -'post_optional' => '(Опционально)', -'poll_tt_add_question' => 'Добавить еще вопрос в опрос', -'poll_tt_add_choice' => 'Добавить вариант ответа', -'poll_tt_remove_question' => "Удалить вопрос из опроса", -'poll_tt_remove_choice' => "Удалить вариант ответа", -'poll_tt_confirm' => "Пожалуйста, подтвердите это действие", -'poll_tt_stat_lang' => "Вам разрешено еще <%1> вопросов с <%2> вариантами ответа на вопрос.", - -'poll_manage_link' => "Нажмите сюда для управления опросом в этой теме", -'poll_fs_title' => 'Заголовок опроса', -'poll_fs_content' => 'Содержание опроса', -'poll_fs_close' => 'Закрыть форму опроса', -'poll_fs_options' => 'Опции опроса', - -//v2.1 CHANGED -//v2.0 - -'upload_text' => "Прикрепление файлов
Максимально допустимый объем всех файлов:", -'upload_unlimited' => "размер неограничен", -'invalid_mime_type' => "Ошибка загрузки. У вас нет прав для загрузки файла с таким расширением.", -'upload_to_big' => "Общее дисковое пространство требует для всех загружаемых файлов больше, чем на каждое сообщение или глобальный лимит. Пожалуйста, уменьшите число или размер загружаемых файлов.", - -'pp_nohtml' => 'HTML выключен', -'pp_html1' => 'HTML включен — перевод строк вручную', -'pp_html2' => 'HTML включен — автоматический перевод строк', - -'button_add_attachment' => "Добавить файл!", -'attach_remove' => 'Удалить!', -'attach_space_left' => "Вы использовали %s места на жестком диске для прикрепляемых файлов к этому сообщению.
Вам осталось %s для этого сообщения.", -'custom_tags_incorrect' => "Ошибка использования BB кодов форума. Количество используемых вами открытых тегов не соответствует количеству закрытых тегов.", -'custom_tags_incorrect2' => "Ошибка использования BB кодов форума. Возможно вы неправильно использовали какой-то из тегов, как, например, тег [TAG], тогда как он должен использоваться в виде [TAG=] или наоборот.", - - -// v1.2 -'enable_track' => "Включить уведомление на e-mail при ответах?", -'already_sub' => "Вы уже подписаны на ответы в этой теме", -'mod_pinclose' => "«Поднять» и закрыть тему", -'posting_poll' => "Сообщение к опросу", - -'po_options' => "Опции сообщения", - -'poll_tag_allowed' => "[URL] и [IMG] теги разрешены", - -'eu_keep' => "Сохранить текущие прикрепления", -'eu_delete' => "Удалить прикрепление", -'eu_new' => "Заменить на новое прикрепление", - -'append_edit' => "Добавить надпись «Отредактировано...» в это сообщение?", - -'edit_ops' => "Информация о редактировании", - - -'unreg_namestuff' => "Информация о госте", - -'mod_options' => "После отправки сообщения", - -'mod_close' => "Закрыть эту тему", -'mod_move' => "Переместить эту тему", -'mod_pin' => "«Поднять» эту тему", -'mod_nowt' => "(ничего не делать)", - -'msg_no_title' => "Необходимо ввести заголовок письма", - -'tt_topic_settings' => "Тема", -'tt_options' => "Опции", -'tt_poll_settings' => "Опрос", - -'tt_subject' => "Уведомление об ответах на подписанную тему", -'ft_subject' => "Уведомление о новых темах на подписанный форум", - -'upload_failed' => "Произошла ошибка при загрузке файла, в связи с тем, что директория /uploads/, в которую загружаются файлы, имеют некорректные права. Если вы получили эту ошибку, пожалуйста, напишите об этом администратору форума.", - - - -'post_to_quote_txt' => "Здесь вы можете отредактировать цитируемое сообщение", -'submit_poll' => "Создать опрос", - -'submit_new' => "Создать тему", -'enabled' => "Разрешен", -'errors_found' => "ОБНАРУЖЕНЫ СЛЕДУЮЩИЕ ОШИБКИ", -'post_edited' => "Сообщение отредактировано", -'replying_in' => "Ответ в", -'email_address' => "Ваш e-mail адрес", -'no_post' => "Вы должны ввести сообщение", - -'submit_reply' => "Отправить", -'stat_allow_img' => "[IMG] тег: ", -'original_post' => "Оригинальное сообщение", -'html_on' => "Использование HTML разрешено", -'please_log_in' => "Вы не авторизованы для просмотра этого форума", -'reply_added' => "Ваш ответ добавлен", -'no_topic_title' => "Вы должны ввести название темы, более двух символов", -'too_many_emoticons' => "Количество смайлов в сообщении превышает допустимую норму. Уменьшите количество смайлов", -'no_poll_data' => "Нет ни одного пункта в опросе. Такой опрос невозможен!", -'top_txt_new' => "Создание новой темы в: ", -'posting_cond' => "Права сообщений", - -'moderate_topic' => "Тема будет опубликована только после проверки модератором", -'invalid_ext' => "Запрещено использовать на форуме такое расширение для изображений. Правильное расширение: http://www.domain.com/picture.gif, неправильное расширение: http://www.domain.com/picture.one.gif", -'reg_username' => "Ваше имя пользователя", -'upload_title' => "Загрузка файла", -'post_icon' => "Иконки сообщения", -'moderate_post' => "Только после проверки сообщения модератором, оно возможно будет добавлено в эту тему", -'flash_too_big' => "Уменьшите размер Flash, который вы хотите добавить", -'guest_name' => "Введите ваше имя", -'topic_title' => "Название темы", -'flash_url' => "Введенный вами URL для Flash некорректный", -'post_preview' => "Предварительный просмотр", -'non_quotes' => "Количество открытых тегов цитаты, не соответствует количеству закрытых тегов", -'max_length' => "Максимальная длина сообщения в символах:", -'options' => "Опции", -'disabled' => "Запрещено", -'no_file_ext' => "Проверьте, что загружаемый вами файл имеет расширение", -'help_cards' => "Разделы помощи:", -'review_topic' => "Просмотр темы полностью (откроется в новом окне)", - -'editing_post' => "Редактирование сообщения ", -'posting_new_topic' => "Создание новой темы", - -'flash_number' => "Высота и ширина для Flash должны быть в численном значении", -'enable_sig' => "Включить подпись?", -'top_txt_edit' => "Редактирование сообщения в", - -'poll_to_many' => "Количество вариантов ответа в вашем опросе превышает норму. Уменьшите их.", - -'last_posts' => "Последние 10 сообщений [ в обратном порядке ]", -'top_txt_poll' => "Создание опроса", -'too_many_img' => "Количество изображений в сообщении превышает норму допустимого", -'topic_desc' => "Описание темы", - -'no_dynamic' => "Динамические страницы в тегах [IMG] запрещены", - -'post_options' => "Опции сообщения", - -'click_smilie' => "Смайлы", -'button_spell' => "Проверка орфографии", - -'topic_title_long' => "Название темы должно содержать не более 50 символов", - -'new_post_added' => "Ваше сообщение добавлено", -'top_txt_reply' => "Ответ в", -'posted_on' => "Дата", -'post' => "Введите сообщение", -'poll_not_enough' => "Необходимо ввести не менее двух пунктов в опросе", -'post_rules' => "Правила сообщения", - -'post_icon_txt' => "Вы можете выбрать иконку сообщения", -'submit_edit' => "Отредактировать сообщение", - -'enable_emo' => "Включить смайлы?", -'quoting_post' => "Цитируемое сообщение в ", - -'email_title' => "Уведомление об ответе в тему", -'button_preview' => "Предварительный просмотр", - -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_printpage.php b/upload/cache/lang_cache/ru/lang_printpage.php deleted file mode 100644 index 92273055..00000000 --- a/upload/cache/lang_cache/ru/lang_printpage.php +++ /dev/null @@ -1,27 +0,0 @@ - "Пожалуйста, выберите нужный формат", -'powered_by' => "Русская версия ", -'click_toview' => "Нажмите для просмотра темы", - -'end' => "конец", -'forum' => "Форум", -'on ' => "-", -'title' => "Версия для печати темы", -'by' => "Автор", -'start' => "Создал", -'topic' => "Тема", -'tvo_title' => "Опции отображения темы для:", -'o_print_title' => "Версия для печати", -'o_print_desc' => "Тема будет отображена и распечатана в простеньком виде на этой странице.", -'o_html_title' => "HTML версия", -'o_html_desc' => "Вы можете скачать HTML версию этой темы на ваш компьютер. Будет открыто окно для скачивания.", -'o_word_title' => "Версия в формате Microsoft Word", -'o_word_desc' => "Вы можете скачать Word версию этой темы с возможностью дальнейшего редактирования. Будет открыто окно для скачивания.", -'back_topic' => "Вернуться в тему", -'topic_here' => "Нажмите сюда для просмотра этой темы в обычном формате", -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_profile.php b/upload/cache/lang_cache/ru/lang_profile.php deleted file mode 100644 index f9c0434e..00000000 --- a/upload/cache/lang_cache/ru/lang_profile.php +++ /dev/null @@ -1,274 +0,0 @@ - "Просмотр профиля", - - -// 2.2.0 - -'M_1' => "Янв", -'M_2' => "Фев", -'M_3' => "Март", -'M_4' => "Апр", -'M_5' => "Май", -'M_6' => "Июнь", -'M_7' => "Июль", -'M_8' => "Авг", -'M_9' => "Сен", -'M_10' => "Окт", -'M_11' => "Ноя", -'M_12' => "Дек", - -'pp_tab_posts' => "Сообщения", -'pp_tab_topics' => "Темы", -'pp_tab_gallery' => "Галерея", -'pp_tab_blog' => "Блог", - -'op_change_refresh' => "Изменения вступят в силу после последующего просмотра профиля", -'op_dd_none' => "Не уведомлять", -'op_dd_email' => 'Уведомлять по e-mail', -'op_dd_pm' => 'Уведомлять личным сообщением (PM)', -'op_dd_disabled' => 'Выключено — разрешить добавление без подтверждения', -'op_dd_enabled' => 'Включено — добавлять только когда я это разрешил', - -'profile_read_topic' => 'Читать тему', -'profile_in_topic' => 'Тема: ', -'header_personal_info' => "Личная информация", -'born_key' => "Дата рождения:", -'fl_show_who_added_me' => "Показать кто добавил меня", -'fl_show_mutual' => "Показать общих друзей", -'op_add_pm_to_block' => "Добавить в «Черный список ЛС»", - -'err_no_posts_to_show' => "Нет сообщений для отображения.", -'js_img_alt_rate' => 'Нажмите на звездочку для оценки этого пользователя', -'js_gender_male' => 'Мужской', -'js_gender_female' => 'Женский', -'js_gender_mystery' => 'Пол не указан', -'js_saving_comment' => 'Сохранение комментария...', -'js_loading_tab' => 'Загрузка...', -'js_deleting_comment' => 'Удаление комментариев...', - -'m_personal_statement' => 'О себе', -'m_visit_website' => "Посетить мою домашнюю страницу", -'m_go' => "ОК", -'m_dd_with_selected' => "С выбранными", -'m_dd_approve_add' => "Подтвердить и добавить в список", -'m_dd_approve' => "Только подтвердить", -'m_dd_refuse' => "Отказать и удалить", -'m_profile_views' => 'Просмотров профиля:', -'m_profile_views_desc' => "* Просмотры профиля обновляются каждый час", -'m_statement_bbcode' => "Разрешенные BB-коды: [b] [i] [u]", -'m_show_x_friends' => "Показывать x друзей в блоке «Друзья»", -'m_show_x_comments' => "Показывать x комментариев в блоке «Комментарии»", -'m_show_x_visitors' => "Показывать x посетителей в блоке «Просматривали»", -'m_settings_header' => "Настройки", -'m_new_comments' => "Новые комментарии", -'m_new_friends' => "Новые друзья", -'m_member_since' => "Регистрация:", -'m_website_title' => 'Домашняя страница', -'m_website_explain' => 'Адрес домашней страницы должен начинаться с http://', -'m_rate_me' => "Оценить", -'m_friend_remove' => "Удалить из друзей", -'m_friend_add' => "Добавить в друзья", -'m_no_friends' => 'Друзей нет', -'m_view_friends' => "Просмотр всех друзей", -'m_bit_active' => 'Последнее действие:', -'m_bit_posts' => 'сообщений', -'m_title_friends' => "Друзья", -'m_max_chars' => "(400 знаков)", -'m_enter_comment' => "Введите комментарий", -'m_add_comment' => "Добавить", -'m_title_comments' => "Комментарии", -'m_visitors_none' => "профиль не имеет просмотров", -'m_title_visitors' => "Просмотры", -'m_title_content' => 'Содержимое', -'m_tab_settings' => "Настройки", -'m_tab_friends' => "Друзья", -'m_tab_comments' => 'Комментарии', -'m_personal_info' => "Личная информация", -'m_enter_aim' => "Введите ваше имя в AOL", -'m_enter_msn' => "Введите ваше имя в MSN", -'m_enter_icq' => "Введите ваш номер ICQ", -'m_enter_yahoo' => "Введите ваше имя в Yahoo!", -'m_contact_info' => "Контактная информация", -'m_local_time_is' => "Часовой пояс:", -'m_last_seen' => "Последнее посещение:", -'m_stats_title' => "Статистика", -'m_other_info' => "Другая информация", -'m_enter_bdate' => "Введите дату рождения", -'m_bday_unknown' => 'День рождения не указан', -'m_enter_location' => "Введите место жительства", -'m_location_unknown' => "Место жительства не указано", -'m_gender_as_none' => "Не указан", -'m_gender_as_female' => "Женский", -'m_gender_as_male' => "Мужской", -'m_no_gender' => "Пол не указан", -'m_age_unknown' => 'Возраст не указан', -'m_years_old' => "лет", -'m_save_button' => "Сохранить", -'m_friends_list' => "Список друзей", -'m_friends_pending' => "Ожидающие подтверждения", -'m_friends_mutual' => "Общие друзья", -'m_showall_friends' => "Показать всех", -'m_showonline_friends' => "Показать Online", -'m_showoffline_friends' => "Показать Offline", -'m_remove_friend' => "Удалить этого пользователя из списка друзей", -'m_sendpm_friend' => "Отправить личное сообщение этому другу", -'m_approve' => "Подвердить", -'m_requested' => "Запрос добавлен", -'m_lastactive' => "Последнее действие", -'m_pending' => "Подтвердить", -'m_nofriends' => "Нет друзей для отображения", -'m_active' => "Последнее действие", -'m_manage_friends' => "Менеджер друзей", -'m_manage_friends_list' => "Менеджер вашего списка друзей", - -'m_friend_str_1' => "У вас", -'m_friend_str_2' => "друзей, ожидающих подтверждение.", - -'m_comment_app' => "Опубликовать выбранные комментарии", -'m_comment_unapp' => "Скрыть выбранные комментарии", -'m_comment_delete' => "Удалить выбранные комментарии", -'m_go_button' => " ОК ", -'m_no_comments' => "Другие пользователи не оставили комментарии для", -'m_confirm' => "Пожалуйста, подтвердите это действие", - -'pp_photo_desc' => "Максимальный размер %s на %s и не более %s кб (%s).
Большое изображение будет отмасштабировано до нужных размеров.", -'pp_no_photo_upload_permission' => "Вы не можете загружать фотографию", -'pp_upload_failed' => "Неудачная загрузка. Обратитесь к администрации форума для помощи.", -'pp_invalid_file_extension' => "Загрузка файлов с таким расширением запрещена.", -'pp_upload_to_big' => "Размер загружаемого файла превышает норму", - -'m_your_pic' => "Ваша картинка", -'m_delete_pic' => "Удалить изображение", - -'rating' => "Рейтинг", -'options' => "Опции", - -'m_personal_statement' => "О себе", -'m_char_limit' => "(Максимум 300 символов)", -'m_notifications' => "Опции уведомлений", -'m_new_comments' => "Новые комментарии", -'m_choose_comm_type' => "Выберите тип уведомления о новых комментриях", -'m_new_friends' => "Новые друзья", -'m_choose_friend_type' => "Выберите тип уведомления о новых друзьях", -'m_mod_type' => "Опции модерации", -'m_choose_cmod_type' => "Выберите тип модерации для новых комментариев", -'m_choose_fmod_type' => "Выберите тип модерации для новых друзей", -'m_save_settings' => " Сохранить настройки ", -'m_delete_comment' => "Удалить комментарий", - -'m_no_statement' => "не указал(а) ничего о себе", - -'m_profile_title' => "Профиль", - -//2.1.x -'tt_warn_add' => "Добавить предупреждение", -'tt_warn_minus' => "Снять предупреждение", - -'mygallery' => 'Моя галерея', -'no_photo_avail' => "Фото недоступно", - - -//2.1.2 -'open_menu' => "Открыть меню", -'get_photo' => "Фотография", - -// 2.1 - -'dname_title' => "История отображаемого имени", -'dname_window_title' => "История отображаемого имени для:", -'dname_name_from' => "От", -'dname_name_to' => "К", -'dname_date' => "Дата изменения", -'warn_title' => "Предупреждения:", - -// build #003 -'lichnoe_soobshenie' => "Личное сообщение", - -// 2.0 -'profile_options' => "Опции профиля", -'find_member_topics' => "Найти темы пользователя", -'website_addr' => 'Домашняя страница', -'supmod_edit_member' => 'Редактировать пользователя', -'ignore_user' => 'Игнорировать сообщения пользователя', -'last_active' => 'Последнее посещение', -'last_click' => 'Статус', -'online_offline' => "Offline", - -'wol_index' => 'Просмотр главной страницы форума', -'wol_topic' => 'Находится в теме', -'wol_forum' => 'Находится в форуме', -'wol_ucp' => 'Находится в своих личных данных', -'wol_profile' => 'Просмотр профиля', -'wol_search' => "Поиск", - -// 1.2 - -'rating_level' => "Рейтинг", -'warn_level' => "Предупреждения", -'photo_title' => "Фото", -'cartochka' => "Карточка пользователя", -'ac_close' => "Закрыть страницу", -'ac_download' => "Скачать страницу", - - -'user_local_time' => "Часовой пояс пользователя", -'head_addit' => "Дополнительная информация", -'head_title' => "Просмотр профиля", - -'head_contact' => "Контактная информация", - -'head_posts' => "Информация о сообщениях", - -'head_info' => "Информация пользователя", - -'no_info' => "Нет данных", - -'click_here' => "Отправить", -'private' => "E-mail скрыт", - -'active_stats' => "Статистика активности", - -'total_posts' => "Всего сообщений", -'joined' => "Регистрация", -'posts_per_day' => "за день", -'total_percent' => "всех сообщений форума", -'fav_forum' => "Наибольшая активность в", -'fav_posts' => "сообщений", -'fav_percent' => "от всех сообщений этого пользователя", - -'communicate' => "Связь", -"info" => "Информация", -'post_detail' => "Данные о сообщениях", - -'email' => "Отправить письмо на e-mail", -'aim' => "AIM", -'icq' => "ICQ", -'yahoo' => "Yahoo!", -'msn' => "MSN", -'pm' => "Отправить сообщение", - -'page_title' => "Просмотр профиля", - -'find_posts' => "Найти сообщения пользователя", -'add_to_contact' => "Добавить в список контактов", - -'edit_my_sig' => "Изменить подпись", -'edit_profile' => "Изменить личные данные", -'edit_avatar' => "Опции аватара", - - -'mgroup' => "Группа", -'mtitle' => "Статус", -'homepage' => "Домашняя страница", -'birthday' => "Дата рождения", -'location' => "Место жительства", -'interests' => "Интересы", -'avatar' => "Аватар", -'siggie' => "Подпись", - - -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_register.php b/upload/cache/lang_cache/ru/lang_register.php deleted file mode 100644 index 98e71ec7..00000000 --- a/upload/cache/lang_cache/ru/lang_register.php +++ /dev/null @@ -1,247 +0,0 @@ - "После регистрации ваша учетная запись будет отправлена администрации для рассмотрения и последующего одобрения.", - -'dname_text' => "Это имя будет использоваться в сообщениях и темах. От 3 до %s символов. Запрещенные символы: [ ] | ; , $", -'reg_error_dname_len' => "Необходимо ввести отображаемое имя от 3 до %s символов", -'reg_error_username_none' => "Необходимо ввести имя пользователя от 3 до %s символов", -'reg_error_no_name' => "Необходимо ввести отображаемое имя от 3 до %s символов", -'user_name_text' => "Это имя будет использоваться только для авторизации [от 3 до %s символов]", - -'lp_text' => "Введите ваше имя пользователя в форме ниже. Имя пользователя не чувствительно к регистру.
После заполнения формы, вам на электронную почту будет отправлено письмо с дальнейшими инструкциями по восстановлению пароля.", -'lp_text_email' => "Введи ваш адрес электронной почты. Адрес электронной почты не чувствителен к регистру.
После заполнения формы, вам на электронную почту будет отправлено письмо с дальнейшими инструкциями по восстановлению вашего пароля.", -'las_input_text' => "Введите в поле код из 6 символов, отображенных в виде изображения. Если вы не можете прочитать код с изображения, нажмите на изображение для генерации нового кода.", - -// 2.2: НОВОЕ -'form_title_attention' => "Внимание!", -'reg_error_email_invalid' => "Вы ввели не существующий e-mail адрес
или он содержит один из запрещенных символов: [ ] ; # & ! * ' " < > % ( ) { } ? \", -'reg_error_dname_only' => "Отображаемое имя может содержать только следующие символы: ", -'reg_error_uname_only' => "Имя пользователя может содержать только следующие символы: ", -'lp_random_pass_subject' => "Ваш новый пароль", -'lp_random_pass' => "Нажмите кнопку ниже для отправки нового пароля на ваш адрес электронной почты.", -'lpass_text_random' => "На ваш адрес электронной почты был отправлен новый пароль к учетной записи.", - - -//2.1.3 -'reg_error_email_ban' => "E-mail адрес, который вы используете, не разрешен на этом форуме. Пожалуйста выберите другой.", -'new_registration_email' => "Регистрация на ", -'new_registration_email1' => "Новый пользователь на ", - -//2.1.2 -'alt_codebit' => "Включите эту картинку", -'alt_loadingimg' => "Включите эту картинку", - -// Добавлено 2.1 -'coppa_bounce' => 'Вы не можете продолжить без отмены вашей регистрации COPPA или без завершения регистрационной формы COPPA', - -'clogin_submit' => "Продолжить", -'clogin_done' => "Вы вошли в", -'clogin_title' => "Добро пожаловать в наш форум", -'clogin_text' => "Так как вы вошли впервые, мы требуем заполнения еще некоторых данных прежде, чем продолжить", -'dname_name' => "Введите желаемое отображаемое имя ", - -'reg_error_no_pass' => "Пароль не указан", -'reg_error_pass_nm' => "Введенные пароли не соответствуют друг другу. Перепроверьте введенные данные", -'reg_error_chars' => "Отображаемое имя содержит один или несколько запрещенных символов: [ ] | ; ,", -'reg_error_taken' => "Введенное отображаемое имя уже используется другим пользователем", -'reg_error_username_taken' => "Введенное имя пользователя уже используется другим пользователем", -'reg_error_email_missing' => "E-mail адрес не указан", -'reg_error_email_nm' => "Введенные e-mail адреса не идентичны", -'reg_error_email_taken' => "Введенный e-mail уже используется другим пользователем", - -'user_admin_validation' => "После успешной активации ваша учетная запись будет предоставлена администратору для проверки и подтверждения.", - -# Changed 2.1 - -'user_name' => "Введите желаемое имя пользователя (для авторизации)", - -# Already in 2.0 - -// #build 003 -'enable_this_picture' => "Включите эту картинку", - -'subsm_title' => 'Пакеты подписок', -'subsm_none' => '--NONE--', -'subsm_na' => 'N/A', -'subsm_more' => 'Дополнительная информация', -'subsm_no_desc' => "Не выбран пакет для покупки", -'subsm_close' => "Закрыть", -'tc_title' => "Правила и положения по регистрации", -'tc_text' => 'Для продолжения регистрации, вы должны принять нижеследующее:', -'tc_regbut' => "Регистрация", -'op_email_title' => "Получение писем", -'op_email_text' => "Администрация и пользователи смогут отправлять вам письма на e-mail.", -'op_email_ad' => "Получать письма от администраторов", -'op_email_mem' => "Получать письма от пользователей", -'op_tz_title' => "Настройки часового пояса", -'op_tz_text' => "Выберите часовой пояс, в котором вы находитесь.", -'op_tz_dst' => 'Автоматический переход на летнее время?', -'submit_text' => "Я соглашаюсь с условиями регистрации и желаю зарегистрироваться", - -'cf_optional' => "Дополнительная информация", - -'las_title' => "Защитный код", -'las_img' => 'Ваш защитный код', -'las_img_text' => 'Если вы не видите никаких чисел или видите битое изображение, обратитесь к администратору форума для устранения проблемы.', -'las_input' => 'Введите защитный код', - -'las_numbers' => "Ваш защитный код
Если вы не видите никаких чисел или видите битое изображение, обратитесь к администратору форума для устранения проблемы.", -'las_text' => "Введите защитный код
Введите 6 цифр, отображенных выше в виде изображения.
Примечание: На изображении только цифры, к примеру '0' является нулем, а не буквой 'O'.", - -'user_name_title' => "Имя пользователя (login):", - -'password_title' => "Пароль:", -'password' => "Введите пароль", -'password_text' => "Длина пароля — от 3 до 32 символов, включая пробелы", -'password_confirm' => "Подтвердите пароль", -'password_confirm_text' => "Повторите пароль: пароли должны полностью совпадать", - -'email_address_title' => "Ваш e-mail адрес:", -'email_address_text' => "Необходимо ввести реальный e-mail адрес", -'email_address_confirm' => "Подтвердите e-mail адрес", -'email_address_confirm_text' => "Повторите e-mail адрес: адреса должны полностью совпадать", - -'email_address' => "Введите ваш e-mail адрес", - -'err_complete_form' => "Необходимо заполнить все обязательные поля формы", -'err_cf_to_long' => "Длина введенных в одно из полей данных, превышает норму допущенного", -'err_invalid' => "Одно из заполненных полей, содержит неверные данные. Пожалуйста, проверьте и произведите исправления.", - -// добавлено RC2 - -'incorrect_thing_name' => "Некорректное имя — %s. Возможно вы использовали запрещенные символы", -'thing_name_taken' => " %s, к сожалению выбранное вами имя пользователя уже используется. Выберите другое имя", - -'rv_title' => "Запрос на повторную отправку письма для активации", -'rv_process' => "Процесс переактивации", -'rv_done' => "Запрос на переактивацию принят
Письмо для переактивации отправлено на ваш e-mail адрес. Через несколько минут проверьте Ваш почтовый ящик.", -'rv_ins' => "Ниже введите Ваше имя пользователя, для поиска незавершенных активаций. В случае обнаружения таковых, на ваш e-mail адрес, указанный при регистрации, будет повторно отправлено письмо для активации.", -'rv_name' => "Зарегистрированное имя пользователя", -'rv_go' => "Найти и выслать", - -'lpass_text' => "Письмо с содержанием инструкций по активации отправлено вам на e-mail. В течение 10 минут (возможно и раньше), вы получите это письмо.", -'lpf_title' => "Восстановление забытого пароля", -'lpf_pass1' => "Введите новый пароль", -'lpf_pass11' => "Длина пароля — от 3 до 32 символов", -'lpf_pass2' => "Подтвердите пароль", -'lpf_pass22' => "Пароли должны совпадать", - -'err_user_start_zero' => "Имя пользователя не должно начинаться с нуля (0)", -'errors_found' => "Обнаружены следующие ошибки", -'err_email_address_match' => "Введенные e-mail адреса не идентичны", -'err_no_username' => "Необходимо ввести имя пользователя от 3 до 32 символов", -'err_no_password' => "Необходимо ввести пароль от 3 до 32 символов", -'err_pass_match' => "Введенные пароли не соответствуют друг другу. Перепроверьте введенные данные", -'err_invalid_email' => "Введенный e-mail адрес является нереальным e-mail адресом", -'err_user_exists' => "Такое имя пользователя уже зарегистрировано на форуме. Выберите другое имя.", -'err_email_exists' => "Такой e-mail адрес уже используется на форуме. Введите другой e-mail.", -'err_reg_code' => "Код регистрации не соответствует отображенному. Сгенерирован новый код регистрации. Повторите попытку.", -'err_no_validations' => "Нет запросов на подтверждение для этого пользователя. Проверьте имя и попробуйте снова.", -'email_reg_subj' => "Регистрация для", -'ne_subject' => "Запрос на изменение е-mail адреса для", - -'ras_title' => "Защита от массовых регистраций", -'ras_numbers' => "Ваш защитный код
Если Вы не видите никаких чисел или видите битое изображение, обратитесь к администратору форума для устранения проблемы.", -'ras_text' => "Введите защитный код
Для блокирования различных программ, регистрирующих новые учетные записи, введите 6 цифр, отображенных выше в виде изображения.
Примечание: В изображении только цифры, к примеру '0' является нулем, а не буквой 'O'.", - -'coppa_title' => "Регистрация COPPA", -'coppa_info' => "Информация COPPA", -'coppa_form' => "Форма COPPA", - -'coppa_link' => "Нажмите на ссылку, соответствующую дате вашего рождения", -'coppa_date_before' => "После или до", -'coppa_date_after' => "После", -'coppa_form_text' => "Родитель или опекун должен заполнить и переслать по факсу подписанный <#FORM_LINK#>, администратору форума для продолжения регистрации ребенка младше 13 лет.

Для более подробной информации, обратитесь на:", -'coppa_link_form' => "форма разрешения", - -'cp2_text' => " Все пользователи возрастом до 13 лет, обязаны иметь разрешение родителей, для дальнейшего участия и пользования этими форумами.

Если вы хотите продолжить процесс регистрации для участия в форумах до получения разрешения родителей, нажмите на ссылку ниже. Но, тем не менее запомните, что процесс регистрации не будет завершен, пока мы не получим подписанную форму ваших родителей/опекунов.", -'cp2_continue' => "Далее", -'cp2_title' => "Наше регистрационное соглашение COPPA", -'cp2_cancel' => "Отмена", - -'cp_success' => "Ваша регистрация принята! Сейчас вы будете перемещены к форме разрешения", - -'cpf_title' => "Форма разрешения COPPA", -'cpf_perm_parent' => "Инструкции для родителей или опекунов

Пожалуйста, распечатайте эту форму, заполните ее и перешлите по факсу на наш номер. Если факса не имеется, вы можете переслать эту форму по нижеуказанному адресу.", -'cpf_fax' => "Номер факса:", -'cpf_address' => "Адрес для писем:", - -'cpf_sign' => "Просим вас подписать нижеследующую форму и переслать ее нам.

Я подтверждаю, что информация, предоставленная ребенком верна. Я соглашаюсь, что информация профиля может быть изменена только после ввода пароля. И я принимаю то что, я могу затребовать удаления этого профиля в любой момент.", - -'cpf_name' => "Полное имя родителя/опекуна", -'cpf_relation' => "Отношение к ребенку", -'cpf_signature' => "Подпись", -'cpf_email' => "E-mail адрес", -'cpf_phone' => "Номер телефона", -'cpf_date' => "Дата", - - -'lost_pass_form' => "Форма восстановления пароля", -'lp_header' => "Как восстановить пароль", - -'lp_send' => "Далее", - -'lp_user_name' => "Введите ваше имя", -'lp_email_or' => "ИЛИ Введите ваш e-mail адрес", - -'lp_subject' => "Информация о восстановлении забытого пароля", -'lp_email_address' => "Введите ваш e-mail адрес", - -'lp_redirect' => "Данные для восстановления пароля отправлены. Сейчас вы будете перемещены к форме активации.", - -'activation_form' => "Форма активации", - -'registration_form' => "Форма регистрации", -'user_validate_text' => "Администратор форума включил проверку всех регистрируемых пользователей. После регистрации и проверки вашей регистрации администратором, вы получите письмо на e-mail от администратора, с инструкциями о завершении регистрации. Только после этого вВы сможете авторизоваться на форуме под своим именем и паролем.", -'js_blanks' => "Вы должны заполнить всю форму", -'reg_header' => "Инструкция по регистрации", -'intro_proceed' => "Переход к авторизации", -'js_no_check' => "Перед продолжением регистрации, вы должны прочесть правила форума и если вы согласны и принимаете правила, отметьте окошко «Я ознакомился...». В противном случае регистрация будет отменена.", -'title_reg' => "Регистрация", -'email_validate_text' => "Вам будет отправлено письмо на e-mail адрес, указанный при регистрации. После внимательного ознакомления с письмом, вы должны будете подтвердить регистрацию, пройдя по ссылке, указанной в письме.", -'done_reg_1' => "Ваша учетная запись активирована! Переход к правилам форума", -'done_reg_2' => "Ваша учетная запись активирована! Переход к авторизации", -'board_rules' => "Правила форума", -'dumb_text' => "Проверьте, что вы заполнили форму полностью. Необходимая информация отправлена вам на e-mail адрес.", -'registration_agree' => "Регистрационное соглашение", -'agree_submit' => "Я ознакомился с правилами и условиями и принимаю их", -'std_text' => "Повторно проверьте, что вы заполнили все поля формы. Особое внимание уделите полю пароль.", - -'reg_success' => "Регистрация завершена", -'thank_you' => "Спасибо", -'registration_process' => "Регистрация", -'preview_reg_text' => "Ваша регистрация успешно завершена. Администрация форума должна проверить вашу регистрацию перед тем, как вы получите право отправлять сообщения. Администрация будет уведомлена о вашей регистрации.", -'dumb_email' => "Введите ваш e-mail адрес, указанный при регистрации", -'complete_form' => "Заполните все поля формы", -'auth_text' => "Запрос на регистрацию пользователя принят.
На указанный при регистрации e-mail адрес отправлено письмо с инструкциями по активации вашей учетной записи.
Указанный вами e-mail:", -'submit_form' => "ЗАРЕГИСТРИРОВАТЬСЯ", -'nav_reg' => "Регистрация", -'dumb_submit' => "Продолжить", -'dumb_header' => "Активация учетной записи", - -'val_key' => "Ключ активации:", -'user_id' => "ID пользователя:", - - -'email_address_two' => "Повторите свой e-mail адрес", - -'click_wrap' => "Пожалуйста уделите немного внимания и прочтите краткие правила, указанные ниже. Если вы принимаете их и желаете продолжить процесс регистрации, отметьте свое согласие и нажмите кнопку «Регистрация». Для отмены регистрации нажмите кнопку «Назад» в вашем браузере. - -Пожалуйста помните, что мы не отвечаем на все публикуемые сообщения. - -На форуме отсутствует предварительная проверка открываемых тем и публикаций. Как только вы отправляете сообщение — оно сразу публикуется на форуме. Администрация форума снимает с себя ответственность за содержание сообщений, публикуемых пользователями. Ответственность за содержание сообщения несет только его автор. - -На форуме запрещено: -отправка сообщений не по содержанию форума/темы, оскорбления и угрозы в адрес пользователей форума, пропаганда расовой, национальной и религиозной вражды; реклама и самореклама; -ненормативная лексика, сексуальные домогательства и т.д. - -Нарушители правил будут строго наказаны модераторами или администраторами форума и им будет закрыт доступ на форум. - -Согласившись с правилами, вы соглашаетесь не публиковать любой материал, защищенный авторским правом, если авторское право не принадлежит вам.", - -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_search.php b/upload/cache/lang_cache/ru/lang_search.php deleted file mode 100644 index 64af4977..00000000 --- a/upload/cache/lang_cache/ru/lang_search.php +++ /dev/null @@ -1,164 +0,0 @@ - 'Ваш поисковый запрос содержит более %s символов', - - -'search_off' => "В настоящий момент администрация отключила поисковую машину. Пожалуйста, попробуйте позже.", -'no_xml_permission' => "У вас недостаточно прав для использования функций поиска.", - - -'nav_at' => "Активные темы", -'nav_aut' => "Все темы пользователя", - -// 2.1 (НОВОЕ) - -'xml_nopost' => 'Новых сообщений не найдено', -'xml_char' => 'Некоторые или все заданные ключевые слова содержат менее, чем %s символов или содержат некорректные символы', -'xml_flood' => 'Включен флуд-контроль. Пожалуйста, подождите не менее %s, прежде чем снова воспользоваться поиском', -'xml_nomatches' => 'Ваш поиск для %s не имеет результатов', -'xml_matches' => 'Ваш поиск для %s нашел не менее %s сообщений.
Просмотр результатов »', - -//2.0.2 - -'too_many_children_for_santa' => '(Результаты поиска ограничены до первого %num)', - -'active_start' => 'Показать активные темы за:', -'active_today' => 'сегодня', -'active_week' => 'эту неделю', -'active_week2' => 'последние 2 недели', -'active_month' => 'этот месяц', -'active_month3' => 'последние 3 месяца', -'active_year' => 'этот год', -'active_go' => 'ок', -'no_search_topics' => "По выбранным вами параметрам, нет ни одной темы", - -'you_search_for' => "Вы искали:", -'no_results_so_there_ha_ha' => "К сожалению, Ваш поиск не дал никаких результатов.
Попробуйте расширить параметры поиска, используя другое ключевое слово или изменением формата поиска.
Не забывайте про использование маски '*' для увеличения кол-ва совпадений. К примеру, введя слово Ябло*, будут найдены совпадения по словам 'яблоко', 'яблочный' и т.д.", -'search_again' => "Повторить поиск?", - -'mark_search_as_read' => "Отметить все форумы прочитанными и вернуться на главную страницу", -'your_results' => "Ваши результаты", - -//added in 1.2 -'be_use' => "Использование", -'be_means' => "Средства", - -'be_u1' => "яблоко банан", -'be_m1' => "Поиск сообщений, содержащих одно из этих слов", -'be_u2' => '+яблоко +сок', -'be_m2' => 'Поиск сообщений, содержащих оба этих слова', -'be_u3' => '+яблоко -сок', -'be_m3' => "Поиск сообщений, содержащих слово 'яблоко' и не содержащих слова 'сок'", -'be_u4' => "ябло*", -'be_m4' => "Поиск сообщений, содержащих слово 'яблоко' и/или 'яблочный'", -'be_u5' => '"Некоторые слова"', -'be_m5' => "Поиск сообщений, содержащих фразы 'некоторые слова являются мудрыми', 'некоторые слова' и не содержащих фразу 'некоторые нецензурные слова'", - -'be_link' => "Расширенная помощь по использованию", -'be_ttip' => "Ознакомьтесь получше, как пользоваться логическим поиском", -'nav_au' => "Все сообщения пользователя", -'sp_single' => "Единственная страница", -'so_more_opts' => "Расширенный поиск", -'so_less_opts' => "Простой поиск", -'search_where' => "Искать", -'result_type' => "Отображение результатов", -'all_forums' => "» Все форумы", -'location_g' => "Позиция", -'g_b_home' => "Главная страница форума", -'g_relevance' => "Точность", -'g_simple_title' => "Страница поиска форума", -'g_new_window' => "Новое окно", -'g_searched_for' => "Поиск в форуме", -'g_results' => "Результаты", -'g_of_about' => "в виде", -'g_search_took' => "Поиск", -'g_seconds' => "секунды", -'sf_show_me' => "Показать", -'sf_most_r_f' => "самые точные", -'sf_most_date' => "самые последние вверху", -//--- ДОБАВЛЕНО В B3 ----- - -'is_sub' => " (Подкатегория)", -'search_in_subs' => "Искать в подфорумах?", - -///--- END B3 --------- - -'rp_topic' => "Тема:", -'rp_post' => "Просмотр сообщения:", -'rp_forum' => "Форум:", -'rp_author' => "Автор", -'rp_replies' => "Ответов:", -'rp_hits' => "Просмотров:", -'rp_message' => "Сообщение", -'rp_postedon' => "Отправлено:", - -'joinname_true' => "Поиск по ключевым словам и имени", -'joinname_false' => "Поиск только по имени", - -'nav_since_lv' => "Сообщения с Вашего последнего посещения", -'nav_lt' => "Ваши последние 10 сообщений", - -'results_post' => "Результаты в виде сообщений", -'results_topics' => "Результаты в виде тем", - -'search_redirect' => "Поиск завершен. Подождите, сейчас вы будете перемещены к результатам поиска.", - -'search_pages' => "Страниц:", -'search_title' => "Поиск", -'key_search' => "Поиск по ключевым словам", -'mem_search' => "Фильтр по имени пользователя (дополнительно)", -'keysearch_text' => "Введите ключевое слово или фразу для поиска.", -'match_name_ex' => "Искать полное имя", -'match_name_pa' => "Искать часть имени", -'keywords_title' => "Слова для поиска", - -'search_options' => "Настройки поиска", -'search_forums' => "Поиск в форуме", -'search_cats' => "Поиск в категории", -'search_refine' => "Дополнительные настройки", - -'search_results' => "Результаты поиска", -'search_form' => "Форма поиска", - -'h_forum_name' => "Форум", - -'se_simple' => "Простой поиск", -'se_advanced' => "Расширенный", - -'in_posts' => "В сообщениях", -'in_topics' => "В заголовках", - -'search_from' => "Искать сообщения за", - -'do_search' => "Найти", - -'today' => "Сегодня", -'this_week' => "Последние 7 дней", -'this_month' => "Последние 30 дней", -'this_60' => "Последние 60 дней", -'this_90' => "Последние 90 дней", -'this_180' => "Последние 180 дней", -'this_year' => "Последние 365 дней", -'ever' => "Все время", -'older' => "и более старые", -'newer' => "и более новые", -'and' => "и", - -'sort_results' => "Сортировать результаты по", - -'last_date' => "Дате обновления", -'number_topics' => "Количеству ответов", -'poster_name' => "Имени автора", -'forum_name' => "Названию Форума", - -'in' => "в", - -'ascending' => 'в порядке возрастания', -'descending' => 'в порядке убывания', - -'order' => 'сортировка', - -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_stats.php b/upload/cache/lang_cache/ru/lang_stats.php deleted file mode 100644 index cba88962..00000000 --- a/upload/cache/lang_cache/ru/lang_stats.php +++ /dev/null @@ -1,40 +0,0 @@ - "Кто писал сообщения в:", -'no_forums' => "Обзор форумов (%s всего)", - -'who_poster' => "Автор", -'who_posts' => "Сообщений", -'who_go' => "Закрыть окно и открыть тему", - -'todays_posters' => "10 авторов сегодня", -'member' => "Пользователь", -'member_posts' => "Всего сообщений", -'member_today' => "Сообщений сегодня", -'member_joined' => "Регистрация", -'member_percent' => "% сегодняшних сообщений", -'total_today' => "Всего сообщений сегодня: ", -'no_info' => "Нет доступной информации", - -'top_poster_title' => "10 авторов сегодня", - - -'forum_leaders' => "Администрация", - -'leader_admins' => "Администраторы", -'leader_global' => "Супермодераторы", -'leader_mods' => "Модераторы", - - -'leader_name' => "Имя", -'leader_email' => "E-mail", -'leader_aol' => "AOL", -'leader_icq' => "ICQ", -'leader_location' => "Место жительства", -'leader_forums' => "Форумы", -'leader_all_forums' => "Все форумы", - -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_subscriptions.php b/upload/cache/lang_cache/ru/lang_subscriptions.php deleted file mode 100644 index 781457d7..00000000 --- a/upload/cache/lang_cache/ru/lang_subscriptions.php +++ /dev/null @@ -1,83 +0,0 @@ - "Pay with NOCHEX now", -'paywith_paypal' => "Make payments with PayPal - it's fast, free and secure!", -'paywith_protx' => "Pay Using Protx", -'paywith_gen' => "Purchase", -'choose_another_pkg' => "Choose Another Package", -'cancel_purchase' => "Cancel Purchase & View Forums", -'no_expire' => "Lifetime (Never Expires)", -'msg_reg_title' => "Thanks for registering!", -'msg_reg_text' => "During registration, you opted to purchase a subscription package.
Please review the details below and select from the payment methods below to confirm your choice.", -'msg_gen_title' => "Subscription Packages", -'msg_gen_text' => "Thanks for visiting our subscription packages screen.
Please select from a package below to proceed to choose from the available payment options.", -'msg_force_title' => "Please Purchase a Subscriptions Package", -'msg_force_text' => "We require that you purchase a subscriptions package before you are granted full access to this forum.", -'cc_currency_in' => "All prices in", -'cc_change' => "Change", -'man_tick_title' => "Please print this ticket off or copy the information and include it with your payment", -'man_mem' => "Member Name", -'man_mem_id' => "Member ID", -'man_email' => "Member Email", -'man_trans_id' => "Trans ID", -'man_sub' => "Sub Title", -'man_pay' => "Payment Enclosed", -'man_title' => "Remittance Ticket", -'gw_upgrade' => "Upgrade", -'gw_protx' => "Click the button below to complete this order via Protx's website", -'gw_paypal' => "Click the button below to complete this order via PayPal's website. All costs will be converted into USD for PayPal's website", -'gw_nochex' => "Click the button below to complete this order via NOCHEX's website. All costs will be converted into GBP for NOCHEX's website", -'gw_safshop' => "Click the button below to complete this order via Safshop's website. All costs will be converted into USD for Safshop's website", -'gw_authorize' => "Click the button below to complete this order via our secure online payment page.", -'post_manual' => "You have selected to pay by post. When you click the button below, your order will be marked as 'Pending' and a new window will open containing a ticket you can print off and include with the payment. This means that you will not be able to use the subscription until your payment has been received and manually verified.", -'post_manual_more' => "Please send the above amount in the correct currency to:
%s
%s
%s
%s
%s


If you require currency conversion, please visit this website.", -'gw_manual' => "Click here to continue...", -'sc_complete' => "Completing the order...", -'sc_upgrade_title' => "Upgrade Confirmation", -'sc_normal_title' => "Purchase Confirmation", -'sc_upgrade_explain' => "Please review the order details below before continuing.", -'sc_upgrade_string' => "You have chosen to upgrade from %s to %s which is due to expire on %s.
The cost for this upgrade is %s and your package will then end on %s.

Please select a payment method below and continue to the next step.", -'sc_normal_string' => "You have chosen to purchase subscription %s.
The cost for this subscription is %s.", -'sc_available_methods' => "Available Payment Methods", -'sc_method' => "Payment Method", -'s_page_title' => "Subscriptions Control Panel", -'s_current_subs' => "Your Current Subscription", -'s_current_explain' => "Details of the package that you are currently subscribed to.", -'s_dead_subs' => "Your Expired Subscriptions", -'s_dead_explain' => "This is a reference of all past or cancelled subscriptions.", -'s_continue_button' => "Continue to select a payment method...", -'s_continue_button2' => "Continue...", -'s_upgrade_subs' => "Upgrade to a new subscription", -'s_upgrade_explain' => "You can upgrade to any of the following subscriptions below. You will only need to pay the balance and when payment has cleared your new subscription will replace the current until the original expiry date.", -'s_started' => "Start Date", -'s_end' => "End Date", -'s_paid' => "Paid", -'s_status' => "Status", -'s_transid' => "ID", -'s_balance_cost' => "Balance to pay", -'s_current_bottom' => "If you have any questions about your current or past subscriptions, you should contact a member of the administrative team who will be able to deal with any enquiries you might have.", -'s_available_subs' => "Your Available Subscriptions", -'s_detail' => "Details", -'s_duration' => "Duration", -'s_cost' => "Cost", -'s_explain' => "To subscribe, simply select the radio button next to your subscription choice and then choose which payment method you wish to use below. Clicking on the continue button will bring you to a confirmation screen and may ask for more details depending on which payment method you've chosen.", -'pay_paid' => "Paid", -'pay_failed' => "Failed", -'pay_pending' => "Pending", -'pay_expired' => "Expired", -'pay_dead' => "Cancelled", -'time_y' => "Year", -'time_m' => "Month", -'time_d' => "Day", -'time_w' => "Week", -'timep_y' => "Years", -'timep_m' => "Months", -'timep_d' => "Days", -'timep_w' => "Weeks", -'gw_authorizenet' => "Click the button below to complete this order via our secure online payment page.", - -); - -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_tar.php b/upload/cache/lang_cache/ru/lang_tar.php deleted file mode 100644 index d49819eb..00000000 --- a/upload/cache/lang_cache/ru/lang_tar.php +++ /dev/null @@ -1,31 +0,0 @@ - "Ошибка распаковки файлов: директория (%s) не существует", -'error_tar2' => "%s не директория", -'error_tar3' => "Невозможно найти %s", -'error_tar4' => "ВНИМАНИЕ: %s существует, но это не директория", -'error_tar5' => "ОШИБКА: ошибка при смене директории на %s!", -'error_tar6' => "Невозможна запись в %s", -'error_tar7' => "%s существует, но это не директория", -'error_tar8' => "Невозможно обратиться к именам", -'error_tar9' => "Невозможно обратиться к системным ссылкам", -'error_tar11' => "Невозможно обратиться к файлам устройства", -'error_tar12' => "Обнаружен неизвестный тип", -'error_tar13' => "ОШИБКА: CHMOD %s на %s не применены!", -'error_tar14' => "Ошибка: Статистика не получена на %s", -'error_tar15' => "ОШИБКА: Невозможно открыть %s", -'error_tar16' => "Не было указано имя файла или путь для создания нового tar файла", -'error_tar17' => "Нет данных для записи в новый tar файл", -'error_tar18' => "Для имени файла %s превысила допустимый предел GNU Tape ARchives", -'error_tar19' => "Длина пути к файлу превысила допустимый предел GNU Tape ARchives", -'error_tar21' => "При попытки прочитать файл обнаружено, что имя файла не указано", -'error_tar22' => "Невозможно найти файл ", -'error_tar23' => "Невозможно открыть %s для чтения", -'error_tar24' => "Ошибка чтения tar файла", - - -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_topic.php b/upload/cache/lang_cache/ru/lang_topic.php deleted file mode 100644 index 6f8a2131..00000000 --- a/upload/cache/lang_cache/ru/lang_topic.php +++ /dev/null @@ -1,223 +0,0 @@ - "Рейтинг", -'group_icon' => "Иконка группы", - -// 2.2 - -'reason_for_edit' => 'Причина редактирования', -'js_rate_me' => "Рейтинг:", -'js_img_alt_rate' => 'Нажмите на звездочку для оценки этой темы', -'dd_view_profile' => 'Просмотр профиля', -'dd_remove_friend' => 'Удалить из друзей', -'dd_add_friend' => 'Добавить в друзья', -'dd_send_pm' => 'Отправить сообщение', -'dd_find_posts' => "Найти сообщения пользователя", -'dd_find_topics' => "Найти темы пользователя", - -'you_have_not_rated' => 'нет', -'you_have_rated_x' => 'Ваша оценка:', -'total_ratings' => 'Всего оценок:', -'poll_noview_guest' => "Вы не можете просмотреть результаты опроса, не проголосовав в нем. Пожалуйста, авторизуйтесь и проголосуйте, чтобы увидеть результаты этого опроса.", -'js_no_empty_post' => "Вы не можете публиковать пустое сообщение", -'to_post_alt' => "сообщение", - - -//2.1.2 -'add_selected_text' => "Добавить выделенный текст как цитату", - - -// 2.1.1 - -'js_error_no_permission' => "Извините, но вам не разрешено редактировать это сообщение", - -// 2.1 - -'dd_display_modes' => "Режимы отображения", -'dd_rate_button' => "Оценить", - -'announce_title' => "Объявление", -'click_for_mod' => "Для выбора этой темы для модерирования нажмите сюда", - -'outline_posts_topic' => "Сообщений в этой теме", -'ignore_first_line' => "Вы выбрали игнорирование всех сообщений от:", -'ignore_view_post' => "Просмотр этого сообщения", -'ignore_unignore' => "Не игнорировать", - -'edit_full_title' => 'Полное редактирование', -'edit_full_desc' => 'Полное редактирование со всеми опциями', -'edit_quick_title' => 'Быстрое редактирование', -'edit_quick_desc' => 'Быстро изменить это сообщение с базовыми опциями', -'topic_rating_done' => 'Ваша оценка успешно добавлена!', -'topic_rating_changed' => 'Ваша оценка успешно изменена!', -'topic_rated_already' => 'Вы уже оценивали эту тему и вам не разрешено изменять вашу оценку.', -'topic_rating' => 'Рейтинг', -'topic_options' => 'Опции', -'topic_display' => 'Режим отображения', -'topic_display_switch' => 'Переключить на:', -'poll_vote_added' => "Ваш голос успешно добавлен", -'poll_viewing_results' => "Просмотр результатов опроса", -'poll_add_vote' => "Голосовать!", -'poll_s_stats' => "Статистика", -'poll_you_voted' => "Вы уже голосовали в этом опросе", -'poll_no_guests' => "Гости не могут голосовать", -'poll_vote_created' => "Ваш опрос был успешно создан", -'poll_s_total' => "Всего голосов", -'poll_null_vote' => "Просмотр результатов (Лишившись голоса)", -'poll_s_votes' => "Голосов", -'poll_you_created' => "Вы создали этот опрос", - - -// build #003 -'click_on_icon' => "Нажмите на это значок для выбора этого сообщения для использования в модерации внизу страницы", -'obyavlenie' => "Объявление:", -'soobsheniya_etoy_temyi' => "Сообщения этой темы", - -// 2.0.3 - -'qr_add_email' => "Отправлять уведомления об ответах на e-mail", - - - -// 2.0 -'ip_private' => 'Скрыт', -'tom_outline' => 'Древовидный', -'tom_standard' => 'Стандартный', -'tom_linear' => 'Линейный', - -'tom_replies' => "Ответов", -'announce_both' => "Объявление создано: %s, будет завершено: %s", -'announce_start' => "Объявление опубликовано %s", -'announce_end' => "Объявление завершено %s", - -'cpt_approve' => "Опубликовать сообщение", -'cpt_unapprove' => "Скрыть сообщение", -'cpt_approvet' => "Опубликовать тему", -'cpt_unapprovet' => "Скрыть тему", -'cpt_merge' => 'Объединить сообщения', -'cpt_delete' => "Удалить сообщения", -'cpt_split' => "Разделить тему", -'cpt_move' => "Переместить сообщения", -'cp_js_delete' => "Вы действительно хотите удалить эти сообщения?", -'enter_keywords' => "Ключевое слово", -'search_topic' => "Найти в этой теме", -'f_go' => "С отмеченными", - -'m_location' => "Из:", - -'tt_reply_to_post' => "Ответить прямо в этом сообщении", - - -'attach_thumbs' => 'Эскизы прикрепленных изображений', -'attach_images' => 'Прикрепленные изображения', -'attach_normal' => 'Прикрепленные файлы', -'attach_ahits' => 'Скачано:', -'attach_size' => 'Размер:', -'mq_title' => 'Добавить к многочисленным цитатам', - -'tt_link' => "Ссылка на это сообщение", -'tt_prompt' => "Копирование прямой ссылки этого сообщения, для сохранения в буфере обмена", - - -// новое 1.2 B3 (RC1) - -'tt_rating' => "Рейтинг:", - -// новое в 1.2 -'tt_warn' => "Предупреждения:
", -'tt_warn_add' => "Добавить предупреждение", -'tt_warn_minus' => "Снять предупреждение", -'mm_title' => "Мульти-модерация", -'mm_submit' => "ок", -'pv_total_votes' => "Всего голосов", -'new_poll_link' => "Добавить новый опрос", -'ac_title' => "Показать контакт лист", -'to_open' => "Раскрыть опции темы", -'to_close' => "Скрыть опции темы", -'show_emo' => "Показать смайлики в новом окне", -'pl_show_results' => "Показать результаты", -'pl_show_vote' => "Показать пункты опроса", - -'pic_attach_thumb' => "Прикрепленное изображение (нажмите на эскиз, для увеличения)", - -'attached_file' => "Прикрепленный файл", -'qr_title' => "Быстрый ответ", -'qr_open' => "Раскрыть окно быстрого ответа", -'qr_hide' => "Скрыть окно быстрого ответа", - -'qr_submit' => "Отправить", -'qr_more_opts' => "Расширенная форма", -'qr_closeit' => "Скрыть форму", -'qr_add_smilie' => "Включить смайлики", -'qr_add_sig' => "Добавить подпись", - -// новое в RC1 - -'b_back_to' => "Назад в", - -// конец - -'SPLIT_TOPIC' => "Разделить тему", -'MERGE_TOPIC' => "Соединить тему", -'TOPIC_HISTORY' => "История темы (опция администратора)", - -'tt_title' => "Подписаться на тему", - -'ft_title' => "Подписка на этот форум", - -'av_title' => "Скачать тему", - -'active_users_detail' => "гостей: %s, скрытых пользователей: %s", -'active_users_title' => "%s чел. читают эту тему", -'active_users_members' => "Пользователей: %s", - -'go_new_post' => "К первому непрочитанному сообщению", -'edited_by' => "Сообщение отредактировал %s - %s", - -'UNSUBBIT' => "Отписать всех от этой темы", - -'EDIT_TOPIC' => "Редактировать заголовок", -'forum_jump' => "Перейти в форум", -'UNPIN_TOPIC' => "Опустить тему", -'OPEN_TOPIC' => "Открыть тему", -'attach_hits' => "Кол-во скачиваний", -'DELETE_TOPIC' => "Удалить тему", -'topic_moved' => "Эта тема перемещена, переходим в форум расположения темы", -'pic_attach' => "Прикрепленное изображение", -'m_posts' => "Сообщений:", - -'multi_page_topic' => "Страницы:", -'snitch_geezer_to_a_copper' => "Отправить жалобу модератору", -'MOVE_TOPIC' => "Переместить тему", -'CLOSE_TOPIC' => "Закрыть тему", -'topic_page_h' => "Тема", -'member_warn_level' => "Уровень предупреждений пользователя", -'start_new_poll' => "Создание опроса", -'m_joined' => "Регистрация:", -'track_topic' => "Подписка на тему", -'js_del_1' => "Вы действительно хотите удалить это сообщение?", -'please_log_in' => "Вы не авторизованы в этом форуме.", -'js_del_2' => "Не хотите, как хотите", -'start_new_topic' => "Открытие новой темы", -'moderation_ops' => "Опции модератора", -'RECOUNT' => "Обновить тему", -'ip' => "IP", -'reply_to_topic' => "Ответ в эту тему", -'topic_stats' => "<#POSTS#> ответов с <#START#>", -'single_page_topic' => " ", -'PIN_TOPIC' => "«Поднять» тему", -'print' => "Версия для печати", -'topic' => "Тема", -'posted_on' => "Сообщение", -'attach_dl' => "Скачать файл", -'DELETE_POST' => "Удалить сообщения", -'t_old' => "Предыдущая тема", -'t_new' => "Следующая тема", -'forward' => "Сообщить другу", -'m_group' => "Группа:", -'back_top' => "Вверх", -'member_no' => "Пользователь №:", -); -?> \ No newline at end of file diff --git a/upload/cache/lang_cache/ru/lang_ucp.php b/upload/cache/lang_cache/ru/lang_ucp.php deleted file mode 100644 index ebf1958e..00000000 --- a/upload/cache/lang_cache/ru/lang_ucp.php +++ /dev/null @@ -1,647 +0,0 @@ - 'Пол', -'panel_gender_m' => 'Мужской', -'panel_gender_f' => 'Женский', -'panel_gender_u' => 'Не указывать', - -// НОВОЕ 2.2 -'pp_you_have' => "У вас", -'pp_pending_approval' => "друзей, ожидающих подтверждения.", -'pp_manage_friends_link' => "Список ваших друзей (откроется в новом окне)", -'pp_find_friends_title' => "Поиск друзей", -'pp_find_friends' => "Найти новых друзей в списке пользователей.", -'pp_go_memberlist' => "Перейти к списку всех пользователей", -'pp_friends_manage_title' => "Друзья, ожидающие подтверждения", -'max_dname_length' => 'Макс. символов:', -'m_personal_portal' => 'Изменить настройки анкеты', -'m_manage_friends' => 'Список друзей', - -'m_personal_statement' => "О себе", -'m_char_limit' => "(Максимум 300 символов)", -'m_notifications' => "Опции уведомлений", -'m_new_comments' => "Новые комментарии", -'m_choose_comm_type' => "Выберите тип уведомления о новых комментариях", -'m_new_friends' => "Новые друзья", -'m_choose_friend_type' => "Выберите тип уведомления о новых друзьях", -'m_mod_type' => "Опции модерации", -'m_choose_cmod_type' => "Выберите тип модерации для новых комментариев", -'m_choose_fmod_type' => "Выберите тип модерации для новых друзей", -'m_save_settings' => " Сохранить настройки ", - -// НОВОЕ : 2.1 - -'ucp_op_pm_title' => "Опции личных сообщений", -'ucp_op_pm' => "Отключить использование вами личных сообщений?", -'ucp_op_pm_dowhat' => "Если вы отключите использование вами личных сообщений, вы не сможете отправлять и получать личные сообщения.", - -'sub_added' => "Ваша подписка успешно добавлена", -'dname_change_ok' => "Отображаемое имя успешно изменено", -'dname_error_title' => "Обнаружены ошибки:", -'dname_error_no_name' => "Вы обязаны ввести имя длиннее, чем 3 символа и короче, чем 32", -'dname_error_no_pass' => "Поля пароля пусто", -'dname_error_chars' => "Отображаемое имя содержит запрещенные символы", -'dname_error_taken' => "Такое отображаемое имя уже используется другим пользователем", -'dname_error_pass_wrong' => "Введенный пароль некорректный", -'dname_submit' => "Продолжить", -'dname_choose' => "Введите новое отображаемое имя", -'dname_choose2' => "Это желаемое отображаемое имя вы используете сейчас.
Запрещенные символы: [ ] | , ;", -'dname_password' => "Введите ваш текущий пароль", -'dname_password2' => "Это гарантирует безопасность на вашей учетной записи", -'dname_title' => "Изменить отображаемое имя", -'dname_string' => "Вы сделали %s из %s изменений отображаемого имени с %s.
Вам разрешено делать %s изменений каждые %s дней.

Изменение отображаемого имени никак не отражается на вашем имени пользователя для авторизации.", -'m_dname_change' => "Изменить отображаемое имя", -'dst_error' => "Произошла ошибка при попытке автоматически изменить ваши настройки перехода на летнее время. Если ошибка продолжается, пожалуйста, отключите автокоррекцию перехода на летнее время", -'dst_box2' => "(Если вы выбрали правильную временную зону, и часы появляются отстают или спешат на час, перепроверьте)", -'dst_auto' => "Автокоррекция перехода на летнее время?", -'dst_auto2' => "(если выбрано, то ваши настройки перехода на летнее время будут автоматически применены, когда в следующий раз вы войдете на главную страницу форума)", -'dst_correction_title' => "Коррекция перехода на летнее время", -'settings_time_txt2' => "Текущее время (включая ваши настройки часового пояса):", -'ucp_title_posting' => "Настройки публикации", -'ucp_use_rte' => "«Rich Text» редактор", -'ucp_use_std' => "Стандартный редактор", -'type_of_editor' => "Тип текстового редактора для использования при публикации", -'rte_text' => "«Rich Text» редактор требует Internet Explorer 6, Mozilla или Firefox", - -// ИЗМЕНЕНО: 2.1 - -'dst_box' => "Переход на летнее время?
(Если ваш часовой пояс не совпадает с временем на форуме, выберите правильное
время и поставьте отметку в окошко. В противном случае, снимите отметку.)", -'need_cookie_yum_yum' => "Эта функция используют cookies", -'open_qr' => "Раскрывать автоматически форму быстрого ответа (когда доступно)?", -'m_contact_info' => "Изменить личные данные", -'settings_time_txt' => "Ваш часовой пояс", - - - -// build #003 -'tsitata' => "Цитата", -'kod' => "Код", -'spisok' => "Список", -'vklyuchite_etu_kartinku' => "Включите эту картинку", -'otmetit_vse' => "Отметить все", - - -//2.0.2 -'m_blog' => "Блог", -'m_blog_ucp_main' => "Ваши настройки блога", -'m_blog_cblocks' => "Настройки блоков контента", -'m_blog_aboutme' => "Ваш личные данные", -'m_blog_your_blog' => "Ваш блог", - -//2.0 - -'announce_delete' => "Удалить", -'announce_edit' => "Изменить", -'announce_by' => "Автор:", -'conv_email_warning_title' => "E-MAIL ПРЕДУПРЕЖДЕНИЕ", -'conv_email_warning' => "Ваш e-mail адрес изменен в связи с тем, что данный e-mail используется на другой учетной записи. Это означает, что вы не будете получать никаких писем с форума, такие как уведомление о восстановлении забытого пароля и т.д.
Немедленно измените свой e-mail адрес.", - -'attach_topicmoved' => 'Тема перемещена', -'attach_inpm' =>'Личное сообщение', -'m_gallery' => 'Галерея', -'m_gallery_albums' => 'Ваши альбомы', -'m_gallery_favs' => 'Ваши закладки', -'m_gallery_controls' => 'Ваши настройки', -'auto_track' => "Включить уведомления на e-mail по умолчанию?
Если включено, выберите тип уведомления:
", -'auto_track_desc' => "При включении этой опции вы будете автоматически подписаны на все новые и обновленные темы.", - -'subs_c_title' => 'Информация о подписках', -'subs_c_forum' => 'Подписка на форум:', -'subs_c_topic' => 'Подписка на тему:', -'subs_c_type' => 'Тип', -'subs_exp_text' => 'Выберите способ уведомления.
При подписке на форум вы будете уведомлены обо всех новых темах в этом форуме, а при подписке на тему получите уведомления уже о всех новых сообщениях в этой теме.', -'subs_delayed' => 'Уведомление с задержкой', -'subs_delayed_desc' => "При выборе этой опции вы будете уведомлены о новых темах или ответах во время своего отсутствия на форуме.", -'subs_immediate' => 'Немедленное уведомление', -'subs_immediate_desc' => 'При выборе этой опции вы будете уведомлены о новых темах или ответах, независимо от того, присутствуете ли вы или отсутствуете на форуме.', -'subs_daily' => 'Ежедневное уведомление', -'subs_daily_desc' => 'При выборе этой опции вы будете ежедневно получать краткое уведомление обо всех новых темах и сообщениях за текущий день', -'subs_weekly' => 'Еженедельное уведомление', -'subs_weekly_desc' => 'При выборе этой опции вы будете еженедельно получать краткое уведомление обо всех новых темах и сообщениях за текущую неделю.', -'subs_none_title' => 'Не уведомлять', -'subs_none_desc' => 'При выборе этой опции вы не будете получать никаких уведомлений на e-mail, но все новые и обновленные темы и форумы будут сохранены на вашей личной странице подписок.', -'subs_submit' => 'Выполнить действие', - -'subs_c_change' => "Изменить на:", - -'announce_page_disabled' => "(Отключено)", -'announce_del1' => "Вы действительно хотите удалить это объявление?", -'announce_del2' => "Действие отменено!", -'announce_error_date' => "Дата начала или завершения указана в неправильном формате. Проверьте введенные данные.", -'announce_error_title' => "Вы должны ввести заголовок и текст объявления.", -'announce_error_forums' => "Вы должны выбрать хотя бы один форум для этого объявления.", -'announce_title' => "Заголовок", -'announce_author' => "Автор", -'announce_end' => "Завершить", -'announce_starts' => "Начать", -'announce_forums' => "Форумы", -'announce_current' => "Текущие объявления", -'announce_add' => "Создание объявления", -'announce_none' => "Нет ни одного объявления", -'announce_button_add' => "Добавить объявление", -'announce_button_edit' => "Отредактировать объявление", -'announce_form_title' => "Заголовок объявления", -'announce_form_start' => "Дата начала (ДД.ММ.ГГГГ)", -'announce_form_end' => "Дата завершения (ДД.ММ.ГГГГ)", -'announce_form_startdesc' => "Не заполняйте, если не хотите использовать дату начала", -'announce_form_enddesc' => "Не заполняйте, если не хотите использовать дату завершения", -'announce_form_content' => "Текст объявления", -'announce_form_forums' => "Показывать в форумах", -'announce_form_forums2' => "Можете выбрать несколько форумов", -'announce_form_allforums' => "-- Во всех форумах --", -'announce_use_html' => "Включить HTML?", -'announce_form_options' => "Опции", -'announce_page_allforums' => "Все форумы", -'announce_page_numbforums' => "Форумы", -'announce_form_enable' => "Опубликовать объявление", - -'menu_announcements' => "Объявления", -'mfm_title_result' => 'Результаты поиска пользователя', -'cp_edit_user' => "Поиск пользователя", -'cp_find_user' => "Введите часть имени или полное имя пользователя", -'cp_find_submit' => "Найти пользователя", -'cp_find_2_user' => "Выберите пользователя из списка", -'cp_find_2_submit' => "Отредактировать профиль", -'cp_admin_user' => "Вы не можете редактировать профиль администратора через эту панель", -'cp_no_perms' => "У вас нет прав для выполнения этого действия.", - - -'ipp_found' => "Кол-во найденных по вашему запросу сообщений:", -'ipp_click' => "Нажмите сюда, для просмотра результатов поиска в новом окне", -'ip_desc_text' => "Определение IP адреса: С помощью этой опции вы сможете узнать об IP адресе более подробные сведения (примечание, вы должны ввести все 4 части IP адреса для использования этого средства)
Поиск сообщений с этим IP: Эта функция запустит поиск всех сообщений, отправленных с этого IP адреса
Поиск пользователей, зарегистрированных с этого IP: Эта функция запустит поиск всех пользователей, зарегистрированных с этого IP адреса", -'ip_warn_text' => "Примечание: вы можете использовать маску '*' (без кавычек) вместо последних частей IP адреса.
Пример: При использовании 127.*.*.* будут найдены все IP адреса, начинающиеся с 127.
При использовании 127.1.0.* будут найдены все IP адреса, начинающиеся с 127.1.0.
При использовании маски в середине IP адреса, произойдет ошибка и вы получите сообщение об ошибке. Пример. Использование 127.*.0.1 выдаст ошибку.", -'ip_enter' => "Введите IP адрес", -'ip_submit' => "Начать поиск", -'ip_resolve_result' => "Название хоста IP адреса %s — %s

Можете посетить nic.ru для получения дополнительной информации через WHOIS.", -'cp_no_matches' => "Ничего не найдено по вашему запросу. Вернитесь назад и расширьте критерии поиска.", - -'ip_resolve' => "Определение", -'ip_posts' => "Поиск сообщений", -'ip_members' => "Поиск пользователей", -'ipm_title' => "Результаты поиска пользователей", -'ipm_name' => "Имя", -'ipm_ip' => "IP адрес", -'ipm_posts' => "Сообщений", -'ipm_reg' => "Регистрация", -'ipm_options' => "Опции", -'ipm_group' => "Группа", -'ipm_edit' => "Редактировать", -'ipm_view' => "Профиль", - -'menu_title_mod' => 'Модерация', -'menu_ipsearch' => 'Средства IP адресов', -'menu_memsearch' => 'Поиск пользователей', - -'m_attach' => 'Прикрепленные файлы (attach\'и)', -'attach_title' => 'Файл', -'attach_topic' => 'Тема', -'attach_date' => 'Дата', -'attach_hsize' => 'Размер', -'attach_delete' => 'Удалить выбранные', - -'attach_space_count' => "Вами загружено %s файлов (%s% использовано)", -'attach_space_used' => 'Вами использовано %s из допустимых %s', -'attach_space_unl' => 'Вы используете %s от общего дискового пространства.', - -'splash_last5' => "Недавно прочитанные темы", -'splash_nopost' => 'Нет тем', -'splash_attach' => 'Последние файлы', -'splash_noattach' => 'Нет новых файлов для показа', - -'m_ignore_users' => "Игнорирование пользователей", -'mi5_title' => "Управление списком проигнорированных пользователей", -'mi5_text' => "В этой секции вы можете редактировать свой список проигнорированных пользователей.
При добавлении какого-либо пользователя в игнор, любые сообщения этого пользователя будут скрыты от вас до тех пор, пока вы сами не захотите прочесть их сообщения. Вы не можете добавлять в игнор пользователей, находящихся в пользовательской группе, защищенной от игнорирования.", -'mi5_norows' => "В данное время ваш список игнора пуст. Ниже вы можете добавить пользователей в список", -'mi5_name' => "Имя", -'mi5_group' => "Группа", -'mi5_posts' => "Сообщений", -'mi5_remove' => "Удалить", -'mi5_edit' => "Обновить список", -'mi5_finduser' => "Найти пользователя", -'mi5_addem' => 'Добавить новых пользователей в список', -'mi5_error' => "Ошибка", -'mi5_cantfind' => "Невозможно добавить пользователей: %s. Это могло произойти по следующим причинам: пользователь уже имеется в списке, либо пользователь находится в защищенной группе, либо такого пользователя не существует.", - -/// - - -'pph_max2' => "Фотографии должны быть не больше %s на %s пикселей.", -'pph_max' => "Объем всех фотографий не должен превышать %s кб.
", - -// добавлено 1.2.1 - -'new_sub_link' => "Покупка оплачиваемых рассылок", -'m_top_list' => "Toп", -'tsl_home' => "Главная страница Топа", -'tsl_your_sites' => "Редактировать ваши сайты", - -// добавлено 1.2 - -'ec_passy' => "Ваш текущий пароль", -'mi_prune_msg' => "Очистка папок", - - - -'av_gallery_title' => "Галерея аватаров:", -'av_gall_submit' => "Использовать выбранный аватар", -'av_gall_cancel' => "Выйти из галереи аватаров", -'av_gall_jump' => "Выбрать другую галерею аватаров:", -'av_root' => "Базовая галерея", -'av_go_gal' => "Выберите аватар в одной из наших галерей", -'av_go_go' => "ОК!", -'av_upload' => "Загрузите аватар со своего компьютера", -'av_url' => "Введите ссылку на файл вашего аватара", -'av_update' => "Обновить аватар", -'av_remove' => "Удалить аватар", -'av_current' => "Ваш текущий аватар", -'av_settings' => "Настройки вашего аватара", -'av_text_upload' => "Загружаемый с компьютера аватар должен быть не более %s килобайт.", -'av_allowed_files' => "Допускаются следующие типы файлов: %s", -'av_t_upload' => "Загруженный файл", -'av_t_url' => "Ссылка URL", -'av_t_gallery' => "Аватар галереи", -'av_t_na' => "Нет выбранных аватаров", -'av_text_url' => "Размер вашего аватара не должен превышать %s на %s пикселей.", -'av_confirm' => "Удалить ваш аватар?", -'av_autosize' => "Масштабирование изображения", -'av_as_desc' => "Если ваше изображение слишком большое, оно будет отмасштабировано до нужных размеров.", - -'pp_restore' => "Восстановление", -'pp_confirm' => "Удалить вашу фотографию?", -'av_c_up' => "Аватар обновлен", -'photo_c_up' => "Фотография обновлена", -'pph_title' => "Ваша персональная фотография", -'pph_desc' => "Здесь вы можете хранить фотографию, которая будет видна другим пользователям в вашем профиле.", -'pph_current' => "Используемая в настоящее время фотография", -'pph_change' => "Изменить фотографию", -'pph_none' => "(Не определено)", -'pph_upload' => "ИЛИ загрузить новую фотографию с компьютера.", -'pph_url' => "Введите URL вашей фотографии", -'pph_submit' => "Обновить фотографию", -'pph_remove' => "Удалить фотографию", - -'pph_autosize' => "Масштабирование изображения", -'pph_as_desc' => "Если ваше изображение слишком большое, оно будет отмасштабировано до нужных размеров.", -'pph_t_upload' => "Загруженный файл", -'pph_t_url' => "Ссылка URL", - -'email_c_up' => "Настройки e-mail обновлены", - -'integ_msg' => "Номер в Integrity Messenger", - -'dead_section_title' => "Нет прав использования", -'dead_section_text' => "Администратор форума отключил функции этой части панели управления.", - - -'tt_menu' => "Меню", -'m_change_photo' => "Установка фотографии", - -'hs_exp' => "При выборе 'нет' могут возникнуть проблемы с пользователями, использующими тот же прокси сервер, что и вы.", - -// Добавлено в B4 - -'ras_title' => "Защитный код", -'ras_numbers' => "Защитный код
Если вы не видите никаких чисел или видите битое изображение, обратитесь к администратору форума для устранения проблемы.", -'ras_text' => "Введите защитный код
Введите 6 цифр, отображенных выше в виде изображения.
Примечание: На изображении только цифры, к примеру '0' является нулем, а не буквой 'O'.", -'err_security_code' => "Введенный защитный код не соответствует изображенному. Создан новый код. Попробуйте еще раз.", -'email_changed_now' => "Ваш e-mail адрес успешно изменен", - -//--- - -'forum_subs_header' => "Ваши подписки на форумы", - -'forum_subs_none' => "В настоящее время вы не подписаны ни на один форум", -'f_none' => "--", -'in' => "В:", -'by' => "От:", - -'ft_forum' => "Форум", -'ft_posts' => "Ответов", -'ft_topics' => "Тем", -'ft_newpost' => "Создать новую тему", -'ft_last_post' => "Обновления", - - -'subs_today' => "Последний день", -'subs_day' => "Последние %s дней", -'subs_all' => "Все время", - -'show_topics_from' => "Показать темы за:", - -'subs_none' => "Вы не подписаны ни на одну тему. Выберите другой диапазон даты.", - -'auto_prune' => "Примечание: подписка будет отменена, если в теме не будет ответов в течение %s дней", -'no_auto_prune' => "Автоотмена подписки выключена в данное время", - - -'cf_required' => "Необходимая информация. Эта секция должна быть заполнена", - -'pp_number_posts' => "Количество сообщений за страницу темы", -'pp_number_topics' => "Количество тем за страницу форума", -'pp_use_default' => "По умолчанию", - -'mess_saved' => "Неотправленные", - - - -'lp_subject' => "Изменение e-mail адреса для", - -'avup_yes' => "У вас уже есть загруженный аватар (показан вверху страницы)
Если вы введете URL для аватара или загрузите новый аватар, текущий аватар будет удален.", -'avup_no' => "Вы не сохранили загруженный аватар. Вы можете выбрать аватар из списка выше.", - -'set_updated' => "Настройки обновлены", - -'hide_session_txt' => "Хотите скрыть id вашей «сессии» в ссылках? *", - -'m_messenger' => "Личный ящик", - -'av_tt_one' => "Не желаю использовать аватар (все текущие будут удалены)", -'av_tt_two' => "При выборе этой функции, все текущие выбранные, загруженные, сохраненные аватары будут удалены", - -'mess_new' => "Новое личное сообщение", - -'mess_contact' => "Черный список ЛС", -'mess_folders' => "Редактировать директории", - -'mess_inbox' => "Входящие", - -'mess_archive' => "Архивирование сообщений", -'mess_tracker' => "Слежение за сообщениями", - - - - -'forum_jump' => "Переход по форумам", - -'m_personal' => "Ваш профиль", -'m_bio_info' => "Биография", -'m_sig_info' => "Изменить подпись", -'m_avatar_info' => "Установка аватара", - -'m_options' => "Настройки", - -'m_email_opt' => "Настройки e-mail", -'m_board_opt' => "Настройки форума", -'m_email_change' => "Изменить e-mail", -'m_passy_opt' => "Изменить пароль", - -'m_tracker' => "Подписки", -'m_view_subs' => "Темы", -'m_view_forum' => "Форумы", - -'ta_size' => 'Размер блокнота:', - -'new_window' => "В новом окне", - -'subs_delete' => "Отписаться", - -'with_selected' => "от выбранных тем", - -'ta_s' => 'малый', -'ta_m' => 'средний', -'ta_l' => 'большой', - -'cp_edit_sig' => "Изменение подписи", -'cp_current_sig' => "Текущая подпись", -'cp_submit_sig' => "Обновить подпись", - -'messenger_summary' => "Обзор личного ящика", -'total_messages' => "Всего сообщений (во всех директориях)", -'messages_left' => "Сообщений до переполнения ящика: ", -'folders_full' => "ВАШ ЛИЧНЫЙ ЯЩИК ПЕРЕПОЛНЕН!", -'total_capacity' => "от общего количества", - -'change_email_title' => "Изменение e-mail адреса", - -'ce_new_email' => "Введите новый e-mail адрес", -'ce_new_email2' => "Повторите новый e-mail адрес", - -'ce_current' => "Ваш текущий e-mail адрес: ", -'ce_auth' => "

ПРИМЕЧАНИЕ: После изменения e-mail адреса вы должны будете переактивировать вашу учетную запись.
На ваш e-mail адрес будет отправлено письмо с подробными инструкциями о дальнейших действиях.

Вы должны будете переавторизоваться. Настоятельно рекомендуем вам, перед изменением e-mail адреса, воспользоваться функцией восстановления пароля, если вы его не помните.", - -'ce_redirect' => "Письмо на e-mail отправлено. Сейчас вы перейдете на страницу активации", - -'ce_subject' => "Запрос на изменение e-mail адреса для ", - -'pass_change_text' => "Здесь вы можете изменить ваш пароль.

После успешного изменения пароля, форум попытается обновить ваш сеанс. При возникновении каких-либо проблем, попробуйте переавторизоваться. Если ничего не получится, обратитесь к Администратору форума для разрешения проблемы.", - -'pass_redirect' => "Ваш пароль успешно изменен. В зависимости от ваших настроек cookie, вам возможно нужно будет переавторизоваться на форуме с использованием вашего нового пароля.", - - -'total_posts' => "Всего сообщений", -'aol_name' => "Имя в AOL", -'home_page' => "Вебсайт", -'viewing_profile' => "Просмотр профиля", -'registration_date' => "Дата регистрации", -'change_email' => "Запрос на изменение e-mail адреса", -'no_information' => "Информация не введена", -'msn_name' => "Имя в MSN", -'profile_edited' => "Ваш профиль обновлен", -'member_level' => "Уровень пользователя", -'post_average' => "Среднее кол-во сообщений", -'b_date' => "Ваша дата рождения", -'send_pm' => "Отправить пользователю <# NAME #> Личное письмо", -'thank_you' => "Спасибо", -'registration_process' => "Запрос на изменение e-mail адреса", -'send_email' => "Отправить пользователю <# NAME #> письмо на e-mail", -'per_day' => "сообщений в день", -'no_photo' => "[ Нет фотографии ]", - -'M_1' => "Янв.", -'M_2' => "Фев.", -'M_3' => "Март.", -'M_4' => "Апр.", -'M_5' => "Май", -'M_6' => "Июнь", -'M_7' => "Июль", -'M_8' => "Авг.", -'M_9' => "Сен.", -'M_10' => "Окт.", -'M_11' => "Ноя.", -'M_12' => "Дек.", - -'D_0' => "Вс.", -'D_1' => "Пн.", -'D_2' => "Вт.", -'D_3' => "Ср.", -'D_4' => "Чт.", -'D_5' => "Пт.", -'D_6' => "Сб.", - -'month1' => "Январь", -'month2' => "Февраль", -'month3' => "Март", -'month4' => "Апрель", -'month5' => "Май", -'month6' => "Июнь", -'month7' => "Июль", -'month8' => "Август", -'month9' => "Сентябрь", -'month10' => "Октябрь", -'month11' => "Ноябрь", -'month12' => "Декабрь", - -'hidden_email' => "<# NAME #> скрыл свой e-mail адрес", -'auth_text' => "Выполняется ваш запрос на изменение e-mail адреса.

Администрация форума требует реальности всех вводимых e-mail адресов. Через 10 минут (возможно и раньше) вы получите письмо с инструкциями следующего шага.
Отправлено письмо на e-mail:", -'icq_number' => "Номер ICQ", -'add_book' => "Добавить пользователя <# NAME #> в ваш список контактов", -'contact_header' => "Контактная информация", -'signature' => "Подпись", -'last_modification' => "Последнее обновление профиля", -'yahoo_name' => "Имя в Yahoo", -'personal_header' => "Статистика и личные данные пользователя <# NAME #>", - -//---- - -'note_pad' => "Ваш личный блокнот", -'submit_notepad' => "Обновить", - -'note_pad_empty' => "Здесь вы можете хранить отрывки сообщений или любую другую важную информацию", -'birthday' => "Дата рождения", -'av_personal' => "Вы используете личный аватар", -'width' => "Ширина", -'js_used' => "Вы использовали", -'avatar_pre_title' => "предустановленные аватары", -'lp_redirect' => "Отправленные e-mail", - -'settings_hour' => "Часов", -'edit_profile' => "Изменить профиль", -'messenger_url' => "Перейти в Личный Ящик", -'no' => "Нет", -'personal_help' => "Здесь вы можете изменить информацию о себе, которая будет видна другим пользователям", -'subs_forum' => "Форум", -'settings_submit' => "Сохранить изменения", -'js_location' => "Место жительства", - -'avatar_url_allowed' => "
Вы можете использовать аватары, предустановленные на форуме или ввести ссылку на аватар. Выберите, что вы предпочитаете.", -'privacy_settings' => "Настройки конфиденциальности", -'avatar_show_all' => "
[Помощь: показать все аватары]", -'account_title' => "Изменение вашей учетной записи", -'welcome' => "Добро пожаловать в ваши личные данные ", -'maximum' => "Максимальная", -'avatar_pre_txt' => "Выберите аватар из списка ниже. Кликните на название аватара для его просмотра.", -'height' => "Высота", -'icq' => "Номер ICQ", -'subs_replies' => "Ответов", -'avatar_url_title' => "Загрузка личного аватара", -'avatar_title' => "Настройки аватара", - -'account' => "Сохранить изменения", - -'hide_email' => "Скрыть мой адрес e-mail от других пользователей
При включении этой функции, пользователи форума не смогут отправлять вам письма из форума.", -'account_email_txt' => "Ваш e-mail адрес", -'account_pass_new2' => "Повторите ваш НОВЫЙ пароль", -'website' => "Адрес вашей домашней страницы", -'account_pass_title' => "Ваш пароль", -'personal_ops' => "Ваши личные настройки", -'settings_title' => "Настройки вашей учетной записи", -'yahoo' => "Имя в Yahoo", -'subs_cancel' => "Отмена", - -'account_email_title' => "Ваш зарегистрированный e-mail адрес", -'js_signature' => "Подпись", -'settings_viewimg' => "Отображать картинки в сообщениях (например смайлы, изображения)?", -'t_title' => "Ваши личные данные", - -'av_none_selected' => "[Аватар не выбран]", -'subs_header' => "Текущие подписки", -'profile_title' => "Дополнительная секция вашего профиля", -'board_prefs' => "Настройки Форума", -'subs_left' => "Осталось дней", -'subs_topic' => "Тема", -'settings_viewava' => "Отображать аватары пользователей в темах?", -'personal_ops_txt' => "Здесь вы можете изменить информацию о себе, с которой могут ознакомиться другие пользователи. Также вы можете выбрать себе аватар (маленькая картинка, которая будет отображаться под вашим именем в ваших сообщениях.", -'subs_start' => "Подписан на", -'submit_email' => "Изменить настройки e-mail", - - -'msg_options' => "Настройки", - -'subs_view' => "Просмотров", -'email_text_lp' => "Запрос забытого пароля", -'js_max' => "Максимально допустимая длина", -'interests' => "Ваши интересы", -'submit_profile' => "Сохранить изменения", -'avatar_click' => "Выберите один из аватаров в списке.", -'location' => "Место жительства", -'avatar_url_ext' => "Разрешенные типы файлов: ", -'email_address' => "Ваш e-mail адрес", -'pm_reminder' => "Уведомлять меня по e-mail при получении новых личных сообщений
При включении этой функции, вы будете уведомлены на e-mail каждый раз при получении нового Личного сообщения.", -'subs_last_post' => "Обновление", -'email' => "Настройки E-mail", -'account_email_submit' => "Сохранить изменения", -'settings' => "Настройки учетной записи", -'photo' => "Вы можете ввести URL своей фотографии
[Она будет отображаться только при просмотре вашего профиля, но не в сообщениях]", -'js_so_far' => "символ(а)ов", -'email_help' => "Здесь вы можете изменить настройки e-mail", -'settings_dopopup' => "Желаете получать уведомление с форума при получении нового личного сообщения?", -'settings_display' => "Настройки отображения форума", -'send_full_msg' => "Добавлять копию сообщения из подписанных тем в отправляемое письмо-уведомление
При включении этой функции, копия нового сообщения, в простом текстовом формате, будет выслана вам на e-mail.", -'member_title' => "Ваше название статуса", -'yes' => "Да", -'account_pass_new' => "Введите ваш НОВЫЙ пароль", -'settings_viewsig' => "Отображать подписи пользователей в темах?", -'js_interests' => "Интересы", -'av_preset' => "Вы используете предустановленные аватары форума", -'aol' => "Имя в AOL", -'settings_lang' => "Язык интерфейса форума", -'pixels' => "пикселей", -'t_welcome' => "Добро пожаловать в ваши личные данные", -'personal' => "Личная информация", -'daily_average' => "Среднее количество сообщений в день", -'account_pass_submit' => "Изменить пароль", -'stats_header' => "Обзор вашей учетной записи", -'settings_time' => "Часовой пояс", -'subs_title' => "Ваши подписки", -'no_posts' => "Пока не имеется", -'subs' => "Слежение за темой", -'subs_deleted' => "Подписка успешно удалена", -'msn' => "Имя в MSN", -'registered' => "Вы зарегистрированы ", -'subs_by' => "автор:", -'number_posts' => "Всего сообщений", -'account_pass_old' => "Введите ваш ТЕКУЩИЙ пароль", -'js_characters' => "символов", -'account_email_req' => "Вы получите e-mail для подтверждения изменений", -'email_title' => "Настройки e-mail", - -'check_length' => "Проверить длину", -'admin_send' => "Сообщать мне обо всех изменениях, проводимых администратором форума
При включении этой функции, ваш e-mail адрес будет добавлен к списку e-mail адресов администратора и вы, всякий раз будете уведомлены по e-mail, о любых изменениях на форуме.", -); - - -// Временные зоны... -$lang['time_-12'] = "(GMT - 12:00) Эневеток, Кваджалейн"; -$lang['time_-11'] = "(GMT - 11:00) о.Мидуэй, Самоа"; -$lang['time_-10'] = "(GMT - 10:00) Гавайи"; -$lang['time_-9'] = "(GMT - 9:00) Аляска"; -$lang['time_-8'] = "(GMT - 8:00) Тихоокеанское время (США и Канада), Тихуана"; -$lang['time_-7'] = "(GMT - 7:00) Горное время (США и Канада), Аризона"; -$lang['time_-6'] = "(GMT - 6:00) Центральное время (США и Канада), Мехико"; -$lang['time_-5'] = "(GMT - 5:00) Восточное время (США и Канада), Богота, Лима, Кито"; -$lang['time_-4'] = "(GMT - 4:00) Атлантическое время (Канада), Каракас, Ла Пас, Сантьяго"; -$lang['time_-3.5'] = "(GMT - 3:30) Ньюфаундленд"; -$lang['time_-3'] = "(GMT - 3:00) Бразилия, Буэнос-Айрес, Джорджтаун, Гренландия"; -$lang['time_-2'] = "(GMT - 2:00) Среднеатлантическое время"; -$lang['time_-1'] = "(GMT - 1:00) Азорские о-ва, о-ва Зеленого мыса"; -$lang['time_0'] = "(GMT) Касабланка, Дублин, Эдинбург, Лиссабон, Лондон, Монровия"; -$lang['time_1'] = "(GMT + 1:00) Амстердам, Берлин, Брюссель, Мадрид, Париж, Рим"; -$lang['time_2'] = "(GMT + 2:00) Каир, Хельсинки, Калининград, Южная Африка, Варшава"; -$lang['time_3'] = "(GMT + 3:00) Багдад, Эр-Рияд, Москва, Найроби"; -$lang['time_3.5'] = "(GMT + 3:30) Тегеран"; -$lang['time_4'] = "(GMT + 4:00) Абу-Даби, Баку, Мускат, Тбилиси"; -$lang['time_4.5'] = "(GMT + 4:30) Кабул"; -$lang['time_5'] = "(GMT + 5:00) Екатеринбург, Исламабад, Карачи, Ташкент"; -$lang['time_5.5'] = "(GMT + 5:30) Бомбей, Калькутта, Мадрас, Нью-Дели"; -$lang['time_6'] = "(GMT + 6:00) Алма-Ата, Коломбо, Дхака, Новосибирск, Омск"; -$lang['time_7'] = "(GMT + 7:00) Бангкок, Ханой, Джакарта, Красноярск"; -$lang['time_8'] = "(GMT + 8:00) Пекин, Гонконг, Перт, Сингапур, Тайпей"; -$lang['time_9'] = "(GMT + 9:00) Осака, Саппоро, Сеул, Токио, Якутск"; -$lang['time_9.5'] = "(GMT + 9:30) Аделаида, Дарвин"; -$lang['time_10'] = "(GMT + 10:00) Канберра, Мельбурн, Гуам, Сидней, Владивосток"; -$lang['time_11'] = "(GMT + 11:00) Магадан, Новая Каледония, Соломоновы о-ва"; -$lang['time_12'] = "(GMT + 12:00) Окленд, Фиджи, Камчатка, Веллингтон"; - -?> \ No newline at end of file diff --git a/upload/cache/skin_cache/index.html b/upload/cache/skin_cache/index.html index 250b1f72..af2fbe79 100644 --- a/upload/cache/skin_cache/index.html +++ b/upload/cache/skin_cache/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

Ошибка русской версии Invision Power Board

-Вы попали на несуществующую страницу!
Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
- - \ No newline at end of file + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/upload/conf_global.php.dist b/upload/conf_global.php.dist index dc10d563..e69de29b 100644 --- a/upload/conf_global.php.dist +++ b/upload/conf_global.php.dist @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/upload/converge_local/apis/allowed_methods.php b/upload/converge_local/apis/allowed_methods.php index 1d60061f..65656df6 100644 --- a/upload/converge_local/apis/allowed_methods.php +++ b/upload/converge_local/apis/allowed_methods.php @@ -1,25 +1,16 @@ $Id$ | > $Revision: 102 $ @@ -35,6 +26,42 @@ $_CONVERGE_ALLOWED_METHODS = array(); +/** +* CONVERGE LOG IN +* Passes info to complete local log in +*/ +$_CONVERGE_ALLOWED_METHODS['requestData'] = array( + 'in' => array( + 'auth_key' => 'string', + 'product_id' => 'integer', + 'email_address' => 'string', + 'getdata_key' => 'string', + ), + 'out' => array( + 'response' => 'xmlrpc' + ) + ); + +/** +* CONVERGE LOG IN +* Passes info to complete local log in +*/ +$_CONVERGE_ALLOWED_METHODS['convergeLogIn'] = array( + 'in' => array( + 'auth_key' => 'string', + 'product_id' => 'integer', + 'email_address' => 'string', + 'md5_once_password' => 'string', + 'ip_address' => 'string', + 'unix_join_date' => 'integer', + 'timezone' => 'integer', + 'dst_autocorrect' => 'integer', + 'extra_data' => 'string', + ), + 'out' => array( + 'response' => 'xmlrpc' + ) + ); /** * CONVERGE LOG OUT * Passes info to complete local log out @@ -109,26 +136,6 @@ $_CONVERGE_ALLOWED_METHODS['onEmailChange'] = array( 'response' => 'xmlrpc' ) ); - -/** -* CONVERGE LOG IN -* Passes info to complete local log in -*/ -$_CONVERGE_ALLOWED_METHODS['convergeLogIn'] = array( - 'in' => array( - 'auth_key' => 'string', - 'product_id' => 'integer', - 'email_address' => 'string', - 'md5_once_password' => 'string', - 'ip_address' => 'string', - 'unix_join_date' => 'integer', - 'timezone' => 'integer', - 'dst_autocorrect' => 'integer', - ), - 'out' => array( - 'response' => 'xmlrpc' - ) - ); /** * Get a batch of members to import diff --git a/upload/converge_local/apis/index.html b/upload/converge_local/apis/index.html index 250b1f72..b49fc27d 100644 --- a/upload/converge_local/apis/index.html +++ b/upload/converge_local/apis/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

Ошибка русской версии Invision Power Board

-Вы попали на несуществующую страницу!
Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
- - \ No newline at end of file + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/upload/converge_local/apis/server_functions.php b/upload/converge_local/apis/server_functions.php index 72e4db91..3e6952b4 100644 --- a/upload/converge_local/apis/server_functions.php +++ b/upload/converge_local/apis/server_functions.php @@ -1,24 +1,15 @@ $Id$ | > $Revision: 102 $ @@ -86,6 +77,56 @@ class Converge_Server } } + /** + * Converge_Server::requestData() + * + * Returns extra data from this application + * + * EACH BATCH MUST BE ORDERED BY ID ASC (low to high) + * + * @param string $auth_key Authentication Key + * @param int $product_id Product ID + * @param int $limit_a SQL limit a + * @param int $limit_b SQL limit b + * @return xml + **/ + function requestData( $auth_key, $product_id, $email_address, $getdata_key ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $auth_key = $this->ipsclass->txt_md5_clean( $auth_key ); + $product_id = intval( $product_id ); + $email_address = $this->ipsclass->parse_clean_value( $email_address ); + $getdata_key = $this->ipsclass->parse_clean_value( $getdata_key ); + + //----------------------------------------- + // Authenticate + //----------------------------------------- + + if ( $this->__authenticate( $auth_key, $product_id ) !== FALSE ) + { + //----------------------------------------- + // Grab local extension file + //----------------------------------------- + + require_once( ROOT_PATH . 'converge_local/apis/local_extension.php' ); + $extension = new local_extension( $this->ipsclass ); + + if ( is_callable( array( $extension, $getdata_key ) ) ) + { + $data = @call_user_func( array( $extension, $getdata_key), $email_address ); + } + + $return = array( 'data' => base64_encode( serialize( $data ) ) ); + + # return complex data + $this->class_api_server->api_send_reply( $return ); + exit(); + } + } + /** * Converge_Server::onMemberDelete() * @@ -280,7 +321,7 @@ class Converge_Server if ( $member['email'] == $old_email_address ) { - $this->ipsclass->DB->do_update( 'members', array( 'username' => $new_email_address ), "id='" . $member['id'] . "'" ); + $this->ipsclass->DB->do_update( 'members', array( 'name' => $new_email_address ), "id='" . $member['id'] . "'" ); } $return = 'SUCCESS'; @@ -341,6 +382,8 @@ class Converge_Server // Get Data //----------------------------------------- + /* - This causes all sorts of mass hysteria and mysql madness - no index gets properly used and server will crash + Let's just not send the IP for now. We can worry about this later if it's needed, but converge doesn't use it. $this->ipsclass->DB->build_query( array( 'select' => 'c.*', 'from' => array( 'members_converge' => 'c' ), 'order' => 'c.converge_id ASC', @@ -353,6 +396,12 @@ class Converge_Server 'from' => array( 'members' => 'm' ), ) ) + ) );*/ + + $this->ipsclass->DB->build_query( array( 'select' => '*', + 'from' => 'members_converge', + 'order' => 'converge_id ASC', + 'limit' => array( $limit_a, $limit_b ), ) ); $this->ipsclass->DB->exec_query(); @@ -545,7 +594,7 @@ class Converge_Server * @param string $dst_autocorrect The member's DST autocorrect settings * @return xml **/ - function convergeLogIn( $auth_key, $product_id, $email_address='', $md5_once_password='', $ip_address='', $unix_join_date='', $timezone=0, $dst_autocorrect=0 ) + function convergeLogIn( $auth_key, $product_id, $email_address='', $md5_once_password='', $ip_address='', $unix_join_date='', $timezone=0, $dst_autocorrect=0, $extra_data='' ) { //----------------------------------------- // INIT @@ -559,6 +608,7 @@ class Converge_Server $unix_join_date = intval( $unix_join_date ); $timezone = intval( $timezone ); $dst_autocorrect = intval( $dst_autocorrect ); + $extra_data = $this->ipsclass->parse_clean_value( $extra_data ); $return = 'FAILED'; //----------------------------------------- @@ -567,6 +617,15 @@ class Converge_Server if ( $this->__authenticate( $auth_key, $product_id ) !== FALSE ) { + //----------------------------------------- + // Extra data? + //----------------------------------------- + + if ( $exta_data ) + { + $external_data = unserialize( base64_decode( $extra_data ) ); + } + //----------------------------------------- // Get member //----------------------------------------- @@ -575,8 +634,6 @@ class Converge_Server 'from' => 'members', 'where' => "email='" . $this->ipsclass->DB->add_slashes( $email_address ) . "'" ) ); - #$this->class_api_server->xmlrpc->_add_debug( "Found $email_address - ".$this->ipsclass->member['id'] ); - //----------------------------------------- // No such user? Create one! // FAIL SAFE @@ -739,6 +796,8 @@ class Converge_Server //----------------------------------------- // Create member //----------------------------------------- + + $login_core->tmp_display = 'cvg_' . rand(); $member = $login_core->_create_local_member( $email_address, $md5_once_password, $email_address, $unix_join_date, $ip_address ); diff --git a/upload/converge_local/converge.php b/upload/converge_local/converge.php index 3f4dd3f4..317b6812 100644 --- a/upload/converge_local/converge.php +++ b/upload/converge_local/converge.php @@ -2,24 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ======================================== | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services | http://www.invisionpower.com | ======================================== | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:55 PM -| Release: e3790216629e5a2aaf37070b32237f06 -| Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +| Email: matt@invisionpower.com +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +| INVISION POWER BOARD IS NOT FREE SOFTWARE! +| http://www.invisionboard.com/?license +--------------------------------------------------------------------------- | > $Date: 2006-02-01 18:16:26 +0000 (Wed, 01 Feb 2006) $ | > $Revision: 132 $ @@ -540,7 +533,7 @@ class handshake_server if ( $converge['converge_api_code'] ) { - $this->ipsclass->DB->do_update( 'converge_local', array( 'converge_active' => 0 ), "converge_url = '".$converge_url."'" ); + $this->ipsclass->DB->do_update( 'converge_local', array( 'converge_active' => 0 ) ); $this->ipsclass->DB->do_update( 'converge_local', array( 'converge_active' => 1 ), "converge_api_code = '".$reg_code."'" ); //----------------------------------------- @@ -575,10 +568,11 @@ class handshake_server $this->ipsclass->DB->do_update( "login_methods", array( "login_enabled" => 0 ) ); $this->ipsclass->DB->do_update( "login_methods", array( "login_enabled" => 1, - "login_login_url" => $_full_url, - "login_maintain_url" => $_full_url . '&redirect=options', - "login_logout_url" => $_full_url . '&redirect=logout', - "login_register_url" => $_full_url . '&act=register' ), "login_folder_name='ipconverge'" ); + "login_login_url" => '', + "login_maintain_url" => '', + 'login_user_id' => 'email', + "login_logout_url" => '', + "login_register_url" => '' ), "login_folder_name='ipconverge'" ); $this->class_api_server->api_send_reply( array( 'handshake_updated' => 1 ) ); } diff --git a/upload/converge_local/converge_server.php b/upload/converge_local/converge_server.php index fa66475d..8b58bb42 100644 --- a/upload/converge_local/converge_server.php +++ b/upload/converge_local/converge_server.php @@ -2,24 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ======================================== | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services | http://www.invisionpower.com | ======================================== | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:55 PM -| Release: e3790216629e5a2aaf37070b32237f06 -| Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +| Email: matt@invisionpower.com +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +| INVISION POWER BOARD IS NOT FREE SOFTWARE! +| http://www.invisionboard.com/?license +--------------------------------------------------------------------------- | > $Date: 2006-02-01 18:16:26 +0000 (Wed, 01 Feb 2006) $ | > $Revision: 132 $ diff --git a/upload/converge_local/index.html b/upload/converge_local/index.html index 250b1f72..b49fc27d 100644 --- a/upload/converge_local/index.html +++ b/upload/converge_local/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

Ошибка русской версии Invision Power Board

-Вы попали на несуществующую страницу!
Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
- - \ No newline at end of file + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/upload/index.php b/upload/index.php index 69958fc1..ad683bdc 100644 --- a/upload/index.php +++ b/upload/index.php @@ -1,29 +1,23 @@ $Date: 2006-11-13 15:22:45 -0600 (Mon, 13 Nov 2006) $ -| > $Revision: 726 $ -| > $Author: bfarber $ +| > $Date: 2008-10-02 11:12:17 -0400 (Thu, 02 Oct 2008) $ +| > $Revision: 2569 $ +| > $Author: matt $ +--------------------------------------------------------------------------- | | > Wrapper script @@ -53,7 +47,6 @@ define( 'IPB_LOAD_SQL' , 'queries' ); require_once( './init.php' ); - //=========================================================================== // MAIN PROGRAM //=========================================================================== @@ -73,28 +66,6 @@ require_once KERNEL_PATH . "class_converge.php"; if ( file_exists( ROOT_PATH . "conf_global.php" ) ) { require_once ROOT_PATH . "conf_global.php"; - - // And the LOCALE Begin! - if ( $INFO['mysql_codepage'] ) { - - switch ($INFO['mysql_codepage']) { - case 'koi8r': - if ( substr(PHP_OS, 0, 3) == 'WIN' ) - { - setlocale(LC_ALL, 'Russian_Russia.20866'); - } else { - setlocale(LC_ALL, 'ru_RU.KOI8R'); - } - break; - default: - if ( substr(PHP_OS, 0, 3) == 'WIN' ) - { - setlocale(LC_ALL, 'Russian_Russia.1251'); - } else { - setlocale(LC_ALL, 'ru_RU.CP1251'); - } - } - } } # Are we installed? @@ -112,7 +83,7 @@ $ipsclass->vars = $INFO; //-------------------------------- // The clocks a' tickin' //-------------------------------- - + $Debug = new Debug; $Debug->startTimer(); @@ -162,17 +133,17 @@ $choice = array( "sc" => array( "boards" , 'boards' , array('chatting','birthdays', 'calendar') ), "sf" => array( "forums" , 'forums' , array('announcements', 'multimod') ), "sr" => array( "forums" , 'forums' , array() ), - "st" => array( "topics" , 'topics' , array('attachtypes','bbcode', 'multimod','ranks','profilefields' ) ), - "announce" => array( "announcements" , 'announcements', array('bbcode','badwords','emoticons','ranks','profilefields' ) ), + "st" => array( "topics" , 'topics' , array('badwords','emoticons','attachtypes','bbcode', 'multimod','ranks','profilefields' ) ), + "announce" => array( "announcements" , 'announcements', array('ranks' ) ), "login" => array( "login" , 'login' , array() ), "post" => array( "post" , 'post' , array('attachtypes','badwords','bbcode','emoticons','ranks' ) ), "reg" => array( "register" , 'register' , array('profilefields') ), "online" => array( "online" , 'online' , array() ), "members" => array( "memberlist" , 'memberlist' , array('ranks','profilefields' ) ), "help" => array( "help" , 'help' , array() ), - "search" => array( "search" , 'search' , array('badwords','emoticons','attachtypes','multimod','bbcode','ranks','profilefields' ) ), + "search" => array( "search" , 'search' , array('badwords','attachtypes','multimod','ranks' ) ), "mod" => array( "moderate" , 'moderate' , array('attachtypes','multimod','bbcode','emoticons','badwords' ) ), - "print" => array( "misc/print_page" , 'printpage' , array('attachtypes','bbcode', 'multimod','ranks','profilefields' ) ), + "print" => array( "misc/print_page" , 'printpage' , array('attachtypes','multimod','ranks' ) ), "forward" => array( "misc/forward_page" , 'forwardpage' , array() ), "mail" => array( "misc/contact_member", 'contactmember', array() ), "report" => array( "misc/contact_member", 'contactmember', array() ), @@ -184,18 +155,19 @@ $choice = array( "track" => array( "misc/tracker" , 'tracker' , array() ), "stats" => array( "misc/stats" , 'stats' , array() ), "attach" => array( "attach" , 'attach' , array('attachtypes' ) ), - 'legends' => array( 'misc/legends' , 'legends' , array('badwords','bbcode' ,'emoticons' ) ), + 'legends' => array( 'misc/legends' , 'legends' , array('badwords','bbcode','emoticons' ) ), 'calendar' => array( "calendar" , 'calendar' , array('attachtypes','bbcode', 'ranks', 'multimod', 'emoticons', 'badwords', 'calendars', 'profilefields' ) ), 'buddy' => array( "browsebuddy" , 'assistant' , array() ), 'mmod' => array( "misc/multi_moderate", 'mmod' , array('multimod' ) ), 'warn' => array( "misc/warn" , 'warn' , array('badwords','bbcode' ,'emoticons' ) ), - 'home' => array( 'portal' , 'portal' , array('portal','attachtypes','bbcode', 'multimod','ranks','profilefields' ) ), + 'home' => array( 'portal' , 'portal' , array('portal','attachtypes','multimod','ranks','profilefields' ) ), 'module' => array( 'modules' , 'modules' , array() ), 'task' => array( 'taskloader' , 'taskloader' , array() ), 'findpost' => array( 'findpost' , 'findpost' , array() ), "xmlout" => array( "xmlout" , 'xmlout' , array('attachtypes','multimod','bbcode','ranks','profilefields','emoticons','badwords' ) ), 'paysubs' => array( 'paysubscriptions' , 'paysubscriptions' , array() ), 'rssout' => array( 'rssout' , 'rssout' , array() ), + 'captcha' => array( 'captcha' , 'captcha' , array() ), 'component' => array( 'component' , 'component' , array() ), ); @@ -203,6 +175,8 @@ $choice = array( // Short tags... //=========================================================================== +$ipsclass->input['act'] = isset($ipsclass->input['act']) ? $ipsclass->input['act'] : ( IPB_MAKE_PORTAL_HOMEPAGE ? 'home' : 'idx' ); + if( is_array($ipsclass->input['act']) ) { $ipsclass->input['act'] = ( IPB_MAKE_PORTAL_HOMEPAGE ) ? 'home' : 'idx'; @@ -228,19 +202,19 @@ else if ( isset($ipsclass->input['showtopic']) && $ipsclass->input['showtopic'] { $ipsclass->input['act'] = "st"; $ipsclass->input['t'] = intval($ipsclass->input['showtopic']); - + //--------------------------------------------------- // Grab and cache the topic now as we need the 'f' attr for // the skins... //--------------------------------------------------- - + $ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'topics', 'where' => "tid=".$ipsclass->input['t'], ) ); - + $ipsclass->DB->simple_exec(); - + $ipsclass->topic_cache = $ipsclass->DB->fetch_row(); $ipsclass->input['f'] = $ipsclass->topic_cache['forum_id']; } @@ -264,7 +238,7 @@ else $ipsclass->input['act'] = ( ! isset($ipsclass->input['act']) || $ipsclass->input['act'] == '' ) ? "idx" : $ipsclass->input['act']; } -if ( !isset($ipsclass->input['_low_act']) OR !$ipsclass->input['_low_act'] OR $ipsclass->input['_low_act'] == 'idx' ) +if ( !isset($ipsclass->input['_low_act']) OR !$ipsclass->input['_low_act'] OR $ipsclass->input['_low_act'] == 'idx' OR $ipsclass->input['_low_act'] == 'home' ) { $ipsclass->input['_low_act'] = strtolower($ipsclass->input['act']); } @@ -273,7 +247,7 @@ if ( !isset($ipsclass->input['_low_act']) OR !$ipsclass->input['_low_act'] OR $i // Start off the cache array //-------------------------------- -$ipsclass->cache_array = array_merge( $choice[ $ipsclass->input['_low_act'] ][2], array('rss_calendar', 'rss_export', 'components', 'banfilters', 'settings', 'group_cache', 'systemvars', 'skin_id_cache', 'forum_cache', 'moderators', 'stats', 'languages') ); +$ipsclass->cache_array = array_merge( $choice[ $ipsclass->input['_low_act'] ][2], array('skin_remap', 'rss_calendar', 'rss_export', 'components', 'banfilters', 'settings', 'group_cache', 'systemvars', 'skin_id_cache', 'forum_cache', 'moderators', 'stats', 'languages') ); //-------------------------------- // Module? Load INIT class @@ -282,7 +256,7 @@ $ipsclass->cache_array = array_merge( $choice[ $ipsclass->input['_low_act'] ][2] if ( ( $ipsclass->input['act'] == 'module' OR $ipsclass->input['act'] == 'component' ) and $ipsclass->input['module'] ) { $file = ROOT_PATH.'sources/components_init/'. $ipsclass->txt_alphanumerical_clean( $ipsclass->input['module'] ).'.php'; - + if ( file_exists( $file ) ) { require_once( $file ); @@ -320,7 +294,7 @@ $ipsclass->my_session = $ipsclass->sess->session_id; // Used in code //----------------------------------------- $ipsclass->md5_check = $ipsclass->return_md5_check(); - + //-------------------------------- // Initialize the forums //-------------------------------- @@ -341,7 +315,7 @@ if( isset($ipsclass->member['view_prefs']) ) { list($ppu,$tpu) = explode( "&", $ipsclass->member['view_prefs'] ); } - + $ipsclass->vars['display_max_topics'] = ($tpu > 0) ? $tpu : $ipsclass->vars['display_max_topics']; $ipsclass->vars['display_max_posts'] = ($ppu > 0) ? $ppu : $ipsclass->vars['display_max_posts']; @@ -384,7 +358,7 @@ $ipsclass->vars['mime_img'] = $ipsclass->vars['ipb_img_url'] ? $ipsclass->v if ( !isset($ipsclass->vars['default_language']) OR $ipsclass->vars['default_language'] == "") { - $ipsclass->vars['default_language'] = 'ru'; + $ipsclass->vars['default_language'] = 'en'; } //-------------------------------- @@ -405,7 +379,7 @@ if ( (isset($ipsclass->input['setlanguage']) AND $ipsclass->input['setlanguage'] } } } - + $ipsclass->load_language('lang_global'); //-------------------------------- @@ -420,7 +394,7 @@ if ( LEGACY_MODE ) $forums =& $ipsclass->forums; $print =& $ipsclass->print; $sess =& $ipsclass->sess; - + $ipsclass->load_template('skin_global'); $ipsclass->skin_global = $ipsclass->compiled_templates['skin_global']; } @@ -433,7 +407,7 @@ if ( USE_SHUTDOWN and $ipsclass->input['act'] != 'task' ) { @chdir( ROOT_PATH ); $ROOT_PATH = getcwd(); - + register_shutdown_function( array( &$ipsclass, 'my_deconstructor') ); } @@ -452,31 +426,31 @@ if ($ipsclass->input['_low_act'] != 'login' and //----------------------------------------- // Do we have a display name? //----------------------------------------- - + if ( ! $ipsclass->member['members_display_name'] AND $ipsclass->member['members_created_remote'] ) { $pmember = $ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'members_partial', 'where' => "partial_member_id=" . $ipsclass->member['id'] ) ); - + if ( $pmember['partial_member_id'] ) { $ipsclass->boink_it( $ipsclass->base_url . 'act=reg&CODE=complete_login&mid='.$ipsclass->member['id'].'&key='.$pmember['partial_date'] ); } } - + //-------------------------------- // Do we have permission to view // the board? //-------------------------------- - + if ( $ipsclass->member['g_view_board'] != 1 ) - { + { $ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_view_board') ); } - + //-------------------------------- // Is the board offline? //-------------------------------- - + if ($ipsclass->vars['board_offline'] == 1) { if ($ipsclass->member['g_access_offline'] != 1) @@ -485,31 +459,31 @@ if ($ipsclass->input['_low_act'] != 'login' and $ipsclass->board_offline(); } } - + //-------------------------------- // Is log in enforced? //-------------------------------- - + if ( (! $ipsclass->member['id']) and ($ipsclass->vars['force_login'] == 1) ) { require ROOT_PATH."sources/action_public/login.php"; $runme = new login(); $runme->ipsclass =& $ipsclass; $runme->auto_run(); - + } - + //-------------------------------- // Show PURCHASE screen? // Not enforced //-------------------------------- - + if ( !isset($ipsclass->member['sub_end']) OR !$ipsclass->member['sub_end'] ) { //-------------------------------- // 1: No enforce, chosen from reg //-------------------------------- - + if ( ! $ipsclass->vars['subsm_enforce'] and (isset($ipsclass->member['subs_pkg_chosen']) AND $ipsclass->member['subs_pkg_chosen']) ) { $ipsclass->input['act'] = 'paysubs'; @@ -518,18 +492,18 @@ if ($ipsclass->input['_low_act'] != 'login' and $ipsclass->input['nocp'] = 1; $ipsclass->input['msgtype'] = 'fromreg'; } - + //-------------------------------- // Show PURCHASE screen? // Enforced //-------------------------------- - + if ( $ipsclass->vars['subsm_enforce'] and $ipsclass->member['mgroup'] == $ipsclass->vars['subsm_nopkg_group'] ) { $ipsclass->input['act'] = 'paysubs'; $ipsclass->input['nocp'] = 1; $ipsclass->input['msgtype'] = 'force'; - + if ( $ipsclass->member['subs_pkg_chosen'] ) { $ipsclass->input['CODE'] = 'paymentmethod'; @@ -541,7 +515,7 @@ if ($ipsclass->input['_low_act'] != 'login' and //=========================================================================== // REQUIRE AND RUN -//=========================================================================== +//=========================================================================== if ( $ipsclass->input['act'] == 'home' AND $ipsclass->vars['csite_on'] ) { @@ -560,7 +534,7 @@ else if ( $ipsclass->input['act'] == 'module' AND USE_MODULES ) else if ( $ipsclass->input['act'] == 'component' ) { $file = ROOT_PATH.'sources/components_public/'. $ipsclass->txt_alphanumerical_clean( $ipsclass->input['module'] ).'.php'; - + if ( file_exists( $file ) ) { require_once( $file ); @@ -574,11 +548,13 @@ else if ( $ipsclass->input['act'] == 'component' ) } } else -{ +{ // Require and run - require_once( ROOT_PATH."sources/action_public/".$choice[ strtolower($ipsclass->input['act']) ][0].".php" ); + $_pre_load = $ipsclass->memory_debug_make_flag(); + require( ROOT_PATH."sources/action_public/".$choice[ strtolower($ipsclass->input['act']) ][0].".php" ); $runme = new $choice[ strtolower($ipsclass->input['act']) ][1]; $runme->ipsclass =& $ipsclass; + $ipsclass->memory_debug_add( "CORE: Loaded ".$choice[ strtolower($ipsclass->input['act']) ][0].".php", $_pre_load ); $runme->auto_run(); } diff --git a/upload/init.php b/upload/init.php index 47ca35cf..11e13ee0 100644 --- a/upload/init.php +++ b/upload/init.php @@ -1,27 +1,17 @@ $Date: 2006-11-15 16:28:37 -0600 (Wed, 15 Nov 2006) $ -| > $Revision: 730 $ +| > $Date: 2008-04-07 13:25:37 -0400 (Mon, 07 Apr 2008) $ +| > $Revision: 1233 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -32,6 +22,11 @@ +-------------------------------------------------------------------------- */ +if ( @function_exists( 'memory_get_usage' ) ) +{ + define( 'IPB_MEMORY_START', memory_get_usage() ); +} + /** * INIT File * @@ -85,6 +80,15 @@ define ( 'IN_DEV', 0 ); */ define ( 'IPS_SQL_DEBUG_MODE', 0 ); +/** +* MEMORY DEBUG MODE +* +* Turns on MEMORY debugging mode. This is NOT recommended +* as it opens your board up to potential security risks +* @since 2.2.0.2006-11-06 +*/ +define ( 'IPS_MEMORY_DEBUG_MODE', 0 ); + /** * Write to debug file? * Enter relative / full path into the constant below @@ -106,7 +110,7 @@ define( 'IPS_XML_RPC_DEBUG_FILE', ROOT_PATH . 'cache/xmlrpc_debug.cgi' ); define( 'IPB_ACP_IP_MATCH', 1 ); /** -* Allow exec.url="" tags +* Allow and tags * Turning this on is a potential security risk as a malicious user * could, with access to your ACP, add in an executable * shell script which would allow root access to your @@ -115,7 +119,7 @@ define( 'IPB_ACP_IP_MATCH', 1 ); define( 'IPB_ACP_ALLOW_EXEC_URL', 0 ); /** -* Allow PHP tags in template HTML? +* Allow tags (which execute raw php) in template HTML? * Turning this on is a potential security risk as a malicious user * could, with access to your ACP, add in an executable * shell script which would allow root access to your @@ -123,12 +127,6 @@ define( 'IPB_ACP_ALLOW_EXEC_URL', 0 ); */ define( 'IPB_ACP_ALLOW_TEMPLATE_PHP', 0 ); -/** -* Allow UTF charset convertations for AJAX-based tools -* @since 2.2.2.2007-02-25 -*/ -define( 'IPB_ACP_AJAX_UTF_CONVERT', 1 ); - /** * Make the IPB portal your default forum page? */ @@ -186,7 +184,7 @@ define ( 'USE_MODULES', 1 ); * Useful to trap skin errors, etc * @since 2.0.0.2005-01-01 */ -define( 'CUSTOM_ERROR', 1 ); +define( 'CUSTOM_ERROR', 0 ); /** * TRIAL VERSION @@ -201,8 +199,8 @@ define( 'TRIAL_VERSION', 0 ); * * @since 2.0.0.2005-01-01 */ -define ( 'IPBVERSION', '2.2.2' ); -define ( 'IPB_LONG_VERSION', '22011' ); +define ( 'IPBVERSION', '2.3.6' ); +define ( 'IPB_LONG_VERSION', '23010' ); //----------------------------------------------- // NO USER EDITABLE SECTIONS BELOW @@ -318,7 +316,7 @@ class Debug */ function fatal_error($message="", $help="") { - echo("$message

$help"); + echo("$message

$help"); exit; } @@ -352,7 +350,7 @@ function my_error_handler( $errno, $errstr, $errfile, $errline ) switch ($errno) { case E_ERROR: - echo "ОШИБКА В КОДЕ: [$errno] $errstr (Строка: $errline файла $errfile)
\n"; + echo "IPB ERROR [$errno] $errstr (Line: $errline of $errfile)
\n"; if( is_object($ipsclass) ) { @@ -366,10 +364,10 @@ function my_error_handler( $errno, $errstr, $errfile, $errline ) { if ( IPB_THIS_SCRIPT != 'admin' ) { - echo "
ОШИБКА В ШАБЛОНЕ: Невозможно загрузить требуемый шаблон. -

Во-первых, проверьте и удалите любые другие стилевые настройки, нажав сюда -

Потом, пожалуйста, зайдите в админцентр форума и исправьте шаблон, вызывающий ошибку. -

Ошибка: $errstr
"; + echo "
IPB TEMPLATE ERROR: Could not load the required template. +

First, try and remove any custom skin settings by clicking here +

Then, please visit your Admin Control Panel to repair this template. +

Error: $errstr
"; } else { @@ -378,7 +376,7 @@ function my_error_handler( $errno, $errstr, $errfile, $errline ) } else { - echo "ПРЕДУПРЕЖДЕНИЕ: [$errno] $errstr (Строка: $errline файла $errfile)
\n"; + echo "IPB WARNING [$errno] $errstr (Line: $errline of $errfile)
\n"; } break; default: diff --git a/upload/install/core/actions/address.php b/upload/install/core/actions/address.php index d3745fa8..ce648a89 100644 --- a/upload/install/core/actions/address.php +++ b/upload/install/core/actions/address.php @@ -1,34 +1,8 @@ install->ipsclass->input['install_dir'] OR ! ( is_dir( $this->install->ipsclass->input['install_dir'] ) ) ) { - $errors[] = 'Указанный путь не существует в системе'; + $errors[] = 'The specified directory does not exist'; } /* Check URL */ if( ! $this->install->ipsclass->input['install_url'] ) { - $errors[] = 'Адрес установки не указан'; + $errors[] = 'You did not specify a URL'; } if( is_array( $errors ) ) diff --git a/upload/install/core/actions/admin.php b/upload/install/core/actions/admin.php index 1273f18a..fc4e1d40 100644 --- a/upload/install/core/actions/admin.php +++ b/upload/install/core/actions/admin.php @@ -1,30 +1,4 @@ -install->ipsclass->input['username'] ) { - $errors[] = 'Необходимо указать имя пользователя '; + $errors[] = 'You must specify a username for the admin account'; } if( ! $this->install->ipsclass->input['password'] ) { - $errors[] = 'Необходимо указать пароль'; + $errors[] = 'You must specify a password for the admin account'; } else { if( $this->install->ipsclass->input['password'] != $this->install->ipsclass->input['confirm_password'] ) { - $errors[] = 'Введенные пароли не совпадают'; + $errors[] = 'The admin passwords did not match'; } } if( ! $this->install->ipsclass->input['email'] ) { - $errors[] = 'Необходимо указать e-mail адрес'; + $errors[] = 'You must sepcify an email account for the admin account'; } if( is_array( $errors ) ) diff --git a/upload/install/core/actions/db.php b/upload/install/core/actions/db.php index 05b8a027..ee6104fb 100644 --- a/upload/install/core/actions/db.php +++ b/upload/install/core/actions/db.php @@ -1,30 +1,4 @@ -install->ipsclass->input['db_pre']) ) + { + $this->install->ipsclass->input['db_pre'] = strtolower($this->install->ipsclass->input['db_pre']); + } + /* Check input? */ if ( $this->install->ipsclass->input['sub'] == 'check' ) { /* Make sure the fields were filled out */ if ( ! $this->install->ipsclass->input['db_host'] || ! $this->install->ipsclass->input['db_name'] || ! $this->install->ipsclass->input['db_user'] ) { - $errors[] = 'Форма должна быть полностью заполнена'; + $errors[] = 'You must fill out the form completely'; } //----------------------------------------- @@ -110,7 +89,7 @@ class action_db } } } - + //----------------------------------------- // Error check //----------------------------------------- @@ -140,7 +119,7 @@ class action_db if( !count($errors) ) { - $errors[] = "Не получилось соединиться с сервером Базы Данных. Пожалуйста перепроверьте всю информацию и попробуйте снова."; + $errors[] = "There was a problem connecting to your SQL server. Please doublecheck your login information and try again."; } } @@ -178,14 +157,14 @@ class action_db //----------------------------------------- $html = " - -
-

Вы пытаетесь установить приложение в базу где уже есть таблицы от предыдущей установки. -
Если вы хотите продолжить установку, то помните что все существующие таблицы с данными будут удалены. - Если вы хотите установить приложение с использованием этой базы и не потерять существующие таблицы, используйте другой перфикс таблиц.

- УДАЛИТЬ СУЩЕСТВУЮЩИЕ ТАБЛИЦЫ ПРИ УСТАНОВКЕ -
- + +
+

You are attempting to install in a database that already has tables from another installation +
If you wish to install in this database, all current tables will be dropped which means any existing data will be deleted. + You can either continue, choosing to delete all current data or you can choose another SQL table prefix.

+ DELETE ANY CURRENT TABLES BEFORE INSTALLING +
+ "; $this->install->template->page_content = str_replace( '', $html, $this->install->template->page_content ); diff --git a/upload/install/core/actions/done.php b/upload/install/core/actions/done.php index 079f6498..427f5348 100644 --- a/upload/install/core/actions/done.php +++ b/upload/install/core/actions/done.php @@ -1,30 +1,4 @@ - - - - -Ошибка русской версии Invision Power Board - -

Ошибка русской версии Invision Power Board

-Вы попали на несуществующую страницу!
Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
- - \ No newline at end of file + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/upload/install/core/actions/install.php b/upload/install/core/actions/install.php index 96a2aed0..f9de2b6f 100644 --- a/upload/install/core/actions/install.php +++ b/upload/install/core/actions/install.php @@ -1,975 +1,1041 @@ -install =& $install; - } - - // SQL - ADMIN - CONF > SETTINGS > ACPPERMS > TEMPLATES > OTHER [ Email Templates ] > Build Caches - - function run() - { - //----------------------------------------- - // Any "extra" configs required for this driver? - //----------------------------------------- - - if ( is_array( $this->install->saved_data ) and count( $this->install->saved_data ) ) - { - foreach( $this->install->saved_data as $k => $v ) - { - if ( preg_match( "#^__sql__#", $k ) ) - { - $k = str_replace( "__sql__", "", $k ); - - $this->install->ipsclass->vars[ $k ] = $v; - } - } - } - - /* Switch */ - switch( $this->install->ipsclass->input['sub'] ) - { - case 'sql': - $this->install_sql(); - break; - - case 'settings': - $this->install_settings(); - break; - - case 'acpperms': - $this->install_acpperms(); - break; - - case 'templates': - $this->install_templates(); - break; - - case 'other': - $this->install_other(); - break; - - case 'caches': - $this->install_caches(); - break; - - default: - /* Output */ - $this->install->template->append( $this->install->template->install_page() ); - $this->install->template->next_action = '?p=install&sub=sql'; - $this->install->template->hide_next = 1; - break; - } - } - - /*-------------------------------------------------------------------------*/ - // Installs the SQL - /*-------------------------------------------------------------------------*/ - /** - * Installs SQL schematic - * - * @return void - */ - function install_sql() - { - //----------------------------------------- - // Write config - //----------------------------------------- - - $this->install->write_configuration(); - - //-------------------------------------------------- - // Any "extra" configs required for this driver? - //-------------------------------------------------- - - if ( file_exists( INS_ROOT_PATH.'sql/'.$this->install->saved_data['sql_driver'].'_install.php' ) ) - { - require_once( INS_ROOT_PATH.'sql/'.$this->install->saved_data['sql_driver'].'_install.php' ); - - $extra_install = new install_extra(); - $extra_install->ipsclass =& $this->install->ipsclass; - } - - //----------------------------------------- - // Run SQL commands - //----------------------------------------- - - require_once( INS_KERNEL_PATH . 'class_db_' . $this->install->saved_data['sql_driver'] . '.php' ); - - $this->install->ipsclass->init_db_connection( $this->install->saved_data['db_name'], - $this->install->saved_data['db_user'], - $this->install->saved_data['db_pass'], - $this->install->saved_data['db_host'], - $this->install->saved_data['db_pre'], - $this->install->ipsclass->vars['mysql_codepage'], - $this->install->saved_data['sql_driver'] - ); - - $this->install->ipsclass->converge = new class_converge( $this->install->ipsclass->DB ); - - include( INS_ROOT_PATH . 'sql/' . $this->install->saved_data['sql_driver'] . '_tables.php' ); - $output[] = "Создание таблиц в Базе Данных..."; - - - - foreach( $TABLE as $q ) - { - preg_match("/CREATE TABLE (\S+) \(/", $q, $match); - - if ( $match[1] AND $this->install->saved_data['_drop_tables'] ) - { - $this->install->ipsclass->DB->sql_drop_table( str_replace( 'ibf_', '', $match[1] ) ); - } - - $q = preg_replace("/ibf_(\S+?)([\s\.,]|$)/", $this->install->saved_data['db_pre']."\\1\\2", $q); - - //----------------------------------- - // Pass to handler - //----------------------------------- - - if ( $extra_install AND method_exists( $extra_install, 'process_query_create' ) ) - { - $q = $extra_install->process_query_create( $q ); - } - - $this->install->ipsclass->DB->allow_sub_select=1; - $this->install->ipsclass->DB->query( $q ); - } - - //----------------------------------- - // Create the fulltext index... - //----------------------------------- - - if ( $this->install->ipsclass->DB->sql_can_fulltext() ) - { - include( INS_ROOT_PATH . 'sql/' . $this->install->saved_data['sql_driver'] . '_fulltext.php' ); - $output[] = "Создание индексов таблиц..."; - - foreach( $INDEX as $q ) - { - $q = preg_replace("/ibf_(\S+?)([\s\.,]|$)/", $this->install->saved_data['db_pre']."\\1\\2", $q); - - //----------------------------------- - // Pass to handler - //----------------------------------- - - if ( $extra_install AND method_exists( $extra_install, 'process_query_index' ) ) - { - $q = $extra_install->process_query_index( $q ); - } - - //----------------------------------- - // Pass query - //----------------------------------- - - if ( ! $this->install->ipsclass->DB->query($q) ) - { - $this->install->template->warning($q."

".$this->install->ipsclass->DB->error); - } - } - } - - include( INS_ROOT_PATH . 'sql/' . $this->install->saved_data['sql_driver'] . '_inserts.php' ); - $output[] = "Заполнение таблиц данными..."; - - foreach( $INSERT as $q ) - { - $q = preg_replace("/ibf_(\S+?)([\s\.,]|$)/", $this->install->saved_data['db_pre']."\\1\\2", $q); - $q = str_replace( "<%time%>" , time(), $q ); - - # Admin's name - $q = str_replace( "<%admin_name%>", $this->install->saved_data['admin_user'], $q ); - - //----------------------------------- - // Pass to handler - //----------------------------------- - - if ( $extra_install AND method_exists( $extra_install, 'process_query_insert' ) ) - { - $q = $extra_install->process_query_insert( $q ); - } - - $this->install->ipsclass->DB->query( $q ); - } - - - //----------------------------------------- - // Create Admin account - //----------------------------------------- - - $output[] = "Создание учетной записи администратора..."; - - $this->install->create_admin_account(); - - //----------------------------------------- - // Next... - //----------------------------------------- - - $this->install->template->append( $this->install->template->install_page_refresh( $output ) ); - $this->install->template->next_action = '?p=install&sub=settings'; - $this->install->template->hide_next = 1; - } - - /*-------------------------------------------------------------------------*/ - // Installs the settings - /*-------------------------------------------------------------------------*/ - /** - * Installs SQL schematic - * - * @return void - */ - function install_settings() - { - //----------------------------------------- - // Get DB - //----------------------------------------- - - require_once( INS_KERNEL_PATH . 'class_db_' . $this->install->saved_data['sql_driver'] . '.php' ); - - $this->install->ipsclass->init_db_connection( $this->install->saved_data['db_name'], - $this->install->saved_data['db_user'], - $this->install->saved_data['db_pass'], - $this->install->saved_data['db_host'], - $this->install->saved_data['db_pre'], - $this->install->ipsclass->vars['mysql_codepage'], - $this->install->saved_data['sql_driver'] ); - //----------------------------------------- - // Install settings - //----------------------------------------- - - $output[] = "Добавление настроек..."; - $xml = new class_xml(); - $xml->lite_parser = 1; - - $content = implode( "", file( INS_DOC_ROOT_PATH . 'resources/settings.xml' ) ); - $xml->xml_parse_document( $content ); - - //----------------------------------------- - // Known settings - //----------------------------------------- - - if ( substr( $this->install->saved_data['install_url'], -1 ) == '/' ) - { - $this->install->saved_data['install_url'] = substr( $this->install->saved_data['install_url'], 0, -1 ); - } - - $_urls = parse_url( $this->install->saved_data['install_url'] ); - - $known = array( 'email_in' => $this->install->saved_data['admin_email'], - 'email_out' => $this->install->saved_data['admin_email'], - 'base_dir' => $this->install->saved_data['install_dir'], - 'upload_dir' => $this->install->saved_data['install_dir'] . '/uploads', - 'upload_url' => $this->install->saved_data['install_url'] . '/uploads', - 'search_sql_method' => $this->install->ipsclass->DB->sql_can_fulltext() ? 'ftext' : 'man', - //'cookie_domain' => $_urls['host'] != 'localhost' ? '.' . preg_replace( "#^(?:.+?\.)?([a-z0-9\-]{3,})\.(([a-z]{2,4})(\.([a-z]{2}))?|museum)$#is", "\\1.\\2", $_urls['host'] ) : '', - ); - - //----------------------------------------- - // Parse - //----------------------------------------- - - $fields = array( 'conf_title' , 'conf_description', 'conf_group' , 'conf_type' , 'conf_key' , 'conf_default', - 'conf_extra' , 'conf_evalphp' , 'conf_protected', 'conf_position', 'conf_start_group', 'conf_end_group', - 'conf_help_key', 'conf_add_cache' , 'conf_title_keyword' ); - - $setting_fields = array( 'conf_title_keyword', 'conf_title_title', 'conf_title_desc', 'conf_title_noshow', 'conf_title_module' ); - - //----------------------------------------- - // Fix up... - //----------------------------------------- - - if ( ! is_array( $xml->xml_array['settingexport']['settinggroup']['setting'][0] ) ) - { - //----------------------------------------- - // Ensure [0] is populated - //----------------------------------------- - - $tmp = $xml->xml_array['settingexport']['settinggroup']['setting']; - - unset($xml->xml_array['settingexport']['settinggroup']['setting']); - - $xml->xml_array['settingexport']['settinggroup']['setting'][0] = $tmp; - } - - //----------------------------------------- - // Loop through and sort out settings... - //----------------------------------------- - - foreach( $xml->xml_array['settingexport']['settinggroup']['setting'] as $id => $entry ) - { - $newrow = array(); - - //----------------------------------------- - // Is setting? - //----------------------------------------- - - if ( ! $entry['conf_is_title']['VALUE'] ) - { - foreach( $fields as $f ) - { - $newrow[$f] = $entry[ $f ]['VALUE']; - } - - $new_settings[] = $newrow; - } - - //----------------------------------------- - // Is title? - //----------------------------------------- - - else - { - foreach( $setting_fields as $f ) - { - $newrow[$f] = $entry[ $f ]['VALUE']; - } - - $new_titles[] = $newrow; - } - } - - //----------------------------------------- - // Sort out titles... - //----------------------------------------- - - if ( is_array( $new_titles ) and count( $new_titles ) ) - { - foreach( $new_titles as $idx => $data ) - { - if ( $data['conf_title_title'] AND $data['conf_title_keyword'] ) - { - //----------------------------------------- - // Get ID based on key - //----------------------------------------- - - $save = array( 'conf_title_title' => $data['conf_title_title'], - 'conf_title_desc' => $data['conf_title_desc'], - 'conf_title_keyword' => $data['conf_title_keyword'], - 'conf_title_noshow' => $data['conf_title_noshow'], - 'conf_title_module' => $data['conf_title_module'] ); - - //----------------------------------------- - // Insert first - //----------------------------------------- - - $this->install->ipsclass->DB->do_insert( 'conf_settings_titles', $save ); - - $conf_id = $this->install->ipsclass->DB->get_insert_id(); - $save['conf_title_id'] = $conf_id; - - //----------------------------------------- - // Update settings cache - //----------------------------------------- - - $setting_groups_by_key[ $save['conf_title_keyword'] ] = $save; - $setting_groups[ $save['conf_title_id'] ] = $save; - - $need_update[] = $conf_id; - } - } - } - - //----------------------------------------- - // Sort out settings - //----------------------------------------- - - if ( is_array( $new_settings ) and count( $new_settings ) ) - { - foreach( $new_settings as $idx => $data ) - { - //----------------------------------------- - // Insert known - //----------------------------------------- - - if ( in_array( $data['conf_key'], array_keys( $known ) ) ) - { - $data['conf_value'] = $known[ $data['conf_key'] ]; - #$data['conf_default'] = $known[ $data['conf_key'] ]; - } - else - { - $data['conf_value'] = ''; - } - - //----------------------------------------- - // Now assign to the correct ID based on - // our title keyword... - //----------------------------------------- - - $data['conf_group'] = $setting_groups_by_key[ $data['conf_title_keyword'] ]['conf_title_id']; - - //----------------------------------------- - // Remove from array - //----------------------------------------- - - unset( $data['conf_title_keyword'] ); - - $this->install->ipsclass->DB->do_insert( 'conf_settings', $data ); - } - } - - //----------------------------------------- - // Update group counts... - //----------------------------------------- - - if ( count( $need_update ) ) - { - foreach( $need_update as $i => $idx ) - { - $conf = $this->install->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as count', 'from' => 'conf_settings', 'where' => 'conf_group='.$idx ) ); - - $count = intval($conf['count']); - - $this->install->ipsclass->DB->do_update( 'conf_settings_titles', array( 'conf_title_count' => $count ), 'conf_title_id='.$idx ); - } - } - - //----------------------------------------- - // Next... - //----------------------------------------- - - $this->install->template->append( $this->install->template->install_page_refresh( $output ) ); - $this->install->template->next_action = '?p=install&sub=acpperms'; - $this->install->template->hide_next = 1; - } - - /*-------------------------------------------------------------------------*/ - // Installs the ACP Perms - /*-------------------------------------------------------------------------*/ - /** - * Installs SQL schematic - * - * @return void - */ - function install_acpperms() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $cur_perms = array(); - - //----------------------------------------- - // Get DB - //----------------------------------------- - - require_once( INS_KERNEL_PATH . 'class_db_' . $this->install->saved_data['sql_driver'] . '.php' ); - - $this->install->ipsclass->init_db_connection( $this->install->saved_data['db_name'], - $this->install->saved_data['db_user'], - $this->install->saved_data['db_pass'], - $this->install->saved_data['db_host'], - $this->install->saved_data['db_pre'], - $this->install->ipsclass->vars['mysql_codepage'], - $this->install->saved_data['sql_driver'] ); - //----------------------------------------- - // Install settings - //----------------------------------------- - - $output[] = "Создание прав доступа к АЦ..."; - $xml = new class_xml(); - $xml->lite_parser = 1; - - $content = implode( "", file( INS_DOC_ROOT_PATH . 'resources/acpperms.xml' ) ); - $xml->xml_parse_document( $content ); - - //----------------------------------------- - // Loop through and sort out settings... - //----------------------------------------- - - foreach( $xml->xml_array['permsexport']['permsgroup']['perm'] as $id => $entry ) - { - //----------------------------------------- - // Do we have a row matching this already? - //----------------------------------------- - - $_perm_main = $entry['acpperm_main']['VALUE']; - $_perm_child = $entry['acpperm_child']['VALUE']; - $_perm_bit = $entry['acpperm_bit']['VALUE']; - - $_perm_key = $_perm_main.':'.$_perm_child.':'.$_perm_bit; - - if ( ! $cur_perms[ $_perm_key ] ) - { - $this->install->ipsclass->DB->do_insert( 'admin_permission_keys', array( 'perm_key' => $_perm_key, - 'perm_main' => $_perm_main, - 'perm_child' => $_perm_child, - 'perm_bit' => $_perm_bit ) ); - - $inserted++; - } - } - - //----------------------------------------- - // Next... - //----------------------------------------- - - $this->install->template->append( $this->install->template->install_page_refresh( $output ) ); - $this->install->template->next_action = '?p=install&sub=templates'; - $this->install->template->hide_next = 1; - } - - - /*-------------------------------------------------------------------------*/ - // Install: Templates - /*-------------------------------------------------------------------------*/ - /** - * Install templates - * - * @return void - */ - function install_templates() - { - //----------------------------------------- - // Get DB - //----------------------------------------- - - require_once( INS_KERNEL_PATH . 'class_db_' . $this->install->saved_data['sql_driver'] . '.php' ); - - $this->install->ipsclass->init_db_connection( $this->install->saved_data['db_name'], - $this->install->saved_data['db_user'], - $this->install->saved_data['db_pass'], - $this->install->saved_data['db_host'], - $this->install->saved_data['db_pre'], - $this->install->ipsclass->vars['mysql_codepage'], - $this->install->saved_data['sql_driver'] ); - //----------------------------------------- - // Install settings - //----------------------------------------- - - $output[] = "Добавление шаблонов стилей..."; - $xml = new class_xml(); - $xml->lite_parser = 1; - - $content = implode( "", file( INS_DOC_ROOT_PATH . 'resources/ipb_templates.xml' ) ); - $xml->xml_parse_document( $content ); - - //----------------------------------------- - // Install - //----------------------------------------- - - foreach( $xml->xml_array['templateexport']['templategroup']['template'] as $id => $entry ) - { - $newrow = array(); - - $newrow['group_name'] = $entry[ 'group_name' ]['VALUE']; - $newrow['section_content'] = $entry[ 'section_content' ]['VALUE']; - $newrow['func_name'] = $entry[ 'func_name' ]['VALUE']; - $newrow['func_data'] = $entry[ 'func_data' ]['VALUE']; - $newrow['set_id'] = 1; - $newrow['updated'] = time(); - - $this->install->ipsclass->DB->allow_sub_select = 1; - $this->install->ipsclass->DB->do_insert( 'skin_templates', $newrow ); - } - - //------------------------------- - // GET MACROS - //------------------------------- - - $content = implode( "", file( INS_DOC_ROOT_PATH . 'resources/macro.xml' ) ); - $xml->xml_parse_document( $content ); - - //------------------------------- - // (MACRO) - //------------------------------- - - foreach( $xml->xml_array['macroexport']['macrogroup']['macro'] as $id => $entry ) - { - $newrow = array(); - - $newrow['macro_value'] = $entry[ 'macro_value' ]['VALUE']; - $newrow['macro_replace'] = $entry[ 'macro_replace' ]['VALUE']; - $newrow['macro_set'] = 1; - - $this->install->ipsclass->DB->do_insert( 'skin_macro', $newrow ); - } - - //----------------------------------------- - // Next... - //----------------------------------------- - - $this->install->template->append( $this->install->template->install_page_refresh( $output ) ); - $this->install->template->next_action = '?p=install&sub=other'; - $this->install->template->hide_next = 1; - } - - /*-------------------------------------------------------------------------*/ - // Install: Other - /*-------------------------------------------------------------------------*/ - /** - * Install Other stuff - * - * @return void - */ - function install_other() - { - //----------------------------------------- - // Get DB - //----------------------------------------- - - require_once( INS_KERNEL_PATH . 'class_db_' . $this->install->saved_data['sql_driver'] . '.php' ); - - $this->install->ipsclass->init_db_connection( $this->install->saved_data['db_name'], - $this->install->saved_data['db_user'], - $this->install->saved_data['db_pass'], - $this->install->saved_data['db_host'], - $this->install->saved_data['db_pre'], - $this->install->ipsclass->vars['mysql_codepage'], - $this->install->saved_data['sql_driver'] ); - //----------------------------------------- - // XML: COMPONENTS - //----------------------------------------- - - $output[] = "Анализ информации компонентов..."; - $xml = new class_xml(); - $xml->lite_parser = 1; - - $content = implode( "", file( INS_DOC_ROOT_PATH . 'resources/components.xml' ) ); - $xml->xml_parse_document( $content ); - - foreach( $xml->xml_array['export']['group']['row'] as $id => $entry ) - { - $newrow = array(); - - foreach( $entry as $f => $data ) - { - if ( $f == 'VALUE' or $f == 'com_id' ) - { - continue; - } - - $newrow[$f] = $entry[ $f ]['VALUE']; - } - - $this->install->ipsclass->DB->do_insert( 'components', $newrow ); - } - - //----------------------------------------- - // XML: LOG IN MODULES - //----------------------------------------- - - $output[] = "Подключение модулей авторизации..."; - $xml = new class_xml(); - $xml->lite_parser = 1; - - $content = implode( "", file( INS_ROOT_PATH . 'installfiles/loginauth.xml' ) ); - $xml->xml_parse_document( $content ); - - foreach( $xml->xml_array['export']['group']['row'] as $id => $entry ) - { - $newrow = array(); - - foreach( $entry as $f => $data ) - { - if ( $f == 'VALUE' or $f == 'login_id' ) - { - continue; - } - - $newrow[$f] = $this->install->ipsclass->txt_convert_charsets($entry[ $f ]['VALUE'], 'UTF-8'); - } - - $this->install->ipsclass->DB->do_insert( 'login_methods', $newrow ); - } - - //----------------------------------------- - // XML: GROUPS - //----------------------------------------- - - $output[] = "Создание пользовательских групп..."; - $xml = new class_xml(); - $xml->lite_parser = 1; - - $content = implode( "", file( INS_ROOT_PATH . 'installfiles/groups.xml' ) ); - $xml->xml_parse_document( $content ); - - foreach( $xml->xml_array['export']['group']['row'] as $id => $entry ) - { - $newrow = array(); - - foreach( $entry as $f => $data ) - { - if ( $f == 'VALUE' or $f == 'g_id' or preg_match( "#^g_blog_#is", $f ) ) - { - continue; - } - - $newrow[$f] = $this->install->ipsclass->txt_convert_charsets($entry[ $f ]['VALUE'], 'UTF-8'); - } - - $this->install->ipsclass->DB->do_insert( 'groups', $newrow ); - } - - //----------------------------------------- - // XML: ATTACHMENTS - //----------------------------------------- - - $output[] = "Настройка системы прикрепления файлов..."; - $xml = new class_xml(); - $xml->lite_parser = 1; - - $content = implode( "", file( INS_ROOT_PATH . 'installfiles/attachments.xml' ) ); - $xml->xml_parse_document( $content ); - - foreach( $xml->xml_array['export']['group']['row'] as $id => $entry ) - { - $newrow = array(); - - foreach( $entry as $f => $data ) - { - if ( $f == 'VALUE' or $f == 'atype_id' ) - { - continue; - } - - $newrow[$f] = $entry[ $f ]['VALUE']; - } - - $this->install->ipsclass->DB->do_insert( 'attachments_type', $newrow ); - } - - //----------------------------------------- - // XML: SKIN SETS - //----------------------------------------- - - $output[] = "Добавление стилей..."; - $xml = new class_xml(); - $xml->lite_parser = 1; - - $content = implode( "", file( INS_DOC_ROOT_PATH . 'resources/skinsets.xml' ) ); - $xml->xml_parse_document( $content ); - - //----------------------------------------- - // Fix up... - //----------------------------------------- - - if ( ! is_array( $xml->xml_array['export']['group']['row'][0] ) ) - { - //----------------------------------------- - // Ensure [0] is populated - //----------------------------------------- - - $tmp = $xml->xml_array['export']['group']['row']; - - unset($xml->xml_array['export']['group']['row']); - - $xml->xml_array['export']['group']['row'][0] = $tmp; - } - - foreach( $xml->xml_array['export']['group']['row'] as $id => $entry ) - { - $newrow = array(); - - foreach( $entry as $f => $data ) - { - if ( $f == 'VALUE' or $f == 'set_skin_set_id' ) - { - continue; - } - - $newrow[$f] = $entry[ $f ]['VALUE']; - } - - $this->install->ipsclass->DB->allow_sub_select = 1; - $this->install->ipsclass->DB->do_insert( 'skin_sets', $newrow ); - } - - //----------------------------------------- - // XML: TASKS :D - //----------------------------------------- - - $output[] = "Настройка планировщика задач..."; - $xml = new class_xml(); - $xml->lite_parser = 1; - - $content = implode( "", file( INS_DOC_ROOT_PATH . 'resources/tasks.xml' ) ); - $xml->xml_parse_document( $content ); - - foreach( $xml->xml_array['export']['group']['row'] as $id => $entry ) - { - $newrow = array(); - - foreach( $entry as $f => $data ) - { - if ( $f == 'VALUE' or $f == 'task_id' ) - { - continue; - } - - if ( $f == 'task_cronkey' ) - { - $entry[ $f ]['VALUE'] = md5( uniqid( microtime() ) ); - } - - if ( $f == 'task_next_run' ) - { - $entry[ $f ]['VALUE'] = time(); - } - - $newrow[$f] = $entry[ $f ]['VALUE']; - } - - $this->install->ipsclass->DB->do_insert( 'task_manager', $newrow ); - } - - //----------------------------------------- - // XML: FAQ - //----------------------------------------- - - $output[] = "Заполнение разделов FAQ..."; - $xml = new class_xml(); - $xml->lite_parser = 1; - - $content = implode( "", file( INS_DOC_ROOT_PATH . 'resources/faq.xml' ) ); - $xml->xml_parse_document( $content ); - - foreach( $xml->xml_array['export']['group']['row'] as $id => $entry ) - { - $newrow = array(); - - foreach( $entry as $f => $data ) - { - if ( $f == 'VALUE' or $f == 'id' ) - { - continue; - } - - $newrow[$f] = $entry[ $f ]['VALUE']; - } - - $this->install->ipsclass->DB->do_insert( 'faq', $newrow ); - } - - //----------------------------------------- - // XML: BBCode - //----------------------------------------- - - $output[] = "Настройка пользовательских BB-кодов..."; - $xml = new class_xml(); - $xml->lite_parser = 1; - - $content = implode( "", file( INS_DOC_ROOT_PATH . 'resources/bbcode.xml' ) ); - $xml->xml_parse_document( $content ); - - foreach( $xml->xml_array['bbcodeexport']['bbcodegroup']['bbcode'] as $id => $entry ) - { - $newrow = array(); - - foreach( $entry as $f => $data ) - { - if ( $f == 'VALUE' or $f == 'bbcode_id' ) - { - continue; - } - - $newrow[$f] = $entry[ $f ]['VALUE']; - } - - $this->install->ipsclass->DB->do_insert( 'custom_bbcode', $newrow ); - } - - //----------------------------------------- - // XML: MACROS - //----------------------------------------- - - /* - Macros inserted on line 560 above - only need to be inserted once.. - $output[] = "Inserting macro information..."; - $xml = new class_xml(); - - $content = implode( "", file( INS_ROOT_PATH . 'installfiles/macro.xml' ) ); - $xml->xml_parse_document( $content ); - - foreach( $xml->xml_array['macroexport']['macrogroup']['macro'] as $id => $entry ) - { - $newrow = array(); - - $newrow['macro_value'] = $entry[ 'macro_value' ]['VALUE']; - $newrow['macro_replace'] = $entry[ 'macro_replace' ]['VALUE']; - $newrow['macro_set'] = 1; - - $this->install->ipsclass->DB->do_insert( 'skin_macro', $newrow ); - }*/ - - //----------------------------------------- - // Next... - //----------------------------------------- - - $this->install->template->append( $this->install->template->install_page_refresh( $output ) ); - $this->install->template->next_action = '?p=install&sub=caches'; - $this->install->template->hide_next = 1; - } - - /*-------------------------------------------------------------------------*/ - // Install: Caches - /*-------------------------------------------------------------------------*/ - /** - * Install Caches - * - * @return void - */ - function install_caches() - { - //----------------------------------------- - // Get DB - //----------------------------------------- - - require_once( INS_KERNEL_PATH . 'class_db_' . $this->install->saved_data['sql_driver'] . '.php' ); - - $this->install->ipsclass->init_db_connection( $this->install->saved_data['db_name'], - $this->install->saved_data['db_user'], - $this->install->saved_data['db_pass'], - $this->install->saved_data['db_host'], - $this->install->saved_data['db_pre'], - $this->install->ipsclass->vars['mysql_codepage'], - $this->install->saved_data['sql_driver'] ); - //----------------------------------------- - // Do Caches - //----------------------------------------- - - $output = $this->install->cache_and_cleanup(); - - //----------------------------------------- - // Next... - //----------------------------------------- - - $this->install->template->append( $this->install->template->install_progress( $output ) ); - $this->install->template->next_action = '?p=done'; - } -} - +install =& $install; + } + + // SQL - ADMIN - CONF > SETTINGS > ACPPERMS > TEMPLATES > OTHER [ Email Templates ] > SKIN [ New Default ] > Build Caches + + function run() + { + //----------------------------------------- + // Any "extra" configs required for this driver? + //----------------------------------------- + + if ( is_array( $this->install->saved_data ) and count( $this->install->saved_data ) ) + { + foreach( $this->install->saved_data as $k => $v ) + { + if ( preg_match( "#^__sql__#", $k ) ) + { + $k = str_replace( "__sql__", "", $k ); + + $this->install->ipsclass->vars[ $k ] = $v; + } + } + } + + /* Switch */ + switch( $this->install->ipsclass->input['sub'] ) + { + case 'sql': + $this->install_sql(); + break; + + case 'settings': + $this->install_settings(); + break; + + case 'acpperms': + $this->install_acpperms(); + break; + + case 'templates': + $this->install_templates(); + break; + + case 'skin': + $this->install_skins(); + break; + + case 'other': + $this->install_other(); + break; + + case 'caches': + $this->install_caches(); + break; + + default: + /* Output */ + $this->install->template->append( $this->install->template->install_page() ); + $this->install->template->next_action = '?p=install&sub=sql'; + $this->install->template->hide_next = 1; + break; + } + } + + /*-------------------------------------------------------------------------*/ + // Installs the SQL + /*-------------------------------------------------------------------------*/ + /** + * Installs SQL schematic + * + * @return void + */ + function install_sql() + { + //----------------------------------------- + // Write config + //----------------------------------------- + + $this->install->write_configuration(); + + //-------------------------------------------------- + // Any "extra" configs required for this driver? + //-------------------------------------------------- + + if ( file_exists( INS_ROOT_PATH.'sql/'.$this->install->saved_data['sql_driver'].'_install.php' ) ) + { + require_once( INS_ROOT_PATH.'sql/'.$this->install->saved_data['sql_driver'].'_install.php' ); + + $extra_install = new install_extra(); + $extra_install->ipsclass =& $this->install->ipsclass; + } + + //----------------------------------------- + // Run SQL commands + //----------------------------------------- + + require_once( INS_KERNEL_PATH . 'class_db_' . $this->install->saved_data['sql_driver'] . '.php' ); + + $this->install->ipsclass->init_db_connection( $this->install->saved_data['db_name'], + $this->install->saved_data['db_user'], + $this->install->saved_data['db_pass'], + $this->install->saved_data['db_host'], + $this->install->saved_data['db_pre'], + $this->install->saved_data['sql_driver'] ); + + $this->install->ipsclass->converge = new class_converge( $this->install->ipsclass->DB ); + + include( INS_ROOT_PATH . 'sql/' . $this->install->saved_data['sql_driver'] . '_tables.php' ); + $output[] = "Creating SQL Tables..."; + + foreach( $TABLE as $q ) + { + preg_match("/CREATE TABLE (\S+) \(/", $q, $match); + + if ( $match[1] AND $this->install->saved_data['_drop_tables'] ) + { + $this->install->ipsclass->DB->sql_drop_table( str_replace( 'ibf_', '', $match[1] ) ); + } + + $q = preg_replace("/ibf_(\S+?)([\s\.,]|$)/", $this->install->saved_data['db_pre']."\\1\\2", $q); + + //----------------------------------- + // Pass to handler + //----------------------------------- + + if ( $extra_install AND method_exists( $extra_install, 'process_query_create' ) ) + { + $q = $extra_install->process_query_create( $q ); + } + + $this->install->ipsclass->DB->query( $q ); + } + + //----------------------------------- + // Create the fulltext index... + //----------------------------------- + + if ( $this->install->ipsclass->DB->sql_can_fulltext() ) + { + include( INS_ROOT_PATH . 'sql/' . $this->install->saved_data['sql_driver'] . '_fulltext.php' ); + $output[] = "Building indexes..."; + + foreach( $INDEX as $q ) + { + $q = preg_replace("/ibf_(\S+?)([\s\.,]|$)/", $this->install->saved_data['db_pre']."\\1\\2", $q); + + //----------------------------------- + // Pass to handler + //----------------------------------- + + if ( $extra_install AND method_exists( $extra_install, 'process_query_index' ) ) + { + $q = $extra_install->process_query_index( $q ); + } + + //----------------------------------- + // Pass query + //----------------------------------- + + if ( ! $this->install->ipsclass->DB->query($q) ) + { + $this->install->template->warning($q."

".$this->install->ipsclass->DB->error); + } + } + } + + include( INS_ROOT_PATH . 'sql/' . $this->install->saved_data['sql_driver'] . '_inserts.php' ); + $output[] = "Populating SQL Tables..."; + + foreach( $INSERT as $q ) + { + $q = preg_replace("/ibf_(\S+?)([\s\.,]|$)/", $this->install->saved_data['db_pre']."\\1\\2", $q); + $q = str_replace( "<%time%>" , time(), $q ); + + # Admin's name + $q = str_replace( "<%admin_name%>", $this->install->saved_data['admin_user'], $q ); + + //----------------------------------- + // Pass to handler + //----------------------------------- + + if ( $extra_install AND method_exists( $extra_install, 'process_query_insert' ) ) + { + $q = $extra_install->process_query_insert( $q ); + } + + $this->install->ipsclass->DB->query( $q ); + } + + + //----------------------------------------- + // Create Admin account + //----------------------------------------- + + $output[] = "Creating admin account..."; + + $this->install->create_admin_account(); + + //----------------------------------------- + // Next... + //----------------------------------------- + + $this->install->template->append( $this->install->template->install_page_refresh( $output ) ); + $this->install->template->next_action = '?p=install&sub=settings'; + $this->install->template->hide_next = 1; + } + + /*-------------------------------------------------------------------------*/ + // Installs the settings + /*-------------------------------------------------------------------------*/ + /** + * Installs SQL schematic + * + * @return void + */ + function install_settings() + { + //----------------------------------------- + // Get DB + //----------------------------------------- + + require_once( INS_KERNEL_PATH . 'class_db_' . $this->install->saved_data['sql_driver'] . '.php' ); + + $this->install->ipsclass->init_db_connection( $this->install->saved_data['db_name'], + $this->install->saved_data['db_user'], + $this->install->saved_data['db_pass'], + $this->install->saved_data['db_host'], + $this->install->saved_data['db_pre'], + $this->install->saved_data['sql_driver'] ); + //----------------------------------------- + // Install settings + //----------------------------------------- + + $output[] = "Inserting settings..."; + $xml = new class_xml(); + $xml->lite_parser = 1; + + $content = implode( "", file( INS_DOC_ROOT_PATH . 'resources/settings.xml' ) ); + $xml->xml_parse_document( $content ); + + //----------------------------------------- + // Known settings + //----------------------------------------- + + if ( substr( $this->install->saved_data['install_url'], -1 ) == '/' ) + { + $this->install->saved_data['install_url'] = substr( $this->install->saved_data['install_url'], 0, -1 ); + } + + $_urls = parse_url( $this->install->saved_data['install_url'] ); + + $known = array( 'email_in' => $this->install->saved_data['admin_email'], + 'email_out' => $this->install->saved_data['admin_email'], + 'base_dir' => $this->install->saved_data['install_dir'], + 'upload_dir' => $this->install->saved_data['install_dir'] . '/uploads', + 'upload_url' => $this->install->saved_data['install_url'] . '/uploads', + 'search_sql_method' => $this->install->ipsclass->DB->sql_can_fulltext() ? 'ftext' : 'man', + //'cookie_domain' => $_urls['host'] != 'localhost' ? '.' . preg_replace( "#^(?:.+?\.)?([a-z0-9\-]{3,})\.(([a-z]{2,4})(\.([a-z]{2}))?|museum)$#is", "\\1.\\2", $_urls['host'] ) : '', + ); + + //----------------------------------------- + // Parse + //----------------------------------------- + + $fields = array( 'conf_title' , 'conf_description', 'conf_group' , 'conf_type' , 'conf_key' , 'conf_default', + 'conf_extra' , 'conf_evalphp' , 'conf_protected', 'conf_position', 'conf_start_group', 'conf_end_group', + 'conf_add_cache' , 'conf_title_keyword' ); + + $setting_fields = array( 'conf_title_keyword', 'conf_title_title', 'conf_title_desc', 'conf_title_noshow', 'conf_title_module' ); + + //----------------------------------------- + // Fix up... + //----------------------------------------- + + if ( ! is_array( $xml->xml_array['settingexport']['settinggroup']['setting'][0] ) ) + { + //----------------------------------------- + // Ensure [0] is populated + //----------------------------------------- + + $tmp = $xml->xml_array['settingexport']['settinggroup']['setting']; + + unset($xml->xml_array['settingexport']['settinggroup']['setting']); + + $xml->xml_array['settingexport']['settinggroup']['setting'][0] = $tmp; + } + + //----------------------------------------- + // Loop through and sort out settings... + //----------------------------------------- + + foreach( $xml->xml_array['settingexport']['settinggroup']['setting'] as $id => $entry ) + { + $newrow = array(); + + //----------------------------------------- + // Is setting? + //----------------------------------------- + + if ( ! $entry['conf_is_title']['VALUE'] ) + { + foreach( $fields as $f ) + { + $newrow[$f] = $entry[ $f ]['VALUE']; + } + + $new_settings[] = $newrow; + } + + //----------------------------------------- + // Is title? + //----------------------------------------- + + else + { + foreach( $setting_fields as $f ) + { + $newrow[$f] = $entry[ $f ]['VALUE']; + } + + $new_titles[] = $newrow; + } + } + + //----------------------------------------- + // Sort out titles... + //----------------------------------------- + + if ( is_array( $new_titles ) and count( $new_titles ) ) + { + foreach( $new_titles as $idx => $data ) + { + if ( $data['conf_title_title'] AND $data['conf_title_keyword'] ) + { + //----------------------------------------- + // Get ID based on key + //----------------------------------------- + + $save = array( 'conf_title_title' => $data['conf_title_title'], + 'conf_title_desc' => $data['conf_title_desc'], + 'conf_title_keyword' => $data['conf_title_keyword'], + 'conf_title_noshow' => $data['conf_title_noshow'], + 'conf_title_module' => $data['conf_title_module'] ); + + //----------------------------------------- + // Insert first + //----------------------------------------- + + $this->install->ipsclass->DB->do_insert( 'conf_settings_titles', $save ); + + $conf_id = $this->install->ipsclass->DB->get_insert_id(); + $save['conf_title_id'] = $conf_id; + + //----------------------------------------- + // Update settings cache + //----------------------------------------- + + $setting_groups_by_key[ $save['conf_title_keyword'] ] = $save; + $setting_groups[ $save['conf_title_id'] ] = $save; + + $need_update[] = $conf_id; + } + } + } + + //----------------------------------------- + // Sort out settings + //----------------------------------------- + + if ( is_array( $new_settings ) and count( $new_settings ) ) + { + foreach( $new_settings as $idx => $data ) + { + //----------------------------------------- + // Insert known + //----------------------------------------- + + if ( in_array( $data['conf_key'], array_keys( $known ) ) ) + { + $data['conf_value'] = $known[ $data['conf_key'] ]; + #$data['conf_default'] = $known[ $data['conf_key'] ]; + } + else + { + $data['conf_value'] = ''; + } + + //----------------------------------------- + // Now assign to the correct ID based on + // our title keyword... + //----------------------------------------- + + $data['conf_group'] = $setting_groups_by_key[ $data['conf_title_keyword'] ]['conf_title_id']; + + //----------------------------------------- + // Remove from array + //----------------------------------------- + + unset( $data['conf_title_keyword'] ); + + $this->install->ipsclass->DB->do_insert( 'conf_settings', $data ); + } + } + + //----------------------------------------- + // Update group counts... + //----------------------------------------- + + if ( count( $need_update ) ) + { + foreach( $need_update as $i => $idx ) + { + $conf = $this->install->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as count', 'from' => 'conf_settings', 'where' => 'conf_group='.$idx ) ); + + $count = intval($conf['count']); + + $this->install->ipsclass->DB->do_update( 'conf_settings_titles', array( 'conf_title_count' => $count ), 'conf_title_id='.$idx ); + } + } + + //----------------------------------------- + // Next... + //----------------------------------------- + + $this->install->template->append( $this->install->template->install_page_refresh( $output ) ); + $this->install->template->next_action = '?p=install&sub=acpperms'; + $this->install->template->hide_next = 1; + } + + /*-------------------------------------------------------------------------*/ + // Installs the ACP Perms + /*-------------------------------------------------------------------------*/ + /** + * Installs SQL schematic + * + * @return void + */ + function install_acpperms() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $cur_perms = array(); + + //----------------------------------------- + // Get DB + //----------------------------------------- + + require_once( INS_KERNEL_PATH . 'class_db_' . $this->install->saved_data['sql_driver'] . '.php' ); + + $this->install->ipsclass->init_db_connection( $this->install->saved_data['db_name'], + $this->install->saved_data['db_user'], + $this->install->saved_data['db_pass'], + $this->install->saved_data['db_host'], + $this->install->saved_data['db_pre'], + $this->install->saved_data['sql_driver'] ); + //----------------------------------------- + // Install settings + //----------------------------------------- + + $output[] = "Inserting ACP Permissions..."; + $xml = new class_xml(); + $xml->lite_parser = 1; + + $content = implode( "", file( INS_DOC_ROOT_PATH . 'resources/acpperms.xml' ) ); + $xml->xml_parse_document( $content ); + + //----------------------------------------- + // Loop through and sort out settings... + //----------------------------------------- + + foreach( $xml->xml_array['permsexport']['permsgroup']['perm'] as $id => $entry ) + { + //----------------------------------------- + // Do we have a row matching this already? + //----------------------------------------- + + $_perm_main = $entry['acpperm_main']['VALUE']; + $_perm_child = $entry['acpperm_child']['VALUE']; + $_perm_bit = $entry['acpperm_bit']['VALUE']; + + $_perm_key = $_perm_main.':'.$_perm_child.':'.$_perm_bit; + + if ( ! $cur_perms[ $_perm_key ] ) + { + $this->install->ipsclass->DB->do_insert( 'admin_permission_keys', array( 'perm_key' => $_perm_key, + 'perm_main' => $_perm_main, + 'perm_child' => $_perm_child, + 'perm_bit' => $_perm_bit ) ); + + $inserted++; + } + } + + //----------------------------------------- + // Next... + //----------------------------------------- + + $this->install->template->append( $this->install->template->install_page_refresh( $output ) ); + $this->install->template->next_action = '?p=install&sub=templates'; + $this->install->template->hide_next = 1; + } + + + /*-------------------------------------------------------------------------*/ + // Install: Templates + /*-------------------------------------------------------------------------*/ + /** + * Install templates + * + * @return void + */ + function install_templates() + { + //----------------------------------------- + // Get DB + //----------------------------------------- + + require_once( INS_KERNEL_PATH . 'class_db_' . $this->install->saved_data['sql_driver'] . '.php' ); + + $this->install->ipsclass->init_db_connection( $this->install->saved_data['db_name'], + $this->install->saved_data['db_user'], + $this->install->saved_data['db_pass'], + $this->install->saved_data['db_host'], + $this->install->saved_data['db_pre'], + $this->install->saved_data['sql_driver'] ); + //----------------------------------------- + // Install settings + //----------------------------------------- + + $output[] = "Inserting templates..."; + $xml = new class_xml(); + $xml->lite_parser = 1; + + $content = implode( "", file( INS_DOC_ROOT_PATH . 'resources/ipb_templates.xml' ) ); + $xml->xml_parse_document( $content ); + + //----------------------------------------- + // Install + //----------------------------------------- + + foreach( $xml->xml_array['templateexport']['templategroup']['template'] as $id => $entry ) + { + $newrow = array(); + + $newrow['group_name'] = $entry[ 'group_name' ]['VALUE']; + $newrow['section_content'] = $entry[ 'section_content' ]['VALUE']; + $newrow['func_name'] = $entry[ 'func_name' ]['VALUE']; + $newrow['func_data'] = $entry[ 'func_data' ]['VALUE']; + $newrow['group_names_secondary'] = $entry[ 'group_names_secondary' ]['VALUE']; + $newrow['set_id'] = 1; + $newrow['updated'] = time(); + + $this->install->ipsclass->DB->allow_sub_select = 1; + $this->install->ipsclass->DB->do_insert( 'skin_templates', $newrow ); + } + + //------------------------------- + // GET MACROS + //------------------------------- + + $content = implode( "", file( INS_DOC_ROOT_PATH . 'resources/macro.xml' ) ); + $xml->xml_parse_document( $content ); + + //------------------------------- + // (MACRO) + //------------------------------- + + foreach( $xml->xml_array['macroexport']['macrogroup']['macro'] as $id => $entry ) + { + $newrow = array(); + + $newrow['macro_value'] = $entry[ 'macro_value' ]['VALUE']; + $newrow['macro_replace'] = $entry[ 'macro_replace' ]['VALUE']; + $newrow['macro_set'] = 1; + + $this->install->ipsclass->DB->do_insert( 'skin_macro', $newrow ); + } + + //----------------------------------------- + // Next... + //----------------------------------------- + + $this->install->template->append( $this->install->template->install_page_refresh( $output ) ); + $this->install->template->next_action = '?p=install&sub=other'; + $this->install->template->hide_next = 1; + } + + + /*-------------------------------------------------------------------------*/ + // Install: Skins + /*-------------------------------------------------------------------------*/ + /** + * Install other skins + * + * @return void + */ + function install_skins() + { + //----------------------------------------- + // Skip for safe_mode peeps + //----------------------------------------- + + $safe_mode = @ini_get("safe_mode") ? 1 : 0; + + if( $safe_mode ) + { + $this->install->template->append( $this->install->template->install_page_refresh( array( 'We detected that safe mode is enabled on your server. Skipping IP.Board Pro skin insertion...' ) ) ); + $this->install->template->next_action = '?p=install&sub=caches'; + $this->install->template->hide_next = 1; + } + + //----------------------------------------- + // Get DB + //----------------------------------------- + + require_once( INS_KERNEL_PATH . 'class_db_' . $this->install->saved_data['sql_driver'] . '.php' ); + + $this->install->ipsclass->init_db_connection( $this->install->saved_data['db_name'], + $this->install->saved_data['db_user'], + $this->install->saved_data['db_pass'], + $this->install->saved_data['db_host'], + $this->install->saved_data['db_pre'], + $this->install->saved_data['sql_driver'] ); + //------------------------------- + // Other Skins + //------------------------------- + + define( 'SQL_DRIVER', $this->install->saved_data['sql_driver'] ); + define( 'CACHE_PATH', ROOT_PATH ); + + require_once( ROOT_PATH . 'sources/api/api_skins.php' ); + $api = new api_skins(); + $api->ipsclass =& $this->install->ipsclass; + + if( !$this->install->ipsclass->input['didskin'] ) + { + $output[] = "Inserting IP.Board Pro skin templates..."; + + $api->skin_add_set( ROOT_PATH . 'resources/ipb_skin-pro.xml.gz' ); + + $this->install->template->append( $this->install->template->install_page_refresh( $output ) ); + $this->install->template->next_action = '?p=install&sub=skin&didskin=1'; + $this->install->template->hide_next = 1; + } + else + { + $output[] = "Inserting IP.Board Pro skin images..."; + $api->images_add_set( ROOT_PATH . 'resources/ipb_images-pro.xml.gz', 3 ); + + $this->install->ipsclass->DB->do_update( 'skin_sets', array( 'set_default' => 0 ) ); + $this->install->ipsclass->DB->do_update( 'skin_sets', array( 'set_default' => 1 ), 'set_skin_set_id=3' ); + + //----------------------------------------- + // Next... + //----------------------------------------- + + $this->install->template->append( $this->install->template->install_page_refresh( $output ) ); + $this->install->template->next_action = '?p=install&sub=caches'; + $this->install->template->hide_next = 1; + } + } + + /*-------------------------------------------------------------------------*/ + // Install: Other + /*-------------------------------------------------------------------------*/ + /** + * Install Other stuff + * + * @return void + */ + function install_other() + { + //----------------------------------------- + // Get DB + //----------------------------------------- + + require_once( INS_KERNEL_PATH . 'class_db_' . $this->install->saved_data['sql_driver'] . '.php' ); + + $this->install->ipsclass->init_db_connection( $this->install->saved_data['db_name'], + $this->install->saved_data['db_user'], + $this->install->saved_data['db_pass'], + $this->install->saved_data['db_host'], + $this->install->saved_data['db_pre'], + $this->install->saved_data['sql_driver'] ); + //----------------------------------------- + // XML: COMPONENTS + //----------------------------------------- + + $output[] = "Inserting components information..."; + $xml = new class_xml(); + $xml->lite_parser = 1; + + $content = implode( "", file( INS_DOC_ROOT_PATH . 'resources/components.xml' ) ); + $xml->xml_parse_document( $content ); + + foreach( $xml->xml_array['export']['group']['row'] as $id => $entry ) + { + $newrow = array(); + + foreach( $entry as $f => $data ) + { + if ( $f == 'VALUE' or $f == 'com_id' ) + { + continue; + } + + $newrow[$f] = $entry[ $f ]['VALUE']; + } + + $this->install->ipsclass->DB->do_insert( 'components', $newrow ); + } + + //----------------------------------------- + // XML: LOG IN MODULES + //----------------------------------------- + + $output[] = "Inserting log in modules information..."; + $xml = new class_xml(); + $xml->lite_parser = 1; + + $content = implode( "", file( INS_ROOT_PATH . 'installfiles/loginauth.xml' ) ); + $xml->xml_parse_document( $content ); + + foreach( $xml->xml_array['export']['group']['row'] as $id => $entry ) + { + $newrow = array(); + + foreach( $entry as $f => $data ) + { + if ( $f == 'VALUE' or $f == 'login_id' ) + { + continue; + } + + $newrow[$f] = $entry[ $f ]['VALUE']; + } + + $this->install->ipsclass->DB->do_insert( 'login_methods', $newrow ); + } + + //----------------------------------------- + // XML: GROUPS + //----------------------------------------- + + $output[] = "Inserting groups information..."; + $xml = new class_xml(); + $xml->lite_parser = 1; + + $content = implode( "", file( INS_ROOT_PATH . 'installfiles/groups.xml' ) ); + $xml->xml_parse_document( $content ); + + foreach( $xml->xml_array['export']['group']['row'] as $id => $entry ) + { + $newrow = array(); + + foreach( $entry as $f => $data ) + { + if ( $f == 'VALUE' or $f == 'g_id' or preg_match( "#^g_blog_#is", $f ) ) + { + continue; + } + + $newrow[$f] = $entry[ $f ]['VALUE']; + } + + $this->install->ipsclass->DB->do_insert( 'groups', $newrow ); + } + + //----------------------------------------- + // XML: ATTACHMENTS + //----------------------------------------- + + $output[] = "Inserting attachment type information..."; + $xml = new class_xml(); + $xml->lite_parser = 1; + + $content = implode( "", file( INS_ROOT_PATH . 'installfiles/attachments.xml' ) ); + $xml->xml_parse_document( $content ); + + foreach( $xml->xml_array['export']['group']['row'] as $id => $entry ) + { + $newrow = array(); + + foreach( $entry as $f => $data ) + { + if ( $f == 'VALUE' or $f == 'atype_id' ) + { + continue; + } + + $newrow[$f] = $entry[ $f ]['VALUE']; + } + + $this->install->ipsclass->DB->do_insert( 'attachments_type', $newrow ); + } + + //----------------------------------------- + // XML: SKIN SETS + //----------------------------------------- + + $output[] = "Inserting template set data..."; + $xml = new class_xml(); + $xml->lite_parser = 1; + + $content = implode( "", file( INS_DOC_ROOT_PATH . 'resources/skinsets.xml' ) ); + $xml->xml_parse_document( $content ); + + //----------------------------------------- + // Fix up... + //----------------------------------------- + + if ( ! is_array( $xml->xml_array['export']['group']['row'][0] ) ) + { + //----------------------------------------- + // Ensure [0] is populated + //----------------------------------------- + + $tmp = $xml->xml_array['export']['group']['row']; + + unset($xml->xml_array['export']['group']['row']); + + $xml->xml_array['export']['group']['row'][0] = $tmp; + } + + foreach( $xml->xml_array['export']['group']['row'] as $id => $entry ) + { + $newrow = array(); + + foreach( $entry as $f => $data ) + { + if ( $f == 'VALUE' or $f == 'set_skin_set_id' ) + { + continue; + } + + $newrow[$f] = $entry[ $f ]['VALUE']; + } + + $this->install->ipsclass->DB->allow_sub_select = 1; + $this->install->ipsclass->DB->do_insert( 'skin_sets', $newrow ); + } + + + //----------------------------------------- + // XML: TASKS :D + //----------------------------------------- + + $output[] = "Inserting task manager information..."; + $xml = new class_xml(); + $xml->lite_parser = 1; + + $content = implode( "", file( INS_DOC_ROOT_PATH . 'resources/tasks.xml' ) ); + $xml->xml_parse_document( $content ); + + foreach( $xml->xml_array['export']['group']['row'] as $id => $entry ) + { + $newrow = array(); + + foreach( $entry as $f => $data ) + { + if ( $f == 'VALUE' or $f == 'task_id' ) + { + continue; + } + + if ( $f == 'task_cronkey' ) + { + $entry[ $f ]['VALUE'] = md5( uniqid( microtime() ) ); + } + + if ( $f == 'task_next_run' ) + { + $entry[ $f ]['VALUE'] = time(); + } + + $newrow[$f] = $entry[ $f ]['VALUE']; + } + + $this->install->ipsclass->DB->do_insert( 'task_manager', $newrow ); + } + + //----------------------------------------- + // XML: FAQ + //----------------------------------------- + + $output[] = "Inserting FAQ information..."; + $xml = new class_xml(); + $xml->lite_parser = 1; + + $content = implode( "", file( INS_DOC_ROOT_PATH . 'resources/faq.xml' ) ); + $xml->xml_parse_document( $content ); + + foreach( $xml->xml_array['export']['group']['row'] as $id => $entry ) + { + $newrow = array(); + + foreach( $entry as $f => $data ) + { + if ( $f == 'VALUE' or $f == 'id' ) + { + continue; + } + + $newrow[$f] = $entry[ $f ]['VALUE']; + } + + $this->install->ipsclass->DB->do_insert( 'faq', $newrow ); + } + + //----------------------------------------- + // XML: BBCode + //----------------------------------------- + + $output[] = "Inserting custom BBCode information..."; + $xml = new class_xml(); + $xml->lite_parser = 1; + + $content = implode( "", file( INS_DOC_ROOT_PATH . 'resources/bbcode.xml' ) ); + $xml->xml_parse_document( $content ); + + foreach( $xml->xml_array['bbcodeexport']['bbcodegroup']['bbcode'] as $id => $entry ) + { + $newrow = array(); + + foreach( $entry as $f => $data ) + { + if ( $f == 'VALUE' or $f == 'bbcode_id' ) + { + continue; + } + + $newrow[$f] = $entry[ $f ]['VALUE']; + } + + $this->install->ipsclass->DB->do_insert( 'custom_bbcode', $newrow ); + } + + + //----------------------------------------- + // XML: Help Information + //----------------------------------------- + + $output[] = "Inserting ACP help files..."; + $xml = new class_xml(); + $xml->lite_parser = 1; + + $content = implode( "", file( INS_DOC_ROOT_PATH . 'resources/help_sections.xml' ) ); + $xml->xml_parse_document( $content ); + + foreach( $xml->xml_array['helpsectionsexport']['helpsectionsgroup']['helpsections'] as $id => $entry ) + { + $newrow = array( + 'is_setting' => 0, + 'page_key' => $entry['key']['VALUE'], + 'help_title' => $entry['title']['VALUE'], + 'help_body' => $entry['helptext']['VALUE'], + ); + + $this->install->ipsclass->DB->do_insert( 'acp_help', $newrow ); + } + + $xml = new class_xml(); + $xml->lite_parser = 1; + + $content = implode( "", file( INS_DOC_ROOT_PATH . 'resources/help_settings.xml' ) ); + $xml->xml_parse_document( $content ); + + foreach( $xml->xml_array['helpsettingsexport']['helpsettingsgroup']['helpsettings'] as $id => $entry ) + { + $newrow = array( + 'is_setting' => 1, + 'page_key' => $entry['key']['VALUE'], + 'help_title' => $entry['title']['VALUE'], + 'help_body' => $entry['helptext']['VALUE'], + 'help_mouseover'=> $entry['mouseover']['VALUE'], + ); + + $this->install->ipsclass->DB->do_insert( 'acp_help', $newrow ); + } + + //----------------------------------------- + // Next... + //----------------------------------------- + + $this->install->template->append( $this->install->template->install_page_refresh( $output ) ); + $this->install->template->next_action = '?p=install&sub=skin'; + $this->install->template->hide_next = 1; + } + + /*-------------------------------------------------------------------------*/ + // Install: Caches + /*-------------------------------------------------------------------------*/ + /** + * Install Caches + * + * @return void + */ + function install_caches() + { + //----------------------------------------- + // Get DB + //----------------------------------------- + + require_once( INS_KERNEL_PATH . 'class_db_' . $this->install->saved_data['sql_driver'] . '.php' ); + + $this->install->ipsclass->init_db_connection( $this->install->saved_data['db_name'], + $this->install->saved_data['db_user'], + $this->install->saved_data['db_pass'], + $this->install->saved_data['db_host'], + $this->install->saved_data['db_pre'], + $this->install->saved_data['sql_driver'] ); + //----------------------------------------- + // Do Caches + //----------------------------------------- + + $output = $this->install->cache_and_cleanup(); + + //----------------------------------------- + // Next... + //----------------------------------------- + + $this->install->template->append( $this->install->template->install_progress( $output ) ); + $this->install->template->next_action = '?p=done'; + } +} + ?> \ No newline at end of file diff --git a/upload/install/core/actions/requirements.php b/upload/install/core/actions/requirements.php index da6523a8..67302fd0 100644 --- a/upload/install/core/actions/requirements.php +++ b/upload/install/core/actions/requirements.php @@ -1,30 +1,4 @@ -product_name = $name; - $this->product_license = $license; - $this->product_versions = $versions; - $this->product_key = $key; - } - - /** - * class_installer:set_software_versions - * - * Set required software versions of php and mysql - * - * @param string $php_min Example: 3.0.0 - * @param string $mysql_min Example: 4.4.0 - */ - function set_software_versions( $php_min, $mysql_min ) - { - $this->version_php_min = explode( '.', $php_min ); - $this->version_mysql_min = $mysql_min; - } - - /** - * class_installer::set_required - * - * Set what files and directories must be present for an installation - * - * @param array $dirs - * @param array $files - */ - function set_required( $dirs, $files ) - { - $this->required_dirs = $dirs; - $this->required_files = $files; - } - - /** - * class_installer::set_writeable - * - * Set what files and directories must be writeable - * - * @param array $dirs - * @param array $files - */ - function set_writeable( $dirs=array(), $files=array() ) - { - $this->writeable_dirs = $dirs; - $this->writeable_files = $files; - } - - /** - * class_installer::check_requirements - * - * Checks to make sure that all requirements are met, including software versions, - * directories, and files. - * - * @return array $errors - */ - function check_requirements() - { - /* Errors Array */ - $errors = array(); - - /** - * PHP Version Checking - */ - - /* Check Min PHP Version */ - $check_php = explode( '.', $this->version_php_min ); - - if ( PHP_VERSION < $this->version_php_min ) - { - $errors[] = 'Версия PHP, установленная на вашем сервере, не удовлетворяет системным требованиям продукта. Для продолжения установки необходимо обновить PHP.'; - } - - /** - * SQL Version Checking - */ - - /** - * Required Directories/Files Checking - */ - if( count( $this->required_dirs ) ) - { - foreach( $this->required_dirs as $_d ) - { - if( ! ( is_dir( $_d) && is_readable( $_d ) ) ) - { - $errors[] = 'Не возможно найти требуемую директорию: "' . $_d . '"'; - } - } - } - - if( count( $this->required_files ) ) - { - foreach( $this->required_files as $_f ) - { - if( ! ( file_exists( $_f) && is_readable( $_f ) ) ) - { - $errors[] = 'Не возможно найти требуемый файл: "' . $_f . '"'; - } - } - } - - /** - * Writeable Directories/File Checking - */ - if( count( $this->writeable_dirs ) ) - { - foreach( $this->writeable_dirs as $_d ) - { - if( ! is_writeable( $_d ) ) - { - $errors[] = 'Директория «' . str_replace( INS_DOC_ROOT_PATH, '', $_d ) . '» не доступна для записи.
Пожалуйста измените права доступа (CHMOD) на 777.'; - } - } - - foreach( $this->writeable_files as $_f ) - { - if( ! is_writeable( $_f ) ) - { - $errors[] = 'Файл «' . str_replace( INS_DOC_ROOT_PATH, '', $_f ) . '» не доступен для записи.
Пожалуйста измените права доступа (CHMOD) на 777.'; - } - } - } - - return $errors; - } - - /** - * class_installer::unpack_config - * - * Reads and stores the information from the config.xml file - * - */ - function read_config() - { - // Get Configuration File - $config = implode( '', file( INS_ROOT_PATH . 'installfiles/config.xml' ) ); - $xml = new class_xml(); - - $config = $xml->xml_parse_document( $config ); - - // Set Info - $this->product_name = $this->ipsclass->txt_convert_charsets($xml->xml_array['installdata']['package']['name']['VALUE'], 'UTF-8'); - $this->product_license = $this->ipsclass->txt_convert_charsets($xml->xml_array['installdata']['package']['license']['VALUE'], 'UTF-8'); - $this->product_version = $this->ipsclass->txt_convert_charsets($xml->xml_array['installdata']['package']['version']['VALUE'], 'UTF-8'); - $this->product_long_version = $this->ipsclass->txt_convert_charsets($xml->xml_array['installdata']['package']['versionlong']['VALUE'], 'UTF-8'); - $this->build_id = $this->ipsclass->txt_convert_charsets($xml->xml_array['installdata']['package']['build']['VALUE'], 'UTF-8'); - - // Override. - $this->product_version = IPBVERSION; - } - - /** - * class_installer::write_file - * - * Simple method for writing a file - * - * @param string $name Full name, including path, of file to write - * @param string $data Contents of file - */ - function write_file( $name, $data ) - { - $fh = @fopen( $name, "w" ); - @fwrite( $fh, $data, strlen( $data ) ); - @fclose( $fh ); - } - - /** - * class_installer::create_admin_converge - * - * Builds converge entry for admin - * - * @return integer $id Converge ID - */ - function create_admin_converge() - { - /* Build Entry */ - $salt = $this->ipsclass->converge->generate_password_salt( 5 ); - $passhash = $this->ipsclass->converge->generate_compiled_passhash( $salt, md5( $this->saved_data['admin_pass'] ) ); - - $converge = array( 'converge_email' => $this->saved_data['admin_email'], - 'converge_joined' => time(), - 'converge_pass_hash' => $passhash, - 'converge_pass_salt' => str_replace( '\\', "\\\\", $salt ), - ); - - /* Insert */ - $this->ipsclass->DB->do_insert( 'members_converge', $converge ); - - /* Return ID */ - return $this->ipsclass->DB->get_insert_id(); - } - - /** - * class_installer::chmod_dir - * - * chmods all files and directories in the given path - * - * @param string $path - * @param integer $mode - */ - function chmod_dir( $path, $mode ) - { - /* Open directory */ - $dh = @opendir( $path ); - - while( false !== ( $f = @readdir( $dh ) ) ) - { - if( $f != '.' && $f != '..' ) - { - /* Full file path */ - $_path = $path . '/'. $f; - - /* CHMOD directory and contents */ - if( @is_dir( $_path ) ) - { - @chmod( $_path, $mode ); - $this->chmod_dir( $_path, $mode ); - } - /* CHMOD file */ - else - { - @chmod( $_path, $mode ); - } - } - } - - /* Close directory */ - @closedir( $dh ); - } - - /** - * class_installer::process - * - * Figures out what action to run - * - */ - function process() - { - /* Require Action */ - require_once( INS_ROOT_PATH . 'core/actions/' . $this->template->page_current . '.php' ); - - /* Initialize */ - $class = 'action_' . $this->template->page_current; - $this->action = new $class( $this ); - $this->action->run(); - } - - /*-------------------------------------------------------------------------*/ - // Lock installer - /*-------------------------------------------------------------------------*/ - /** - * Lock Installer - * Writes a lock file - * - * @return void - */ - function lock_installer() - { - //----------------------------------------- - // Write! - //----------------------------------------- - - $this->write_file( INS_ROOT_PATH . 'installfiles/lock.php', 'LOCKED' ); - } - - /*-------------------------------------------------------------------------*/ - // Check lock - /*-------------------------------------------------------------------------*/ - /** - * Lock Installer - * Writes a lock file - * - * @return void - */ - function check_lock() - { - //----------------------------------------- - // Write! - //----------------------------------------- - - return file_exists( INS_ROOT_PATH . 'installfiles/lock.php' ) ? 1 : 0; - } - - /* Overridden by application specific class */ - function pre_process() {} - function post_process() {} - function set_requirements() {} - -} - +product_name = $name; + $this->product_license = $license; + $this->product_versions = $versions; + $this->product_key = $key; + } + + /** + * class_installer:set_software_versions + * + * Set required software versions of php and mysql + * + * @param string $php_min Example: 3.0.0 + * @param string $mysql_min Example: 4.4.0 + */ + function set_software_versions( $php_min, $mysql_min ) + { + $this->version_php_min = explode( '.', $php_min ); + $this->version_mysql_min = $mysql_min; + } + + /** + * class_installer::set_required + * + * Set what files and directories must be present for an installation + * + * @param array $dirs + * @param array $files + */ + function set_required( $dirs, $files ) + { + $this->required_dirs = $dirs; + $this->required_files = $files; + } + + /** + * class_installer::set_writeable + * + * Set what files and directories must be writeable + * + * @param array $dirs + * @param array $files + */ + function set_writeable( $dirs=array(), $files=array() ) + { + $this->writeable_dirs = $dirs; + $this->writeable_files = $files; + } + + /** + * class_installer::check_requirements + * + * Checks to make sure that all requirements are met, including software versions, + * directories, and files. + * + * @return array $errors + */ + function check_requirements() + { + /* Errors Array */ + $errors = array(); + + /** + * PHP Version Checking + */ + + /* Check Min PHP Version */ + $check_php = explode( '.', $this->version_php_min ); + + if ( PHP_VERSION < $this->version_php_min ) + { + $errors[] = 'Your PHP installation is too old to run this product, please upgrade before continuing.'; + } + + /** + * SQL Version Checking + */ + + /** + * Required Directories/Files Checking + */ + if( count( $this->required_dirs ) ) + { + foreach( $this->required_dirs as $_d ) + { + if( ! ( is_dir( $_d) && is_readable( $_d ) ) ) + { + $errors[] = 'A required directory could not be located: "' . $_d . '"'; + } + } + } + + if( count( $this->required_files ) ) + { + foreach( $this->required_files as $_f ) + { + if( ! ( file_exists( $_f) && is_readable( $_f ) ) ) + { + $errors[] = 'A required file could not be located: "' . $_f . '"'; + } + } + } + + /** + * Writeable Directories/File Checking + */ + if( count( $this->writeable_dirs ) ) + { + foreach( $this->writeable_dirs as $_d ) + { + if( ! is_writeable( $_d ) ) + { + $errors[] = 'Can not write to directory: "' . str_replace( INS_DOC_ROOT_PATH, '', $_d ) . '", please CHMOD to 777'; + } + } + + foreach( $this->writeable_files as $_f ) + { + if( ! is_writeable( $_f ) ) + { + $errors[] = 'Can not write to file: "' . str_replace( INS_DOC_ROOT_PATH, '', $_f ) . '", please CHMOD to 777'; + } + } + } + + return $errors; + } + + /** + * class_installer::unpack_config + * + * Reads and stores the information from the config.xml file + * + */ + function read_config() + { + // Get Configuration File + $config = implode( '', file( INS_ROOT_PATH . 'installfiles/config.xml' ) ); + $xml = new class_xml(); + + $config = $xml->xml_parse_document( $config ); + + // Set Info + $this->product_name = $xml->xml_array['installdata']['package']['name']['VALUE']; + $this->product_license = $xml->xml_array['installdata']['package']['license']['VALUE']; + $this->product_version = $xml->xml_array['installdata']['package']['version']['VALUE']; + $this->product_long_version = $xml->xml_array['installdata']['package']['versionlong']['VALUE']; + $this->build_id = $xml->xml_array['installdata']['package']['build']['VALUE']; + + // Override. + $this->product_version = IPBVERSION; + } + + /** + * class_installer::write_file + * + * Simple method for writing a file + * + * @param string $name Full name, including path, of file to write + * @param string $data Contents of file + */ + function write_file( $name, $data ) + { + $fh = @fopen( $name, "w" ); + @fwrite( $fh, $data, strlen( $data ) ); + @fclose( $fh ); + } + + /** + * class_installer::create_admin_converge + * + * Builds converge entry for admin + * + * @return integer $id Converge ID + */ + function create_admin_converge() + { + /* Build Entry */ + $salt = $this->ipsclass->converge->generate_password_salt( 5 ); + $passhash = $this->ipsclass->converge->generate_compiled_passhash( $salt, md5( $this->saved_data['admin_pass'] ) ); + + $converge = array( 'converge_email' => $this->saved_data['admin_email'], + 'converge_joined' => time(), + 'converge_pass_hash' => $passhash, + 'converge_pass_salt' => str_replace( '\\', "\\\\", $salt ), + ); + + /* Insert */ + $this->ipsclass->DB->do_insert( 'members_converge', $converge ); + + /* Return ID */ + return $this->ipsclass->DB->get_insert_id(); + } + + /** + * class_installer::chmod_dir + * + * chmods all files and directories in the given path + * + * @param string $path + * @param integer $mode + */ + function chmod_dir( $path, $mode ) + { + /* Open directory */ + $dh = @opendir( $path ); + + while( false !== ( $f = @readdir( $dh ) ) ) + { + if( $f != '.' && $f != '..' ) + { + /* Full file path */ + $_path = $path . '/'. $f; + + /* CHMOD directory and contents */ + if( @is_dir( $_path ) ) + { + @chmod( $_path, $mode ); + $this->chmod_dir( $_path, $mode ); + } + /* CHMOD file */ + else + { + @chmod( $_path, $mode ); + } + } + } + + /* Close directory */ + @closedir( $dh ); + } + + /** + * class_installer::process + * + * Figures out what action to run + * + */ + function process() + { + /* Require Action */ + require_once( INS_ROOT_PATH . 'core/actions/' . $this->template->page_current . '.php' ); + + /* Initialize */ + $class = 'action_' . $this->template->page_current; + $this->action = new $class( $this ); + $this->action->run(); + } + + /*-------------------------------------------------------------------------*/ + // Lock installer + /*-------------------------------------------------------------------------*/ + /** + * Lock Installer + * Writes a lock file + * + * @return void + */ + function lock_installer() + { + //----------------------------------------- + // Write! + //----------------------------------------- + + $this->write_file( INS_ROOT_PATH . 'installfiles/lock.php', 'LOCKED' ); + } + + /*-------------------------------------------------------------------------*/ + // Check lock + /*-------------------------------------------------------------------------*/ + /** + * Lock Installer + * Writes a lock file + * + * @return void + */ + function check_lock() + { + //----------------------------------------- + // Write! + //----------------------------------------- + + return file_exists( INS_ROOT_PATH . 'installfiles/lock.php' ) ? 1 : 0; + } + + /* Overridden by application specific class */ + function pre_process() {} + function post_process() {} + function set_requirements() {} + +} + ?> \ No newline at end of file diff --git a/upload/install/core/class_tar.php b/upload/install/core/class_tar.php index 725f19a1..92dd6f28 100644 --- a/upload/install/core/class_tar.php +++ b/upload/install/core/class_tar.php @@ -1,880 +1,869 @@ - Tar creation and extraction module -| > Module written by Matt Mecham -| > Usage style based on the C and Perl modules -| > Will only work with PHP 4+ -| -| > Date started: 15th Feb 2002 -| -| > Module Version Number: 1.0.0 -| > Module Author: Matthew Mecham -+-------------------------------------------------------------------------- -| -| QUOTE OF THE MODULE: -| If you can't find a program the does what you want it to do, write your -| own. -| -+-------------------------------------------------------------------------- -*/ - -/************************************************************* -| -| EXTRACTION USAGE: -| -| $tar = new tar(); -| $tar->new_tar("/foo/bar", "myTar.tar"); -| $files = $tar->list_files(); -| $tar->extract_files( "/extract/to/here/dir" ); -| -| CREATION USAGE: -| -| $tar = new tar(); -| $tar->new_tar("/foo/bar" , "myNewTar.tar"); -| $tar->current_dir("/foo" ); //Optional - tells the script which dir we are in -| to syncronise file creation from the tarball -| $tar->add_files( $file_names_with_path_array ); -| (or $tar->add_directory( "/foo/bar/myDir" ); to archive a complete dir) -| $tar->write_tar(); -| -*************************************************************/ - - - -class tar { - - var $tar_header_length = '512'; - var $tar_unpack_header = 'a100filename/a8mode/a8uid/a8gid/a12size/a12mtime/a8chksum/a1typeflag/a100linkname/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor/a155/prefix'; - var $tar_pack_header = 'A100 A8 A8 A8 A12 A12 A8 A1 A100 A6 A2 A32 A32 A8 A8 A155'; - var $current_dir = ""; - var $unpack_dir = ""; - var $pack_dir = ""; - var $error = ""; - var $work_dir = array(); - var $tar_in_mem = array(); - var $tar_filename = ""; - var $filehandle = ""; - var $warnings = array(); - var $attributes = array(); - var $tarfile_name = ""; - var $tarfile_path = ""; - var $tarfile_path_name = ""; - var $workfiles = array(); - - //----------------------------------------- - // CONSTRUCTOR: Attempt to guess the current working dir. - //----------------------------------------- - - function tar() { - global $HTTP_SERVER_VARS; - - if ($this_dir = getcwd()) - { - $this->current_dir = $this_dir; - } - else if (isset($HTTP_SERVER_VARS['DOCUMENT_ROOT'])) - { - $this->current_dir = $HTTP_SERVER_VARS['DOCUMENT_ROOT']; - } - else - { - $this->current_dir = './'; - } - - // Set some attributes, these can be overriden later - - $this->attributes = array( 'over_write_existing' => 0, - 'over_write_newer' => 0, - 'remove_tar_file' => 0, - 'remove_original_files' => 0, - ); - } - - //----------------------------------------- - // Set the tarname. If we are extracting a tarball, then it must be the - // path to the tarball, and it's name (eg: $tar->new_tar("/foo/bar" ,'myTar.tar') - // or if we are creating a tar, then it must be the path and name of the tar file - // to create. - //----------------------------------------- - - function new_tar($tarpath, $tarname) { - - $this->tarfile_name = $tarname; - $this->tarfile_path = $tarpath; - - // Make sure there isn't a trailing slash on the path - - $this->tarfile_path = preg_replace( "#[/\\\]$#" , "" , $this->tarfile_path ); - - $this->tarfile_path_name = $this->tarfile_path .'/'. $this->tarfile_name; - - } - - - //----------------------------------------- - // Easy way to overwrite defaults - //----------------------------------------- - - function over_write_existing() { - $this->attributes['over_write_existing'] = 1; - } - function over_write_newer() { - $this->attributes['over_write_newer'] = 1; - } - function remove_tar_file() { - $this->attributes['remove_tar_file'] = 1; - } - function remove_original_files() { - $this->attributes['remove_original_files'] = 1; - } - - - - //----------------------------------------- - // User assigns the root directory for the tar ball creation/extraction - //----------------------------------------- - - function current_dir($dir = "") { - - $this->current_dir = $dir; - - } - - //----------------------------------------- - // list files: returns an array with all the filenames in the tar file - //----------------------------------------- - - function list_files($advanced="") { - - // $advanced == "" - return name only - // $advanced == 1 - return name, size, mtime, mode - - $data = $this->read_tar(); - - $final = array(); - - foreach($data as $d) - { - if ($advanced == 1) - { - $final[] = array ( 'name' => $d['name'], - 'size' => $d['size'], - 'mtime' => $d['mtime'], - 'mode' => substr(decoct( $d['mode'] ), -4), - ); - } - else - { - $final[] = $d['name']; - } - } - - return $final; - } - - //----------------------------------------- - // Add a directory to the tar files. - // $tar->add_directory( str(TO DIRECTORY) ) - // Can be used in the following methods. - // $tar->add_directory( "/foo/bar" ); - // $tar->write_tar( "/foo/bar" ); - //----------------------------------------- - - function add_directory( $dir ) { - - $this->error = ""; - - // Make sure the $to_dir is pointing to a valid dir, or we error - // and return - - if (! is_dir($dir) ) - { - $this->error = "Ошибка распаковки файлов: Директории ($to_dir) для распаковки не существует"; - return FALSE; - } - - $cur_dir = getcwd(); - chdir($dir); - - $this->get_dir_contents("./"); - - $this->add_files($this->workfiles, $dir); - - chdir($cur_dir); - - } - - //----------------------------------------- - - function get_dir_contents( $dir ) - { - - $dir = preg_replace( "#/$#", "", $dir ); - - if ( file_exists($dir) ) - { - if ( is_dir($dir) ) - { - $handle = opendir($dir); - - while (($filename = readdir($handle)) !== false) - { - if (($filename != ".") && ($filename != "..")) - { - if (is_dir($dir."/".$filename)) - { - $this->get_dir_contents($dir."/".$filename); - } - else - { - $this->workfiles[] = $dir."/".$filename; - } - } - } - - closedir($handle); - } - else - { - $this->error = "$dir не является директорией"; - return FALSE; - } - } - else - { - $this->error = "Не возможно найти директорию $dir"; - return; - } - } - - //----------------------------------------- - // Extract the tarball - // $tar->extract_files( str(TO DIRECTORY), [ array( FILENAMES ) ] ) - // Can be used in the following methods. - // $tar->extract( "/foo/bar" , $files ); - // This will seek out the files in the user array and extract them - // $tar->extract( "/foo/bar" ); - // Will extract the complete tar file into the user specified directory - //----------------------------------------- - - function extract_files( $to_dir, $files="" ) { - - $this->error = ""; - - // Make sure the $to_dir is pointing to a valid dir, or we error - // and return - - if (! is_dir($to_dir) ) - { - $this->error = "Ошибка распаковки файлов: Директории ($to_dir) для распаковки не существует"; - return; - } - - //----------------------------------------- - // change into the directory chosen by the user. - //----------------------------------------- - - chdir($to_dir); - $cur_dir = getcwd(); - - $to_dir_slash = $to_dir . "/"; - - //----------------------------------------- - // Get the file info from the tar - //----------------------------------------- - - $in_files = $this->read_tar(); - - if ($this->error != "") { - return; - } - - foreach ($in_files as $file) - { - - //----------------------------------------- - // Stop any potential file traversal issues - //----------------------------------------- - - $file['name'] = str_replace( '..', '', $file['name'] ); - - //----------------------------------------- - // Are we choosing which files to extract? - //----------------------------------------- - - if (is_array($files)) - { - if (! in_array($file['name'], $files) ) - { - continue; - } - } - - chdir($cur_dir); - - //----------------------------------------- - // GNU TAR format dictates that all paths *must* be in the *nix - // format - if this is not the case, blame the tar vendor, not me! - //----------------------------------------- - - if ( preg_match("#/#", $file['name']) ) - { - $path_info = explode( "/" , $file['name'] ); - $file_name = array_pop($path_info); - } else - { - $path_info = array(); - $file_name = $file['name']; - } - - //----------------------------------------- - // If we have a path, then we must build the directory tree - //----------------------------------------- - - - if (count($path_info) > 0) - { - foreach($path_info as $dir_component) - { - if ($dir_component == "") - { - continue; - } - if ( (file_exists($dir_component)) && (! is_dir($dir_component)) ) - { - $this->warnings[] = "ВНИМАНИЕ: $dir_component существует, но не является директорией"; - continue; - } - if (! is_dir($dir_component)) - { - mkdir( $dir_component, 0777); - chmod( $dir_component, 0777); - } - - if (! @chdir($dir_component)) - { - $this->warnings[] = "ОШИБКА: не возможно перейти в директорию $dir_component!"; - } - } - } - - //----------------------------------------- - // check the typeflags, and work accordingly - //----------------------------------------- - - if (($file['typeflag'] == 0) or (!$file['typeflag']) or ($file['typeflag'] == "")) - { - if ( $FH = fopen($file_name, "wb") ) - { - fputs( $FH, $file['data'], strlen($file['data']) ); - fclose($FH); - } - else - { - $this->warnings[] = "Не возможно записать данные в файл $file_name"; - } - } - else if ($file['typeflag'] == 5) - { - if ( (file_exists($file_name)) && (! is_dir($file_name)) ) - { - $this->warnings[] = "$file_name существует, но не является директорией"; - continue; - } - if (! is_dir($file_name)) - { - @mkdir( $file_name, 0777); - } - } - else if ($file['typeflag'] == 6) - { - $this->warnings[] = "Не возможно обработать именованные pipes"; - continue; - } - else if ($file['typeflag'] == 1) - { - $this->warnings[] = "Не возможно обработать ссылки"; - } - else if ($file['typeflag'] == 4) - { - $this->warnings[] = "Не возможно обработать файлы устройств"; - } - else if ($file['typeflag'] == 3) - { - $this->warnings[] = "Не возможно обработать файлы устройств"; - } - else - { - $this->warnings[] = "Не известный тип файла"; - } - - if (! @chmod( $file_name, $file['mode'] ) ) - { - $this->warnings[] = "ОШИБКА: не возможно выставить CHMOD $mode на $file_name"; - } - - @touch( $file_name, $file['mtime'] ); - - } - - // Return to the "real" directory the scripts are in - - @chdir($this->current_dir); - - } - - //----------------------------------------- - // add files: - // Takes an array of files, and adds them to the tar file - // Optionally takes a path to use as root for the tar file - if omitted, it - // assumes the current working directory is the tarball root. Be careful with - // this, or you may get unexpected results -especially when attempting to read - // and add files to the tarball. - // EXAMPLE DIR STRUCTURE - // /usr/home/somedir/forums/sources - // BRIEF: To tar up the sources directory - // $files = array( 'sources/somescript.php', 'sources/anothersscript.php' ); - // If CWD is 'somedir', you'll need to use $tar->add_files( $files, "/usr/home/somedir/forums" ); - // or it'll attempt to open /usr/home/somedir/sources/somescript.php - which would result - // in an error. Either that, or use: - // chdir("/usr/home/somedir/forums"); - // $tar->add_files( $files ); - //----------------------------------------- - - function add_files( $files, $root_path="" ) - { - // Do we a root path to change into? - - if ($root_path != "") - { - chdir($root_path); - } - - $count = 0; - - foreach ($files as $file) - { - // is it a Mac OS X work file? - - if ( preg_match("/\.ds_store/i", $file ) ) - { - continue; - } - - $typeflag = 0; - $data = ""; - $linkname = ""; - - $stat = stat($file); - - // Did stat fail? - - if (! is_array($stat) ) - { - $this->warnings[] = "ОШИБКА: не возможно получить информацию о $file"; - continue; - } - - $mode = fileperms($file); - $uid = $stat[4]; - $gid = $stat[5]; - $rdev = $stat[6]; - $size = filesize($file); - $mtime = filemtime($file); - - if (is_file($file)) - { - // It's a plain file, so lets suck it up - - $typeflag = 0; - - if ( $FH = fopen($file, 'rb') ) - { - $data = @fread( $FH, filesize($file) ); - fclose($FH); - } - else - { - $this->warnings[] = "ОШИБКА: Не возможно открыть файл $file"; - continue; - } - } - else if (is_link($file)) - { - $typeflag = 1; - $linkname = @readlink($file); - } - else if (is_dir($file)) - { - $typeflag = 5; - } - else - { - // Sockets, Pipes and char/block specials are not - // supported, so - lets use a silly value to keep the - // tar ball legitimate. - $typeflag = 9; - } - - // Add this data to our in memory tar file - - $this->tar_in_mem[] = array ( - 'name' => $file, - 'mode' => $mode, - 'uid' => $uid, - 'gid' => $gid, - 'size' => strlen($data), - 'mtime' => $mtime, - 'chksum' => " ", - 'typeflag' => $typeflag, - 'linkname' => $linkname, - 'magic' => "ustar\0", - 'version' => '00', - 'uname' => 'unknown', - 'gname' => 'unknown', - 'devmajor' => "", - 'devminor' => "", - 'prefix' => "", - 'data' => $data - ); - // Clear the stat cache - - @clearstatcache(); - - $count++; - } - - @chdir($this->current_dir); - - //Return the number of files to anyone who's interested - - return $count; - - } - - //----------------------------------------- - // write_tar: - // Writes the tarball into the directory specified in new_tar with a filename - // specified in new_tar - //----------------------------------------- - - function write_tar() { - - if ($this->tarfile_path_name == "") { - $this->error = 'Не указано имя или путь для создания нового tar архива'; - return; - } - - if ( count($this->tar_in_mem) < 1 ) { - $this->error = 'Нет данных для записи в tar архив'; - return; - } - - $tardata = ""; - - foreach ($this->tar_in_mem as $file) { - - $prefix = ""; - $tmp = ""; - $last = ""; - - // make sure the filename isn't longer than 99 characters. - - if (strlen($file['name']) > 99) - { - $pos = strrpos( $file['name'], "/" ); - - if (is_string($pos) && !$pos) - { - // filename alone is longer than 99 characters! - $this->error[] = "Имя файла {$file['name']} превышает допустимую стандартом GNU Tape ARchives длину"; - continue; - } - - $prefix = substr( $file['name'], 0 , $pos ); // Move the path to the prefix - $file['name'] = substr( $file['name'], ($pos+1)); - - if (strlen($prefix) > 154) - { - $this->error[] = "Путь файла, помещаемого в архив, превышает допустимую стандартом GNU Tape ARchives длину"; - continue; - } - } - - // BEGIN FORMATTING (a8a1a100) - - $mode = sprintf("%6s ", decoct($file['mode'])); - $uid = sprintf("%6s ", decoct($file['uid'])); - $gid = sprintf("%6s ", decoct($file['gid'])); - $size = sprintf("%11s ", decoct($file['size'])); - $mtime = sprintf("%11s ", decoct($file['mtime'])); - - $tmp = pack("a100a8a8a8a12a12",$file['name'],$mode,$uid,$gid,$size,$mtime); - - $last = pack("a1" , $file['typeflag']); - $last .= pack("a100" , $file['linkname']); - - $last .= pack("a6", "ustar"); // magic - $last .= pack("a2", "" ); // version - $last .= pack("a32", $file['uname']); - $last .= pack("a32", $file['gname']); - $last .= pack("a8", ""); // devmajor - $last .= pack("a8", ""); // devminor - $last .= pack("a155", $prefix); - //$last .= pack("a12", ""); - $test_len = $tmp . $last . "12345678"; - $last .= $this->internal_build_string( "\0" , ($this->tar_header_length - strlen($test_len)) ); - - // Here comes the science bit, handling - // the checksum. - - $checksum = 0; - - for ($i = 0 ; $i < 148 ; $i++ ) - { - $checksum += ord( substr($tmp, $i, 1) ); - } - - for ($i = 148 ; $i < 156 ; $i++) - { - $checksum += ord(' '); - } - - for ($i = 156, $j = 0 ; $i < 512 ; $i++, $j++) - { - $checksum += ord( substr($last, $j, 1) ); - } - - $checksum = sprintf( "%6s ", decoct($checksum) ); - - $tmp .= pack("a8", $checksum); - - $tmp .= $last; - - $tmp .= $file['data']; - - // Tidy up this chunk to the power of 512 - - if ($file['size'] > 0) - { - if ($file['size'] % 512 != 0) - { - $homer = $this->internal_build_string( "\0" , (512 - ($file['size'] % 512)) ); - $tmp .= $homer; - } - } - - $tardata .= $tmp; - } - - // Add the footer - - $tardata .= pack( "a512", "" ); - - // print it to the tar file - - $FH = fopen( $this->tarfile_path_name, 'wb' ); - fputs( $FH, $tardata, strlen($tardata) ); - fclose($FH); - - @chmod( $this->tarfile_path_name, 0777); - - // Done.. - } - - //----------------------------------------- - // Read the tarball - builds an associative array - //----------------------------------------- - - function read_tar() { - - $filename = $this->tarfile_path_name; - - if ($filename == "") { - $this->error = 'Ну указано имя архива для чтения'; - return array(); - } - - if (! file_exists($filename) ) { - $this->error = 'Не возможно найти файл '.$filename; - return array(); - } - - $tar_info = array(); - - $this->tar_filename = $filename; - - // Open up the tar file and start the loop - - if (! $FH = fopen( $filename , 'rb' ) ) { - $this->error = "Файл $filename не доступен для чтения"; - return array(); - } - - // Grrr, perl allows spaces, PHP doesn't. Pack strings are hard to read without - // them, so to save my sanity, I'll create them with spaces and remove them here - - $this->tar_unpack_header = preg_replace( "/\s/", "" , $this->tar_unpack_header); - - while (!feof($FH)) { - - $buffer = @fread( $FH , $this->tar_header_length ); - - // check the block - - $checksum = 0; - - for ($i = 0 ; $i < 148 ; $i++) { - $checksum += ord( substr($buffer, $i, 1) ); - } - for ($i = 148 ; $i < 156 ; $i++) { - $checksum += ord(' '); - } - for ($i = 156 ; $i < 512 ; $i++) { - $checksum += ord( substr($buffer, $i, 1) ); - } - - $fa = unpack( $this->tar_unpack_header, $buffer); - - $name = trim($fa[filename]); - $mode = OctDec(trim($fa[mode])); - $uid = OctDec(trim($fa[uid])); - $gid = OctDec(trim($fa[gid])); - $size = OctDec(trim($fa[size])); - $mtime = OctDec(trim($fa[mtime])); - $chksum = OctDec(trim($fa[chksum])); - $typeflag = trim($fa[typeflag]); - $linkname = trim($fa[linkname]); - $magic = trim($fa[magic]); - $version = trim($fa[version]); - $uname = trim($fa[uname]); - $gname = trim($fa[gname]); - $devmajor = OctDec(trim($fa[devmajor])); - $devminor = OctDec(trim($fa[devminor])); - $prefix = trim($fa[prefix]); - - if ( ($checksum == 256) && ($chksum == 0) ) { - //EOF! - break; - } - - if ($prefix) { - $name = $prefix.'/'.$name; - } - - // Some broken tars don't set the type flag - // correctly for directories, so we assume that - // if it ends in / it's a directory... - - if ( (preg_match( "#/$#" , $name)) and (! $name) ) { - $typeflag = 5; - } - - // If it's the end of the tarball... - $test = $this->internal_build_string( '\0' , 512 ); - if ($buffer == $test) { - break; - } - - // Read the next chunk - - $data = @fread( $FH, $size ); - - if (strlen($data) != $size) { - $this->error = "Ошибка чтения tar-архива"; - fclose( $FH ); - return array(); - } - - $diff = $size % 512; - - if ($diff != 0) { - // Padding, throw away - $crap = @fread( $FH, (512-$diff) ); - } - - // Protect against tarfiles with garbage at the end - - if ($name == "") { - break; - } - - $tar_info[] = array ( - 'name' => $name, - 'mode' => $mode, - 'uid' => $uid, - 'gid' => $gid, - 'size' => $size, - 'mtime' => $mtime, - 'chksum' => $chksum, - 'typeflag' => $typeflag, - 'linkname' => $linkname, - 'magic' => $magic, - 'version' => $version, - 'uname' => $uname, - 'gname' => $gname, - 'devmajor' => $devmajor, - 'devminor' => $devminor, - 'prefix' => $prefix, - 'data' => $data - ); - } - - fclose($FH); - - return $tar_info; - } - - - - - - -//----------------------------------------- -// INTERNAL FUNCTIONS - These should NOT be called outside this module -//+------------------------------------------------------------------------------ - - //----------------------------------------- - // build_string: Builds a repititive string - //----------------------------------------- - - function internal_build_string($string="", $times=0) { - - $return = ""; - for ($i=0 ; $i < $times ; ++$i ) { - $return .= $string; - } - - return $return; - } - - - - - -} - - + Tar creation and extraction module +| > Module written by Matt Mecham +| > Usage style based on the C and Perl modules +| > Will only work with PHP 4+ +| +| > Date started: 15th Feb 2002 +| +| > Module Version Number: 1.0.0 +| > Module Author: Matthew Mecham ++-------------------------------------------------------------------------- +| +| QUOTE OF THE MODULE: +| If you can't find a program the does what you want it to do, write your +| own. +| ++-------------------------------------------------------------------------- +*/ + +/************************************************************* +| +| EXTRACTION USAGE: +| +| $tar = new tar(); +| $tar->new_tar("/foo/bar", "myTar.tar"); +| $files = $tar->list_files(); +| $tar->extract_files( "/extract/to/here/dir" ); +| +| CREATION USAGE: +| +| $tar = new tar(); +| $tar->new_tar("/foo/bar" , "myNewTar.tar"); +| $tar->current_dir("/foo" ); //Optional - tells the script which dir we are in +| to syncronise file creation from the tarball +| $tar->add_files( $file_names_with_path_array ); +| (or $tar->add_directory( "/foo/bar/myDir" ); to archive a complete dir) +| $tar->write_tar(); +| +*************************************************************/ + + + +class tar { + + var $tar_header_length = '512'; + var $tar_unpack_header = 'a100filename/a8mode/a8uid/a8gid/a12size/a12mtime/a8chksum/a1typeflag/a100linkname/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor/a155/prefix'; + var $tar_pack_header = 'A100 A8 A8 A8 A12 A12 A8 A1 A100 A6 A2 A32 A32 A8 A8 A155'; + var $current_dir = ""; + var $unpack_dir = ""; + var $pack_dir = ""; + var $error = ""; + var $work_dir = array(); + var $tar_in_mem = array(); + var $tar_filename = ""; + var $filehandle = ""; + var $warnings = array(); + var $attributes = array(); + var $tarfile_name = ""; + var $tarfile_path = ""; + var $tarfile_path_name = ""; + var $workfiles = array(); + + //----------------------------------------- + // CONSTRUCTOR: Attempt to guess the current working dir. + //----------------------------------------- + + function tar() { + global $HTTP_SERVER_VARS; + + if ($this_dir = getcwd()) + { + $this->current_dir = $this_dir; + } + else if (isset($HTTP_SERVER_VARS['DOCUMENT_ROOT'])) + { + $this->current_dir = $HTTP_SERVER_VARS['DOCUMENT_ROOT']; + } + else + { + $this->current_dir = './'; + } + + // Set some attributes, these can be overriden later + + $this->attributes = array( 'over_write_existing' => 0, + 'over_write_newer' => 0, + 'remove_tar_file' => 0, + 'remove_original_files' => 0, + ); + } + + //----------------------------------------- + // Set the tarname. If we are extracting a tarball, then it must be the + // path to the tarball, and it's name (eg: $tar->new_tar("/foo/bar" ,'myTar.tar') + // or if we are creating a tar, then it must be the path and name of the tar file + // to create. + //----------------------------------------- + + function new_tar($tarpath, $tarname) { + + $this->tarfile_name = $tarname; + $this->tarfile_path = $tarpath; + + // Make sure there isn't a trailing slash on the path + + $this->tarfile_path = preg_replace( "#[/\\\]$#" , "" , $this->tarfile_path ); + + $this->tarfile_path_name = $this->tarfile_path .'/'. $this->tarfile_name; + + } + + + //----------------------------------------- + // Easy way to overwrite defaults + //----------------------------------------- + + function over_write_existing() { + $this->attributes['over_write_existing'] = 1; + } + function over_write_newer() { + $this->attributes['over_write_newer'] = 1; + } + function remove_tar_file() { + $this->attributes['remove_tar_file'] = 1; + } + function remove_original_files() { + $this->attributes['remove_original_files'] = 1; + } + + + + //----------------------------------------- + // User assigns the root directory for the tar ball creation/extraction + //----------------------------------------- + + function current_dir($dir = "") { + + $this->current_dir = $dir; + + } + + //----------------------------------------- + // list files: returns an array with all the filenames in the tar file + //----------------------------------------- + + function list_files($advanced="") { + + // $advanced == "" - return name only + // $advanced == 1 - return name, size, mtime, mode + + $data = $this->read_tar(); + + $final = array(); + + foreach($data as $d) + { + if ($advanced == 1) + { + $final[] = array ( 'name' => $d['name'], + 'size' => $d['size'], + 'mtime' => $d['mtime'], + 'mode' => substr(decoct( $d['mode'] ), -4), + ); + } + else + { + $final[] = $d['name']; + } + } + + return $final; + } + + //----------------------------------------- + // Add a directory to the tar files. + // $tar->add_directory( str(TO DIRECTORY) ) + // Can be used in the following methods. + // $tar->add_directory( "/foo/bar" ); + // $tar->write_tar( "/foo/bar" ); + //----------------------------------------- + + function add_directory( $dir ) { + + $this->error = ""; + + // Make sure the $to_dir is pointing to a valid dir, or we error + // and return + + if (! is_dir($dir) ) + { + $this->error = "Extract files error: Destination directory ($to_dir) does not exist"; + return FALSE; + } + + $cur_dir = getcwd(); + chdir($dir); + + $this->get_dir_contents("./"); + + $this->add_files($this->workfiles, $dir); + + chdir($cur_dir); + + } + + //----------------------------------------- + + function get_dir_contents( $dir ) + { + + $dir = preg_replace( "#/$#", "", $dir ); + + if ( file_exists($dir) ) + { + if ( is_dir($dir) ) + { + $handle = opendir($dir); + + while (($filename = readdir($handle)) !== false) + { + if (($filename != ".") && ($filename != "..")) + { + if (is_dir($dir."/".$filename)) + { + $this->get_dir_contents($dir."/".$filename); + } + else + { + $this->workfiles[] = $dir."/".$filename; + } + } + } + + closedir($handle); + } + else + { + $this->error = "$dir is not a directory"; + return FALSE; + } + } + else + { + $this->error = "Could not locate $dir"; + return; + } + } + + //----------------------------------------- + // Extract the tarball + // $tar->extract_files( str(TO DIRECTORY), [ array( FILENAMES ) ] ) + // Can be used in the following methods. + // $tar->extract( "/foo/bar" , $files ); + // This will seek out the files in the user array and extract them + // $tar->extract( "/foo/bar" ); + // Will extract the complete tar file into the user specified directory + //----------------------------------------- + + function extract_files( $to_dir, $files="" ) { + + $this->error = ""; + + // Make sure the $to_dir is pointing to a valid dir, or we error + // and return + + if (! is_dir($to_dir) ) + { + $this->error = "Extract files error: Destination directory ($to_dir) does not exist"; + return; + } + + //----------------------------------------- + // change into the directory chosen by the user. + //----------------------------------------- + + chdir($to_dir); + $cur_dir = getcwd(); + + $to_dir_slash = $to_dir . "/"; + + //----------------------------------------- + // Get the file info from the tar + //----------------------------------------- + + $in_files = $this->read_tar(); + + if ($this->error != "") { + return; + } + + foreach ($in_files as $file) + { + + //----------------------------------------- + // Stop any potential file traversal issues + //----------------------------------------- + + $file['name'] = str_replace( '..', '', $file['name'] ); + + //----------------------------------------- + // Are we choosing which files to extract? + //----------------------------------------- + + if (is_array($files)) + { + if (! in_array($file['name'], $files) ) + { + continue; + } + } + + chdir($cur_dir); + + //----------------------------------------- + // GNU TAR format dictates that all paths *must* be in the *nix + // format - if this is not the case, blame the tar vendor, not me! + //----------------------------------------- + + if ( preg_match("#/#", $file['name']) ) + { + $path_info = explode( "/" , $file['name'] ); + $file_name = array_pop($path_info); + } else + { + $path_info = array(); + $file_name = $file['name']; + } + + //----------------------------------------- + // If we have a path, then we must build the directory tree + //----------------------------------------- + + + if (count($path_info) > 0) + { + foreach($path_info as $dir_component) + { + if ($dir_component == "") + { + continue; + } + if ( (file_exists($dir_component)) && (! is_dir($dir_component)) ) + { + $this->warnings[] = "WARNING: $dir_component exists, but is not a directory"; + continue; + } + if (! is_dir($dir_component)) + { + mkdir( $dir_component, 0777); + chmod( $dir_component, 0777); + } + + if (! @chdir($dir_component)) + { + $this->warnings[] = "ERROR: CHDIR to $dir_component FAILED!"; + } + } + } + + //----------------------------------------- + // check the typeflags, and work accordingly + //----------------------------------------- + + if (($file['typeflag'] == 0) or (!$file['typeflag']) or ($file['typeflag'] == "")) + { + if ( $FH = fopen($file_name, "wb") ) + { + fputs( $FH, $file['data'], strlen($file['data']) ); + fclose($FH); + } + else + { + $this->warnings[] = "Could not write data to $file_name"; + } + } + else if ($file['typeflag'] == 5) + { + if ( (file_exists($file_name)) && (! is_dir($file_name)) ) + { + $this->warnings[] = "$file_name exists, but is not a directory"; + continue; + } + if (! is_dir($file_name)) + { + @mkdir( $file_name, 0777); + } + } + else if ($file['typeflag'] == 6) + { + $this->warnings[] = "Cannot handle named pipes"; + continue; + } + else if ($file['typeflag'] == 1) + { + $this->warnings[] = "Cannot handle system links"; + } + else if ($file['typeflag'] == 4) + { + $this->warnings[] = "Cannot handle device files"; + } + else if ($file['typeflag'] == 3) + { + $this->warnings[] = "Cannot handle device files"; + } + else + { + $this->warnings[] = "Unknown typeflag found"; + } + + if (! @chmod( $file_name, $file['mode'] ) ) + { + $this->warnings[] = "ERROR: CHMOD $mode on $file_name FAILED!"; + } + + @touch( $file_name, $file['mtime'] ); + + } + + // Return to the "real" directory the scripts are in + + @chdir($this->current_dir); + + } + + //----------------------------------------- + // add files: + // Takes an array of files, and adds them to the tar file + // Optionally takes a path to use as root for the tar file - if omitted, it + // assumes the current working directory is the tarball root. Be careful with + // this, or you may get unexpected results -especially when attempting to read + // and add files to the tarball. + // EXAMPLE DIR STRUCTURE + // /usr/home/somedir/forums/sources + // BRIEF: To tar up the sources directory + // $files = array( 'sources/somescript.php', 'sources/anothersscript.php' ); + // If CWD is 'somedir', you'll need to use $tar->add_files( $files, "/usr/home/somedir/forums" ); + // or it'll attempt to open /usr/home/somedir/sources/somescript.php - which would result + // in an error. Either that, or use: + // chdir("/usr/home/somedir/forums"); + // $tar->add_files( $files ); + //----------------------------------------- + + function add_files( $files, $root_path="" ) + { + // Do we a root path to change into? + + if ($root_path != "") + { + chdir($root_path); + } + + $count = 0; + + foreach ($files as $file) + { + // is it a Mac OS X work file? + + if ( preg_match("/\.ds_store/i", $file ) ) + { + continue; + } + + $typeflag = 0; + $data = ""; + $linkname = ""; + + $stat = stat($file); + + // Did stat fail? + + if (! is_array($stat) ) + { + $this->warnings[] = "Error: Stat failed on $file"; + continue; + } + + $mode = fileperms($file); + $uid = $stat[4]; + $gid = $stat[5]; + $rdev = $stat[6]; + $size = filesize($file); + $mtime = filemtime($file); + + if (is_file($file)) + { + // It's a plain file, so lets suck it up + + $typeflag = 0; + + if ( $FH = fopen($file, 'rb') ) + { + $data = @fread( $FH, filesize($file) ); + fclose($FH); + } + else + { + $this->warnings[] = "ERROR: Failed to open $file"; + continue; + } + } + else if (is_link($file)) + { + $typeflag = 1; + $linkname = @readlink($file); + } + else if (is_dir($file)) + { + $typeflag = 5; + } + else + { + // Sockets, Pipes and char/block specials are not + // supported, so - lets use a silly value to keep the + // tar ball legitimate. + $typeflag = 9; + } + + // Add this data to our in memory tar file + + $this->tar_in_mem[] = array ( + 'name' => $file, + 'mode' => $mode, + 'uid' => $uid, + 'gid' => $gid, + 'size' => strlen($data), + 'mtime' => $mtime, + 'chksum' => " ", + 'typeflag' => $typeflag, + 'linkname' => $linkname, + 'magic' => "ustar\0", + 'version' => '00', + 'uname' => 'unknown', + 'gname' => 'unknown', + 'devmajor' => "", + 'devminor' => "", + 'prefix' => "", + 'data' => $data + ); + // Clear the stat cache + + @clearstatcache(); + + $count++; + } + + @chdir($this->current_dir); + + //Return the number of files to anyone who's interested + + return $count; + + } + + //----------------------------------------- + // write_tar: + // Writes the tarball into the directory specified in new_tar with a filename + // specified in new_tar + //----------------------------------------- + + function write_tar() { + + if ($this->tarfile_path_name == "") { + $this->error = 'No filename or path was specified to create a new tar file'; + return; + } + + if ( count($this->tar_in_mem) < 1 ) { + $this->error = 'No data to write to the new tar file'; + return; + } + + $tardata = ""; + + foreach ($this->tar_in_mem as $file) { + + $prefix = ""; + $tmp = ""; + $last = ""; + + // make sure the filename isn't longer than 99 characters. + + if (strlen($file['name']) > 99) + { + $pos = strrpos( $file['name'], "/" ); + + if (is_string($pos) && !$pos) + { + // filename alone is longer than 99 characters! + $this->error[] = "Filename {$file['name']} exceeds the length allowed by GNU Tape ARchives"; + continue; + } + + $prefix = substr( $file['name'], 0 , $pos ); // Move the path to the prefix + $file['name'] = substr( $file['name'], ($pos+1)); + + if (strlen($prefix) > 154) + { + $this->error[] = "File path exceeds the length allowed by GNU Tape ARchives"; + continue; + } + } + + // BEGIN FORMATTING (a8a1a100) + + $mode = sprintf("%6s ", decoct($file['mode'])); + $uid = sprintf("%6s ", decoct($file['uid'])); + $gid = sprintf("%6s ", decoct($file['gid'])); + $size = sprintf("%11s ", decoct($file['size'])); + $mtime = sprintf("%11s ", decoct($file['mtime'])); + + $tmp = pack("a100a8a8a8a12a12",$file['name'],$mode,$uid,$gid,$size,$mtime); + + $last = pack("a1" , $file['typeflag']); + $last .= pack("a100" , $file['linkname']); + + $last .= pack("a6", "ustar"); // magic + $last .= pack("a2", "" ); // version + $last .= pack("a32", $file['uname']); + $last .= pack("a32", $file['gname']); + $last .= pack("a8", ""); // devmajor + $last .= pack("a8", ""); // devminor + $last .= pack("a155", $prefix); + //$last .= pack("a12", ""); + $test_len = $tmp . $last . "12345678"; + $last .= $this->internal_build_string( "\0" , ($this->tar_header_length - strlen($test_len)) ); + + // Here comes the science bit, handling + // the checksum. + + $checksum = 0; + + for ($i = 0 ; $i < 148 ; $i++ ) + { + $checksum += ord( substr($tmp, $i, 1) ); + } + + for ($i = 148 ; $i < 156 ; $i++) + { + $checksum += ord(' '); + } + + for ($i = 156, $j = 0 ; $i < 512 ; $i++, $j++) + { + $checksum += ord( substr($last, $j, 1) ); + } + + $checksum = sprintf( "%6s ", decoct($checksum) ); + + $tmp .= pack("a8", $checksum); + + $tmp .= $last; + + $tmp .= $file['data']; + + // Tidy up this chunk to the power of 512 + + if ($file['size'] > 0) + { + if ($file['size'] % 512 != 0) + { + $homer = $this->internal_build_string( "\0" , (512 - ($file['size'] % 512)) ); + $tmp .= $homer; + } + } + + $tardata .= $tmp; + } + + // Add the footer + + $tardata .= pack( "a512", "" ); + + // print it to the tar file + + $FH = fopen( $this->tarfile_path_name, 'wb' ); + fputs( $FH, $tardata, strlen($tardata) ); + fclose($FH); + + @chmod( $this->tarfile_path_name, 0777); + + // Done.. + } + + //----------------------------------------- + // Read the tarball - builds an associative array + //----------------------------------------- + + function read_tar() { + + $filename = $this->tarfile_path_name; + + if ($filename == "") { + $this->error = 'No filename specified when attempting to read a tar file'; + return array(); + } + + if (! file_exists($filename) ) { + $this->error = 'Cannot locate the file '.$filename; + return array(); + } + + $tar_info = array(); + + $this->tar_filename = $filename; + + // Open up the tar file and start the loop + + if (! $FH = fopen( $filename , 'rb' ) ) { + $this->error = "Cannot open $filename for reading"; + return array(); + } + + // Grrr, perl allows spaces, PHP doesn't. Pack strings are hard to read without + // them, so to save my sanity, I'll create them with spaces and remove them here + + $this->tar_unpack_header = preg_replace( "/\s/", "" , $this->tar_unpack_header); + + while (!feof($FH)) { + + $buffer = @fread( $FH , $this->tar_header_length ); + + // check the block + + $checksum = 0; + + for ($i = 0 ; $i < 148 ; $i++) { + $checksum += ord( substr($buffer, $i, 1) ); + } + for ($i = 148 ; $i < 156 ; $i++) { + $checksum += ord(' '); + } + for ($i = 156 ; $i < 512 ; $i++) { + $checksum += ord( substr($buffer, $i, 1) ); + } + + $fa = unpack( $this->tar_unpack_header, $buffer); + + $name = trim($fa[filename]); + $mode = OctDec(trim($fa[mode])); + $uid = OctDec(trim($fa[uid])); + $gid = OctDec(trim($fa[gid])); + $size = OctDec(trim($fa[size])); + $mtime = OctDec(trim($fa[mtime])); + $chksum = OctDec(trim($fa[chksum])); + $typeflag = trim($fa[typeflag]); + $linkname = trim($fa[linkname]); + $magic = trim($fa[magic]); + $version = trim($fa[version]); + $uname = trim($fa[uname]); + $gname = trim($fa[gname]); + $devmajor = OctDec(trim($fa[devmajor])); + $devminor = OctDec(trim($fa[devminor])); + $prefix = trim($fa[prefix]); + + if ( ($checksum == 256) && ($chksum == 0) ) { + //EOF! + break; + } + + if ($prefix) { + $name = $prefix.'/'.$name; + } + + // Some broken tars don't set the type flag + // correctly for directories, so we assume that + // if it ends in / it's a directory... + + if ( (preg_match( "#/$#" , $name)) and (! $name) ) { + $typeflag = 5; + } + + // If it's the end of the tarball... + $test = $this->internal_build_string( '\0' , 512 ); + if ($buffer == $test) { + break; + } + + // Read the next chunk + + $data = @fread( $FH, $size ); + + if (strlen($data) != $size) { + $this->error = "Read error on tar file"; + fclose( $FH ); + return array(); + } + + $diff = $size % 512; + + if ($diff != 0) { + // Padding, throw away + $crap = @fread( $FH, (512-$diff) ); + } + + // Protect against tarfiles with garbage at the end + + if ($name == "") { + break; + } + + $tar_info[] = array ( + 'name' => $name, + 'mode' => $mode, + 'uid' => $uid, + 'gid' => $gid, + 'size' => $size, + 'mtime' => $mtime, + 'chksum' => $chksum, + 'typeflag' => $typeflag, + 'linkname' => $linkname, + 'magic' => $magic, + 'version' => $version, + 'uname' => $uname, + 'gname' => $gname, + 'devmajor' => $devmajor, + 'devminor' => $devminor, + 'prefix' => $prefix, + 'data' => $data + ); + } + + fclose($FH); + + return $tar_info; + } + + + + + + +//----------------------------------------- +// INTERNAL FUNCTIONS - These should NOT be called outside this module +//+------------------------------------------------------------------------------ + + //----------------------------------------- + // build_string: Builds a repititive string + //----------------------------------------- + + function internal_build_string($string="", $times=0) { + + $return = ""; + for ($i=0 ; $i < $times ; ++$i ) { + $return .= $string; + } + + return $return; + } + + + + + +} + + ?> \ No newline at end of file diff --git a/upload/install/core/conf.php b/upload/install/core/conf.php index 8562bffb..c72abe59 100644 --- a/upload/install/core/conf.php +++ b/upload/install/core/conf.php @@ -18,8 +18,8 @@ define( 'INS_ROOT_PATH', str_replace( "//", "/", preg_replace( "#/core$#is", "", * * @since 2.0.0.2005-01-01 */ -define ( 'IPBVERSION', '2.2.2' ); -define ( 'IPB_LONG_VERSION', '22011' ); +define ( 'IPBVERSION', '2.3.6' ); +define ( 'IPB_LONG_VERSION', '23010' ); /** * DOC ROOT PATH diff --git a/upload/install/core/index.html b/upload/install/core/index.html index 250b1f72..b49fc27d 100644 --- a/upload/install/core/index.html +++ b/upload/install/core/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

Ошибка русской версии Invision Power Board

-Вы попали на несуществующую страницу!
Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
- - \ No newline at end of file + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/upload/install/core/ipsclass.php b/upload/install/core/ipsclass.php index ce1e0385..5d85c4c8 100644 --- a/upload/install/core/ipsclass.php +++ b/upload/install/core/ipsclass.php @@ -1,25 +1,16 @@ $Date: 2005-10-10 16:01:09 +0100 (Mon, 10 Oct 2005) $ | > $Revision: 5 $ @@ -341,7 +332,7 @@ class ipsclass { // Char set //----------------------------------------- - $this->vars['gb_char_set'] = $this->vars['gb_char_set'] ? $this->vars['gb_char_set'] : 'windows-1251'; + $this->vars['gb_char_set'] = $this->vars['gb_char_set'] ? $this->vars['gb_char_set'] : 'iso-8859-1'; //----------------------------------------- // PHP API @@ -496,7 +487,7 @@ class ipsclass { * @return void */ - function init_db_connection( $db, $user, $pass, $host, $pre, $cp, $driver='mysql' ) + function init_db_connection( $db, $user, $pass, $host, $pre, $driver='mysql' ) { //----------------------------------------- // INIT @@ -512,8 +503,8 @@ class ipsclass { { $file = str_replace( '<%driver%>', $driver, INS_SQL_FILE ); } - - $classname = "db_driver_".$driver; + + $classname = "db_driver_".$driver; $this->DB = new $classname; @@ -521,8 +512,7 @@ class ipsclass { $this->DB->obj['sql_user'] = $user; $this->DB->obj['sql_pass'] = $pass; $this->DB->obj['sql_host'] = $host; - $this->DB->obj['sql_tbl_prefix'] = $pre; - $this->DB->obj['mysql_codepage'] = $cp; + $this->DB->obj['sql_tbl_prefix'] = $pre; $this->DB->obj['use_shutdown'] = 0; if ( $file ) @@ -918,31 +908,11 @@ class ipsclass { { if ( $v['donow'] ) { - if ( $this->vars['sql_driver'] == 'mysql' ) - { - $this->DB->query( "REPLACE INTO ".SQL_PREFIX."cache_store SET cs_key='{$v['name']}', cs_value='$value', cs_array=".intval($v['array']) ); - } - else - { - $this->DB->simple_construct( array( 'delete' => 'cache_store', 'where' => "cs_key='{$v['name']}'" ) ); - $this->DB->simple_exec(); - - $this->DB->do_insert( 'cache_store', array( 'cs_array' => intval($v['array']), 'cs_key' => $v['name'], 'cs_value' => $value ) ); - } + $this->DB->do_replace_into( 'cache_store', array( 'cs_array' => intval($v['array']), 'cs_key' => $v['name'], 'cs_value' => $value ), array( 'cs_key' ) ); } else { - if ( $this->vars['sql_driver'] == 'mysql' ) - { - $this->DB->query( "REPLACE INTO ".SQL_PREFIX."cache_store SET cs_key='{$v['name']}', cs_value='$value', cs_array=".intval($v['array']) ); - } - else - { - $this->DB->simple_construct( array( 'delete' => 'cache_store', 'where' => "cs_key='{$v['name']}'" ) ); - $this->DB->simple_shutdown_exec(); - - $this->DB->do_shutdown_insert( 'cache_store', array( 'cs_array' => intval($v['array']), 'cs_key' => $v['name'], 'cs_value' => $value ) ); - } + $this->DB->do_shutdown_replace_into( 'cache_store', array( 'cs_array' => intval($v['array']), 'cs_key' => $v['name'], 'cs_value' => $value ), array( 'cs_key' ) ); } } else @@ -1003,54 +973,7 @@ class ipsclass { $this->DB->close_db(); } - /*-------------------------------------------------------------------------*/ - // Convert string between char-sets - /*-------------------------------------------------------------------------*/ - - /** - * Convert a string between charsets - * - * @param string Input String - * @param string Current char set - * @param string Destination char set - * @return string Parsed string - * @since 2.1.0 - */ - function txt_convert_charsets($t, $original_cset, $destination_cset="") - { - $original_cset = strtolower($original_cset); - $text = $t; - - //----------------------------------------- - // Did we pass a destination? - //----------------------------------------- - - $destination_cset = strtolower($destination_cset) ? strtolower($destination_cset) : strtolower($this->vars['gb_char_set']); -// echo $destination_cset; exit; - //----------------------------------------- - // Not the same? - //----------------------------------------- - - if ( $destination_cset == $original_cset ) - { - return $t; - } - - //----------------------------------------- - // Do the convert - //----------------------------------------- - - if ( ! is_object( $this->class_convert_charset ) ) - { - require_once( INS_KERNEL_PATH.'/class_convert_charset.php' ); - $this->class_convert_charset = new class_convert_charset(); - } - - $text = $this->class_convert_charset->convert_charset( $text, $original_cset, $destination_cset ); - - return $text ? $text : $t; - } - + /*-------------------------------------------------------------------------*/ // txt_alphanumerical_clean // ------------------ diff --git a/upload/install/core/template.php b/upload/install/core/template.php index 41532cea..82b85d0d 100644 --- a/upload/install/core/template.php +++ b/upload/install/core/template.php @@ -35,11 +35,11 @@ class install_template if ( file_exists( INS_ROOT_PATH . 'installfiles/sequence.xml' ) ) { - $config = implode( '', file( INS_ROOT_PATH . 'installfiles/sequence.xml' ) ); - $xml = new class_xml(); - - $config = $xml->xml_parse_document( $config ); - + $config = implode( '', file( INS_ROOT_PATH . 'installfiles/sequence.xml' ) ); + $xml = new class_xml(); + + $config = $xml->xml_parse_document( $config ); + //----------------------------------------- // Loop through and sort out settings... //----------------------------------------- @@ -54,11 +54,11 @@ class install_template foreach( $_pages as $position => $data ) { - $this->install_pages[ $data['file'] ] = $this->ipsclass->txt_convert_charsets( $data['menu'], 'UTF-8' ); + $this->install_pages[ $data['file'] ] = $data['menu']; } } - $this->install_pages['done'] = 'Завершение'; + $this->install_pages['done'] = 'Finish'; /* Set Current Page */ $this->page_current = ( $this->ipsclass->input['p'] ) ? $this->ipsclass->input['p'] : 'requirements'; @@ -145,8 +145,7 @@ echo << - - Мастер установки продуктов Invision Power Services + IPS Installer @@ -168,7 +167,7 @@ echo <<
-

Установщик продуктов Invision Power Services

+

Welcome to the IPS Product Installer

@@ -195,7 +194,7 @@ echo <<
-

Установка {$this->product_name}

+

{$this->product_name} Installation

{$this->product_version}
@@ -210,7 +209,7 @@ echo <<
- +
@@ -221,7 +220,7 @@ if( ! $this->hide_next ) if( $this->next_action == 'disabled' ) { echo << + EOF; } else @@ -231,11 +230,11 @@ if( !$this->next_action ) $back = $this->ipsclass->my_getenv('HTTP_REFERER'); echo << + EOF; } echo << + EOF; } } @@ -251,7 +250,7 @@ echo <<
@@ -278,16 +277,16 @@ return <<
- Вас приветствует установщик {$this->product_name}. Данный мастер поможет вам установить новую версию продукта. + Welcome to the installer for {$this->product_name}. This wizard will guide you through the installation process.


-

Системные требования:

+

System Requirements


- PHP: v{$php_version} или выше
- SQL: mySQL v$sql_version или выше + PHP: v{$php_version} or better
+ SQL: mySQL v$sql_version or better

EOF; } @@ -309,7 +308,7 @@ check_eula = function() } else { - alert( 'Вы должны принять пользовательское соглашение, прежде чем продолжить установку' ); + alert( 'You must agree to the license before continuing' ); return false; } } @@ -318,13 +317,13 @@ document.getElementById( 'install-form' ).onsubmit = check_eula; -Пожалуйста прочитайте и примите пользовательское соглашение.

+Please read and agree to the End User License Agreement before continuing.

$eula
- Я принимаю + I agree to the license agreement EOF; @@ -339,16 +338,16 @@ return <<
-   Директории установки +   Address details - + - +
Путь установки:Install Directory:
Адрес установки:Install Address:
@@ -377,14 +376,14 @@ return <<
-
Пожалуйста укажите какую база данных будет использоваться.
+
Please select which database engine you wish to use.
-   Базы Данных +   Database Engine - + @@ -405,39 +404,39 @@ return <<
-
Если вы не уверены или не знаете данных, необходимых для данного шага, уточните у вашего хостинг провайдера...
+
Ask your webhost if you are unsure about any of these settings. You must create the database before installing..
-   Сервер Базы Данных (БД) +   Database details
SQL Драйвер:SQL Driver:
- + - + - + - + - + @@ -456,24 +455,24 @@ EOF; { return << -   Учетная запись Администратора +   Your administrative account
Адрес сервера:SQL Host:
Имя базы данных:Database Name:
Пользователь БД:SQL Username:
Пароль БД:SQL Password:
Префикс таблиц:SQL Table Prefix:
- + - + - + - +
Имя пользователя:Username:
Пароль:Password:
Подтверждение пароля:Confirm Password:
E-mail адрес:E-mail Address:
@@ -488,11 +487,12 @@ EOF; function install_page() { return <<product_name}. Нажмите Начать установку для запуска автоматического процесса установки!

+The installer is now ready to complete the installation of your {$this->product_name}. Click Start to +begin the automatic process!

- +
EOF; } @@ -527,7 +527,7 @@ $HTML .= <<
- +
EOF; @@ -568,23 +568,22 @@ EOF; { $extra = "
-

УСТАНОВЩИК НЕ ЗАБЛОКИРОВАН
Пожалуйста переименуйте или удалите 'install/index.php' как можно быстрее!

+

INSTALLER NOT LOCKED
Please disable or remove 'install/index.php' immediately!

"; } $HTML .= << -   Установка завершена!

- Поздравляем, установка {$this->product_name} завершена! Ниже приведены несколько полезных ссылок, которые помогут в вашей работе.

+   Installation complete!

+ Congratulations, your {$this->product_name} is now installed and ready to use! Below are some + links you may find useful.


$extra -

Полезные ссылки:

+

Useful Links

EOF; diff --git a/upload/install/custom/app.php b/upload/install/custom/app.php index 5dc42466..71ca76d8 100644 --- a/upload/install/custom/app.php +++ b/upload/install/custom/app.php @@ -1,391 +1,419 @@ - INS_ROOT_PATH . 'installfiles' ); - - //----------------------------------------- - // Basics - //----------------------------------------- - - $this->version_php_min = '4.3.0'; - $this->version_mysql_min = '4.0.0'; - - //----------------------------------------- - // Grab XML file and check - //----------------------------------------- - - if ( file_exists( INS_ROOT_PATH . 'installfiles/writeablefiles.xml' ) ) - { - $config = implode( '', file( INS_ROOT_PATH . 'installfiles/writeablefiles.xml' ) ); - $xml = new class_xml(); - - $config = $xml->xml_parse_document( $config ); - - //----------------------------------------- - // Loop through and sort out settings... - //----------------------------------------- - - foreach( $xml->xml_array['installdata']['file'] as $id => $entry ) - { - if ( preg_match( "#\.\w{3,}$#si", $entry['path']['VALUE'] ) ) - { - $wfiles[] = INS_DOC_ROOT_PATH . $entry['path']['VALUE']; - } - else - { - $wdirs[] = INS_DOC_ROOT_PATH . $entry['path']['VALUE']; - } - } - } - - $this->set_writeable( $wdirs, $wfiles ); - } - - /** - * application_installer::write_configuration - * - * Writes the configuration files for this app - * - */ - function write_configuration() - { - //----------------------------------------- - // Safe mode? - //----------------------------------------- - - $safe_mode = 0; - - if ( @get_cfg_var('safe_mode') ) - { - $safe_mode = @get_cfg_var('safe_mode'); - } - - //----------------------------------------- - // Set info array - //----------------------------------------- - - $INFO = array( - 'sql_driver' => $this->saved_data['sql_driver'], - 'sql_host' => $this->saved_data['db_host'], - 'sql_database' => $this->saved_data['db_name'], - 'sql_user' => $this->saved_data['db_user'], - 'sql_pass' => $this->saved_data['db_pass'], - 'sql_tbl_prefix' => $this->saved_data['db_pre'], - 'sql_debug' => 1, - - 'board_start' => time(), - 'installed' => 1, - - 'php_ext' => 'php', - 'safe_mode' => $safe_mode, - - 'board_url' => $this->saved_data['install_url'], - - 'banned_group' => '5', - 'admin_group' => '4', - 'guest_group' => '2', - 'member_group' => '3', - 'auth_group' => '1', - ); - - //----------------------------------- - // Any "extra" configs required for this driver? - //----------------------------------- - - foreach( $this->saved_data as $k => $v ) - { - if ( preg_match( "#^__sql__#", $k ) ) - { - $k = str_replace( "__sql__", "", $k ); - - $INFO[ $k ] = $v; - } - } - - //----------------------------------- - // Write to disk - //----------------------------------- - - $core_conf = "<"."?php\n"; - - foreach( $INFO as $k => $v ) - { - $core_conf .= '$INFO['."'".$k."'".']'."\t\t\t=\t'".$v."';\n"; - } - - $core_conf .= "\n".'?'.'>'; - - /* Write Configuration Files */ - $output[] = 'Сохранение конфигурационных файлов...
'; - - $this->write_file( $this->saved_data['install_dir'] . '/conf_global.php' , $core_conf ); - } - - - /** - * application_installer::create_admin_account - * - * Creates the local app admin entry - * - */ - function create_admin_account() - { - /* Create Converge Entry */ - $converge_id = $this->create_admin_converge(); - - //----------------------------------- - // Members... - //----------------------------------- - - $member_record = array( 'id' => $converge_id, - 'name' => $this->saved_data['admin_user'], - 'members_l_display_name' => strtolower( $this->saved_data['admin_user'] ), - 'members_l_username' => strtolower( $this->saved_data['admin_user'] ), - 'members_display_name' => $this->saved_data['admin_user'], - 'mgroup' => 4, - 'email' => $this->saved_data['admin_email'], - 'joined' => time(), - 'ip_address' => $this->ipsclass->my_getenv('REMOTE_ADDR'), - 'posts' => 1, - 'title' => 'Администратор', - 'last_visit' => time(), - 'last_activity' => time(), - 'member_login_key' => md5( uniqid( microtime) ), - ); - - $this->ipsclass->DB->do_insert( 'members', $member_record ); - - //----------------------------------- - // Member Extra... - //----------------------------------- - - $member_extra_record = array ( 'id' => 1, - 'signature' => '', - 'vdirs' => '', - ); - - $this->ipsclass->DB->do_insert( 'member_extra', $member_extra_record ); - } - - /** - * application_installer::cache_and_cleanup - * - * Final install step, allows for any remaining app specific functions - * - */ - function cache_and_cleanup() - { - //----------------------------------- - // Get ACP library - //----------------------------------- - - if( !defined("CACHE_PATH") ) - { - define( 'CACHE_PATH', INS_ROOT_PATH."../" ); - } - - $output[] = "Создание кеша шаблонов..."; - - require_once( INS_DOC_ROOT_PATH.'sources/lib/admin_cache_functions.php' ); - $acp = new admin_cache_functions(); - $acp->ipsclass =& $this->ipsclass; - $acp->_rebuild_all_caches( array(2) ); - unset( $acp ); - - //------------------------------------------------------------- - // Forum cache - //------------------------------------------------------------- - - $output[] = "Создание кеша форумов..."; - - $ignore_me = array( 'redirect_url', 'redirect_loc', 'rules_text', 'permission_custom_error', 'notify_modq_emails' ); - - if ( $this->ipsclass->vars['forum_cache_minimum'] ) - { - $ignore_me[] = 'description'; - $ignore_me[] = 'rules_title'; - } - - $this->ipsclass->cache['forum_cache'] = array(); - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'forums', - 'order' => 'parent_id, position' - ) ); - $this->ipsclass->DB->simple_exec(); - - while( $f = $this->ipsclass->DB->fetch_row() ) - { - $fr = array(); - - $perms = unserialize(stripslashes($f['permission_array'])); - - //----------------------------------------- - // Stuff we don't need... - //----------------------------------------- - - foreach( $f as $k => $v ) - { - if ( in_array( $k, $ignore_me ) ) - { - continue; - } - else - { - if ( $v != "" ) - { - $fr[ $k ] = $v; - } - } - } - - $fr['read_perms'] = $perms['read_perms']; - $fr['reply_perms'] = $perms['reply_perms']; - $fr['start_perms'] = $perms['start_perms']; - $fr['upload_perms'] = $perms['upload_perms']; - $fr['show_perms'] = $perms['show_perms']; - - unset($fr['permission_array']); - - $this->ipsclass->cache['forum_cache'][ $fr['id'] ] = $fr; - } - - $this->ipsclass->update_cache( array( 'name' => 'forum_cache', 'array' => 1, 'deletefirst' => 1, 'donow' => 1 ) ); - - //------------------------------------------------------------- - // Group Cache - //------------------------------------------------------------- - - $output[] = "Создание кеша групп..."; - - require_once( INS_DOC_ROOT_PATH.'sources/action_admin/groups.php' ); - $lib = new ad_groups(); - $lib->ipsclass =& $this->ipsclass; - $lib->rebuild_group_cache(); - unset( $lib ); - - //------------------------------------------------------------- - // Systemvars - //------------------------------------------------------------- - - $output[] = "Создание кеша системных переменных..."; - - $this->ipsclass->cache['systemvars'] = array(); - - $result = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as cnt', 'from' => 'mail_queue' ) ); - - $this->ipsclass->cache['systemvars']['mail_queue'] = intval( $result['cnt'] ); - $this->ipsclass->cache['systemvars']['task_next_run'] = time() + 3600; - - $this->ipsclass->update_cache( array( 'name' => 'systemvars', 'array' => 1, 'deletefirst' => 1 ) ); - - //------------------------------------------------------------- - // Stats - //------------------------------------------------------------- - - $output[] = "Создание кеша статистики..."; - - $this->ipsclass->cache['stats'] = array(); - - $this->ipsclass->cache['stats']['total_replies'] = 0; - $this->ipsclass->cache['stats']['total_topics'] = 1; - $this->ipsclass->cache['stats']['mem_count'] = 1; - - $r = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'id, name', - 'from' => 'members', - 'order' => 'id DESC', - 'limit' => '0,1' - ) ); - - $this->ipsclass->cache['stats']['last_mem_name'] = $r['name']; - $this->ipsclass->cache['stats']['last_mem_id'] = $r['id']; - - $this->ipsclass->update_cache( array( 'name' => 'stats', 'array' => 1, 'deletefirst' => 1 ) ); - - //------------------------------------------------------------- - // Ranks - //------------------------------------------------------------- - - $output[] = "Создание кеша званий пользователей..."; - - require_once( INS_DOC_ROOT_PATH.'sources/action_admin/member.php' ); - $lib = new ad_member(); - $lib->ipsclass =& $this->ipsclass; - $lib->titles_recache(); - unset( $lib ); - - //------------------------------------------------------------- - // SETTINGS - //------------------------------------------------------------- - - $output[] = "Создание кеша настроек форума..."; - - require_once( INS_DOC_ROOT_PATH.'sources/action_admin/settings.php' ); - $lib = new ad_settings(); - $lib->ipsclass =& $this->ipsclass; - $lib->setting_rebuildcache(); - unset( $lib ); - - //------------------------------------------------------------- - // EMOTICONS - //------------------------------------------------------------- - - $output[] = "Создание кеша смайликов..."; - - require_once( INS_DOC_ROOT_PATH.'sources/action_admin/emoticons.php' ); - $lib = new ad_emoticons(); - $lib->ipsclass =& $this->ipsclass; - $lib->emoticon_rebuildcache(); - unset( $lib ); - - //------------------------------------------------------------- - // LANGUAGES - //------------------------------------------------------------- - - $output[] = "Создание языкового кеша..."; - - require_once( INS_DOC_ROOT_PATH.'sources/action_admin/languages.php' ); - $lib = new ad_languages(); - $lib->ipsclass =& $this->ipsclass; - $lib->rebuild_cache(); - unset( $lib ); - - //------------------------------------------------------------- - // ATTACHMENT TYPES - //------------------------------------------------------------- - - $output[] = "Создание кеша типов файлов..."; - - require_once( INS_DOC_ROOT_PATH.'sources/action_admin/attachments.php' ); - $lib = new ad_attachments(); - $lib->ipsclass =& $this->ipsclass; - $lib->attach_type_rebuildcache(); - unset( $lib ); - - $output[] = "Кеш-система инициализирована, нажмите 'Дальше' для продолжения..."; - - $this->saved_data['admin_url'] = $this->saved_data['install_url'] . '/index.php'; - - return $output; - } -} - + INS_ROOT_PATH . 'installfiles' ); + + //----------------------------------------- + // Basics + //----------------------------------------- + + $this->version_php_min = '4.3.0'; + $this->version_mysql_min = '4.0.0'; + + //----------------------------------------- + // Grab XML file and check + //----------------------------------------- + + if ( file_exists( INS_ROOT_PATH . 'installfiles/writeablefiles.xml' ) ) + { + $config = implode( '', file( INS_ROOT_PATH . 'installfiles/writeablefiles.xml' ) ); + $xml = new class_xml(); + + $config = $xml->xml_parse_document( $config ); + + //----------------------------------------- + // Loop through and sort out settings... + //----------------------------------------- + + foreach( $xml->xml_array['installdata']['file'] as $id => $entry ) + { + if ( preg_match( "#\.\w{3,}$#si", $entry['path']['VALUE'] ) ) + { + $wfiles[] = INS_DOC_ROOT_PATH . $entry['path']['VALUE']; + } + else + { + $wdirs[] = INS_DOC_ROOT_PATH . $entry['path']['VALUE']; + } + } + } + + $this->set_writeable( $wdirs, $wfiles ); + } + + /** + * application_installer::write_configuration + * + * Writes the configuration files for this app + * + */ + function write_configuration() + { + //----------------------------------------- + // Safe mode? + //----------------------------------------- + + $safe_mode = 0; + + if ( @get_cfg_var('safe_mode') ) + { + $safe_mode = @get_cfg_var('safe_mode'); + } + + //----------------------------------------- + // Set info array + //----------------------------------------- + + $INFO = array( + 'sql_driver' => $this->saved_data['sql_driver'], + 'sql_host' => $this->saved_data['db_host'], + 'sql_database' => $this->saved_data['db_name'], + 'sql_user' => $this->saved_data['db_user'], + 'sql_pass' => $this->saved_data['db_pass'], + 'sql_tbl_prefix' => $this->saved_data['db_pre'], + 'sql_debug' => 1, + + 'board_start' => time(), + 'installed' => 1, + + 'php_ext' => 'php', + 'safe_mode' => $safe_mode, + + 'board_url' => $this->saved_data['install_url'], + + 'banned_group' => '5', + 'admin_group' => '4', + 'guest_group' => '2', + 'member_group' => '3', + 'auth_group' => '1', + ); + + //----------------------------------- + // Any "extra" configs required for this driver? + //----------------------------------- + + foreach( $this->saved_data as $k => $v ) + { + if ( preg_match( "#^__sql__#", $k ) ) + { + $k = str_replace( "__sql__", "", $k ); + + $INFO[ $k ] = $v; + } + } + + //----------------------------------- + // Write to disk + //----------------------------------- + + $core_conf = "<"."?php\n"; + + foreach( $INFO as $k => $v ) + { + $core_conf .= '$INFO['."'".$k."'".']'."\t\t\t=\t'".$v."';\n"; + } + + $core_conf .= "\n".'?'.'>'; + + /* Write Configuration Files */ + $output[] = 'Writing configuration files...
'; + + $this->write_file( $this->saved_data['install_dir'] . '/conf_global.php' , $core_conf ); + + //----------------------------------- + // Check that it wrote + //----------------------------------- + + if( !file_exists( $this->saved_data['install_dir'] . '/conf_global.php' ) ) + { + $this->template->hide_next = 1; + $this->template->warning( array( "We were unable to write your configuration information to the conf_global.php file. Please verify that this file has full read and write privileges." ) ); + $this->template->output( $this->product_name, $this->product_version ); + + exit(); + } + else + { + unset($INFO); + + require_once( $this->saved_data['install_dir'] . '/conf_global.php' ); + + if( !is_array($INFO) ) + { + $this->template->hide_next = 1; + $this->template->warning( array( "We were unable to write your configuration information to the conf_global.php file. Please verify that this file has full read and write privileges." ) ); + $this->template->output( $this->product_name, $this->product_version ); + + exit(); + } + } + } + + + /** + * application_installer::create_admin_account + * + * Creates the local app admin entry + * + */ + function create_admin_account() + { + /* Create Converge Entry */ + $converge_id = $this->create_admin_converge(); + + //----------------------------------- + // Members... + //----------------------------------- + + $member_record = array( 'id' => $converge_id, + 'name' => $this->saved_data['admin_user'], + 'members_l_display_name' => strtolower( $this->saved_data['admin_user'] ), + 'members_l_username' => strtolower( $this->saved_data['admin_user'] ), + 'members_display_name' => $this->saved_data['admin_user'], + 'mgroup' => 4, + 'email' => $this->saved_data['admin_email'], + 'joined' => time(), + 'ip_address' => $this->ipsclass->my_getenv('REMOTE_ADDR'), + 'posts' => 1, + 'title' => 'Administrator', + 'last_visit' => time(), + 'last_activity' => time(), + 'member_login_key' => md5( uniqid( microtime) ), + ); + + $this->ipsclass->DB->do_insert( 'members', $member_record ); + + //----------------------------------- + // Member Extra... + //----------------------------------- + + $member_extra_record = array ( 'id' => 1, + 'signature' => '', + 'vdirs' => '', + ); + + $this->ipsclass->DB->do_insert( 'member_extra', $member_extra_record ); + } + + /** + * application_installer::cache_and_cleanup + * + * Final install step, allows for any remaining app specific functions + * + */ + function cache_and_cleanup() + { + //----------------------------------- + // Get ACP library + //----------------------------------- + + if( !defined("CACHE_PATH") ) + { + define( 'CACHE_PATH', INS_ROOT_PATH."../" ); + } + + $output[] = "Rebuild skin templates..."; + + require_once( INS_DOC_ROOT_PATH.'sources/lib/admin_cache_functions.php' ); + $acp = new admin_cache_functions(); + $acp->ipsclass =& $this->ipsclass; + $acp->_rebuild_all_caches( array(2) ); + unset( $acp ); + + //------------------------------------------------------------- + // Forum cache + //------------------------------------------------------------- + + $output[] = "Rebuilding forum cache..."; + + $ignore_me = array( 'redirect_url', 'redirect_loc', 'rules_text', 'permission_custom_error', 'notify_modq_emails' ); + + if ( $this->ipsclass->vars['forum_cache_minimum'] ) + { + $ignore_me[] = 'description'; + $ignore_me[] = 'rules_title'; + } + + $this->ipsclass->cache['forum_cache'] = array(); + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', + 'from' => 'forums', + 'order' => 'parent_id, position' + ) ); + $this->ipsclass->DB->simple_exec(); + + while( $f = $this->ipsclass->DB->fetch_row() ) + { + $fr = array(); + + $perms = unserialize(stripslashes($f['permission_array'])); + + //----------------------------------------- + // Stuff we don't need... + //----------------------------------------- + + foreach( $f as $k => $v ) + { + if ( in_array( $k, $ignore_me ) ) + { + continue; + } + else + { + if ( $v != "" ) + { + $fr[ $k ] = $v; + } + } + } + + $fr['read_perms'] = $perms['read_perms']; + $fr['reply_perms'] = $perms['reply_perms']; + $fr['start_perms'] = $perms['start_perms']; + $fr['upload_perms'] = $perms['upload_perms']; + $fr['show_perms'] = $perms['show_perms']; + + unset($fr['permission_array']); + + $this->ipsclass->cache['forum_cache'][ $fr['id'] ] = $fr; + } + + $this->ipsclass->update_cache( array( 'name' => 'forum_cache', 'array' => 1, 'deletefirst' => 1, 'donow' => 1 ) ); + + //------------------------------------------------------------- + // Group Cache + //------------------------------------------------------------- + + $output[] = "Rebuilding group cache..."; + + require_once( INS_DOC_ROOT_PATH.'sources/action_admin/groups.php' ); + $lib = new ad_groups(); + $lib->ipsclass =& $this->ipsclass; + $lib->rebuild_group_cache(); + unset( $lib ); + + //------------------------------------------------------------- + // Systemvars + //------------------------------------------------------------- + + $output[] = "Rebuilding system variables cache..."; + + $this->ipsclass->cache['systemvars'] = array(); + + $result = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as cnt', 'from' => 'mail_queue' ) ); + + $this->ipsclass->cache['systemvars']['mail_queue'] = intval( $result['cnt'] ); + $this->ipsclass->cache['systemvars']['task_next_run'] = time() + 3600; + + $this->ipsclass->update_cache( array( 'name' => 'systemvars', 'array' => 1, 'deletefirst' => 1 ) ); + + //------------------------------------------------------------- + // Stats + //------------------------------------------------------------- + + $output[] = "Rebuilding statistics cache..."; + + $this->ipsclass->cache['stats'] = array(); + + $this->ipsclass->cache['stats']['total_replies'] = 0; + $this->ipsclass->cache['stats']['total_topics'] = 1; + $this->ipsclass->cache['stats']['mem_count'] = 1; + + $r = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'id, name', + 'from' => 'members', + 'order' => 'id DESC', + 'limit' => '0,1' + ) ); + + $this->ipsclass->cache['stats']['last_mem_name'] = $r['name']; + $this->ipsclass->cache['stats']['last_mem_id'] = $r['id']; + + $this->ipsclass->update_cache( array( 'name' => 'stats', 'array' => 1, 'deletefirst' => 1 ) ); + + //------------------------------------------------------------- + // Ranks + //------------------------------------------------------------- + + $output[] = "Rebuilding member ranks cache..."; + + require_once( INS_DOC_ROOT_PATH.'sources/action_admin/member.php' ); + $lib = new ad_member(); + $lib->ipsclass =& $this->ipsclass; + $lib->titles_recache(); + unset( $lib ); + + //------------------------------------------------------------- + // SETTINGS + //------------------------------------------------------------- + + $output[] = "Rebuilding settings cache..."; + + require_once( INS_DOC_ROOT_PATH.'sources/action_admin/settings.php' ); + $lib = new ad_settings(); + $lib->ipsclass =& $this->ipsclass; + $lib->setting_rebuildcache(); + unset( $lib ); + + //------------------------------------------------------------- + // EMOTICONS + //------------------------------------------------------------- + + $output[] = "Rebuilding emoticons cache..."; + + require_once( INS_DOC_ROOT_PATH.'sources/action_admin/emoticons.php' ); + $lib = new ad_emoticons(); + $lib->ipsclass =& $this->ipsclass; + $lib->emoticon_rebuildcache(); + unset( $lib ); + + //------------------------------------------------------------- + // LANGUAGES + //------------------------------------------------------------- + + $output[] = "Rebuilding languages cache..."; + + require_once( INS_DOC_ROOT_PATH.'sources/action_admin/languages.php' ); + $lib = new ad_languages(); + $lib->ipsclass =& $this->ipsclass; + $lib->rebuild_cache(); + unset( $lib ); + + //------------------------------------------------------------- + // ATTACHMENT TYPES + //------------------------------------------------------------- + + $output[] = "Rebuilding attachment types cache..."; + + require_once( INS_DOC_ROOT_PATH.'sources/action_admin/attachments.php' ); + $lib = new ad_attachments(); + $lib->ipsclass =& $this->ipsclass; + $lib->attach_type_rebuildcache(); + unset( $lib ); + + $output[] = "All caches rebuilt, click 'Next' below..."; + + $this->saved_data['admin_url'] = $this->saved_data['install_url'] . '/index.php'; + + return $output; + } +} + ?> \ No newline at end of file diff --git a/upload/install/custom/index.html b/upload/install/custom/index.html index 250b1f72..b49fc27d 100644 --- a/upload/install/custom/index.html +++ b/upload/install/custom/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

Ошибка русской версии Invision Power Board

-Вы попали на несуществующую страницу!
Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
- - \ No newline at end of file + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/upload/install/images/Thumbs.db b/upload/install/images/Thumbs.db deleted file mode 100644 index 5708d0fa1fb907421eab4e7f2009409f946f7876..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19968 zcmeI42|U%?x4@4%Q<;uAgjD8v%5ddU2q7xsWJ=~aGijg@8Ot0pC0sH^s7z7F%rTRc zDT<8o)~|A3_rCl7uY2!%@AK*Y+xnh;@>_fF-~OGw*4}&V<-BO697!o)97X*u$)WI2 zn_I*v!moah1Md+&B?=S@7v3OjZf$LS{v`?pZ-1ok=m~s;d))ya9vZ+02ms_WCjy88 zDu4ta1;_w$U?;E(fFXdQ1gHUKfCiuiknunVIX%DtFak`#ZUDK)0y!(d2J8XY0S;3q%8$XGlFAoW>6ZVlJ~ zwtyXA4>$mhfD_;hxB#xedB6>D2M}#W>hOZx8}I>q0YBgZfY@|o3@GBk`03pmK~bnG zt0<#zU{IYwZg8s~9t|EYF7gi&KKvutK|p|yPe4LMM7V>Dgp7=ogp`zgClv+xPRgC6 zq!hFil+-k6G@5J|9X%}#Jrxa_2B`!G56a*Z5EBp((~y&r)BNeQ^$10|1LmHccsT4R zTuK}~N}R1)WFEmGfV)L*_)EgUg?l6<+CfZ03IfHTp*VPWxcGR;U4yg_Tu0$k5>V|C zQXr((GA3eoq!IQHPuan7sNgYLyKSCR#Kh?$F$palJpsc zeE5ips?Kp;y%Q%->6@CFpS3t=Y31zVdfv_5!}HSRD*=I5uLVU!Mn%WmycHXlnsz5W zBQq=eZsGl+;*!#`2jx#{YU}D7o;EhMcXW1j_w@E*N5{rrPQ03Y{bp+6-TTF*56dg7 zYe>IvPTI4L*Xd} zkBK=%wCB+#PHiN#oT8(97m%)f>e;t-?BZYQ*{>b@&wgQ1WOz96;o(t&0)AknTM0B= zsdl#Xb&1cl8b2AOXvWyvXwSe?c_z?de>$bV#nh1-F;8w}yDp^q^-k7mxjSws(gn+P zoHOq%I``t1Xhmg{u8H^J{*%HZK3$Rwb$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HYlkPJ5x*Dj!!(Iz}u8EiQ?OSuxIDst~G9p@L_e@E(& zR%MQ^_AVbX!vnd+q>0Kr=6DC=e?cEMAIcbbwLj-jhf*lsgR1jOV%~@SF9>oQ9%&fm z(}}9$knTSk)a&rTUPtd?c|qaz=-^1ZnL#C`Q)rl#>YEOnPWvx=@a_4B9o7Ti!~F9j ze)%60zxR>kzmH$0b912MMPX~_dB(O-Oq=b#dsqCWN(&%<*^=qpgU-FwYCU(^NbxOR zT(%&h_YUcKQBC(y$asOMj)kkkHBzL%A7ik}#c;lGrs#SUg@WF(jwXl0C&VUwDOWJY zqlQkS=?@AzIl>S3*$Z%-%P4Y8Ag>lRH%K|7h)YOFj9xkG6F25a-xOucqs*5hky$=l znppaNs9|VgMfG@=@}0Ev?QTo5@sH(q+q&cjl;as1OvQC)#XK#wdEvo((xKKP-fc3$ zw#7%uv*(KUsSNiHcG$1%y$D$;`Jv$G172-|MsH87>@KY({~7D8y5MAi8u}c_tVwM>Y|_C$ zcVXv?L+`FEJ=(W+qAi)Situ$ch3l?aMcJ0^$ z`RC?}b>yyueyqOltzu7g$sTnpOG$aU(ts!-VP}8A>E*zUQw!504VPVWB{b&qvbo~D zXMQpI7@px}xoaqbZKqb4&!docvX<3_lQR#-nYjT#sBjKiKcnD&!>``s{{-WB5=|=SlCbU11MJ+JiPbA0JP& z;o~lrJD|+BR+Q(v%TO7exnm}NqgnU44FmDv-3%)DzU*20Pq9}9YnOQ~q7BZty}Urg zx>>$IKk<3t#_rSoL`E(qlO9%M@$G!MwmvKkX_sqz0!S()o3r{X-E7zCO2Sn4r&c|k z5BnoM{p4);gO>&zTlfwXB-R-N=M2A%cNYAj-`gh<4j_q~Rv3ev`5(xOf;>6W#+R6C nq*muI-|l1c-+X%lQU>v#Y?t|c8 - - - -Ошибка русской версии Invision Power Board - -

Ошибка русской версии Invision Power Board

-Вы попали на несуществующую страницу!
Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
- - \ No newline at end of file + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/upload/install/index.php b/upload/install/index.php index 385d196c..548a8d83 100644 --- a/upload/install/index.php +++ b/upload/install/index.php @@ -1,33 +1,7 @@ Script written by Matthew Mecham -| > Date started: 19th March 2004 -| > Updated for 2.1: 23 June 2005 -| -+-------------------------------------------------------------------------- +/** + * Invision Power Board + * Invision Installer Framework */ @set_time_limit(0); @@ -51,7 +25,7 @@ $INFO = array(); require INS_ROOT_PATH . 'core/ipsclass.php'; require INS_KERNEL_PATH . 'class_converge.php'; require INS_ROOT_PATH . 'core/template.php'; -require INS_KERNEL_PATH . 'class_xml.php'; +require_once INS_KERNEL_PATH . 'class_xml.php'; require INS_ROOT_PATH . 'core/class_tar.php'; # Initiate super-class @@ -97,7 +71,7 @@ if ( $ipsclass->input['p'] != 'done' ) if ( $got_lock ) { $install->template->hide_next = 1; - $install->template->warning( array( "Скрипт установки заблокирован!

Если вам необходимо повторить установку, пожалуйста, удалите файл 'installfiles/lock.php' и обновите страницу." ) ); + $install->template->warning( array( "This installer is locked. Via FTP please delete the file 'installfiles/lock.php' and then refresh this page." ) ); $install->template->output( $install->product_name, $install->product_version ); exit(); @@ -113,8 +87,8 @@ if ( file_exists( INS_DOC_ROOT_PATH.'conf_global.php.dist') AND ! file_exists( I if ( ! @rename( INS_DOC_ROOT_PATH.'conf_global.php.dist', INS_DOC_ROOT_PATH.'conf_global.php' ) ) { $install->template->hide_next = 1; - $install->template->warning( array( "Для продолжения установки вам необходимо переименовать файл 'conf_global.php.dist' в 'conf_global.php'. - Этот файл можно найти в корневой директории форума, там же где находятся 'admin.php' и 'index.php'." ) ); + $install->template->warning( array( "You MUST rename the file 'conf_global.php.dist' TO 'conf_global.php' before continuing. + This file can be found in the root forum directory on your FTP server, the same directory where 'admin.php' and 'index.php' are stored." ) ); $install->template->output( $install->product_name, $install->product_version ); exit(); } diff --git a/upload/install/installfiles/config.xml b/upload/install/installfiles/config.xml index af66a131..08547f13 100644 --- a/upload/install/installfiles/config.xml +++ b/upload/install/installfiles/config.xml @@ -1,69 +1,64 @@ - + - СЂСѓСЃСЃРєРѕР№ версии Invision Power Board - 2.2.1 - 22101 + Invision Power Board + 2.2 BETA 1 + 22001 1134742970 - РњС‹ настоятельно рекомендуем вам внимательно ознакомиться СЃ данным документом. Р’ нем содержится информация Рѕ том, какие правила Р±СѓРґСѓС‚ регламентировать права Рё обязанности сторон, подписавших данное соглашение. Обратите внимание РЅР° выполнение обязательных условий РїСЂРё использовании нашего продукта, как РїСЂРё самостоятельной установке, так Рё РїСЂРё обращении РІ службу технической поддержки. + Invision Power Services, Inc. +Invision Power Board Software +End User License Agreement (Version 2.3.x) -Invision Power Services, Inc. -РџСЂРѕРґСѓРєС‚: Invision Power Board -Лицензионное соглашение (для версии 2.2.x) +LICENSE +Invision Power Services (IPS) grants you a non-exclusive license to use the Software on one installation to be accessible by one URL (web address) subject to the provisions in all sections of this Agreement. -Р›Р�ЦЕНЗР�РЇ -Р’ рамках данного лицензионного соглашения покупатель (далее Заказчик) программного обеспечения Invision Power Board (далее Система) получает право РЅР° однократную установку Системы только РЅР° РѕРґРёРЅ URL адрес сайта (далее Адрес), указанный РїСЂРё заказе. -Р�сключительные права РЅР° Систему остаются Сѓ компании Invision Power Services Inc. (далее Р�сполнитель). +TERM +Invision Power Board is offered under yearly and lifetime licensing. Both license terms feature technical support and service plus access to upgrades to the software as they are available. In the event a one year license expires without being renewed, the software will remain completely functional but will be unsupported and no access to upgrades will be made available. -РЎР РћРљР� -Invision Power Board имеет РіРѕРґРѕРІСѓСЋ лицензию. Р’ нее РІС…РѕРґРёС‚ техническая поддержка СЃСЂРѕРєРѕРј РЅР° РѕРґРёРЅ РіРѕРґ, Р° также доступ Рє дистрибутиву Системы Рё ее обновлениям (РїРѕ мере РёС… публикации) СЃСЂРѕРєРѕРј РЅР° РѕРґРёРЅ РіРѕРґ. После истечении СЃСЂРѕРєР° действия лицензии Система останется полностью функциональной, РЅРѕ РІС‹ СѓР¶Рµ РЅРµ будете иметь доступа Рє технической поддержке Рё обновлениям. +SCOPE OF GRANT -Права Рё обязанности сторон +You may: -Р’С‹ имеете право: - - * изменять дизайн Рё структуру программного продукта, РІ соответствии СЃ нуждами вашего сайта, РЅРѕ РЅРµ нарушая РґСЂСѓРіРёС… условий данного соглашения. - * разрабатывать Рё распространять инструкции РїРѕ созданным вами модификациям, стилям Рё РґСЂСѓРіРёРј дополнительным компонентам Рє Системе, РЅРѕ РІ РЅРёС… должно указываться РЅР° настоящего разработчика Системы РґРѕ ваших модификаций, С‚.Рµ. РЅР° Р�сполнителя. Модификации, произведенные вами самостоятельно, РЅРµ являются собственностью Р�сполнителя, если РЅРµ содержат исходный РєРѕРґ Системы. - * создавать приложения, интерфейс которых будет успешно работать СЃ Системой, указав, что это ваш оригинальный РїСЂРѕРґСѓРєС‚. + * customize the Software's design and operation to suit the internal needs of your web site except to the extent not permitted in this Agreement + * produce and distribute modification instructions, Skin packs, or Language packs provided that they contain notification that the Skin and Language packs were exported from and originally created by Invision Power Board and/or IPS. The modifications instructions you personally create are not owned by IPS so long as they contain no proprietary coding from Invision Power Board. + * create applications which interface with the operation of the Software provided said application is an original work -Р’С‹ РЅРµ имеете право: +You may not: - * передавать права РЅР° использование Системы третьим лицам, РєСЂРѕРјРµ случаев перечисленных выше. - * изменять структуру РёСЃС…РѕРґРЅРѕРіРѕ РєРѕРґР°, функции программы или создавать собственные продукты, базирующиеся РЅР° РёСЃС…РѕРґРЅРѕРј РєРѕРґРµ Системы, либо использовать Систему РІРЅРµ вашего сайта. - * использовать Систему для пропагандирования терроризма, развития пиратского программного обеспечения Рё РґСЂСѓРіРёС… нелегальных материалов. - * изменять или удалять любые упоминания РѕР± авторских правах (copyrights) РІ Системе, указываемые РІ нижней части каждой страницы форума (РєСЂРѕРјРµ случаев, РєРѕРіРґР° РІС‹ приобрели разрешение РЅР° удаление этих строк), Р° также указанные РІ верхней части РёСЃС…РѕРґРЅРѕРіРѕ РєРѕРґР° каждого файла. - * распространять Систему. - * распространять индивидуальные РєРѕРїРёРё файлов, библиотек Рё РґСЂСѓРіРѕРіРѕ РёСЃС…РѕРґРЅРѕРіРѕ РєРѕРґР° Системы. - * распространять или модифицировать любую графику, HTML, CSS Системы РІ вашем индивидуальном программном обеспечении, отличном РѕС‚ Системы, Р° также РЅР° вашем сайте. - * модифицировать Систему для работы РѕРґРЅРѕРіРѕ комплекта исходных файлов сразу РЅР° нескольких Адресах (URL, доменах, поддоменах, Рё С‚.Рґ.). Для каждого форума требуется отдельная лицензия. + * permit other individuals to use the Software except under the terms listed above + * reverse engineer, disassemble, or create derivative works based on the Software for distribution or usage outside your web site + * use the Software in such as way as to condone or encourage terrorism, promote or provide pirated Software, or any other form of illegal or damaging activity + * modify and/or remove any copyright notices or labels on the Software on each page (unless copyright output removal license is purchased) and in the header of each script source file + * distribute the Software + * distribute individual copies of files, libraries, or other programming material in the Software package + * distribute or modify proprietary graphics, HTML, or CSS packaged with the Software for use in Software applications other than Invision Power Board or web sites without written permission from IPS + * modify the software to function in more than one instance or location (URL, domain, subdomain, etc.) from a single set of source program files unless each location is separately licensed -ГАРАНТР�ЙНОЕ ОБЯЗАТЕЛЬСТВО -Система распространяется РІ соответствии СЃ условием В«AS ISВ» (как есть), без гарантий любого СЂРѕРґР°, включая отсутствие ограничения гарантий РЅР° продажу, приобретение частей или целого РЅРµ сертифицированного продукта. Весь СЂРёСЃРє Р·Р° совершение данной сделки РїРѕ отношению Рє качеству продукта ложится РЅР° вас. Если РІС‹ приобретаете Систему, то РІС‹, Р° РЅРµ Р�сполнитель, должны оплачивать техническую поддержку Рё исправление неполадок РїРѕ работе вашего сервера Рё форума. Р’ дополнение РјС‹ хотим отметить, что механизмы безопасности, установленные РІ Системе, имеют известные ограничения, Рё РІС‹ должны быть ознакомлены СЃ отсутствием абсолютных гарантий РѕС‚ взлома вашего сайта или форума хакерами. Этот отказ РѕС‚ гарантий является РѕРґРЅРѕР№ РёР· составных частей нашего лицензионного соглашения. +DISCLAIMER OF WARRANTY +The Software is provided on an "AS IS" basis, without warranty of any kind, including without limitation the warranties of merchantability, fitness for a particular purpose, and non-infringement. The entire risk as to the quality and performance of the Software is borne by you. Should the Software prove defective, you and not IPS assume the entire cost of any service and repair. In addition, the security mechanisms implemented by IPS Software have inherent limitations, and you must determine that the Software sufficiently meets your requirements. This disclaimer of warranty constitutes an essential part of the Agreement. -ЗАГОЛОВКР� -Заголовки, права владельца Рё права РЅР° интеллектуальную собственность принадлежат Р�сполнителю. Система защищена законом РѕР± авторских правах. Заголовки Рё содержание страниц, создаваемых Системой, любые публикуемые оригинальные материалы Рё связанные СЃ этим права РЅР° РЅРёС…, также как Рё материалы, создаваемые РІ результате использования Системы, являются собственностью покупателя Системы Рё защищены законом. РњС‹ РЅРµ несем никакой ответственности Р·Р° содержание ваших сайтов Рё форумов. Данная лицензия РЅРµ передает Invision Power Services Inc. права РЅР° вашу интеллектуальную собственность. +TITLE +Title, ownership rights, and intellectual property rights in the Software shall remain with IPS. The Software is protected by copyright laws and treaties. Title and related rights in the content generated through the Software is the property of the applicable content owner and may be protected by applicable law. This License gives IPS no rights to such content. -РАСТОРЖЕНР�Р• Р›Р�ЦЕНЗР�ОННОГО СОГЛАШЕНР�РЇ -Данное соглашение расторгается автоматически, если РІС‹ нарушаете его условия. После расторжения РІС‹ обязуетесь уничтожить РІСЃРµ имеющиеся Сѓ вас Системы РІ течение 48 часов. Расторжение лицензионного соглашения лицензии РёР·-Р·Р° нарушения его условий РЅРµ РїСЂРёРІРѕРґРёС‚ Рє выплатам покупателю Р·Р° лицензию. +TERMINATION +This Agreement will terminate automatically upon failure to comply with the limitations described herein or on written notice from an authorized representative of IPS. On termination, you must destroy all copies of the Software within 48 hours. Termination of the license due to noncompliance will not result in any refunds of license fees. -СОДЕРЖАНР�Р• -Р�сполнитель оставляет Р·Р° СЃРѕР±РѕР№ право публиковать СЃРїРёСЃРєРё избранных клиентов СЃРІРѕРёС… программных продуктов. Р�сполнитель оставляет Р·Р° СЃРѕР±РѕР№ право РІ любое время изменять условия данного лицензионного соглашения, РЅРѕ данные действия РЅРµ имеют Рё РЅРµ Р±СѓРґСѓС‚ иметь обратной силы. Р�зменения данного РґРѕРіРѕРІРѕСЂР° Р±СѓРґСѓС‚ отправлены клиентам РїРѕ электронной почте. Отсутствие Сѓ клиентов РїРёСЃСЊРјР° СЃ уведомлением РЅРµ является причиной невыполнения изменившихся условий использования наших программных продуктов. РљРѕРїРёСЏ данного лицензионного соглашения Рё его изменения Р±СѓРґСѓС‚ доступны РЅР° сайте Р�сполнителя. +MISCELLANEOUS +IPS reserves the right to publish a selected list of users of the Software. IPS reserves the right to change the terms of this Agreement at any time. Changes to the Agreement will be announced via email using the IPS email notification list. Failure to receive notification of a change does not make those changes invalid. A current copy of this Agreement will be available on the Invision Power Board web site. -Пакеты стилей Рё языковые пакеты также защищены договорами, как Рё наши программные РєРѕРґС‹, тексты файлов Рё графика, если РІС‹ получили РёС… СЃ нашего сайта. +Skin packs and Language packs are defined as the group of code, text, and graphics that are exported from the Software using the provided functions of the Software Administration Control Panel. Integrated add-ons for Invision Power Board are released under this Agreement. Purchasing or downloading integrated add-ons constitute an additional, separate instance of this Agreement. -Наши гарантии Рё техническая поддержка РЅРµ распространяются РЅР° модификации, произведенные третьей стороной, включая изменения РёСЃС…РѕРґРЅРѕРіРѕ РєРѕРґР° Системы, стиля Рё языковых пакетов, как Рё РЅР° изменения перечисленных частей владельцем лицензии самостоятельно. Если Система изменена вами или третьей стороной, то Р�сполнитель вправе отказать вам РІ технической поддержке. +Technical support will not be provided for third-party modifications to the Software including modifications to code, Skin packs, and Language packs to any license holder. If the Software is modified using a third-party modification instruction or otherwise, technical support may be refused to any license holder. -РЈРџРћРњР�РќРђРќР�Р• РћР‘ РђР’РўРћР РЎРљР�РҐ РџР РђР’РђРҐ -Разрешение РЅР° удаление упоминаний РѕР± авторских правах может быть дано клиенту РѕС‚ Р�сполнителя Р·Р° определенную плату. Это разрешение дает право РЅР° удаление упоминаний РѕР± авторских правах РЅР° страницах форума, РЅРѕ РЅРµ дает право удалять РёС… РёР· файлов СЃ исходным РєРѕРґРѕРј. +PROPRIETARY LABELS +Authorization to remove or modify output of copyright notices can be obtained from IPS for a fee. This fee authorizes you to remove the output of copyright notices: it does not give you authorization to remove any copyright notices in the program source files or any other rights. -Р—РђРљРћРќ РћР‘ Р�СПОЛЬЗОВАНР�Р� -Данное лицензионное соглашение находится РІ полном соответствии СЃ законами штата Virginia, РЎРЁРђ. -Любые нарушения данного соглашения являются предметом судебного разбирательства, как авторских прав. +GOVERNING LAW +This Agreement shall be governed by the Laws of the Commonwealth of Virginia and the Laws of the United States of America. Any action in regard to this Agreement or arising out of its terms and conditions shall be instituted and litigated in the Circuit Court of Bedford County. Each of the parties consents to jurisdiction in such Court and agrees that service of process as provided by the states and rules of civil procedures of the Commonwealth of Virginia shall be sufficient. (FTB) -РџР РћР�Р—Р’РћР”Р�ТЕЛЬ -Invision Power Services, Inc., United States, 1115 Vista Park Drive Suite C, Forest, VA 24551. -РџРѕ всем вопросам, пишите РЅР° e-mail info@invisionpower.com, РЅР° наш адрес sales@ibresource.ru, или звоните +1-434-316-7201. +MANUFACTURER +Invision Power Services, Inc., 1115 Vista Park Drive Suite C, Forest, VA 24551. For questions, write to the above address, email info@invisionpower.com, or call 434-316-7201. \ No newline at end of file diff --git a/upload/install/installfiles/groups.xml b/upload/install/installfiles/groups.xml index 91449bd8..3d5fe212 100644 --- a/upload/install/installfiles/groups.xml +++ b/upload/install/installfiles/groups.xml @@ -22,7 +22,7 @@ 0 0 0 - Неактивированные + Validating 0 1 0 @@ -74,7 +74,7 @@ 0 0 0 - Гости + Guests 0 0 0 @@ -126,7 +126,7 @@ 1 0 0 - Пользователи + Members 0 1 0 @@ -178,7 +178,7 @@ 1 1 1 - Главные администраторы + Root Admin 0 1 1 @@ -230,7 +230,7 @@ 0 0 0 - Заблокированные + Banned 0 0 0 @@ -282,7 +282,7 @@ 1 1 1 - Администраторы + Administrators 0 1 1 diff --git a/upload/install/installfiles/index.html b/upload/install/installfiles/index.html index 250b1f72..b49fc27d 100644 --- a/upload/install/installfiles/index.html +++ b/upload/install/installfiles/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

Ошибка русской версии Invision Power Board

-Вы попали на несуществующую страницу!
Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
- - \ No newline at end of file + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/upload/install/installfiles/loginauth.xml b/upload/install/installfiles/loginauth.xml index b91c191d..232f7867 100644 --- a/upload/install/installfiles/loginauth.xml +++ b/upload/install/installfiles/loginauth.xml @@ -3,8 +3,8 @@ 1 - Внутренняя авторизация IPB - Стандартный метод авторизации + IPB Internal + The standard method of authentication internal @@ -24,8 +24,8 @@ 2 - LDAP Авторизация - LDAP / Active Directory Авторизация + LDAP Authentication + LDAP / Active Directory Authentication ldap @@ -45,8 +45,8 @@ 3 - Внешняя авторизация - Авторизация СЃ использованием внешней базы данных + External Database + Authentication via an external database external @@ -67,7 +67,7 @@ 4 IP.Converge - Для внутреннего использования + Internal Use Only ipconverge diff --git a/upload/install/installfiles/sequence.xml b/upload/install/installfiles/sequence.xml index 225fa923..0358d0e8 100644 --- a/upload/install/installfiles/sequence.xml +++ b/upload/install/installfiles/sequence.xml @@ -1,33 +1,33 @@ - + requirements - + Requirements 0 eula - + EULA 1 address - + Addresses 2 db - + DB Details 3 admin - + Admin Account 4 install - + Installation 5 \ No newline at end of file diff --git a/upload/install/installfiles/writeablefiles.xml b/upload/install/installfiles/writeablefiles.xml index 80c9bb5d..af62377c 100644 --- a/upload/install/installfiles/writeablefiles.xml +++ b/upload/install/installfiles/writeablefiles.xml @@ -1,3 +1,4 @@ + cache @@ -11,6 +12,9 @@ uploads + + style_images + conf_global.php diff --git a/upload/install/sql/index.html b/upload/install/sql/index.html index 250b1f72..af2fbe79 100644 --- a/upload/install/sql/index.html +++ b/upload/install/sql/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

Ошибка русской версии Invision Power Board

-Вы попали на несуществующую страницу!
Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
- - \ No newline at end of file + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/upload/install/sql/mysql_fulltext.php b/upload/install/sql/mysql_fulltext.php index 74bff01f..2c05a456 100644 --- a/upload/install/sql/mysql_fulltext.php +++ b/upload/install/sql/mysql_fulltext.php @@ -1,33 +1,5 @@ Script written by Matthew Mecham -| > Date started: 12th August 2004 -| > MYSQL EXTRA CONFIG / INSTALL FILE -+-------------------------------------------------------------------------- -*/ - $INDEX[] = "alter table ibf_posts ADD FULLTEXT(post)"; $INDEX[] = "alter table ibf_topics ADD FULLTEXT(title)"; diff --git a/upload/install/sql/mysql_inserts.php b/upload/install/sql/mysql_inserts.php index c1efa9a3..bdf5cee1 100644 --- a/upload/install/sql/mysql_inserts.php +++ b/upload/install/sql/mysql_inserts.php @@ -1,33 +1,5 @@ Script written by Matthew Mecham -| > Date started: 12th August 2004 -| > MYSQL EXTRA CONFIG / INSTALL FILE -+-------------------------------------------------------------------------- -*/ - $INSERT[] = "INSERT INTO ibf_cache_store (cs_key, cs_value, cs_extra, cs_array) VALUES ('skin_id_cache', '', '', 1);"; $INSERT[] = "INSERT INTO ibf_cache_store (cs_key, cs_value, cs_extra, cs_array) VALUES ('bbcode', '', '', 1);"; $INSERT[] = "INSERT INTO ibf_cache_store (cs_key, cs_value, cs_extra, cs_array) VALUES ('moderators', '', '', 1);"; @@ -53,7 +25,7 @@ $INSERT[] = "INSERT INTO ibf_cache_store (cs_key, cs_value, cs_extra, cs_array) $INSERT[] = "INSERT INTO ibf_cache_store (cs_key, cs_value, cs_extra, cs_array) VALUES ('rss_export', 'a:0:{}', '', 1);"; $INSERT[] = "INSERT INTO ibf_cache_store (cs_key, cs_value, cs_extra, cs_array) VALUES ('rss_calendar', 'a:0:{}', '', 1);"; $INSERT[] = "INSERT INTO ibf_cache_store (cs_key, cs_value, cs_extra, cs_array) VALUES ('announcements', 'a:0:{}', '', 1);"; -$INSERT[] = "INSERT INTO ibf_cache_store (cs_key, cs_value, cs_extra, cs_array) VALUES ('portal', 'a:6:{s:5:\"blogs\";a:5:{s:8:\"pc_title\";s:30:\"Invision Power Community Blogs\";s:7:\"pc_desc\";s:39:\"Вывод информации из IPB Blog на портале\";s:19:\"pc_settings_keyword\";s:0:\"\";s:18:\"pc_exportable_tags\";a:1:{s:25:\"blogs_show_last_updated_x\";a:2:{i:0;s:25:\"blogs_show_last_updated_x\";i:1;s:54:\"Вывести блок с названиями последних обновленных блогов\";}}s:6:\"pc_key\";s:5:\"blogs\";}s:8:\"calendar\";a:5:{s:8:\"pc_title\";s:16:\"Календарь форума\";s:7:\"pc_desc\";s:37:\"Вывод мини-календаря на текущий месяц\";s:19:\"pc_settings_keyword\";s:0:\"\";s:18:\"pc_exportable_tags\";a:1:{s:27:\"calendar_show_current_month\";a:2:{i:0;s:27:\"calendar_show_current_month\";i:1;s:42:\"Вывести блок с календарем на текущий месяц\";}}s:6:\"pc_key\";s:8:\"calendar\";}s:7:\"gallery\";a:5:{s:8:\"pc_title\";s:22:\"Invision Power Gallery\";s:7:\"pc_desc\";s:53:\"Вывод информации из Invision Power Gallery на портале\";s:19:\"pc_settings_keyword\";s:0:\"\";s:18:\"pc_exportable_tags\";a:1:{s:25:\"gallery_show_random_image\";a:2:{i:0;s:25:\"gallery_show_random_image\";i:1;s:63:\"Вывести блок со случайными изображениями из галерей пользоватей\";}}s:6:\"pc_key\";s:7:\"gallery\";}s:12:\"online_users\";a:5:{s:8:\"pc_title\";s:22:\"Пользователи в он-лайн\";s:7:\"pc_desc\";s:58:\"Вывод числа пользователей и их имен, находящихся в он-лайн\";s:19:\"pc_settings_keyword\";s:0:\"\";s:18:\"pc_exportable_tags\";a:1:{s:17:\"online_users_show\";a:2:{i:0;s:17:\"online_users_show\";i:1;s:36:\"Вывести блок пользователей в он-лайн\";}}s:6:\"pc_key\";s:12:\"online_users\";}s:4:\"poll\";a:5:{s:8:\"pc_title\";s:14:\"Опрос с форума\";s:7:\"pc_desc\";s:43:\"Выводит выбранный с форума опрос на портале\";s:19:\"pc_settings_keyword\";s:11:\"portal_poll\";s:18:\"pc_exportable_tags\";a:1:{s:14:\"poll_show_poll\";a:2:{i:0;s:14:\"poll_show_poll\";i:1;s:22:\"Вывести блок с опросом\";}}s:6:\"pc_key\";s:4:\"poll\";}s:13:\"recent_topics\";a:5:{s:8:\"pc_title\";s:23:\"Последние темы с форума\";s:7:\"pc_desc\";s:49:\"Выводит последние темы с первым сообщением из них\";s:19:\"pc_settings_keyword\";s:20:\"portal_recent_topics\";s:18:\"pc_exportable_tags\";a:2:{s:20:\"recent_topics_last_x\";a:2:{i:0;s:20:\"recent_topics_last_x\";i:1;s:56:\"Вывести блок с последними темами из определенных форумов\";}s:32:\"recent_topics_discussions_last_x\";a:2:{i:0;s:32:\"recent_topics_discussions_last_x\";i:1;s:48:\"Вывести блок с последними темами из всех форумов\";}}s:6:\"pc_key\";s:13:\"recent_topics\";}}', '', 1);"; +$INSERT[] = "INSERT INTO ibf_cache_store (cs_key, cs_value, cs_extra, cs_array) VALUES ('portal', 'a:6:{s:5:\"blogs\";a:5:{s:8:\"pc_title\";s:30:\"Invision Power Community Blogs\";s:7:\"pc_desc\";s:40:\"Shows IPB Blog information on the portal\";s:19:\"pc_settings_keyword\";s:0:\"\";s:18:\"pc_exportable_tags\";a:1:{s:25:\"blogs_show_last_updated_x\";a:2:{i:0;s:25:\"blogs_show_last_updated_x\";i:1;s:30:\"Shows the last X updated blogs\";}}s:6:\"pc_key\";s:5:\"blogs\";}s:8:\"calendar\";a:5:{s:8:\"pc_title\";s:29:\"Invision Power Board Calendar\";s:7:\"pc_desc\";s:46:\"Displays a mini calendar for the current month\";s:19:\"pc_settings_keyword\";s:0:\"\";s:18:\"pc_exportable_tags\";a:1:{s:27:\"calendar_show_current_month\";a:2:{i:0;s:27:\"calendar_show_current_month\";i:1;s:38:\"Shows a calendar for the current month\";}}s:6:\"pc_key\";s:8:\"calendar\";}s:7:\"gallery\";a:5:{s:8:\"pc_title\";s:22:\"Invision Power Gallery\";s:7:\"pc_desc\";s:54:\"Shows Invision Power Gallery information on the portal\";s:19:\"pc_settings_keyword\";s:0:\"\";s:18:\"pc_exportable_tags\";a:1:{s:25:\"gallery_show_random_image\";a:2:{i:0;s:25:\"gallery_show_random_image\";i:1;s:44:\"Shows a random image from a member\'s gallery\";}}s:6:\"pc_key\";s:7:\"gallery\";}s:12:\"online_users\";a:5:{s:8:\"pc_title\";s:33:\"Invision Power Board Online Users\";s:7:\"pc_desc\";s:49:\"Shows the current name and number of online users\";s:19:\"pc_settings_keyword\";s:0:\"\";s:18:\"pc_exportable_tags\";a:1:{s:17:\"online_users_show\";a:2:{i:0;s:17:\"online_users_show\";i:1;s:22:\"Shows the online users\";}}s:6:\"pc_key\";s:12:\"online_users\";}s:4:\"poll\";a:5:{s:8:\"pc_title\";s:25:\"Invision Power Board Poll\";s:7:\"pc_desc\";s:23:\"Shows the selected poll\";s:19:\"pc_settings_keyword\";s:11:\"portal_poll\";s:18:\"pc_exportable_tags\";a:1:{s:14:\"poll_show_poll\";a:2:{i:0;s:14:\"poll_show_poll\";i:1;s:22:\"Shows the request poll\";}}s:6:\"pc_key\";s:4:\"poll\";}s:13:\"recent_topics\";a:5:{s:8:\"pc_title\";s:34:\"Invision Power Board Recent Topics\";s:7:\"pc_desc\";s:47:\"Shows IPB recent topics with topic\'s first post\";s:19:\"pc_settings_keyword\";s:20:\"portal_recent_topics\";s:18:\"pc_exportable_tags\";a:2:{s:20:\"recent_topics_last_x\";a:2:{i:0;s:20:\"recent_topics_last_x\";i:1;s:63:\"Shows the last X topics with full post from the selected forums\";}s:32:\"recent_topics_discussions_last_x\";a:2:{i:0;s:32:\"recent_topics_discussions_last_x\";i:1;s:54:\"Shows the last X topic titles from ALL viewable forums\";}}s:6:\"pc_key\";s:13:\"recent_topics\";}}', '', 1);"; $INSERT[] = "INSERT INTO ibf_emoticons (id, typed, image, clickable, emo_set) VALUES (1, ':mellow:', 'mellow.gif', 1, 'default');"; @@ -78,26 +50,25 @@ $INSERT[] = "INSERT INTO ibf_emoticons (id, typed, image, clickable, emo_set) VA $INSERT[] = "INSERT INTO ibf_emoticons (id, typed, image, clickable, emo_set) VALUES (20, ':ph34r:', 'ph34r.gif', 0, 'default');"; # FORUMS: Last field: newest_id -$INSERT[] = "INSERT INTO ibf_forums VALUES (2, 1, 1, <%time%>, 1, '<%admin_name%>', 'Тестовый форум', 'Тестовый форум может быть удален в любое время', 1, 1, 0, 1, '', '', 'Добро пожаловать!', 1, 'last_post', 'Z-A', 100, 'all', 0, 0, 1, 1, 1, NULL, 1, 1, '', 0, 0, '', '', '', '', '', 1, '', 'a:6:{s:11:\"start_perms\";s:1:\"*\";s:11:\"reply_perms\";s:1:\"*\";s:10:\"read_perms\";s:1:\"*\";s:12:\"upload_perms\";s:1:\"*\";s:14:\"download_perms\";s:1:\"*\";s:10:\"show_perms\";s:1:\"*\";}', 0, 0, 0, 0, 1, '', 0);"; -$INSERT[] = "INSERT INTO ibf_forums VALUES (1, 0, 0, 0, 0, '', 'Тестовая категория', 'Тестовая категория может быть удалена в любое время' , 1, 1, 0, 1, '', '', '', 0, 'last_post', 'Z-A', 30, 'all', 0, 0, 1, 1, 1, NULL, -1, 0, '', 0, 0, '', '', '', '', '', 0, '', 'a:5:{s:11:\"start_perms\";s:0:\"\";s:11:\"reply_perms\";s:0:\"\";s:10:\"read_perms\";s:0:\"\";s:12:\"upload_perms\";s:0:\"\";s:10:\"show_perms\";s:1:\"*\";}', 1, 0, 0, 1, 1, '', 0);"; +$INSERT[] = "INSERT INTO ibf_forums VALUES (2, 1, 1, <%time%>, 1, '<%admin_name%>', 'A Test Forum', 'A test forum that may be removed at any time', 1, 1, 0, 1, '', '', 'Welcome!', 1, 'last_post', 'Z-A', 100, 'all', 0, 0, 1, 1, 1, NULL, 1, 1, '', 0, 0, '', '', '', '', '', 1, '', 'a:6:{s:11:\"start_perms\";s:1:\"*\";s:11:\"reply_perms\";s:1:\"*\";s:10:\"read_perms\";s:1:\"*\";s:12:\"upload_perms\";s:1:\"*\";s:14:\"download_perms\";s:1:\"*\";s:10:\"show_perms\";s:1:\"*\";}', 0, 0, 0, 0, 1, '', 0);"; +$INSERT[] = "INSERT INTO ibf_forums VALUES (1, 0, 0, 0, 0, '', 'A Test Category', 'A test category that may be removed at any time' , 1, 1, 0, 1, '', '', '', 0, 'last_post', 'Z-A', 30, 'all', 0, 0, 1, 1, 1, NULL, -1, 0, '', 0, 0, '', '', '', '', '', 0, '', 'a:5:{s:11:\"start_perms\";s:0:\"\";s:11:\"reply_perms\";s:0:\"\";s:10:\"read_perms\";s:0:\"\";s:12:\"upload_perms\";s:0:\"\";s:10:\"show_perms\";s:1:\"*\";}', 1, 0, 0, 1, 1, '', 0);"; -$INSERT[] = "INSERT INTO ibf_forum_perms SET perm_name='Маска неактивированных', perm_id=1"; -$INSERT[] = "INSERT INTO ibf_forum_perms SET perm_name='Маска пользователей', perm_id=3"; -$INSERT[] = "INSERT INTO ibf_forum_perms SET perm_name='Маска гостей', perm_id=2"; -$INSERT[] = "INSERT INTO ibf_forum_perms SET perm_name='Маска администраторов', perm_id=4"; -$INSERT[] = "INSERT INTO ibf_forum_perms SET perm_name='Маска заблокированных', perm_id=5"; +$INSERT[] = "INSERT INTO ibf_forum_perms SET perm_name='Validating Forum Set', perm_id=1"; +$INSERT[] = "INSERT INTO ibf_forum_perms SET perm_name='Member Forum Set', perm_id=3"; +$INSERT[] = "INSERT INTO ibf_forum_perms SET perm_name='Guest Forum Set', perm_id=2"; +$INSERT[] = "INSERT INTO ibf_forum_perms SET perm_name='Admin Forum Set', perm_id=4"; +$INSERT[] = "INSERT INTO ibf_forum_perms SET perm_name='Banned Forum Set', perm_id=5"; -$INSERT[] = "INSERT INTO ibf_languages (lid, ldir, lname, lauthor, lemail) VALUES (1, 'ru', 'Русский', 'IBResource.ru', 'support@ibresource.ru');"; -$INSERT[] = "INSERT INTO ibf_languages (lid, ldir, lname, lauthor, lemail) VALUES (2, 'en', 'English', 'Invision Power Board', 'languages@invisionboard.com');"; +$INSERT[] = "INSERT INTO ibf_languages (lid, ldir, lname, lauthor, lemail) VALUES (1, 'en', 'English', 'Invision Power Board', 'languages@invisionboard.com');"; -$INSERT[] = "INSERT INTO ibf_posts (pid, append_edit, edit_time, author_id, author_name, use_sig, use_emo, ip_address, post_date, icon_id, post, queued, topic_id, post_title, new_topic, edit_name, post_key, post_parent, post_htmlstate) VALUES (1, 0, NULL, 1, 'IBResource Team', 0, 1, '127.0.0.1', <%time%>, 0, 'Добро пожаловать в ваш новый форум — Invision Power Board!

Спасибо за приобретение русской версии Invision Power Board. Пожалуйста, ознакомьтесь с документацией администатора IP.Board. В ней вы найдете всю информацию о возможностях и настройках форума.

Созданные раздел, форум и это сообщение - тестовые, вы можете удалить их в любое время.

Перейти к документации...', 0, 1, NULL, 1, NULL, '0', 0, 0);"; +$INSERT[] = "INSERT INTO ibf_posts (pid, append_edit, edit_time, author_id, author_name, use_sig, use_emo, ip_address, post_date, icon_id, post, queued, topic_id, post_title, new_topic, edit_name, post_key, post_parent, post_htmlstate) VALUES (1, 0, NULL, 1, 'Invision Power Board Team', 0, 1, '127.0.0.1', <%time%>, 0, 'Welcome to your new Invision Power Board!



Congratulations on your purchase of our software and setting up your community. Please take some time and read through the Getting Started Guide and Administrator Documentation. The Getting Started Guide will walk you through some of the necessary steps to setting up an IP.Board and starting your community. The Administrator Documentation takes you through the details of the capabilities of IP.Board.



You can remove this message, topic, forum or even category at any time.



Go to the documentation now...', 0, 1, NULL, 1, NULL, '0', 0, 0);"; -$INSERT[] = "INSERT INTO ibf_titles (id, posts, title, pips) VALUES (1, 0, 'Новичок', '1');"; -$INSERT[] = "INSERT INTO ibf_titles (id, posts, title, pips) VALUES (2, 10, 'Участник', '2');"; -$INSERT[] = "INSERT INTO ibf_titles (id, posts, title, pips) VALUES (4, 30, 'Активный участник', '3');"; +$INSERT[] = "INSERT INTO ibf_titles (id, posts, title, pips) VALUES (1, 0, 'Newbie', '1');"; +$INSERT[] = "INSERT INTO ibf_titles (id, posts, title, pips) VALUES (2, 10, 'Member', '2');"; +$INSERT[] = "INSERT INTO ibf_titles (id, posts, title, pips) VALUES (4, 30, 'Advanced Member', '3');"; # TOPICS: topic_rating_hits -$INSERT[] = "INSERT INTO ibf_topics VALUES (1, 'Добро пожаловать', '', 'open', 0, 1, <%time%>, 1, <%time%>, 0, '<%admin_name%>', '<%admin_name%>', '0', 0, 1, 2, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0);"; +$INSERT[] = "INSERT INTO ibf_topics VALUES (1, 'Welcome', '', 'open', 0, 1, <%time%>, 1, <%time%>, 0, '<%admin_name%>', '<%admin_name%>', '0', 0, 1, 2, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0);"; $INSERT[] = "INSERT INTO ibf_subscription_currency SET subcurrency_code='USD', subcurrency_desc='United States Dollars', subcurrency_exchange='1.00', subcurrency_default=1;"; $INSERT[] = "INSERT INTO ibf_subscription_currency SET subcurrency_code='GBP', subcurrency_desc='United Kingdom Pounds', subcurrency_exchange=' 0.550776', subcurrency_default=0;"; @@ -112,7 +83,7 @@ $INSERT[] = "INSERT INTO ibf_subscription_methods (submethod_id, submethod_title $INSERT[] = "INSERT INTO ibf_subscription_methods (submethod_id, submethod_title, submethod_name, submethod_email, submethod_sid, submethod_custom_1, submethod_custom_2, submethod_custom_3, submethod_custom_4, submethod_custom_5, submethod_is_cc, submethod_is_auto, submethod_desc, submethod_logo, submethod_active, submethod_use_currency) VALUES (5, 'Safshop', 'safshop', '', '', NULL, NULL, NULL, NULL, NULL, 0, 1, 'Accepts all major credit cards', NULL, 1, 'USD');"; $INSERT[] = "INSERT INTO ibf_subscription_methods (submethod_id, submethod_title, submethod_name, submethod_email, submethod_sid, submethod_custom_1, submethod_custom_2, submethod_custom_3, submethod_custom_4, submethod_custom_5, submethod_is_cc, submethod_is_auto, submethod_desc, submethod_logo, submethod_active, submethod_use_currency) VALUES (6, 'Protx', 'protx', '', '', '', '', '', '', '', 1, 1, 'Accepts all major credit cards', '', 1, 'GBP');"; -$INSERT[] ="INSERT INTO ibf_cal_calendars (cal_id, cal_title, cal_moderate, cal_position, cal_event_limit, cal_bday_limit, cal_rss_export, cal_rss_export_days, cal_rss_export_max, cal_rss_update, cal_rss_update_last, cal_rss_cache, cal_permissions) VALUES (1, 'Основной календарь', 1, 0, 2, 1, 1, 14, 20, 1440, <%time%>, '', 'a:3:{s:9:\"perm_read\";s:1:\"*\";s:9:\"perm_post\";s:3:\"4,3\";s:10:\"perm_nomod\";s:0:\"\";}');"; +$INSERT[] ="INSERT INTO ibf_cal_calendars (cal_id, cal_title, cal_moderate, cal_position, cal_event_limit, cal_bday_limit, cal_rss_export, cal_rss_export_days, cal_rss_export_max, cal_rss_update, cal_rss_update_last, cal_rss_cache, cal_permissions) VALUES (1, 'Community Calendar', 1, 0, 2, 1, 1, 14, 20, 1440, <%time%>, '', 'a:3:{s:9:\"perm_read\";s:1:\"*\";s:9:\"perm_post\";s:3:\"4,3\";s:10:\"perm_nomod\";s:0:\"\";}');"; $INSERT[] = "INSERT INTO ibf_upgrade_history (upgrade_version_id, upgrade_version_human, upgrade_date, upgrade_mid, upgrade_notes) VALUES ('".IPB_LONG_VERSION."', '".IPBVERSION."', '0', '0', '');"; diff --git a/upload/install/sql/mysql_install.php b/upload/install/sql/mysql_install.php index 5cdad1de..6db9b9ae 100644 --- a/upload/install/sql/mysql_install.php +++ b/upload/install/sql/mysql_install.php @@ -1,124 +1,107 @@ - Script written by Matthew Mecham -| > Date started: 12th August 2004 -| > MYSQL EXTRA CONFIG / INSTALL FILE -+-------------------------------------------------------------------------- -*/ - -class install_extra -{ - var $errors = array(); - var $info_extra = array(); - var $ipsclass = ""; - - function install_extra() - { - - } - - /*-------------------------------------------------------------------------*/ - // process_query_create: Alter the query before it goes back $DB->query - // table prefix already changed at this point: CREATE TABLE - /*-------------------------------------------------------------------------*/ - - function process_query_create( $query ) - { - //----------------------------------------- - // Tack on the end the chosen table type - //----------------------------------------- - - $table_type = $this->ipsclass->vars['mysql_tbl_type']; - $codepage = $this->ipsclass->vars['mysql_codepage']; - - return preg_replace( "#\);$#", ") TYPE=".$table_type." /*!40100 DEFAULT CHARACTER SET ".$codepage." */;", $query ); - } - - /*-------------------------------------------------------------------------*/ - // process_query_index: Alter the query before it goes back $DB->query - // table prefix already changed at this point: INDEX - /*-------------------------------------------------------------------------*/ - - function process_query_index( $query ) - { - return $query; - } - - /*-------------------------------------------------------------------------*/ - // process_query_index: Alter the query before it goes back $DB->query - // table prefix already changed at this point: INSERT - /*-------------------------------------------------------------------------*/ - - function process_query_insert( $query ) - { - return $query; - } - - /*-------------------------------------------------------------------------*/ - // WHEN SHOWING THE FORM.... - /*-------------------------------------------------------------------------*/ - - function install_form_extra() - { - $extra = " - Кодировка MySQL
Не изменяйте, если не уверены.
- - - - Тип MySQL таблиц
Не изменяйте, если не уверены.
- - "; - - return $extra; - - } - - /*-------------------------------------------------------------------------*/ - // WHEN SAVING TO CONF GLOBAL - // Return errors in $errors[] - /*-------------------------------------------------------------------------*/ - - function install_form_process() - { - //----------------------------------------- - // When processed, return all vars to save - // in conf_global in the array $this->info_extra - // This will also be saved into $INFO[] for - // the installer - //----------------------------------------- - - if ( ! $_REQUEST['mysql_tbl_type'] OR ! $_REQUEST['mysql_codepage'] ) - { - $this->errors[] = 'Вы обязаны заполнить всю информацию о SQL сервере!'; - return; - } - - $this->info_extra['mysql_tbl_type'] = $_REQUEST['mysql_tbl_type']; - $this->info_extra['mysql_codepage'] = $_REQUEST['mysql_codepage']; - } - -} - + Script written by Matthew Mecham +| > Date started: 12th August 2004 +| > MYSQL EXTRA CONFIG / INSTALL FILE ++-------------------------------------------------------------------------- +*/ + +class install_extra +{ + var $errors = array(); + var $info_extra = array(); + var $ipsclass = ""; + + function install_extra() + { + + } + + /*-------------------------------------------------------------------------*/ + // process_query_create: Alter the query before it goes back $DB->query + // table prefix already changed at this point: CREATE TABLE + /*-------------------------------------------------------------------------*/ + + function process_query_create( $query ) + { + //----------------------------------------- + // Tack on the end the chosen table type + //----------------------------------------- + + $table_type = $this->ipsclass->vars['mysql_tbl_type']; + + return preg_replace( "#\);$#", ") TYPE=".$table_type.";", $query ); + } + + /*-------------------------------------------------------------------------*/ + // process_query_index: Alter the query before it goes back $DB->query + // table prefix already changed at this point: INDEX + /*-------------------------------------------------------------------------*/ + + function process_query_index( $query ) + { + return $query; + } + + /*-------------------------------------------------------------------------*/ + // process_query_index: Alter the query before it goes back $DB->query + // table prefix already changed at this point: INSERT + /*-------------------------------------------------------------------------*/ + + function process_query_insert( $query ) + { + return $query; + } + + /*-------------------------------------------------------------------------*/ + // WHEN SHOWING THE FORM.... + /*-------------------------------------------------------------------------*/ + + function install_form_extra() + { + $extra = " + MySQL Table Type
Use MyISAM if unsure
+ + + '; + + //----------------------------------------- + // Return Template Bit + //----------------------------------------- + + return $this->ipsclass->compiled_templates['skin_global']->captchaRecaptcha( $html ); + } + + /*-------------------------------------------------------------------------*/ + // Captcha validate + /*-------------------------------------------------------------------------*/ + + /** + * Show the captcha bot image + * + * @return void + * @since 1.0 + */ + function validate() + { + if ( !$this->private_key ) + { + return ''; + } + + $captcha_unique_id = $_REQUEST['recaptcha_challenge_field']; + $captcha_input = $_REQUEST['recaptcha_response_field']; + + if ( $captcha_input == null || strlen($captcha_input) == 0 || $captcha_unique_id == null || strlen($captcha_unique_id) == 0) + { + return false; + } + + $response = $this->_recaptchaPost( RECAPTCHA_VERIFY_SERVER, "/verify", + array ( + 'privatekey' => $this->private_key, + 'remoteip' => $this->ipsclass->ip_address, + 'challenge' => $captcha_unique_id, + 'response' => $captcha_input + ) + ); + + $answers = explode( "\n", $response [1] ); + + if ( trim ($answers [0]) == 'true' ) + { + return TRUE; + } + else + { + return FALSE; + } + } + + /** + * Gets a URL where the user can sign up for reCAPTCHA. If your application + * has a configuration page where you enter a key, you should provide a link + * using this function. + * + * @access public + * @param string $domain The domain where the page is hosted + * @param string $appname The name of your application + */ + function getSignupUrl( $domain = null, $appname = null ) + { + return "http://recaptcha.net/api/getkey?" . $this->_encodeQueryString( array( 'domain' => $domain, 'app' => $appname ) ); + } + + /** + * Submits an HTTP POST to a reCAPTCHA server + * + * @access private + * @param string $host + * @param string $path + * @param array $data + * @param int port + * @return array response + */ + function _recaptchaPost( $host, $path, $data, $port = 80 ) + { + $req = $this->_encodeQueryString( $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\r\n"; + $http_request .= "\r\n"; + $http_request .= $req; + + $response = ''; + + if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) + { + return false; + } + + fwrite($fs, $http_request); + + while ( !feof($fs) ) + { + $response .= fgets($fs, 1160); // One TCP-IP packet + } + + fclose($fs); + + $response = explode( "\r\n\r\n", $response, 2 ); + + return $response; + } + + /** + * Encode array of data into a query string + * + * @access private + * @param array $data + * @return string query string + */ + function _encodeQueryString( $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/upload/ips_kernel/class_communication.php b/upload/ips_kernel/class_communication.php index 09c5b166..ddfb360c 100644 --- a/upload/ips_kernel/class_communication.php +++ b/upload/ips_kernel/class_communication.php @@ -3,22 +3,15 @@ /* +--------------------------------------------------------------------------- | Invision Power KERNEL -| Invision Power Board 2.2.2 -| ============================================= +| Invision Power Board +| ======================================== | by Matthew Mecham -| (c) 2001 - 2006 Invision Power Services, Inc. +| (c) 2006 Invision Power Services | http://www.invisionpower.com -| ============================================= -| Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:55 PM -| Release: e3790216629e5a2aaf37070b32237f06 -| Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +| ======================================== +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +| INVISION POWER BOARD IS NOT FREE SOFTWARE! +| http://www.invisionboard.com +--------------------------------------------------------------------------- | | > Communication Class: Allows data to be sent via HTTP:POST @@ -259,7 +252,7 @@ class class_communication if ( ! $url_parts['host'] ) { - $this->errors[] = "Не найден хост в заданном URL '$file_location'!"; + $this->errors[] = "No host found in the URL '$file_location'!"; return FALSE; } @@ -315,7 +308,7 @@ class class_communication if ( ! $fp = @fsockopen( $host, $port, $errno, $errstr, $fsocket_timeout ) ) { - $this->errors[] = "Соединение прервано удаленным сервером $host"; + $this->errors[] = "CONNECTION REFUSED FROM $host"; return FALSE; } @@ -335,7 +328,7 @@ class class_communication if ( ! fputs( $fp, $header . $post_back_str ) ) { - $this->errors[] = "Не возможно отправить запрос удаленному серверу $host!"; + $this->errors[] = "Unable to send request to $host!"; return FALSE; } @@ -347,7 +340,7 @@ class class_communication if ( ! fputs( $fp, $header ) ) { - $this->errors[] = "Не удалось авторизоваться!"; + $this->errors[] = "Authorization Failed!"; return FALSE; } } diff --git a/upload/ips_kernel/class_converge.php b/upload/ips_kernel/class_converge.php index 7d6e8c52..72e3674a 100644 --- a/upload/ips_kernel/class_converge.php +++ b/upload/ips_kernel/class_converge.php @@ -2,22 +2,14 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:55 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +--------------------------------------------------------------------------- | > $Date: 2005-10-10 14:03:20 +0100 (Mon, 10 Oct 2005) $ | > $Revision: 22 $ diff --git a/upload/ips_kernel/class_convert_charset.php b/upload/ips_kernel/class_convert_charset.php index b534be97..13894e8c 100644 --- a/upload/ips_kernel/class_convert_charset.php +++ b/upload/ips_kernel/class_convert_charset.php @@ -2,24 +2,15 @@ /* +--------------------------------------------------------------------------- -| Invision Power Board 2.2.2 -| ============================================= +| Invision Power Board +| ======================================== | by Matthew Mecham -| (c) 2001 - 2006 Invision Power Services, Inc. +| (c) 2004 Invision Power Services | http://www.invisionpower.com -| ============================================= -| Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:55 PM -| Release: e3790216629e5a2aaf37070b32237f06 -| Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +| ======================================== +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +| INVISION POWER BOARD IS NOT FREE SOFTWARE! +| http://www.invisionboard.com +--------------------------------------------------------------------------- | | > CONVERT CHAR SET FUNCTIONS (Simple, light parser) diff --git a/upload/ips_kernel/class_db.php b/upload/ips_kernel/class_db.php index 72a75ca5..ba414546 100644 --- a/upload/ips_kernel/class_db.php +++ b/upload/ips_kernel/class_db.php @@ -3,22 +3,15 @@ /* +-------------------------------------------------------------------------- | Invision Power Services Kernel [DB Abstraction] -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:55 PM -| Release: e3790216629e5a2aaf37070b32237f06 -| Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +| THIS IS NOT FREE / OPEN SOURCE SOFTWARE +--------------------------------------------------------------------------- | | > Core Module @@ -53,10 +46,10 @@ * $db->build_query( array( 'select' => 'd.*', * 'from' => array( 'dnames_change' => 'd' ), * 'where' => 'dname_member_id='.$id, -* 'add_join' => 0 => array( 'select' => 'm.members_display_name', +* 'add_join' => array( 0 => array( 'select' => 'm.members_display_name', * 'from' => array( 'members' => 'm' ), * 'where' => 'm.id=d.dname_member_id', -* 'type' => 'inner' ), +* 'type' => 'inner' ) ), * 'order' => 'dname_date DESC' ) ); * $db->exec_query(); * @@ -116,7 +109,6 @@ class db_main 'error_log' => '' , 'use_error_log' => 0 , 'use_debug_log' => 0 , - 'mysql_codepage' => 'cp1251' , ); /** @@ -126,7 +118,6 @@ class db_main */ var $error = ""; var $error_no = ""; - var $error_codepage = "windows_1251"; /** * Return error message or die inline @@ -494,6 +485,24 @@ class db_main } + /*-------------------------------------------------------------------------*/ + // Shutdown replace into + /*-------------------------------------------------------------------------*/ + + /** + * Alias for do_replace_into + * + * @see do_update + * @since 2.1 + */ + + function do_shutdown_replace_into( $tbl, $arr, $where ) + { + # Alias, redirect. + $this->do_replace_into( $tbl, $arr, $where, TRUE ); + } + + /*-------------------------------------------------------------------------*/ // Quick function: DO DELETE /*-------------------------------------------------------------------------*/ @@ -570,7 +579,7 @@ class db_main function build_and_exec_query( $a ) { $this->build_query( $a ); - + $ci = $this->exec_query(); if ( isset($a['select']) AND $a['select'] ) @@ -594,6 +603,21 @@ class db_main function build_query_from_cache( $q="", $args=array(), $method='sql_queries' ) { + if ( $method == 'sql_queries' and !method_exists( $this->sql, $q ) ) + { + if ( is_array( $this->loaded_classes ) ) + { + foreach ( $this->loaded_classes as $sql_extension_obj ) + { + if ( method_exists( $this->$sql_extension_obj, $q ) ) + { + $method = $sql_extension_obj; + continue; + } + } + } + } + if ( $this->obj['query_cache_file'] and $method == 'sql_queries' ) { $this->cur_query .= $this->sql->$q( $args ); @@ -748,11 +772,12 @@ class db_main else if ( $this->obj['use_error_log'] AND $this->obj['error_log'] ) { $_error_string = "\n==================================================="; - $_error_string .= "\n Время: ". date( 'r' ); - $_error_string .= "\n Код ошибки: " . $this->error_no; - $_error_string .= "\n Сообщение сервера: " . $this->error; - $_error_string .= "\n IP Адрес клиента: " . $_SERVER['REMOTE_ADDR']; - $_error_string .= "\n Запрос: ".$the_error; + $_error_string .= "\n Date: ". date( 'r' ); + $_error_string .= "\n Error Number: " . $this->error_no; + $_error_string .= "\n Error: " . $this->error; + $_error_string .= "\n IP Address: " . $_SERVER['REMOTE_ADDR']; + $_error_string .= "\n Page: " . $_SERVER['REQUEST_URI']; + $_error_string .= "\n ".$the_error; if ( $FH = @fopen( $this->obj['error_log'], 'a' ) ) { @@ -760,28 +785,24 @@ class db_main @fclose( $FH ); } - print " - - Ошибка работы драйвера БД + print "IPS Driver Error -

Ошибка при работе с базой данных

Возникла проблема при работе с базой данных.
- Вы можете попробовать обновить эту страницу, нажав сюда +

IPS Driver Error

There appears to be an error with the database.
+ You can try to refresh the page by clicking here "; } else { - $the_error .= "\n\nСообщение сервера: ".$this->error."\n"; - $the_error .= "Код ошибки: ".$this->error_no."\n"; - $the_error .= "Время: ".date("l dS \o\f F Y h:i:s A"); + $the_error .= "\n\nSQL error: ".$this->error."\n"; + $the_error .= "SQL error code: ".$this->error_no."\n"; + $the_error .= "Date: ".date("l dS \o\f F Y h:i:s A"); - $out = " - - Ошибка работы драйвера БД + $out = "IPS Driver Error -

Ошибка при работе с базой данных

Возникла проблема при работе с базой данных.
- Вы можете попробовать обновить эту страницу, нажав сюда. -

Отладочная информация:
-

Приносим свои извинения за возможные неудобства.
"; +

IPS Driver Error

There appears to be an error with the database.
+ You can try to refresh the page by clicking here. +

Error Returned
+

We apologise for any inconvenience
"; print $out; @@ -1026,10 +1047,10 @@ class db_main if ( $this->obj['use_debug_log'] AND $this->obj['debug_log'] ) { $_string = "\n=============================================================================="; - $_string .= "\n Дата: ". date( 'r' ); - $_string .= "\n IP Адрес клиента: " . $_SERVER['REMOTE_ADDR']; - $_string .= "\n Время выполнения: ".$endtime; - $_string .= "\n Запрос: ".$query; + $_string .= "\n Date: ". date( 'r' ); + $_string .= "\n IP Address: " . $_SERVER['REMOTE_ADDR']; + $_string .= "\n Time Taken: ".$endtime; + $_string .= "\n ".$query; $_string .= "\n=============================================================================="; $_string .= "\n".$data; diff --git a/upload/ips_kernel/class_db_mysql.php b/upload/ips_kernel/class_db_mysql.php index c2e1c23b..89ca6577 100644 --- a/upload/ips_kernel/class_db_mysql.php +++ b/upload/ips_kernel/class_db_mysql.php @@ -3,22 +3,15 @@ /* +-------------------------------------------------------------------------- | Invision Power Services Kernel [DB Abstraction] -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:55 PM -| Release: e3790216629e5a2aaf37070b32237f06 -| Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +| THIS IS NOT FREE / OPEN SOURCE SOFTWARE +--------------------------------------------------------------------------- | | > MySQL Driver Module @@ -44,6 +37,8 @@ * */ + //define( 'FORCE_MYSQL_ONLY', 1 ); + //----------------------------------------- // Define KERNEL_PATH if not // defined - i.e. installation @@ -81,4 +76,10 @@ else require( KERNEL_PATH."class_db_mysql_client.php" ); } +//----------------------------------------- +// Clean up +//----------------------------------------- + +unset( $versions ); + ?> \ No newline at end of file diff --git a/upload/ips_kernel/class_db_mysql_client.php b/upload/ips_kernel/class_db_mysql_client.php index 390a9596..00cab4a8 100644 --- a/upload/ips_kernel/class_db_mysql_client.php +++ b/upload/ips_kernel/class_db_mysql_client.php @@ -3,22 +3,15 @@ /* +-------------------------------------------------------------------------- | Invision Power Services Kernel [DB Abstraction] -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:55 PM -| Release: e3790216629e5a2aaf37070b32237f06 -| Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +| THIS IS NOT FREE / OPEN SOURCE SOFTWARE +--------------------------------------------------------------------------- | | > MySQLi Driver Module @@ -75,6 +68,8 @@ if ( ! defined('IPS_MAIN_DB_CLASS_LEGACY') ) */ class db_driver_mysql extends db_main { + var $cached_fields = array(); + var $cached_tables = array(); /*-------------------------------------------------------------------------*/ // Set up required vars @@ -153,30 +148,13 @@ class db_driver_mysql extends db_main return FALSE; } - $this->sql_set_collation_and_cp(); - + unset( $this->obj['sql_host'] ); + unset( $this->obj['sql_user'] ); + unset( $this->obj['sql_pass'] ); + return TRUE; } - function sql_set_collation_and_cp() - { - $this->sql_get_version(); - - if ( $this->mysql_version >= 40101 ) - { - $res = mysql_query( "SHOW CHARSET LIKE '" . $this->obj['mysql_codepage'] . "'", $this->connection_id ); - - $charset = mysql_fetch_row($res); - - mysql_query( "SET NAMES " . $this->obj['mysql_codepage'], $this->connection_id ); - mysql_query( "SET CHARACTER SET " . $this->obj['mysql_codepage'], $this->connection_id ); - mysql_query( "SET character_set_connection = " . $this->obj['mysql_codepage'], $this->connection_id ); - mysql_query( "SET collation_connection = " . $charset[2], $this->connection_id ); - } - - return TRUE; - } - function sql_can_subquery() { $this->sql_get_version(); @@ -240,6 +218,52 @@ class db_driver_mysql extends db_main } } + + /*-------------------------------------------------------------------------*/ + // Quick function: DO REPLACE INTO + /*-------------------------------------------------------------------------*/ + + function do_replace_into( $tbl, $arr, $where='', $shutdown=FALSE ) + { + //----------------------------------------- + // Form query + //----------------------------------------- + + $dba = $this->compile_db_insert_string( $arr ); + + $query = "REPLACE INTO ".$this->obj['sql_tbl_prefix']."$tbl ({$dba['FIELD_NAMES']}) VALUES({$dba['FIELD_VALUES']})"; + + //----------------------------------------- + // Shut down query? + //----------------------------------------- + + $this->no_prefix_convert = 1; + + if ( $shutdown ) + { + if ( ! $this->obj['use_shutdown'] ) + { + $this->is_shutdown = 1; + $return = $this->query( $query ); + $this->no_prefix_convert = 0; + $this->is_shutdown = 1; + return $return; + } + else + { + $this->obj['shutdown_queries'][] = $query; + $this->no_prefix_convert = 0; + $this->cur_query = ""; + } + } + else + { + $return = $this->query( $query ); + $this->no_prefix_convert = 0; + return $return; + } + } + /*-------------------------------------------------------------------------*/ // Quick function: DO INSERT /*-------------------------------------------------------------------------*/ @@ -556,20 +580,20 @@ class db_driver_mysql extends db_main if ( preg_match( "#(?:/\*|\*/)#i", $_tmp ) ) { - $this->fatal_error( "Настройки драйвера не допускают использование комментариев в SQL запросе.\nИзмените атрибут allow_sub_select на 1 у объекта драйвера для выключения этой проверки." ); + $this->fatal_error( "You are not allowed to use comments in your SQL query.\nAdd \$this->ipsclass->DB->allow_sub_select=1; before any query construct to allow them" ); return false; } if ( preg_match( "#[^_a-zA-Z]union[^_a-zA-Z]#s", $_tmp ) ) { - $this->fatal_error( "Настройки драйвера не позволяют использовать UNION-запросы.\nИзмените атрибут allow_sub_select на 1 у объекта драйвера для выключения этой проверки." ); + $this->fatal_error( "UNION query joins are not allowed.\nAdd \$this->ipsclass->DB->allow_sub_select=1; before any query construct to allow them" ); return false; } else if ( preg_match_all( "#[^_a-zA-Z](select)[^_a-zA-Z]#s", $_tmp, $matches ) ) { if ( count( $matches ) > 1 ) { - $this->fatal_error( "Настройки драйвера не позволяют использовать вложенные SELECT в запросах.\nИзмените атрибут allow_sub_select на 1 у объекта драйвера для выключения этой проверки." ); + $this->fatal_error( "SUB SELECT query joins are not allowed.\nAdd \$this->ipsclass->DB->allow_sub_select=1; before any query construct to allow them" ); return false; } } @@ -591,7 +615,7 @@ class db_driver_mysql extends db_main if (! $this->query_id ) { - $this->fatal_error($the_query); + $this->fatal_error("mySQL query error: $the_query"); } //----------------------------------------- @@ -620,7 +644,7 @@ class db_driver_mysql extends db_main $_data .= "\n+------------------------------------------------------------------------------+"; } - $this->write_debug_log( $query, $_data, $endtime ); + $this->write_debug_log( $the_query, $_data, $endtime ); } else { @@ -747,9 +771,16 @@ class db_driver_mysql extends db_main // ADD FIELD /*-------------------------------------------------------------------------*/ - function sql_add_field( $table, $field_name, $field_type, $field_default="''" ) + function sql_add_field( $table, $field_name, $field_type, $field_default='' ) { - $this->query( "ALTER TABLE ".$this->obj['sql_tbl_prefix']."{$table} ADD $field_name $field_type default {$field_default}" ); + $default = 'NULL'; + + if( $field_default !== '' ) + { + $default = "default {$field_default}"; + } + + $this->query( "ALTER TABLE ".$this->obj['sql_tbl_prefix']."{$table} ADD {$field_name} {$field_type} {$default}" ); } /*-------------------------------------------------------------------------*/ @@ -785,8 +816,12 @@ class db_driver_mysql extends db_main function sql_get_table_schematic( $table ) { + $this->return_die = 1; + $qid = $this->query( "SHOW CREATE TABLE ".$this->obj['sql_tbl_prefix']."{$table}" ); + $this->return_die = 0; + if( $qid ) { return $this->fetch_row($qid); @@ -941,17 +976,22 @@ class db_driver_mysql extends db_main function get_table_names() { + if( is_array($this->cached_tables) AND count($this->cached_tables) ) + { + return $this->cached_tables; + } + $result = mysql_list_tables($this->obj['sql_database']); $num_tables = @mysql_numrows($result); for ($i = 0; $i < $num_tables; $i++) { - $tables[] = mysql_tablename($result, $i); + $this->cached_tables[] = mysql_tablename($result, $i); } // free result docs say only for select, explain, describe, show queries //mysql_free_result($result); - return $tables; + return $this->cached_tables; } /*-------------------------------------------------------------------------*/ @@ -964,7 +1004,7 @@ class db_driver_mysql extends db_main $return = 0; - if ( in_array( SQL_PREFIX.$table, $table_names ) ) + if ( in_array( $this->obj['sql_tbl_prefix'].$table, $table_names ) ) { $return = 1; } @@ -973,6 +1013,52 @@ class db_driver_mysql extends db_main return $return; } + + + /*-------------------------------------------------------------------------*/ + // Check if field exists + /*-------------------------------------------------------------------------*/ + + function field_exists($field, $table) + { + if( array_key_exists( $table, $this->cached_fields ) ) + { + if( in_array( $field, $this->cached_fields[ $table ] ) ) + { + return 1; + } + else + { + return 0; + } + } + + $this->return_die = 1; + $this->error = ""; + $return = 0; + + $q = $this->query( "SHOW fields FROM " . $this->obj['sql_tbl_prefix'] . $table ); + + if( $q AND $this->get_num_rows($q) ) + { + while( $check = $this->fetch_row($q) ) + { + $this->cached_fields[ $table ][] = $check['Field']; + } + } + + if ( !$this->failed AND in_array( $field, $this->cached_fields[ $table ] ) ) + { + $return = 1; + } + + $this->error = ""; + $this->return_die = 0; + $this->error_no = 0; + $this->failed = 0; + + return $return; + } /*-------------------------------------------------------------------------*/ @@ -1001,9 +1087,14 @@ class db_driver_mysql extends db_main function _get_error_number() { - $conid = $this->connection_id ? $this->connection_id : ''; - - return @mysql_errno( $conid ); + if( $this->connection_id ) + { + return @mysql_errno( $this->connection_id ); + } + else + { + return @mysql_errno(); + } } /*-------------------------------------------------------------------------*/ @@ -1012,9 +1103,14 @@ class db_driver_mysql extends db_main function _get_error_string() { - $conid = $this->connection_id ? $this->connection_id : ''; - - return @mysql_error( $conid ); + if( $this->connection_id ) + { + return @mysql_error( $this->connection_id ); + } + else + { + return @mysql_error(); + } } /*-------------------------------------------------------------------------*/ diff --git a/upload/ips_kernel/class_db_mysqli_client.php b/upload/ips_kernel/class_db_mysqli_client.php index e069fb44..96f9cecd 100644 --- a/upload/ips_kernel/class_db_mysqli_client.php +++ b/upload/ips_kernel/class_db_mysqli_client.php @@ -3,22 +3,15 @@ /* +-------------------------------------------------------------------------- | Invision Power Services Kernel [DB Abstraction] -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:55 PM -| Release: e3790216629e5a2aaf37070b32237f06 -| Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +| THIS IS NOT FREE / OPEN SOURCE SOFTWARE +--------------------------------------------------------------------------- | | > MySQLi Driver Module @@ -78,6 +71,9 @@ class db_driver_mysql extends db_main { var $connect_failed = 0; + var $cached_fields = array(); + var $cached_tables = array(); + /*-------------------------------------------------------------------------*/ // Set up required vars /*-------------------------------------------------------------------------*/ @@ -123,10 +119,23 @@ class db_driver_mysql extends db_main // Connect //----------------------------------------- - $this->connection_id = @mysqli_connect( $this->obj['sql_host'] , - $this->obj['sql_user'] , - $this->obj['sql_pass'] - ); + if( $this->obj['sql_port'] ) + { + $this->connection_id = @mysqli_connect( $this->obj['sql_host'] , + $this->obj['sql_user'] , + $this->obj['sql_pass'], + $this->obj['sql_database'], + $this->obj['sql_port'] + ); + } + else + { + $this->connection_id = @mysqli_connect( $this->obj['sql_host'] , + $this->obj['sql_user'] , + $this->obj['sql_pass'], + $this->obj['sql_database'] + ); + } if ( ! $this->connection_id ) { @@ -135,37 +144,21 @@ class db_driver_mysql extends db_main return FALSE; } - if ( ! mysqli_select_db( $this->connection_id, $this->obj['sql_database'] ) ) + /*if ( ! mysqli_select_db( $this->connection_id, $this->obj['sql_database'] ) ) { $this->fatal_error(); return FALSE; - } + }*/ - $this->sql_set_collation_and_cp(); mysqli_autocommit( $this->connection_id, TRUE ); + + unset( $this->obj['sql_host'] ); + unset( $this->obj['sql_user'] ); + unset( $this->obj['sql_pass'] ); return TRUE; } - function sql_set_collation_and_cp() - { - $this->sql_get_version(); - - if ( $this->mysql_version >= 40101 ) - { - $res = mysqli_query( $this->connection_id, "SHOW CHARSET LIKE '" . $this->obj['mysql_codepage'] . "'"); - - $charset = mysqli_fetch_row($res); - - mysqli_query( $this->connection_id, "SET NAMES " . $this->obj['mysql_codepage'] ); - mysqli_query( $this->connection_id, "SET CHARACTER SET " . $this->obj['mysql_codepage'] ); - mysqli_query( $this->connection_id, "SET character_set_connection = " . $this->obj['mysql_codepage'] ); - mysqli_query( $this->connection_id, "SET collation_connection = " . $charset[2] ); - } - - return TRUE; - } - function sql_can_subquery() { $this->sql_get_version(); @@ -211,7 +204,7 @@ class db_driver_mysql extends db_main $this->is_shutdown = 1; $return = $this->query( $query ); $this->no_prefix_convert = 0; - $this->is_shutdown = 1; + $this->is_shutdown = 0; return $return; } else @@ -274,6 +267,52 @@ class db_driver_mysql extends db_main } } + + /*-------------------------------------------------------------------------*/ + // Quick function: DO REPLACE INTO + /*-------------------------------------------------------------------------*/ + + function do_replace_into( $tbl, $arr, $where='', $shutdown=FALSE ) + { + //----------------------------------------- + // Form query + //----------------------------------------- + + $dba = $this->compile_db_insert_string( $arr ); + + $query = "REPLACE INTO ".$this->obj['sql_tbl_prefix']."$tbl ({$dba['FIELD_NAMES']}) VALUES({$dba['FIELD_VALUES']})"; + + //----------------------------------------- + // Shut down query? + //----------------------------------------- + + $this->no_prefix_convert = 1; + + if ( $shutdown ) + { + if ( ! $this->obj['use_shutdown'] ) + { + $this->is_shutdown = 1; + $return = $this->query( $query ); + $this->no_prefix_convert = 0; + $this->is_shutdown = 1; + return $return; + } + else + { + $this->obj['shutdown_queries'][] = $query; + $this->no_prefix_convert = 0; + $this->cur_query = ""; + } + } + else + { + $return = $this->query( $query ); + $this->no_prefix_convert = 0; + return $return; + } + } + /*-------------------------------------------------------------------------*/ // SIMPLE: UPDATE /*-------------------------------------------------------------------------*/ @@ -545,20 +584,20 @@ class db_driver_mysql extends db_main if ( preg_match( "#(?:/\*|\*/)#i", $_tmp ) ) { - $this->fatal_error( "Настройки драйвера не допускают использование комментариев в SQL запросе.\nИзмените атрибут allow_sub_select на 1 у объекта драйвера для выключения этой проверки." ); + $this->fatal_error( "You are not allowed to use comments in your SQL query.\nAdd \$this->ipsclass->DB->allow_sub_select=1; before any query construct to allow them" ); return false; } if ( preg_match( "#[^_a-zA-Z]union[^_a-zA-Z]#s", $_tmp ) ) { - $this->fatal_error( "Настройки драйвера не позволяют использовать UNION-запросы.\nИзмените атрибут allow_sub_select на 1 у объекта драйвера для выключения этой проверки." ); + $this->fatal_error( "UNION query joins are not allowed.\nAdd \$this->ipsclass->DB->allow_sub_select=1; before any query construct to allow them" ); return false; } else if ( preg_match_all( "#[^_a-zA-Z](select)[^_a-zA-Z]#s", $_tmp, $matches ) ) { if ( count( $matches ) > 1 ) { - $this->fatal_error( "Настройки драйвера не позволяют использовать вложенные SELECT в запросах.\nИзмените атрибут allow_sub_select на 1 у объекта драйвера для выключения этой проверки." ); + $this->fatal_error( "SUB SELECT query joins are not allowed.\nAdd \$this->ipsclass->DB->allow_sub_select=1; before any query construct to allow them" ); return false; } } @@ -580,7 +619,7 @@ class db_driver_mysql extends db_main if (! $this->query_id ) { - $this->fatal_error($the_query); + $this->fatal_error("mySQL query error: $the_query"); } //----------------------------------------- @@ -704,7 +743,7 @@ class db_driver_mysql extends db_main function fetch_row($query_id = "") { - if ( !$query_id ) + if ( ! $query_id ) { $query_id = $this->query_id; } @@ -736,9 +775,16 @@ class db_driver_mysql extends db_main // ADD FIELD /*-------------------------------------------------------------------------*/ - function sql_add_field( $table, $field_name, $field_type, $field_default="''" ) + function sql_add_field( $table, $field_name, $field_type, $field_default='' ) { - $this->query( "ALTER TABLE ".$this->obj['sql_tbl_prefix']."{$table} ADD $field_name $field_type default {$field_default}" ); + $default = 'NULL'; + + if( $field_default !== '' ) + { + $default = "default {$field_default}"; + } + + $this->query( "ALTER TABLE ".$this->obj['sql_tbl_prefix']."{$table} ADD {$field_name} {$field_type} {$default}" ); } /*-------------------------------------------------------------------------*/ @@ -774,8 +820,12 @@ class db_driver_mysql extends db_main function sql_get_table_schematic( $table ) { + $this->return_die = 1; + $qid = $this->query( "SHOW CREATE TABLE ".$this->obj['sql_tbl_prefix']."{$table}" ); + $this->return_die = 0; + if( $qid ) { return $this->fetch_row($qid); @@ -924,16 +974,29 @@ class db_driver_mysql extends db_main function get_table_names() { + if ( is_array( $this->cached_tables ) AND count( $this->cached_tables ) ) + { + return $this->cached_tables; + } + + $_tmp = $this->return_die; + $this->return_die = 1; + $tbl = $this->query( "SHOW TABLES FROM `{$this->obj['sql_database']}`" ); - while( $result = mysqli_fetch_row($tbl) ) + $this->return_die = $_tmp; + + if( $tbl AND $this->get_num_rows($tbl) ) { - $tables[] = $result[0]; + while( $result = mysqli_fetch_row($tbl) ) + { + $this->cached_tables[] = $result[0]; + } } mysqli_free_result($tbl); - return $tables; + return $this->cached_tables; } @@ -947,7 +1010,7 @@ class db_driver_mysql extends db_main $return = 0; - if ( in_array( SQL_PREFIX.$table, $table_names ) ) + if ( in_array( trim( $this->obj['sql_tbl_prefix'] . $table ), $table_names ) ) { $return = 1; } @@ -955,7 +1018,52 @@ class db_driver_mysql extends db_main unset($table_names); return $return; - } + } + + /*-------------------------------------------------------------------------*/ + // Check if field exists + /*-------------------------------------------------------------------------*/ + + function field_exists($field, $table) + { + if( array_key_exists( $table, $this->cached_fields ) ) + { + if( in_array( $field, $this->cached_fields[ $table ] ) ) + { + return 1; + } + else + { + return 0; + } + } + + $this->return_die = 1; + $this->error = ""; + $return = 0; + + $q = $this->query( "SHOW fields FROM " . $this->obj['sql_tbl_prefix'] . $table ); + + if( $q AND $this->get_num_rows($q) ) + { + while( $check = $this->fetch_row($q) ) + { + $this->cached_fields[ $table ][] = $check['Field']; + } + } + + if ( !$this->failed AND in_array( $field, $this->cached_fields[ $table ] ) ) + { + $return = 1; + } + + $this->error = ""; + $this->return_die = 0; + $this->error_no = 0; + $this->failed = 0; + + return $return; + } /*-------------------------------------------------------------------------*/ // Return an array of fields diff --git a/upload/ips_kernel/class_difference.php b/upload/ips_kernel/class_difference.php index c8e965ac..6f426bf8 100644 --- a/upload/ips_kernel/class_difference.php +++ b/upload/ips_kernel/class_difference.php @@ -2,22 +2,12 @@ /* +--------------------------------------------------------------------------- | Invision Power Services Kernel Module -| Invision Power Board 2.2.2 -| ============================================= +| Invision Power Board +| ======================================== | by Matthew Mecham -| (c) 2001 - 2006 Invision Power Services, Inc. +| (c) 2005 Invision Power Services | http://www.invisionpower.com -| ============================================= -| Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:55 PM -| Release: e3790216629e5a2aaf37070b32237f06 -| Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +| ======================================== +--------------------------------------------------------------------------- | | > Difference Engine. @@ -260,7 +250,7 @@ class class_difference { $str_array = $this->_explode_trim( chr(10), $str ); $out_array = array(); - + reset($str_array); foreach( $str_array as $low ) @@ -290,7 +280,7 @@ class class_difference foreach( $tmp as $i ) { - if ( $remove_blank AND ! $i ) + if ( $remove_blank AND ( $i === '' OR $i === NULL ) ) //!$i AND $i !== 0 ) { continue; } @@ -299,7 +289,7 @@ class class_difference $final[] = trim($i); } } - + return $final; } @@ -397,7 +387,7 @@ class class_difference } else { - return "Ошибка: файла не существует"; + return "Error, files not written to disk"; } } @@ -454,7 +444,7 @@ class class_difference } else { - return "Ошибка: файла не существует"; + return "Error, files not written to disk"; } } diff --git a/upload/ips_kernel/class_email.php b/upload/ips_kernel/class_email.php index 7ee715ac..313762a7 100644 --- a/upload/ips_kernel/class_email.php +++ b/upload/ips_kernel/class_email.php @@ -1,24 +1,16 @@ Core Module @@ -74,147 +66,169 @@ class class_email * * @var string */ - var $from = ""; + var $from = ""; + + /** + * From email address + * + * @var string + */ + var $from_display = ""; /** * To email address * * @var string */ - var $to = ""; + var $to = ""; /** * Email subject * * @var string */ - var $subject = ""; + var $subject = ""; /** * Email message contents * * @var string */ - var $message = ""; + var $message = ""; + + /** + * Plain text message contents + * + * @var string + */ + var $pt_message = ""; /** * Attachments: Parts * * @var array */ - var $parts = array(); + var $parts = array(); /** * BCC Email addresses * * @var array */ - var $bcc = array(); + var $bcc = array(); /** - * Email headers (sep. \r\n) + * Email headers * * @var string */ - var $mail_headers = ""; + var $mail_headers = array(); + + /** + * Header EOL + * RFC specs state \r\n + * However most servers support \n + * @var string + */ + var $header_eol = "\n"; /** * Attachments: Multi-part * * @var string */ - var $multipart = ""; + var $multipart = ""; /** * Attachments: Boundry * * @var string */ - var $boundry = "----=_NextPart_000_0022_01C1BD6C.D0C0F9F0"; + var $boundry = "----=_NextPart_000_0022_01C1BD6C.D0C0F9F0"; /** * HTML email flag * * @var integer */ - var $html_email = 0; + var $html_email = 0; /** * Email character set * * @var string */ - var $char_set = 'iso-8859-1'; + var $char_set = 'utf-8'; /** * SMTP: * * @var boolean */ - var $smtp_fp = FALSE; + var $smtp_fp = null; /** * SMTP: Message * * @var string */ - var $smtp_msg = ""; + var $smtp_msg = ""; /** * SMTP: Port * * @var integer */ - var $smtp_port = 25; + var $smtp_port = 25; /** * SMTP: Host * * @var string */ - var $smtp_host = "localhost"; + var $smtp_host = "localhost"; /** * SMTP: Username * * @var string */ - var $smtp_user = ""; + var $smtp_user = ""; /** * SMTP: Password * * @var string */ - var $smtp_pass = ""; + var $smtp_pass = ""; /** * SMTP: Return code * * @var string */ - var $smtp_code = ""; + var $smtp_code = ""; /** * SMTP: Wrap email addresses in brackets flag * * @var integer boolean */ - var $wrap_brackets = 0; + var $wrap_brackets = 0; /** * Default email method (mail or smtp) * * @var string */ - var $mail_method = 'mail'; + var $mail_method = 'mail'; /** * Dump email to flat file for testing * * @var integer */ - var $temp_dump = 0; + var $temp_dump = 0; /** * Error message @@ -280,6 +294,9 @@ class class_email function build_headers() { + $extra_headers = array(); + $extra_header_rfc = ""; + //----------------------------------------- // HTML (hitmuhl) // If we're sending HTML messages, then @@ -288,39 +305,56 @@ class class_email //----------------------------------------- $this->pt_message = $this->message; + $this->pt_message = str_replace( "
", "\n", $this->pt_message ); + $this->pt_message = str_replace( "
" , "\n", $this->pt_message ); + $this->pt_message = strip_tags( $this->pt_message ); + + $this->pt_message = html_entity_decode( $this->pt_message, ENT_QUOTES ); + $this->pt_message = str_replace( '\', '\\', $this->pt_message ); + $this->pt_message = str_replace( '$', '$', $this->pt_message ); + + // Now put & back... + //----------------------------------------- // Start mail headers //----------------------------------------- - $this->mail_headers .= "Return-Path: ".$this->from."\n"; - $this->mail_headers .= "X-Priority: 3\n"; - $this->mail_headers .= "X-Mailer: IPB PHP Mailer\n"; + $this->mail_headers['MIME-Version'] = "1.0"; //----------------------------------------- // From and to... //----------------------------------------- - $this->mail_headers .= "From: ".$this->from."\n"; + if( $this->from_display ) + { + $this->mail_headers['From'] = '"' . $this->from_display . '" <' . $this->from . '>'; + } + else + { + $this->mail_headers['From'] = '<' . $this->from . '>'; + } if ( $this->mail_method != 'smtp' ) { if ( count( $this->bcc ) > 1 ) { - $this->mail_headers .= "Bcc: ".implode( "," , $this->bcc ) . "\n"; + $this->mail_headers['Bcc'] = implode( "," , $this->bcc ); } } else { if ( $this->to ) { - $this->mail_headers .= "To: ".$this->to."\n"; + $this->mail_headers['To'] = $this->to; } - $this->mail_headers .= "Subject: ".$this->subject."\n"; + + $this->mail_headers['Subject'] = $this->subject; } - # Start MIME headers - $this->mail_headers .= "MIME-Version: 1.0\n"; + $this->mail_headers['Return-Path'] = $this->from; + $this->mail_headers['X-Priority'] = "3"; + $this->mail_headers['X-Mailer'] = "IPS PHP Mailer"; //----------------------------------------- // Attachments? @@ -328,66 +362,116 @@ class class_email if ( count ($this->parts) > 0 ) { - # Format PT message - if ( $this->html_email ) + if ( ! $this->html_email ) { - $this->pt_message = str_replace( "
", "\n", $this->pt_message ); - $this->pt_message = str_replace( "
" , "\n", $this->pt_message ); - $this->pt_message = strip_tags( $this->pt_message ); + $extra_headers[0]['Content-Type'] = "multipart/mixed;\n\tboundary=\"".$this->boundry."\""; + + $extra_headers[0]['notencode'] = "\n\nThis is a MIME encoded message.\n\n--".$this->boundry."\n"; + + $extra_headers[1]['Content-Type'] = "text/plain;\n\tcharset=\"".$this->char_set."\""; + #$extra_headers[1]['Content-Transfer-Encoding'] = "quoted-printable"; + + $extra_headers[1]['notencode'] = "\n\n".$this->message."\n\n--".$this->boundry; + } + else + { + $extra_headers[0]['Content-Type'] = "multipart/mixed;\n\tboundary=\"".$this->boundry."\""; + + $extra_headers[0]['notencode'] = "\n\nThis is a MIME encoded message.\n\n--".$this->boundry."\n"; + + $extra_headers[1]['Content-Type'] = "text/html;\n\tcharset=\"".$this->char_set."\""; + #$extra_headers[1]['Content-Transfer-Encoding'] = "quoted-printable"; + + $extra_headers[1]['notencode'] = "\n\n".$this->message."\n\n--".$this->boundry; } - # Force plain text emails only - $this->html_email = 0; + $extra_headers[2]['notencode'] = $this->build_multipart(); + + reset($extra_headers); + + foreach( $extra_headers as $subset => $the_header ) + { + foreach( $the_header as $k => $v ) + { + if( $k == 'notencode' ) + { + $extra_headers_rfc .= $v; + } + else + { + $v = $this->encode_headers( array( 'v' => $v ) ); + + $extra_headers_rfc .= $k.': '.$v['v'].$this->header_eol; + } + } + } - # Do headers - $this->mail_headers .= "Content-type: multipart/mixed;boundary=\"".$this->boundry."\"\n\nThis is a MIME encoded message.\n\n--".$this->boundry; - } - - //----------------------------------------- - // Sort out HTML / PT emails - //----------------------------------------- - - if ( $this->html_email ) - { - # Format PT message - $this->pt_message = str_replace( "
", "\n", $this->pt_message ); - $this->pt_message = str_replace( "
" , "\n", $this->pt_message ); - $this->pt_message = strip_tags( $this->pt_message ); - - # Do headers - $this->mail_headers .= "Content-type: multipart/alternative;boundary=\"".$this->boundry."\"\n\nThis is a MIME encoded message.\n\n--".$this->boundry; - } - - //----------------------------------------- - // HTML headers... - //----------------------------------------- - - # Plain text version... - $this->mail_headers .= "\nContent-Type: text/plain;\n\tcharset=\"".$this->char_set."\"\n\n".$this->pt_message."\n\n--".$this->boundry; - - # HTML version - if ( $this->html_email ) - { - $this->mail_headers .= "\nContent-Type: text/html;\n\tcharset=\"".$this->char_set."\"\n\n".$this->message."\n\n"; - } - - //----------------------------------------- - // Do the attachments last - //----------------------------------------- - - if ( count ($this->parts) > 0 ) - { - $this->mail_headers .= $this->build_multipart(); - } - - //----------------------------------------- - // Stop double printing message - //----------------------------------------- - - if ( $this->html_email OR count ($this->parts) > 0 ) - { $this->message = ""; } + else + { + //----------------------------------------- + // HTML (hitmuhl) ? + //----------------------------------------- + + if ( $this->html_email ) + { + $extra_headers[0]['Content-Type'] = "multipart/alternative;\n\tboundary=\"".$this->boundry."\""; + + $extra_headers[0]['notencode'] = "\n\nThis is a MIME encoded message.\n\n--".$this->boundry."\n"; + + $extra_headers[1]['Content-Type'] = "text/html;\n\tcharset=\"".$this->char_set."\""; + #$extra_headers[1]['Content-Transfer-Encoding'] = "quoted-printable"; + + $extra_headers[1]['notencode'] = "\n\n".$this->message."\n\n--".$this->boundry."\n"; + + $extra_headers[2]['Content-Type'] = "text/plain;\n\tcharset=\"".$this->char_set."\""; + #$extra_headers[2]['Content-Transfer-Encoding'] = "quoted-printable"; + + $extra_headers[2]['notencode'] = "\n\n".$this->pt_message."\n\n"; + + reset($extra_headers); + + foreach( $extra_headers as $subset => $the_header ) + { + foreach( $the_header as $k => $v ) + { + if( $k == 'notencode' ) + { + $extra_headers_rfc .= $v; + } + else + { + $v = $this->encode_headers( array( 'v' => $v ) ); + + $extra_headers_rfc .= $k.': '.$v['v'].$this->header_eol; + } + } + } + + $this->message = ""; + } + else + { + $this->mail_headers['Content-type'] = 'text/plain; charset="'.$this->char_set.'"'; + } + } + + $this->encode_headers(); + + foreach( $this->mail_headers as $k => $v ) + { + $this->rfc_headers .= $k.": ".$v.$this->header_eol; + } + + //----------------------------------------- + // Attachments extra? + //----------------------------------------- + + if( $extra_headers_rfc ) + { + $this->rfc_headers .= $extra_headers_rfc; + } } /*-------------------------------------------------------------------------*/ @@ -404,12 +488,12 @@ class class_email { $multipart = ""; - for ( $i = sizeof($this->parts) - 1 ; $i >= 0 ; $i-- ) + for ($i = sizeof($this->parts) - 1 ; $i >= 0 ; $i--) { - $multipart .= "\n--" . $this->boundry . "\n" . $this->_encode_attachment($this->parts[$i]); + $multipart .= $this->header_eol . $this->encode_attachment($this->parts[$i]) . "--" . $this->boundry; } - return $multipart; + return $multipart . "--\n"; } @@ -445,6 +529,13 @@ class class_email $this->build_headers(); + if( $this->mail_method != 'smtp' ) + { + $subject = $this->encode_headers( array( 'Subject' => $this->subject ) ); + + $this->subject = $subject['Subject']; + } + //----------------------------------------- // Lets go.. //----------------------------------------- @@ -457,12 +548,18 @@ class class_email if ($this->temp_dump == 1) { - $blah = $this->subject."\n------------\n".$this->mail_headers."\n\n".$this->message; + $blah = $this->subject."\n------------\n".$this->rfc_headers."\n\n".$this->message; - $pathy = str_replace( '//', '/', $this->root_path.'/_mail/'.date("M-j-Y,hi-A").str_replace( '@', '+', $this->to ).".php" ); - $fh = fopen ($pathy, 'w'); - fputs ($fh, $blah, strlen($blah) ); - fclose($fh); + if( !is_dir( $this->root_path . '/_mail' ) ) + { + @mkdir( $this->root_path . '/_mail' ); + @chmod( $this->root_path . '/_mail', 0777 ); + } + + $pathy = str_replace( '//', '/', $this->root_path . '/_mail/' . date("M-j-Y,hi-A") . str_replace( '@', '+', $this->to ) . '.php' ); + $fh = @fopen( $pathy, 'w' ); + @fputs( $fh, $blah, strlen($blah) ); + @fclose( $fh ); } else { @@ -472,10 +569,10 @@ class class_email if ($this->mail_method != 'smtp') { - if ( ! @mail( $this->to, $this->subject, $this->message, $this->mail_headers, $this->extra_opts ) ) + if ( ! @mail( $this->to, $this->subject, $this->message, $this->rfc_headers, $this->extra_opts ) ) { # Try without args for safe mode peeps - if ( ! @mail( $this->to, $this->subject, $this->message, $this->mail_headers ) ) + if ( ! @mail( $this->to, $this->subject, $this->message, $this->rfc_headers ) ) { $this->fatal_error("Could not send the email", "Failed at 'mail' command"); } @@ -498,9 +595,11 @@ class class_email $this->to = ""; $this->from = ""; + $this->from_display = ""; $this->message = ""; + $this->pt_message = ""; $this->subject = ""; - $this->mail_headers = ""; + $this->mail_headers = array(); } /*-------------------------------------------------------------------------*/ @@ -627,8 +726,13 @@ class class_email if ( $this->smtp_code != 250 ) { - $this->smtp_error("HELO"); - return; + $this->smtp_send_cmd("EHLO ".$this->smtp_host); + + if ( $this->smtp_code != 250 ) + { + $this->smtp_error("HELO,EHLO"); + return; + } } //----------------------------------------- @@ -705,7 +809,7 @@ class class_email { if ( $this->wrap_brackets ) { - $this->smtp_send_cmd("RCPT TO:<".$to_email.">"); + $this->smtp_send_cmd("RCPT TO:<".$to_email.">"); } else { @@ -783,6 +887,7 @@ class class_email function fatal_error($msg, $help="") { + $this->error_msg = $msg; $this->error_help = $help; @@ -800,14 +905,70 @@ class class_email * @return string Processed data */ - function _encode_attachment($part) + function encode_attachment($part) { $msg = chunk_split(base64_encode($part['data'])); - return "Content-Type: ".$part['ctype']. ($part['name'] ? ";\n\tname =\"".$part['name']."\"" : ""). - "\nContent-Transfer-Encoding: ".$part['encode']."\nContent-Disposition: attachment;\n\tfilename=\"".$part['name']."\"\n\n".$msg."\n"; + $headers = array(); + $header_str = ""; + + $headers['Content-Type'] = $part['ctype']. ($part['name'] ? "; name =\"".$part['name']."\"" : ""); + $headers['Content-Transfer-Encoding'] = $part['encode']; + $headers['Content-Disposition'] = "attachment; filename=\"".$part['name']."\""; + $headers = $this->encode_headers( $headers ); + + foreach( $headers as $k => $v ) + { + $header_str .= $k.': '.$v.$this->header_eol; + } + + $header_str .= "\n\n".$msg."\n"; + + return $header_str; } + + /*-------------------------------------------------------------------------*/ + // ENCODE HEADERS - RFC2047 + /*-------------------------------------------------------------------------*/ + + function encode_headers( $headers = array() ) + { + $enc_headers = count($headers) ? $headers : $this->mail_headers; + + foreach( $enc_headers as $header => $value) + { + preg_match_all( '/(\w*[\x80-\xFF]+\w*)/', $value, $matches ); + + foreach ($matches[1] as $value) + { + if( $header == 'From' ) + { + // Either sendmail or the email servers don't like 'From' encoded...let's remove the board name + // and just move along, as email address cannot contain nasty characters themselves + + $this->mail_headers['From'] = $this->from; + + continue 2; + } + + $replacement = preg_replace_callback( '/([\x80-\xFF])/', create_function( '$match', 'return "=" . strtoupper( dechex( ord( "$match[1]" ) ) );' ), $value ); + + $value = str_replace( $value, '=?' . $this->char_set . '?Q?' . $replacement . '?=', $value ); + } + + if( !count($headers) ) + { + $this->mail_headers[ $header ] = $value; + } + else + { + $enc_headers[ $header ] = $value; + } + } + + return $enc_headers; + } } diff --git a/upload/ips_kernel/class_file_management.php b/upload/ips_kernel/class_file_management.php index 05893e49..3e387372 100644 --- a/upload/ips_kernel/class_file_management.php +++ b/upload/ips_kernel/class_file_management.php @@ -2,22 +2,15 @@ /* +--------------------------------------------------------------------------- -| Invision Power Board 2.2.2 -| ============================================= +| Invision Power Board +| ======================================== | by Matthew Mecham -| (c) 2001 - 2006 Invision Power Services, Inc. +| (c) 2004 Invision Power Services | http://www.invisionpower.com -| ============================================= -| Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:55 PM -| Release: e3790216629e5a2aaf37070b32237f06 -| Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +| ======================================== +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +| INVISION POWER BOARD IS NOT FREE SOFTWARE! +| http://www.invisionboard.com +--------------------------------------------------------------------------- | | > File Management Functions @@ -145,7 +138,7 @@ class class_file_management if ( ! file_exists( $file_location ) ) { - $this->errors[] = "Файл '$file_location' не существует, проверьте путь."; + $this->errors[] = "File '$file_location' does not exist, please check the path."; return; } @@ -228,7 +221,7 @@ class class_file_management if ( ! $url_parts['host'] ) { - $this->errors[] = "Не найден хост в заданном URL '$file_location'!"; + $this->errors[] = "No host found in the URL '$file_location'!"; return FALSE; } @@ -237,7 +230,7 @@ class class_file_management //------------------------------- $host = $url_parts['host']; - $port = ( isset($url_parts['port']) ) ? $url_parts['port'] : 80; + $port = ( isset($url_parts['port']) ) ? $url_parts['port'] : ( $url_parts['scheme'] == 'https' ? 443 : 80 ); //------------------------------- // Tidy up path @@ -261,9 +254,9 @@ class class_file_management // Open connection //------------------------------- - if ( ! $fp = @fsockopen( $host, $port, $errno, $errstr, $fsocket_timeout ) ) + if ( ! $fp = @fsockopen( $port == 443 ? "ssl://" . $host : $host, $port, $errno, $errstr, $fsocket_timeout ) ) { - $this->errors[] = "Соединение прервано удаленным сервером $host"; + $this->errors[] = "Could not establish a connection with $host"; return FALSE; } @@ -278,7 +271,7 @@ class class_file_management if ( ! fputs( $fp, "GET $path HTTP/1.0\r\nHost:$host\r\nConnection: Keep-Alive\r\n{$final_carriage}" ) ) { - $this->errors[] = "Не возможно отправить запрос удаленному серверу $host!"; + $this->errors[] = "Unable to send request to $host!"; return FALSE; } @@ -290,7 +283,7 @@ class class_file_management if ( ! fputs( $fp, $header ) ) { - $this->errors[] = "Не удалось авторизоваться!"; + $this->errors[] = "Authorization Failed!"; return FALSE; } } @@ -375,7 +368,7 @@ class class_file_management if ( ! is_dir( $from_path ) ) { - $this->errors[] = "Не возможно найти директорию '$from_path'"; + $this->errors[] = "Could not locate directory '$from_path'"; return FALSE; } @@ -383,7 +376,7 @@ class class_file_management { if ( ! @mkdir( $to_path, $mode ) ) { - $this->errors[] = "Не возможно создать директорию '$to_path' проверьте права доступа (CHMOD) и попробуйте снова"; + $this->errors[] = "Could not create directory '$to_path' please check the CHMOD permissions and re-try"; return FALSE; } else diff --git a/upload/ips_kernel/class_image.php b/upload/ips_kernel/class_image.php index f2b4dc92..56a1bdc4 100644 --- a/upload/ips_kernel/class_image.php +++ b/upload/ips_kernel/class_image.php @@ -2,22 +2,14 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:55 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +--------------------------------------------------------------------------- | > $Date: 2005-10-10 14:03:20 +0100 (Mon, 10 Oct 2005) $ | > $Revision: 22 $ @@ -407,7 +399,7 @@ class class_image { $thumb = @imagecreatetruecolor( $im['img_width'], $im['img_height'] ); - if( $this->image_type == 'png' ) + if( $this->image_type == 'png' OR $this->image_type == 'gif' ) { @imagealphablending( $thumb, FALSE ); @imagesavealpha( $thumb, TRUE ); @@ -434,7 +426,7 @@ class class_image $this->out_file_name = preg_replace( "/^(.*)\..+?$/", "\\1", $this->in_file_name ) . '_thumb'; } - if ( function_exists( 'imagepng' ) AND $this->image_type == 'png' ) + if ( function_exists( 'imagepng' ) AND ($this->image_type == 'png' OR $this->image_type == 'gif') ) { $this->file_extension = 'png'; @imagepng( $thumb, $this->out_file_dir."/".$this->out_file_name.'.png' ); @@ -513,6 +505,7 @@ class class_image { if ( $this->out_type == 'file' ) { + //$return['thumb_location'] = $this->in_file_name; $return['thumb_width'] = $img_size[0]; $return['thumb_height'] = $img_size[1]; $return['original_width'] = $img_size[0]; diff --git a/upload/ips_kernel/class_ipsclass_core.php b/upload/ips_kernel/class_ipsclass_core.php index be8e9e8a..8ae4aca9 100644 --- a/upload/ips_kernel/class_ipsclass_core.php +++ b/upload/ips_kernel/class_ipsclass_core.php @@ -2,22 +2,11 @@ /* +-------------------------------------------------------------------------- | Invision Power Services Core Class -| Invision Power Board 2.2.2 | ============================================= | by Matthew Mecham, Brandon Farber, Josh Williams, Remco Wilting | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= -| Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:55 PM -| Release: e3790216629e5a2aaf37070b32237f06 -| Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +--------------------------------------------------------------------------- | > $Date: 2006-12-06 15:03:36 +0000 (Wed, 06 Dec 2006) $ | > $Revision: 774 $ @@ -155,7 +144,7 @@ class class_ipsclass_core // Make sure we take a valid IP address //----------------------------------------- - if ( ( ! $this->ip_address OR $this->ip_address == '...' ) AND ! isset( $_SERVER['SHELL'] ) ) + if ( ( ! $this->ip_address OR $this->ip_address == '...' ) AND ! isset( $_SERVER['SHELL'] ) AND $_SERVER['SESSIONNAME'] != 'Console' ) { print "Could not determine your IP address"; exit(); diff --git a/upload/ips_kernel/class_profiling.php b/upload/ips_kernel/class_profiling.php new file mode 100644 index 00000000..77419e5d --- /dev/null +++ b/upload/ips_kernel/class_profiling.php @@ -0,0 +1,396 @@ + Application Profiling +| > Module written by Brandon Farber +| > Date started: Monday 28th February 2005 16:46 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + +/** +* IPS Kernel Pages: Application Profiling Layer [PHP5] +* +* @package IPS_KERNEL +* @subpackage ApplicationProfiling +* @author Brandon Farber +* @copyright Invision Power Services, Inc. +* @version 1.0 +*/ + +/** + * Gateway for application profiling + * + * $a = new class_profiling(); + * $a->output_results( true, false ); + */ + +//----------------------------------------- +// Define KERNEL_PATH if not +// defined - i.e. installation +//----------------------------------------- + +if ( ! defined('KERNEL_PATH') ) +{ + if( defined('INS_KERNEL_PATH') ) + { + define( 'KERNEL_PATH', INS_KERNEL_PATH ); + } + else + { + define( 'KERNEL_PATH', str_replace( "//", "/", str_replace( "\\", "/", dirname( __FILE__ ) ) ) . "/" ); + } +} + +//----------------------------------------- +// Define ROOT_PATH if not +//----------------------------------------- + +if ( ! defined('ROOT_PATH') ) +{ + $path = str_replace( "//", "/", str_replace( "\\", "/", dirname( __FILE__ ) ) ); + $path_bits = explode( "/", $path ); + array_pop( $path_bits ); + + define( 'ROOT_PATH', implode( "/", $path_bits ) . "/" ); +} + + +class class_profiling +{ + var $start_time = array(); + var $end_time = array(); + var $running_time = array(); + + var $start_memory = array(); + var $end_memory = array(); + + var $descriptions = array(); + + var $timer_stack = array(); + var $internal_count = array(); + var $stack_trace = null; + + var $cur_timer = null; + var $init_time = 0; + + var $init_memory = 0; + var $total_memory = 0; + var $peak_memory = 0; + + + function __construct( $start_apd = false ) + { + $this->start_time = array(); + $this->end_time = array(); + $this->running_time = array(); + + $this->start_memory = array(); + $this->end_memory = array(); + + $this->descriptions = array(); + + $this->timer_stack = array(); + $this->internal_count = array(); + $this->stack_trace = "Profiling Class Initialized\n"; + + $this->cur_timer = null; + $this->init_time = $this->get_micro_seconds(); + + $this->init_memory = $this->get_current_memory(); + $this->total_memory = $this->init_memory; + $this->peak_memory = $this->init_memory; + + if( $start_apd == true && function_exists( 'apd_set_pprof_trace' ) ) + { + apd_set_pprof_trace(); + } + + $this->start_session( 'Overall' ); + } + + + function start_session( $name, $desc='' ) + { + $x = array_push( $this->timer_stack, $this->cur_timer ); + + if( isset($this->timer_stack[ $x - 1 ]) ) + { + $this->_suspend_timer( $this->timer_stack[ $x - 1 ] ); + } + + $this->start_time[ $name ] = $this->get_micro_seconds(); + $this->start_memory[ $name ] = $this->get_current_memory(); + + $this->cur_timer = $name; + + $this->descriptions[ $name ] = $desc; + + if( array_key_exists( $name, $this->internal_count ) ) + { + $this->internal_count[ $name ]++; + } + else + { + $this->internal_count[ $name ] = 1; + } + + $this->stack_trace .= "Started Session '{$name}'\n"; + + $backtrace = debug_backtrace(); + + if( is_array($backtrace) AND count($backtrace) ) + { + $cnt = 0; + + foreach( array_reverse( $backtrace ) as $trace ) + { + $cnt++; + + $this->stack_trace .= "\t{$cnt}. Function '{$trace['function']}' in {$trace['file']} (line {$trace['line']})\n"; + } + } + } + + + function stop_session( $name ) + { + $this->end_time[ $name ] = $this->get_micro_seconds(); + $this->end_memory[ $name ] = $this->get_current_memory(); + + if( !array_key_exists( $name, $this->running_time ) ) + { + $this->running_time[ $name ] = $this->get_elapsed_time( $name ); + } + else + { + $this->running_time[ $name ] += $this->get_elapsed_time( $name ); + } + + $this->cur_timer = array_pop( $this->timer_stack ); + + $this->stack_trace .= "Stopped Session '{$name}'\n"; + + if( isset($this->cur_timer) ) + { + $this->_resume_timer( $this->cur_timer ); + } + } + + + + function get_elapsed_time( $name ) + { + if( !array_key_exists( $name, $this->start_time ) ) + { + return 0; + } + + if( array_key_exists( $name, $this->end_time ) ) + { + return ( $this->end_time[ $name ] - $this->start_time[ $name ] ); + } + else + { + return( $this->get_micro_seconds() - $this->start_time[ $name ] ); + } + } + + + function get_total_time() + { + return ( $this->get_micro_seconds() - $this->init_time ); + } + + + function get_peak_memory() + { + if( function_exists( 'memory_get_peak_usage' ) ) + { + $this->peak_memory = memory_get_peak_usage(); + } + else + { + if( count( $this->start_memory ) ) + { + foreach( $this->start_memory as $mem_entry ) + { + if( $mem_entry > $this->peak_memory ) + { + $this->peak_memory = $mem_entry; + } + } + } + + if( count( $this->end_memory ) ) + { + foreach( $this->end_memory as $mem_entry ) + { + if( $mem_entry > $this->peak_memory ) + { + $this->peak_memory = $mem_entry; + } + } + } + } + + return $this->peak_memory; + } + + + function _resume_timer( $name ) + { + $this->stack_trace .= "Resumed Session '{$name}'\n"; + + $this->start_time[ $name ] = $this->get_micro_seconds(); + } + + + function _suspend_timer( $name ) + { + $this->stack_trace .= "Suspended Session '{$name}'\n"; + + $this->end_time[ $name ] = $this->get_micro_seconds(); + + if( !array_key_exists( $name, $this->running_time ) ) + { + $this->running_time[ $name ] = $this->get_elapsed_time( $name ); + } + else + { + $this->running_time[ $name ] += $this->get_elapsed_time( $name ); + } + } + + + + function get_micro_seconds() + { + $tmp = explode( " ", microtime() ); + + return ( $tmp[0] + $tmp[1] ); + } + + + function get_current_memory() + { + if( ! function_exists( 'memory_get_usage' ) ) + { + return 0; + } + else + { + return memory_get_usage(); + } + } + + + function format_memory( $val=0 ) + { + if( $val >= 1048576 ) + { + return ( round( ( $val / 1048576 * 100 ), 2 ) / 100 ) . 'MB'; + } + else if( $val >= 1024 ) + { + return ( round( ( $val / 1024 * 100 ), 2 ) / 100 ) . 'KB'; + } + else + { + return intval( $val ) . 'b'; + } + } + + + function output_results( $display_backtrace=true, $log=false ) + { + $this->stop_session( 'Overall' ); + $this->total_memory = $this->get_current_memory(); + + $timed_total = 0; + $percent_total = 0; + $output = null; + + $overall_time = $this->get_total_time(); + $overall_memory = $this->get_peak_memory(); + + if( $log == false ) + { + print "
\n";
+	    }
+	    
+	    ksort($this->descriptions);
+	    
+	    $output  = "============================================================================\n";
+	    $output .= "                              PROFILER OUTPUT\n";
+	    $output .= "============================================================================\n";
+	    $output .= "Calls			Time	Memory		Routine\n";
+	    $output .= "----------------------------------------------------------------------------\n";
+	    
+	    foreach( $this->descriptions as $key => $val )
+	    {
+		    $this_total		= $this->running_time[$key];
+		    $this_count		= $this->internal_count[$key];
+		    $this_percent	= ( $this_total / $overall_time ) * 100;
+		    $this_memory	= $this->format_memory( $this->end_memory[ $key ] - $this->start_memory[ $key ] );
+		    
+		    $timed_total	+= $this_total;
+		    $percent_total	+= $this_percent;
+		    $mem_total		+= $this->end_memory[ $key ] - $this->start_memory[ $key ];
+		    
+		    $output .= sprintf( "%3d	%3.4f ms (%3.2f %%)  %s	 %s\n", $this_count, $this_total * 1000, $this_percent, $this_memory, $key);
+	    }
+	    
+	    $output .= "\n";
+	    
+	    $missed_time	= $overall_time - $timed_total;
+	    $missed_percent	= ( $missed_time / $overall_time ) * 100;
+	    $percent_total	+= $missed_percent;
+	    $missed_memory	= $this->format_memory( $this->total_memory - $this->init_memory - $mem_total );
+	    
+		$output .= sprintf( "   	 %3.4f ms (%3.2f %%)  %s  %s\n", $missed_time * 1000, $missed_percent, $missed_memory, 'Leaked' );
+		
+		$output .= "============================================================================\n";
+		$output .= "Start Memory: " . $this->format_memory( $this->init_memory ) . "\n";
+		$output .= "Total Memory: " . $this->format_memory( $this->total_memory ) . "\n";
+		$output .= "Peak Memory:  " . $this->format_memory( $this->peak_memory ) . "\n";
+		$output .= "============================================================================\n";
+		
+		$output .= sprintf( "       %3.4f ms (%3.2f %%)  %s  %s\n", $timed_total * 1000, $pecent_total, $this->format_memory( $this->total_memory ), 'OVERALL TIME' );
+
+		$output .= "============================================================================\n";
+
+		if( $display_backtrace == true )
+		{
+			$output .= "Backtrace\n";
+			$output .= $this->stack_trace;
+		}
+		
+		if( $log == false )
+		{
+			print $output . '
'; + } + else + { + return $output; + } + } + + +} + + +?> \ No newline at end of file diff --git a/upload/ips_kernel/class_resources_reader.php b/upload/ips_kernel/class_resources_reader.php deleted file mode 100644 index 28f5d937..00000000 --- a/upload/ips_kernel/class_resources_reader.php +++ /dev/null @@ -1,553 +0,0 @@ - $Date: 2005-10-10 14:03:20 +0100 (Mon, 10 Oct 2005) $ -| > $Revision: 22 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > XML ARCHIVE CLASS: Handling methods (KERNEL) -| > Module written by Matt Mecham -| > Date started: 25th February -| -| > Module Version Number: 1.0.0 -+-------------------------------------------------------------------------- -*/ - -/** -* IPS Kernel Pages: XMLArchive -* -* This class contains all generic functions to handle -* the creation and extraction of XML Archive documents -* This is a proprietry technology of IPS, Inc. -* -* Example Usage: -* -* -* $xmlarchive = new class_xmlarchive(); -* -* $xmlarchive->xml_add_file( 'some/dir/filename.html' ); -* $xmlarchive->xml_add_file_contents( $data, 'some/dir/filename.html' ); -* -* $xmlarchive->xml_add_file( 'some/dir/filename.html', array( 'custom_tag' => $value ) ); -* $xmlarchive->xml_add_file_contents( $data, 'some/dir/filename.html', array( 'custom_tag' => $value ) ); -* -* $xmlarchive->xml_add_directory( 'some/dir' ); -* $xmlarchive->xml_create_archive(); -* -* $xmlarchive->xml_save( 'filename.xml' ); -* $xmlarchive->xml_save_gzip( 'filename.xml.gz' ); -* -* $contents = $xmlarchive->xml_get_contents(); -* -* $xmlarchive->xml_read_archive( 'filename.xml' ); -* $xmlarchive->xml_read_archive_data( $xml_data ); -* -* ERROR NUMBERS: -*
    -*
  • 001: No such directory or file -*
  • 002: Not a directory -*
  • 003: Could not write archive to disk -*
  • 004: No XML document to save -*
  • 005: Could not load xml data -*
-* -* @package IPS_KERNEL -* @author Matt Mecham -* @copyright Invision Power Services, Inc. -* @version 2.1 -*/ - -/** -* XMLArchive Creation and Extraction Functions -* -* Methods and functions for handling XMLArchive documents -* -* @package IPS_KERNEL -* @author Matt Mecham -* @version 2.1 -*/ - -class class_resources_reader -{ - /** - * XML content - * - * @var string - */ - var $xml = ""; - - /** - * File array - * - * @var artay - */ - var $file_array = array(); - - /** - * Error number - * - * @var integer - */ - var $error_number = 0; - - /** - * Error message - * - * @var string - */ - var $error_message = ""; - - /** - * Work files - * - * @var array - */ - var $workfiles = array(); - - /** - * Non binary file extensions - * - * @var string - */ - var $non_binary = 'txt htm html xml css js cgi php php3'; - - /** - * Strip path - * - * @var string - */ - var $strip_path = ""; - - /** - * Root path - * - * @var string - */ - var $root_path = ""; - - /*-------------------------------------------------------------------------*/ - // CONSTRUCTOR - /*-------------------------------------------------------------------------*/ - - function class_resources_reader( $root_path="" ) - { - $tmp = ""; - $this->root_path = $root_path; - - //----------------------------------- - // Get the XML class - //----------------------------------- - - require_once( $this->root_path.'class_xml.php' ); - - $this->xml = new class_xml(); - - $this->error_number = 0; - } - - /*-------------------------------------------------------------------------*/ - // READ Archive from disk - /*-------------------------------------------------------------------------*/ - - /** - * Read an XML document from disk - * - * @param string File name - * @return void - */ - function xml_read_archive( $filename ) - { - if ( file_exists( $filename ) ) - { - if ( strstr( $filename, '.gz' ) ) - { - if ( $FH = @gzopen( $filename, 'r' ) ) - { - $data = @gzread( $FH, $filename ); - @gzclose( $FH ); - } - else - { - $this->error_number = '005'; - } - } - else - { - if ( $FH = @fopen( $filename, 'r' ) ) - { - $data = @fread( $FH, filesize( $filename ) ); - @fclose( $FH ); - } - else - { - $this->error_number = '005'; - } - } - - $this->xml_read_archive_data( $data ); - } - else - { - $this->error_number = '001'; - } - } - - /*-------------------------------------------------------------------------*/ - // READ Archive from data - /*-------------------------------------------------------------------------*/ - - /** - * Read an XML document from passed data - * - * @param string Raw XML Data - * @return void - */ - function xml_read_archive_data( $data ) - { - if ( $data ) - { - $this->xml->xml_parse_document( $data ); - - if ( is_array( $this->xml->xml_array ) ) - { - $this->file_array = array(); - - foreach( $this->xml->xml_array['xmlarchive']['fileset']['file'] as $entry ) - { - $this_array = array(); - - if( is_array( $entry ) ) - { - foreach ( $entry as $k => $v ) - { - if ( $k == 'content' ) - { - $v['VALUE'] = base64_decode( preg_replace( "/\s/", "", $entry['content']['VALUE'] ) ); - } - - $this_array[ $k ] = $v['VALUE']; - } - - $this->file_array[] = $this_array; - } - } - } - } - } - - /*-------------------------------------------------------------------------*/ - // SAVE XML to disk - /*-------------------------------------------------------------------------*/ - - /** - * Write out the XML document as a GZIP file - * - * @param string FIlename - * @return void - */ - function xml_save_gzip( $filename ) - { - if ( $this->xml->xml_document ) - { - if ( $FH = @gzopen( $filename, 'wb' ) ) - { - @gzwrite( $FH, $this->xml->xml_document ); - @gzclose( $FH ); - } - else - { - $this->error_number = '003'; - } - } - else - { - $this->error_number = '004'; - } - } - - /*-------------------------------------------------------------------------*/ - // SAVE XML to disk - /*-------------------------------------------------------------------------*/ - - /** - * Write out the XML document as a normal file - * - * @param string FIlename - * @return void - */ - function xml_save( $filename ) - { - if ( $this->xml->xml_document ) - { - if ( $FH = @fopen( $filename, 'wb' ) ) - { - @fwrite( $FH, $this->xml->xml_document ); - @fclose( $FH ); - } - else - { - $this->error_number = '003'; - } - } - else - { - $this->error_number = '004'; - } - } - - /*-------------------------------------------------------------------------*/ - // XML get contents - /*-------------------------------------------------------------------------*/ - - /** - * Method of getting XML document from this class - * - * @return string XML document - */ - function xml_get_contents() - { - return $this->xml->xml_document; - } - - /*-------------------------------------------------------------------------*/ - // Create the XML archive - /*-------------------------------------------------------------------------*/ - - /** - * Create the XML archive - * - * @return void - */ - function xml_create_archive() - { - $this->xml->xml_set_root( 'xmlarchive', array( 'generator' => 'IPB', 'created' => time() ) ); - $this->xml->xml_add_group( 'fileset' ); - - $entry = array(); - - foreach( $this->file_array as $f ) - { - $content = array(); - - foreach ( $f as $k => $v ) - { - if ( $k == 'content' ) - { - $v = chunk_split(base64_encode($v)); - } - - $content[] = $this->xml->xml_build_simple_tag( $k, $v ); - } - - $entry[] = $this->xml->xml_build_entry( 'file', $content ); - } - - $this->xml->xml_add_entry_to_group( 'fileset', $entry ); - - $this->xml->xml_format_document(); - } - - /*-------------------------------------------------------------------------*/ - // Add directory contents - /*-------------------------------------------------------------------------*/ - - function xml_add_directory( $dir ) - { - $this->error_number = ""; - - //----------------------------------- - // Got dir? - //----------------------------------- - - if ( ! is_dir($dir) ) - { - $this->error_number = '001'; - return FALSE; - } - - //----------------------------------- - // Populate this->workfiles - //----------------------------------- - - $this->workfiles = array(); - $this->_xml_get_dir_contents( $dir ); - - //----------------------------------- - // Add them into the file array - //----------------------------------- - - foreach ( $this->workfiles as $f ) - { - $this->xml_add_file( $f ); - } - - $this->workfiles = array(); - - } - - /*-------------------------------------------------------------------------*/ - // Add File (interface to file_contents) - /*-------------------------------------------------------------------------*/ - - function xml_add_file( $filename, $extra_tags=array() ) - { - //----------------------------------- - // Kill OS X hidden files - //----------------------------------- - - if ( preg_match( "/\.ds_store/i", $filename ) ) - { - return; - } - - if ( file_exists( $filename ) ) - { - if ( $FH = @fopen( $filename, 'rb' ) ) - { - $data = @fread( $FH, filesize( $filename ) ); - @fclose( $FH ); - } - - $this->xml_add_file_contents( $data, $filename, $extra_tags ); - } - else - { - $this->error_number = '001'; - } - } - - - /*-------------------------------------------------------------------------*/ - // Add File Contents - /*-------------------------------------------------------------------------*/ - - function xml_add_file_contents( $data, $filename, $extra_tags=array() ) - { - $ext = preg_replace( "/.*\.(.+?)$/", "\\1", $filename ); - - $binary = 1; - - //----------------------------------- - // ASCII? - //----------------------------------- - - if ( strstr( ' '.$this->non_binary.' ', ' '.$ext.' ' ) ) - { - $binary = 0; - } - - //----------------------------------- - // Get dir / filename - //----------------------------------- - - $dir_path = array(); - $dir_path = explode( "/", $filename ); - - if ( count( $dir_path ) ) - { - $real_filename = array_pop( $dir_path ); - } - - $real_filename = $real_filename ? $real_filename : $filename; - - $path = implode( "/", $dir_path ); - - if ( $this->strip_path ) - { - $path = preg_replace( "#". preg_quote($this->strip_path, '#')."/?#", "", $path ); - } - - $this_array = array( - 'filename' => $real_filename, - 'content' => $data, - 'path' => $path, - 'binary' => $binary - ); - - foreach( $extra_tags as $k => $v ) - { - if ( $k and ! in_array( $k, array_keys($this_array) ) ) - { - $this_array[ $k ] = $v; - } - } - - $this->file_array[] = $this_array; - } - - /*-------------------------------------------------------------------------*/ - // INTERNAL: Get directory contents - /*-------------------------------------------------------------------------*/ - - function _xml_get_dir_contents( $dir ) - { - $dir = preg_replace( "#/$#", "", $dir ); - - if ( file_exists($dir) ) - { - if ( is_dir($dir) ) - { - $handle = opendir($dir); - - while (($filename = readdir($handle)) !== false) - { - if (($filename != ".") && ($filename != "..")) - { - if ( is_dir( $dir."/".$filename ) ) - { - //----------------------------------- - // Recurse - //----------------------------------- - - $this->_xml_get_dir_contents($dir."/".$filename); - } - else - { - //----------------------------------- - // Add file to list - //----------------------------------- - - $this->workfiles[] = $dir."/".$filename; - } - } - } - - closedir($handle); - } - else - { - $this->error_number = '002'; - return FALSE; - } - } - else - { - $this->error_number = '001'; - return; - } - } - -} - - - -?> \ No newline at end of file diff --git a/upload/ips_kernel/class_rss.php b/upload/ips_kernel/class_rss.php index 8765a561..8285d1fa 100644 --- a/upload/ips_kernel/class_rss.php +++ b/upload/ips_kernel/class_rss.php @@ -1,23 +1,16 @@ RSS FUNCTIONS (Simple, light parser) @@ -33,33 +26,33 @@ * EXAMPLE: (CREATING AN RSS FEED) * * $rss = new class_rss(); -* +* * $channel_id = $rss->create_add_channel( array( 'title' => 'My RSS Feed', * 'link' => 'http://www.mydomain.com/rss/', * 'description' => 'The latest news from my ', * 'pubDate' => $rss->rss_unix_to_rfc( time() ), * 'webMaster' => 'me@mydomain.com (Matt Mecham)' ) ); -* +* * $rss->create_add_item( $channel_id, array( 'title' => 'Hello World!', * 'link' => 'http://www.mydomain.com/blog/helloworld.html', * 'description' => 'The first ever post!', * 'content' => 'Hello world! This is the blog content', * 'pubDate' => $rss->rss_unix_to_rfc( time() ) ) ); -* +* * $rss->create_add_item( $channel_id, array( 'title' => 'Second Blog!!', * 'link' => 'http://www.mydomain.com/blog/secondblog.html', * 'description' => 'The second ever post!', * 'content' => 'More content', * 'pubDate' => $rss->rss_unix_to_rfc( time() ) ) ); -* +* * $rss->create_add_image( $channel_id, array( 'title' => 'My Image', * 'url' => 'http://mydomain.com/blog/image.gif', * 'width' => '110', * 'height' => '400', * 'description' => 'Image title text' ) ); -* +* * $rss->rss_create_document(); -* +* * print $rss->rss_document; * * EXAMPLE: (READ AN RSS FEED) @@ -72,14 +65,14 @@ * { * print "Title: ".$channel_data['title']."
"; * print "Description; ".$channel_data['description']."
"; -* +* * foreach( $rss->rss_items[ $channel_id ] as $item_id => $item_data ) * { * print "Item title: ".$item_data['title']."
"; * print "Item URL: ".$item_data['link']."
"; * print $item_data['content']."
"; * } -* +* * print $rss->rss_format_image( $rss->rss_images[ $channel_id ] ); * } * @@ -115,14 +108,14 @@ class class_rss * @var object */ var $ipsclass; - + /** * Class file management object * * @var object */ var $class_file_management; - + /** * DOC type * @@ -130,25 +123,25 @@ class class_rss */ var $doc_type = 'UTF-8'; var $orig_doc_type = ""; - + /** * Error capture * * @var array */ var $errors = array(); - + /** * Use sockets flag * * @var integer boolean */ var $use_sockets = 0; - + /**#@+ * Work item * - * @var integer + * @var integer */ var $in_item = 0; var $in_image = 0; @@ -159,29 +152,29 @@ class class_rss var $cur_channel = 0; var $set_ttl = 60; /**#@-*/ - + /** * Dunno... should find out * * @var string */ var $tag = ""; - + /**#@+ * RSS Items * - * @var array + * @var array */ var $rss_items = array(); var $rss_headers = array(); var $rss_images = array(); var $rss_tag_names = array(); /**#@-*/ - + /**#@+ * RSS Parse Items * - * @var string + * @var string */ var $rss_title; var $rss_description; @@ -192,11 +185,11 @@ class class_rss var $rss_category; var $rss_guid; /**#@-*/ - + /**#@+ * RSS Parse Images * - * @var string + * @var string */ var $rss_img_url; var $rss_img_title; @@ -205,11 +198,11 @@ class class_rss var $rss_img_height; var $rss_img_desc; /**#@-*/ - + /**#@+ * RSS Channel items * - * @var string + * @var string */ var $rss_chan_title; var $rss_chan_link; @@ -218,51 +211,51 @@ class class_rss var $rss_chan_lang; var $rss_document; /**#@-*/ - + /**#@+ * Create: Channels * - * @var array + * @var array */ var $channels = array(); var $items = array(); var $channel_images = array(); /**#@-*/ - + /**#@+ * Set Authentication * - * @var strings + * @var strings */ var $auth_req = 0; var $auth_user; var $auth_pass; /**#@-*/ - + /** * Convert char set * * @var int Boolean */ var $convert_charset = 0; - + var $collapse_newlines = 0; - + /** * Destination charset * * @var int Boolean */ var $destination_charset = 'UTF-8'; - + /** * Feed char set * * @var int Boolean */ var $feed_charset = 'UTF-8'; - - + + /*-------------------------------------------------------------------------*/ // Constructor /*-------------------------------------------------------------------------*/ @@ -292,11 +285,11 @@ class class_rss 'HEIGHT' => 'HEIGHT', ); } - + /*-------------------------------------------------------------------------*/ // Create RSS 2.0 document /*-------------------------------------------------------------------------*/ - + /** * Create the RSS document * @@ -306,113 +299,113 @@ class class_rss { if ( ! count( $this->channels ) ) { - $this->errors[] = "Нет каналов для RSS"; + $this->errors[] = "No channels defined"; } - + $this->rss_document = 'doc_type.'" ?'.'>'."\n"; $this->rss_document .= ''."\n"; - + //------------------------------- // Add channels //------------------------------- - + foreach( $this->channels as $idx => $channel ) { $tmp_data = ""; $had_ttl = 0; - + //------------------------------- // Add channel data //------------------------------- - + foreach( $channel as $tag => $data ) { if ( strtolower($tag) == 'ttl' ) { $had_ttl = 1; } - + $tmp_data .= "\t<" . $tag . ">" . $this->_xml_encode_string($data) . "\n"; } - + //------------------------------- // Added TTL? //------------------------------- - + if ( ! $had_ttl ) { $tmp_data .= "\t" . intval($this->set_ttl) . "\n"; } - + //------------------------------- // Got image? //------------------------------- - + if ( isset($this->channel_images[ $idx ]) AND is_array( $this->channel_images[ $idx ] ) AND count( $this->channel_images[ $idx ] ) ) { foreach( $this->channel_images[ $idx ] as $image ) { $tmp_data .= "\t\n"; - + foreach( $image as $tag => $data ) { $tmp_data .= "\t\t<" . $tag . ">" . $this->_xml_encode_string($data) . "\n"; } - + $tmp_data .= "\t\n"; } } - + //------------------------------- // Add item data //------------------------------- - + if ( is_array( $this->items[ $idx ] ) and count( $this->items[ $idx ] ) ) { foreach( $this->items[ $idx ] as $item ) { $tmp_data .= "\t\n"; - + foreach( $item as $tag => $data ) { $extra = ""; - + if ( $tag == 'guid' AND ! strstr( $data, 'http://' ) ) { $extra = ' isPermaLink="false"'; } - + $tmp_data .= "\t\t<" . $tag . $extra . ">" . $this->_xml_encode_string($data) . "\n"; } - + $tmp_data .= "\t\n"; } } - + //------------------------------- // Put it together... //------------------------------- - + $this->rss_document .= "\n"; $this->rss_document .= $tmp_data; $this->rss_document .= "\n"; } - + $this->rss_document .= ""; - + //------------------------------- // Clean up //------------------------------- - + $this->channels = array(); $this->items = array(); $this->channel_images = array(); } - + /*-------------------------------------------------------------------------*/ // Create RSS 2.0 document: Add channel /*-------------------------------------------------------------------------*/ - + /** * Create RSS 2.0 document: Add channel * @@ -424,22 +417,22 @@ class class_rss function create_add_channel( $in=array() ) { $this->channels[ $this->cur_channel ] = $in; - + //------------------------------- // Inc. and return //------------------------------- - + $return = $this->cur_channel; - + $this->cur_channel++; - + return $return; } - + /*-------------------------------------------------------------------------*/ // Create RSS 2.0 document: Add channel image item /*-------------------------------------------------------------------------*/ - + /** * Create RSS 2.0 document: Add channel image item * @@ -453,12 +446,12 @@ class class_rss { $this->channel_images[ $channel_id ][] = $in; } - + /*-------------------------------------------------------------------------*/ // Create RSS 2.0 document: Add item // title,description,pubDate,guid,content,category,link /*-------------------------------------------------------------------------*/ - + /** * Create RSS 2.0 document: Add item * @@ -472,11 +465,11 @@ class class_rss { $this->items[ $channel_id ][] = $in; } - + /*-------------------------------------------------------------------------*/ // Tool: Format an img /*-------------------------------------------------------------------------*/ - + /** * Create RSS 2.0 document: Format Image * @@ -488,66 +481,66 @@ class class_rss { if ( ! $in['url'] ) { - $this->errors[] = "Не возможно добавить изображение - не достаточно данных"; + $this->errors[] = "Cannot format image, not enough input"; } - + $title = ""; $alt = ""; $width = ""; $height = ""; - + if ( $in['description'] ) { - $title = " title='".$this-_xml_encode_attribute( $in['description'] )."' "; + $title = " title='".$this->_xml_encode_attribute( $in['description'] )."' "; } - + if ( $in['title'] ) { - $alt = " alt='".$this-_xml_encode_attribute( $in['title'] )."' "; + $alt = " alt='".$this->_xml_encode_attribute( $in['title'] )."' "; } - + if ( $in['width'] ) { if ( $in['width'] > 144 ) { $in['width'] = 144; } - - $width = " width='".$this-_xml_encode_attribute( $in['width'] )."' "; + + $width = " width='".$this->_xml_encode_attribute( $in['width'] )."' "; } - + if ( $in['height'] ) { if ( $in['height'] > 400 ) { $in['height'] = 400; } - - $height = " height='".$this-_xml_encode_attribute( $in['height'] )."' "; + + $height = " height='".$this->_xml_encode_attribute( $in['height'] )."' "; } - + //------------------------------- // Draw image //------------------------------- - + $img = ""; - + //------------------------------- // Linked? //------------------------------- - + if ( $in['link'] ) { $img = "".$img.""; } - + return $img; } - + /*-------------------------------------------------------------------------*/ // Tool: Format unixdate to rfc date /*-------------------------------------------------------------------------*/ - + /** * Create RSS 2.0 document: Format unixdate to rfc date * @@ -559,11 +552,11 @@ class class_rss { return date( 'r', $time ); } - + /*-------------------------------------------------------------------------*/ // Parse Feed (FROM URL) /*-------------------------------------------------------------------------*/ - + /** * Extract: Parse RSS document from URL * @@ -576,51 +569,51 @@ class class_rss //----------------------------------------- // Load file management class //----------------------------------------- - + require_once( IPS_CLASSES_PATH.'/class_file_management.php' ); $this->class_file_management = new class_file_management(); - + $this->class_file_management->use_sockets = $this->use_sockets; - + $this->class_file_management->auth_req = $this->auth_req; $this->class_file_management->auth_user = $this->auth_user; $this->class_file_management->auth_pass = $this->auth_pass; - + //------------------------------- // Reset arrays //------------------------------- - + $this->rss_items = array(); $this->rss_channels = array(); - + //------------------------------- // Get data //------------------------------- - + $data = $this->class_file_management->get_file_contents( $feed_location ); - + if ( count( $this->class_file_management->errors ) ) { $this->errors = $this->class_file_management->errors; @xml_parser_free($xml_parser); // Let's kill the parser before we return return FALSE; } - + if( preg_match( "#encoding=[\"'](\S+?)[\"']#si", $data, $matches ) ) { $this->orig_doc_type = $matches[1]; } - + if( preg_match( "#charset=(\S+?)#si", $data, $matches ) ) { $this->orig_doc_type = $matches[1]; } - + //----------------------------------------- // Charset conversion? //----------------------------------------- - + $supported_encodings = array( "utf-8", "iso-8859-1", "us-ascii" ); $this->doc_type = in_array( strtolower($this->doc_type), $supported_encodings ) ? $this->doc_type : "utf-8"; @@ -629,44 +622,41 @@ class class_rss if ( $this->feed_charset != $this->doc_type ) { $data = $this->ipsclass->txt_convert_charsets( $data, $this->feed_charset, $this->doc_type ); - + # Replace any char-set= data $data = preg_replace( "#encoding=[\"'](\S+?)[\"']#si", "encoding=\"".$this->doc_type."\"", $data ); $data = preg_replace( "#charset=(\S+?)#si" , "charset=".$this->doc_type , $data ); } } - + //------------------------------- // Generate XML parser //------------------------------- - $supported_encodings = array( "utf-8", "iso-8859-1", "us-ascii" ); - $this->doc_type = in_array( strtolower($this->doc_type), $supported_encodings ) ? $this->doc_type : "utf-8"; - $xml_parser = xml_parser_create( $this->doc_type ); xml_set_element_handler( $xml_parser, array( &$this, "parse_startElement" ), array( &$this, "parse_endElement") ); xml_set_character_data_handler($xml_parser, array( &$this, "parse_characterData" ) ); - + //------------------------------- // Parse data //------------------------------- - + if ( ! xml_parse( $xml_parser, $data ) ) { - $this->errors[] = sprintf("Ошибка в XML: %s в строке %d", xml_error_string( xml_get_error_code($xml_parser) ), xml_get_current_line_number($xml_parser) ); + $this->errors[] = sprintf("XML error: %s at line %d", xml_error_string( xml_get_error_code($xml_parser) ), xml_get_current_line_number($xml_parser) ); } - + //------------------------------- // Free memory used by XML parser //------------------------------- - + @xml_parser_free($xml_parser); } - + /*-------------------------------------------------------------------------*/ // Parse Feed (FROM FILE) /*-------------------------------------------------------------------------*/ - + /** * Extract: Parse RSS document from file * @@ -679,14 +669,14 @@ class class_rss //------------------------------- // Alias... //------------------------------- - + $this->rss_parse_feed_from_url( $feed_location ); } - + /*-------------------------------------------------------------------------*/ // Parse Feed (FROM DATA) /*-------------------------------------------------------------------------*/ - + /** * Extract: Parse RSS document from data * @@ -699,36 +689,36 @@ class class_rss //------------------------------- // Reset arrays //------------------------------- - + $this->rss_items = array(); $this->rss_channels = array(); $this->cur_channel = 0; - + //------------------------------- // Generate XML parser //------------------------------- - + $xml_parser = xml_parser_create( $this->doc_type ); xml_set_element_handler( $xml_parser, array( &$this, "parse_startElement" ), array( &$this, "parse_endElement") ); xml_set_character_data_handler($xml_parser, array( &$this, "parse_characterData" ) ); - + if ( ! xml_parse( $xml_parser, $data, TRUE ) ) { - $this->errors[] = sprintf("Ошибка в XML: %s в строке %d", xml_error_string( xml_get_error_code($xml_parser) ), xml_get_current_line_number($xml_parser) ); + $this->errors[] = sprintf("XML error: %s at line %d", xml_error_string( xml_get_error_code($xml_parser) ), xml_get_current_line_number($xml_parser) ); } - + //------------------------------- // Free memory used by XML parser //------------------------------- - + xml_parser_free($xml_parser); } - + /*-------------------------------------------------------------------------*/ // START ELEMENT /*-------------------------------------------------------------------------*/ - + /** * Extract: Call back function for element handler * @@ -743,31 +733,31 @@ class class_rss //------------------------------- // Just in case //------------------------------- - + $name = strtoupper($name); - + if ( $this->in_item ) { $this->in_item++; $this->tag = $this->rss_tag_names[ $name ]; } - + if ( $this->in_image ) { $this->in_image++; $this->tag = $this->rss_tag_names[ $name ]; } - + if ( $this->in_channel ) { $this->in_channel++; $this->tag = isset($this->rss_tag_names[ $name ]) ? $this->rss_tag_names[ $name ] : ''; } - + if ( isset($this->rss_tag_names[ $name ]) AND $this->rss_tag_names[ $name ] == "ITEM" ) { $this->in_item = 1; - } + } else if ( isset($this->rss_tag_names[ $name ]) AND $this->rss_tag_names[ $name ] == "IMAGE") { $this->in_image = 1; @@ -777,11 +767,11 @@ class class_rss $this->in_channel = 1; } } - + /*-------------------------------------------------------------------------*/ // END ELEMENT /*-------------------------------------------------------------------------*/ - + /** * Extract: Call back function for element handler * @@ -795,9 +785,9 @@ class class_rss //------------------------------- // Just in case //------------------------------- - + $name = strtoupper($name); - + if ( isset($this->rss_tag_names[ $name ]) AND $this->rss_tag_names[ $name ] == "IMAGE" ) { $this->rss_images[ $this->cur_channel ]['url'] = $this->rss_img_image; @@ -806,7 +796,7 @@ class class_rss $this->rss_images[ $this->cur_channel ]['width'] = $this->rss_img_width; $this->rss_images[ $this->cur_channel ]['height'] = $this->rss_img_height; $this->rss_images[ $this->cur_channel ]['description'] = $this->rss_img_desc; - + $this->_kill_image_elements(); $this->in_image = 0; } @@ -815,24 +805,24 @@ class class_rss //------------------------------- // Add data //------------------------------- - + $this->rss_channels[ $this->cur_channel ]['title'] = $this->_format_string($this->rss_chan_title); $this->rss_channels[ $this->cur_channel ]['link'] = $this->_format_string($this->rss_chan_link); $this->rss_channels[ $this->cur_channel ]['description'] = $this->_format_string($this->rss_chan_desc); $this->rss_channels[ $this->cur_channel ]['date'] = $this->_format_string($this->rss_chan_date); $this->rss_channels[ $this->cur_channel ]['unixdate'] = @strtotime($this->_format_string($this->rss_chan_date)); $this->rss_channels[ $this->cur_channel ]['language'] = $this->_format_string($this->rss_chan_lang); - + //------------------------------- // Increment item //------------------------------- - + $this->cur_channel++; - + //------------------------------- // Clean up //------------------------------- - + $this->_kill_channel_elements(); $this->in_channel = 0; } @@ -841,18 +831,18 @@ class class_rss if ( $this->rss_count < $this->rss_max_show ) { $this->rss_count++; - + //------------------------------- // Kludge for RDF which closes // channel before first item // I'm staring at you Typepad //------------------------------- - + if ( $this->cur_channel > 0 AND ( ! is_array($this->rss_items[ $this->cur_channel ] ) ) ) { $this->cur_channel--; } - + $this->rss_items[ $this->cur_channel ][ $this->cur_item ]['title'] = $this->rss_title; $this->rss_items[ $this->cur_channel ][ $this->cur_item ]['link'] = $this->rss_link; $this->rss_items[ $this->cur_channel ][ $this->cur_item ]['description'] = $this->rss_description; @@ -862,17 +852,17 @@ class class_rss $this->rss_items[ $this->cur_channel ][ $this->cur_item ]['unixdate'] = trim($this->rss_date) != "" ? strtotime($this->rss_date) : time(); $this->rss_items[ $this->cur_channel ][ $this->cur_item ]['category'] = $this->rss_category; $this->rss_items[ $this->cur_channel ][ $this->cur_item ]['guid'] = $this->rss_guid; - + //------------------------------- // Increment item //------------------------------- - + $this->cur_item++; - + //------------------------------- // Clean up //------------------------------- - + $this->_kill_elements(); $this->in_item = 0; } @@ -881,32 +871,32 @@ class class_rss //------------------------------- // Clean up //------------------------------- - + $this->_kill_elements(); $this->in_item = 0; } - + } if ( $this->in_channel ) { $this->in_channel--; } - + if ( $this->in_item ) { $this->in_item--; } - + if ( $this->in_image ) { $this->in_image--; } } - + /*-------------------------------------------------------------------------*/ // Character data /*-------------------------------------------------------------------------*/ - + /** * Extract: Call back function for element handler * @@ -941,7 +931,7 @@ class class_rss break; } } - + if ( $this->in_item == 2) { switch ($this->tag) @@ -982,7 +972,7 @@ class class_rss break; } } - + if ( $this->in_channel == 2) { switch ($this->tag) @@ -1009,11 +999,11 @@ class class_rss } } } - + /*-------------------------------------------------------------------------*/ // INTERNAL: Encodes an attribute string /*-------------------------------------------------------------------------*/ - + /** * Internal: Encode attribute * @@ -1028,14 +1018,14 @@ class class_rss $t = str_replace( ">", ">" , $t ); $t = str_replace( '"', """, $t ); $t = str_replace( "'", ''', $t ); - + return $t; } - + /*-------------------------------------------------------------------------*/ // INTERNAL: Encodes an attribute string /*-------------------------------------------------------------------------*/ - + /** * Internal: Dencode attribute * @@ -1050,14 +1040,14 @@ class class_rss $t = str_replace( ">" , ">", $t ); $t = str_replace( """, '"', $t ); $t = str_replace( "'", "'", $t ); - + return $t; } - + /*-------------------------------------------------------------------------*/ // INTERNAL: Encodes a string to make it safe (uses cdata) /*-------------------------------------------------------------------------*/ - + /** * Internal: Encode string * @@ -1076,81 +1066,81 @@ class class_rss $v = str_replace( "$" , '$' , $v ); $v = str_replace( "!" , "!" , $v ); $v = str_replace( "'" , "'" , $v ); - + if ( preg_match( "/['\"\[\]<>&]/", $v ) ) { $v = "_xml_convert_safecdata($v) . "]]>"; } - + if ( $this->collapse_newlines ) { $v = str_replace( "\r\n", "\n", $v ); } - + return $v; } - + /*-------------------------------------------------------------------------*/ // INTERNAL: Ensures no embedding of cdata /*-------------------------------------------------------------------------*/ - + /** * Encode CDATA XML attribute (Make safe for transport) * * @param string Raw data * @return string Converted Data */ - + function _xml_convert_safecdata( $v ) { # Legacy //$v = str_replace( "" , "|ў]>" , $v ); - + # New $v = str_replace( "" , "|#^#]>" , $v ); - + return $v; } - + /*-------------------------------------------------------------------------*/ // INTERNAL: Uncoverts safe embedding /*-------------------------------------------------------------------------*/ - + /** * Decode CDATA XML attribute (Make safe for transport) * * @param string Raw data * @return string Converted Data */ - + function _xml_unconvert_safecdata( $v ) { # Legacy $v = str_replace( "" , "]]>" , $v ); - + # New $v = str_replace( "" , "]]>" , $v ); - + return $v; } - + /*-------------------------------------------------------------------------*/ // Format text string /*-------------------------------------------------------------------------*/ - + function _format_string( $t ) { return trim( $t ); } - + /*-------------------------------------------------------------------------*/ // Kill work elements /*-------------------------------------------------------------------------*/ - + /** * Internal: Reset arrays * @@ -1167,11 +1157,11 @@ class class_rss $this->rss_category = ""; $this->rss_guid = ""; } - + /*-------------------------------------------------------------------------*/ // Kill img elements /*-------------------------------------------------------------------------*/ - + /** * Internal: Reset arrays * @@ -1186,11 +1176,11 @@ class class_rss $this->rss_img_height = ""; $this->rss_img_desc = ""; } - + /*-------------------------------------------------------------------------*/ // Kill channel elements /*-------------------------------------------------------------------------*/ - + /** * Internal: Reset arrays * diff --git a/upload/ips_kernel/class_template.php b/upload/ips_kernel/class_template.php index 64f61aaf..55973344 100644 --- a/upload/ips_kernel/class_template.php +++ b/upload/ips_kernel/class_template.php @@ -2,22 +2,14 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:55 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +--------------------------------------------------------------------------- | > $Date: 2005-10-10 14:03:20 +0100 (Mon, 10 Oct 2005) $ | > $Revision: 22 $ diff --git a/upload/ips_kernel/class_template_engine.php b/upload/ips_kernel/class_template_engine.php index 4740b36c..853f1f88 100644 --- a/upload/ips_kernel/class_template_engine.php +++ b/upload/ips_kernel/class_template_engine.php @@ -2,22 +2,14 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:55 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +--------------------------------------------------------------------------- | > $Date: 2005-10-10 14:03:20 +0100 (Mon, 10 Oct 2005) $ | > $Revision: 22 $ @@ -44,7 +36,7 @@ */ define( 'IPS_TEMPLATE_DEBUG' , 0 ); -define( 'IPS_TEMPLATE_DEBUG_FILE', dirname( _FILE_ ) . '/../cache/template_debug.cgi' ); +define( 'IPS_TEMPLATE_DEBUG_FILE', dirname( __FILE__ ) . '/../cache/template_debug.cgi' ); /** * Template Engine (NOT USED CURRENTLY: FOR IPB 3.0, IP.Dynamic) @@ -113,7 +105,81 @@ class class_template * * @param $data string The actual contents of the class, php tags 'an all. */ - function convert_cache_to_eval($data='', $full_class_name='') + function convert_cache_to_eval($data='', $full_class_name='', $id=1) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $final_content = $this->_return_function_data( $data ); + + //----------------------------------------- + // Grab "linked" template bits + //----------------------------------------- + + /* + <__templatebits__> + skin_global:personal_portal_gender_image + skin_global:personal_portal_online_image + + */ + + if ( strstr( $data, '<__templatebits__>' ) ) + { + $_templates = array(); + + preg_match( "#<__templatebits__>(.+?)#is", $data, $match ); + + if ( $match[1] ) + { + preg_match_all( "#(.+?)#is", $data, $matches ); + + for ( $i = 0; $i < count( $matches[0] ); $i++) + { + list( $file, $name ) = explode( ':', $matches[1][$i] ); + + if ( $file AND $name ) + { + $_templates[ $file ][] = $name; + } + } + } + + //----------------------------------------- + // Got stuff to load? + //----------------------------------------- + + if ( is_array( $_templates ) AND count( $_templates ) ) + { + foreach( $_templates as $file => $idx ) + { + $_data = implode( '', file( CACHE_PATH."cache/skin_cache/cacheid_".$id."/".$file.".php" ) ); + + $final_content .= $this->_return_function_data( $_data, $_templates[ $file ] ); + } + } + } + + //----------------------------------------- + // Return the stuff... + //----------------------------------------- + + $out = "class {$full_class_name} {\n\n"; + $out .= "\t".'var $ipsclass;'."\n"; + $out .= $final_content; + $out .= "\n\n}"; + + return $out; + } + + /** + * _return_function_data + * + * Extracts function data + * + * @param $data string The actual contents of the class, php tags 'an all. + */ + function _return_function_data( $data='', $function_find=array() ) { //----------------------------------------- // INIT @@ -192,6 +258,14 @@ class class_template foreach( $functions as $fname => $ftext ) { + if ( is_array( $function_find ) AND count( $function_find ) ) + { + if ( ! in_array( $fname, $function_find ) ) + { + continue; + } + } + preg_match( "/".'\$'."IPBHTML\s+?\.?=\s+?<<' ) ) @@ -646,7 +719,7 @@ class class_template // Create PHP statement //---------------------------------------- - $function_name = '__foreach_loop__'. uniqid( 'id_' ); + $function_name = '__foreach_loop__'. str_replace( '.', '', uniqid( 'id_', TRUE ) ); $php_statement = '$this->'.$function_name.'('.$clean_func_data.')'; $php_block = $this->_process_raw_html_logic( addslashes($block) ); $php_tags = $this->_process_raw_php_tags( $block ); diff --git a/upload/ips_kernel/class_upload.php b/upload/ips_kernel/class_upload.php index a8288c42..97391989 100644 --- a/upload/ips_kernel/class_upload.php +++ b/upload/ips_kernel/class_upload.php @@ -2,22 +2,14 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:55 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +--------------------------------------------------------------------------- | > $Date: 2005-10-10 14:03:20 +0100 (Mon, 10 Oct 2005) $ | > $Revision: 22 $ @@ -256,7 +248,7 @@ class class_upload $FILE_NAME = isset($_FILES[ $this->upload_form_field ]['name']) ? $_FILES[ $this->upload_form_field ]['name'] : ''; $FILE_SIZE = isset($_FILES[ $this->upload_form_field ]['size']) ? $_FILES[ $this->upload_form_field ]['size'] : ''; $FILE_TYPE = isset($_FILES[ $this->upload_form_field ]['type']) ? $_FILES[ $this->upload_form_field ]['type'] : ''; - + //------------------------------------------------- // Naughty Opera adds the filename on the end of the // mime type - we don't want this. @@ -275,7 +267,15 @@ class class_upload or !$_FILES[ $this->upload_form_field ]['size'] or ($_FILES[ $this->upload_form_field ]['name'] == "none") ) { - $this->error_no = 1; + if( $_FILES[ $this->upload_form_field ]['error'] == 2 ) + { + $this->error_no = 3; + } + else + { + $this->error_no = 1; + } + return; } @@ -300,7 +300,7 @@ class class_upload //------------------------------------------------- $this->file_extension = $this->_get_file_extension( $FILE_NAME ); - + if ( ! $this->file_extension ) { $this->error_no = 2; @@ -334,7 +334,7 @@ class class_upload //------------------------------------------------- $FILE_NAME = preg_replace( "/[^\w\.]/", "_", $FILE_NAME ); - + $this->original_file_name = $FILE_NAME; //------------------------------------------------- @@ -355,12 +355,17 @@ class class_upload // Make safe? //------------------------------------------------- + $renamed = 0; + if ( $this->make_script_safe ) { - if ( preg_match( "/\.(cgi|pl|js|asp|php|html|htm|jsp|jar)$/i", $FILE_NAME ) ) + if ( preg_match( "/\.(cgi|pl|js|asp|php|html|htm|jsp|jar)(\.|$)/i", $FILE_NAME ) ) { $FILE_TYPE = 'text/plain'; $this->file_extension = 'txt'; + $this->parsed_file_name = preg_replace( "/\.(cgi|pl|js|asp|php|html|htm|jsp|jar)(\.|$)/i", "$2", $this->parsed_file_name ); + + $renamed = 1; } } @@ -370,12 +375,12 @@ class class_upload if ( is_array( $this->image_ext ) and count( $this->image_ext ) ) { - if ( in_array( $this->file_extension, $this->image_ext ) ) + if ( in_array( $this->real_file_extension, $this->image_ext ) ) { $this->is_image = 1; } } - + //------------------------------------------------- // Add on the extension... //------------------------------------------------- @@ -405,7 +410,17 @@ class class_upload { @chmod( $this->saved_upload_name, 0777 ); } - + + if( !$renamed ) + { + $this->check_xss_infile(); + + if( $this->error_no ) + { + return; + } + } + //------------------------------------------------- // Is it an image? //------------------------------------------------- @@ -453,12 +468,50 @@ class class_upload if( filesize($this->saved_upload_name) != $_FILES[ $this->upload_form_field ]['size'] ) { @unlink( $this->saved_upload_name ); - + $this->error_no = 1; return; } } + + /*-------------------------------------------------------------------------*/ + // INTERNAL: Check for XSS inside file + /*-------------------------------------------------------------------------*/ + + /** + * Checks for XSS inside file. If found, sets error_no to 5 and returns + * + * @param void + */ + + function check_xss_infile() + { + // HTML added inside an inline file is not good in IE... + + $fh = fopen( $this->saved_upload_name, 'rb' ); + + $file_check = fread( $fh, 512 ); + + fclose( $fh ); + + if( !$file_check ) + { + @unlink( $this->saved_upload_name ); + $this->error_no = 5; + return; + } + + # Thanks to Nicolas Grekas from comments at www.splitbrain.org for helping to identify all vulnerable HTML tags + + else if( preg_match( "#saved_upload_name ); + $this->error_no = 5; + return; + } + } + /*-------------------------------------------------------------------------*/ // INTERNAL: Get file extension /*-------------------------------------------------------------------------*/ diff --git a/upload/ips_kernel/class_xml.php b/upload/ips_kernel/class_xml.php index b1d5fe47..410535cb 100644 --- a/upload/ips_kernel/class_xml.php +++ b/upload/ips_kernel/class_xml.php @@ -2,22 +2,14 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:55 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +--------------------------------------------------------------------------- | > $Date: 2005-10-10 14:03:20 +0100 (Mon, 10 Oct 2005) $ | > $Revision: 22 $ @@ -205,7 +197,9 @@ class class_xml * * @ var string */ - var $doc_type = 'WINDOWS-1251'; + var $doc_type = 'ISO-8859-1'; + + var $use_doctype = 1; /*-------------------------------------------------------------------------*/ // CONSTRUCTOR @@ -213,7 +207,7 @@ class class_xml function class_xml() { - @ini_set("memory_limit", "128M"); + //@ini_set("memory_limit", "128M"); //$this->header = 'doc_type.'"?'.'>'; } @@ -268,7 +262,7 @@ class class_xml xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE , 0); xml_parse_into_struct($parser, $xml, $vals); xml_parser_free($parser); - + $this->xml_array = $this->_xml_get_children($vals, $i); } @@ -437,7 +431,14 @@ class class_xml if ( $type === 'complete' ) { - $tag['VALUE'] = $this->_xml_unconvert_safecdata($thisvals['value']); + if( isset( $thisvals['value'] ) ) + { + $tag['VALUE'] = $this->_xml_unconvert_safecdata( $thisvals['value'] ); + } + else + { + $tag['VALUE'] = ''; + } } else { diff --git a/upload/ips_kernel/class_xml_rpc.php b/upload/ips_kernel/class_xml_rpc.php index 07c91c1b..650643a8 100644 --- a/upload/ips_kernel/class_xml_rpc.php +++ b/upload/ips_kernel/class_xml_rpc.php @@ -1,29 +1,19 @@ $Date: 2005-10-10 14:03:20 +0100 (Mon, 10 Oct 2005) $ -| > $Revision: 22 $ -| > $Author: matt $ +| > $Date: 2008-02-06 11:55:42 -0500 (Wed, 06 Feb 2008) $ +| > $Revision: 1184 $ +| > $Author: bfarber $ +--------------------------------------------------------------------------- | | > XML-RPC handling methods (KERNEL) @@ -163,7 +153,7 @@ class class_xml_rpc $this->_add_debug( "DECODING XML data: " . $_xml ); $this->_add_debug( "DECODE RESULT XML data: " . var_export( $data, TRUE ) ); } - + return $data; } @@ -471,12 +461,19 @@ class class_xml_rpc foreach( $data_array as $k => $v ) { - $_type = isset( $this->map_type_to_key[ $k ] ) ? $this->map_type_to_key[ $k ] : $this->get_xmlrpc_string_type( $v ); + if ( is_array( $v ) ) + { + $xmldata .= $this->_xml_rpc_build_document_recurse( "", $k, $v, 4 ); + } + else + { + $_type = isset( $this->map_type_to_key[ $k ] ) ? $this->map_type_to_key[ $k ] : $this->get_xmlrpc_string_type( $v ); - $xmldata .= "\t\t\t\t\n"; - $xmldata .= "\t\t\t\t\t".$k."\n"; - $xmldata .= "\t\t\t\t\t<".$_type.">" . htmlspecialchars($v) . "\n"; - $xmldata .= "\t\t\t\t\n"; + $xmldata .= "\t\t\t\t\n"; + $xmldata .= "\t\t\t\t\t".$k."\n"; + $xmldata .= "\t\t\t\t\t<".$_type.">" . htmlspecialchars($v) . "\n"; + $xmldata .= "\t\t\t\t\n"; + } } $xmldata .= "\t\t\t\n"; @@ -490,6 +487,54 @@ class class_xml_rpc return $xmldata; } + /*-------------------------------------------------------------------------*/ + // Creates an XML-RPC complex document + /*-------------------------------------------------------------------------*/ + /** + * Creates an XML-RPC complex document + * + * @param array Array of fields to send (must be in key => value pairings) + * @param string Method name (optional) + * @return string finished document + */ + function _xml_rpc_build_document_recurse( $xmldata, $k, $v, $depth=4 ) + { + $xmldata .= "\t\n"; + $xmldata .= "\t\t".$k."\n"; + $xmldata .= "\t\t\n"; + $xmldata .= "\t\t\t\n"; + $xmldata .= "\t\t\t\t\n"; + $xmldata .= "\t\t\t\t\t\n"; + $xmldata .= "\t\t\t\t\t\t\n"; + + foreach( $v as $_k => $_v ) + { + if ( is_array( $_v ) ) + { + $depth++; + $xmldata .= $this->_xml_rpc_build_document_recurse( $xmldata, $k, $v, $depth ); + } + else + { + $_type = isset( $this->map_type_to_key[ $_k ] ) ? $this->map_type_to_key[ $_k ] : $this->get_xmlrpc_string_type( $_v ); + + $xmldata .= "\t\t\t\t\t\t\t\n"; + $xmldata .= "\t\t\t\t\t\t\t\t".$_k."\n"; + $xmldata .= "\t\t\t\t\t\t\t\t<".$_type.">" . htmlspecialchars($_v) . "\n"; + $xmldata .= "\t\t\t\t\t\t\t\n"; + } + } + + $xmldata .= "\t\t\t\t\t\t\n"; + $xmldata .= "\t\t\t\t\t\n"; + $xmldata .= "\t\t\t\t\n"; + $xmldata .= "\t\t\t\n"; + $xmldata .= "\t\t\n"; + $xmldata .= "\t\n"; + + return $xmldata; + } + /*-------------------------------------------------------------------------*/ // Return True /*-------------------------------------------------------------------------*/ @@ -613,7 +658,7 @@ class class_xml_rpc if ( ! $url_parts['host'] ) { - $this->errors[] = "Не найден хост в заданном URL '$file_location'!"; + $this->errors[] = "No host found in the URL '$file_location'!"; return FALSE; } @@ -623,7 +668,7 @@ class class_xml_rpc $host = $url_parts['host']; - $port = ( isset($url_parts['port']) ) ? $url_parts['port'] : 80; + $port = ( isset($url_parts['port']) ) ? $url_parts['port'] : ( $url_parts['scheme'] == 'https' ? 443 : 80 ); //----------------------------------------- // User and pass? @@ -653,15 +698,16 @@ class class_xml_rpc $path .= "?" . $url_parts["query"]; } - if ( ! $fp = @fsockopen( $host, $port, $errno, $errstr, $fsocket_timeout ) ) + if ( ! $fp = @fsockopen( $port == 443 ? "ssl://" . $host : $host, $port, $errno, $errstr, $fsocket_timeout ) ) { - $this->errors[] = "Соединение прервано удаленным сервером $host"; + $this->errors[] = "CONNECTION REFUSED FROM $host"; return FALSE; } else { $header = "POST $path HTTP/1.0\r\n"; + $header .= "User-Agent: IPS XML-RPC Client Library (\$Revision: 1184 $)\r\n"; $header .= "Host: $host\r\n"; if ( $this->auth_user && $this->auth_pass ) @@ -677,7 +723,7 @@ class class_xml_rpc if ( ! fputs( $fp, $header . $xmldata ) ) { - $this->errors[] = "Не возможно отправить запрос удаленному серверу $host!"; + $this->errors[] = "Unable to send request to $host!"; return FALSE; } } diff --git a/upload/ips_kernel/class_xmlarchive.php b/upload/ips_kernel/class_xmlarchive.php index 2f0ee369..1086b620 100644 --- a/upload/ips_kernel/class_xmlarchive.php +++ b/upload/ips_kernel/class_xmlarchive.php @@ -2,22 +2,14 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:55 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +--------------------------------------------------------------------------- | > $Date: 2005-10-10 14:03:20 +0100 (Mon, 10 Oct 2005) $ | > $Revision: 22 $ @@ -419,6 +411,15 @@ class class_xmlarchive return; } + //----------------------------------- + // And Windows... + //----------------------------------- + + if ( preg_match( "/thumbs\.db/i", $filename ) ) + { + return; + } + if ( file_exists( $filename ) ) { if ( $FH = @fopen( $filename, 'rb' ) ) diff --git a/upload/ips_kernel/db_lib/index.html b/upload/ips_kernel/db_lib/index.html new file mode 100644 index 00000000..b49fc27d --- /dev/null +++ b/upload/ips_kernel/db_lib/index.html @@ -0,0 +1 @@ + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/upload/ips_kernel/db_lib/mysql_tools.php b/upload/ips_kernel/db_lib/mysql_tools.php new file mode 100644 index 00000000..00104882 --- /dev/null +++ b/upload/ips_kernel/db_lib/mysql_tools.php @@ -0,0 +1,372 @@ + $Date: 2007-10-18 15:47:19 -0400 (Thu, 18 Oct 2007) $ +| > $Revision: 1137 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > MySQL DB Tools +| > Module written by Remco Wilting +| > Date started: Tuesday 1st March 2005 15:40 +| +| > Module Version Number: 2.1.001 ++-------------------------------------------------------------------------- +*/ + +class db_tools +{ + var $ipsclass; + + var $has_issues = 0; + + /*-------------------------------------------------------------------------*/ + // Constructor + /*-------------------------------------------------------------------------*/ + function db_tools( & $ipsclass ) + { + $this->ipsclass = & $ipsclass; + } + + //------------------------------------------------------------- + // Diagnose the table indexes + // @input sql_statements array of create table/index statements to check + // @output array array of results ( table, index, status, message, fixsql ) + //------------------------------------------------------------- + + function db_index_diag( & $sql_statements ) + { + $indexes = array(); + $error_count = 0; + if( is_array($sql_statements) && count($sql_statements) ) + { + foreach( $sql_statements as $definition ) + { + $table_name = ""; + $fields_str = ""; + $primary_key = ""; + $tablename = array(); + $fields = array(); + $final_keys = array(); + $col_definition = ""; + $colmatch = array(); + $final_primary = array(); + + if ( preg_match( "#CREATE TABLE\s+?(.+?)\s+?\(#ie", $definition, $tablename ) ) + { + $table_name = $tablename[1]; + if ( preg_match( "#\s+?PRIMARY\s+?KEY\s+?\((.*?)\)(?:(?:[,\s+?$])?\((.+?)\))?#is", $definition, $fields ) ) + { + $final_primary = array(); + if( count( $fields ) ) + { + $primary_key = trim($fields[1]); + + $col_definition = $this->sql_strip_ticks( $definition ); + + if ( preg_match( "#^\s+?{$primary_key}\s+?(.+?)(?:[,$])#im", $col_definition, $colmatch ) ) + { + $col_definition = trim($colmatch[1]); + } + $final_primary = array( $primary_key, $col_definition ); + } + } + $table_array[$i] = $table_name; + if ( count( $final_primary ) ) + { + $primary_array[$i] = $final_primary; + } + } + + if ( preg_match_all( "#(?sql_strip_ticks( $index_cols ) ); + + $index_name = $fields[1][$i] ? $fields[1][$i] : $index_cols; + + $final_keys[] = array( $index_name, implode( ",", array_map( 'trim', explode( ",", $index_cols ) ) ) ); + + $i++; + } + } + } + + if( $table_name AND ( $primary_key OR count($final_keys) ) ) + { + $indexes[] = array( 'table' => $table_name, + 'primary' => $final_primary, + 'index' => $final_keys + ); + } + } + } + + if( !count($indexes) ) + { + return false; + } + + $output = array(); + + foreach( $indexes as $data ) + { + $table_name = str_replace( "ibf_", "", $data['table']); + + $row = $this->ipsclass->DB->sql_get_table_schematic( $table_name ); + + $tbl = $this->sql_strip_ticks( $row['Create Table'] ); + + if( isset( $data['primary'] ) && is_array($data['primary']) AND count($data['primary']) ) + { + $index_name = $data['primary'][0]; + $column_definition = $data['primary'][1]; + + if ( preg_match( "#\s+?PRIMARY\s+?KEY\s+?\({$index_name}\)?[,\s+?$]?#is", $tbl, $match ) ) + { + $output[] = array( 'table' => SQL_PREFIX.$table_name, + 'index' => $index_name, + 'status' => 'ok', + 'message' => '', + 'fixsql' => '' ); + } + else + { + $query_needed = "ALTER TABLE ".SQL_PREFIX."$table_name CHANGE {$index_name} {$index_name} {$column_definition}, ADD PRIMARY KEY ({$index_name})"; + + if( !$this->ipsclass->DB->field_exists( $index_name, $table_name ) ) + { + $query_needed = str_replace( "CHANGE {$index_name}", "ADD", $query_needed ); + } + + $this->has_issues = 1; + + $output[] = array( 'table' => SQL_PREFIX.$table_name, + 'index' => $index_name, + 'status' => 'error', + 'message' => 'Missing primary key', + 'fixsql' => $query_needed ); + $error_count++; + } + } + + if ( isset( $data['index'] ) && is_array( $data['index'] ) and count( $data['index'] ) ) + { + foreach( $data['index'] as $indexes ) + { + $index_name = $indexes[0]; + $index_cols = $indexes[1] ? $indexes[1] : $index_name; + $ok = 0; + + if ( preg_match( "#(?has_issues = 1; + + $output[] = array( 'table' => SQL_PREFIX.$table_name, + 'index' => $index_name, + 'status' => 'error', + 'message' => 'Missing field \''.$mc.'\'', + 'fixsql' => 'ALTER TABLE '.SQL_PREFIX.$table_name.' DROP INDEX '.$index_name.', ADD INDEX '.$index_name.' ('.$index_cols.')' ); + $error_count++; + $ok = 0; + } + } + } + } + else + { + $output[] = array( 'table' => SQL_PREFIX.$table_name, + 'index' => $index_name, + 'status' => 'error', + 'message' => 'Missing index \''.$index_name.'\'', + 'fixsql' => 'ALTER TABLE '.SQL_PREFIX.$table_name.' ADD INDEX '.$index_name.'('.$index_cols.')' ); + $error_count++; + } + + if ( $ok ) + { + $output[] = array( 'table' => SQL_PREFIX.$table_name, + 'index' => $index_name, + 'status' => 'ok', + 'message' => '', + 'fixsql' => '' ); + } + } + } + } + + return array( 'error_count' => $error_count, 'results' => $output ); + } + + + //------------------------------------------------------------- + // Diagnose the DB tables + // @input sql_statements array of create table statements to check + // @output array array of results ( key, table, status, message, fixsql ) + //------------------------------------------------------------- + + function db_table_diag( & $sql_statements ) + { + $queries_needed = array(); + $tables_needed = array(); + $error_count = 0; + + if( is_array( $sql_statements ) && count( $sql_statements ) ) + { + foreach( $sql_statements as $the_table ) + { + $expected_columns = array(); + + if( preg_match("#CREATE TABLE\s+?(.+?)\s+?\(#ie", $the_table, $bits)) + { + $tbl_name = $bits[1]; + $tbl_name = str_replace( "ibf_", "", $tbl_name ); + + $table_defs[$tbl_name] = str_replace( "ibf_", SQL_PREFIX, $the_table ); + + // Get the columns and lose the first line (it's the table name) + $columns_array = explode( "\n", $the_table ); + array_shift($columns_array); + + // Get rid of the end junk + if ( (strpos(end($columns_array), ");") == 0) || + (strpos(end($columns_array), ")") == 0) || + (strpos(end($columns_array), ";") == 0) ) + { + array_pop($columns_array); + } + + reset($columns_array); + + foreach( $columns_array as $col ) + { + $temp = preg_split( "/[\s]+/" , $col ); + $col_name = trim( next( $temp ) ); + + if( $col_name != "PRIMARY" && + $col_name != "KEY" && + $col_name != "UNIQUE" && + $col_name != "" && + $col_name != "(" && + $col_name != ";" && + $col_name != ");" ) + { + $expected_columns[] = $col_name; + $this->columns_to_defs[$tbl_name][$col_name] = trim( str_replace( ',', ';', $col ) ); + } + } + } + elseif ( preg_match("#ALTER TABLE ([a-z_]*) ADD ([a-z_]*) #is", $the_table, $bits) ) + { + if( $bits[1] != "" && + $bits[2] != "" && + $bits[2] != 'INDEX' && + strpos($bits[2], 'TYPE') === false ) + { + $tbl_name = trim($bits[1]); + $tbl_name = str_replace( "ibf_", "", $tbl_name ); + $col_name = trim($bits[2]); + + $expected_columns[] = $col_name; + $this->columns_to_defs[$tbl_name][$col_name] = str_replace( $bits[1], SQL_PREFIX . $tbl_name, $the_table ) . ";"; + } + } + else + { + continue; + } + + // Get the current schema.... + $this->ipsclass->DB->return_die = 1; + + if ( ! $this->ipsclass->DB->table_exists( $tbl_name ) ) + { + $output[] = array( 'key' => $tbl_name, + 'table' => SQL_PREFIX.$tbl_name, + 'status' => 'error', + 'message' => 'missing table', + 'fixsql' => $table_defs[$tbl_name] ); + $error_count++; + $this->ipsclass->DB->failed = 0; + } + else + { + // Here we go... + $missing = array(); + + foreach( $expected_columns as $trymeout ) + { + if( ! $this->ipsclass->DB->field_exists( $trymeout, $tbl_name ) ) + { + $missing[] = $trymeout; + $query_needed = "ALTER TABLE " . SQL_PREFIX . $tbl_name . " ADD " . $this->columns_to_defs[$tbl_name][$trymeout]; + + if( preg_match( "/auto_increment;/", $query_needed ) ) + { + $query_needed = substr( $query_needed, 0, -1 ).", ADD PRIMARY KEY( ". $trymeout . ");"; + } + + $output[] = array( 'key' => $tbl_name.$trymeout, + 'table' => SQL_PREFIX.$tbl_name, + 'status' => 'error', + 'message' => 'Missing column \''.$trymeout.'\'', + 'fixsql' => $query_needed ); + $error_count++; + } + } + if( !count( $missing ) ) + { + $output[] = array( 'key' => $tbl_name, + 'table' => SQL_PREFIX.$tbl_name, + 'status' => 'ok', + 'message' => '', + 'fixsql' => '' ); + } + } + } + } + + return array( 'error_count' => $error_count, 'results' => $output ); + } + + + //----------------------------------------- + // sql_strip_ticks from field names + //----------------------------------------- + + function sql_strip_ticks($data) + { + return str_replace( "`", "", $data ); + } + +} + +?> \ No newline at end of file diff --git a/upload/ips_kernel/i18n/convertcharset/ConvertCharset.class.php b/upload/ips_kernel/i18n/convertcharset/ConvertCharset.class.php index aba5016b..e8390409 100644 --- a/upload/ips_kernel/i18n/convertcharset/ConvertCharset.class.php +++ b/upload/ips_kernel/i18n/convertcharset/ConvertCharset.class.php @@ -1,603 +1,603 @@ - - * @copyright Copyright Mikolaj Jedrzejak (c) 2003-2004 - * @version 1.0 2004-07-27 00:37 - * @link http://www.unicode.org Unicode Homepage - * @link http://www.mikkom.pl My Homepage - * - **/ -$PATH_TO_CLASS = dirname(ereg_replace("\\\\","/",__FILE__)) . "/" . "ConvertTables" . "/"; -define ("CONVERT_TABLES_DIR", $PATH_TO_CLASS); -define ("DEBUG_MODE", 0); - -/** - * -- 1.0 2004-07-28 -- - * - * -- The most important thing -- - * I want to thank all people who helped me fix all bugs, small and big once. - * I hope that you don't mind that your names are in this file. - * - * -- Some Apache issues -- - * I get info from Lukas Lisa, that in some cases with special apache configuration - * you have to put header() function with proper encoding to get your result - * displayed correctly. - * If you want to see what I mean, go to demo.php and demo1.php - * - * -- BETA 1.0 2003-10-21 -- - * - * -- You should know about... -- - * For good understanding this class you shouls read all this stuff first :) but if you are - * in a hurry just start the demo.php and see what's inside. - * 1. That I'm not good in english at 03:45 :) - so forgive me all mistakes - * 2. This class is a BETA version because I haven't tested it enough - * 3. Feel free to contact me with questions, bug reports and mistakes in PHP and this documentation (email below) - * - * -- In a few words... -- - * Why ConvertCharset class? - * - * I have made this class because I had a lot of problems with diferent charsets. First because people - * from Microsoft wanted to have thair own encoding, second because people from Macromedia didn't - * thought about other languages, third because sometimes I need to use text written on MAC, and of course - * it has its own encoding :) - * - * Notice & remember: - * - When I'm saying 1 byte string I mean 1 byte per char. - * - When I'm saying multibyte string I mean more than one byte per char. - * - * So, this are main FEATURES of this class: - * - conversion between 1 byte charsets - * - conversion from 1 byte to multi byte charset (utf-8) - * - conversion from multibyte charset (utf-8) to 1 byte charset - * - every conversion output can be save with numeric entities (browser charset independent - not a full truth) - * - * This is a list of charsets you can operate with, the basic rule is that a char have to be in both charsets, - * otherwise you'll get an error. - * - * - WINDOWS - * - windows-1250 - Central Europe - * - windows-1251 - Cyrillic - * - windows-1252 - Latin I - * - windows-1253 - Greek - * - windows-1254 - Turkish - * - windows-1255 - Hebrew - * - windows-1256 - Arabic - * - windows-1257 - Baltic - * - windows-1258 - Viet Nam - * - cp874 - Thai - this file is also for DOS - * - * - DOS - * - cp437 - Latin US - * - cp737 - Greek - * - cp775 - BaltRim - * - cp850 - Latin1 - * - cp852 - Latin2 - * - cp855 - Cyrylic - * - cp857 - Turkish - * - cp860 - Portuguese - * - cp861 - Iceland - * - cp862 - Hebrew - * - cp863 - Canada - * - cp864 - Arabic - * - cp865 - Nordic - * - cp866 - Cyrylic Russian (this is the one, used in IE "Cyrillic (DOS)" ) - * - cp869 - Greek2 - * - * - MAC (Apple) - * - x-mac-cyrillic - * - x-mac-greek - * - x-mac-icelandic - * - x-mac-ce - * - x-mac-roman - * - * - ISO (Unix/Linux) - * - iso-8859-1 - * - iso-8859-2 - * - iso-8859-3 - * - iso-8859-4 - * - iso-8859-5 - * - iso-8859-6 - * - iso-8859-7 - * - iso-8859-8 - * - iso-8859-9 - * - iso-8859-10 - * - iso-8859-11 - * - iso-8859-12 - * - iso-8859-13 - * - iso-8859-14 - * - iso-8859-15 - * - iso-8859-16 - * - * - MISCELLANEOUS - * - gsm0338 (ETSI GSM 03.38) - * - cp037 - * - cp424 - * - cp500 - * - cp856 - * - cp875 - * - cp1006 - * - cp1026 - * - koi8-r (Cyrillic) - * - koi8-u (Cyrillic Ukrainian) - * - nextstep - * - us-ascii - * - us-ascii-quotes - * - * - DSP implementation for NeXT - * - stdenc - * - symbol - * - zdingbat - * - * - And specially for old Polish programs - * - mazovia - * - * -- Now, to the point... -- - * Here are main variables. - * - * DEBUG_MODE - * - * You can set this value to: - * - -1 - No errors or comments - * - 0 - Only error messages, no comments - * - 1 - Error messages and comments - * - * Default value is 1, and during first steps with class it should be left as is. - * - * CONVERT_TABLES_DIR - * - * This is a place where you store all files with charset encodings. Filenames should have - * the same names as encodings. My advise is to keep existing names, because thay - * were taken from unicode.org (www.unicode.org), and after update to unicode 3.0 or 4.0 - * the names of files will be the same, so if you want to save your time...uff, leave the - * names as thay are for future updates. - * - * The directory with edings files should be in a class location directory by default, - * but of course you can change it if you like. - * - * @package All about charset... - * @author Mikolaj Jedrzejak - * @copyright Copyright Mikolaj Jedrzejak (c) 2003-2004 - * @version 1.0 2004-07-27 23:11 - * @access public - * - * @link http://www.unicode.org Unicode Homepage - **/ -class ConvertCharset { - var $RecognizedEncoding; //This value keeps information if string contains multibyte chars. - var $Entities; // This value keeps information if output should be with numeric entities. - - /** - * CharsetChange::NumUnicodeEntity() - * - * Unicode encoding bytes, bits representation. - * Each b represents a bit that can be used to store character data. - * - bytes, bits, binary representation - * - 1, 7, 0bbbbbbb - * - 2, 11, 110bbbbb 10bbbbbb - * - 3, 16, 1110bbbb 10bbbbbb 10bbbbbb - * - 4, 21, 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb - * - * This function is written in a "long" way, for everyone who woluld like to analize - * the process of unicode encoding and understand it. All other functions like HexToUtf - * will be written in a "shortest" way I can write tham :) it does'n mean thay are short - * of course. You can chech it in HexToUtf() (link below) - very similar function. - * - * IMPORTANT: Remember that $UnicodeString input CANNOT have single byte upper half - * extended ASCII codes, why? Because there is a posibility that this function will eat - * the following char thinking it's miltibyte unicode char. - * - * @param string $UnicodeString Input Unicode string (1 char can take more than 1 byte) - * @return string This is an input string olso with unicode chars, bus saved as entities - * @see HexToUtf() - **/ - function UnicodeEntity ($UnicodeString) - { - $OutString = ""; - $StringLenght = strlen ($UnicodeString); - for ($CharPosition = 0; $CharPosition < $StringLenght; $CharPosition++) - { - $Char = $UnicodeString [$CharPosition]; - $AsciiChar = ord ($Char); - - if ($AsciiChar < 128) //1 7 0bbbbbbb (127) - { - $OutString .= $Char; - } - else if ($AsciiChar >> 5 == 6) //2 11 110bbbbb 10bbbbbb (2047) - { - $FirstByte = ($AsciiChar & 31); - $CharPosition++; - $Char = $UnicodeString [$CharPosition]; - $AsciiChar = ord ($Char); - $SecondByte = ($AsciiChar & 63); - $AsciiChar = ($FirstByte * 64) + $SecondByte; - $Entity = sprintf ("&#%d;", $AsciiChar); - $OutString .= $Entity; - } - else if ($AsciiChar >> 4 == 14) //3 16 1110bbbb 10bbbbbb 10bbbbbb - { - $FirstByte = ($AsciiChar & 31); - $CharPosition++; - $Char = $UnicodeString [$CharPosition]; - $AsciiChar = ord ($Char); - $SecondByte = ($AsciiChar & 63); - $CharPosition++; - $Char = $UnicodeString [$CharPosition]; - $AsciiChar = ord ($Char); - $ThidrByte = ($AsciiChar & 63); - $AsciiChar = ((($FirstByte * 64) + $SecondByte) * 64) + $ThidrByte; - - $Entity = sprintf ("&#%d;", $AsciiChar); - $OutString .= $Entity; - } - else if ($AsciiChar >> 3 == 30) //4 21 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb - { - $FirstByte = ($AsciiChar & 31); - $CharPosition++; - $Char = $UnicodeString [$CharPosition]; - $AsciiChar = ord ($Char); - $SecondByte = ($AsciiChar & 63); - $CharPosition++; - $Char = $UnicodeString [$CharPosition]; - $AsciiChar = ord ($Char); - $ThidrByte = ($AsciiChar & 63); - $CharPosition++; - $Char = $UnicodeString [$CharPosition]; - $AsciiChar = ord ($Char); - $FourthByte = ($AsciiChar & 63); - $AsciiChar = ((((($FirstByte * 64) + $SecondByte) * 64) + $ThidrByte) * 64) + $FourthByte; - - $Entity = sprintf ("&#%d;", $AsciiChar); - $OutString .= $Entity; - } - } - return $OutString; - } - - /** - * ConvertCharset::HexToUtf() - * - * This simple function gets unicode char up to 4 bytes and return it as a regular char. - * It is very similar to UnicodeEntity function (link below). There is one difference - * in returned format. This time it's a regular char(s), in most cases it will be one or two chars. - * - * @param string $UtfCharInHex Hexadecimal value of a unicode char. - * @return string Encoded hexadecimal value as a regular char. - * @see UnicodeEntity() - **/ - function HexToUtf ($UtfCharInHex) - { - $OutputChar = ""; - $UtfCharInDec = hexdec($UtfCharInHex); - if($UtfCharInDec<128) $OutputChar .= chr($UtfCharInDec); - else if($UtfCharInDec<2048)$OutputChar .= chr(($UtfCharInDec>>6)+192).chr(($UtfCharInDec&63)+128); - else if($UtfCharInDec<65536)$OutputChar .= chr(($UtfCharInDec>>12)+224).chr((($UtfCharInDec>>6)&63)+128).chr(($UtfCharInDec&63)+128); - else if($UtfCharInDec<2097152)$OutputChar .= chr($UtfCharInDec>>18+240).chr((($UtfCharInDec>>12)&63)+128).chr(($UtfCharInDec>>6)&63+128). chr($UtfCharInDec&63+128); - return $OutputChar; - } - - - /** - * CharsetChange::MakeConvertTable() - * - * This function creates table with two SBCS (Single Byte Character Set). Every conversion - * is through this table. - * - * - The file with encoding tables have to be save in "Format A" of unicode.org charset table format! This is usualy writen in a header of every charset file. - * - BOTH charsets MUST be SBCS - * - The files with encoding tables have to be complet (Non of chars can be missing, unles you are sure you are not going to use it) - * - * "Format A" encoding file, if you have to build it by yourself should aplly these rules: - * - you can comment everything with # - * - first column contains 1 byte chars in hex starting from 0x.. - * - second column contains unicode equivalent in hex starting from 0x.... - * - then every next column is optional, but in "Format A" it should contain unicode char name or/and your own comment - * - the columns can be splited by "spaces", "tabs", "," or any combination of these - * - below is an example - * - * - * # - * # The entries are in ANSI X3.4 order. - * # - * 0x00 0x0000 # NULL end extra comment, if needed - * 0x01 0x0001 # START OF HEADING - * # Oh, one more thing, you can make comments inside of a rows if you like. - * 0x02 0x0002 # START OF TEXT - * 0x03 0x0003 # END OF TEXT - * next line, and so on... - * - * - * You can get full tables with encodings from http://www.unicode.org - * - * @param string $FirstEncoding Name of first encoding and first encoding filename (thay have to be the same) - * @param string $SecondEncoding Name of second encoding and second encoding filename (thay have to be the same). Optional for building a joined table. - * @return array Table necessary to change one encoding to another. - **/ - function MakeConvertTable ($FirstEncoding, $SecondEncoding = "") - { - $ConvertTable = array(); - for($i = 0; $i < func_num_args(); $i++) - { - /** - * Because func_*** can't be used inside of another function call - * we have to save it as a separate value. - **/ - $FileName = func_get_arg($i); - if (!is_file(CONVERT_TABLES_DIR . $FileName)) - { - print $this->DebugOutput(0, 0, CONVERT_TABLES_DIR . $FileName); //Print an error message - exit; - } - $FileWithEncTabe = fopen(CONVERT_TABLES_DIR . $FileName, "r") or die(); //This die(); is just to make sure... - while(!feof($FileWithEncTabe)) - { - /** - * We asume that line is not longer - * than 1024 which is the default value for fgets function - **/ - if($OneLine=trim(fgets($FileWithEncTabe, 1024))) - { - /** - * We don't need all comment lines. I check only for "#" sign, because - * this is a way of making comments by unicode.org in thair encoding files - * and that's where the files are from :-) - **/ - if (substr($OneLine, 0, 1) != "#") - { - /** - * Sometimes inside the charset file the hex walues are separated by - * "space" and sometimes by "tab", the below preg_split can also be used - * to split files where separator is a ",", "\r", "\n" and "\f" - **/ - $HexValue = preg_split ("/[\s,]+/", $OneLine, 3); //We need only first 2 values - /** - * Sometimes char is UNDEFINED, or missing so we can't use it for convertion - **/ - if (substr($HexValue[1], 0, 1) != "#") - { - $ArrayKey = strtoupper(str_replace(strtolower("0x"), "", $HexValue[1])); - $ArrayValue = strtoupper(str_replace(strtolower("0x"), "", $HexValue[0])); - $ConvertTable[func_get_arg($i)][$ArrayKey] = $ArrayValue; - } - } //if (substr($OneLine,... - } //if($OneLine=trim(f... - } //while(!feof($FirstFileWi... - } //for($i = 0; $i < func_... - /** - * The last thing is to check if by any reason both encoding tables are not the same. - * For example, it will happen when you save the encoding table file with a wrong name - * - of another charset. - **/ - if ((func_num_args() > 1) && (count($ConvertTable[$FirstEncoding]) == count($ConvertTable[$SecondEncoding])) && (count(array_diff_assoc($ConvertTable[$FirstEncoding], $ConvertTable[$SecondEncoding])) == 0)) - { - print $this->DebugOutput(1, 1, "$FirstEncoding, $SecondEncoding"); - } - return $ConvertTable; - } - - - - /** - * ConvertCharset::Convert() - * - * This is a basic function you are using. I hope that you can figure out this function syntax :-) - * - * @param string $StringToChange The string you want to change :) - * @param string $FromCharset Name of $StringToChange encoding, you have to know it. - * @param string $ToCharset Name of a charset you want to get for $StringToChange. - * @param boolean $TurnOnEntities Set to true or 1 if you want to use numeric entities insted of regular chars. - * @return string Converted string in brand new encoding :) - * @version 1.0 2004-07-27 01:09 - **/ - function Convert ($StringToChange, $FromCharset, $ToCharset, $TurnOnEntities = false) - { - /** - * Check are there all variables - **/ - if ($StringToChange == "") - { - print $this->DebugOutput(0, 3, "\$StringToChange"); - } - else if ($FromCharset == "") - { - print $this->DebugOutput(0, 3, "\$FromCharset"); - } - else if ($ToCharset == "") - { - print $this->DebugOutput(0, 3, "\$ToCharset"); - } - - /** - * Now a few variables need to be set. - **/ - $NewString = ""; - $this->Entities = $TurnOnEntities; - - /** - * For all people who like to use uppercase for charset encoding names :) - **/ - $FromCharset = strtolower($FromCharset); - $ToCharset = strtolower($ToCharset); - - /** - * Of course you can make a conversion from one charset to the same one :) - * but I feel obligate to let you know about it. - **/ - if ($FromCharset == $ToCharset) - { - print $this->DebugOutput(1, 0, $FromCharset); - } - if (($FromCharset == $ToCharset) AND ($FromCharset == "utf-8")) - { - print $this->DebugOutput(0, 4, $FromCharset); - exit; - } - - /** - * This divison was made to prevent errors during convertion to/from utf-8 with - * "entities" enabled, because we need to use proper destination(to)/source(from) - * encoding table to write proper entities. - * - * This is the first case. We are convertinf from 1byte chars... - **/ - if ($FromCharset != "utf-8") - { - /** - * Now build table with both charsets for encoding change. - **/ - if ($ToCharset != "utf-8") - { - $CharsetTable = $this->MakeConvertTable ($FromCharset, $ToCharset); - } - else - { - $CharsetTable = $this->MakeConvertTable ($FromCharset); - } - /** - * For each char in a string... - **/ - for ($i = 0; $i < strlen($StringToChange); $i++) - { - $HexChar = ""; - $UnicodeHexChar = ""; - $HexChar = strtoupper(dechex(ord($StringToChange[$i]))); - // This is fix from Mario Klingemann, it prevents - // droping chars below 16 because of missing leading 0 [zeros] - if (strlen($HexChar)==1) $HexChar = "0".$HexChar; - //end of fix by Mario Klingemann - // This is quick fix of 10 chars in gsm0338 - // Thanks goes to Andrea Carpani who pointed on this problem - // and solve it ;) - if (($FromCharset == "gsm0338") && ($HexChar == '1B')) { - $i++; - $HexChar .= strtoupper(dechex(ord($StringToChange[$i]))); - } - // end of workarround on 10 chars from gsm0338 - if ($ToCharset != "utf-8") - { - if (in_array($HexChar, $CharsetTable[$FromCharset])) - { - $UnicodeHexChar = array_search($HexChar, $CharsetTable[$FromCharset]); - $UnicodeHexChars = explode("+",$UnicodeHexChar); - for($UnicodeHexCharElement = 0; $UnicodeHexCharElement < count($UnicodeHexChars); $UnicodeHexCharElement++) - { - if (array_key_exists($UnicodeHexChars[$UnicodeHexCharElement], $CharsetTable[$ToCharset])) - { - if ($this->Entities == true) - { - $NewString .= $this->UnicodeEntity($this->HexToUtf($UnicodeHexChars[$UnicodeHexCharElement])); - } - else - { - $NewString .= chr(hexdec($CharsetTable[$ToCharset][$UnicodeHexChars[$UnicodeHexCharElement]])); - } - } - else - { - print $this->DebugOutput(0, 1, $StringToChange[$i]); - } - } //for($UnicodeH... - } - else - { - print $this->DebugOutput(0, 2,$StringToChange[$i]); - } - } - else - { - if (in_array("$HexChar", $CharsetTable[$FromCharset])) - { - $UnicodeHexChar = array_search($HexChar, $CharsetTable[$FromCharset]); - /** - * Sometimes there are two or more utf-8 chars per one regular char. - * Extream, example is polish old Mazovia encoding, where one char contains - * two lettes 007a (z) and 0142 (l slash), we need to figure out how to - * solve this problem. - * The letters are merge with "plus" sign, there can be more than two chars. - * In Mazowia we have 007A+0142, but sometimes it can look like this - * 0x007A+0x0142+0x2034 (that string means nothing, it just shows the possibility...) - **/ - $UnicodeHexChars = explode("+",$UnicodeHexChar); - for($UnicodeHexCharElement = 0; $UnicodeHexCharElement < count($UnicodeHexChars); $UnicodeHexCharElement++) - { - if ($this->Entities == true) - { - $NewString .= $this->UnicodeEntity($this->HexToUtf($UnicodeHexChars[$UnicodeHexCharElement])); - } - else - { - $NewString .= $this->HexToUtf($UnicodeHexChars[$UnicodeHexCharElement]); - } - } // for - } - else - { - print $this->DebugOutput(0, 2, $StringToChange[$i]); - } - } - } - } - /** - * This is second case. We are encoding from multibyte char string. - **/ - else if($FromCharset == "utf-8") - { - $HexChar = ""; - $UnicodeHexChar = ""; - $CharsetTable = $this->MakeConvertTable ($ToCharset); - foreach ($CharsetTable[$ToCharset] as $UnicodeHexChar => $HexChar) - { - if ($this->Entities == true) { - $EntitieOrChar = $this->UnicodeEntity($this->HexToUtf($UnicodeHexChar)); - } - else - { - $EntitieOrChar = chr(hexdec($HexChar)); - } - $StringToChange = str_replace($this->HexToUtf($UnicodeHexChar), $EntitieOrChar, $StringToChange); - } - $NewString = $StringToChange; - } - - return $NewString; - } - - /** - * ConvertCharset::DebugOutput() - * - * This function is not really necessary, the debug output could stay inside of - * source code but like this, it's easier to manage and translate. - * Besides I couldn't find good coment/debug class :-) Maybe I'll write one someday... - * - * All messages depend on DEBUG_MODE level, as I was writing before you can set this value to: - * - -1 - No errors or notces are shown - * - 0 - Only error messages are shown, no notices - * - 1 - Error messages and notices are shown - * - * @param int $Group Message groupe: error - 0, notice - 1 - * @param int $Number Following message number - * @param mix $Value This walue is whatever you want, usualy it's some parameter value, for better message understanding. - * @return string String with a proper message. - **/ - function DebugOutput ($Group, $Number, $Value = false) - { - //$Debug [$Group][$Number] = "Message, can by with $Value"; - //$Group[0] - Errors - //$Group[1] - Notice - $Debug[0][0] = "Error, can NOT read file: " . $Value . "
"; - $Debug[0][1] = "Error, can't find maching char \"". $Value ."\" in destination encoding table!" . "
"; - $Debug[0][2] = "Error, can't find maching char \"". $Value ."\" in source encoding table!" . "
"; - $Debug[0][3] = "Error, you did NOT set variable " . $Value . " in Convert() function." . "
"; - $Debug[0][4] = "You can NOT convert string from " . $Value . " to " . $Value . "!" . "
"; - $Debug[1][0] = "Notice, you are trying to convert string from ". $Value ." to ". $Value .", don't you feel it's strange? ;-)" . "
"; - $Debug[1][1] = "Notice, both charsets " . $Value . " are identical! Check encoding tables files." . "
"; - $Debug[1][2] = "Notice, there is no unicode char in the string you are trying to convert." . "
"; - - if (DEBUG_MODE >= $Group) - { - return $Debug[$Group][$Number]; - } - } // function DebugOutput - -} //class ends here + + * @copyright Copyright Mikolaj Jedrzejak (c) 2003-2004 + * @version 1.0 2004-07-27 00:37 + * @link http://www.unicode.org Unicode Homepage + * @link http://www.mikkom.pl My Homepage + * + **/ +$PATH_TO_CLASS = dirname(ereg_replace("\\\\","/",__FILE__)) . "/" . "ConvertTables" . "/"; +define ("CONVERT_TABLES_DIR", $PATH_TO_CLASS); +define ("DEBUG_MODE", 0); + +/** + * -- 1.0 2004-07-28 -- + * + * -- The most important thing -- + * I want to thank all people who helped me fix all bugs, small and big once. + * I hope that you don't mind that your names are in this file. + * + * -- Some Apache issues -- + * I get info from Lukas Lisa, that in some cases with special apache configuration + * you have to put header() function with proper encoding to get your result + * displayed correctly. + * If you want to see what I mean, go to demo.php and demo1.php + * + * -- BETA 1.0 2003-10-21 -- + * + * -- You should know about... -- + * For good understanding this class you shouls read all this stuff first :) but if you are + * in a hurry just start the demo.php and see what's inside. + * 1. That I'm not good in english at 03:45 :) - so forgive me all mistakes + * 2. This class is a BETA version because I haven't tested it enough + * 3. Feel free to contact me with questions, bug reports and mistakes in PHP and this documentation (email below) + * + * -- In a few words... -- + * Why ConvertCharset class? + * + * I have made this class because I had a lot of problems with diferent charsets. First because people + * from Microsoft wanted to have thair own encoding, second because people from Macromedia didn't + * thought about other languages, third because sometimes I need to use text written on MAC, and of course + * it has its own encoding :) + * + * Notice & remember: + * - When I'm saying 1 byte string I mean 1 byte per char. + * - When I'm saying multibyte string I mean more than one byte per char. + * + * So, this are main FEATURES of this class: + * - conversion between 1 byte charsets + * - conversion from 1 byte to multi byte charset (utf-8) + * - conversion from multibyte charset (utf-8) to 1 byte charset + * - every conversion output can be save with numeric entities (browser charset independent - not a full truth) + * + * This is a list of charsets you can operate with, the basic rule is that a char have to be in both charsets, + * otherwise you'll get an error. + * + * - WINDOWS + * - windows-1250 - Central Europe + * - windows-1251 - Cyrillic + * - windows-1252 - Latin I + * - windows-1253 - Greek + * - windows-1254 - Turkish + * - windows-1255 - Hebrew + * - windows-1256 - Arabic + * - windows-1257 - Baltic + * - windows-1258 - Viet Nam + * - cp874 - Thai - this file is also for DOS + * + * - DOS + * - cp437 - Latin US + * - cp737 - Greek + * - cp775 - BaltRim + * - cp850 - Latin1 + * - cp852 - Latin2 + * - cp855 - Cyrylic + * - cp857 - Turkish + * - cp860 - Portuguese + * - cp861 - Iceland + * - cp862 - Hebrew + * - cp863 - Canada + * - cp864 - Arabic + * - cp865 - Nordic + * - cp866 - Cyrylic Russian (this is the one, used in IE "Cyrillic (DOS)" ) + * - cp869 - Greek2 + * + * - MAC (Apple) + * - x-mac-cyrillic + * - x-mac-greek + * - x-mac-icelandic + * - x-mac-ce + * - x-mac-roman + * + * - ISO (Unix/Linux) + * - iso-8859-1 + * - iso-8859-2 + * - iso-8859-3 + * - iso-8859-4 + * - iso-8859-5 + * - iso-8859-6 + * - iso-8859-7 + * - iso-8859-8 + * - iso-8859-9 + * - iso-8859-10 + * - iso-8859-11 + * - iso-8859-12 + * - iso-8859-13 + * - iso-8859-14 + * - iso-8859-15 + * - iso-8859-16 + * + * - MISCELLANEOUS + * - gsm0338 (ETSI GSM 03.38) + * - cp037 + * - cp424 + * - cp500 + * - cp856 + * - cp875 + * - cp1006 + * - cp1026 + * - koi8-r (Cyrillic) + * - koi8-u (Cyrillic Ukrainian) + * - nextstep + * - us-ascii + * - us-ascii-quotes + * + * - DSP implementation for NeXT + * - stdenc + * - symbol + * - zdingbat + * + * - And specially for old Polish programs + * - mazovia + * + * -- Now, to the point... -- + * Here are main variables. + * + * DEBUG_MODE + * + * You can set this value to: + * - -1 - No errors or comments + * - 0 - Only error messages, no comments + * - 1 - Error messages and comments + * + * Default value is 1, and during first steps with class it should be left as is. + * + * CONVERT_TABLES_DIR + * + * This is a place where you store all files with charset encodings. Filenames should have + * the same names as encodings. My advise is to keep existing names, because thay + * were taken from unicode.org (www.unicode.org), and after update to unicode 3.0 or 4.0 + * the names of files will be the same, so if you want to save your time...uff, leave the + * names as thay are for future updates. + * + * The directory with edings files should be in a class location directory by default, + * but of course you can change it if you like. + * + * @package All about charset... + * @author Mikolaj Jedrzejak + * @copyright Copyright Mikolaj Jedrzejak (c) 2003-2004 + * @version 1.0 2004-07-27 23:11 + * @access public + * + * @link http://www.unicode.org Unicode Homepage + **/ +class ConvertCharset { + var $RecognizedEncoding; //This value keeps information if string contains multibyte chars. + var $Entities; // This value keeps information if output should be with numeric entities. + + /** + * CharsetChange::NumUnicodeEntity() + * + * Unicode encoding bytes, bits representation. + * Each b represents a bit that can be used to store character data. + * - bytes, bits, binary representation + * - 1, 7, 0bbbbbbb + * - 2, 11, 110bbbbb 10bbbbbb + * - 3, 16, 1110bbbb 10bbbbbb 10bbbbbb + * - 4, 21, 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb + * + * This function is written in a "long" way, for everyone who woluld like to analize + * the process of unicode encoding and understand it. All other functions like HexToUtf + * will be written in a "shortest" way I can write tham :) it does'n mean thay are short + * of course. You can chech it in HexToUtf() (link below) - very similar function. + * + * IMPORTANT: Remember that $UnicodeString input CANNOT have single byte upper half + * extended ASCII codes, why? Because there is a posibility that this function will eat + * the following char thinking it's miltibyte unicode char. + * + * @param string $UnicodeString Input Unicode string (1 char can take more than 1 byte) + * @return string This is an input string olso with unicode chars, bus saved as entities + * @see HexToUtf() + **/ + function UnicodeEntity ($UnicodeString) + { + $OutString = ""; + $StringLenght = strlen ($UnicodeString); + for ($CharPosition = 0; $CharPosition < $StringLenght; $CharPosition++) + { + $Char = $UnicodeString [$CharPosition]; + $AsciiChar = ord ($Char); + + if ($AsciiChar < 128) //1 7 0bbbbbbb (127) + { + $OutString .= $Char; + } + else if ($AsciiChar >> 5 == 6) //2 11 110bbbbb 10bbbbbb (2047) + { + $FirstByte = ($AsciiChar & 31); + $CharPosition++; + $Char = $UnicodeString [$CharPosition]; + $AsciiChar = ord ($Char); + $SecondByte = ($AsciiChar & 63); + $AsciiChar = ($FirstByte * 64) + $SecondByte; + $Entity = sprintf ("&#%d;", $AsciiChar); + $OutString .= $Entity; + } + else if ($AsciiChar >> 4 == 14) //3 16 1110bbbb 10bbbbbb 10bbbbbb + { + $FirstByte = ($AsciiChar & 31); + $CharPosition++; + $Char = $UnicodeString [$CharPosition]; + $AsciiChar = ord ($Char); + $SecondByte = ($AsciiChar & 63); + $CharPosition++; + $Char = $UnicodeString [$CharPosition]; + $AsciiChar = ord ($Char); + $ThidrByte = ($AsciiChar & 63); + $AsciiChar = ((($FirstByte * 64) + $SecondByte) * 64) + $ThidrByte; + + $Entity = sprintf ("&#%d;", $AsciiChar); + $OutString .= $Entity; + } + else if ($AsciiChar >> 3 == 30) //4 21 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb + { + $FirstByte = ($AsciiChar & 31); + $CharPosition++; + $Char = $UnicodeString [$CharPosition]; + $AsciiChar = ord ($Char); + $SecondByte = ($AsciiChar & 63); + $CharPosition++; + $Char = $UnicodeString [$CharPosition]; + $AsciiChar = ord ($Char); + $ThidrByte = ($AsciiChar & 63); + $CharPosition++; + $Char = $UnicodeString [$CharPosition]; + $AsciiChar = ord ($Char); + $FourthByte = ($AsciiChar & 63); + $AsciiChar = ((((($FirstByte * 64) + $SecondByte) * 64) + $ThidrByte) * 64) + $FourthByte; + + $Entity = sprintf ("&#%d;", $AsciiChar); + $OutString .= $Entity; + } + } + return $OutString; + } + + /** + * ConvertCharset::HexToUtf() + * + * This simple function gets unicode char up to 4 bytes and return it as a regular char. + * It is very similar to UnicodeEntity function (link below). There is one difference + * in returned format. This time it's a regular char(s), in most cases it will be one or two chars. + * + * @param string $UtfCharInHex Hexadecimal value of a unicode char. + * @return string Encoded hexadecimal value as a regular char. + * @see UnicodeEntity() + **/ + function HexToUtf ($UtfCharInHex) + { + $OutputChar = ""; + $UtfCharInDec = hexdec($UtfCharInHex); + if($UtfCharInDec<128) $OutputChar .= chr($UtfCharInDec); + else if($UtfCharInDec<2048)$OutputChar .= chr(($UtfCharInDec>>6)+192).chr(($UtfCharInDec&63)+128); + else if($UtfCharInDec<65536)$OutputChar .= chr(($UtfCharInDec>>12)+224).chr((($UtfCharInDec>>6)&63)+128).chr(($UtfCharInDec&63)+128); + else if($UtfCharInDec<2097152)$OutputChar .= chr($UtfCharInDec>>18+240).chr((($UtfCharInDec>>12)&63)+128).chr(($UtfCharInDec>>6)&63+128). chr($UtfCharInDec&63+128); + return $OutputChar; + } + + + /** + * CharsetChange::MakeConvertTable() + * + * This function creates table with two SBCS (Single Byte Character Set). Every conversion + * is through this table. + * + * - The file with encoding tables have to be save in "Format A" of unicode.org charset table format! This is usualy writen in a header of every charset file. + * - BOTH charsets MUST be SBCS + * - The files with encoding tables have to be complet (Non of chars can be missing, unles you are sure you are not going to use it) + * + * "Format A" encoding file, if you have to build it by yourself should aplly these rules: + * - you can comment everything with # + * - first column contains 1 byte chars in hex starting from 0x.. + * - second column contains unicode equivalent in hex starting from 0x.... + * - then every next column is optional, but in "Format A" it should contain unicode char name or/and your own comment + * - the columns can be splited by "spaces", "tabs", "," or any combination of these + * - below is an example + * + * + * # + * # The entries are in ANSI X3.4 order. + * # + * 0x00 0x0000 # NULL end extra comment, if needed + * 0x01 0x0001 # START OF HEADING + * # Oh, one more thing, you can make comments inside of a rows if you like. + * 0x02 0x0002 # START OF TEXT + * 0x03 0x0003 # END OF TEXT + * next line, and so on... + * + * + * You can get full tables with encodings from http://www.unicode.org + * + * @param string $FirstEncoding Name of first encoding and first encoding filename (thay have to be the same) + * @param string $SecondEncoding Name of second encoding and second encoding filename (thay have to be the same). Optional for building a joined table. + * @return array Table necessary to change one encoding to another. + **/ + function MakeConvertTable ($FirstEncoding, $SecondEncoding = "") + { + $ConvertTable = array(); + for($i = 0; $i < func_num_args(); $i++) + { + /** + * Because func_*** can't be used inside of another function call + * we have to save it as a separate value. + **/ + $FileName = func_get_arg($i); + if (!is_file(CONVERT_TABLES_DIR . $FileName)) + { + print $this->DebugOutput(0, 0, CONVERT_TABLES_DIR . $FileName); //Print an error message + exit; + } + $FileWithEncTabe = fopen(CONVERT_TABLES_DIR . $FileName, "r") or die(); //This die(); is just to make sure... + while(!feof($FileWithEncTabe)) + { + /** + * We asume that line is not longer + * than 1024 which is the default value for fgets function + **/ + if($OneLine=trim(fgets($FileWithEncTabe, 1024))) + { + /** + * We don't need all comment lines. I check only for "#" sign, because + * this is a way of making comments by unicode.org in thair encoding files + * and that's where the files are from :-) + **/ + if (substr($OneLine, 0, 1) != "#") + { + /** + * Sometimes inside the charset file the hex walues are separated by + * "space" and sometimes by "tab", the below preg_split can also be used + * to split files where separator is a ",", "\r", "\n" and "\f" + **/ + $HexValue = preg_split ("/[\s,]+/", $OneLine, 3); //We need only first 2 values + /** + * Sometimes char is UNDEFINED, or missing so we can't use it for convertion + **/ + if (substr($HexValue[1], 0, 1) != "#") + { + $ArrayKey = strtoupper(str_replace(strtolower("0x"), "", $HexValue[1])); + $ArrayValue = strtoupper(str_replace(strtolower("0x"), "", $HexValue[0])); + $ConvertTable[func_get_arg($i)][$ArrayKey] = $ArrayValue; + } + } //if (substr($OneLine,... + } //if($OneLine=trim(f... + } //while(!feof($FirstFileWi... + } //for($i = 0; $i < func_... + /** + * The last thing is to check if by any reason both encoding tables are not the same. + * For example, it will happen when you save the encoding table file with a wrong name + * - of another charset. + **/ + if ((func_num_args() > 1) && (count($ConvertTable[$FirstEncoding]) == count($ConvertTable[$SecondEncoding])) && (count(array_diff_assoc($ConvertTable[$FirstEncoding], $ConvertTable[$SecondEncoding])) == 0)) + { + print $this->DebugOutput(1, 1, "$FirstEncoding, $SecondEncoding"); + } + return $ConvertTable; + } + + + + /** + * ConvertCharset::Convert() + * + * This is a basic function you are using. I hope that you can figure out this function syntax :-) + * + * @param string $StringToChange The string you want to change :) + * @param string $FromCharset Name of $StringToChange encoding, you have to know it. + * @param string $ToCharset Name of a charset you want to get for $StringToChange. + * @param boolean $TurnOnEntities Set to true or 1 if you want to use numeric entities insted of regular chars. + * @return string Converted string in brand new encoding :) + * @version 1.0 2004-07-27 01:09 + **/ + function Convert ($StringToChange, $FromCharset, $ToCharset, $TurnOnEntities = false) + { + /** + * Check are there all variables + **/ + if ($StringToChange == "") + { + print $this->DebugOutput(0, 3, "\$StringToChange"); + } + else if ($FromCharset == "") + { + print $this->DebugOutput(0, 3, "\$FromCharset"); + } + else if ($ToCharset == "") + { + print $this->DebugOutput(0, 3, "\$ToCharset"); + } + + /** + * Now a few variables need to be set. + **/ + $NewString = ""; + $this->Entities = $TurnOnEntities; + + /** + * For all people who like to use uppercase for charset encoding names :) + **/ + $FromCharset = strtolower($FromCharset); + $ToCharset = strtolower($ToCharset); + + /** + * Of course you can make a conversion from one charset to the same one :) + * but I feel obligate to let you know about it. + **/ + if ($FromCharset == $ToCharset) + { + print $this->DebugOutput(1, 0, $FromCharset); + } + if (($FromCharset == $ToCharset) AND ($FromCharset == "utf-8")) + { + print $this->DebugOutput(0, 4, $FromCharset); + exit; + } + + /** + * This divison was made to prevent errors during convertion to/from utf-8 with + * "entities" enabled, because we need to use proper destination(to)/source(from) + * encoding table to write proper entities. + * + * This is the first case. We are convertinf from 1byte chars... + **/ + if ($FromCharset != "utf-8") + { + /** + * Now build table with both charsets for encoding change. + **/ + if ($ToCharset != "utf-8") + { + $CharsetTable = $this->MakeConvertTable ($FromCharset, $ToCharset); + } + else + { + $CharsetTable = $this->MakeConvertTable ($FromCharset); + } + /** + * For each char in a string... + **/ + for ($i = 0; $i < strlen($StringToChange); $i++) + { + $HexChar = ""; + $UnicodeHexChar = ""; + $HexChar = strtoupper(dechex(ord($StringToChange[$i]))); + // This is fix from Mario Klingemann, it prevents + // droping chars below 16 because of missing leading 0 [zeros] + if (strlen($HexChar)==1) $HexChar = "0".$HexChar; + //end of fix by Mario Klingemann + // This is quick fix of 10 chars in gsm0338 + // Thanks goes to Andrea Carpani who pointed on this problem + // and solve it ;) + if (($FromCharset == "gsm0338") && ($HexChar == '1B')) { + $i++; + $HexChar .= strtoupper(dechex(ord($StringToChange[$i]))); + } + // end of workarround on 10 chars from gsm0338 + if ($ToCharset != "utf-8") + { + if (in_array($HexChar, $CharsetTable[$FromCharset])) + { + $UnicodeHexChar = array_search($HexChar, $CharsetTable[$FromCharset]); + $UnicodeHexChars = explode("+",$UnicodeHexChar); + for($UnicodeHexCharElement = 0; $UnicodeHexCharElement < count($UnicodeHexChars); $UnicodeHexCharElement++) + { + if (array_key_exists($UnicodeHexChars[$UnicodeHexCharElement], $CharsetTable[$ToCharset])) + { + if ($this->Entities == true) + { + $NewString .= $this->UnicodeEntity($this->HexToUtf($UnicodeHexChars[$UnicodeHexCharElement])); + } + else + { + $NewString .= chr(hexdec($CharsetTable[$ToCharset][$UnicodeHexChars[$UnicodeHexCharElement]])); + } + } + else + { + print $this->DebugOutput(0, 1, $StringToChange[$i]); + } + } //for($UnicodeH... + } + else + { + print $this->DebugOutput(0, 2,$StringToChange[$i]); + } + } + else + { + if (in_array("$HexChar", $CharsetTable[$FromCharset])) + { + $UnicodeHexChar = array_search($HexChar, $CharsetTable[$FromCharset]); + /** + * Sometimes there are two or more utf-8 chars per one regular char. + * Extream, example is polish old Mazovia encoding, where one char contains + * two lettes 007a (z) and 0142 (l slash), we need to figure out how to + * solve this problem. + * The letters are merge with "plus" sign, there can be more than two chars. + * In Mazowia we have 007A+0142, but sometimes it can look like this + * 0x007A+0x0142+0x2034 (that string means nothing, it just shows the possibility...) + **/ + $UnicodeHexChars = explode("+",$UnicodeHexChar); + for($UnicodeHexCharElement = 0; $UnicodeHexCharElement < count($UnicodeHexChars); $UnicodeHexCharElement++) + { + if ($this->Entities == true) + { + $NewString .= $this->UnicodeEntity($this->HexToUtf($UnicodeHexChars[$UnicodeHexCharElement])); + } + else + { + $NewString .= $this->HexToUtf($UnicodeHexChars[$UnicodeHexCharElement]); + } + } // for + } + else + { + print $this->DebugOutput(0, 2, $StringToChange[$i]); + } + } + } + } + /** + * This is second case. We are encoding from multibyte char string. + **/ + else if($FromCharset == "utf-8") + { + $HexChar = ""; + $UnicodeHexChar = ""; + $CharsetTable = $this->MakeConvertTable ($ToCharset); + foreach ($CharsetTable[$ToCharset] as $UnicodeHexChar => $HexChar) + { + if ($this->Entities == true) { + $EntitieOrChar = $this->UnicodeEntity($this->HexToUtf($UnicodeHexChar)); + } + else + { + $EntitieOrChar = chr(hexdec($HexChar)); + } + $StringToChange = str_replace($this->HexToUtf($UnicodeHexChar), $EntitieOrChar, $StringToChange); + } + $NewString = $StringToChange; + } + + return $NewString; + } + + /** + * ConvertCharset::DebugOutput() + * + * This function is not really necessary, the debug output could stay inside of + * source code but like this, it's easier to manage and translate. + * Besides I couldn't find good coment/debug class :-) Maybe I'll write one someday... + * + * All messages depend on DEBUG_MODE level, as I was writing before you can set this value to: + * - -1 - No errors or notces are shown + * - 0 - Only error messages are shown, no notices + * - 1 - Error messages and notices are shown + * + * @param int $Group Message groupe: error - 0, notice - 1 + * @param int $Number Following message number + * @param mix $Value This walue is whatever you want, usualy it's some parameter value, for better message understanding. + * @return string String with a proper message. + **/ + function DebugOutput ($Group, $Number, $Value = false) + { + //$Debug [$Group][$Number] = "Message, can by with $Value"; + //$Group[0] - Errors + //$Group[1] - Notice + $Debug[0][0] = "Error, can NOT read file: " . $Value . "
"; + $Debug[0][1] = "Error, can't find maching char \"". $Value ."\" in destination encoding table!" . "
"; + $Debug[0][2] = "Error, can't find maching char \"". $Value ."\" in source encoding table!" . "
"; + $Debug[0][3] = "Error, you did NOT set variable " . $Value . " in Convert() function." . "
"; + $Debug[0][4] = "You can NOT convert string from " . $Value . " to " . $Value . "!" . "
"; + $Debug[1][0] = "Notice, you are trying to convert string from ". $Value ." to ". $Value .", don't you feel it's strange? ;-)" . "
"; + $Debug[1][1] = "Notice, both charsets " . $Value . " are identical! Check encoding tables files." . "
"; + $Debug[1][2] = "Notice, there is no unicode char in the string you are trying to convert." . "
"; + + if (DEBUG_MODE >= $Group) + { + return $Debug[$Group][$Number]; + } + } // function DebugOutput + +} //class ends here ?> \ No newline at end of file diff --git a/upload/ips_kernel/i18n/convertcharset/ConvertTables/index.html b/upload/ips_kernel/i18n/convertcharset/ConvertTables/index.html new file mode 100644 index 00000000..b49fc27d --- /dev/null +++ b/upload/ips_kernel/i18n/convertcharset/ConvertTables/index.html @@ -0,0 +1 @@ + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/upload/ips_kernel/i18n/convertcharset/ConvertTables/windows-874 b/upload/ips_kernel/i18n/convertcharset/ConvertTables/windows-874 new file mode 100644 index 00000000..38c80065 --- /dev/null +++ b/upload/ips_kernel/i18n/convertcharset/ConvertTables/windows-874 @@ -0,0 +1,286 @@ +# +# $Id: TIS620.TXT,v 1.2 1999/08/23 18:34:16 mleisher Exp $ +# +# Copyright 1999 Computing Research Labs, New Mexico State University +# +# 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 COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY 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. +# +# +# TCCII 2533 1009 / TIS 620 Thai. Generated from the table in the "tcs" +# package. +# +# Mark Leisher +# 06 March 1998 +# +0x00 0x0000 # +0x01 0x0001 # +0x02 0x0002 # +0x03 0x0003 # +0x04 0x0004 # +0x05 0x0005 # +0x06 0x0006 # +0x07 0x0007 # +0x08 0x0008 # +0x09 0x0009 # +0x0A 0x000A # +0x0B 0x000B # +0x0C 0x000C # +0x0D 0x000D # +0x0E 0x000E # +0x0F 0x000F # +0x10 0x0010 # +0x11 0x0011 # +0x12 0x0012 # +0x13 0x0013 # +0x14 0x0014 # +0x15 0x0015 # +0x16 0x0016 # +0x17 0x0017 # +0x18 0x0018 # +0x19 0x0019 # +0x1A 0x001A # +0x1B 0x001B # +0x1C 0x001C # +0x1D 0x001D # +0x1E 0x001E # +0x1F 0x001F # +0x20 0x0020 # SPACE +0x21 0x0021 # EXCLAMATION MARK +0x22 0x0022 # QUOTATION MARK +0x23 0x0023 # NUMBER SIGN +0x24 0x0024 # DOLLAR SIGN +0x25 0x0025 # PERCENT SIGN +0x26 0x0026 # AMPERSAND +0x27 0x0027 # APOSTROPHE +0x28 0x0028 # LEFT PARENTHESIS +0x29 0x0029 # RIGHT PARENTHESIS +0x2A 0x002A # ASTERISK +0x2B 0x002B # PLUS SIGN +0x2C 0x002C # COMMA +0x2D 0x002D # HYPHEN-MINUS +0x2E 0x002E # FULL STOP +0x2F 0x002F # SOLIDUS +0x30 0x0030 # DIGIT ZERO +0x31 0x0031 # DIGIT ONE +0x32 0x0032 # DIGIT TWO +0x33 0x0033 # DIGIT THREE +0x34 0x0034 # DIGIT FOUR +0x35 0x0035 # DIGIT FIVE +0x36 0x0036 # DIGIT SIX +0x37 0x0037 # DIGIT SEVEN +0x38 0x0038 # DIGIT EIGHT +0x39 0x0039 # DIGIT NINE +0x3A 0x003A # COLON +0x3B 0x003B # SEMICOLON +0x3C 0x003C # LESS-THAN SIGN +0x3D 0x003D # EQUALS SIGN +0x3E 0x003E # GREATER-THAN SIGN +0x3F 0x003F # QUESTION MARK +0x40 0x0040 # COMMERCIAL AT +0x41 0x0041 # LATIN CAPITAL LETTER A +0x42 0x0042 # LATIN CAPITAL LETTER B +0x43 0x0043 # LATIN CAPITAL LETTER C +0x44 0x0044 # LATIN CAPITAL LETTER D +0x45 0x0045 # LATIN CAPITAL LETTER E +0x46 0x0046 # LATIN CAPITAL LETTER F +0x47 0x0047 # LATIN CAPITAL LETTER G +0x48 0x0048 # LATIN CAPITAL LETTER H +0x49 0x0049 # LATIN CAPITAL LETTER I +0x4A 0x004A # LATIN CAPITAL LETTER J +0x4B 0x004B # LATIN CAPITAL LETTER K +0x4C 0x004C # LATIN CAPITAL LETTER L +0x4D 0x004D # LATIN CAPITAL LETTER M +0x4E 0x004E # LATIN CAPITAL LETTER N +0x4F 0x004F # LATIN CAPITAL LETTER O +0x50 0x0050 # LATIN CAPITAL LETTER P +0x51 0x0051 # LATIN CAPITAL LETTER Q +0x52 0x0052 # LATIN CAPITAL LETTER R +0x53 0x0053 # LATIN CAPITAL LETTER S +0x54 0x0054 # LATIN CAPITAL LETTER T +0x55 0x0055 # LATIN CAPITAL LETTER U +0x56 0x0056 # LATIN CAPITAL LETTER V +0x57 0x0057 # LATIN CAPITAL LETTER W +0x58 0x0058 # LATIN CAPITAL LETTER X +0x59 0x0059 # LATIN CAPITAL LETTER Y +0x5A 0x005A # LATIN CAPITAL LETTER Z +0x5B 0x005B # LEFT SQUARE BRACKET +0x5C 0x005C # REVERSE SOLIDUS +0x5D 0x005D # RIGHT SQUARE BRACKET +0x5E 0x005E # CIRCUMFLEX ACCENT +0x5F 0x005F # LOW LINE +0x60 0x0060 # GRAVE ACCENT +0x61 0x0061 # LATIN SMALL LETTER A +0x62 0x0062 # LATIN SMALL LETTER B +0x63 0x0063 # LATIN SMALL LETTER C +0x64 0x0064 # LATIN SMALL LETTER D +0x65 0x0065 # LATIN SMALL LETTER E +0x66 0x0066 # LATIN SMALL LETTER F +0x67 0x0067 # LATIN SMALL LETTER G +0x68 0x0068 # LATIN SMALL LETTER H +0x69 0x0069 # LATIN SMALL LETTER I +0x6A 0x006A # LATIN SMALL LETTER J +0x6B 0x006B # LATIN SMALL LETTER K +0x6C 0x006C # LATIN SMALL LETTER L +0x6D 0x006D # LATIN SMALL LETTER M +0x6E 0x006E # LATIN SMALL LETTER N +0x6F 0x006F # LATIN SMALL LETTER O +0x70 0x0070 # LATIN SMALL LETTER P +0x71 0x0071 # LATIN SMALL LETTER Q +0x72 0x0072 # LATIN SMALL LETTER R +0x73 0x0073 # LATIN SMALL LETTER S +0x74 0x0074 # LATIN SMALL LETTER T +0x75 0x0075 # LATIN SMALL LETTER U +0x76 0x0076 # LATIN SMALL LETTER V +0x77 0x0077 # LATIN SMALL LETTER W +0x78 0x0078 # LATIN SMALL LETTER X +0x79 0x0079 # LATIN SMALL LETTER Y +0x7A 0x007A # LATIN SMALL LETTER Z +0x7B 0x007B # LEFT CURLY BRACKET +0x7C 0x007C # VERTICAL LINE +0x7D 0x007D # RIGHT CURLY BRACKET +0x7E 0x007E # TILDE +0x7F 0x007F # +0x80 0x0080 # +0x81 0x0081 # +0x82 0x0082 # +0x83 0x0083 # +0x84 0x0084 # +0x85 0x0085 # +0x86 0x0086 # +0x87 0x0087 # +0x88 0x0088 # +0x89 0x0089 # +0x8A 0x008A # +0x8B 0x008B # +0x8C 0x008C # +0x8D 0x008D # +0x8E 0x008E # +0x8F 0x008F # +0x90 0x0090 # +0x91 0x0091 # +0x92 0x0092 # +0x93 0x0093 # +0x94 0x0094 # +0x95 0x0095 # +0x96 0x0096 # +0x97 0x0097 # +0x98 0x0098 # +0x99 0x0099 # +0x9A 0x009A # +0x9B 0x009B # +0x9C 0x009C # +0x9D 0x009D # +0x9E 0x009E # +0x9F 0x009F # +0xA0 0xFFFD # REPLACEMENT CHARACTER +0xA1 0x0E01 # THAI CHARACTER KO KAI +0xA2 0x0E02 # THAI CHARACTER KHO KHAI +0xA3 0x0E03 # THAI CHARACTER KHO KHUAT +0xA4 0x0E04 # THAI CHARACTER KHO KHWAI +0xA5 0x0E05 # THAI CHARACTER KHO KHON +0xA6 0x0E06 # THAI CHARACTER KHO RAKHANG +0xA7 0x0E07 # THAI CHARACTER NGO NGU +0xA8 0x0E08 # THAI CHARACTER CHO CHAN +0xA9 0x0E09 # THAI CHARACTER CHO CHING +0xAA 0x0E0A # THAI CHARACTER CHO CHANG +0xAB 0x0E0B # THAI CHARACTER SO SO +0xAC 0x0E0C # THAI CHARACTER CHO CHOE +0xAD 0x0E0D # THAI CHARACTER YO YING +0xAE 0x0E0E # THAI CHARACTER DO CHADA +0xAF 0x0E0F # THAI CHARACTER TO PATAK +0xB0 0x0E10 # THAI CHARACTER THO THAN +0xB1 0x0E11 # THAI CHARACTER THO NANGMONTHO +0xB2 0x0E12 # THAI CHARACTER THO PHUTHAO +0xB3 0x0E13 # THAI CHARACTER NO NEN +0xB4 0x0E14 # THAI CHARACTER DO DEK +0xB5 0x0E15 # THAI CHARACTER TO TAO +0xB6 0x0E16 # THAI CHARACTER THO THUNG +0xB7 0x0E17 # THAI CHARACTER THO THAHAN +0xB8 0x0E18 # THAI CHARACTER THO THONG +0xB9 0x0E19 # THAI CHARACTER NO NU +0xBA 0x0E1A # THAI CHARACTER BO BAIMAI +0xBB 0x0E1B # THAI CHARACTER PO PLA +0xBC 0x0E1C # THAI CHARACTER PHO PHUNG +0xBD 0x0E1D # THAI CHARACTER FO FA +0xBE 0x0E1E # THAI CHARACTER PHO PHAN +0xBF 0x0E1F # THAI CHARACTER FO FAN +0xC0 0x0E20 # THAI CHARACTER PHO SAMPHAO +0xC1 0x0E21 # THAI CHARACTER MO MA +0xC2 0x0E22 # THAI CHARACTER YO YAK +0xC3 0x0E23 # THAI CHARACTER RO RUA +0xC4 0x0E24 # THAI CHARACTER RU +0xC5 0x0E25 # THAI CHARACTER LO LING +0xC6 0x0E26 # THAI CHARACTER LU +0xC7 0x0E27 # THAI CHARACTER WO WAEN +0xC8 0x0E28 # THAI CHARACTER SO SALA +0xC9 0x0E29 # THAI CHARACTER SO RUSI +0xCA 0x0E2A # THAI CHARACTER SO SUA +0xCB 0x0E2B # THAI CHARACTER HO HIP +0xCC 0x0E2C # THAI CHARACTER LO CHULA +0xCD 0x0E2D # THAI CHARACTER O ANG +0xCE 0x0E2E # THAI CHARACTER HO NOKHUK +0xCF 0x0E2F # THAI CHARACTER PAIYANNOI +0xD0 0x0E30 # THAI CHARACTER SARA A +0xD1 0x0E31 # THAI CHARACTER MAI HAN-AKAT +0xD2 0x0E32 # THAI CHARACTER SARA AA +0xD3 0x0E33 # THAI CHARACTER SARA AM +0xD4 0x0E34 # THAI CHARACTER SARA I +0xD5 0x0E35 # THAI CHARACTER SARA II +0xD6 0x0E36 # THAI CHARACTER SARA UE +0xD7 0x0E37 # THAI CHARACTER SARA UEE +0xD8 0x0E38 # THAI CHARACTER SARA U +0xD9 0x0E39 # THAI CHARACTER SARA UU +0xDA 0x0E3A # THAI CHARACTER PHINTHU +0xDB 0xFFFD # REPLACEMENT CHARACTER +0xDC 0xFFFD # REPLACEMENT CHARACTER +0xDD 0xFFFD # REPLACEMENT CHARACTER +0xDE 0xFFFD # REPLACEMENT CHARACTER +0xDF 0x0E3F # THAI CURRENCY SYMBOL BAHT +0xE0 0x0E40 # THAI CHARACTER SARA E +0xE1 0x0E41 # THAI CHARACTER SARA AE +0xE2 0x0E42 # THAI CHARACTER SARA O +0xE3 0x0E43 # THAI CHARACTER SARA AI MAIMUAN +0xE4 0x0E44 # THAI CHARACTER SARA AI MAIMALAI +0xE5 0x0E45 # THAI CHARACTER LAKKHANGYAO +0xE6 0x0E46 # THAI CHARACTER MAIYAMOK +0xE7 0x0E47 # THAI CHARACTER MAITAIKHU +0xE8 0x0E48 # THAI CHARACTER MAI EK +0xE9 0x0E49 # THAI CHARACTER MAI THO +0xEA 0x0E4A # THAI CHARACTER MAI TRI +0xEB 0x0E4B # THAI CHARACTER MAI CHATTAWA +0xEC 0x0E4C # THAI CHARACTER THANTHAKHAT +0xED 0x0E4D # THAI CHARACTER NIKHAHIT +0xEE 0x0E4E # THAI CHARACTER YAMAKKAN +0xEF 0x0E4F # THAI CHARACTER FONGMAN +0xF0 0x0E50 # THAI DIGIT ZERO +0xF1 0x0E51 # THAI DIGIT ONE +0xF2 0x0E52 # THAI DIGIT TWO +0xF3 0x0E53 # THAI DIGIT THREE +0xF4 0x0E54 # THAI DIGIT FOUR +0xF5 0x0E55 # THAI DIGIT FIVE +0xF6 0x0E56 # THAI DIGIT SIX +0xF7 0x0E57 # THAI DIGIT SEVEN +0xF8 0x0E58 # THAI DIGIT EIGHT +0xF9 0x0E59 # THAI DIGIT NINE +0xFA 0x0E5A # THAI CHARACTER ANGKHANKHU +0xFB 0x0E5B # THAI CHARACTER KHOMUT +0xFC 0xFFFD # REPLACEMENT CHARACTER +0xFD 0xFFFD # REPLACEMENT CHARACTER +0xFE 0xFFFD # REPLACEMENT CHARACTER +0xFF 0xFFFD # REPLACEMENT CHARACTER \ No newline at end of file diff --git a/upload/ips_kernel/i18n/convertcharset/index.html b/upload/ips_kernel/i18n/convertcharset/index.html new file mode 100644 index 00000000..b49fc27d --- /dev/null +++ b/upload/ips_kernel/i18n/convertcharset/index.html @@ -0,0 +1 @@ + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/upload/ips_kernel/i18n/index.html b/upload/ips_kernel/i18n/index.html new file mode 100644 index 00000000..b49fc27d --- /dev/null +++ b/upload/ips_kernel/i18n/index.html @@ -0,0 +1 @@ + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/upload/ips_kernel/index.html b/upload/ips_kernel/index.html index 250b1f72..af2fbe79 100644 --- a/upload/ips_kernel/index.html +++ b/upload/ips_kernel/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

Ошибка русской версии Invision Power Board

-Вы попали на несуществующую страницу!
Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
- - \ No newline at end of file + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/upload/jscripts/folder_rte_files/index.html b/upload/jscripts/folder_rte_files/index.html index 250b1f72..b49fc27d 100644 --- a/upload/jscripts/folder_rte_files/index.html +++ b/upload/jscripts/folder_rte_files/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

Ошибка русской версии Invision Power Board

-Вы попали на несуществующую страницу!
Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
- - \ No newline at end of file + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/upload/jscripts/folder_rte_files/module_bbcodeloader.php b/upload/jscripts/folder_rte_files/module_bbcodeloader.php index 1bfcf50e..25fcf5e7 100644 --- a/upload/jscripts/folder_rte_files/module_bbcodeloader.php +++ b/upload/jscripts/folder_rte_files/module_bbcodeloader.php @@ -1,26 +1,25 @@ - - Добавление BB-кода + Insert Custom BBCode -
-
<{CAT_IMG}> {$this->ipsclass->lang['chat_title']}
-
-
- - - - - - - - - - - - - - Sorry, your browser is not Java enabled, please visit our java support pages - -
-
-
-
-
-
<{CAT_IMG}> {$this->ipsclass->lang['chat_help']}
-
- {$this->ipsclass->lang['chat_help_text']} -
-
-]]> - chat_inline - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/upload/resources/macro.xml b/upload/resources/macro.xml index 5ed126c5..94ed708e 100644 --- a/upload/resources/macro.xml +++ b/upload/resources/macro.xml @@ -1,470 +1,470 @@ - - - - - A_LOCKED_B - /t_closed.gif' border='0' alt='Тема закрыта' />]]> - - - - A_MOVED_B - /t_moved.gif' border='0' alt='Тема перемещена'>]]> - - - - A_POLLONLY_B - /t_closed.gif' border='0' alt='Только опрос (ответы в теме запрещены)' />]]> - - - - A_POST - /t_new.gif' border='0' alt='Открыть тему' />]]> - - - - A_REPLY - /t_reply.gif' border='0' alt='Добавить ответ в эту тему' />]]> - - - - A_POLL - /t_poll.gif' border='0' alt='Открыть тему (с опросом)' />]]> - - - - A_STAR - /pip.gif' border='0' alt='*' />]]> - - - - B_HOT - /f_hot.gif' border='0' alt='Горячая тема (есть новые ответы)' />]]> - - - - B_HOT_NN - /f_hot_no.gif' border='0' alt='Горячая тема (нет новых ответов)' />]]> - - - - B_LOCKED - /f_closed.gif' border='0' alt='Закрытая тема' />]]> - - - - B_MOVED - /f_moved.gif' border='0' alt='Тема перемещена' />]]> - - - - B_NEW - /f_norm.gif' border='0' alt='Открытая тема (есть новые ответы)' />]]> - - - - B_NORM - /f_norm_no.gif' border='0' alt='Открытая тема (нет новых ответов)' />]]> - - - - B_PIN - /f_pinned.gif' border='0' alt='Важная тема' />]]> - - - - B_POLL - /f_poll.gif' border='0' alt='Опрос (есть новые голоса)' />]]> - - - - B_POLL_NN - /f_poll_no.gif' border='0' alt='Опрос (нет новых голосов)' />]]> - - - - B_HOT_DOT - /f_hot_dot.gif' border='0' alt='Горячая тема (есть новые ответы)*'>]]> - - - - B_NEW_DOT - /f_norm_dot.gif' border='0' alt='Открытая тема (есть новые ответы)*'>]]> - - - - B_HOT_NN_DOT - /f_hot_no_dot.gif' border='0' alt='Горячая тема (нет новых ответов)*'>]]> - - - - B_NORM_DOT - /f_norm_no_dot.gif' border='0' alt='Открытая тема (нет новых ответов)*'>]]> - - - - B_POLL_DOT - /f_poll_dot.gif' border='0' alt='Опрос (есть новые голоса)*'>]]> - - - - B_POLL_NN_DOT - /f_poll_no_dot.gif' border='0' alt='Опрос (нет новых голосов)*'>]]> - - - - C_LOCKED - /bf_readonly.gif' border='0' alt='Форум только для чтения' />]]> - - - - C_OFF - /bf_nonew.gif' border='0' alt='Нет новых сообщений' />]]> - - - - C_OFF_CAT - /bc_nonew.gif' border='0' alt='Нет новых сообщений' />]]> - - - - C_OFF_RES - /br_nonew.gif' border='0' alt='Нет новых сообщений' />]]> - - - - C_ON - /bf_new.gif' border='0' alt='Есть новые сообщения' />]]> - - - - C_ON_CAT - /bc_new.gif' border='0' alt='Есть новые сообщения' />]]> - - - - C_ON_RES - /br_new.gif' border='0' alt='Есть новые сообщения' />]]> - - - - F_ACTIVE - /user.gif' border='0' alt='Активные пользователи' />]]> - - - - F_NAV_SEP -  ]]> - - - - F_NAV - /nav.gif' border='0' alt='>' />]]> - - - - F_STATS - /stats.gif' border='0' alt='Статистика форума' />]]> - - - - NO_PHOTO - /nophoto.gif' border='0' alt='Нет фото' />]]> - - - - CAMERA - /camera.gif' border='0' alt='Есть фото' />]]> - - - - M_READ - /f_norm_no.gif' border='0' alt='Прочитанное сообщение' />]]> - - - - M_UNREAD - /f_norm.gif' border='0' alt='Непрочитанное сообщение' />]]> - - - - P_AOL - /p_aim.gif' border='0' alt='AOL' />]]> - - - - P_DELETE - /p_delete.gif' border='0' alt='Удалить сообщение' />]]> - - - - P_EDIT - /p_edit.gif' border='0' alt='Изменить сообщение' />]]> - - - - P_EMAIL - /p_email.gif' border='0' alt='Отправить письмо на e-mail' />]]> - - - - P_ICQ - /p_icq.gif' border='0' alt='ICQ' />]]> - - - - P_MSG - /p_pm.gif' border='0' alt='Отправить личное сообщение' />]]> - - - - P_QUOTE - /p_quote.gif' border='0' alt='Ответить с цитированием данного сообщения' />]]> - - - - P_WEBSITE - /p_www.gif' border='0' alt='Домашняя страница' />]]> - - - - P_YIM - /p_yim.gif' border='0' alt='Yahoo' />]]> - - - - P_REPORT - /p_report.gif' border='0' alt='Известить модератора об этом сообщении' />]]> - - - - P_MSN - /p_msn.gif' border='0' alt='MSN' />]]> - - - - CAT_IMG - /nav_m.gif' border='0' alt='>' width='8' height='8' />]]> - - - - NEW_POST - /newpost.gif' border='0' alt='Перейти к последнему непрочитанному сообщению' hspace=2>]]> - - - - LAST_POST - /lastpost.gif' border='0' alt='Последнее сообщение' />]]> - - - - BR_REDIRECT - /br_redirect.gif' border='0' alt='Переадресация' />]]> - - - - INTEGRITY_MSGR - /p_im.gif' border='0' alt='Integrity Messenger IM' />]]> - - - - ADDRESS_CARD - /addresscard.gif' border='0' alt='Карточка пользователя' />]]> - - - - T_QREPLY - /t_qr.gif' border='0' alt='Быстрый ответ' />]]> - - - - T_OPTS - /t_options.gif' border='0' alt='Опции темы' />]]> - - - - CAL_NEWEVENT - /cal_newevent.gif' border='0' alt='Добавить новое событие' />]]> - - - - F_RULES - /forum_rules.gif' border='0' alt='Правила этого форума' />]]> - - - - WARN_0 - /warn0.gif' border='0' alt='-----' />]]> - - - - WARN_1 - /warn1.gif' border='0' alt='X----' />]]> - - - - WARN_2 - /warn2.gif' border='0' alt='XX---' />]]> - - - - WARN_3 - /warn3.gif' border='0' alt='XXX--' />]]> - - - - WARN_4 - /warn4.gif' border='0' alt='XXXX-' />]]> - - - - WARN_5 - /warn5.gif' border='0' alt='XXXXX' />]]> - - - - WARN_ADD - /warn_add.gif' border='0' alt='+' />]]> - - - - WARN_MINUS - /warn_minus.gif' border='0' alt='-' />]]> - - - - PB_USER_ONLINE - /p_online.gif' border='0' alt='Пользователь в онлайне!' />]]> - - - - PB_USER_OFFLINE - /p_offline.gif' border='0' alt='Пользователь в офлайне' />]]> - - - - ATTACH_ICON - /attachicon.gif' border='0' alt='Тема имеет прикрепленные файлы' />]]> - - - - MSG_FOLDER - /msg_folder.gif' border='0' alt='-' />]]> - - - - ITEM_START - /nav_m_dark.gif' border='0' alt='.' />]]> - - - - ACTIVE_LIST_SEP - , - - - - BC_QUEUED_POSTS - /bc_queued.gif' alt='*' border='0' />]]> - - - - A_APOLL - /t_addpoll.gif' border='0' alt='Добавить опрос' />]]> - - - - F_CALEN - /calen.gif' border='0' alt='Календарь' />]]> - - - - E_PLUS - /exp_plus.gif' border='0' alt='Развернуть' />]]> - - - - E_MINUS - /exp_minus.gif' border='0' alt='Свернуть' />]]> - - - - test - test - - - - P_UP - /p_up.gif' border='0' alt='Вернуться в начало страницы' />]]> - - - - POST_SNAPBACK - /post_snapback.gif' alt='*' border='0' />]]> - - - - P_CARD - /p_card.gif' border='0' alt='Карточка пользователя' />]]> - - - - PRO_AIM - /profile_aim.gif' border='0' alt='AIM' />]]> - - - - PRO_ITEM - /profile_item.gif' border='0' alt='Опции профиля' />]]> - - - - PRO_MSN - /profile_msn.gif' border='0' alt='MSN' />]]> - - - - PRO_ICQ - /profile_icq.gif' border='0' alt='ICQ' />]]> - - - - PRO_YIM - /profile_yahoo.gif' border='0' alt='Yahoo' />]]> - - - - PRO_CONTACT - /icon_msg_nonew.gif' border='0' alt='Контакт' />]]> - - - - BAR_LEFT - /bar_left.gif' border='0' alt='*' />]]> - - - - BAR_RIGHT - /bar_right.gif' border='0' alt='*' />]]> - - - - CAL_GOTO - /cal_goto.gif' border='0' alt='Перейти к месяцу' />]]> - - - - F_NORM_HOT - f_hot_no.gif - - - - F_CLOSED - f_closed.gif - - - - F_NORM - f_norm_no.gif - - - + + + + + A_LOCKED_B + /t_closed.gif' border='0' alt='Closed Topic' />]]> + + + + A_MOVED_B + /t_moved.gif' border='0' alt='Moved Topic'>]]> + + + + A_POLLONLY_B + /t_closed.gif' border='0' alt='Poll Only' />]]> + + + + A_POST + /t_new.gif' border='0' alt='Start new topic' />]]> + + + + A_REPLY + /t_reply.gif' border='0' alt='Reply to this topic' />]]> + + + + A_POLL + /t_poll.gif' border='0' alt='Start Poll' />]]> + + + + A_STAR + /pip.gif' border='0' alt='*' />]]> + + + + B_HOT + /f_hot.gif' border='0' alt='Hot topic' />]]> + + + + B_HOT_NN + /f_hot_no.gif' border='0' alt='No new' />]]> + + + + B_LOCKED + /f_closed.gif' border='0' alt='Closed' />]]> + + + + B_MOVED + /f_moved.gif' border='0' alt='Moved' />]]> + + + + B_NEW + /f_norm.gif' border='0' alt='New Posts' />]]> + + + + B_NORM + /f_norm_no.gif' border='0' alt='No New Posts' />]]> + + + + B_PIN + /f_pinned.gif' border='0' alt='Pinned' />]]> + + + + B_POLL + /f_poll.gif' border='0' alt='Poll' />]]> + + + + B_POLL_NN + /f_poll_no.gif' border='0' alt='No new votes' />]]> + + + + B_HOT_DOT + /f_hot_dot.gif' border='0' alt='New Posts' />]]> + + + + B_NEW_DOT + /f_norm_dot.gif' border='0' alt='No New Posts' />]]> + + + + B_HOT_NN_DOT + /f_hot_no_dot.gif' border='0' alt='No New Posts*' />]]> + + + + B_NORM_DOT + /f_norm_no_dot.gif' border='0' alt='No New Posts*' />]]> + + + + B_POLL_DOT + /f_poll_dot.gif' border='0' alt='Poll*' />]]> + + + + B_POLL_NN_DOT + /f_poll_no_dot.gif' border='0' alt='No New Votes*' />]]> + + + + C_LOCKED + /bf_readonly.gif' border='0' alt='Read Only Forum' />]]> + + + + C_OFF + /bf_nonew.gif' border='0' alt='No New Posts' />]]> + + + + C_OFF_CAT + /bc_nonew.gif' border='0' alt='No New Posts' />]]> + + + + C_OFF_RES + /br_nonew.gif' border='0' alt='No New Posts' />]]> + + + + C_ON + /bf_new.gif' border='0' alt='New Posts' />]]> + + + + C_ON_CAT + /bc_new.gif' border='0' alt='New Posts' />]]> + + + + C_ON_RES + /br_new.gif' border='0' alt='New Posts' />]]> + + + + F_ACTIVE + /user.gif' border='0' alt='Active Users' />]]> + + + + F_NAV_SEP + + + + + F_NAV + /nav.gif' border='0' alt='>' />]]> + + + + F_STATS + /stats.gif' border='0' alt='Board Stats' />]]> + + + + NO_PHOTO + /nophoto.gif' border='0' alt='No Photo' />]]> + + + + CAMERA + /camera.gif' border='0' alt='Photo' />]]> + + + + M_READ + /f_norm_no.gif' border='0' alt='Read Msg' />]]> + + + + M_UNREAD + /f_norm.gif' border='0' alt='Unread Msg' />]]> + + + + P_AOL + /p_aim.gif' border='0' alt='AOL' />]]> + + + + P_DELETE + /p_delete.gif' border='0' alt='Delete Post' />]]> + + + + P_EDIT + /p_edit.gif' border='0' alt='Edit Post' />]]> + + + + P_EMAIL + /p_email.gif' border='0' alt='Email Poster' />]]> + + + + P_ICQ + /p_icq.gif' border='0' alt='ICQ' />]]> + + + + P_MSG + /p_pm.gif' border='0' alt='PM' />]]> + + + + P_QUOTE + /p_quote.gif' border='0' alt='Quote Post' />]]> + + + + P_WEBSITE + /p_www.gif' border='0' alt='Users Website' />]]> + + + + P_YIM + /p_yim.gif' border='0' alt='Yahoo' />]]> + + + + P_REPORT + /p_report.gif' border='0' alt='Report Post' />]]> + + + + P_MSN + /p_msn.gif' border='0' alt='MSN' />]]> + + + + CAT_IMG + /nav_m.gif' border='0' alt='>' width='8' height='8' />]]> + + + + NEW_POST + /newpost.gif' border='0' alt='Go to first unread' title='Go to first unread' hspace='2' />]]> + + + + LAST_POST + /lastpost.gif' border='0' alt='Last Post' />]]> + + + + BR_REDIRECT + /br_redirect.gif' border='0' alt='Redirect' />]]> + + + + INTEGRITY_MSGR + /p_im.gif' border='0' alt='Integrity Messenger IM' />]]> + + + + ADDRESS_CARD + /addresscard.gif' border='0' alt='Mini Profile' />]]> + + + + T_QREPLY + /t_qr.gif' border='0' alt='Fast Reply' />]]> + + + + T_OPTS + /t_options.gif' border='0' alt='Topic Options' />]]> + + + + CAL_NEWEVENT + /cal_newevent.gif' border='0' alt='Add New Event' />]]> + + + + F_RULES + /forum_rules.gif' border='0' alt='Forum Rules' />]]> + + + + WARN_0 + /warn0.gif' border='0' alt='-----' />]]> + + + + WARN_1 + /warn1.gif' border='0' alt='X----' />]]> + + + + WARN_2 + /warn2.gif' border='0' alt='XX---' />]]> + + + + WARN_3 + /warn3.gif' border='0' alt='XXX--' />]]> + + + + WARN_4 + /warn4.gif' border='0' alt='XXXX-' />]]> + + + + WARN_5 + /warn5.gif' border='0' alt='XXXXX' />]]> + + + + WARN_ADD + /warn_add.gif' border='0' alt='+' />]]> + + + + WARN_MINUS + /warn_minus.gif' border='0' alt='-' />]]> + + + + PB_USER_ONLINE + /p_online.gif' border='0' alt='User is online!' />]]> + + + + PB_USER_OFFLINE + /p_offline.gif' border='0' alt='User is offline' />]]> + + + + ATTACH_ICON + /attachicon.gif' border='0' alt='Topic has attachments' />]]> + + + + MSG_FOLDER + /msg_folder.gif' border='0' alt='-' />]]> + + + + ITEM_START + /nav_m_dark.gif' border='0' alt='.' />]]> + + + + ACTIVE_LIST_SEP + , + + + + BC_QUEUED_POSTS + /bc_queued.gif' alt='*' border='0' />]]> + + + + A_APOLL + /t_addpoll.gif' border='0' alt='Add Poll' />]]> + + + + F_CALEN + /calen.gif' border='0' alt='calendar' />]]> + + + + E_PLUS + /exp_plus.gif' border='0' alt='Expand' />]]> + + + + E_MINUS + /exp_minus.gif' border='0' alt='Collapse' />]]> + + + + test + test + + + + P_UP + /p_up.gif' border='0' alt='Go to the top of the page' />]]> + + + + POST_SNAPBACK + /post_snapback.gif' alt='*' border='0' />]]> + + + + P_CARD + /p_card.gif' border='0' alt='Profile Card' />]]> + + + + PRO_AIM + /profile_aim.gif' border='0' alt='AIM' />]]> + + + + PRO_ITEM + /profile_item.gif' border='0' alt='Profile Item' />]]> + + + + PRO_MSN + /profile_msn.gif' border='0' alt='MSN' />]]> + + + + PRO_ICQ + /profile_icq.gif' border='0' alt='ICQ' />]]> + + + + PRO_YIM + /profile_yahoo.gif' border='0' alt='Yahoo' />]]> + + + + PRO_CONTACT + /icon_msg_nonew.gif' border='0' alt='Contact' />]]> + + + + BAR_LEFT + /bar_left.gif' border='0' alt='*' />]]> + + + + BAR_RIGHT + /bar_right.gif' border='0' alt='*' />]]> + + + + CAL_GOTO + /cal_goto.gif' border='0' alt='Goto Month' />]]> + + + + F_NORM_HOT + f_hot_no.gif + + + + F_CLOSED + f_closed.gif + + + + F_NORM + f_norm_no.gif + + + \ No newline at end of file diff --git a/upload/resources/settings.xml b/upload/resources/settings.xml index 28bf9ac5..53ce4c2b 100644 --- a/upload/resources/settings.xml +++ b/upload/resources/settings.xml @@ -1,6763 +1,6838 @@ - - - - - 1 - ipbloginhandler - - - 1 - - - - - 119 - - - 36 - input - ipbli_key - - internal - - - 1 - 1 - - 0 - - 1 - ipbloginhandler - 0 - - - - 120 - - - 36 - input - ipbli_usertype - - username - - - 1 - 2 - - 0 - - 1 - ipbloginhandler - 0 - - - - 1 - ipbreg - - - 0 - - - - - 116 - - Не удаляйте и не изменяйте этот ключ, пока вы на 100% не уверены в том, что делаете!]]> - 16 - input - ipb_reg_number - - - - - 1 - 1 - - 0 - - 1 - ipbreg - 0 - - - - 117 - - - 16 - yes_no - ipb_reg_show - - 0 - - - 1 - 2 - - 0 - - 1 - ipbreg - 0 - - - - 118 - - Например: Иван Иванов, IBResource]]> - 16 - input - ipb_reg_name - - - - - 1 - 3 - - 0 - - 1 - ipbreg - 0 - - - - 1 - ipbportal - - - 0 - - - - - 121 - - - 18 - yes_no - csite_on - - 1 - - - 1 - 1 - - 0 - - 1 - ipbportal - 0 - - - - 122 - - - 18 - input - csite_title - - - - - 1 - 2 - - 0 - - 1 - ipbportal - 0 - - - - 123 - - даты в PHP]]> - 18 - input - csite_article_date - - j.n.Y, G:i - - - 1 - 3 - - 0 - - 0 - ipbportal - 0 - - - - 124 - - - 18 - yes_no - csite_pm_show - - 1 - - - 1 - 12 - - 0 - - 0 - ipbportal - 0 - - - - 125 - - - 18 - yes_no - csite_search_show - - 1 - - - 1 - 14 - - 0 - - 0 - ipbportal - 0 - - - - 126 - - - 18 - yes_no - csite_skinchange_show - - 1 - - - 1 - 15 - - 0 - - 0 - ipbportal - 0 - - - - 127 - - - 18 - yes_no - csite_nav_show - - 1 - - - 1 - 18 - - 0 - - 0 - ipbportal - 0 - - - - 128 - - http://www.ibresource.ru [IBResource]

Запись {board_url} будет заменена на URL вашего форума]]>
- 18 - textarea - csite_nav_contents - - - - - 1 - 19 - - 0 - - 0 - ipbportal - 0 -
- - - 129 - - - 18 - yes_no - csite_fav_show - - 0 - - - 1 - 20 - - 0 - - 0 - ipbportal - 0 - - - - 130 - - - 18 - textarea - csite_fav_contents - - - - - 1 - 21 - - 1 - - 0 - ipbportal - 0 - - - - 1 - ipbcopyright - - - 1 - - - - - 114 - - - 35 - input - ipb_copy_number - - - - - 1 - 1 - - 0 - - 1 - ipbcopyright - 0 - - - - 115 - - - 35 - yes_no - ips_cp_purchase - - 0 - - - 1 - 2 - - 0 - - 1 - ipbcopyright - 0 - - - - 1 - boardoffline - - - 0 - - - - - 6 - - - 2 - yes_no - board_offline - - 0 - - - 1 - 1 - - 0 - - 1 - boardoffline - 0 - - - - 7 - - - 2 - editor - offline_msg - - - - - 1 - 2 - - 0 - - 0 - boardoffline - 0 - - - - 1 - calendar - - - 0 - - - - - 8 - - - 3 - yes_no - show_bday_calendar - - 1 - - - 1 - 1 - - 0 - - 1 - calendar - 0 - - - - 9 - - - 3 - yes_no - show_birthdays - - 1 - - - 1 - 2 - - 0 - - 1 - calendar - 0 - - - - 10 - - - 3 - yes_no - autohide_bday - - 0 - - - 1 - 3 - - 1 - - 1 - calendar - 0 - - - - 11 - - Опция не действует на повторяющиеся или многодневным события.]]> - 3 - yes_no - show_calendar - - 1 - - - 1 - 4 - - 0 - - 1 - calendar - 0 - - - - 12 - - - 3 - yes_no - autohide_calendar - - 0 - - - 1 - 5 - - 0 - - 1 - calendar - 0 - - - - 13 - - - 3 - input - calendar_limit - - 5 - - - 1 - 6 - - 1 - - 1 - calendar - 0 - - - - 14 - - - 3 - input - start_year - - 2007 - - - 1 - 7 - - 0 - - 1 - calendar - 0 - - - - 15 - - - 3 - input - year_limit - - 5 - - - 1 - 8 - - 0 - - 1 - calendar - 0 - - - - 16 - - - 3 - yes_no - ipb_calendar_mon - - 1 - - - 1 - 9 - - 0 - - 1 - calendar - 0 - - - - 1 - ipconvergepublic - - - 0 - - - - - 110 - - Внимание
IP.Converge находится на стадии бета-тестирования. Включение этой опции может подвергнуть большому риску безопасность вашего форума.
]]> - 13 - yes_no - ipconverge_public_enable - - 0 - - - 1 - 1 - - 1 - - 1 - ipconvergepublic - 0 - - - - 1 - personalmessagesetup - - - 0 - - - - - 140 - - - 21 - yes_no - msg_allow_code - - 1 - - - 1 - 1 - - 0 - - 1 - personalmessagesetup - 0 - - - - 141 - - - 21 - yes_no - msg_allow_html - - 0 - - - 1 - 2 - - 0 - - 1 - personalmessagesetup - 0 - - - - 142 - - По умолчанию — 50.]]> - 21 - input - show_max_msg_list - - 50 - - - 1 - 3 - - 0 - - 1 - personalmessagesetup - 0 - - - - 143 - - Вы можете выбрать несколько групп.]]> - 21 - multi - unblockable_pm_groups - - - #show_groups# - - 1 - 4 - - 0 - - 1 - personalmessagesetup - 0 - - - - 144 - - Вы можете выбрать несколько групп.]]> - 21 - multi - override_inbox_full - - - #show_groups# - - 1 - 5 - - 0 - - 1 - personalmessagesetup - 0 - - - - 1 - cookies - - - 0 - - - - - 17 - - Совет: используйте .your-domain.ru для глобальных cookies.]]> - 4 - input - cookie_domain - - - - - 1 - 1 - - 0 - - 1 - cookies - 0 - - - - 18 - - - 4 - input - cookie_id - - - - - 1 - 2 - - 0 - - 1 - cookies - 0 - - - - 19 - - - 4 - input - cookie_path - - - - - 1 - 3 - - 0 - - 1 - cookies - 0 - - - - 20 - - Выключите, если у пользователей возникают проблемы при авторизации.]]> - 4 - yes_no - cookie_stronghold - - 1 - - - 1 - 4 - - 1 - - 1 - cookies - 0 - - - - 1 - newssetup - - - 0 - - - - - 138 - - - 20 - dropdown - news_forum_id - - - #show_forums# - - 1 - 1 - - 0 - - 1 - newssetup - 0 - - - - 139 - - - 20 - yes_no - index_news_link - - 0 - - - 1 - 2 - - 0 - - 1 - newssetup - 0 - - - - 1 - email - - - 0 - - - - - 50 - - - 9 - input - email_in - - - - - 1 - 1 - - 0 - - 1 - email - 0 - - - - 51 - - - 9 - input - email_out - - - - - 1 - 2 - - 1 - - 1 - email - 0 - - - - 52 - - - 9 - dropdown - mail_method - - mail - mail=PHP Mail() -smtp=SMTP - - 1 - 3 - - 0 - - 1 - email - 0 - - - - 53 - - - 9 - input - smtp_host - - localhost - - - 1 - 4 - - 0 - - 1 - email - 0 - - - - 54 - - - 9 - input - smtp_port - - 25 - - - 1 - 5 - - 0 - - 1 - email - 0 - - - - 56 - - - 9 - input - smtp_user - - - - - 1 - 6 - - 0 - - 1 - email - 0 - - - - 55 - - - 9 - yes_no - mail_wrap_brackets - - 0 - - - 1 - 6 - - 0 - - 1 - email - 0 - - - - 57 - - - 9 - input - smtp_pass - - - - - 1 - 7 - - 1 - - 1 - email - 0 - - - - 58 - - - 9 - input - php_mail_extra - - - - - 1 - 8 - - 1 - - 1 - email - 0 - - - - 1 - ipconverge - - - 1 - - - - - 111 - - - 34 - yes_no - ipconverge_enabled - - 0 - - - 1 - 1 - - 0 - - 1 - ipconverge - 0 - - - - 112 - - - 34 - input - ipconverge_url - - - - - 1 - 2 - - 0 - - 1 - ipconverge - 0 - - - - 113 - - - 34 - input - ipconverge_pid - - - - - 1 - 3 - - 0 - - 1 - ipconverge - 0 - - - - 1 - securityandprivacy - - - 0 - securityandprivacy.php - - - - 160 - - - 26 - dropdown - bot_antispam - - gif - - - 1 - 1 - - 0 - s_reg_antispam - 1 - securityandprivacy - 0 - - - - 161 - - - 26 - yes_no - captcha_allow_fonts - - 1 - - - 1 - 2 - - 0 - - 1 - securityandprivacy - 0 - - - - 162 - - - 26 - dropdown - guest_captcha - - 0 - - - 1 - 6 - - 1 - - 1 - securityandprivacy - 0 - - - - 163 - - Это может быть использовано, например, для создания случайных изображений в подписи и т.д., но пользователи также смогут публиковать вредоносные скрипты, которые могут угрожать безопасности форума.]]> - 26 - yes_no - allow_dynamic_img - - 0 - - - 1 - 10 - - 0 - - 1 - securityandprivacy - 0 - - - - 164 - - - 26 - yes_no - xforward_matching - - 0 - - - 1 - 11 - - 0 - - 1 - securityandprivacy - 0 - - - - 165 - - - 26 - dropdown - lp_method - - random - - - 1 - 12 - - 0 - - 1 - securityandprivacy - 0 - - - - 166 - - - 26 - dropdown - login_key_expire - - 7 - - - 1 - 12 - - 0 - - 1 - securityandprivacy - 0 - - - - 167 - - - 26 - yes_no - login_change_key - - 0 - - - 1 - 12 - - 0 - - 1 - securityandprivacy - 0 - - - - 168 - - - 26 - input - session_expiration - - 3600 - - - 1 - 13 - - 0 - - 1 - securityandprivacy - 0 - - - - 169 - - - 26 - yes_no - match_ipaddress - - 1 - - - 1 - 14 - - 0 - - 1 - securityandprivacy - 0 - - - - 170 - - - 26 - yes_no - match_browser - - 0 - - - 1 - 15 - - 1 - - 1 - securityandprivacy - 0 - - - - 171 - - Совет: введите ноль для отключения проверки.]]> - 26 - input - ipb_bruteforce_attempts - - 3 - - - 1 - 20 - - 0 - - 1 - securityandprivacy - 0 - - - - 172 - - - 26 - input - ipb_bruteforce_period - - 15 - - - 1 - 21 - - 0 - - 1 - securityandprivacy - 0 - - - - 173 - - -Совет: включив автоматическую разблокировку, вам не нужно будет разблокировать учетные записи пользователей через вкладку «Управление».]]> - 26 - yes_no - ipb_bruteforce_unlock - - 1 - - - 1 - 22 - - 1 - - 1 - securityandprivacy - 0 - - - - 174 - - - 26 - yes_no - use_mail_form - - 1 - - - 1 - 30 - - 0 - - 1 - securityandprivacy - 0 - - - - 175 - - - 26 - yes_no - allow_images - - 1 - - - 1 - 31 - - 0 - - 1 - securityandprivacy - 0 - - - - 176 - - - 26 - yes_no - allow_flash - - 0 - - - 1 - 32 - - 1 - - 1 - securityandprivacy - 0 - - - - 177 - - Полезно использовать в тех случаях, когда вы переименовали директорию админцентра.]]> - 26 - yes_no - security_remove_acp_link - - 0 - - - 1 - 33 - - 0 - - 1 - securityandprivacy - 0 - - - - 178 - - a-zA-Z0-9.
Поле необязательно к заполнению.]]>
- 26 - input - username_characters - - - - - 1 - 37 - - 0 - - 1 - securityandprivacy - 0 -
- - - 179 - - Совет: Используйте {chars} для отображения набора разрешенных символов в имени пользователя.]]> - 26 - input - username_errormsg - - - - - 1 - 38 - - 0 - - 1 - securityandprivacy - 0 - - - - 180 - - - 26 - dropdown - reg_auth_type - - 0 - - - 1 - 40 - - 0 - - 1 - securityandprivacy - 0 - - - - 181 - - - 26 - input - validate_day_prune - - 0 - - - 1 - 41 - - 0 - - 1 - securityandprivacy - 0 - - - - 182 - - - 26 - yes_no - new_reg_notify - - 0 - - - 1 - 42 - - 0 - - 1 - securityandprivacy - 0 - - - - 183 - - - 26 - yes_no - force_login - - 0 - - - 1 - 43 - - 0 - - 1 - securityandprivacy - 0 - - - - 184 - - - 26 - yes_no - no_reg - - 0 - - - 1 - 44 - - 0 - - 1 - securityandprivacy - 0 - - - - 185 - - chr(0xCA) — позволяют создавать «невидимые» пробелы в информации отправляемой форуму.]]> - 26 - yes_no - strip_space_chr - - 0 - - - 1 - 45 - - 0 - - 1 - securityandprivacy - 0 - - - - 186 - - - 26 - yes_no - disable_reportpost - - 0 - - - 1 - 46 - - 0 - - 1 - securityandprivacy - 0 - - - - 187 - - - 26 - dropdown - reportpost_method - - pm - - - 1 - 47 - - 0 - - 1 - securityandprivacy - 0 - - - - 188 - - Оставьте поле пустым для отключения флуд-контроля.]]> - 26 - input - flood_control - - 0 - - - 1 - 48 - - 1 - - 1 - securityandprivacy - 0 - - - - 189 - /conf_title> - - 26 - yes_no - allow_online_list - - 1 - - - 1 - 50 - - 0 - - 1 - securityandprivacy - 0 - - - - 190 - - - 26 - yes_no - disable_anonymous - - 0 - - - 1 - 51 - - 0 - - 1 - securityandprivacy - 0 - - - - 192 - - - 26 - yes_no - ipb_display_version - - 1 - - - 1 - 51 - - 0 - - 1 - securityandprivacy - 0 - - - - 191 - - - 26 - yes_no - disable_admin_anon - - 0 - - - 1 - 51 - - 0 - - 1 - securityandprivacy - 0 - - - - 193 - - - 26 - yes_no - disable_online_ip - - 0 - - - 1 - 53 - - 1 - - 1 - securityandprivacy - 0 - - - - - 1 - cpusaving - - - 0 - - - - - 24 - - - 6 - yes_no - custom_profile_topic - - 1 - - - 1 - 1 - - 0 - 0 - 1 - cpusaving - 0 - - - - 25 - - Не рекомендуется включать этвозможность, если форум ежедневно не посещается.]]> - 6 - yes_no - cache_calendar - - 1 - - - 1 - 2 - - 0 - 0 - 1 - cpusaving - 0 - - - - 28 - - - 6 - yes_no - update_topic_views_immediately - - 1 - - - 1 - 3 - - 0 - - 1 - cpusaving - 0 - - - - 26 - - - 6 - input - au_cutoff - - 15 - - - 1 - 3 - - 0 - 0 - 1 - cpusaving - 0 - - - - 27 - - Введите в поле 0 для отключения отслеживания прочитанных тем с помощью базы данных.]]> - 6 - input - db_topic_read_cutoff - - 7 - - - 1 - 3 - - 0 - - 1 - cpusaving - 0 - - - - 29 - - - 6 - yes_no - show_user_posted - - 1 - - - 1 - 4 - - 1 - 0 - 1 - cpusaving - 0 - - - - 30 - - - 6 - yes_no - no_au_forum - - 0 - no_au_forum - - 1 - 5 - - 0 - 0 - 1 - cpusaving - 0 - - - - 31 - - - 6 - yes_no - no_au_topic - - 0 - - - 1 - 6 - - 0 - 0 - 1 - cpusaving - 0 - - - - 32 - - - 6 - yes_no - show_active - - 1 - - - 1 - 7 - - 0 - 0 - 1 - cpusaving - 0 - - - - 33 - - - 6 - yes_no - allow_search - - 1 - - - 1 - 8 - - 0 - 0 - 1 - cpusaving - 0 - - - - 34 - - - 6 - yes_no - show_totals - - 1 - - - 1 - 9 - - 1 - 0 - 1 - cpusaving - 0 - - - - 35 - - - 6 - input - load_limit - - - - - 1 - 10 - - 0 - 0 - 1 - cpusaving - 0 - - - - 36 - - -Внимание: Чтобы эта опция работала, необходимо, чтобы другая опция «Принудительно отправлять HTTP заголовки?» была включена.]]> - 6 - yes_no - nocache - - 1 - - - 1 - 14 - - 0 - 0 - 1 - cpusaving - 0 - - - - 38 - - - 6 - yes_no - disable_subforum_show - - 0 - - - 1 - 15 - - 0 - - 1 - cpusaving - 0 - - - - 37 - - Оставьте это поле пустым, если хотите, чтобы при поиске сообщение всегда выводилось полностью.]]> - 6 - input - search_post_cut - - - - - 1 - 15 - - 0 - 0 - 1 - cpusaving - 0 - - - - 39 - - - 6 - yes_no - short_forum_jump - - 0 - short_forum_jump - - 1 - 16 - - 1 - 0 - 1 - cpusaving - 0 - - - - 1 - trashcansetup - - - 0 - trashcan.php - - - - 244 - - - 29 - yes_no - forum_trash_can_enable - - 0 - - - 1 - 1 - - 0 - - 1 - trashcansetup - 0 - - - - 245 - - - 29 - dropdown - forum_trash_can_id - - - #show_forums# - - 1 - 2 - - 0 - - 1 - trashcansetup - 0 - - - - 246 - - - 29 - yes_no - forum_trash_can_use_radmin - - 1 - - - 1 - 3 - - 0 - - 1 - trashcansetup - 0 - - - - 247 - - - 29 - yes_no - forum_trash_can_use_admin - - 1 - - - 1 - 4 - - 0 - - 1 - trashcansetup - 0 - - - - 248 - - - 29 - yes_no - forum_trash_can_use_smod - - 1 - - - 1 - 5 - - 0 - - 1 - trashcansetup - 0 - - - - 249 - - - 29 - yes_no - forum_trash_can_use_mod - - 1 - - - 1 - 6 - - 0 - - 1 - trashcansetup - 0 - - - - 1 - converge - - - 0 - - - - - 48 - - необходима, когда используются внешние методы авторизации.]]> - 8 - yes_no - auth_allow_dnames - - 0 - - - 1 - 1 - - 0 - - 1 - converge - 0 - - - - 49 - - Иначе, никто не сможет выбрать отображаемое имя такое же, как и у другого пользователя.]]> - 8 - yes_no - auth_dnames_nologinname - - 1 - - - 1 - 3 - - 1 - - 1 - converge - 0 - - - - 1 - general - - - 0 - - - - - 59 - - - 10 - input - board_name - - - - - 1 - 1 - - 0 - 0 - 1 - general - 0 - - - - 60 - - - 10 - input - home_name - - - - - 1 - 3 - - 0 - 0 - 1 - general - 0 - - - - 61 - - - 10 - input - home_url - - - - - 1 - 4 - - 1 - 0 - 1 - general - 0 - - - - 62 - - ]]> - 10 - input - upload_url - - - - ipsclass->my_getenv( 'SERVER_NAME' ); - $this_script = $this->ipsclass->my_getenv( 'SCRIPT_NAME' ); - - if( $this_host AND $this_script ) - { - $this_script = str_replace( '/'.IPB_ACP_DIRECTORY.'/index.php', '/uploads', $this_script ); - - $r['conf_description'] = str_replace( "", "
IP.Board определил следующий адрес директории загрузок:
http://".$this_host.$this_script, $r['conf_description'] ); - } -}]]>
- 1 - 5 - - 0 - 0 - 1 - general - 0 -
- - - 63 - - ]]> - 10 - input - upload_dir - - - upload_dir - ipsclass->my_getenv( 'SCRIPT_FILENAME' ) ); - - if( $this_script ) - { - $this_script = str_replace( '/'.IPB_ACP_DIRECTORY.'/index.php', '/uploads', $this_script ); - - $r['conf_description'] = str_replace( "", "
IP.Board определил следующий путь к директории загрузок:
".$this_script, $r['conf_description'] ); - } -}]]>
- 1 - 7 - - 0 - 0 - 1 - general - 0 -
- - - 66 - - Необязательно к заполнению
Полезно если вы желаете разместить изображения на другом сервере или используется кластерный сервер.
При указании пути, убедитесь, что он заканчиваеся «слэшем».]]>
- 10 - input - ipb_img_url - - - - - 1 - 8 - - 0 - - 1 - general - 0 -
- - - 65 - - - 10 - input - gb_char_set - - windows-1251 - - - 1 - 8 - - 0 - - 1 - general - 0 - - - - 64 - - Необязательно к заполнению.
Путь на сервере для записи файлов IPB (/skin_cache/, /style_avatars/, /style_emoticons/, /style_images/), полезно когда используете кластеры.
При указании пути, убедитесь, что он заканчиваеся «слэшем».]]>
- 10 - input - ipb_cache_path - - - - - 1 - 8 - - 0 - - 1 - general - 0 -
- - - 67 - /conf_title> - - 10 - yes_no - print_headers - - 0 - - - 1 - 9 - - 1 - 0 - 1 - general - 0 - - - - 68 - - - 10 - dropdown - header_redirect - - location - - - 1 - 11 - - 0 - 0 - 1 - general - 0 - - - - 69 - - Включается в целях экономии трафика.]]> - 10 - yes_no - ipb_remove_redirect_pages - - 0 - - - 1 - 12 - - 1 - - 1 - general - 0 - - - - 71 - - - 10 - yes_no - disable_gzip - - 0 - - - 1 - 14 - - 0 - 0 - 1 - general - 0 - - - - 70 - - - 10 - dropdown - debug_level - - 0 - - - 1 - 14 - - 0 - 0 - 1 - general - 0 - - - - 72 - - - 10 - yes_no - safe_mode_skins - - 0 - - - 1 - 16 - - 0 - 0 - 1 - general - 0 - - - - 73 - - В России, как правило, для этих целей используется «пробел».]]> - 10 - dropdown - number_format - - space - - - 1 - 17 - - 0 - 0 - 1 - general - 0 - - - - 74 - - - 10 - dropdown - decimal_seperator - - . - .=. -,=, - - 1 - 18 - - 1 - - 1 - general - 0 - - - - 75 - - Если получаете ошибки, выбрав GD2, пожалуйста, выберите GD1.]]> - 10 - dropdown - gd_version - - 2 - 1=GD1 -2=GD2 - - 1 - 19 - - 0 - - 1 - general - 0 - - - - 1 - log_prune - - - 0 - - - - - 131 - - - 19 - yes_no - ipb_prune_spider - - 0 - - - 1 - 10 - - 0 - - 1 - log_prune - 0 - - - - 132 - - - 19 - yes_no - ipb_prune_task - - 0 - - - 1 - 20 - - 0 - - 1 - log_prune - 0 - - - - 133 - - - 19 - yes_no - ipb_prune_admin - - 0 - - - 1 - 30 - - 0 - - 1 - log_prune - 0 - - - - 134 - - - 19 - yes_no - ipb_prune_mod - - 0 - - - 1 - 40 - - 0 - - 1 - log_prune - 0 - - - - 135 - - - 19 - yes_no - ipb_prune_email - - 0 - - - 1 - 50 - - 0 - - 1 - log_prune - 0 - - - - 136 - - - 19 - yes_no - ipb_prune_emailerror - - 0 - - - 1 - 60 - - 0 - - 1 - log_prune - 0 - - - - 137 - - - 19 - yes_no - ipb_prune_sql - - 1 - - - 1 - 61 - - 1 - - 1 - log_prune - 0 - - - - 1 - subsmanager - - - 1 - - - - - 194 - - - 27 - yes_no - subsm_show_reg - - 0 - - - 1 - 1 - - 1 - - 1 - subsmanager - 0 - - - - 195 - - - 27 - yes_no - subsm_enforce - - 0 - - - 1 - 2 - - 0 - - 1 - subsmanager - 0 - - - - 196 - - - 27 - dropdown - subsm_nopkg_group - - 1 - #show_groups# - - 1 - 3 - - 1 - - 1 - subsmanager - 0 - - - - 1 - searchsetup - - - 0 - - - - - 156 - -

]]>
- 25 - dropdown - search_sql_method - - man - - ipsclass->DB->sql_can_fulltext() ) - { - $full_text = "Поисковая система основанная на полнотекстовом поиске недоступна на сервере."; - } - else - { - $full_text = "Доступна поисковая система основанная на полнотекстовом поиске."; - } - - if ( ! $this->ipsclass->admin->get_fulltextindex_status() ) - { - $index = "Не найдены индексы полнотекстового поиска: создать индексы!"; - } - else - { - $index = "Найдены индексы полнотекстового поиска."; - } - - $r['conf_description'] = str_replace( "", $full_text, $r['conf_description'] ); - $r['conf_description'] = str_replace( "", $index, $r['conf_description'] ); -}]]> - 1 - 1 - - 0 - - 1 - searchsetup - 0 -
- - - 157 - - - 25 - dropdown - search_default_method - - simple - - - 1 - 2 - - 0 - - 1 - searchsetup - 0 - - - - 158 - - - 25 - input - min_search_word - - 4 - min_search_word - - 1 - 13 - - 0 - 0 - 1 - searchsetup - 0 - - - - 159 - - - 25 - multi - vnp_block_forums - - - #show_forums# - - 1 - 14 - - 0 - - 1 - searchsetup - 0 - - - - 1 - searchenginespiders - - - 0 - - - - - 149 - - - 24 - yes_no - spider_sense - - 1 - - - 1 - 1 - - 0 - - 1 - searchenginespiders - 0 - - - - 150 - - - 24 - yes_no - spider_visit - - 1 - - - 1 - 2 - - 0 - - 1 - searchenginespiders - 0 - - - - 151 - - - 24 - dropdown - spider_group - - 2 - #show_groups# - - 1 - 3 - - 0 - - 1 - searchenginespiders - 0 - - - - 152 - - - 24 - dropdown - spider_suit - - - #show_skins# - - 1 - 4 - - 0 - - 1 - searchenginespiders - 0 - - - - 153 - - - 24 - yes_no - spider_active - - 1 - - - 1 - 5 - - 0 - - 1 - searchenginespiders - 0 - - - - 154 - - - 24 - yes_no - spider_anon - - 0 - - - 1 - 6 - - 1 - - 1 - searchenginespiders - 0 - - - - 155 - - - 24 - textarea - search_engine_bots - - googlebot=Google Bot -slurp@inktomi=Hot Bot -archive_org=Archive.org Bot -Ask Jeeves=Ask Jeeves Bot -Lycos=Lycos Bot -WhatUSeek=What You Seek Bot -ia_archiver=IA.Archiver Bot -GigaBlast=Gigablast Bot -Gigabot=Gigablast Bot -Yandex=Yandex Bot -Yahoo!=Yahoo Bot -Yahoo-MMCrawler=Yahoo-MMCrawler Bot -TurtleScanner=TurtleScanner Bot -TurnitinBot=TurnitinBot -ZipppBot=ZipppBot -StackRambler=StackRambler Bot -oBot=oBot -rambler=Rambler Bot -Jetbot=Jet Bot -NaverBot=Naver Bot -libwww=Punto Bot -aport=Aport Bot -msnbot=MSN Bot -MnoGoSearch=mnoGoSearch Bot -booch=Booch Bot -Openbot=Openfind Bot -scooter=Altavista Bot -WebCrawler=Fast Bot -WebZIP=WebZIP Bot -GetSmart=GetSmart Bot -grub-client=GrubClient Bot -Vampire=Net_Vampire Bot - - - 1 - 7 - - 0 - - 1 - searchenginespiders - 0 - - - - 1 - portal_poll - - - 1 - - - - - 145 - - - 37 - input - poll_poll_url - - - - - 1 - 17 - - 0 - - 0 - portal_poll - 0 - - - - 1 - portal_recent_topics - - - 1 - - - - - 146 - - - 38 - multi - recent_topics_article_forum - - - #show_forums# - - 1 - 3 - - 0 - - 0 - portal_recent_topics - 0 - - - - 147 - - - 38 - input - recent_topics_article_max - - 15 - - - 1 - 4 - - 1 - - 0 - portal_recent_topics - 0 - - - - 148 - - - 38 - input - recent_topics_discuss_number - - 1 - - - 1 - 9 - - 1 - - 0 - portal_recent_topics - 0 - - - - 1 - boardguidelines - - - 0 - - - - - 1 - - - 1 - yes_no - gl_show - - 0 - - - 1 - 1 - - 0 - - 1 - boardguidelines - 0 - - - - 2 - - - 1 - input - gl_link - - - - - 1 - 2 - - 0 - - 1 - boardguidelines - 0 - - - - 3 - - - 1 - input - gl_title - - - - - 1 - 3 - - 0 - - 1 - boardguidelines - 0 - - - - 4 - - HTML Включен.]]> - 1 - editor - gl_guidelines - - - - - 1 - 4 - - 0 - - 0 - boardguidelines - 0 - - - - 5 - - HTML Включен.]]> - 1 - editor - reg_rules - - Правила и положения форума - -Пожалуйста, уделите немного внимания и прочтите краткие правила, указанные ниже. Если вы принимаете их и желаете продолжить процесс регистрации, отметьте свое согласие и нажмите кнопку «Регистрация». Для отмены регистрации нажмите кнопку «Назад» в вашем браузере. - -Пожалуйста, помните, что мы не отвечаем на все публикуемые сообщения. - -На форуме отсутствует предварительная проверка создаваемых тем и сообщений. Как только вы отправляете сообщение — оно сразу публикуется на форуме. Администрация форума снимает с себя ответственность за содержание сообщений, публикуемых пользователями. Ответственность за содержание сообщения несет только его автор. - -На форуме запрещено: -отправка сообщений не по содержанию форума/темы; -оскорбления и угрозы в адрес пользователей форума; -пропаганда расовой, национальной и религиозной вражды; -реклама и самореклама; -ненормативная лексика; -сексуальные домогательства и т.д. - -Нарушители правил будут строго наказаны модераторами или администраторами форума, вплоть до закрытия доступа на форум. - -Согласившись с правилами, вы соглашаетесь не публиковать любой материал, защищенный авторским правом, если авторское право не принадлежит вам.]]> - - - 1 - 5 - - 1 - - 0 - boardguidelines - 0 - - - - 1 - userprofiles - - - 0 - - - - - 250 - - - 30 - yes_no - allow_skins - - 1 - - - 1 - 1 - - 0 - 0 - 1 - userprofiles - 0 - - - - 252 - - - 30 - input - post_titlechange - - 500 - - - 1 - 2 - - 0 - 0 - 1 - userprofiles - 0 - - - - 251 - - - 30 - yes_no - ipb_disable_group_psformat - - 0 - - - 1 - 2 - - 0 - - 1 - userprofiles - 0 - - - - 253 - - - 30 - input - max_location_length - - 1000 - - - 1 - 3 - - 0 - 0 - 1 - userprofiles - 0 - - - - 254 - - - 30 - input - max_interest_length - - 1000 - - - 1 - 4 - - 0 - 0 - 1 - userprofiles - 0 - - - - 255 - - - 30 - input - max_sig_length - - 10000 - - - 1 - 5 - - 0 - 0 - 1 - userprofiles - 0 - - - - 256 - - - 30 - yes_no - sig_allow_html - - 0 - - - 1 - 6 - - 0 - 0 - 1 - userprofiles - 0 - - - - 257 - - - 30 - yes_no - sig_allow_ibc - - 1 - - - 1 - 7 - - 0 - 0 - 1 - userprofiles - 0 - - - - 258 - - После регистрации пользователь может изменить тип редактора в «Личных данных».]]> - 30 - dropdown - ips_default_editor - - std - - - 1 - 7 - - 0 - - 1 - userprofiles - 0 - - - - 259 - - Пример: 5,15,20,25,30]]> - 30 - input - postpage_contents - - 5,10,15,20,25,30,35,40 - - - 1 - 8 - - 0 - 0 - 1 - userprofiles - 0 - - - - 260 - - Пример: 5,15,20,25,30]]> - 30 - input - topicpage_contents - - 5,10,15,20,25,30,35,40 - - - 1 - 9 - - 1 - 0 - 1 - userprofiles - 0 - - - - 261 - - - 30 - input - subs_autoprune - - 0 - - - 1 - 10 - - 0 - 0 - 1 - userprofiles - 0 - - - - 262 - - Действует только на пользователей, разрешивших прием писем от администрации.]]> - 30 - multi - autoforum_sub_groups - - - #show_groups# - - 1 - 11 - - 1 - - 1 - userprofiles - 0 - - - - 263 - - - 30 - yes_no - avatars_on - - 1 - - - 1 - 12 - - 0 - 0 - 1 - userprofiles - 0 - - - - 264 - - - 30 - input - avatar_ext - - gif,jpg,jpeg,png - - - 1 - 14 - - 0 - 0 - 1 - userprofiles - 0 - - - - 265 - /conf_title> - - 30 - yes_no - avatar_url - - 1 - - - 1 - 13 - - 0 - 0 - 1 - userprofiles - 0 - - - - 266 - - - 30 - input - avup_size_max - - 50 - - - 1 - 15 - - 0 - 0 - 1 - userprofiles - 0 - - - - 267 - - - 30 - input - avatar_dims - - 90x90 - - - 1 - 16 - - 0 - 0 - 1 - userprofiles - 0 - - - - 268 - - - 30 - input - avatar_def - - 80x80 - - - 1 - 17 - - 0 - 0 - 1 - userprofiles - 0 - - - - 269 - - - 30 - input - av_gal_cols - - 5 - - - 1 - 18 - - 0 - 0 - 1 - userprofiles - 0 - - - - 270 - - - 30 - input - photo_ext - - gif,jpg,jpeg,png - - - 1 - 19 - - 0 - 0 - 1 - userprofiles - 0 - - - - 271 - - - 30 - yes_no - disable_ipbsize - - 0 - - - 1 - 20 - - 1 - 0 - 1 - userprofiles - 0 - - - - 272 - - - 30 - yes_no - guests_sig - - 1 - - - 1 - 21 - - 0 - 0 - 1 - userprofiles - 0 - - - - 273 - - - 30 - yes_no - guests_img - - 1 - - - 1 - 22 - - 0 - 0 - 1 - userprofiles - 0 - - - - 274 - - - 30 - yes_no - guests_ava - - 1 - - - 1 - 23 - - 1 - 0 - 1 - userprofiles - 0 - - - - 275 - - - 30 - input - max_user_name_length - - 26 - - - 1 - 30 - - 0 - - 1 - userprofiles - 0 - - - - 276 - - - 30 - yes_no - pp_show_classic - - 0 - - - 1 - 32 - - 0 - - 1 - userprofiles - 0 - - - - 277 - - Помните, эта настройка имеет силу только в том случае, если выключен классический режим просмотра профиля.]]> - 30 - yes_no - pp_allow_member_rate - - 1 - - - 1 - 33 - - 1 - - 1 - userprofiles - 0 - - - - 1 - coppa - - COPPA.]]> - 1 - - - - - 21 - - COPPA на вашем форуме, при регистрации детей до 13 лет будет требоваться письменное разрешение родителей.]]> - 5 - yes_no - use_coppa - - 0 - - - 1 - 1 - - 0 - - 1 - coppa - 0 - - - - 22 - - - 5 - input - coppa_fax - - - - - 1 - 2 - - 0 - - 1 - coppa - 0 - - - - 23 - - - 5 - textarea - coppa_address - - - - - 1 - 3 - - 0 - - 1 - coppa - 0 - - - - 1 - warnsetup - - - 0 - - - - - 278 - - - 31 - yes_no - warn_on - - 1 - - - 1 - 1 - - 0 - - 1 - warnsetup - 0 - - - - 279 - - Если вы используете отрицательные числа, мы рекомендуем НЕ использовать графические блоки и проценты, а использовать режим рейтинга.]]> - 31 - input - warn_min - - 0 - - - 1 - 2 - - 0 - - 1 - warnsetup - 0 - - - - 280 - - - 31 - input - warn_max - - 10 - - - 1 - 3 - - 1 - - 1 - warnsetup - 0 - - - - 281 - - Можно выбрать несколько (используя «Ctrl»).]]> - 31 - multi - warn_protected - - - #show_groups# - - 1 - 4 - - 0 - - 1 - warnsetup - 0 - - - - 282 - - - 31 - yes_no - warn_show_own - - 0 - - - 1 - 5 - - 0 - - 1 - warnsetup - 0 - - - - 283 - - - 31 - yes_no - warn_past_max - - 0 - - - 1 - 6 - - 0 - - 1 - warnsetup - 0 - - - - 284 - - - 31 - dropdown - warn_show_rating - - 0 - уровень)]]> - - 1 - 7 - - 0 - - 1 - warnsetup - 0 - - - - 285 - - -Администраторы могут блокировать пользователю доступ всегда!]]> - 31 - yes_no - warn_mod_ban - - 1 - - - 1 - 8 - - 0 - - 1 - warnsetup - 0 - - - - 286 - - -Администраторы могут включать проверку пользователю всегда!]]> - 31 - yes_no - warn_mod_modq - - 1 - - - 1 - 9 - - 0 - - 1 - warnsetup - 0 - - - - 287 - - -Администраторы могут отключать пользователям возможность публикации сообщений всегда!]]> - 31 - yes_no - warn_mod_post - - 1 - - - 1 - 10 - - 0 - - 1 - warnsetup - 0 - - - - 288 - - - 31 - input - warn_mod_day - - 3 - - - 1 - 11 - - 1 - - 1 - warnsetup - 0 - - - - 289 - - - 31 - yes_no - warn_gmod_ban - - 1 - - - 1 - 12 - - 0 - - 1 - warnsetup - 0 - - - - 290 - - - 31 - yes_no - warn_gmod_modq - - 1 - - - 1 - 13 - - 0 - - 1 - warnsetup - 0 - - - - 291 - - - 31 - yes_no - warn_gmod_post - - 1 - - - 1 - 14 - - 0 - - 1 - warnsetup - 0 - - - - 292 - - - 31 - input - warn_gmod_day - - 3 - - - 1 - 15 - - 1 - - 1 - warnsetup - 0 - - - - 1 - topicspostsandpolls - - - 0 - - - - - 197 - - - 28 - input - display_max_topics - - 30 - - - 1 - 1 - - 0 - 0 - 1 - topicspostsandpolls - 0 - - - - 198 - - Посмотрите!!!!! будет заменено на Посмотрите!.]]> - 28 - yes_no - etfilter_punct - - 0 - - - 1 - 2 - - 0 - 0 - 1 - topicspostsandpolls - 0 - - - - 200 - - НАЖМИТЕ СЮДА будет заменено на Нажмите сюда — следует правильно выбрать локаль на сервере]]> - 28 - yes_no - etfilter_shout - - 0 - - - 1 - 3 - - 0 - 0 - 1 - topicspostsandpolls - 0 - - - - 199 - - - 28 - input - topic_rating_needed - - 1 - - - 1 - 3 - - 0 - - 1 - topicspostsandpolls - 0 - - - - 201 - - - 28 - input - hot_topic - - 15 - - - 1 - 4 - - 1 - 0 - 1 - topicspostsandpolls - 0 - - - - 202 - - - 28 - input - pre_pinned - - - - - 1 - 10 - - 0 - 0 - 1 - topicspostsandpolls - 0 - - - - 203 - - - 28 - input - pre_moved - - - - - 1 - 11 - - 0 - 0 - 1 - topicspostsandpolls - 0 - - - - 204 - - - 28 - input - pre_polls - - - - - 1 - 12 - - 0 - 0 - 1 - topicspostsandpolls - 0 - - - - 205 - - - 28 - input - topic_title_max_len - - 150 - - - 1 - 13 - - 1 - - 1 - topicspostsandpolls - 0 - - - - 206 - - - 28 - input - display_max_posts - - 20 - - - 1 - 20 - - 0 - 0 - 1 - topicspostsandpolls - 0 - - - - 208 - - Полезно, чтобы большие изображения не ломали структуру форума.]]> - 28 - yes_no - resize_linked_img - - 1 - - - 1 - 21 - - 0 - - 1 - topicspostsandpolls - 0 - - - - 209 - - - 28 - input - threaded_per_page - - 100 - - - 1 - 21 - - 0 - - 1 - topicspostsandpolls - 0 - - - - 207 - - - 28 - input - resize_img_percent - - 50 - - - 1 - 21 - - 0 - - 1 - topicspostsandpolls - 0 - - - - 210 - - - 28 - dropdown - topicmode_default - - linear - - - 1 - 22 - - 0 - - 1 - topicspostsandpolls - 0 - - - - 211 - - Можно выбрать несколько групп.]]> - 28 - multi - cannot_ignore_groups - - 4 - #show_groups# - - 1 - 23 - - 0 - - 1 - topicspostsandpolls - 0 - - - - 212 - - - 28 - dropdown - post_order_column - - pid - - - 1 - 24 - - 0 - 0 - 1 - topicspostsandpolls - 0 - - - - 213 - - - 28 - dropdown - post_order_sort - - asc - - - 1 - 25 - - 1 - 0 - 1 - topicspostsandpolls - 0 - - - - 214 - - - 28 - input - max_emos - - 10 - - - 1 - 40 - - 0 - 0 - 1 - topicspostsandpolls - 0 - - - - 215 - - - 28 - input - max_images - - 10 - - - 1 - 41 - - 0 - 0 - 1 - topicspostsandpolls - 0 - - - - 216 - - - 28 - input - max_post_length - - 100 - - - 1 - 42 - - 0 - 0 - 1 - topicspostsandpolls - 0 - - - - 217 - - По умолчанию — 199.]]> - 28 - input - max_h_flash - - 199 - - - 1 - 43 - - 0 - 0 - 1 - topicspostsandpolls - 0 - - - - 218 - - По умолчанию — 199.]]> - 28 - input - max_w_flash - - 199 - - - 1 - 43 - - 0 - 0 - 1 - topicspostsandpolls - 0 - - - - 219 - - Рекомендуется ставить 80—100.]]> - 28 - input - post_wordwrap - - 80 - - - 1 - 45 - - 0 - 0 - 1 - topicspostsandpolls - 0 - - - - 220 - - - 28 - input - max_quotes_per_post - - 10 - - - 1 - 48 - - 0 - - 1 - topicspostsandpolls - 0 - - - - 222 - - - 28 - yes_no - strip_quotes - - 1 - - - 1 - 49 - - 0 - 0 - 1 - topicspostsandpolls - 0 - - - - 221 - - - 28 - input - post_merge_conc - - 0 - - - 1 - 49 - - 0 - - 1 - topicspostsandpolls - 0 - - - - 223 - - Разделяйте их, используя запятую (gif,jpeg,jpg)]]> - 28 - input - img_ext - - gif,jpeg,jpg,png - - - 1 - 50 - - 1 - 0 - 1 - topicspostsandpolls - 0 - - - - 224 - - - 28 - yes_no - ipb_use_url_filter - - 0 - - - 1 - 53 - - 0 - - 1 - topicspostsandpolls - 0 - - - - 225 - - - 28 - dropdown - ipb_url_filter_option - - black - - - 1 - 54 - - 0 - - 1 - topicspostsandpolls - 0 - - - - 226 - - Одна ссылка на строчку.

Например: http://www.yourdomain.ru*
http://*.ibresource.ru/*]]>
- 28 - textarea - ipb_url_whitelist - - - - - 1 - 55 - - 0 - - 1 - topicspostsandpolls - 0 -
- - - 227 - - Одна ссылка на строчку.

Например: http://*.somedomain.ru*
http://competitor_domain.ru*]]>
- 28 - textarea - ipb_url_blacklist - - - - - 1 - 56 - - 1 - - 1 - topicspostsandpolls - 0 -
- - - 228 - - - 28 - yes_no - show_img_upload - - 1 - - - 1 - 60 - - 0 - 0 - 1 - topicspostsandpolls - 0 - - - - 229 - - - 28 - input - topic_attach_no_per_row - - 4 - - - 1 - 61 - - 0 - - 1 - topicspostsandpolls - 0 - - - - 230 - - - 28 - yes_no - siu_thumb - - 1 - siu_thumb - - 1 - 61 - - 0 - 0 - 1 - topicspostsandpolls - 0 - - - - 231 - - - 28 - input - siu_width - - 100 - - - 1 - 62 - - 0 - - 1 - topicspostsandpolls - 0 - - - - 232 - - - 28 - input - siu_height - - 100 - - - 1 - 63 - - 1 - 0 - 1 - topicspostsandpolls - 0 - - - - 233 - - - 28 - input - guest_name_pre - - - - - 1 - 70 - - 0 - 0 - 1 - topicspostsandpolls - 0 - - - - 234 - - - 28 - input - guest_name_suf - - _* - - - 1 - 71 - - 1 - 0 - 1 - topicspostsandpolls - 0 - - - - 235 - - - 28 - yes_no - poll_tags - - 1 - - - 1 - 80 - - 0 - 0 - 1 - topicspostsandpolls - 0 - - - - 237 - - - 28 - input - max_poll_choices - - 20 - - - 1 - 81 - - 0 - 0 - 1 - topicspostsandpolls - 0 - - - - 236 - - - 28 - input - max_poll_questions - - 3 - - - 1 - 81 - - 0 - - 1 - topicspostsandpolls - 0 - - - - 238 - - - 28 - yes_no - allow_result_view - - 1 - - - 1 - 82 - - 0 - 0 - 1 - topicspostsandpolls - 0 - - - - 239 - - - 28 - yes_no - allow_creator_vote - - 1 - - - 1 - 83 - - 0 - - 1 - topicspostsandpolls - 0 - - - - 240 - - - 28 - yes_no - ipb_poll_only - - 0 - - - 1 - 84 - - 0 - - 1 - topicspostsandpolls - 0 - - - - 241 - - - 28 - input - startpoll_cutoff - - 24 - - - 1 - 85 - - 1 - 0 - 1 - topicspostsandpolls - 0 - - - - 242 - - - 28 - yes_no - posting_allow_rte - - 1 - - - 1 - 100 - - 0 - - 1 - topicspostsandpolls - 0 - - - - 243 - - - 28 - yes_no - rte_side_panel_open - - 1 - - - 1 - 103 - - 1 - - 1 - topicspostsandpolls - 0 - - - - 1 - date - - - 0 - - - - - 40 - - Если вы выбрали корректный часовой пояс, а время неточное на 1 час, то это из-за перехода на летнее/зимнее время, и ваши пользователи могут исправить это в своих настройках форума в профиле.]]> - 7 - dropdown - time_offset - - 0 - - ipsclass->load_language( 'lang_ucp' ); - - foreach( $this->ipsclass->lang as $off => $words ) - { - if (preg_match("/^time_([\\.\\-\\d]+?)$/", $off, $match)) - { - $dropdown[] = array( $match[1], $words ); - } - } -}]]> - 1 - 1 - - 0 - 0 - 1 - date - 0 - - - - 41 - - Время форума (с учетом всех поправок) сейчас: <-T->]]> - 7 - input - time_adjust - - 0 - - ipsclass->get_date(time(), 'LONG',1); -$r['conf_description'] = str_replace( '<-T->', $d_date, $r['conf_description'] ); -}]]> - 1 - 2 - - 1 - 0 - 1 - date - 0 - - - - 42 - - Даты в PHP.]]> - 7 - input - clock_short - - j.n.Y, G:i - - - 1 - 3 - - 0 - 0 - 1 - date - 0 - - - - 43 - - Даты в PHP.]]> - 7 - input - clock_joined - - j.n.Y - - - 1 - 4 - - 0 - 0 - 1 - date - 0 - - - - 44 - - Даты в PHP.]]> - 7 - input - clock_long - - j.n.Y, G:i - - - 1 - 5 - - 0 - 0 - 1 - date - 0 - - - - 45 - - - 7 - dropdown - time_use_relative - - 1 - - - 1 - 6 - - 0 - 0 - 1 - date - 0 - - - - 46 - - - 7 - input - time_use_relative_format - - {--}, G:i - - - 1 - 7 - - 1 - 0 - 1 - date - 0 - - - - 47 - - - 7 - yes_no - time_dst_auto_correction - - 1 - - - 1 - 8 - - 1 - - 1 - date - 0 - - - - 1 - chat04 - Invision Chat Settings - This will allow you to customize your Invision Chat integration settings for the new 2004 edition - 1 - - - - - 202 - Chat Site ID / Account No. - If you are using Parachat v7 or greater, enter your site ID (1234, for example). If you are using an older version of Parachat please enter your group number (ip0000, for example) - 21 - input - chat04_account_no - - - - - 1 - 1 - Account Specifics - 0 - - 1 - chat04 - 0 - - - - 351 - Custom Applet Codebase URL - This should be left blank unless you have a local -ParaChat Server installation or hosted ParaChat Enterprise solution.]]> - 21 - input - parachat_codebase_url - - - - - 1 - 2 - - 0 - - 1 - chat04 - 0 - - - - 350 - Chat Room Version - - 21 - dropdown - parachat_version - - 6 - 6=Parachat v6 or below -7=Parachat v7 or greater - - 1 - 3 - - 1 - - 1 - chat04 - 0 - - - - 204 - - - 21 - yes_no - chat04_who_on - - 1 - - - 1 - 4 - - 0 - - 1 - chat04 - 0 - - - - 205 - - - 21 - yes_no - chat04_hide_whoschatting - - 1 - - - 1 - 5 - - 1 - - 1 - chat04 - 0 - - - - 209 - Chat Room Dimensions (WIDTH)? - - 21 - input - chat04_width - - 600 - - - 1 - 8 - Showing the chat room - 0 - - 1 - chat04 - 0 - - - - 210 - Chat Room Dimensions (HEIGHT)? - - 21 - input - chat04_height - - 350 - - - 1 - 9 - - 0 - - 1 - chat04 - 0 - - - - 213 - Load the chat room in...? - - 21 - dropdown - chat04_display - - self - self=Normal IPB Page - - 1 - 12 - - 0 - - 1 - chat04 - 0 - - - - 261 - Additional PARAM information - -<param name="cmd.BeepEnter" value="true"> -
<param name="cmd.BeepLeave" value="true"> -
Please refer to the Invision Chat documentation for more info.]]>
- 21 - textarea - chat04_customparams - - - - - 1 - 13 - - 0 - - 0 - chat04 - 0 -
- - - 211 - Chat Room Pop-up Window Padding? (in px) - Allows window to open without scrollbars - 21 - input - chat04_poppad - - 50 - - - 1 - 14 - - 1 - - 1 - chat04 - 0 - - - - 214 - Allow chat access to these groups - You may select more than one - 21 - multi - chat04_access_groups - - - #show_groups# - - 1 - 25 - Access Permissions - 1 - - 1 - chat04 - 0 - - - - 254 - Default Chat Room Language - This is the default language used for the chat user inteface (buttons and labels, etc) - 21 - dropdown - chat04_default_lang - - english.conf - english.conf=English -spanish.conf=Spanish -portuguese.conf=Portuguese -italian.conf=Italian -french.conf=French -german.conf=German - - 1 - 99 - Version 6 Settings (Not required for v7) - 0 - - 0 - chat04 - 0 - - - - 253 - Chat Room Type - This is the type of chat service you purchased - 21 - dropdown - chat04_servicetype - - - advanced=Advanced -premium=Premium - - 1 - 100 - - 0 - - 1 - chat04 - 0 - - - - 252 - Default Chat Room - This is the room that your chat users will be logged into first - 21 - input - chat04_default_room - - - - - 1 - 101 - - 0 - - 1 - chat04 - 0 - - - - 255 - - - 21 - yes_no - chat04_plainmode - - 0 - - - 1 - 102 - - 0 - - 0 - chat04 - 0 - - - - 256 - Applet: Background Color - To change your chat applet background color select any RGB value. - 21 - input - chat04_style_applet_bg - - #BCD0ED - - - 1 - 130 - - 0 - - 0 - chat04 - 0 - - - - 257 - Applet: Foreground Color - To change your chat applet foreground color select any RGB value. - 21 - input - chat04_style_applet_fg - - #345487 - - - 1 - 131 - - 0 - - 0 - chat04 - 0 - - - - 258 - Chat Window: Background Color - To change your chat window background color select any RGB value. - 21 - input - chat04_style_window_bg - - #F5F9FD - - - 1 - 132 - - 0 - - 0 - chat04 - 0 - - - - 259 - Chat Window: Foreground Color - To change your chat window foreground color select any RGB value. - 21 - input - chat04_style_window_fg - - #345487 - - - 1 - 133 - - 0 - - 0 - chat04 - 0 - - - - 260 - Chat Room Font Size - - 21 - input - chat04_style_font_size - - 10 - - - 1 - 135 - - 1 - - 0 - chat04 - 0 - - - - 1 - chat - Invision Chat Settings (Legacy Version) - This will allow you to customize your Invision Chat integration settings for the legacy edition. - 1 - - - - - 188 - Chat Room Account Number? - Removing this number will remove all links / chat functionality within IPB. - - 20 - input - chat_account_no - - - - - 1 - 1 - Account Specifics - 0 - - 1 - chat - 0 - - - - 189 - Chat Room Server? - ]]> - 20 - input - chat_server_addr - - - - - 1 - 2 - - 1 - - 1 - chat - 0 - - - - 190 - - - 20 - yes_no - chat_who_on - - 1 - - - 1 - 3 - - 0 - - 1 - chat - 0 - - - - 191 - - - 20 - yes_no - chat_hide_whoschatting - - 1 - - - 1 - 4 - - 0 - - 1 - chat - 0 - - - - 192 - Update local list no less than every: - The local list is updated from the master chat server by the frequency you set and cached locally. - 20 - dropdown - chat_refresh_list - - 15 - 5=5 -10=10 -15=15 -30=30 - - 1 - 5 - - 1 - - 1 - chat - 0 - - - - 193 - Changed your IPChat control panel password? - - 20 - input - chat_pass_md5 - - - - - 1 - 6 - - 0 - - 1 - chat - 0 - - - - 194 - ENTER YOUR IPCHAT CONTROL PANEL PASSWORD - - 20 - input - chat_pass_md5_new - - - - - 1 - 7 - - 0 - - 1 - chat - 0 - - - - 195 - Chat Room Dimensions (WIDTH)? - - 20 - input - chat_width - - 600 - - - 1 - 8 - Showing the chat room - 0 - - 1 - chat - 0 - - - - 196 - Chat Room Dimensions (HEIGHT)? - - 20 - input - chat_height - - 350 - - - 1 - 9 - - 0 - - 1 - chat - 0 - - - - 199 - Load the chat room in...? - - 20 - dropdown - chat_display - - self - self=Normal IPB Page - - 1 - 9 - - 0 - - 1 - chat - 0 - - - - 197 - Chat Room Pop-up Window Padding? (in px) - Allows window to open without scrollbars - 20 - input - chat_poppad - - 50 - - - 1 - 10 - - 0 - - 1 - chat - 0 - - - - 198 - Default Chat Room Interface Language? - - 20 - dropdown - chat_language - - en - en=English -ar=Arabic -de=German -es=Spanish -fr=French -hr=Croation -it=Italian -iw=Hebrew -nl=Dutch -pl=Polish -pt=Portuguese - - 1 - 11 - - 1 - - 1 - chat - 0 - - - - 200 - Allow chat access to these groups - You may select more than one - 20 - multi - chat_access_groups - - - #show_groups# - - 1 - 13 - Access Permissions - 0 - - 1 - chat - 0 - - - - 201 - Allow ADMIN access to these groups - You may select more than one - please choose carefully! - 20 - multi - chat_admin_groups - - - #show_groups# - - 1 - 14 - - 1 - - 1 - chat - 0 - - - - - + + + + + 1 + boardguidelines + Board Guidelines + This section allows you to maintain your board guidelines. If enabled, a link will be added to the board header linking to the board guidelines. + 0 + + + + + 1 + Show link in header to guidelines? + + 1 + yes_no + gl_show + + 0 + + + 1 + 1 + + 0 + 1 + boardguidelines + 0 + + + + 2 + External http:// link to guidelines page? + Enter the URL to a set of external guidelines or if you wish to add your guidelines below simply leave this box clear. + 1 + input + gl_link + + + + + 1 + 2 + + 0 + 1 + boardguidelines + 0 + + + + 3 + Title to use in header? + + 1 + input + gl_title + + + + + 1 + 3 + + 0 + 1 + boardguidelines + 0 + + + + 4 + If not using external link; guidelines/rules text + HTML Enabled + 1 + editor + gl_guidelines + + + + + 1 + 4 + + 0 + 0 + boardguidelines + 0 + + + + 5 + + HTML ENABLED]]> + 1 + editor + reg_rules + + Forum Terms & Rules + +Please take a moment to review these rules detailed below. If you agree with them and wish to proceed with the registration, simply click the "Register" button below. To cancel this registration, simply hit the 'back' button on your browser. + +Please remember that we are not responsible for any messages posted. We do not vouch for or warrant the accuracy, completeness or usefulness of any message, and are not responsible for the contents of any message. + +The messages express the views of the author of the message, not necessarily the views of this bulletin board. Any user who feels that a posted message is objectionable is encouraged to contact us immediately by email. We have the ability to remove objectionable messages and we will make every effort to do so, within a reasonable time frame, if we determine that removal is necessary. + +You agree, through your use of this service, that you will not use this bulletin board to post any material which is knowingly false and/or defamatory, inaccurate, abusive, vulgar, hateful, harassing, obscene, profane, sexually oriented, threatening, invasive of a person's privacy, or otherwise violative of any law. + +You agree not to post any copyrighted material unless the copyright is owned by you or by this bulletin board. +]]> + + + 1 + 5 + + 1 + 0 + boardguidelines + 0 + + + + 1 + boardoffline + Board Offline / Online + Use this setting to turn switch your board online or offline and leave a message for your visitors. + 0 + + + + + 6 + Turn the board offline? + + 2 + yes_no + board_offline + + 0 + + + 1 + 1 + + 0 + 1 + boardoffline + 0 + + + + 7 + The offline message to display + + 2 + editor + offline_msg + + + + + 1 + 2 + + 0 + 0 + boardoffline + 0 + + + + 1 + calendar + + This section will allow you to set up the board calendar and its related options. + 0 + + + + + 8 + Show birthdays on the main calendar view? + + 3 + yes_no + show_bday_calendar + + 1 + + + 1 + 1 + + 0 + 1 + calendar + 0 + + + + 9 + + + 3 + yes_no + show_birthdays + + 1 + + + 1 + 2 + + 0 + 1 + calendar + 0 + + + + 10 + Auto hide when no birthdays to show? + + 3 + yes_no + autohide_bday + + 0 + + + 1 + 3 + + 1 + 1 + calendar + 0 + + + + 11 + Show forthcoming calendar events? + + 3 + yes_no + show_calendar + + 1 + + + 1 + 4 + Forcoming Calendar Events + 0 + 1 + calendar + 0 + + + + 12 + Auto hide when no events to show? + + 3 + yes_no + autohide_calendar + + 0 + + + 1 + 5 + + 0 + 1 + calendar + 0 + + + + 13 + + Controls how far into the future events are shown on the forcoming events block on board index view. + 3 + input + calendar_limit + + 5 + + + 1 + 6 + + 1 + 1 + calendar + 0 + + + + 14 + + This applies to view calendar / post event. + 3 + input + start_year + + 2008 + + + 1 + 7 + + 0 + 1 + calendar + 0 + + + + 15 + + Example: current year is 2005, you enter 5 - last choosable year = 2010]]> + 3 + input + year_limit + + 5 + + + 1 + 8 + + 0 + 1 + calendar + 0 + + + + 16 + Start Calendar on Monday? + The default behavior for the calendar is to start the week on Sunday. By setting this to yes, you will start the week on Monday instead. + 3 + yes_no + ipb_calendar_mon + + 0 + + + 1 + 9 + + 0 + 1 + calendar + 0 + + + + 1 + cookies + Cookies + This section allows you to set the default cookie options. + 0 + + + + + 17 + Cookie Domain + .your-domain.com for global cookie]]> + 4 + input + cookie_domain + + + + + 1 + 1 + + 0 + 1 + cookies + 0 + + + + 18 + Cookie Name Prefix + Allows multiple boards on one host. + 4 + input + cookie_id + + + + + 1 + 2 + + 0 + 1 + cookies + 0 + + + + 19 + Cookie Path + Relative path from domain to root IBF dir + 4 + input + cookie_path + + + + + 1 + 3 + + 0 + 1 + cookies + 0 + + + + 20 + Create a stronghold auto-log in cookie? + If enabled, when a member logs in, an additional cookie is set which contains geographic information in a crypt to make cookie stealing almost impossible. Only turn off if users cannot stay logged in + 4 + yes_no + cookie_stronghold + + 1 + + + 1 + 4 + Advanced Options + 1 + 1 + cookies + 0 + + + + 1 + coppa + COPPA Set-up + COPPA.]]> + 0 + + + + + 21 + Use COPPA registration system? + COPPA on your board will require children under the age of 13 to get parental consent via a faxed or mailed form.]]> + 5 + yes_no + use_coppa + + 0 + + + 1 + 1 + + 0 + 1 + coppa + 0 + + + + 22 + Fax number to receive COPPA forms + + 5 + input + coppa_fax + + + + + 1 + 2 + + 0 + 1 + coppa + 0 + + + + 23 + Mail address to receive COPPA forms + + 5 + textarea + coppa_address + + + + + 1 + 3 + + 0 + 1 + coppa + 0 + + + + 300 + Additional COPPA Information + This text will be displayed on the parental consent form and can be used to include your privacy policy (a requirement for COPPA compliance) + 5 + editor + coppa_consent_extra + + + + + 1 + 4 + + 0 + 1 + coppa + 0 + + + + 1 + cpusaving + + This section allows certain features to be limited or removed to get more performance out of your board. + 0 + + + + + 24 + Allow custom profile field info be used in TopicView? + + 6 + yes_no + custom_profile_topic + + 1 + + + 1 + 10 + Saving SQL Resources + 0 + 1 + cpusaving + 0 + + + + 25 + Cache calendar and birthdays? + + 6 + yes_no + cache_calendar + + 1 + + + 1 + 20 + + 0 + 1 + cpusaving + 0 + + + + 26 + + + 6 + input + au_cutoff + + 15 + + + 1 + 30 + + 0 + 1 + cpusaving + 0 + + + + 27 + Storing Read Topics in the Database + 0 (zero) to NOT store read topic info in the database.]]> + 6 + input + db_topic_read_cutoff + + 7 + + + 1 + 40 + + 0 + 1 + cpusaving + 0 + + + + 28 + Update Topic Views Immediately + If enabled, the topic views counter will be updated as one loads a topic. If not enabled, the topic views will be written to another table and the topic views updated every 3 hours. This will significantly reduce overhead on the topics table if you have a very busy board as it overcomes the write lock initiated when the topic counter is updated. + 6 + yes_no + update_topic_views_immediately + + 1 + + + 1 + 50 + + 0 + 1 + cpusaving + 0 + + + + 29 + Mark topics a user has posted when displaying a forum? + + 6 + yes_no + show_user_posted + + 1 + + + 1 + 60 + + 1 + 1 + cpusaving + 0 + + + + 30 + + This saves 1 query per forum view + 6 + yes_no + no_au_forum + + 0 + no_au_forum + + 1 + 70 + Turning Features Off + 0 + 1 + cpusaving + 0 + + + + 31 + + This saves 1 query per topic view + 6 + yes_no + no_au_topic + + 0 + + + 1 + 80 + + 0 + 1 + cpusaving + 0 + + + + 32 + Show Active Users + + 6 + yes_no + show_active + + 1 + + + 1 + 90 + + 0 + 1 + cpusaving + 0 + + + + 293 + Disable Topic Summary + Do you wish to disable the topic summary from displaying at the bottom of the post reply page? + 6 + yes_no + disable_summary + + 0 + + + 1 + 95 + + 0 + 1 + cpusaving + 0 + + + + 33 + Allow users (where allowed) to use search? + + 6 + yes_no + allow_search + + 1 + + + 1 + 100 + + 0 + 1 + cpusaving + 0 + + + + 34 + Show Board Totals? + Show the board totals at the footer of the board index page. + 6 + yes_no + show_totals + + 1 + + + 1 + 110 + + 1 + 1 + cpusaving + 0 + + + + 35 + Server Load Limit + Can be left blank for no limit]]> + 6 + input + load_limit + + + + + 1 + 120 + + 0 + 1 + cpusaving + 0 + + + + 36 + Print HTTP no-cache headers? + Note: The setting 'Print HTTP Headers?' found under General Configuration needs to be enabled for this setting to have any effect.]]> + 6 + yes_no + nocache + + 1 + + + 1 + 130 + Reducing HTML output + 0 + 1 + cpusaving + 0 + + + + 37 + + Leave blank to return full post with proper formatting]]> + 6 + input + search_post_cut + + + + + 1 + 140 + + 0 + 1 + cpusaving + 0 + + + + 38 + Disable Sub-forums on Board Index + Do you wish to disable subforums from displaying on the board index? + 6 + yes_no + disable_subforum_show + + 0 + + + 1 + 150 + + 0 + 1 + cpusaving + 0 + + + + 39 + Show short forum jump list? + This will remove sub-forums from the drop down list - useful if you have many + 6 + yes_no + short_forum_jump + + 0 + short_forum_jump + + 1 + 160 + + 1 + 1 + cpusaving + 0 + + + + 294 + Use multi-byte safe wordwrap + Enable multi-byte safe wordwrap function? Uses a lot more resources for wordwrap functionality, but necessary for languages with multi-byte characters. + 6 + yes_no + multibyte_wordwrap + + 0 + + + 1 + 170 + + 0 + 1 + cpusaving + 0 + + + + 1 + date + + This section contains the date and time formats used throughout the board. + 0 + + + + + 40 + Native Server Time Zone + If you have chosen the correct timezone and the clock is an hour out, this is because of daylight savings time and your members can correct this by editing their 'Board settings' via their User Control Panel.]]> + 7 + dropdown + time_offset + + 0 + + ipsclass->load_language( 'lang_ucp' ); + + foreach( $this->ipsclass->lang as $off => $words ) + { + if (preg_match("/^time_([\\.\\-\\d]+?)$/", $off, $match)) + { + $dropdown[] = array( $match[1], $words ); + } + } +}]]> + 1 + 1 + Time Adjustments + 0 + 1 + date + 0 + + + + 41 + Server Time Adjustment (in minutes) + Board time (inc. above time zone and current adj.) is now: <-T->]]> + 7 + input + time_adjust + + 0 + + ipsclass->get_date(time(), 'LONG',1); +$r['conf_description'] = str_replace( '<-T->', $d_date, $r['conf_description'] ); +}]]> + 1 + 2 + + 1 + 1 + date + 0 + + + + 42 + Short time format + PHP Date]]> + 7 + input + clock_short + + jS F Y - h:i A + + + 1 + 3 + + 0 + 1 + date + 0 + + + + 43 + Join date time format + PHP Date]]> + 7 + input + clock_joined + + j-F y + + + 1 + 4 + + 0 + 1 + date + 0 + + + + 44 + Long time format + PHP Date]]> + 7 + input + clock_long + + M j Y, h:i A + + + 1 + 5 + + 0 + 1 + date + 0 + + + + 45 + Use relative dates? + + 7 + dropdown + time_use_relative + + 1 + + + 1 + 6 + Relative Dates + 0 + 1 + date + 0 + + + + 46 + Relative time format + + 7 + input + time_use_relative_format + + {--}, h:i A + + + 1 + 7 + + 1 + 1 + date + 0 + + + + 47 + DST Auto Detection + + 7 + yes_no + time_dst_auto_correction + + 1 + + + 1 + 8 + DST Correction + 1 + 1 + date + 0 + + + + 1 + converge + Display Name Settings + Settings to control display names on the forums. + 0 + + + + + 48 + + + 8 + yes_no + auth_allow_dnames + + 1 + + + 1 + 10 + Display Name Set-Up + 0 + 1 + converge + 0 + + + + 275 + Maximum Display Name Length + The maximum number of characters that a display name can be. + 8 + input + max_user_name_length + + 26 + + + 1 + 20 + + 0 + 1 + converge + 0 + + + + 49 + Prohibit Display Names from selecting Log In names + + 8 + yes_no + auth_dnames_nologinname + + 1 + + + 1 + 30 + + 1 + 1 + converge + 0 + + + + 178 + Characters allowed in usernames +
+To allow only alphanumeric usernames, use: a-zA-Z0-9]]>
+ 8 + input + username_characters + + + + + 1 + 40 + Allowed Characters + 0 + 1 + converge + 0 +
+ + + 179 + Error Message to Display + Tip:You can use {chars} to show the characters allowed]]> + 8 + input + username_errormsg + + The name can only contain these characters: {chars} + + + 1 + 50 + + 1 + 1 + converge + 0 + + + + 301 + Block linebreaks in names + tags in usernames and display names?]]> + 8 + yes_no + usernames_nobr + + 0 + + + 1 + 60 + + 0 + 1 + converge + 0 + + + + 1 + email + Email Set-up + This section will allow you to change the incoming and outgoing email addresses as well as the email method. + 0 + + + + + 50 + Board incoming email address + This is the email address that all incoming mail is addressed to. + 9 + input + email_in + + + + + 1 + 1 + Email Addresses + 0 + 1 + email + 0 + + + + 51 + Board outgoing email address + This is the email address that all mail appears to come from. + 9 + input + email_out + + + + + 1 + 2 + + 1 + 1 + email + 0 + + + + 52 + Mail Delivery Method + + 9 + dropdown + mail_method + + mail + mail=PHP Mail() +smtp=SMTP + + 1 + 3 + + 0 + 1 + email + 0 + + + + 53 + Over-ride SMTP Host? + + 9 + input + smtp_host + + localhost + + + 1 + 4 + SMTP Set-up + 0 + 1 + email + 0 + + + + 54 + Over-ride SMTP Port? + Default is 25 + 9 + input + smtp_port + + 25 + + + 1 + 5 + + 0 + 1 + email + 0 + + + + 55 + + ' (no quotes). If you are getting errors in the mail error log, enabled this option]]> + 9 + yes_no + mail_wrap_brackets + + 0 + + + 1 + 6 + + 0 + 1 + email + 0 + + + + 56 + SMTP UserName + + 9 + input + smtp_user + + + + + 1 + 6 + + 0 + 1 + email + 0 + + + + 57 + SMTP Password + + 9 + input + smtp_pass + + + + + 1 + 7 + + 1 + 1 + email + 0 + + + + 58 + PHP Mail Extra Options + + 9 + input + php_mail_extra + + + + + 1 + 8 + PHP Mail Settings + 1 + 1 + email + 0 + + + + 1 + general + General Configuration + These settings control the basics of the board such as URLs and paths. + 0 + + + + + 59 + Board Name + This is the name of the board. It is used as the first link in the navigation menu, etc. + 10 + input + board_name + + Invision Power Board + + + 1 + 10 + + 0 + 1 + general + 0 + + + + 60 + Website Name + + 10 + input + home_name + + + + + 1 + 20 + + 0 + 1 + general + 0 + + + + 61 + Website Address + + 10 + input + home_url + + + + + 1 + 30 + + 1 + 1 + general + 0 + + + + 62 + Upload URL + ]]> + 10 + input + upload_url + + + + ipsclass->my_getenv( 'SERVER_NAME' ); + $this_script = $this->ipsclass->my_getenv( 'SCRIPT_NAME' ); + $this_script = str_replace( "\\", "/", $this_script ); + + if( $this_host AND $this_script ) + { + $this_script = str_replace( '/'.IPB_ACP_DIRECTORY.'/index.php', '/uploads', $this_script ); + + $r['conf_description'] = str_replace( "", "
IPB has detected your uploads url as:
http://".$this_host.$this_script, $r['conf_description'] ); + } +}]]>
+ 1 + 40 + Other URLs and Paths + 0 + 1 + general + 0 +
+ + + 63 + + ]]> + 10 + input + upload_dir + + + upload_dir + ipsclass->my_getenv( 'SCRIPT_FILENAME' ) ); + + if( $this_script ) + { + $this_script = str_replace( '/'.IPB_ACP_DIRECTORY.'/index.php', '/uploads', $this_script ); + + $r['conf_description'] = str_replace( "", "
IPB has detected your uploads path as:
".$this_script, $r['conf_description'] ); + } +}]]>
+ 1 + 50 + + 0 + 1 + general + 0 +
+ + + 305 + Upload form action domain + +Ex: http://master.mysite.com/forums]]> + 10 + input + upload_domain + + + + + 1 + 55 + + 0 + 1 + general + 0 + + + + 64 + Caching PATH + This can be left blank +
This is useful for specifing a PATH for the IPB written files (skin_cache, style_avatars, style_emoticons, style_images) when dealing with load balanced/clustered servers. If you enter a PATH, please ensure that it ends with a trailing slash]]>
+ 10 + input + ipb_cache_path + + + + + 1 + 60 + + 0 + 1 + general + 0 +
+ + + 65 + Document character set + Enter the document character set for all HTML pages. + 10 + input + gb_char_set + + iso-8859-1 + + + 1 + 70 + + 0 + 1 + general + 0 + + + + 66 + Image URL + This can be left blank +
This can be used if you wish to serve images from a different server or when using clustered servers. Please ensure that you use a trailing slash and that it starts with http(s):// if entering a URL]]>
+ 10 + input + ipb_img_url + + + + + 1 + 80 + + 0 + 1 + general + 0 +
+ + + 67 + Print HTTP Headers? + + 10 + yes_no + print_headers + + 0 + + + 1 + 90 + + 1 + 1 + general + 0 + + + + 68 + Type of auto-redirect + + 10 + dropdown + header_redirect + + location + location=Location type (*nix savvy) +refresh=Refresh (Windows savvy) +html=HTML META redirect (If all else fails...) + + 1 + 110 + Page Redirection + 0 + 1 + general + 0 + + + + 69 + + + 10 + yes_no + ipb_remove_redirect_pages + + 0 + + + 1 + 120 + + 1 + 1 + general + 0 + + + + 70 + Debug level + This controls the debug information shown at the footer of your board. + 10 + dropdown + debug_level + + 0 + + + 1 + 140 + + 0 + 1 + general + 0 + + + + 71 + Disable GZIP encoding? + GZIP enables faster page transfers and lower bandwidth use however some servers are not configured to allow it. + 10 + yes_no + disable_gzip + + 0 + + + 1 + 150 + + 0 + 1 + general + 0 + + + + 72 + Use Safe Mode Skins? + + 10 + yes_no + safe_mode_skins + + 0 + + + 1 + 160 + + 0 + 1 + general + 0 + + + + 73 + Number Formatting + (EG: USA & UK use a comma)]]> + 10 + dropdown + number_format + + , + + + 1 + 170 + Number Formatting + 0 + 1 + general + 0 + + + + 74 + Decimal Seperator + Character used to seperate decimals in numbers. + 10 + dropdown + decimal_seperator + + . + .=. +,=, + + 1 + 180 + + 1 + 1 + general + 0 + + + + 75 + GD Version + + 10 + dropdown + gd_version + + 2 + 1=GD1 +2=GD2 + + 1 + 190 + + 0 + 1 + general + 0 + + + + 295 + ACP Help System + Would you like to enable the help system in the ACP to provide some additional helpful information? + 10 + yes_no + acp_tutorial_mode + + 1 + + + 1 + 200 + + 0 + 1 + general + 0 + + + + 1 + chat04 + Invision Chat Settings + This will allow you to customize your Invision Chat integration settings for the new 2004 edition + 1 + + + + + 76 + Chat Site ID / Account No. + If you are using Parachat v7 or greater, enter your site ID (1234, for example). If you are using an older version of Parachat please enter your group number (ip0000, for example) + 32 + input + chat04_account_no + + + + + 1 + 1 + Account Specifics + 0 + 1 + chat04 + 0 + + + + 77 + Custom Applet Codebase URL + This should be left blank unless you have a local +ParaChat Server installation or hosted ParaChat Enterprise solution.]]> + 32 + input + parachat_codebase_url + + + + + 1 + 2 + + 0 + 1 + chat04 + 0 + + + + 78 + Chat Room Version + + 32 + dropdown + parachat_version + + 6 + 6=Parachat v6 or below +7=Parachat v7 or greater + + 1 + 3 + + 1 + 1 + chat04 + 0 + + + + 79 + + + 32 + yes_no + chat04_who_on + + 1 + + + 1 + 4 + + 0 + 1 + chat04 + 0 + + + + 80 + + + 32 + yes_no + chat04_hide_whoschatting + + 1 + + + 1 + 5 + + 1 + 1 + chat04 + 0 + + + + 81 + Chat Room Dimensions (WIDTH)? + + 32 + input + chat04_width + + 600 + + + 1 + 8 + Showing the chat room + 0 + 1 + chat04 + 0 + + + + 82 + Chat Room Dimensions (HEIGHT)? + + 32 + input + chat04_height + + 350 + + + 1 + 9 + + 0 + 1 + chat04 + 0 + + + + 83 + Load the chat room in...? + + 32 + dropdown + chat04_display + + self + self=Normal IPB Page + + 1 + 12 + + 0 + 1 + chat04 + 0 + + + + 84 + Additional PARAM information + +<param name="cmd.BeepEnter" value="true"> +
<param name="cmd.BeepLeave" value="true"> +
Please refer to the Invision Chat documentation for more info.]]>
+ 32 + textarea + chat04_customparams + + + + + 1 + 13 + + 0 + 0 + chat04 + 0 +
+ + + 85 + Chat Room Pop-up Window Padding? (in px) + Allows window to open without scrollbars + 32 + input + chat04_poppad + + 50 + + + 1 + 14 + + 1 + 1 + chat04 + 0 + + + + 86 + Allow chat access to these groups + You may select more than one + 32 + multi + chat04_access_groups + + + #show_groups# + + 1 + 25 + Access Permissions + 1 + 1 + chat04 + 0 + + + + 87 + Default Chat Room Language + This is the default language used for the chat user inteface (buttons and labels, etc) + 32 + dropdown + chat04_default_lang + + english.conf + english.conf=English +spanish.conf=Spanish +portuguese.conf=Portuguese +italian.conf=Italian +french.conf=French +german.conf=German + + 1 + 99 + Version 6 Settings (Not required for v7) + 0 + 0 + chat04 + 0 + + + + 88 + Chat Room Type + This is the type of chat service you purchased + 32 + dropdown + chat04_servicetype + + + advanced=Advanced +premium=Premium + + 1 + 100 + + 0 + 1 + chat04 + 0 + + + + 89 + Default Chat Room + This is the room that your chat users will be logged into first + 32 + input + chat04_default_room + + + + + 1 + 101 + + 0 + 1 + chat04 + 0 + + + + 90 + + + 32 + yes_no + chat04_plainmode + + 0 + + + 1 + 102 + + 0 + 0 + chat04 + 0 + + + + 91 + Applet: Background Color + To change your chat applet background color select any RGB value. + 32 + input + chat04_style_applet_bg + + #BCD0ED + + + 1 + 130 + + 0 + 0 + chat04 + 0 + + + + 92 + Applet: Foreground Color + To change your chat applet foreground color select any RGB value. + 32 + input + chat04_style_applet_fg + + #345487 + + + 1 + 131 + + 0 + 0 + chat04 + 0 + + + + 93 + Chat Window: Background Color + To change your chat window background color select any RGB value. + 32 + input + chat04_style_window_bg + + #F5F9FD + + + 1 + 132 + + 0 + 0 + chat04 + 0 + + + + 94 + Chat Window: Foreground Color + To change your chat window foreground color select any RGB value. + 32 + input + chat04_style_window_fg + + #345487 + + + 1 + 133 + + 0 + 0 + chat04 + 0 + + + + 95 + Chat Room Font Size + + 32 + input + chat04_style_font_size + + 10 + + + 1 + 135 + + 1 + 0 + chat04 + 0 + + + + 1 + chat + Invision Chat Settings (Legacy Version) + This will allow you to customize your Invision Chat integration settings for the legacy edition. + 1 + + + + + 96 + Chat Room Account Number? + Removing this number will remove all links / chat functionality within IPB. + + 33 + input + chat_account_no + + + + + 1 + 1 + Account Specifics + 0 + 1 + chat + 0 + + + + 97 + Chat Room Server? + ]]> + 33 + input + chat_server_addr + + + + + 1 + 2 + + 1 + 1 + chat + 0 + + + + 98 + + + 33 + yes_no + chat_who_on + + 1 + + + 1 + 3 + + 0 + 1 + chat + 0 + + + + 99 + + + 33 + yes_no + chat_hide_whoschatting + + 1 + + + 1 + 4 + + 0 + 1 + chat + 0 + + + + 100 + Update local list no less than every: + The local list is updated from the master chat server by the frequency you set and cached locally. + 33 + dropdown + chat_refresh_list + + 15 + 5=5 +10=10 +15=15 +30=30 + + 1 + 5 + + 1 + 1 + chat + 0 + + + + 101 + Changed your IPChat control panel password? + + 33 + input + chat_pass_md5 + + + + + 1 + 6 + + 0 + 1 + chat + 0 + + + + 102 + ENTER YOUR IPCHAT CONTROL PANEL PASSWORD + + 33 + input + chat_pass_md5_new + + + + + 1 + 7 + + 0 + 1 + chat + 0 + + + + 103 + Chat Room Dimensions (WIDTH)? + + 33 + input + chat_width + + 600 + + + 1 + 8 + Showing the chat room + 0 + 1 + chat + 0 + + + + 104 + Chat Room Dimensions (HEIGHT)? + + 33 + input + chat_height + + 350 + + + 1 + 9 + + 0 + 1 + chat + 0 + + + + 105 + Load the chat room in...? + + 33 + dropdown + chat_display + + self + self=Normal IPB Page + + 1 + 9 + + 0 + 1 + chat + 0 + + + + 106 + Chat Room Pop-up Window Padding? (in px) + Allows window to open without scrollbars + 33 + input + chat_poppad + + 50 + + + 1 + 10 + + 0 + 1 + chat + 0 + + + + 107 + Default Chat Room Interface Language? + + 33 + dropdown + chat_language + + en + en=English +ar=Arabic +de=German +es=Spanish +fr=French +hr=Croation +it=Italian +iw=Hebrew +nl=Dutch +pl=Polish +pt=Portuguese + + 1 + 11 + + 1 + 1 + chat + 0 + + + + 108 + Allow chat access to these groups + You may select more than one + 33 + multi + chat_access_groups + + + #show_groups# + + 1 + 13 + Access Permissions + 0 + 1 + chat + 0 + + + + 109 + Allow ADMIN access to these groups + You may select more than one - please choose carefully! + 33 + multi + chat_admin_groups + + + #show_groups# + + 1 + 14 + + 1 + 1 + chat + 0 + + + + 1 + ipconvergepublic + IP.Converge Configuration + These settings define the workings of your IP.Converge installation. + 0 + + + + + 110 + Enable IP.Converge + + 13 + yes_no + ipconverge_public_enable + + 0 + + + 1 + 1 + Basic Settings + 1 + 1 + ipconvergepublic + 0 + + + + 1 + ipconverge + IP.Converge Settings + Hidden settings + 1 + + + + + 111 + IP.Converge Enabled? + + 34 + yes_no + ipconverge_enabled + + 0 + + + 1 + 1 + + 0 + 1 + ipconverge + 0 + + + + 112 + IP.Converge URL + The root URL of the converge application. + 34 + input + ipconverge_url + + + + + 1 + 2 + + 0 + 1 + ipconverge + 0 + + + + 113 + IP.Converge Product ID + The product ID assigned from the IP.Converge server + 34 + input + ipconverge_pid + + + + + 1 + 3 + + 0 + 1 + ipconverge + 0 + + + + 1 + ipbcopyright + IPB Copyright Removal + This section allows you to manage your copyright removal key. + 1 + + + + + 114 + IPB Copyright Removal Key + Your copyright removal key obtained from IPS. + 35 + input + ipb_copy_number + + + + + 1 + 1 + + 0 + 1 + ipbcopyright + 0 + + + + 115 + Turn off copyright? + + 35 + yes_no + ips_cp_purchase + + 0 + + + 1 + 2 + + 0 + 1 + ipbcopyright + 0 + + + + 1 + ipbreg + IPB License Settings + This section will allow you to edit your IPB registered license settings. + 0 + + + + + 116 + IPB Registered License Key + DO NOT REMOVE OR EDIT THIS KEY UNLESS YOU'RE SURE OF WHAT YOU'RE DOING!]]> + 16 + input + ipb_reg_number + + + + + 1 + 1 + + 0 + 1 + ipbreg + 0 + + + + 117 + Display registered to line? + + 16 + yes_no + ipb_reg_show + + 0 + + + 1 + 2 + + 0 + 1 + ipbreg + 0 + + + + 118 + Show as licensed to... + Matthew Mecham, IPS, Inc.]]> + 16 + input + ipb_reg_name + + + + + 1 + 3 + + 0 + 1 + ipbreg + 0 + + + + 1 + ipbloginhandler + IPB Log in Handler + Hidden settings, so there. + 1 + + + + + 119 + Log in Method Key + + 36 + input + ipbli_key + + internal + + + 1 + 1 + + 0 + 1 + ipbloginhandler + 0 + + + + 120 + Log In User Name Type + + 36 + input + ipbli_usertype + + username + + + 1 + 2 + + 0 + 1 + ipbloginhandler + 0 + + + + 1 + ipbportal + IPB Portal + These settings enable you to enable or disable IPB Portal and control the options IPB Portal offers. + 0 + + + + + 121 + ENABLE IPB Portal? + + 18 + yes_no + csite_on + + 0 + + + 1 + 1 + + 0 + 1 + ipbportal + 0 + + + + 122 + IPB Portal Page Title? + This will appear inbetween the title elements on the page + 18 + input + csite_title + + IPB Portal + + + 1 + 2 + + 0 + 1 + ipbportal + 0 + + + + 123 + Date format for articles + Same as PHP's date function]]> + 18 + input + csite_article_date + + m-j-y H:i + + + 1 + 3 + + 0 + 0 + ipbportal + 0 + + + + 124 + Show User / Guest Info box? + + 18 + yes_no + csite_pm_show + + 1 + + + 1 + 12 + IPB Portal Components + 0 + 0 + ipbportal + 0 + + + + 127 + Show Site Navigation Menu? + + 18 + yes_no + csite_nav_show + + 1 + + + 1 + 18 + + 0 + 0 + ipbportal + 0 + + + + 128 + Site Navigation Menu Links + http://www.apple.com [Apple's Website]

{board_url} will convert into your board]]>
+ 18 + textarea + csite_nav_contents + + + + + 1 + 19 + + 0 + 0 + ipbportal + 0 +
+ + + 129 + Show Affiliates / Favoured Sites box? + + 18 + yes_no + csite_fav_show + + 0 + + + 1 + 20 + + 0 + 0 + ipbportal + 0 + + + + 130 + Show Affiliates / Favoured Sites box content + Raw HTML enabled + 18 + textarea + csite_fav_contents + + + + + 1 + 21 + + 1 + 0 + ipbportal + 0 + + + + 1 + log_prune + Log Pruning + Controls to determine which (if any) logs you wish to regularly prune. + 0 + + + + + 131 + Prune Spider Logs? + Do you wish to prune spider logs regularly (default every 30 days)? + 19 + yes_no + ipb_prune_spider + + 1 + + + 1 + 10 + Prune Options + 0 + 1 + log_prune + 0 + + + + 132 + Prune Task Logs? + Do you wish to prune task logs regularly (default every 30 days)? + 19 + yes_no + ipb_prune_task + + 0 + + + 1 + 20 + + 0 + 1 + log_prune + 0 + + + + 133 + Prune Admin Logs? + Do you wish to prune admin logs regularly (default every 30 days)? + 19 + yes_no + ipb_prune_admin + + 0 + + + 1 + 30 + + 0 + 1 + log_prune + 0 + + + + 134 + Prune Moderator Logs? + Do you wish to prune moderator logs regularly (default every 30 days)? + 19 + yes_no + ipb_prune_mod + + 0 + + + 1 + 40 + + 0 + 1 + log_prune + 0 + + + + 135 + Prune Email Logs? + Do you wish to prune email logs regularly (default every 30 days)? + 19 + yes_no + ipb_prune_email + + 0 + + + 1 + 50 + + 0 + 1 + log_prune + 0 + + + + 136 + Prune Email Error Logs + Do you wish to prune email error logs regularly (default every 30 days)? + 19 + yes_no + ipb_prune_emailerror + + 0 + + + 1 + 60 + + 0 + 1 + log_prune + 0 + + + + 137 + Prune SQL Error Logs? + Do you wish to prune SQL Error logs older than 30 days? + 19 + yes_no + ipb_prune_sql + + 1 + + + 1 + 61 + + 1 + 1 + log_prune + 0 + + + + 1 + newssetup + News Set-up + This section will allow you to specify the forum you wish to export news topics from to be used with ssi.php and the IPB Portal. + 0 + + + + + 138 + Export news topics from which forum? + + 20 + dropdown + news_forum_id + + + #show_forums# + + 1 + 1 + + 0 + 1 + newssetup + 0 + + + + 139 + + + 20 + yes_no + index_news_link + + 0 + + + 1 + 2 + + 0 + 1 + newssetup + 0 + + + + 1 + personalmessagesetup + Personal Message Set-up + This section allows you to control the global PM options. + 0 + + + + + 140 + Allow BBCode in messages? + + 21 + yes_no + msg_allow_code + + 1 + + + 1 + 1 + + 0 + 1 + personalmessagesetup + 0 + + + + 141 + Allow HTML in messages? + + 21 + yes_no + msg_allow_html + + 0 + + + 1 + 2 + + 0 + 1 + personalmessagesetup + 0 + + + + 142 + Max. number of messages to show per page when viewing message list + The default is 50. + 21 + input + show_max_msg_list + + 50 + + + 1 + 3 + + 0 + 1 + personalmessagesetup + 0 + + + + 143 + Unblockable PM Groups + Members will not be able to block private messages from members in the selected groups. You may select more than one. + 21 + multi + unblockable_pm_groups + + + #show_groups# + ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) + { + $previous = explode( ',', $this->ipsclass->vars['unblockable_pm_groups'] ); + + if( in_array( $this->ipsclass->vars['admin_group'], $previous ) ) + { + $_POST['unblockable_pm_groups'] .= ',' . $this->ipsclass->vars['admin_group']; + $_POST['unblockable_pm_groups'] = $this->ipsclass->trim_leading_comma( $_POST['unblockable_pm_groups'] ); + } + } + + $key = 'unblockable_pm_groups'; +} +if ( $show == 1 ) +{ + $key='unblockable_pm_groups[]'; +}]]> + 1 + 4 + + 0 + 1 + personalmessagesetup + 0 + + + + 144 + + + 21 + multi + override_inbox_full + + + #show_groups# + ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) + { + $previous = explode( ',', $this->ipsclass->vars['override_inbox_full'] ); + + if( in_array( $this->ipsclass->vars['admin_group'], $previous ) ) + { + $_POST['override_inbox_full'] .= ',' . $this->ipsclass->vars['admin_group']; + $_POST['override_inbox_full'] = $this->ipsclass->trim_leading_comma( $_POST['override_inbox_full'] ); + } + } + + $key = 'override_inbox_full'; +} +if ( $show == 1 ) +{ + $key='override_inbox_full[]'; +}]]> + 1 + 5 + + 0 + 1 + personalmessagesetup + 0 + + + + 1 + portal_poll + Portal: Poll + + 1 + + + + + 145 + Enter URL to poll topic for inclusion + Leave blank to not show a poll or the poll box + 37 + input + poll_poll_url + + + + + 1 + 17 + + 0 + 0 + portal_poll + 0 + + + + 1 + portal_recent_topics + Portal: Recent Topics + + 1 + + + + + 146 + Forums to export articles from + You may select more than one. + 38 + multi + recent_topics_article_forum + + + #show_forums# + + 1 + 3 + + 0 + 0 + portal_recent_topics + 0 + + + + 147 + Number of articles to show + + 38 + input + recent_topics_article_max + + 15 + + + 1 + 4 + Recent Topics Last X + 1 + 0 + portal_recent_topics + 0 + + + + 148 + Number of topics to show + + 38 + input + recent_topics_discuss_number + + 1 + + + 1 + 9 + Recent Discussions Last X + 1 + 0 + portal_recent_topics + 0 + + + + 1 + searchenginespiders + Search Engine Spiders + This section will allow you to set up and maintain your search engine bot spider recognition settings. + 0 + + + + + 149 + Enable the search engine spider recognition? + + 24 + yes_no + spider_sense + + 1 + + + 1 + 1 + + 0 + 1 + searchenginespiders + 0 + + + + 150 + Log all spider visits? + + 24 + yes_no + spider_visit + + 0 + + + 1 + 2 + + 0 + 1 + searchenginespiders + 0 + + + + 151 + Treat spider/bot as part of which group? + + 24 + dropdown + spider_group + + 2 + #show_groups# + ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) +{ + if( $this->ipsclass->vars['spider_group'] == $this->ipsclass->vars['admin_group'] ) + { + $_POST['spider_group'] = $this->ipsclass->vars['admin_group']; + } +}]]> + 1 + 3 + + 0 + 1 + searchenginespiders + 0 + + + + 152 + Force spider/bot to use skin + + 24 + dropdown + spider_suit + + + #show_skins# + + 1 + 4 + + 0 + 1 + searchenginespiders + 0 + + + + 153 + Show spider/bot in the active users list? + + 24 + yes_no + spider_active + + 1 + + + 1 + 5 + Active Users List + 0 + 1 + searchenginespiders + 0 + + + + 154 + Show spider as anonymous + + 24 + yes_no + spider_anon + + 0 + + + 1 + 6 + + 1 + 1 + searchenginespiders + 0 + + + + 155 + Spider Bot User-Agent + bot=Human Name format.(one per line)
Example: googlebot=Google.com]]>
+ 24 + textarea + search_engine_bots + + googlebot=Google.com +slurp@inktomi=Hot Bot +ask jeeves=Ask Jeeves +lycos=Lycos.com +whatuseek=What You Seek +ia_archiver=Archive.org + + + 1 + 7 + + 0 + 1 + searchenginespiders + 0 +
+ + + 1 + searchsetup + Search Set-Up + + 0 + + + + + 156 + Type of search to use? + +
+]]>
+ 25 + dropdown + search_sql_method + + man + ftext=Full Text +man=Manual + ipsclass->DB->sql_can_fulltext() ) + { + $full_text = "FULL TEXT SEARCHING IS NOT AVAILABLE ON YOUR SERVER."; + $index = ""; + } + else + { + $full_text = "Full text available"; + if ( ! $this->ipsclass->admin->get_fulltextindex_status() ) + { + $index = "NO FULL TEXT INDEXES FOUND: Build indexes now!"; + } + else + { + $index = "Full text indexes found"; + } + } + + $r['conf_description'] = str_replace( "", $full_text, $r['conf_description'] ); + $r['conf_description'] = str_replace( "", $index, $r['conf_description'] ); +}]]> + 1 + 1 + + 0 + 1 + searchsetup + 0 +
+ + + 157 + Default Search Mode? + This setting will only take effect if using full text searching + 25 + dropdown + search_default_method + + simple + simple=Simple Search +adv=Advanced Search + + 1 + 2 + + 0 + 1 + searchsetup + 0 + + + + 158 + Minimum search word length + + 25 + input + min_search_word + + 4 + min_search_word + + 1 + 13 + + 0 + 1 + searchsetup + 0 + + + + 159 + View New Posts: Block Forums + don't wish to search for new posts when using either the 'get active topics' or 'view new posts' links. You may select more than one.]]> + 25 + multi + vnp_block_forums + + + #show_forums# + + 1 + 14 + + 0 + 1 + searchsetup + 0 + + + + 296 + Hide manual search notice? + If you are using manual search and your SQL server supports fulltext searching, a note is shown on the admin home page. You can manually hide it by changing this to yes. + 25 + yes_no + hide_ftext_note + + 0 + + + 1 + 15 + + 0 + 0 + searchsetup + 0 + + + + 1 + securityandprivacy + Security and Privacy + These options allow you to adjust the security and privacy options for your board. + 0 + securityandprivacy.php + + + + 309 + Enable CAPTCHA? + Do you wish to enable the anti-spam option for the registration form? + 26 + yes_no + bot_antispam + + 1 + + + 1 + 1 + + 0 + 1 + securityandprivacy + 0 + + + + 160 + CAPTCHA type + + 26 + dropdown + bot_antispam_type + + recaptcha + default=Normal (requires GD) +recaptcha=reCAPTCHA + + 1 + 5 + + 0 + 1 + securityandprivacy + 0 + + + + 161 + Captcha: Use Fonts + + 26 + yes_no + captcha_allow_fonts + + 1 + + + 1 + 7 + + 0 + 1 + securityandprivacy + 0 + + + + 306 + reCAPTCHA Private Key + Get an API key...]]> + 26 + input + recaptcha_private_key + + 6LcpWAMAAAAAAETX5jHd9NlPtIHJA4G-ra3X2RQB + + + 1 + 9 + + 0 + 1 + securityandprivacy + 0 + + + + 307 + reCAPTCHA Public Key + Get an API key...]]> + 26 + input + recaptcha_public_key + + 6LcpWAMAAAAAAA4klDtDNuDH6LsGgBX5mBoJ3naK + + + 1 + 11 + + 0 + 1 + securityandprivacy + 0 + + + + 308 + reCAPTCHA Language + Select the language you would like to use for reCAPTCHA + 26 + dropdown + recaptcha_language + + en + en=English +nl=Dutch +fr=French +de=German +pt=Portuguese +ru=Russian +es=Spanish +tr=Turkish + + 1 + 13 + + 0 + 1 + securityandprivacy + 0 + + + + 162 + Guest Posting Bot Control + Do you wish to require guests who post (where allowed) to input a code to confirm their post? + 26 + dropdown + guest_captcha + + recaptcha + default=Normal (requires GD) +recaptcha=reCAPTCHA + + 1 + 15 + + 1 + 1 + securityandprivacy + 0 + + + + 163 + Allow dynamic images? + + 26 + yes_no + allow_dynamic_img + + 0 + + + 1 + 20 + + 0 + 1 + securityandprivacy + 0 + + + + 164 + Enable X_FORWARDED_FOR IP matching? + + 26 + yes_no + xforward_matching + + 0 + + + 1 + 30 + + 0 + 1 + securityandprivacy + 0 + + + + 165 + Lost Password: Password Method + + 26 + dropdown + lp_method + + random + random=Email Random Password +choose=Allow User to Enter New Password + + 1 + 40 + + 0 + 1 + securityandprivacy + 0 + + + + 166 + + + 26 + dropdown + login_key_expire + + 7 + 0=Do not expire (not recommended) +3=Expire after 3 days +7=Expire after 7 days +30=Expire after 30 days + + 1 + 50 + + 0 + 1 + securityandprivacy + 0 + + + + 167 + + + 26 + yes_no + login_change_key + + 0 + + + 1 + 60 + + 0 + 1 + securityandprivacy + 0 + + + + 168 + Session Expiration (in seconds) + Removes inactive sessions over the limit you specify. The lower the number the less chance of a session being hijacked. + 26 + input + session_expiration + + 3600 + + + 1 + 70 + + 0 + 1 + securityandprivacy + 0 + + + + 169 + + + 26 + yes_no + match_ipaddress + + 1 + + + 1 + 80 + + 0 + 1 + securityandprivacy + 0 + + + + 170 + + This further reduces the risk of session hijacking and tampering but it does mean that a user will have their session terminated if they use another browser at the same time. + 26 + yes_no + match_browser + + 0 + + + 1 + 90 + + 1 + 1 + securityandprivacy + 0 + + + + 171 + Lock user account after how many failed login attempts + +Tip: Set to 0 to disable]]> + 26 + input + ipb_bruteforce_attempts + + 3 + + + 1 + 100 + Brute-force Account Locking + 0 + 1 + securityandprivacy + 0 + + + + 172 + Reset failed login attempts after how many minutes + +Tip: Set to 0 to not reset failed login attempts until a succesful login occurs ]]> + 26 + input + ipb_bruteforce_period + + 15 + + + 1 + 110 + + 0 + 1 + securityandprivacy + 0 + + + + 173 + Automatically unlock account? + +Tip: Setting this to no will require you to manually unlock accounts under the Management tab]]> + 26 + yes_no + ipb_bruteforce_unlock + + 1 + + + 1 + 120 + + 1 + 1 + securityandprivacy + 0 + + + + 174 + Use secure mail form for member to member mails? + Hides the email address from other users and prevents email harvesting bots from gathering your members email addresses. + 26 + yes_no + use_mail_form + + 1 + + + 1 + 130 + + 0 + 1 + securityandprivacy + 0 + + + + 175 + Allow images to be posted? + Advanced programmers can force images to run as scripts. IBF limits damage by this method however. This should only be disabled as an extreme measure. + 26 + yes_no + allow_images + + 1 + + + 1 + 131 + + 0 + 1 + securityandprivacy + 0 + + + + 176 + Allow flash movies in posts and avatars? + + 26 + yes_no + allow_flash + + 0 + + + 1 + 132 + + 1 + 1 + securityandprivacy + 0 + + + + 177 + Remove the ACP link from the board + + 26 + yes_no + security_remove_acp_link + + 0 + + + 1 + 133 + + 0 + 1 + securityandprivacy + 0 + + + + 180 + New registration email validation? + + 26 + dropdown + reg_auth_type + + 0 + admin_user=User then Admin Validation +user=User Email Validation +admin=Admin Validation +0=None + + 1 + 140 + + 0 + 1 + securityandprivacy + 0 + + + + 181 + + + 26 + input + validate_day_prune + + 0 + + + 1 + 141 + + 0 + 1 + securityandprivacy + 0 + + + + 182 + Get notified when a new user registers via email? + This will send an email to the board incoming email address when a new user successfully registers on the board. + 26 + yes_no + new_reg_notify + + 0 + + + 1 + 142 + + 0 + 1 + securityandprivacy + 0 + + + + 183 + Force guests to log in before allowing access to the board? + If set to yes, any guest must either log in or register before they can view the board. + 26 + yes_no + force_login + + 0 + + + 1 + 143 + + 0 + 1 + securityandprivacy + 0 + + + + 184 + Disable new registrations? + + 26 + yes_no + no_reg + + 0 + + + 1 + 144 + + 0 + 1 + securityandprivacy + 0 + + + + 185 + Remove chr(0xCA) from input? + + 26 + yes_no + strip_space_chr + + 0 + + + 1 + 145 + + 0 + 1 + securityandprivacy + 0 + + + + 186 + + Removes the ability for your members to report a post. + 26 + yes_no + disable_reportpost + + 0 + + + 1 + 146 + + 0 + 1 + securityandprivacy + 0 + + + + 187 + Reported Post Notifications sent to + Where do you want reported post notifications to go? + 26 + dropdown + reportpost_method + + pm + email=Email +pm=Personal Message + + 1 + 147 + + 0 + 1 + securityandprivacy + 0 + + + + 188 + Flood control delay (in seconds) + Can be left blank for no flood control and does not apply to members which belong to a group that can bypass flood control.]]> + 26 + input + flood_control + + 0 + + + 1 + 148 + + 1 + 1 + securityandprivacy + 0 + + + + 189 + Allow users to browse the Active Users list? + + 26 + yes_no + allow_online_list + + 1 + + + 1 + 150 + Privacy + 0 + 1 + securityandprivacy + 0 + + + + 190 + Disable Anonymous Login + + 26 + yes_no + disable_anonymous + + 0 + + + 1 + 151 + + 0 + 1 + securityandprivacy + 0 + + + + 191 + Disable root admin group viewing anonymous online users? + Anonymous users have an asterisk after their name + 26 + yes_no + disable_admin_anon + + 0 + + + 1 + 151 + + 0 + 1 + securityandprivacy + 0 + + + + 192 + Display IPB version on your site? + Do you wish to display the version of Invision Power Board you are running in your copyright footer? + 26 + yes_no + ipb_display_version + + 1 + + + 1 + 152 + + 0 + 1 + securityandprivacy + 0 + + + + 193 + Disable root admin group viewing online users IP address in online user list? + + 26 + yes_no + disable_online_ip + + 0 + + + 1 + 153 + + 1 + 1 + securityandprivacy + 0 + + + + 1 + subsmanager + Subscriptions Manager + These settings control various subscription manager features. + 0 + + + + + 194 + Show subscription packages when registering? + If enabled, the subscription packages will be shown in the registration page and the registering member will be able to select one. + 27 + yes_no + subsm_show_reg + + 0 + + + 1 + 1 + Optional Purchase Upon Registration + 1 + 1 + subsmanager + 0 + + + + 195 + Force every member to require a subscriptions package + If enabled, the member must choose a package upon registration to proceed past the validating group and current members must purchase a subscription to view the board. + 27 + yes_no + subsm_enforce + + 0 + + + 1 + 2 + Force Package Purchase + 0 + 1 + subsmanager + 0 + + + + 196 + Member group to use after registration but before package purchase? + + 27 + dropdown + subsm_nopkg_group + + 1 + #show_groups# + ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) +{ + if( $this->ipsclass->vars['subsm_nopkg_group'] == $this->ipsclass->vars['admin_group'] ) + { + $_POST['subsm_nopkg_group'] = $this->ipsclass->vars['admin_group']; + } +}]]> + 1 + 3 + + 1 + 1 + subsmanager + 0 + + + + 1 + topicspostsandpolls + Topics, Posts and Polls + These options control various elements when posting, reading topics and reading polls. + 0 + + + + + 197 + Number of topics per forum page + + 28 + input + display_max_topics + + 30 + + + 1 + 1 + Showing Topics + 0 + 1 + topicspostsandpolls + 0 + + + + 198 + Remove excess exclamation/question marks in topic titles? + Will turn: This!!!!! into This! + 28 + yes_no + etfilter_punct + + 0 + + + 1 + 2 + + 0 + 1 + topicspostsandpolls + 0 + + + + 199 + Number of rating votes required to show + + 28 + input + topic_rating_needed + + 1 + + + 1 + 3 + + 0 + 1 + topicspostsandpolls + 0 + + + + 200 + Stop shouting in topic titles? + Will turn: CLICK HERE into Click Here + 28 + yes_no + etfilter_shout + + 0 + + + 1 + 3 + + 0 + 1 + topicspostsandpolls + 0 + + + + 201 + + + 28 + input + hot_topic + + 15 + + + 1 + 4 + + 1 + 1 + topicspostsandpolls + 0 + + + + 202 + Topic prefix for PINNED topics + + 28 + input + pre_pinned + + Pinned: + + + 1 + 10 + Topic Titles + 0 + 1 + topicspostsandpolls + 0 + + + + 203 + Topic prefix for MOVED topics + + 28 + input + pre_moved + + Moved: + + + 1 + 11 + + 0 + 1 + topicspostsandpolls + 0 + + + + 204 + Topic prefix for POLLS + + 28 + input + pre_polls + + Poll: + + + 1 + 12 + + 0 + 1 + topicspostsandpolls + 0 + + + + 205 + Topic Title Max Length + Maximum topic title length allowed. + 28 + input + topic_title_max_len + + 150 + + + 1 + 13 + + 1 + 1 + topicspostsandpolls + 0 + + + + 206 + Number of posts per topic page + + 28 + input + display_max_posts + + 20 + + + 1 + 20 + Showing Posts + 0 + 1 + topicspostsandpolls + 0 + + + + 207 + Automatic Image Resize Percentage + Please enter the percentage to reduce the image to + 28 + input + resize_img_percent + + 50 + + + 1 + 21 + + 0 + 1 + topicspostsandpolls + 0 + + + + 208 + + + 28 + yes_no + resize_linked_img + + 1 + + + 1 + 21 + + 0 + 1 + topicspostsandpolls + 0 + + + + 209 + Outline View: Number of posts per page + This controls how many posts are shown in the threaded tree per page. This helps to reduce server overhead on very large topics. + 28 + input + threaded_per_page + + 100 + + + 1 + 21 + + 0 + 1 + topicspostsandpolls + 0 + + + + 210 + Default Topic View Mode + + 28 + dropdown + topicmode_default + + linear + linear=Standard +threaded=Outline +linearplus=Linear Plus + + 1 + 22 + + 0 + 1 + topicspostsandpolls + 0 + + + + 211 + Ignore Users: Protected Groups + Members of the groups selected will not be able to be ignored. + 28 + multi + cannot_ignore_groups + + 4 + #show_groups# + ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) + { + $previous = explode( ',', $this->ipsclass->vars['cannot_ignore_groups'] ); + + if( in_array( $this->ipsclass->vars['admin_group'], $previous ) ) + { + $_POST['cannot_ignore_groups'] .= ',' . $this->ipsclass->vars['admin_group']; + $_POST['cannot_ignore_groups'] = $this->ipsclass->trim_leading_comma( $_POST['cannot_ignore_groups'] ); + } + } + + $key = 'cannot_ignore_groups'; +} +if ( $show == 1 ) +{ +$key = 'cannot_ignore_groups[]'; +}]]> + 1 + 23 + + 0 + 1 + topicspostsandpolls + 0 + + + + 212 + Order posts within a topic by + + 28 + dropdown + post_order_column + + pid + pid=Post ID +post_date=Post Date + + 1 + 24 + + 0 + 1 + topicspostsandpolls + 0 + + + + 213 + Order posts within a topic by + + 28 + dropdown + post_order_sort + + asc + asc=Ascending (0-9) +desc=Descending (9-0) + + 1 + 25 + + 1 + 1 + topicspostsandpolls + 0 + + + + 214 + Max. no. emoticons per post + + 28 + input + max_emos + + 10 + + + 1 + 40 + Making a Post + 0 + 1 + topicspostsandpolls + 0 + + + + 215 + Max. no. images per post + + 28 + input + max_images + + 10 + + + 1 + 41 + + 0 + 1 + topicspostsandpolls + 0 + + + + 216 + + + 28 + input + max_post_length + + 100 + + + 1 + 42 + + 0 + 1 + topicspostsandpolls + 0 + + + + 217 + Max. height of posted Flash movies (in pixels) + + 28 + input + max_h_flash + + 199 + + + 1 + 43 + + 0 + 1 + topicspostsandpolls + 0 + + + + 218 + Max. width of posted Flash movies (in pixels) + + 28 + input + max_w_flash + + 199 + + + 1 + 43 + + 0 + 1 + topicspostsandpolls + 0 + + + + 219 + No. characters to word wrap on? + Prevents long unbroken words which distort tables. 80 - 100 is recommended + 28 + input + post_wordwrap + + 80 + + + 1 + 45 + + 0 + 1 + topicspostsandpolls + 0 + + + + 220 + Max. Number Quotes Per Post + Use this to stop multiple quote embedding which can cause some browsers to hang or crash. + 28 + input + max_quotes_per_post + + 10 + + + 1 + 48 + + 0 + 1 + topicspostsandpolls + 0 + + + + 221 + + n
minutes, once after the other in a topic they will be merged into one post. +Enter the number of minutes to capture concurrent posts. +Enter 0 to not use.]]> + 28 + input + post_merge_conc + + 0 + + + 1 + 49 + + 0 + 1 + topicspostsandpolls + 0 + + + + 222 + Stop Quote Embedding? + ..]]> + 28 + yes_no + strip_quotes + + 1 + + + 1 + 49 + + 0 + 1 + topicspostsandpolls + 0 + + + + 223 + Valid postable image extensions + Seperate with comma (gif,jpeg,jpg)]]> + 28 + input + img_ext + + gif,jpeg,jpg,png + + + 1 + 50 + + 1 + 1 + topicspostsandpolls + 0 + + + + 224 + Use URL Filtering? + If you would like to filter urls based on your blacklist or whitelist settings, enable this. URL filtering allows you to explicitely allow (whitelist) or deny (blacklist) links in topic posts (images and urls). + 28 + yes_no + ipb_use_url_filter + + 0 + + + 1 + 53 + URL Filtering Options + 0 + 1 + topicspostsandpolls + 0 + + + + 225 + Which filter do you wish to use? + If you have enabled the url filtering, do you wish to use your blacklist or whitelist? You may only use one or the other. + 28 + dropdown + ipb_url_filter_option + + black + white=Whitelist +black=Blacklist + + 1 + 54 + + 0 + 1 + topicspostsandpolls + 0 + + + + 226 + Whitelist Settings +
+i.e.: http://www.yourdomain.com*
+http://*google.com*]]>
+ 28 + textarea + ipb_url_whitelist + + + + + 1 + 55 + + 0 + 1 + topicspostsandpolls + 0 +
+ + + 227 + Blacklist Options +
+i.e.: http://*somedomain.com*
+http://competitor_domain.com*]]>
+ 28 + textarea + ipb_url_blacklist + + + + + 1 + 56 + + 1 + 1 + topicspostsandpolls + 0 +
+ + + 228 + Show uploaded images in posts as images? + + 28 + yes_no + show_img_upload + + 1 + + + 1 + 60 + Attached Image Options + 0 + 1 + topicspostsandpolls + 0 + + + + 229 + Maximum No. Thumbnails In a Row + This relates to the number of thumbnails that appear side-by-side before a line break to prevent the layout from distoring. + 28 + input + topic_attach_no_per_row + + 4 + + + 1 + 61 + + 0 + 1 + topicspostsandpolls + 0 + + + + 230 + Show thumbnail of attached image? + + 28 + yes_no + siu_thumb + + 1 + siu_thumb + + 1 + 61 + + 0 + 1 + topicspostsandpolls + 0 + + + + 231 + + + 28 + input + siu_width + + 100 + + + 1 + 62 + + 0 + 1 + topicspostsandpolls + 0 + + + + 232 + + + 28 + input + siu_height + + 100 + + + 1 + 63 + + 1 + 1 + topicspostsandpolls + 0 + + + + 233 + + This is for when a guest posts with a members name, it allows for a visual difference to prevent confusion + 28 + input + guest_name_pre + + Guest_ + + + 1 + 70 + Guest Username + 0 + 1 + topicspostsandpolls + 0 + + + + 234 + + This is for when a guest posts with a members name, it allows for a visual difference to prevent confusion + 28 + input + guest_name_suf + + _* + + + 1 + 71 + + 1 + 1 + topicspostsandpolls + 0 + + + + 235 + + + 28 + yes_no + poll_tags + + 1 + + + 1 + 80 + Poll Options + 0 + 1 + topicspostsandpolls + 0 + + + + 236 + Max. Poll Questions Per Poll + Enter the maximum number of questions you wish to allow your members to create in a single poll. + 28 + input + max_poll_questions + + 3 + + + 1 + 81 + + 0 + 1 + topicspostsandpolls + 0 + + + + 237 + Maximum number of poll choices allowed? + + 28 + input + max_poll_choices + + 20 + + + 1 + 81 + + 0 + 1 + topicspostsandpolls + 0 + + + + 238 + Allow members to view the results of a poll without losing their vote? + + 28 + yes_no + allow_result_view + + 1 + + + 1 + 82 + + 0 + 1 + topicspostsandpolls + 0 + + + + 239 + Allow poll creator to vote in own poll? + + 28 + yes_no + allow_creator_vote + + 1 + + + 1 + 83 + + 0 + 1 + topicspostsandpolls + 0 + + + + 240 + + Do you wish to allow posters who create polls to be able to disallow replies to the poll? + 28 + yes_no + ipb_poll_only + + 0 + + + 1 + 84 + + 0 + 1 + topicspostsandpolls + 0 + + + + 241 + Number of hours to keep open the ability for topic starters to attach a poll to their topic + Does not affect administrators or super moderators + 28 + input + startpoll_cutoff + + 24 + + + 1 + 84 + + 1 + 1 + topicspostsandpolls + 0 + + + + 242 + Allow members to use Rich Text Editing? + + 28 + yes_no + posting_allow_rte + + 1 + + + 1 + 100 + Editor Settings + 0 + 1 + topicspostsandpolls + 0 + + + + 243 + Make the side-panel open by default + + 28 + yes_no + rte_side_panel_open + + 1 + + + 1 + 103 + + 1 + 1 + topicspostsandpolls + 0 + + + + 1 + trashcansetup + Trash Can Set-up + The trashcan is a special forum in which topics are moved into instead of being deleted. + 0 + trashcan.php + + + + 244 + Enable the trashcan? + + 29 + yes_no + forum_trash_can_enable + + 0 + + + 1 + 1 + + 0 + 1 + trashcansetup + 0 + + + + 245 + Designate which forum to use as the trash can? + No special read/write/reply permissions are applied - please set up as if it were a normal forum. + 29 + dropdown + forum_trash_can_id + + + #show_forums# + + 1 + 2 + + 0 + 1 + trashcansetup + 0 + + + + 246 + Use trashcan for ROOT administrators? + + 29 + yes_no + forum_trash_can_use_radmin + + 1 + + + 1 + 3 + + 0 + 1 + trashcansetup + 0 + + + + 247 + Use trashcan for normal administrators? + + 29 + yes_no + forum_trash_can_use_admin + + 1 + + + 1 + 4 + + 0 + 1 + trashcansetup + 0 + + + + 248 + Use trashcan for global moderators? + + 29 + yes_no + forum_trash_can_use_smod + + 1 + + + 1 + 5 + + 0 + 1 + trashcansetup + 0 + + + + 249 + Use trashcan for forum moderators? + + 29 + yes_no + forum_trash_can_use_mod + + 1 + + + 1 + 6 + + 0 + 1 + trashcansetup + 0 + + + + 1 + userprofiles + User Profiles + + 0 + + + + + 250 + Allow members to choose skins? + + 30 + yes_no + allow_skins + + 1 + + + 1 + 10 + Global User Profile Options + 0 + 1 + userprofiles + 0 + + + + 251 + Disable group prefix/suffix formatting + This will allow you to globally disable the group prefix and suffix from formatting member names + 30 + yes_no + ipb_disable_group_psformat + + 0 + + + 1 + 20 + + 0 + 1 + userprofiles + 0 + + + + 252 + Number of posts a member must have over before allowing them to change their member title? + Enter 0 to disable completely + 30 + input + post_titlechange + + 500 + + + 1 + 30 + + 0 + 1 + userprofiles + 0 + + + + 253 + Maximum length (in bytes) for the location field entry + + 30 + input + max_location_length + + 1000 + + + 1 + 40 + + 0 + 1 + userprofiles + 0 + + + + 254 + Maximum length (in bytes) for the interests field entry + + 30 + input + max_interest_length + + 1000 + + + 1 + 50 + + 0 + 1 + userprofiles + 0 + + + + 255 + Maximum length (in bytes) for user signatures + + 30 + input + max_sig_length + + 10000 + + + 1 + 60 + + 0 + 1 + userprofiles + 0 + + + + 256 + Allow HTML in signatures? + This is NOT recommended unless you trust all your members who can add a signature. + 30 + yes_no + sig_allow_html + + 0 + + + 1 + 70 + + 0 + 1 + userprofiles + 0 + + + + 257 + Allow BBCode in signatures? + + 30 + yes_no + sig_allow_ibc + + 1 + + + 1 + 80 + + 0 + 1 + userprofiles + 0 + + + + 302 + + This is NOT recommended unless you trust all your members who can add about me information. + 30 + yes_no + aboutme_html + + 0 + + + 1 + 85 + + 0 + 1 + userprofiles + 0 + + + + 303 + + + 30 + yes_no + aboutme_bbcode + + 1 + + + 1 + 87 + + 0 + 1 + userprofiles + 0 + + + + 304 + + + 30 + yes_no + aboutme_emoticons + + 1 + + + 1 + 88 + + 0 + 1 + userprofiles + 0 + + + + 258 + Default editor type for members + + 30 + dropdown + ips_default_editor + + std + std=Standard Editor +rte=Rich-Text Editor + + 1 + 90 + + 0 + 1 + userprofiles + 0 + + + + 259 + User selectable posts per page dropdown contents + Example: 5,15,20,25,30]]> + 30 + input + postpage_contents + + 5,10,15,20,25,30,35,40 + + + 1 + 100 + + 0 + 1 + userprofiles + 0 + + + + 260 + User selectable topics per forum page dropdown contents + Example: 5,15,20,25,30]]> + 30 + input + topicpage_contents + + 5,10,15,20,25,30,35,40 + + + 1 + 110 + + 1 + 1 + userprofiles + 0 + + + + 261 + + Leave blank or enter 0 for no auto prune limit + 30 + input + subs_autoprune + + 0 + + + 1 + 120 + + 0 + 1 + userprofiles + 0 + + + + 262 + Automatically subscribe to every forum + new topics (not replies) in every forum available to them. This means that members having a selected PRIMARY group will be emailed everytime there is a new topic and they are not online to view it.
Note This will only send the email to those who have chosen to 'Allow emails from the administrators'.]]>
+ 30 + multi + autoforum_sub_groups + + + #show_groups# + ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) + { + $previous = explode( ',', $this->ipsclass->vars['autoforum_sub_groups'] ); + + if( in_array( $this->ipsclass->vars['admin_group'], $previous ) ) + { + $_POST['autoforum_sub_groups'] .= ',' . $this->ipsclass->vars['admin_group']; + $_POST['autoforum_sub_groups'] = $this->ipsclass->trim_leading_comma( $_POST['autoforum_sub_groups'] ); + } + } + + $key = 'autoforum_sub_groups'; +} +if ( $show == 1 ) +{ + $key='autoforum_sub_groups[]'; +}]]> + 1 + 130 + + 1 + 1 + userprofiles + 0 +
+ + + 263 + Allow the use of avatars? + + 30 + yes_no + avatars_on + + 1 + + + 1 + 140 + + 0 + 1 + userprofiles + 0 + + + + 264 + Allowed avatar image URL extensions + Seperate with comma (gif,png,jpeg) etc + 30 + input + avatar_ext + + gif,jpg,jpeg,png + + + 1 + 150 + + 0 + 1 + userprofiles + 0 + + + + 265 + Allow users to use remote URL avatars? + + 30 + yes_no + avatar_url + + 1 + + + 1 + 160 + + 0 + 1 + userprofiles + 0 + + + + 266 + Max. file size for avatar uploads? (K) + + 30 + input + avup_size_max + + 50 + + + 1 + 170 + + 0 + 1 + userprofiles + 0 + + + + 267 + Maximum avatar dimensions + xHEIGHT)]]> + 30 + input + avatar_dims + + 90x90 + + + 1 + 180 + + 0 + 1 + userprofiles + 0 + + + + 268 + Default sizes for gallery avatars? + xHEIGHT)]]> + 30 + input + avatar_def + + 80x80 + + + 1 + 190 + + 0 + 1 + userprofiles + 0 + + + + 269 + Number of columns for the avatar gallery? + + 30 + input + av_gal_cols + + 5 + + + 1 + 200 + + 0 + 1 + userprofiles + 0 + + + + 270 + Allowed photo URL extensions + Seperate with comma (gif,png,jpeg) etc + 30 + input + photo_ext + + gif,jpg,jpeg,png + + + 1 + 210 + + 0 + 1 + userprofiles + 0 + + + + 271 + Disable IPB auto sizing large photos/avatars? + This will ask the member to input their dimensions + 30 + yes_no + disable_ipbsize + + 0 + + + 1 + 220 + + 1 + 1 + userprofiles + 0 + + + + 272 + Allow GUESTS to view signatures? + + 30 + yes_no + guests_sig + + 1 + + + 1 + 230 + Guest Default Options + 0 + 1 + userprofiles + 0 + + + + 273 + Allow GUESTS to view posted images? + + 30 + yes_no + guests_img + + 1 + + + 1 + 240 + + 0 + 1 + userprofiles + 0 + + + + 274 + Allow GUESTS to view user avatars? + + 30 + yes_no + guests_ava + + 1 + + + 1 + 250 + + 1 + 1 + userprofiles + 0 + + + + 276 + + + 30 + yes_no + pp_show_classic + + 0 + + + 1 + 260 + Personal Portal + 0 + 1 + userprofiles + 0 + + + + 277 + Allow members to rate each other? + + 30 + yes_no + pp_allow_member_rate + + 1 + + + 1 + 270 + + 1 + 1 + userprofiles + 0 + + + + 1 + warnsetup + Warn Set-up + This section will allow you to set up the warning system. + 0 + + + + + 278 + Enable the warning system? + + 31 + yes_no + warn_on + + 1 + + + 1 + 1 + + 0 + 1 + warnsetup + 0 + + + + 279 + Minimum Warn Level + Members always start with a zero warn level when registered.]]> + 31 + input + warn_min + + 0 + + + 1 + 2 + Warning Levels + 0 + 1 + warnsetup + 0 + + + + 280 + Maximum Warn Level + + 31 + input + warn_max + + 10 + + + 1 + 3 + + 1 + 1 + warnsetup + 0 + + + + 281 + Protected Groups + You may choose more than one.]]> + 31 + multi + warn_protected + + + #show_groups# + ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) + { + $previous = explode( ',', $this->ipsclass->vars['warn_protected'] ); + + if( in_array( $this->ipsclass->vars['admin_group'], $previous ) ) + { + $_POST['warn_protected'] .= ',' . $this->ipsclass->vars['admin_group']; + $_POST['warn_protected'] = $this->ipsclass->trim_leading_comma( $_POST['warn_protected'] ); + } + } + + $key = 'warn_protected'; +} +if ( $show == 1 ) +{ + $key='warn_protected[]'; +}]]> + 1 + 4 + + 0 + 1 + warnsetup + 0 + + + + 282 + Allow all other non-protected groups to see their own warn level and reasons? + + 31 + yes_no + warn_show_own + + 0 + + + 1 + 5 + + 0 + 1 + warnsetup + 0 + + + + 283 + Allow warnings to continue once the minimum or maximum has been reached? + + 31 + yes_no + warn_past_max + + 0 + + + 1 + 6 + + 0 + 1 + warnsetup + 0 + + + + 284 + Type of visual indicator? + Controls which type of warn level meter is displayed. + 31 + dropdown + warn_show_rating + + 0 + level]]> + + 1 + 7 + + 0 + 1 + warnsetup + 0 + + + + 285 + Moderators can ban via warn panel? + Admins can automatically do this via the warn panel.]]> + 31 + yes_no + warn_mod_ban + + 1 + + + 1 + 8 + Forum Moderator Permissions + 0 + 1 + warnsetup + 0 + + + + 286 + Moderators can mod queue members via warn panel? + Admins can automatically do this via the warn panel.]]> + 31 + yes_no + warn_mod_modq + + 1 + + + 1 + 9 + + 0 + 1 + warnsetup + 0 + + + + 287 + Moderators can remove post rights via warn panel? + Admins can automatically do this via the warn panel.]]> + 31 + yes_no + warn_mod_post + + 1 + + + 1 + 10 + + 0 + 1 + warnsetup + 0 + + + + 288 + Number of times per day moderators can warn a single member + + 31 + input + warn_mod_day + + 3 + + + 1 + 11 + + 1 + 1 + warnsetup + 0 + + + + 289 + Global Moderators can ban via warn panel? + Admins can automatically do this via the warn panel. + 31 + yes_no + warn_gmod_ban + + 1 + + + 1 + 12 + Global Moderator Permissions + 0 + 1 + warnsetup + 0 + + + + 290 + Global Moderators can mod queue members via warn panel? + Admins can automatically do this via the warn panel. + 31 + yes_no + warn_gmod_modq + + 1 + + + 1 + 13 + + 0 + 1 + warnsetup + 0 + + + + 291 + Global Moderators can remove post rights via warn panel? + Admins can automatically do this via the warn panel. + 31 + yes_no + warn_gmod_post + + 1 + + + 1 + 14 + + 0 + 1 + warnsetup + 0 + + + + 292 + Number of times per day a global moderator can warn a single member + + 31 + input + warn_gmod_day + + 3 + + + 1 + 15 + + 1 + 1 + warnsetup + 0 + + + + 1 + xmlrpcapi + XML-RPC API + Settings to manage your XML-RPC API interface + 0 + + + + + 297 + Enable XML-RPC API System + + 39 + yes_no + xmlrpc_enable + + 0 + + + 1 + 1 + + 0 + 1 + xmlrpcapi + 0 + + + + 298 + XML-RPC API Logging + + 39 + dropdown + xmlrpc_log_type + + all + all=All +failed=Failed + + 1 + 2 + + 0 + 1 + xmlrpcapi + 0 + + + + 299 + XML-RPC Log Expiration + + 39 + input + xmlrpc_log_expire + + 30 + + + 1 + 3 + + 0 + 1 + xmlrpcapi + 0 + +
+ +
\ No newline at end of file diff --git a/upload/resources/skinsets.xml b/upload/resources/skinsets.xml index 0be800d8..10e0eb4f 100644 --- a/upload/resources/skinsets.xml +++ b/upload/resources/skinsets.xml @@ -1,29 +1,29 @@ - - + + 1 - + IPB Master Skin Set 1 0 0 - external + 1 -1 - 960px is a common fixed resolution size */ width: 98%; } -/* +/* * ======================================== - * styles for pagination links + * styles for pagination links * ======================================== */ - + .pagelink, .pagelinklast, @@ -190,9 +190,9 @@ a:hover{ .forumdesc, .forumdesc a:link, .forumdesc a:visited, -.forumdesc a:active{ +.forumdesc a:active{ background: transparent; - font-size: 10px; + font-size: 10px; color: #666; line-height: 135%; margin: 2px 0 0 0; @@ -227,16 +227,16 @@ a:hover{ border-bottom:1px dotted black; } -fieldset.search{ +fieldset.search{ line-height: 150%; - padding: 6px; + padding: 6px; } -label{ - cursor: pointer; +label{ + cursor: pointer; } -img.attach{ +img.attach{ background: #808080 url(style_images/<#IMG_DIR#>/click2enlarge.gif) no-repeat top right; border: 1px solid #808080; margin: 0 2px 0 0; @@ -263,13 +263,13 @@ img.attach{ } .thumbwrap h4, -.thumbwrapp h4{ +.thumbwrapp h4{ background: #DDE6F2; border: 0 !important; border-bottom: 1px solid #5176B5 !important; - color: #5176B5; + color: #5176B5; font-size: 12px; - font-weight: bold; + font-weight: bold; margin: 0; padding: 5px; } @@ -296,7 +296,7 @@ img.attach{ background: #EFDFDF !important; text-align: center !important; } - + .thumbwrap img.galattach, .thumbwrapp img.galattach{ background: #FFF url(style_images/<#IMG_DIR#>/img_larger.gif) no-repeat bottom right; @@ -305,119 +305,119 @@ img.attach{ padding: 2px 2px 10px 2px; } -li.helprow{ +li.helprow{ margin: 0 0 10px 0; - padding: 0; + padding: 0; } -ul#help{ - padding: 0 0 0 15px; +ul#help{ + padding: 0 0 0 15px; } .warngood, -.warnbad{ +.warnbad{ color: #0B9500; font-weight: bold; } -.warnbad{ +.warnbad{ color: #DD0000; } -#padandcenter{ +#padandcenter{ margin: 0 auto 0 auto; padding: 14px 0 14px 0; text-align: center; } -#profilename{ - font-size: 28px; - font-weight: bold; +#profilename{ + font-size: 28px; + font-weight: bold; } -#photowrap{ - padding: 6px; +#photowrap{ + padding: 6px; } -#phototitle{ - border-bottom: 1px solid #000; - font-size: 24px; +#phototitle{ + border-bottom: 1px solid #000; + font-size: 24px; } -#photoimg{ +#photoimg{ margin: 15px 0 0 0; - text-align: center; -} + text-align: center; +} #ucpmenu, -#ucpcontent{ +#ucpcontent{ background: #F5F9FD; border: 1px solid #345487; line-height: 150%; } -#ucpmenu p{ - margin: 0; +#ucpmenu p{ + margin: 0; padding: 2px 5px 6px 9px; } -#ucpmenu a:link, -#ucpmenu a:active, -#ucpmenu a:visited{ - text-decoration: none; +#ucpmenu a:link, +#ucpmenu a:active, +#ucpmenu a:visited{ + text-decoration: none; } -#ucpcontent{ +#ucpcontent{ width: auto; } -#ucpcontent p{ +#ucpcontent p{ margin: 0; padding: 10px; } -.activeuserstrip{ +.activeuserstrip{ background: #BCD0ED; padding: 6px; } /* Topic View elements */ -.signature{ +.signature{ background: transparent; - color: #339; + color: #339; font-size: 10px; line-height: 150%; } -.postdetails{ +.postdetails{ font-size: 10px; line-height:140%; } -.postcolor{ - font-size: 12px; +.postcolor{ + font-size: 12px; line-height: 160%; } -.normalname{ +.normalname{ color: #003; - font-size: 12px; - font-weight: bold; + font-size: 12px; + font-weight: bold; } -.normalname a:link, -.normalname a:visited, -.normalname a:active{ +.normalname a:link, +.normalname a:visited, +.normalname a:active{ font-size: 12px; } .post1, -.bg1{ +.bg1{ background: #F5F9FD; } .post2, -.bg3{ +.bg3{ background: #EEF2F7; } @@ -426,46 +426,46 @@ ul#help{ .row4shaded, .post2shaded { background-color: #E3DFE7 } -.row1{ - background: #DFE6EF; +.row1{ + background: #DFE6EF; } -.row2{ - background: #E4EAF2; +.row2{ + background: #E4EAF2; } .rowhighlight{ background-color: #FFF9BA; } -.darkrow1{ +.darkrow1{ background: #BCD0ED; - color: #3A4F6C; + color: #3A4F6C; } -.darkrow3{ - background: #D1DCEB; - color: #3A4F6C; +.darkrow3{ + background: #D1DCEB; + color: #3A4F6C; } /* tableborders gives the white column / row lines effect */ .plainborder, .tablefill, -.tablepad{ +.tablepad{ background: #F5F9FD; border: 1px solid #345487; } .tablefill, -.tablepad{ - padding: 6px; +.tablepad{ + padding: 6px; } -.tablepad{ +.tablepad{ border: 0 !important; } -.wrapmini{ +.wrapmini{ float: left; line-height: 1.5em; width: 25%; @@ -477,22 +477,22 @@ ul#help{ width: 35%; } -.desc{ - font-size: 11px; +.desc{ + font-size: 11px; color: #434951; } .lastaction { - font-size: 10px; + font-size: 10px; color: #434951; } -.edit{ +.edit{ font-size: 9px; } -.thin{ +.thin{ border: 1px solid #FFF; border-left: 0; border-right: 0; @@ -505,17 +505,17 @@ ul#help{ /* =================================================================================== */ /* =================================================================================== */ -/* +/* * ======================================== - * calendar styles + * calendar styles * ======================================== */ - -.calmonths{ + +.calmonths{ background: #F0F5FA; border: 1px solid #C2CFDF; - font-size: 18px; - font-weight: bold; + font-size: 18px; + font-weight: bold; margin: 5px 0 5px 0; padding: 8px; text-align: center; @@ -531,7 +531,7 @@ ul#help{ } .calday, -.calweekday{ +.calweekday{ background: #DFE6EF; color: #666; font-size: 11px; @@ -557,7 +557,7 @@ ul#help{ .mcellblank, .mcelldate, .mcelltoday{ - background: #EEF2F7; + background: #EEF2F7; height: 100px; margin: 0; padding: 0; @@ -600,9 +600,9 @@ ul#help{ padding:4px; } -/* +/* * ======================================== - * form styles + * form styles * ======================================== */ @@ -667,7 +667,6 @@ select input.button{ margin: 0; width: auto; - cursor: hand; cursor: pointer; } @@ -676,9 +675,9 @@ optgroup option{ font-size: 12px; } -.codebuttons{ - font-family: Verdana, Helvetica, Sans-Serif; - font-size: 10px; +.codebuttons{ + font-family: Verdana, Helvetica, Sans-Serif; + font-size: 10px; vertical-align: middle; margin:2px; } @@ -695,7 +694,7 @@ optgroup option{ padding: 2px; vertical-align: middle; } - + .button{ background: #DFE6EF; } @@ -710,17 +709,17 @@ optgroup option{ .radiobutton, .checkbox, -.helpbox { +.helpbox { border: 0; vertical-align: middle; background: transparent; } -/* - * class.formtable +/* + * class.formtable * - * used for tabled forms - * technically tables should not be used for form display + * used for tabled forms + * technically tables should not be used for form display * but, in the case of IPB a table is easier to work with * for the average webmaster, who has little to no CSS knowledge. * @@ -742,7 +741,7 @@ optgroup option{ margin: 1px 0 0 0; padding: 6px; width: 25%; -} +} .formtable td.wider, .pformleftw, @@ -755,19 +754,19 @@ optgroup option{ border-right: 0px; font-weight: normal; width: auto; -} +} .formtable td.formtitle, .formsubtitle{ background: #D1DCEB; - border: 1px solid #9FB9D4; + border: 1px solid #9FB9D4; border-bottom: 0; border-left: 0; border-right: 0; font-weight: normal; } -.formsubtitle{ +.formsubtitle{ border: 0; color: #3A4F6C; font-weight: bold; @@ -782,9 +781,9 @@ optgroup option{ font-weight: normal; } -/* +/* * ======================================== - * new style quote and code wrappers MATT's DESIGN + * new style quote and code wrappers MATT's DESIGN * ======================================== */ @@ -826,35 +825,35 @@ optgroup option{ background: #FAFCFE; border: 1px dotted #000; color: #465584; - font-family: Courier, Courier New, Verdana, Arial; + font-family: Courier, "Courier New", Verdana, Arial; margin: 0 auto 0 auto; padding: 2px; } -/* +/* * ======================================== - * old school quote and code styles - backwards compatibility + * old school quote and code styles - backwards compatibility * ======================================== */ #QUOTE, -#CODE{ - background: #FAFCFE; - border: 1px solid #000; - color: #465584; - font-family: Verdana, Arial; - font-size: 11px; - padding: 2px; +#CODE{ + background: #FAFCFE; + border: 1px solid #000; + color: #465584; + font-family: Verdana, Arial; + font-size: 11px; + padding: 2px; white-space: normal; } -#CODE{ - font-family: Courier, Courier New, Verdana, Arial; +#CODE{ + font-family: Courier, "Courier New", Verdana, Arial; } -/* +/* * ======================================== - * All New Styles + * All New Styles * ======================================== */ .cleared{ @@ -865,8 +864,8 @@ optgroup option{ .borderwrapm{ /* this will affect the outlining border of all the tables and boxes through-out the skin. */ background: #FFF; border: 1px solid #072A66; - padding: 0px; - margin: 0px; + padding: 0px; + margin: 0px; } .borderwrapm{ @@ -879,15 +878,15 @@ optgroup option{ background: url(style_images/<#IMG_DIR#>/tile_cat.gif); border: 1px solid #FFF; border-bottom: 1px solid #5176B5; - color: #FFF; + color: #FFF; font-size: 12px; - font-weight: bold; + font-weight: bold; margin: 0px; padding: 8px; } .maintitle td { - color: #FFF; + color: #FFF; font-size: 12px; font-weight: bold; } @@ -914,19 +913,19 @@ optgroup option{ width: auto !important; } -.maintitle a:link, +.maintitle a:link, .maintitle a:visited, -.maintitlecollapse a:link, -.maintitlecollapse a:visited{ +.maintitlecollapse a:link, +.maintitlecollapse a:visited{ background: transparent; color: #FFF; - text-decoration: none; + text-decoration: none; } -.maintitle a:hover, +.maintitle a:hover, .maintitle a:active, -.maintitlecollapse a:hover, -.maintitlecollapse a:active{ +.maintitlecollapse a:hover, +.maintitlecollapse a:active{ background: transparent; color: #F1F1F1; } @@ -935,15 +934,15 @@ table th, .borderwrap table th, .subtitle, .subtitlediv, -.postlinksbar{ +.postlinksbar{ background: transparent url(style_images/<#IMG_DIR#>/tile_sub.gif); border-bottom: 1px solid #5176B5; - color: #3A4F6C; + color: #3A4F6C; font-size: 10px; - font-weight: bold; + font-weight: bold; letter-spacing: 1px; - margin: 0; - padding: 5px; + margin: 0; + padding: 5px; } .subtitlediv{ @@ -956,17 +955,17 @@ table th, .subtitle a:link, .subtitlediv a:link, .borderwrap table th a:visited, -.subtitle a:visited, -.subtitlediv a:visited, +.subtitle a:visited, +.subtitlediv a:visited, .borderwrap table th a:active, .subtitle a:active, .subtitlediv a:active, .borderwrap table th a:hover, .subtitle a:hover, -.subtitlediv a:hover{ +.subtitlediv a:hover{ background: transparent; color: #3A4F6C; - text-decoration: none; + text-decoration: none; } .borderwrap h4{ @@ -974,9 +973,9 @@ table th, border: 1px solid #FFF; border-bottom: 1px solid #5176B5; border-top: 1px solid #5176B5; - color: #5176B5; + color: #5176B5; font-size: 12px; - font-weight: bold; + font-weight: bold; margin: 0; padding: 5px; } @@ -994,7 +993,7 @@ td.formbuttonrow, .pformstrip, .borderwrap p.formbuttonrow, .borderwrap p.formbuttonrow1{ - background: #D1DCEB !important; + background: #D1DCEB !important; border: 1px solid #FFF; border-top: 1px solid #5176B5; margin: 0px !important; @@ -1118,9 +1117,9 @@ td.formbuttonrow{ border: 1px solid #CCC; border-left: 0; border-right: 0; - color: #444; + color: #444; font-size: 12px; - font-weight: bold; + font-weight: bold; margin: 0; padding: 5px; } @@ -1139,9 +1138,9 @@ td.formbuttonrow{ border: 1px solid #992A2A; border-left: 0; border-right: 0; - color: #992A2A; + color: #992A2A; font-size: 12px; - font-weight: bold; + font-weight: bold; margin: 0; padding: 5px; } @@ -1158,7 +1157,7 @@ td.formbuttonrow{ .ruleswrap{ background: #F2DDDD; border: 1px solid #992A2A; - color: #992A2A; + color: #992A2A; margin: 5px 0 5px 0; padding: 5px; } @@ -1210,7 +1209,7 @@ td.formbuttonrow{ color: #FFF; } -#logostrip{ +#logostrip{ background: #3860BB url(style_images/<#IMG_DIR#>/tile_back.gif); border: 1px solid #FFF; height: 68px; @@ -1225,11 +1224,11 @@ td.formbuttonrow{ padding: 0; } -#submenu{ +#submenu{ background: transparent url(style_images/<#IMG_DIR#>/tile_sub.gif); border: 1px solid #FFF; border-top: 0; - color: #3A4F6C; + color: #3A4F6C; margin: 0; height: 29px; text-align: right; @@ -1241,7 +1240,7 @@ td.formbuttonrow{ background: transparent url(style_images/<#IMG_DIR#>/tile_sub-lite.gif); float: right; font-size: 10px; - font-weight: bold; + font-weight: bold; letter-spacing: 0.5px; margin: 0px; padding: 7px 0 7px 0; @@ -1256,35 +1255,35 @@ td.formbuttonrow{ border-right: 1px solid #dce3ee; } -.ipb-top-left-link a:link, +.ipb-top-left-link a:link, .ipb-top-left-link a:visited, -.ipb-top-right-link a:link, +.ipb-top-right-link a:link, .ipb-top-right-link a:visited -{ - background: transparent; +{ + background: transparent; color: #3A4F6C; padding: 0 6px 0 6px; text-decoration: none; } -.ipb-top-left-link a:hover, +.ipb-top-left-link a:hover, .ipb-top-left-link a:active, -.ipb-top-right-link a:hover, +.ipb-top-right-link a:hover, .ipb-top-right-link a:active { - background: transparent; - color: #5176B5; + background: transparent; + color: #5176B5; } #userlinks, -#userlinksguest{ +#userlinksguest{ background: #F0F5FA; border: 1px solid #C2CFDF; margin: 5px 0 5px 0; padding: 0 5px 0 5px; } -#userlinksguest{ +#userlinksguest{ background: #F4E7EA; border: 1px solid #986265; } @@ -1294,10 +1293,10 @@ td.formbuttonrow{ background: transparent !important; border: 0 !important; font-size: 10px; - font-weight: bold; + font-weight: bold; letter-spacing: 1px; margin: 0 !important; - padding: 7px 0 7px 0; + padding: 7px 0 7px 0; text-align: right; } @@ -1316,26 +1315,26 @@ td.formbuttonrow{ float: left; } -#navstrip{ +#navstrip{ background: transparent; color: #999; font-size: 12px; font-weight: bold; margin: 0 0 5px 0; - padding: 14px 0px 8px 0px; + padding: 14px 0px 8px 0px; } -#navstrip a:link, -#navstrip a:visited{ - background: transparent; - color: #222; +#navstrip a:link, +#navstrip a:visited{ + background: transparent; + color: #222; text-decoration: none; } -#navstrip a:hover, +#navstrip a:hover, #navstrip a:active{ - background: transparent; - color: #5176B5; + background: transparent; + color: #5176B5; } .toplinks{ @@ -1357,16 +1356,16 @@ td.formbuttonrow{ padding: 5px; } -.copyright{ +.copyright{ background: #EEE; - font-size: 11px; + font-size: 11px; margin: 0 0 5px 0; padding: 8px; } -/* +/* * ======================================== - * print page styles + * print page styles * ======================================== */ @@ -1425,8 +1424,8 @@ td.formbuttonrow{ border:0px; padding:3px; margin:0px; - background: #D1DCEB; - color: #3A4F6C; + background: #D1DCEB; + color: #3A4F6C; } @@ -1462,16 +1461,16 @@ td.formbuttonrow{ margin-top:3px; } -.tabon a:link, -.tabon a:visited, +.tabon a:link, +.tabon a:visited, .tabon a:active { text-decoration:none; color: #000; } -.taboff a:link, -.taboff a:visited, +.taboff a:link, +.taboff a:visited, .taboff a:active { text-decoration:none; @@ -1483,7 +1482,6 @@ td.formbuttonrow{ background: #072A66; margin:1px; padding: 1px; - width: 600px; } .mya-content @@ -1525,7 +1523,6 @@ td.formbuttonrow{ position:absolute; display:none; background: #FFF; - filter:alpha(opacity=0); border:0px; width:auto; height:auto; @@ -1604,45 +1601,46 @@ td.formbuttonrow{ padding:4px; } + .popupmenu-new { background-color: #DFE6EF; } -.popmenubutton a:link, +.popmenubutton a:link, .popmenubutton a:visited, -.popmenubutton-new a:link, +.popmenubutton-new a:link, .popmenubutton-new a:visited, -.popupmenu-item a:link, +.popupmenu-item a:link, .popupmenu-item a:visited, -.popupmenu-item-last a:link, +.popupmenu-item-last a:link, .popupmenu-item-last a:visited -{ - color: #3A4F6C; +{ + color: #3A4F6C; text-decoration: none; } .popmenubutton a:hover, .popmenubutton-new a:hover, -.popupmenu-item a:hover, +.popupmenu-item a:hover, .popupmenu-item-last a:hover -{ - color: #5176B5; +{ + color: #5176B5; text-decoration: none; } .popupmenu-category -{ +{ background: transparent url(style_images/<#IMG_DIR#>/tile_sub.gif); border-top: 1px solid #5176B5; border-bottom: 1px solid #5176B5; - color: #3A4F6C; + color: #3A4F6C; font-size: 10px; - font-weight: bold; + font-weight: bold; letter-spacing: 1px; - margin: 0; - padding: 5px; + margin: 0; + padding: 5px; } /* -------------------------------- */ @@ -1756,7 +1754,7 @@ td.formbuttonrow{ /* -------------------------------- */ .pp-name -{ +{ background: #F0F5FA; border: 1px solid #C2CFDF; margin: 0px; @@ -1771,22 +1769,22 @@ td.formbuttonrow{ } .pp-header -{ +{ background: transparent url(style_images/<#IMG_DIR#>/tile_sub.gif); - color: #3A4F6C; + color: #3A4F6C; font-size: 10px; - font-weight: bold; - margin: 0px 0px 1px 0px; - padding: 5px; + font-weight: bold; + margin: 0px 0px 1px 0px; + padding: 5px; } .pp-title { background: url(style_images/<#IMG_DIR#>/css_pp_header.gif); border-bottom: 1px solid #5176B5; - color: #FFF; + color: #FFF; font-size: 12px; - font-weight: bold; + font-weight: bold; margin: 0px; padding: 8px; } @@ -1919,9 +1917,9 @@ td.formbuttonrow{ background: url(style_images/<#IMG_DIR#>/css_pp_header.gif); border: 1px solid #FFF; border-bottom: 1px solid #5176B5; - color: #FFF; + color: #FFF; font-size: 12px; - font-weight: bold; + font-weight: bold; margin: 0px; padding: 8px; } @@ -1979,19 +1977,19 @@ td.formbuttonrow{ border-right: 1px solid #7f9BBC; } -.pp-tabon a:link, -.pp-tabon a:visited, +.pp-tabon a:link, +.pp-tabon a:visited, .pp-tabon a:active { text-decoration:none; color: #FFFFFF; } -.pp-taboff a:link, -.pp-taboff a:visited, +.pp-taboff a:link, +.pp-taboff a:visited, .pp-taboff a:active, -.pp-tabshaded a:link, -.pp-tabshaded a:visited, +.pp-tabshaded a:link, +.pp-tabshaded a:visited, .pp-tabshaded a:active { text-decoration:none; @@ -2004,17 +2002,17 @@ td.formbuttonrow{ margin:0px; padding:0px; }]]> - /t_addpoll.gif' border='0' alt='Добавить опрос' />";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:10:"a_locked_b";a:6:{s:8:"macro_id";s:1:"1";s:11:"macro_value";s:10:"A_LOCKED_B";s:13:"macro_replace";s:82:"Тема закрыта";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:9:"a_moved_b";a:6:{s:8:"macro_id";s:1:"2";s:11:"macro_value";s:9:"A_MOVED_B";s:13:"macro_replace";s:82:"Тема перемещена";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"a_poll";a:6:{s:8:"macro_id";s:1:"6";s:11:"macro_value";s:6:"A_POLL";s:13:"macro_replace";s:92:"Открыть тему (с опросом)";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:12:"a_pollonly_b";a:6:{s:8:"macro_id";s:1:"3";s:11:"macro_value";s:12:"A_POLLONLY_B";s:13:"macro_replace";s:108:"Только опрос (ответы в теме запрещены)";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"a_post";a:6:{s:8:"macro_id";s:1:"4";s:11:"macro_value";s:6:"A_POST";s:13:"macro_replace";s:79:"Открыть тему";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"a_reply";a:6:{s:8:"macro_id";s:1:"5";s:11:"macro_value";s:7:"A_REPLY";s:13:"macro_replace";s:94:"Добавить ответ в эту тему";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"a_star";a:6:{s:8:"macro_id";s:1:"7";s:11:"macro_value";s:6:"A_STAR";s:13:"macro_replace";s:66:"*";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:15:"active_list_sep";a:6:{s:8:"macro_id";s:2:"72";s:11:"macro_value";s:15:"ACTIVE_LIST_SEP";s:13:"macro_replace";s:1:",";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:12:"address_card";a:6:{s:8:"macro_id";s:2:"54";s:11:"macro_value";s:12:"ADDRESS_CARD";s:13:"macro_replace";s:94:"Карточка пользователя";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:11:"attach_icon";a:6:{s:8:"macro_id";s:2:"69";s:11:"macro_value";s:11:"ATTACH_ICON";s:13:"macro_replace";s:102:"Тема имеет прикрепленные файлы";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:5:"b_hot";a:6:{s:8:"macro_id";s:1:"8";s:11:"macro_value";s:5:"B_HOT";s:13:"macro_replace";s:99:"Горячая тема (есть новые ответы)";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:9:"b_hot_dot";a:6:{s:8:"macro_id";s:2:"17";s:11:"macro_value";s:9:"B_HOT_DOT";s:13:"macro_replace";s:101:"Горячая тема (есть новые ответы)*";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"b_hot_nn";a:6:{s:8:"macro_id";s:1:"9";s:11:"macro_value";s:8:"B_HOT_NN";s:13:"macro_replace";s:101:"Горячая тема (нет новых ответов)";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:12:"b_hot_nn_dot";a:6:{s:8:"macro_id";s:2:"19";s:11:"macro_value";s:12:"B_HOT_NN_DOT";s:13:"macro_replace";s:104:"Горячая тема (нет новых ответов)*";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"b_locked";a:6:{s:8:"macro_id";s:2:"10";s:11:"macro_value";s:8:"B_LOCKED";s:13:"macro_replace";s:82:"Закрытая тема";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"b_moved";a:6:{s:8:"macro_id";s:2:"11";s:11:"macro_value";s:7:"B_MOVED";s:13:"macro_replace";s:83:"Тема перемещена";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:5:"b_new";a:6:{s:8:"macro_id";s:2:"12";s:11:"macro_value";s:5:"B_NEW";s:13:"macro_replace";s:100:"Открытая тема (есть новые ответы)";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:9:"b_new_dot";a:6:{s:8:"macro_id";s:2:"18";s:11:"macro_value";s:9:"B_NEW_DOT";s:13:"macro_replace";s:103:"Открытая тема (есть новые ответы)*";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"b_norm";a:6:{s:8:"macro_id";s:2:"13";s:11:"macro_value";s:6:"B_NORM";s:13:"macro_replace";s:103:"Открытая тема (нет новых ответов)";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:10:"b_norm_dot";a:6:{s:8:"macro_id";s:2:"20";s:11:"macro_value";s:10:"B_NORM_DOT";s:13:"macro_replace";s:106:"Открытая тема (нет новых ответов)*";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:5:"b_pin";a:6:{s:8:"macro_id";s:2:"14";s:11:"macro_value";s:5:"B_PIN";s:13:"macro_replace";s:80:"Важная тема";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"b_poll";a:6:{s:8:"macro_id";s:2:"15";s:11:"macro_value";s:6:"B_POLL";s:13:"macro_replace";s:93:"Опрос (есть новые голоса)";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:10:"b_poll_dot";a:6:{s:8:"macro_id";s:2:"21";s:11:"macro_value";s:10:"B_POLL_DOT";s:13:"macro_replace";s:95:"Опрос (есть новые голоса)*";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:9:"b_poll_nn";a:6:{s:8:"macro_id";s:2:"16";s:11:"macro_value";s:9:"B_POLL_NN";s:13:"macro_replace";s:96:"Опрос (нет новых голосов)";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:13:"b_poll_nn_dot";a:6:{s:8:"macro_id";s:2:"22";s:11:"macro_value";s:13:"B_POLL_NN_DOT";s:13:"macro_replace";s:98:"Опрос (нет новых голосов)*";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"bar_left";a:6:{s:8:"macro_id";s:2:"88";s:11:"macro_value";s:8:"BAR_LEFT";s:13:"macro_replace";s:71:"*";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:9:"bar_right";a:6:{s:8:"macro_id";s:2:"89";s:11:"macro_value";s:9:"BAR_RIGHT";s:13:"macro_replace";s:72:"*";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:15:"bc_queued_posts";a:6:{s:8:"macro_id";s:2:"73";s:11:"macro_value";s:15:"BC_QUEUED_POSTS";s:13:"macro_replace";s:71:"*";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:11:"br_redirect";a:6:{s:8:"macro_id";s:2:"52";s:11:"macro_value";s:11:"BR_REDIRECT";s:13:"macro_replace";s:86:"Переадресация";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"c_locked";a:6:{s:8:"macro_id";s:2:"23";s:11:"macro_value";s:8:"C_LOCKED";s:13:"macro_replace";s:96:"Форум только для чтения";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:5:"c_off";a:6:{s:8:"macro_id";s:2:"24";s:11:"macro_value";s:5:"C_OFF";s:13:"macro_replace";s:89:"Нет новых сообщений";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:9:"c_off_cat";a:6:{s:8:"macro_id";s:2:"25";s:11:"macro_value";s:9:"C_OFF_CAT";s:13:"macro_replace";s:89:"Нет новых сообщений";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:9:"c_off_res";a:6:{s:8:"macro_id";s:2:"26";s:11:"macro_value";s:9:"C_OFF_RES";s:13:"macro_replace";s:89:"Нет новых сообщений";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:4:"c_on";a:6:{s:8:"macro_id";s:2:"27";s:11:"macro_value";s:4:"C_ON";s:13:"macro_replace";s:88:"Есть новые сообщения";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"c_on_cat";a:6:{s:8:"macro_id";s:2:"28";s:11:"macro_value";s:8:"C_ON_CAT";s:13:"macro_replace";s:88:"Есть новые сообщения";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"c_on_res";a:6:{s:8:"macro_id";s:2:"29";s:11:"macro_value";s:8:"C_ON_RES";s:13:"macro_replace";s:89:"Есть новые сообщения";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"cal_goto";a:6:{s:8:"macro_id";s:2:"90";s:11:"macro_value";s:8:"CAL_GOTO";s:13:"macro_replace";s:86:"Перейти к месяцу";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:12:"cal_newevent";a:6:{s:8:"macro_id";s:2:"57";s:11:"macro_value";s:12:"CAL_NEWEVENT";s:13:"macro_replace";s:96:"Добавить новое событие";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"camera";a:6:{s:8:"macro_id";s:2:"35";s:11:"macro_value";s:6:"CAMERA";s:13:"macro_replace";s:77:"Есть фото";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"cat_img";a:6:{s:8:"macro_id";s:2:"49";s:11:"macro_value";s:7:"CAT_IMG";s:13:"macro_replace";s:92:">";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"e_minus";a:6:{s:8:"macro_id";s:2:"77";s:11:"macro_value";s:7:"E_MINUS";s:13:"macro_replace";s:79:"Свернуть";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"e_plus";a:6:{s:8:"macro_id";s:2:"76";s:11:"macro_value";s:6:"E_PLUS";s:13:"macro_replace";s:80:"Развернуть";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"f_active";a:6:{s:8:"macro_id";s:2:"30";s:11:"macro_value";s:8:"F_ACTIVE";s:13:"macro_replace";s:87:"Активные пользователи";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"f_calen";a:6:{s:8:"macro_id";s:2:"75";s:11:"macro_value";s:7:"F_CALEN";s:13:"macro_replace";s:76:"Календарь";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"f_closed";a:6:{s:8:"macro_id";s:2:"92";s:11:"macro_value";s:8:"F_CLOSED";s:13:"macro_replace";s:12:"f_closed.gif";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:5:"f_nav";a:6:{s:8:"macro_id";s:2:"32";s:11:"macro_value";s:5:"F_NAV";s:13:"macro_replace";s:69:">";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:9:"f_nav_sep";a:6:{s:8:"macro_id";s:2:"31";s:11:"macro_value";s:9:"F_NAV_SEP";s:13:"macro_replace";s:13:" > ";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"f_norm";a:6:{s:8:"macro_id";s:2:"93";s:11:"macro_value";s:6:"F_NORM";s:13:"macro_replace";s:13:"f_norm_no.gif";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:10:"f_norm_hot";a:6:{s:8:"macro_id";s:2:"91";s:11:"macro_value";s:10:"F_NORM_HOT";s:13:"macro_replace";s:12:"f_hot_no.gif";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"f_rules";a:6:{s:8:"macro_id";s:2:"58";s:11:"macro_value";s:7:"F_RULES";s:13:"macro_replace";s:93:"Правила этого форума";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"f_stats";a:6:{s:8:"macro_id";s:2:"33";s:11:"macro_value";s:7:"F_STATS";s:13:"macro_replace";s:84:"Статистика форума";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:14:"integrity_msgr";a:6:{s:8:"macro_id";s:2:"53";s:11:"macro_value";s:14:"INTEGRITY_MSGR";s:13:"macro_replace";s:88:"Integrity Messenger IM";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:10:"item_start";a:6:{s:8:"macro_id";s:2:"71";s:11:"macro_value";s:10:"ITEM_START";s:13:"macro_replace";s:73:".";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:9:"last_post";a:6:{s:8:"macro_id";s:2:"51";s:11:"macro_value";s:9:"LAST_POST";s:13:"macro_replace";s:89:"Последнее сообщение";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"m_read";a:6:{s:8:"macro_id";s:2:"36";s:11:"macro_value";s:6:"M_READ";s:13:"macro_replace";s:92:"Прочитанное сообщение";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"m_unread";a:6:{s:8:"macro_id";s:2:"37";s:11:"macro_value";s:8:"M_UNREAD";s:13:"macro_replace";s:91:"Непрочитанное сообщение";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:10:"msg_folder";a:6:{s:8:"macro_id";s:2:"70";s:11:"macro_value";s:10:"MSG_FOLDER";s:13:"macro_replace";s:73:"-";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"new_post";a:6:{s:8:"macro_id";s:2:"50";s:11:"macro_value";s:8:"NEW_POST";s:13:"macro_replace";s:121:"Перейти к последнему непрочитанному сообщению";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"no_photo";a:6:{s:8:"macro_id";s:2:"34";s:11:"macro_value";s:8:"NO_PHOTO";s:13:"macro_replace";s:77:"Нет фото";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:5:"p_aol";a:6:{s:8:"macro_id";s:2:"38";s:11:"macro_value";s:5:"P_AOL";s:13:"macro_replace";s:70:"AOL";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"p_card";a:6:{s:8:"macro_id";s:2:"81";s:11:"macro_value";s:6:"P_CARD";s:13:"macro_replace";s:89:"Карточка пользователя";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"p_delete";a:6:{s:8:"macro_id";s:2:"39";s:11:"macro_value";s:8:"P_DELETE";s:13:"macro_replace";s:87:"Удалить сообщение";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"p_edit";a:6:{s:8:"macro_id";s:2:"40";s:11:"macro_value";s:6:"P_EDIT";s:13:"macro_replace";s:86:"Изменить сообщение";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"p_email";a:6:{s:8:"macro_id";s:2:"41";s:11:"macro_value";s:7:"P_EMAIL";s:13:"macro_replace";s:95:"Отправить письмо на e-mail";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:5:"p_icq";a:6:{s:8:"macro_id";s:2:"42";s:11:"macro_value";s:5:"P_ICQ";s:13:"macro_replace";s:70:"ICQ";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:5:"p_msg";a:6:{s:8:"macro_id";s:2:"43";s:11:"macro_value";s:5:"P_MSG";s:13:"macro_replace";s:92:"Отправить личное сообщение";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:5:"p_msn";a:6:{s:8:"macro_id";s:2:"48";s:11:"macro_value";s:5:"P_MSN";s:13:"macro_replace";s:69:"MSN";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"p_quote";a:6:{s:8:"macro_id";s:2:"44";s:11:"macro_value";s:7:"P_QUOTE";s:13:"macro_replace";s:110:"Ответить с цитированием данного сообщения";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"p_report";a:6:{s:8:"macro_id";s:2:"47";s:11:"macro_value";s:8:"P_REPORT";s:13:"macro_replace";s:108:"Известить модератора об этом сообщении";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:4:"p_up";a:6:{s:8:"macro_id";s:2:"79";s:11:"macro_value";s:4:"P_UP";s:13:"macro_replace";s:93:"Вернуться в начало страницы";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:9:"p_website";a:6:{s:8:"macro_id";s:2:"45";s:11:"macro_value";s:9:"P_WEBSITE";s:13:"macro_replace";s:84:"Домашняя страница";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:5:"p_yim";a:6:{s:8:"macro_id";s:2:"46";s:11:"macro_value";s:5:"P_YIM";s:13:"macro_replace";s:71:"Yahoo";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:15:"pb_user_offline";a:6:{s:8:"macro_id";s:2:"68";s:11:"macro_value";s:15:"PB_USER_OFFLINE";s:13:"macro_replace";s:93:"Пользователь в офлайне";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:14:"pb_user_online";a:6:{s:8:"macro_id";s:2:"67";s:11:"macro_value";s:14:"PB_USER_ONLINE";s:13:"macro_replace";s:93:"Пользователь в онлайне!";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:13:"post_snapback";a:6:{s:8:"macro_id";s:2:"80";s:11:"macro_value";s:13:"POST_SNAPBACK";s:13:"macro_replace";s:75:"*";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"pro_aim";a:6:{s:8:"macro_id";s:2:"82";s:11:"macro_value";s:7:"PRO_AIM";s:13:"macro_replace";s:76:"AIM";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:11:"pro_contact";a:6:{s:8:"macro_id";s:2:"87";s:11:"macro_value";s:11:"PRO_CONTACT";s:13:"macro_replace";s:83:"Контакт";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"pro_icq";a:6:{s:8:"macro_id";s:2:"85";s:11:"macro_value";s:7:"PRO_ICQ";s:13:"macro_replace";s:76:"ICQ";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"pro_item";a:6:{s:8:"macro_id";s:2:"83";s:11:"macro_value";s:8:"PRO_ITEM";s:13:"macro_replace";s:87:"Опции профиля";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"pro_msn";a:6:{s:8:"macro_id";s:2:"84";s:11:"macro_value";s:7:"PRO_MSN";s:13:"macro_replace";s:76:"MSN";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"pro_yim";a:6:{s:8:"macro_id";s:2:"86";s:11:"macro_value";s:7:"PRO_YIM";s:13:"macro_replace";s:80:"Yahoo";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"t_opts";a:6:{s:8:"macro_id";s:2:"56";s:11:"macro_value";s:6:"T_OPTS";s:13:"macro_replace";s:81:"Опции темы";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"t_qreply";a:6:{s:8:"macro_id";s:2:"55";s:11:"macro_value";s:8:"T_QREPLY";s:13:"macro_replace";s:79:"Быстрый ответ";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:4:"test";a:6:{s:8:"macro_id";s:2:"78";s:11:"macro_value";s:4:"test";s:13:"macro_replace";s:4:"test";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"warn_0";a:6:{s:8:"macro_id";s:2:"59";s:11:"macro_value";s:6:"WARN_0";s:13:"macro_replace";s:72:"-----";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"warn_1";a:6:{s:8:"macro_id";s:2:"60";s:11:"macro_value";s:6:"WARN_1";s:13:"macro_replace";s:72:"X----";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"warn_2";a:6:{s:8:"macro_id";s:2:"61";s:11:"macro_value";s:6:"WARN_2";s:13:"macro_replace";s:72:"XX---";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"warn_3";a:6:{s:8:"macro_id";s:2:"62";s:11:"macro_value";s:6:"WARN_3";s:13:"macro_replace";s:72:"XXX--";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"warn_4";a:6:{s:8:"macro_id";s:2:"63";s:11:"macro_value";s:6:"WARN_4";s:13:"macro_replace";s:72:"XXXX-";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"warn_5";a:6:{s:8:"macro_id";s:2:"64";s:11:"macro_value";s:6:"WARN_5";s:13:"macro_replace";s:72:"XXXXX";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"warn_add";a:6:{s:8:"macro_id";s:2:"65";s:11:"macro_value";s:8:"WARN_ADD";s:13:"macro_replace";s:71:"+";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:10:"warn_minus";a:6:{s:8:"macro_id";s:2:"66";s:11:"macro_value";s:10:"WARN_MINUS";s:13:"macro_replace";s:73:"-";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}}]]> - + /t_addpoll.gif' border='0' alt='Add Poll' />";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:10:"a_locked_b";a:6:{s:8:"macro_id";s:3:"127";s:11:"macro_value";s:10:"A_LOCKED_B";s:13:"macro_replace";s:82:"Closed Topic";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:9:"a_moved_b";a:6:{s:8:"macro_id";s:3:"123";s:11:"macro_value";s:9:"A_MOVED_B";s:13:"macro_replace";s:78:"Moved Topic";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"a_poll";a:6:{s:8:"macro_id";s:3:"120";s:11:"macro_value";s:6:"A_POLL";s:13:"macro_replace";s:78:"Start Poll";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:12:"a_pollonly_b";a:6:{s:8:"macro_id";s:3:"124";s:11:"macro_value";s:12:"A_POLLONLY_B";s:13:"macro_replace";s:79:"Poll Only";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"a_post";a:6:{s:8:"macro_id";s:3:"122";s:11:"macro_value";s:6:"A_POST";s:13:"macro_replace";s:82:"Start new topic";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"a_reply";a:6:{s:8:"macro_id";s:3:"121";s:11:"macro_value";s:7:"A_REPLY";s:13:"macro_replace";s:88:"Reply to this topic";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"a_star";a:6:{s:8:"macro_id";s:3:"119";s:11:"macro_value";s:6:"A_STAR";s:13:"macro_replace";s:66:"*";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:15:"active_list_sep";a:6:{s:8:"macro_id";s:3:"150";s:11:"macro_value";s:15:"ACTIVE_LIST_SEP";s:13:"macro_replace";s:1:",";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:12:"address_card";a:6:{s:8:"macro_id";s:2:"72";s:11:"macro_value";s:12:"ADDRESS_CARD";s:13:"macro_replace";s:85:"Mini Profile";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:11:"attach_icon";a:6:{s:8:"macro_id";s:3:"147";s:11:"macro_value";s:11:"ATTACH_ICON";s:13:"macro_replace";s:93:"Topic has attachments";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:5:"b_hot";a:6:{s:8:"macro_id";s:3:"118";s:11:"macro_value";s:5:"B_HOT";s:13:"macro_replace";s:76:"Hot topic";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:9:"b_hot_dot";a:6:{s:8:"macro_id";s:3:"109";s:11:"macro_value";s:9:"B_HOT_DOT";s:13:"macro_replace";s:77:"New Posts";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"b_hot_nn";a:6:{s:8:"macro_id";s:3:"117";s:11:"macro_value";s:8:"B_HOT_NN";s:13:"macro_replace";s:76:"No new";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:12:"b_hot_nn_dot";a:6:{s:8:"macro_id";s:3:"107";s:11:"macro_value";s:12:"B_HOT_NN_DOT";s:13:"macro_replace";s:84:"No New Posts*";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"b_locked";a:6:{s:8:"macro_id";s:3:"116";s:11:"macro_value";s:8:"B_LOCKED";s:13:"macro_replace";s:76:"Closed";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"b_moved";a:6:{s:8:"macro_id";s:3:"115";s:11:"macro_value";s:7:"B_MOVED";s:13:"macro_replace";s:74:"Moved";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:5:"b_new";a:6:{s:8:"macro_id";s:3:"114";s:11:"macro_value";s:5:"B_NEW";s:13:"macro_replace";s:77:"New Posts";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:9:"b_new_dot";a:6:{s:8:"macro_id";s:3:"108";s:11:"macro_value";s:9:"B_NEW_DOT";s:13:"macro_replace";s:81:"No New Posts";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"b_norm";a:6:{s:8:"macro_id";s:3:"113";s:11:"macro_value";s:6:"B_NORM";s:13:"macro_replace";s:83:"No New Posts";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:10:"b_norm_dot";a:6:{s:8:"macro_id";s:3:"106";s:11:"macro_value";s:10:"B_NORM_DOT";s:13:"macro_replace";s:85:"No New Posts*";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:5:"b_pin";a:6:{s:8:"macro_id";s:3:"112";s:11:"macro_value";s:5:"B_PIN";s:13:"macro_replace";s:76:"Pinned";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"b_poll";a:6:{s:8:"macro_id";s:3:"111";s:11:"macro_value";s:6:"B_POLL";s:13:"macro_replace";s:72:"Poll";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:10:"b_poll_dot";a:6:{s:8:"macro_id";s:3:"105";s:11:"macro_value";s:10:"B_POLL_DOT";s:13:"macro_replace";s:74:"Poll*";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:9:"b_poll_nn";a:6:{s:8:"macro_id";s:3:"110";s:11:"macro_value";s:9:"B_POLL_NN";s:13:"macro_replace";s:83:"No new votes";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:13:"b_poll_nn_dot";a:6:{s:8:"macro_id";s:3:"104";s:11:"macro_value";s:13:"B_POLL_NN_DOT";s:13:"macro_replace";s:85:"No New Votes*";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"bar_left";a:6:{s:8:"macro_id";s:3:"166";s:11:"macro_value";s:8:"BAR_LEFT";s:13:"macro_replace";s:71:"*";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:9:"bar_right";a:6:{s:8:"macro_id";s:3:"167";s:11:"macro_value";s:9:"BAR_RIGHT";s:13:"macro_replace";s:72:"*";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:15:"bc_queued_posts";a:6:{s:8:"macro_id";s:3:"151";s:11:"macro_value";s:15:"BC_QUEUED_POSTS";s:13:"macro_replace";s:71:"*";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:11:"br_redirect";a:6:{s:8:"macro_id";s:2:"74";s:11:"macro_value";s:11:"BR_REDIRECT";s:13:"macro_replace";s:81:"Redirect";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"c_locked";a:6:{s:8:"macro_id";s:3:"103";s:11:"macro_value";s:8:"C_LOCKED";s:13:"macro_replace";s:88:"Read Only Forum";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:5:"c_off";a:6:{s:8:"macro_id";s:3:"102";s:11:"macro_value";s:5:"C_OFF";s:13:"macro_replace";s:82:"No New Posts";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:9:"c_off_cat";a:6:{s:8:"macro_id";s:3:"101";s:11:"macro_value";s:9:"C_OFF_CAT";s:13:"macro_replace";s:82:"No New Posts";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:9:"c_off_res";a:6:{s:8:"macro_id";s:3:"100";s:11:"macro_value";s:9:"C_OFF_RES";s:13:"macro_replace";s:82:"No New Posts";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:4:"c_on";a:6:{s:8:"macro_id";s:2:"99";s:11:"macro_value";s:4:"C_ON";s:13:"macro_replace";s:77:"New Posts";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"c_on_cat";a:6:{s:8:"macro_id";s:2:"98";s:11:"macro_value";s:8:"C_ON_CAT";s:13:"macro_replace";s:77:"New Posts";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"c_on_res";a:6:{s:8:"macro_id";s:2:"97";s:11:"macro_value";s:8:"C_ON_RES";s:13:"macro_replace";s:78:"New Posts";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"cal_goto";a:6:{s:8:"macro_id";s:3:"168";s:11:"macro_value";s:8:"CAL_GOTO";s:13:"macro_replace";s:80:"Goto Month";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:12:"cal_newevent";a:6:{s:8:"macro_id";s:3:"135";s:11:"macro_value";s:12:"CAL_NEWEVENT";s:13:"macro_replace";s:87:"Add New Event";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"camera";a:6:{s:8:"macro_id";s:2:"91";s:11:"macro_value";s:6:"CAMERA";s:13:"macro_replace";s:73:"Photo";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"cat_img";a:6:{s:8:"macro_id";s:2:"77";s:11:"macro_value";s:7:"CAT_IMG";s:13:"macro_replace";s:92:">";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"e_minus";a:6:{s:8:"macro_id";s:3:"155";s:11:"macro_value";s:7:"E_MINUS";s:13:"macro_replace";s:79:"Collapse";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"e_plus";a:6:{s:8:"macro_id";s:3:"154";s:11:"macro_value";s:6:"E_PLUS";s:13:"macro_replace";s:76:"Expand";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"f_active";a:6:{s:8:"macro_id";s:2:"96";s:11:"macro_value";s:8:"F_ACTIVE";s:13:"macro_replace";s:78:"Active Users";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"f_calen";a:6:{s:8:"macro_id";s:3:"153";s:11:"macro_value";s:7:"F_CALEN";s:13:"macro_replace";s:75:"calendar";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"f_closed";a:6:{s:8:"macro_id";s:3:"245";s:11:"macro_value";s:8:"F_CLOSED";s:13:"macro_replace";s:12:"f_closed.gif";s:16:"macro_can_remove";s:1:"1";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:5:"f_nav";a:6:{s:8:"macro_id";s:2:"94";s:11:"macro_value";s:5:"F_NAV";s:13:"macro_replace";s:69:">";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:9:"f_nav_sep";a:6:{s:8:"macro_id";s:2:"95";s:11:"macro_value";s:9:"F_NAV_SEP";s:13:"macro_replace";s:16:" > ";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"f_norm";a:6:{s:8:"macro_id";s:3:"246";s:11:"macro_value";s:6:"F_NORM";s:13:"macro_replace";s:13:"f_norm_no.gif";s:16:"macro_can_remove";s:1:"1";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:10:"f_norm_hot";a:6:{s:8:"macro_id";s:3:"441";s:11:"macro_value";s:10:"F_NORM_HOT";s:13:"macro_replace";s:12:"f_hot_no.gif";s:16:"macro_can_remove";s:1:"1";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"f_rules";a:6:{s:8:"macro_id";s:3:"136";s:11:"macro_value";s:7:"F_RULES";s:13:"macro_replace";s:84:"Forum Rules";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"f_stats";a:6:{s:8:"macro_id";s:2:"93";s:11:"macro_value";s:7:"F_STATS";s:13:"macro_replace";s:78:"Board Stats";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:14:"integrity_msgr";a:6:{s:8:"macro_id";s:2:"73";s:11:"macro_value";s:14:"INTEGRITY_MSGR";s:13:"macro_replace";s:88:"Integrity Messenger IM";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:10:"item_start";a:6:{s:8:"macro_id";s:3:"149";s:11:"macro_value";s:10:"ITEM_START";s:13:"macro_replace";s:73:".";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:9:"last_post";a:6:{s:8:"macro_id";s:2:"75";s:11:"macro_value";s:9:"LAST_POST";s:13:"macro_replace";s:79:"Last Post";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"m_read";a:6:{s:8:"macro_id";s:2:"90";s:11:"macro_value";s:6:"M_READ";s:13:"macro_replace";s:79:"Read Msg";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"m_unread";a:6:{s:8:"macro_id";s:2:"89";s:11:"macro_value";s:8:"M_UNREAD";s:13:"macro_replace";s:78:"Unread Msg";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:10:"msg_folder";a:6:{s:8:"macro_id";s:3:"148";s:11:"macro_value";s:10:"MSG_FOLDER";s:13:"macro_replace";s:73:"-";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"new_post";a:6:{s:8:"macro_id";s:2:"76";s:11:"macro_value";s:8:"NEW_POST";s:13:"macro_replace";s:119:"Goto first unread";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"no_photo";a:6:{s:8:"macro_id";s:2:"92";s:11:"macro_value";s:8:"NO_PHOTO";s:13:"macro_replace";s:77:"No Photo";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:5:"p_aol";a:6:{s:8:"macro_id";s:2:"88";s:11:"macro_value";s:5:"P_AOL";s:13:"macro_replace";s:70:"AOL";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"p_card";a:6:{s:8:"macro_id";s:3:"159";s:11:"macro_value";s:6:"P_CARD";s:13:"macro_replace";s:80:"Profile Card";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"p_delete";a:6:{s:8:"macro_id";s:2:"87";s:11:"macro_value";s:8:"P_DELETE";s:13:"macro_replace";s:81:"Delete Post";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"p_edit";a:6:{s:8:"macro_id";s:2:"86";s:11:"macro_value";s:6:"P_EDIT";s:13:"macro_replace";s:77:"Edit Post";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"p_email";a:6:{s:8:"macro_id";s:2:"85";s:11:"macro_value";s:7:"P_EMAIL";s:13:"macro_replace";s:81:"Email Poster";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:5:"p_icq";a:6:{s:8:"macro_id";s:2:"84";s:11:"macro_value";s:5:"P_ICQ";s:13:"macro_replace";s:70:"ICQ";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:5:"p_msg";a:6:{s:8:"macro_id";s:2:"83";s:11:"macro_value";s:5:"P_MSG";s:13:"macro_replace";s:68:"PM";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:5:"p_msn";a:6:{s:8:"macro_id";s:2:"78";s:11:"macro_value";s:5:"P_MSN";s:13:"macro_replace";s:69:"MSN";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"p_quote";a:6:{s:8:"macro_id";s:2:"82";s:11:"macro_value";s:7:"P_QUOTE";s:13:"macro_replace";s:79:"Quote Post";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"p_report";a:6:{s:8:"macro_id";s:2:"79";s:11:"macro_value";s:8:"P_REPORT";s:13:"macro_replace";s:81:"Report Post";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:4:"p_up";a:6:{s:8:"macro_id";s:3:"157";s:11:"macro_value";s:4:"P_UP";s:13:"macro_replace";s:91:"Go to the top of the page";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:9:"p_website";a:6:{s:8:"macro_id";s:2:"81";s:11:"macro_value";s:9:"P_WEBSITE";s:13:"macro_replace";s:80:"Users Website";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:5:"p_yim";a:6:{s:8:"macro_id";s:2:"80";s:11:"macro_value";s:5:"P_YIM";s:13:"macro_replace";s:71:"Yahoo";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:15:"pb_user_offline";a:6:{s:8:"macro_id";s:3:"146";s:11:"macro_value";s:15:"PB_USER_OFFLINE";s:13:"macro_replace";s:86:"User is offline";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:14:"pb_user_online";a:6:{s:8:"macro_id";s:3:"145";s:11:"macro_value";s:14:"PB_USER_ONLINE";s:13:"macro_replace";s:85:"User is online!";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:13:"post_snapback";a:6:{s:8:"macro_id";s:3:"158";s:11:"macro_value";s:13:"POST_SNAPBACK";s:13:"macro_replace";s:75:"*";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"pro_aim";a:6:{s:8:"macro_id";s:3:"160";s:11:"macro_value";s:7:"PRO_AIM";s:13:"macro_replace";s:76:"AIM";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:11:"pro_contact";a:6:{s:8:"macro_id";s:3:"165";s:11:"macro_value";s:11:"PRO_CONTACT";s:13:"macro_replace";s:83:"Contact";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"pro_icq";a:6:{s:8:"macro_id";s:3:"163";s:11:"macro_value";s:7:"PRO_ICQ";s:13:"macro_replace";s:76:"ICQ";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"pro_item";a:6:{s:8:"macro_id";s:3:"161";s:11:"macro_value";s:8:"PRO_ITEM";s:13:"macro_replace";s:86:"Profile Item";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"pro_msn";a:6:{s:8:"macro_id";s:3:"162";s:11:"macro_value";s:7:"PRO_MSN";s:13:"macro_replace";s:76:"MSN";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:7:"pro_yim";a:6:{s:8:"macro_id";s:3:"164";s:11:"macro_value";s:7:"PRO_YIM";s:13:"macro_replace";s:80:"Yahoo";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"t_opts";a:6:{s:8:"macro_id";s:3:"134";s:11:"macro_value";s:6:"T_OPTS";s:13:"macro_replace";s:84:"Topic Options";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"t_qreply";a:6:{s:8:"macro_id";s:3:"133";s:11:"macro_value";s:8:"T_QREPLY";s:13:"macro_replace";s:76:"Fast Reply";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:4:"test";a:6:{s:8:"macro_id";s:3:"156";s:11:"macro_value";s:4:"test";s:13:"macro_replace";s:4:"test";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"warn_0";a:6:{s:8:"macro_id";s:3:"137";s:11:"macro_value";s:6:"WARN_0";s:13:"macro_replace";s:72:"-----";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"warn_1";a:6:{s:8:"macro_id";s:3:"138";s:11:"macro_value";s:6:"WARN_1";s:13:"macro_replace";s:72:"X----";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"warn_2";a:6:{s:8:"macro_id";s:3:"139";s:11:"macro_value";s:6:"WARN_2";s:13:"macro_replace";s:72:"XX---";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"warn_3";a:6:{s:8:"macro_id";s:3:"140";s:11:"macro_value";s:6:"WARN_3";s:13:"macro_replace";s:72:"XXX--";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"warn_4";a:6:{s:8:"macro_id";s:3:"141";s:11:"macro_value";s:6:"WARN_4";s:13:"macro_replace";s:72:"XXXX-";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:6:"warn_5";a:6:{s:8:"macro_id";s:3:"142";s:11:"macro_value";s:6:"WARN_5";s:13:"macro_replace";s:72:"XXXXX";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:8:"warn_add";a:6:{s:8:"macro_id";s:3:"143";s:11:"macro_value";s:8:"WARN_ADD";s:13:"macro_replace";s:71:"+";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}s:10:"warn_minus";a:6:{s:8:"macro_id";s:3:"144";s:11:"macro_value";s:10:"WARN_MINUS";s:13:"macro_replace";s:73:"-";s:16:"macro_can_remove";s:1:"0";s:9:"macro_set";s:1:"1";s:8:"theorder";s:1:"1";}}]]> + <% TITLE %> -<% GENERATOR %> -<% CSS %> -<% JAVASCRIPT %> - +<% GENERATOR %> +<% CSS %> +<% JAVASCRIPT %> +
<% BOARD HEADER %> @@ -2023,24 +2021,24 @@ td.formbuttonrow{ <% BOARD %> <% BOARD FOOTER %> -<% STATS %> +<% STATS %> <% COPYRIGHT %>
- + ]]>
- 1165934890 - 1176733015 + 960px is a common fixed resolution size */ width: 98%; } -/* +/* * ======================================== - * styles for pagination links + * styles for pagination links * ======================================== */ - + .pagelink, .pagelinklast, @@ -2207,9 +2205,9 @@ a:hover{ .forumdesc, .forumdesc a:link, .forumdesc a:visited, -.forumdesc a:active{ +.forumdesc a:active{ background: transparent; - font-size: 10px; + font-size: 10px; color: #666; line-height: 135%; margin: 2px 0 0 0; @@ -2244,16 +2242,16 @@ a:hover{ border-bottom:1px dotted black; } -fieldset.search{ +fieldset.search{ line-height: 150%; - padding: 6px; + padding: 6px; } -label{ - cursor: pointer; +label{ + cursor: pointer; } -img.attach{ +img.attach{ background: #808080 url(style_images/1/click2enlarge.gif) no-repeat top right; border: 1px solid #808080; margin: 0 2px 0 0; @@ -2280,13 +2278,13 @@ img.attach{ } .thumbwrap h4, -.thumbwrapp h4{ +.thumbwrapp h4{ background: #DDE6F2; border: 0 !important; border-bottom: 1px solid #5176B5 !important; - color: #5176B5; + color: #5176B5; font-size: 12px; - font-weight: bold; + font-weight: bold; margin: 0; padding: 5px; } @@ -2313,7 +2311,7 @@ img.attach{ background: #EFDFDF !important; text-align: center !important; } - + .thumbwrap img.galattach, .thumbwrapp img.galattach{ background: #FFF url(style_images/1/img_larger.gif) no-repeat bottom right; @@ -2322,119 +2320,119 @@ img.attach{ padding: 2px 2px 10px 2px; } -li.helprow{ +li.helprow{ margin: 0 0 10px 0; - padding: 0; + padding: 0; } -ul#help{ - padding: 0 0 0 15px; +ul#help{ + padding: 0 0 0 15px; } .warngood, -.warnbad{ +.warnbad{ color: #0B9500; font-weight: bold; } -.warnbad{ +.warnbad{ color: #DD0000; } -#padandcenter{ +#padandcenter{ margin: 0 auto 0 auto; padding: 14px 0 14px 0; text-align: center; } -#profilename{ - font-size: 28px; - font-weight: bold; +#profilename{ + font-size: 28px; + font-weight: bold; } -#photowrap{ - padding: 6px; +#photowrap{ + padding: 6px; } -#phototitle{ - border-bottom: 1px solid #000; - font-size: 24px; +#phototitle{ + border-bottom: 1px solid #000; + font-size: 24px; } -#photoimg{ +#photoimg{ margin: 15px 0 0 0; - text-align: center; -} + text-align: center; +} #ucpmenu, -#ucpcontent{ +#ucpcontent{ background: #F5F9FD; border: 1px solid #345487; line-height: 150%; } -#ucpmenu p{ - margin: 0; +#ucpmenu p{ + margin: 0; padding: 2px 5px 6px 9px; } -#ucpmenu a:link, -#ucpmenu a:active, -#ucpmenu a:visited{ - text-decoration: none; +#ucpmenu a:link, +#ucpmenu a:active, +#ucpmenu a:visited{ + text-decoration: none; } -#ucpcontent{ +#ucpcontent{ width: auto; } -#ucpcontent p{ +#ucpcontent p{ margin: 0; padding: 10px; } -.activeuserstrip{ +.activeuserstrip{ background: #BCD0ED; padding: 6px; } /* Topic View elements */ -.signature{ +.signature{ background: transparent; - color: #339; + color: #339; font-size: 10px; line-height: 150%; } -.postdetails{ +.postdetails{ font-size: 10px; line-height:140%; } -.postcolor{ - font-size: 12px; +.postcolor{ + font-size: 12px; line-height: 160%; } -.normalname{ +.normalname{ color: #003; - font-size: 12px; - font-weight: bold; + font-size: 12px; + font-weight: bold; } -.normalname a:link, -.normalname a:visited, -.normalname a:active{ +.normalname a:link, +.normalname a:visited, +.normalname a:active{ font-size: 12px; } .post1, -.bg1{ +.bg1{ background: #F5F9FD; } .post2, -.bg3{ +.bg3{ background: #EEF2F7; } @@ -2443,46 +2441,46 @@ ul#help{ .row4shaded, .post2shaded { background-color: #E3DFE7 } -.row1{ - background: #DFE6EF; +.row1{ + background: #DFE6EF; } -.row2{ - background: #E4EAF2; +.row2{ + background: #E4EAF2; } .rowhighlight{ background-color: #FFF9BA; } -.darkrow1{ +.darkrow1{ background: #BCD0ED; - color: #3A4F6C; + color: #3A4F6C; } -.darkrow3{ - background: #D1DCEB; - color: #3A4F6C; +.darkrow3{ + background: #D1DCEB; + color: #3A4F6C; } /* tableborders gives the white column / row lines effect */ .plainborder, .tablefill, -.tablepad{ +.tablepad{ background: #F5F9FD; border: 1px solid #345487; } .tablefill, -.tablepad{ - padding: 6px; +.tablepad{ + padding: 6px; } -.tablepad{ +.tablepad{ border: 0 !important; } -.wrapmini{ +.wrapmini{ float: left; line-height: 1.5em; width: 25%; @@ -2494,22 +2492,22 @@ ul#help{ width: 35%; } -.desc{ - font-size: 11px; +.desc{ + font-size: 11px; color: #434951; } .lastaction { - font-size: 10px; + font-size: 10px; color: #434951; } -.edit{ +.edit{ font-size: 9px; } -.thin{ +.thin{ border: 1px solid #FFF; border-left: 0; border-right: 0; @@ -2522,17 +2520,17 @@ ul#help{ /* =================================================================================== */ /* =================================================================================== */ -/* +/* * ======================================== - * calendar styles + * calendar styles * ======================================== */ - -.calmonths{ + +.calmonths{ background: #F0F5FA; border: 1px solid #C2CFDF; - font-size: 18px; - font-weight: bold; + font-size: 18px; + font-weight: bold; margin: 5px 0 5px 0; padding: 8px; text-align: center; @@ -2548,7 +2546,7 @@ ul#help{ } .calday, -.calweekday{ +.calweekday{ background: #DFE6EF; color: #666; font-size: 11px; @@ -2574,7 +2572,7 @@ ul#help{ .mcellblank, .mcelldate, .mcelltoday{ - background: #EEF2F7; + background: #EEF2F7; height: 100px; margin: 0; padding: 0; @@ -2617,9 +2615,9 @@ ul#help{ padding:4px; } -/* +/* * ======================================== - * form styles + * form styles * ======================================== */ @@ -2684,7 +2682,6 @@ select input.button{ margin: 0; width: auto; - cursor: hand; cursor: pointer; } @@ -2693,9 +2690,9 @@ optgroup option{ font-size: 12px; } -.codebuttons{ - font-family: Verdana, Helvetica, Sans-Serif; - font-size: 10px; +.codebuttons{ + font-family: Verdana, Helvetica, Sans-Serif; + font-size: 10px; vertical-align: middle; margin:2px; } @@ -2712,7 +2709,7 @@ optgroup option{ padding: 2px; vertical-align: middle; } - + .button{ background: #DFE6EF; } @@ -2727,17 +2724,17 @@ optgroup option{ .radiobutton, .checkbox, -.helpbox { +.helpbox { border: 0; vertical-align: middle; background: transparent; } -/* - * class.formtable +/* + * class.formtable * - * used for tabled forms - * technically tables should not be used for form display + * used for tabled forms + * technically tables should not be used for form display * but, in the case of IPB a table is easier to work with * for the average webmaster, who has little to no CSS knowledge. * @@ -2759,7 +2756,7 @@ optgroup option{ margin: 1px 0 0 0; padding: 6px; width: 25%; -} +} .formtable td.wider, .pformleftw, @@ -2772,19 +2769,19 @@ optgroup option{ border-right: 0px; font-weight: normal; width: auto; -} +} .formtable td.formtitle, .formsubtitle{ background: #D1DCEB; - border: 1px solid #9FB9D4; + border: 1px solid #9FB9D4; border-bottom: 0; border-left: 0; border-right: 0; font-weight: normal; } -.formsubtitle{ +.formsubtitle{ border: 0; color: #3A4F6C; font-weight: bold; @@ -2799,9 +2796,9 @@ optgroup option{ font-weight: normal; } -/* +/* * ======================================== - * new style quote and code wrappers MATT's DESIGN + * new style quote and code wrappers MATT's DESIGN * ======================================== */ @@ -2843,35 +2840,35 @@ optgroup option{ background: #FAFCFE; border: 1px dotted #000; color: #465584; - font-family: Courier, Courier New, Verdana, Arial; + font-family: Courier, "Courier New", Verdana, Arial; margin: 0 auto 0 auto; padding: 2px; } -/* +/* * ======================================== - * old school quote and code styles - backwards compatibility + * old school quote and code styles - backwards compatibility * ======================================== */ #QUOTE, -#CODE{ - background: #FAFCFE; - border: 1px solid #000; - color: #465584; - font-family: Verdana, Arial; - font-size: 11px; - padding: 2px; +#CODE{ + background: #FAFCFE; + border: 1px solid #000; + color: #465584; + font-family: Verdana, Arial; + font-size: 11px; + padding: 2px; white-space: normal; } -#CODE{ - font-family: Courier, Courier New, Verdana, Arial; +#CODE{ + font-family: Courier, "Courier New", Verdana, Arial; } -/* +/* * ======================================== - * All New Styles + * All New Styles * ======================================== */ .cleared{ @@ -2882,8 +2879,8 @@ optgroup option{ .borderwrapm{ /* this will affect the outlining border of all the tables and boxes through-out the skin. */ background: #FFF; border: 1px solid #072A66; - padding: 0px; - margin: 0px; + padding: 0px; + margin: 0px; } .borderwrapm{ @@ -2896,15 +2893,15 @@ optgroup option{ background: url(style_images/1/tile_cat.gif); border: 1px solid #FFF; border-bottom: 1px solid #5176B5; - color: #FFF; + color: #FFF; font-size: 12px; - font-weight: bold; + font-weight: bold; margin: 0px; padding: 8px; } .maintitle td { - color: #FFF; + color: #FFF; font-size: 12px; font-weight: bold; } @@ -2931,19 +2928,19 @@ optgroup option{ width: auto !important; } -.maintitle a:link, +.maintitle a:link, .maintitle a:visited, -.maintitlecollapse a:link, -.maintitlecollapse a:visited{ +.maintitlecollapse a:link, +.maintitlecollapse a:visited{ background: transparent; color: #FFF; - text-decoration: none; + text-decoration: none; } -.maintitle a:hover, +.maintitle a:hover, .maintitle a:active, -.maintitlecollapse a:hover, -.maintitlecollapse a:active{ +.maintitlecollapse a:hover, +.maintitlecollapse a:active{ background: transparent; color: #F1F1F1; } @@ -2952,15 +2949,15 @@ table th, .borderwrap table th, .subtitle, .subtitlediv, -.postlinksbar{ +.postlinksbar{ background: transparent url(style_images/1/tile_sub.gif); border-bottom: 1px solid #5176B5; - color: #3A4F6C; + color: #3A4F6C; font-size: 10px; - font-weight: bold; + font-weight: bold; letter-spacing: 1px; - margin: 0; - padding: 5px; + margin: 0; + padding: 5px; } .subtitlediv{ @@ -2973,17 +2970,17 @@ table th, .subtitle a:link, .subtitlediv a:link, .borderwrap table th a:visited, -.subtitle a:visited, -.subtitlediv a:visited, +.subtitle a:visited, +.subtitlediv a:visited, .borderwrap table th a:active, .subtitle a:active, .subtitlediv a:active, .borderwrap table th a:hover, .subtitle a:hover, -.subtitlediv a:hover{ +.subtitlediv a:hover{ background: transparent; color: #3A4F6C; - text-decoration: none; + text-decoration: none; } .borderwrap h4{ @@ -2991,9 +2988,9 @@ table th, border: 1px solid #FFF; border-bottom: 1px solid #5176B5; border-top: 1px solid #5176B5; - color: #5176B5; + color: #5176B5; font-size: 12px; - font-weight: bold; + font-weight: bold; margin: 0; padding: 5px; } @@ -3011,7 +3008,7 @@ td.formbuttonrow, .pformstrip, .borderwrap p.formbuttonrow, .borderwrap p.formbuttonrow1{ - background: #D1DCEB !important; + background: #D1DCEB !important; border: 1px solid #FFF; border-top: 1px solid #5176B5; margin: 0px !important; @@ -3135,9 +3132,9 @@ td.formbuttonrow{ border: 1px solid #CCC; border-left: 0; border-right: 0; - color: #444; + color: #444; font-size: 12px; - font-weight: bold; + font-weight: bold; margin: 0; padding: 5px; } @@ -3156,9 +3153,9 @@ td.formbuttonrow{ border: 1px solid #992A2A; border-left: 0; border-right: 0; - color: #992A2A; + color: #992A2A; font-size: 12px; - font-weight: bold; + font-weight: bold; margin: 0; padding: 5px; } @@ -3175,7 +3172,7 @@ td.formbuttonrow{ .ruleswrap{ background: #F2DDDD; border: 1px solid #992A2A; - color: #992A2A; + color: #992A2A; margin: 5px 0 5px 0; padding: 5px; } @@ -3227,7 +3224,7 @@ td.formbuttonrow{ color: #FFF; } -#logostrip{ +#logostrip{ background: #3860BB url(style_images/1/tile_back.gif); border: 1px solid #FFF; height: 68px; @@ -3242,11 +3239,11 @@ td.formbuttonrow{ padding: 0; } -#submenu{ +#submenu{ background: transparent url(style_images/1/tile_sub.gif); border: 1px solid #FFF; border-top: 0; - color: #3A4F6C; + color: #3A4F6C; margin: 0; height: 29px; text-align: right; @@ -3258,7 +3255,7 @@ td.formbuttonrow{ background: transparent url(style_images/1/tile_sub-lite.gif); float: right; font-size: 10px; - font-weight: bold; + font-weight: bold; letter-spacing: 0.5px; margin: 0px; padding: 7px 0 7px 0; @@ -3273,35 +3270,35 @@ td.formbuttonrow{ border-right: 1px solid #dce3ee; } -.ipb-top-left-link a:link, +.ipb-top-left-link a:link, .ipb-top-left-link a:visited, -.ipb-top-right-link a:link, +.ipb-top-right-link a:link, .ipb-top-right-link a:visited -{ - background: transparent; +{ + background: transparent; color: #3A4F6C; padding: 0 6px 0 6px; text-decoration: none; } -.ipb-top-left-link a:hover, +.ipb-top-left-link a:hover, .ipb-top-left-link a:active, -.ipb-top-right-link a:hover, +.ipb-top-right-link a:hover, .ipb-top-right-link a:active { - background: transparent; - color: #5176B5; + background: transparent; + color: #5176B5; } #userlinks, -#userlinksguest{ +#userlinksguest{ background: #F0F5FA; border: 1px solid #C2CFDF; margin: 5px 0 5px 0; padding: 0 5px 0 5px; } -#userlinksguest{ +#userlinksguest{ background: #F4E7EA; border: 1px solid #986265; } @@ -3311,10 +3308,10 @@ td.formbuttonrow{ background: transparent !important; border: 0 !important; font-size: 10px; - font-weight: bold; + font-weight: bold; letter-spacing: 1px; margin: 0 !important; - padding: 7px 0 7px 0; + padding: 7px 0 7px 0; text-align: right; } @@ -3333,26 +3330,26 @@ td.formbuttonrow{ float: left; } -#navstrip{ +#navstrip{ background: transparent; color: #999; font-size: 12px; font-weight: bold; margin: 0 0 5px 0; - padding: 14px 0px 8px 0px; + padding: 14px 0px 8px 0px; } -#navstrip a:link, -#navstrip a:visited{ - background: transparent; - color: #222; +#navstrip a:link, +#navstrip a:visited{ + background: transparent; + color: #222; text-decoration: none; } -#navstrip a:hover, +#navstrip a:hover, #navstrip a:active{ - background: transparent; - color: #5176B5; + background: transparent; + color: #5176B5; } .toplinks{ @@ -3374,16 +3371,16 @@ td.formbuttonrow{ padding: 5px; } -.copyright{ +.copyright{ background: #EEE; - font-size: 11px; + font-size: 11px; margin: 0 0 5px 0; padding: 8px; } -/* +/* * ======================================== - * print page styles + * print page styles * ======================================== */ @@ -3442,8 +3439,8 @@ td.formbuttonrow{ border:0px; padding:3px; margin:0px; - background: #D1DCEB; - color: #3A4F6C; + background: #D1DCEB; + color: #3A4F6C; } @@ -3479,16 +3476,16 @@ td.formbuttonrow{ margin-top:3px; } -.tabon a:link, -.tabon a:visited, +.tabon a:link, +.tabon a:visited, .tabon a:active { text-decoration:none; color: #000; } -.taboff a:link, -.taboff a:visited, +.taboff a:link, +.taboff a:visited, .taboff a:active { text-decoration:none; @@ -3541,7 +3538,6 @@ td.formbuttonrow{ position:absolute; display:none; background: #FFF; - filter:alpha(opacity=0); border:0px; width:auto; height:auto; @@ -3620,45 +3616,46 @@ td.formbuttonrow{ padding:4px; } + .popupmenu-new { background-color: #DFE6EF; } -.popmenubutton a:link, +.popmenubutton a:link, .popmenubutton a:visited, -.popmenubutton-new a:link, +.popmenubutton-new a:link, .popmenubutton-new a:visited, -.popupmenu-item a:link, +.popupmenu-item a:link, .popupmenu-item a:visited, -.popupmenu-item-last a:link, +.popupmenu-item-last a:link, .popupmenu-item-last a:visited -{ - color: #3A4F6C; +{ + color: #3A4F6C; text-decoration: none; } .popmenubutton a:hover, .popmenubutton-new a:hover, -.popupmenu-item a:hover, +.popupmenu-item a:hover, .popupmenu-item-last a:hover -{ - color: #5176B5; +{ + color: #5176B5; text-decoration: none; } .popupmenu-category -{ +{ background: transparent url(style_images/1/tile_sub.gif); border-top: 1px solid #5176B5; border-bottom: 1px solid #5176B5; - color: #3A4F6C; + color: #3A4F6C; font-size: 10px; - font-weight: bold; + font-weight: bold; letter-spacing: 1px; - margin: 0; - padding: 5px; + margin: 0; + padding: 5px; } /* -------------------------------- */ @@ -3772,7 +3769,7 @@ td.formbuttonrow{ /* -------------------------------- */ .pp-name -{ +{ background: #F0F5FA; border: 1px solid #C2CFDF; margin: 0px; @@ -3787,22 +3784,22 @@ td.formbuttonrow{ } .pp-header -{ +{ background: transparent url(style_images/1/tile_sub.gif); - color: #3A4F6C; + color: #3A4F6C; font-size: 10px; - font-weight: bold; - margin: 0px 0px 1px 0px; - padding: 5px; + font-weight: bold; + margin: 0px 0px 1px 0px; + padding: 5px; } .pp-title { background: url(style_images/1/css_pp_header.gif); border-bottom: 1px solid #5176B5; - color: #FFF; + color: #FFF; font-size: 12px; - font-weight: bold; + font-weight: bold; margin: 0px; padding: 8px; } @@ -3935,9 +3932,9 @@ td.formbuttonrow{ background: url(style_images/1/css_pp_header.gif); border: 1px solid #FFF; border-bottom: 1px solid #5176B5; - color: #FFF; + color: #FFF; font-size: 12px; - font-weight: bold; + font-weight: bold; margin: 0px; padding: 8px; } @@ -3995,19 +3992,19 @@ td.formbuttonrow{ border-right: 1px solid #7f9BBC; } -.pp-tabon a:link, -.pp-tabon a:visited, +.pp-tabon a:link, +.pp-tabon a:visited, .pp-tabon a:active { text-decoration:none; color: #FFFFFF; } -.pp-taboff a:link, -.pp-taboff a:visited, +.pp-taboff a:link, +.pp-taboff a:visited, .pp-taboff a:active, -.pp-tabshaded a:link, -.pp-tabshaded a:visited, +.pp-tabshaded a:link, +.pp-tabshaded a:visited, .pp-tabshaded a:active { text-decoration:none; @@ -4020,16 +4017,16 @@ td.formbuttonrow{ margin:0px; padding:0px; }]]> - + <% TITLE %> -<% GENERATOR %> -<% CSS %> -<% JAVASCRIPT %> - +<% GENERATOR %> +<% CSS %> +<% JAVASCRIPT %> +
<% BOARD HEADER %> @@ -4038,17 +4035,17 @@ td.formbuttonrow{ <% BOARD %> <% BOARD FOOTER %> -<% STATS %> +<% STATS %> <% COPYRIGHT %>
- + ]]>
default
2 - IPB Стандартный стиль + IPB Classic Blue 1 0 1 diff --git a/upload/resources/tasks.xml b/upload/resources/tasks.xml index 920d5044..7e9a3711 100644 --- a/upload/resources/tasks.xml +++ b/upload/resources/tasks.xml @@ -1,9 +1,9 @@ - + 1 - + Hourly Clean Out cleanout.php 1158935280 -1 @@ -12,7 +12,7 @@ 59 87a432443398942e7536028f9b0e4296 1 - + Kill old sessions, reg images, searches 1 cleanout 0 @@ -21,7 +21,7 @@ 2 - + Daily Stats Rebuild rebuildstats.php 1158969600 -1 @@ -30,7 +30,7 @@ 0 ac88319151330882c4a0eaa3d9016a1b 1 - + Rebuilds board statistics 1 rebuildstats 0 @@ -39,7 +39,7 @@ 3 - + Daily Clean Out dailycleanout.php 1158980400 -1 @@ -48,7 +48,7 @@ 0 43f41348f6d31e86884a6431f29ef52f 1 - + Prunes topic subscriptions and old read topic entries 1 dailycleanout 0 @@ -57,7 +57,7 @@ 4 - + Birthday and Events Cache calendarevents.php 1158961980 -1 @@ -66,7 +66,7 @@ -1 f0bd66a5f14ad72e76c9636c84325a2a 1 - + 1 calendarevents 0 @@ -75,7 +75,7 @@ 5 - + Announcements Update announcements.php 1158933060 -1 @@ -84,7 +84,7 @@ -1 82584951232335eed1d53027f3046694 1 - + Rebuilds cache and expires out of date announcements 1 announcements 0 @@ -93,7 +93,7 @@ 6 - + Send Bulk Mail bulkmail.php 1158846544 -1 @@ -102,7 +102,7 @@ -1 39b03a6e8a22c6a9ee419d31a47cea33 0 - + Dynamically assigned, no need to edit or change 0 bulkmail 1 @@ -111,7 +111,7 @@ 7 - + dailydigest.php 1158970200 -1 @@ -120,7 +120,7 @@ 10 b905a89a00d6ba8acd30092cb9a3f8b2 1 - + 1 dailydigest 0 @@ -129,7 +129,7 @@ 8 - + weeklydigest.php 1159067400 0 @@ -138,7 +138,7 @@ 10 5df642c53fda5d889546f21bfbac92ba 1 - + 1 weeklydigest 0 @@ -147,7 +147,7 @@ 9 - + Expire Paid Subscriptions doexpiresubs.php 1158969600 -1 @@ -156,7 +156,7 @@ 0 57fddf99f58d4c5393c2eb3408047267 1 - + Unsubscribes members from their subscribed packages 1 doexpiresubs 1 @@ -165,7 +165,7 @@ 10 - + Update Topic Views Counter updateviews.php 1158942600 -1 @@ -174,7 +174,7 @@ -1 4faf64b98e9c57c483b82ba6074d1b0f 0 - + Used when topic views are not incremented immediately 1 updateviews 0 @@ -183,7 +183,7 @@ 11 - + Subscription Expiration Notification expiresubs.php 1158973200 -1 @@ -192,7 +192,7 @@ 0 521640eb417f07e634604daae56ca485 1 - + Sends out an email to all members who have a subscription due to expire 1 expiresubs 0 @@ -201,7 +201,7 @@ 12 - + RSS Import Update rssimport.php 1158933480 -1 @@ -210,7 +210,7 @@ 30 a102c550761e0074251496e5d3afea60 1 - + Imports any new RSS articles 1 rssimport 1 @@ -219,7 +219,7 @@ 13 - + Remove Old Validating Members removevalidating.php 1158976800 -1 @@ -228,7 +228,7 @@ 0 0460686136ae8c6d4db59824afe59748 1 - + 1 validating 1 @@ -237,7 +237,7 @@ 14 - + Prune Logs logprune.php 1159336800 -1 @@ -246,7 +246,7 @@ 0 8337aca64493804858fbcc2c4fc5759b 1 - + This task will prune logs based on your log pruning settings 1 logprune 0 @@ -255,7 +255,7 @@ 15 - + Update Profile Views update_profile_views.php 1158936240 -1 @@ -264,7 +264,7 @@ -1 3077b04aeaebb5e758c1b5bcd1e48816 0 - + Rebuilds the profile view counters 1 update_profile_views 1 diff --git a/upload/resources/version_history.php b/upload/resources/version_history.php index e4f16dc5..51a855dc 100644 --- a/upload/resources/version_history.php +++ b/upload/resources/version_history.php @@ -37,6 +37,19 @@ $import_versions = array( '22009' => '2.2.0', '22010' => '2.2.1', '22011' => '2.2.2', + '23000' => '2.3.0 BETA 1', + '23001' => '2.3.0 RC 1', + '23002' => '2.3.0 RC 2', + + '23003' => '2.3.0', + '23004' => '2.3.1', + '23005' => '2.3.2', + '23006' => '2.3.3', + '23007' => '2.3.4', + '23008' => '2.3.5', + '23009' => '2.3.5', + + '23010' => '2.3.6', ); diff --git a/upload/retail/chatauth.php b/upload/retail/chatauth.php index 804da114..4b59dec6 100644 --- a/upload/retail/chatauth.php +++ b/upload/retail/chatauth.php @@ -2,22 +2,15 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 -| ============================================= +| Invision Power Board +| ======================================== | by Matthew Mecham -| (c) 2001 - 2006 Invision Power Services, Inc. +| (c) 2001 - 2005 Invision Power Services | http://www.invisionpower.com -| ============================================= +| ======================================== | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 +| Email: matt@invisionpower.com | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +--------------------------------------------------------------------------- | | > IPB CHAT 2004 INTEGRATION @@ -175,7 +168,7 @@ if ( $in_user and $in_pass ) ) ) ) ); $ipsclass->DB->exec_query(); - + $member = $ipsclass->DB->fetch_row(); if ( ! $member['id'] ) diff --git a/upload/retail/chatservice.php b/upload/retail/chatservice.php index 84e95c06..2591e960 100644 --- a/upload/retail/chatservice.php +++ b/upload/retail/chatservice.php @@ -2,22 +2,15 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 -| ============================================= +| Invision Power Board +| ======================================== | by Matthew Mecham -| (c) 2001 - 2006 Invision Power Services, Inc. +| (c) 2001 - 2003 Invision Power Services | http://www.invisionpower.com -| ============================================= +| ======================================== | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 +| Email: matt@invisionpower.com | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +--------------------------------------------------------------------------- | | > IPB CHAT 2004 INTEGRATION diff --git a/upload/retail/index.html b/upload/retail/index.html index 250b1f72..af2fbe79 100644 --- a/upload/retail/index.html +++ b/upload/retail/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

Ошибка русской версии Invision Power Board

-Вы попали на несуществующую страницу!
Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
- - \ No newline at end of file + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/acp_css.css b/upload/skin_acp/IPB2_Standard/acp_css.css index d3db0417..8b166e48 100644 --- a/upload/skin_acp/IPB2_Standard/acp_css.css +++ b/upload/skin_acp/IPB2_Standard/acp_css.css @@ -112,7 +112,8 @@ } .warning-box, -.information-box +.information-box, +.help-box { color: #000; border: 1px solid #000; @@ -123,7 +124,8 @@ } .warning-box img, -.information-box img +.information-box img, +.help-box img { float:left; margin-top: 10px; @@ -135,7 +137,9 @@ .warning-box h2, .warning-box p, .information-box h2, -.information-box p +.information-box p, +.help-box h2, +.help-box p { padding: 0px; margin: 0px; @@ -143,7 +147,8 @@ } .warning-box h2, -.information-box h2 +.information-box h2, +.help-box h2 { padding-bottom: 4px; font-size: 14px; @@ -160,7 +165,10 @@ margin-left: 30px; } - +.help-box +{ + background-color: #D5EEB6; +} /** @@ -699,7 +707,8 @@ img.calendar /* MIGHT WANT TO CHANGE THIS AT SOME POINT */ .tableheader, -.tableheaderalt +.tableheaderalt, +.tableheader2 { font-size:12px; vertical-align:middle; @@ -1527,4 +1536,90 @@ ins, { color: purple; font-weight: bold; +} + + +/* new homepage styles */ + +.homepage_section_warning, +.homepage_section { + background-color: #344966; + font-size: 14px; + color: #fff; + padding: 7px; +} + +.homepage_section_warning { + background-color: #66343e; +} + +.homepage_pane_warning_border, +.homepage_pane_warning, +.homepage_pane_border, +.homepage_pane { + background-color: #e2e2e0; + padding: 4px; +} + +.homepage_pane_warning_border { + border:1px solid #66343e; +} + +.homepage_pane_border { + border:1px solid #344966; +} + +.homepage_pane_warning_border, +.homepage_pane_warning { + background-color: #F3e2e0; +} + +.homepage_sub_header { + padding: 8px; + background-color: #a8afbd; + color: #3b424c; + font-weight: bold; + font-size:12px; +} + +.homepage_sub_row { + background-color:#e6ebf1; + padding:6px; + border-bottom:1px solid #d3dae4; +} + +.homepage_sub_row_2 { + background-color:#d3dae4; + padding:6px; + border-bottom:1px solid #b3bbc8; +} + +.homepage_sub_row_3 { + background-color:#e2e2e0; + padding:6px; + border-bottom:1px solid #b3bbc8; +} + +.homepage_border { + border:1px solid #7f8ca0; +} + +#common_actions div a { + display: block; + font-size: 12px; + font-weight: bold; + text-decoration: none; + padding: 3px; + border: 1px solid #e2e2e0; + color: #343434; +} + +#common_actions div a:hover { + background-color: #ffffff; + border: 1px solid #acacac; + color: #343434; +} + +#common_actions img { + vertical-align: middle; } \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/acp_js.js b/upload/skin_acp/IPB2_Standard/acp_js.js index f579d760..8144de5c 100644 --- a/upload/skin_acp/IPB2_Standard/acp_js.js +++ b/upload/skin_acp/IPB2_Standard/acp_js.js @@ -1,19 +1,17 @@ //------------------------------------------ -// Invision Power Board v2.0 +// Invision Power Board v2.3 // ACP Specific JS File -// (c) 2003 Invision Power Services, Inc. -// +// (c) 2007 Invision Power Services, Inc. +// By: Matt Mecham, Brandon Farber // http://www.invisionboard.com //------------------------------------------ -/*--------------------------------------------*/ -// IE TWEAKS -/*--------------------------------------------*/ - //========================================== // AJAX REFRESH //========================================== +ajax_load_msg = ''; + function ajax_refresh( url, text, addtotext ) { /*--------------------------------------------*/ @@ -73,7 +71,7 @@ function ajax_refresh( url, text, addtotext ) function pop_win(theUrl, winName, theWidth, theHeight) { - if (winName == '') { winName = 'Предпросмотр'; } + if (winName == '') { winName = 'Preview'; } if (theHeight == '') { theHeight = 400; } if (theWidth == '') { theWidth = 400; } @@ -290,31 +288,31 @@ function no_specialchars(type) if (type == 'sets') { var field = document.theAdminForm.sname; - name = 'названии стиля'; + name = 'Skin Set Title'; } if (type == 'wrapper') { var field = document.theAdminForm.name; - name = 'названии общего шаблона'; + name = 'Wrapper Title'; } if (type == 'csssheet') { var field = document.theAdminForm.name; - name = 'названии CSS'; + name = 'StyleSheet Title'; } if (type == 'templates') { var field = document.theAdminForm.skname; - name = 'названии шаблона'; + name = 'Template Set Name'; } if (type == 'images') { var field = document.theAdminForm.setname; - name = 'названии набора макросов и изображений'; + name = 'Image & Macro Set Title'; } var valid = 'abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890.()[]:;~+-_'; @@ -333,7 +331,7 @@ function no_specialchars(type) if (ok == 0) { - alert('Недопустимые символы в ' + name + ', вы можете использовать только английские буквы, цифры и следующие символы.\n. ( ) : ; ~ + - _'); + alert('Invalid entry for: ' + name + ', you can only use alphanumerics and the following special characters.\n. ( ) : ; ~ + - _'); return false; } else @@ -368,7 +366,7 @@ function maincheckdelete(url, msg) { if ( ! msg ) { - msg = 'Для подтвержедния нажмите ОК'; + msg = 'PLEASE CONFIRM:\nOK to proceed?'; } if (confirm( msg )) @@ -377,7 +375,7 @@ function maincheckdelete(url, msg) } else { - alert ( 'Действие отменено' ); + alert ( 'OK, action cancelled!' ); } } diff --git a/upload/skin_acp/IPB2_Standard/acp_js_skin/index.html b/upload/skin_acp/IPB2_Standard/acp_js_skin/index.html index 250b1f72..b49fc27d 100644 --- a/upload/skin_acp/IPB2_Standard/acp_js_skin/index.html +++ b/upload/skin_acp/IPB2_Standard/acp_js_skin/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

Ошибка русской версии Invision Power Board

-Вы попали на несуществующую страницу!
Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
- - \ No newline at end of file + Invision Power Board - Bulletin Board System

403: Invision Power Board -> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Invision Power Board \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/acp_js_skin/ips_menu_html.js b/upload/skin_acp/IPB2_Standard/acp_js_skin/ips_menu_html.js index 992a929c..b39bb55f 100644 --- a/upload/skin_acp/IPB2_Standard/acp_js_skin/ips_menu_html.js +++ b/upload/skin_acp/IPB2_Standard/acp_js_skin/ips_menu_html.js @@ -1,105 +1,105 @@ -/*-------------------------------------------------------------------------*/ -// IPS BASIC MENU CLASS (EXTENSION: BUILD SIMPLE MENU) -// (c) 2005 Invision Power Services, Inc -// Assumes that "ips_menu.js" has been loaded -/*-------------------------------------------------------------------------*/ - -//---------------------------------- -// INIT some CSS classes -//---------------------------------- - -var css_mainwrap = 'popupmenu'; -var css_menusep = 'menusep'; -var css_menusep_last = 'menuseplast'; - -//---------------------------------- -// INIT some images -//---------------------------------- - -var img_add = "V "; -var img_edit = "V "; -var img_view = "V "; -var img_delete = "V "; -var img_info = "V "; -var img_action = "V "; -var img_item = "V "; -var img_newfolder = "V "; -var img_password = "V "; -var img_export = "V "; - -/*-------------------------------------------------------------------------*/ -// Return formed image -/*-------------------------------------------------------------------------*/ - -function make_image( img ) -{ - return "-"; -} - -/*-------------------------------------------------------------------------*/ -// menu_build_menu -// cid: ID of opener object (img, div, etc) -// menuinput: Array of menu entries | Variable of menu HTML -// complexmenu: Treat as HTML stream if true, else treat as array of HTML -/*-------------------------------------------------------------------------*/ - -function menu_build_menu(cid, menuinput, complexmenu) -{ - var html = "\n\n"; - - //---------------------------------- - // Workaround for IE bug which shows - // select boxes and other windows GUI - // over divs. Write iframe - //---------------------------------- - - if ( is_ie ) - { - html += "\n"+''+"\n"; - } - - //---------------------------------- - // Write the html - //---------------------------------- - - if ( html != '' ) - { - document.getElementById( cid ).parentNode.innerHTML += html; - } - - //ipsmenu.dynamic_html += html; - ipsmenu.dynamic_register[ ipsmenu.dynamic_register.length + 1 ] = cid; -} - - - +/*-------------------------------------------------------------------------*/ +// IPS BASIC MENU CLASS (EXTENSION: BUILD SIMPLE MENU) +// (c) 2005 Invision Power Services, Inc +// Assumes that "ips_menu.js" has been loaded +/*-------------------------------------------------------------------------*/ + +//---------------------------------- +// INIT some CSS classes +//---------------------------------- + +var css_mainwrap = 'popupmenu'; +var css_menusep = 'menusep'; +var css_menusep_last = 'menuseplast'; + +//---------------------------------- +// INIT some images +//---------------------------------- + +var img_add = "V "; +var img_edit = "V "; +var img_view = "V "; +var img_delete = "V "; +var img_info = "V "; +var img_action = "V "; +var img_item = "V "; +var img_newfolder = "V "; +var img_password = "V "; +var img_export = "V "; + +/*-------------------------------------------------------------------------*/ +// Return formed image +/*-------------------------------------------------------------------------*/ + +function make_image( img ) +{ + return "-"; +} + +/*-------------------------------------------------------------------------*/ +// menu_build_menu +// cid: ID of opener object (img, div, etc) +// menuinput: Array of menu entries | Variable of menu HTML +// complexmenu: Treat as HTML stream if true, else treat as array of HTML +/*-------------------------------------------------------------------------*/ + +function menu_build_menu(cid, menuinput, complexmenu) +{ + var html = "\n\n"; + + //---------------------------------- + // Workaround for IE bug which shows + // select boxes and other windows GUI + // over divs. Write iframe + //---------------------------------- + + if ( is_ie ) + { + html += "\n"+''+"\n"; + } + + //---------------------------------- + // Write the html + //---------------------------------- + + if ( html != '' ) + { + document.getElementById( cid ).parentNode.innerHTML += html; + } + + //ipsmenu.dynamic_html += html; + ipsmenu.dynamic_register[ ipsmenu.dynamic_register.length + 1 ] = cid; +} + + + diff --git a/upload/skin_acp/IPB2_Standard/acp_perms.js b/upload/skin_acp/IPB2_Standard/acp_perms.js index d6f7193a..d118696a 100644 --- a/upload/skin_acp/IPB2_Standard/acp_perms.js +++ b/upload/skin_acp/IPB2_Standard/acp_perms.js @@ -68,7 +68,7 @@ acpperms.prototype.save_group = function( perm_main, perm_child, member_id, resu if ( ! _this.xmlobj.readystate_ready_and_ok() ) { - _this.show_loading( 'Сохранение...' ); + _this.show_loading( 'Saving...' ); return; } @@ -366,7 +366,7 @@ acpperms.prototype.save_bits = function( doreturn ) if ( ! _this.xmlobj.readystate_ready_and_ok() ) { - _this.show_loading( 'Сохранение...' ); + _this.show_loading( 'Saving...' ); return; } @@ -429,7 +429,7 @@ acpperms.prototype.save_mainbit = function( result ) if ( ! _this.xmlobj.readystate_ready_and_ok() ) { - _this.show_loading( 'Сохранение...' ); + _this.show_loading( 'Saving...' ); return; } @@ -497,7 +497,7 @@ acpperms.prototype.save_tab = function( perm_main, member_id, result ) if ( ! _this.xmlobj.readystate_ready_and_ok() ) { - _this.show_loading( 'Сохранение...' ); + _this.show_loading( 'Saving...' ); return; } @@ -586,7 +586,7 @@ acpperms.prototype.init = function( tab, member_id, perm_child ) if ( ! _this.xmlobj.readystate_ready_and_ok() ) { - _this.show_loading( 'Загрузка...' ); + _this.show_loading( 'Loading...' ); return; } @@ -785,7 +785,7 @@ acpperms.prototype.show_loading = function( status_msg ) acpperms.prototype.hide_loading = function() { - this.div_status_msg.innerHTML = '
Готово'; + this.div_status_msg.innerHTML = '
Ready'; this.loading_fired = 0; diff --git a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_admin.php b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_admin.php index b6484a22..c9d708d0 100644 --- a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_admin.php +++ b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_admin.php @@ -14,34 +14,34 @@ $IPBHTML = ""; $IPBHTML .= << -
Сведения об авторизации
+
Log in Detail
- + EOF; @@ -328,11 +328,12 @@ $IPBHTML = ""; $IPBHTML .= << -Ограничения доступа в админцентр для {$member['members_display_name']} +ACP permission restrictions for {$member['members_display_name']}

-Нажмите на закладку выше, чтобы установить уровень доступа до всех функций в этой закладке. -Если вы хотите выбрать уровень доступа к каждой функции, нажмите на ссылку, показывающейся в опциях этих функций. +Simply click on one of the tabs above to set the access level for all functions in this +tab. If you want to choose access on a per-function level, click on the relevant link +to be shown this function's options. EOF; //--endhtml--// @@ -351,14 +352,14 @@ $IPBHTML = ""; $IPBHTML .= << -Ограничения доступа в админцентр для {$member['members_display_name']} +ACP permission restritctions for {$member['members_display_name']}

-Доступ к этой закладке еще не включен. Для включения индивидуальных настроек доступа для этой закладки -просто нажмите на зеленую иконку, которая находится после названия закладки. +Access to this tab has not yet been enabled. To enable individual access permissions for this tab +simply click the green cross icon next to the tab title.

-Затем вы сможете устанавливать индивидуальные настройки доступа до каждой функции, которая сгруппирована под этой закладкой. +You can then set individual permissions for each function which is grouped under this tab. EOF; //--endhtml--// @@ -378,40 +379,40 @@ $IPBHTML .= <<
- ПРОЧЕЕ - * - * + ADMIN + * + *
+ HELP & SUPPORT + * + * + EOF; //--endhtml--// @@ -461,7 +462,7 @@ $IPBHTML .= <<
- РАЗРЕШИТЬ ДОСТУП К ЭТОЙ ФУНКЦИИ + ALLOW ACCESS TO THIS FUNCTION
EOF; @@ -497,7 +498,7 @@ $IPBHTML .= <<
- Когда вы "РАЗРЕШАЕТЕ ДОСТУП К ЭТОЙ ФУНКЦИИ" это позволяет вам выставить доступ к возможностям функции. В противном случае изменения доступа не будут действовать. + When "ALLOW ACCESS TO THIS FUNCTION" is enabled you may set the individual access permissions for the sub-features of this particular function. Otherwise, changes to the individual access permission will have no effect.
EOF; //--endhtml--// @@ -596,8 +597,8 @@ $IPBHTML = ""; $IPBHTML .= << * - Разрешить - Запретить + Allow + Deny EOF; if ( $allow != 0 ) @@ -632,8 +633,8 @@ $IPBHTML .= << * - Разрешить - Запретить + Allow + Deny EOF; if ( $allow != 0 ) diff --git a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_api.php b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_api.php new file mode 100644 index 00000000..62fd0c90 --- /dev/null +++ b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_api.php @@ -0,0 +1,317 @@ + +
XML-RPC Log Detail
+
- Основные + Basics - + - + - + - +
Имя пользователяUsername {$log['admin_username']}
IP-адресIP Address {$log['admin_ip_address']}
ДатаLog in Time {$log['_admin_time']}
СтатусSuccess -

- Данные POST (из формы) + POST Data (Form Data) EOF; if ( is_array( $log['_admin_post_details']['post'] ) AND count( $log['_admin_post_details']['post'] ) ) @@ -59,7 +59,7 @@ $IPBHTML .= <<
- Данные GET (из URL) + GET Data (URL Data)
EOF; if ( is_array( $log['_admin_post_details']['get'] ) AND count( $log['_admin_post_details']['get'] ) ) @@ -103,7 +103,7 @@ $IPBHTML .= <<{$r['_admin_time']} EOF; @@ -122,15 +122,15 @@ $IPBHTML = ""; $IPBHTML .= << -
Список попыток авторизации
+
ACP Log in Attempts
- - - + -
- - - - - + + + + + $content
 Имя пользователяIP-адресДатаСтатус NameIP AddressDateStatusLog
@@ -159,15 +159,15 @@ $IPBHTML .= <<
-
Ограничения доступа в админцентр: Найти администратора
+
ACP Permissions: Find an administrator
 
- + - +
Введите отображаемое имя администратора
Это должен быть пользователь, который имеет основную или вторичную группу с доступом в админцентр.
Пользователь не должен быть в группе главных администраторов.
Enter an administrator's display name
An administrator is someone that has access to the ACP via their primary or secondary groups and is NOT in the Root Admin group.
@@ -195,13 +195,13 @@ $IPBHTML = ""; //--starthtml--// $IPBHTML .= << +
{$data['_group_name']} {$data['_date']}ОпцииOptions
@@ -487,8 +488,8 @@ if ( $perm_value != 0 ) $IPBHTML .= << -
Сохранить
-
Отменить
+
Save
+
UNDO
+ + + +
+
+ Basics + + + + + + + + + + + + + + + + + +
API Key{$log['api_log_key']}
IP Address{$log['api_log_ip']}
Time{$log['_api_log_date']}
Success-
+
+
+
+ XML-RPC Data (Form Data) +
+ {$log['_api_log_query']} +
+
+
+
+EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// API|LOG List +//=========================================================================== +function api_login_view( $logs, $links ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +
XML-RPC Request Log
+ + + + + + + + + +EOF; + +if ( is_array( $logs ) AND count( $logs ) ) +{ + foreach( $logs as $r ) + { +$IPBHTML .= << + + + + + + + +EOF; + } +} +$IPBHTML .= << +
+ $links +
+ + +EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// API LIST +//=========================================================================== +function api_list( $api_users ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +
XML-RPC API Users
+
 API KeyIP AddressDateStatusLog
+ - + {$r['api_log_key']}
{$r['api_log_ip']}
{$r['_api_log_date']}- + - +
+ + + + + + + +EOF; + +if ( count( $api_users ) ) +{ + foreach( $api_users as $user ) + { +$IPBHTML .= << + + + + +EOF; + } +} +else +{ +$IPBHTML .= << + + +EOF; +} + +$IPBHTML .= << +
 
+ + +EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// API FORM +//=========================================================================== +function api_form( $form, $title, $formcode, $button, $api_user, $type, $permissions ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << + + +
+
+
$title
+
 API UserAPI KeyIPOptions
{$user['api_user_name']} + {$user['api_user_key']} + {$user['api_user_ip']} + Options
There are no API users currently.
Would you like to create one?
+ + + + + - - - - - - - -EOF; - -//--endhtml--// -return $IPBHTML; -} - - - -} - - + +
+
+
+ API User Basics + +EOF; +if ( $type == 'add' ) +{ +$IPBHTML .= << + + + +EOF; +} + +$IPBHTML .= << + + + + + + + +
+ API User Key +
This key is automatically generated and will be re-generated if you refresh this form.
+ +
{$form['_api_user_key']}
API User Title
The title is just a name for your records for easier identification.
{$form['api_user_name']}
API Restrict IP
Optional: You may enter the IP Address of the server you only wish to grant access. This increases security and is recommended.
{$form['api_user_ip']}
+
+
+
+ API Permissions +
+EOF; + +if ( is_array( $permissions ) AND count( $permissions ) ) +{ + foreach( $permissions as $key => $data ) + { +$IPBHTML .= <<{$data['title']}
+EOF; + } +} + +$IPBHTML .= << +
API Permissions
+EOF; + +if ( is_array( $permissions ) AND count( $permissions ) ) +{ + foreach( $permissions as $key => $data ) + { +$IPBHTML .= << + +EOF; + if ( is_array( $permissions[ $key ]['form_perms'] ) AND ( $permissions[ $key ]['form_perms'] ) ) + { + foreach( $permissions[ $key ]['form_perms'] as $perm => $_data ) + { +$IPBHTML .= << + + +EOF; + } + } +$IPBHTML .= << + +EOF; + } +} + +$IPBHTML .= << + + +
Allow access to {$_data['title']}{$_data['form']}
+
+
+
Save $button
+
+
+ + + +EOF; + +//--endhtml--// +return $IPBHTML; +} + +} + + +?> \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_attachments.php b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_attachments.php index f47c7595..f5efcd71 100644 --- a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_attachments.php +++ b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_attachments.php @@ -1,86 +1,86 @@ - -
- - - - - -
Типы прикрепляемых файловОпции
- - - - - - - - - - $content -
 РасширениеMime-тип+Сообщения+АватарОпции
- - -
- - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Attachments: Row -//=========================================================================== -function attach_row( $row ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -
.{$row['atype_extension']}{$row['atype_mimetype']}{$row['apost_checked']}{$row['aphoto_checked']}Опции
+ + + + +
Your Attachment TypesOptions
+ + + + + + + + + + $content +
 ExtensionMime-Type+Post+AvatarOptions
+ +
+
+ + +EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// Attachments: Row +//=========================================================================== +function attach_row( $row ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << + + .{$row['atype_extension']} + {$row['atype_mimetype']} + {$row['apost_checked']} + {$row['aphoto_checked']} + Options + + +EOF; + +//--endhtml--// +return $IPBHTML; +} + + + +} + + ?> \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_bbcode_badword.php b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_bbcode_badword.php index 9d26f352..0031c8e5 100644 --- a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_bbcode_badword.php +++ b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_bbcode_badword.php @@ -1,170 +1,171 @@ - -
- - - - - -
Дополнительные BB-кодыОпции
- - - - - - - $content -
НазваниеТегОпции
- - -
- - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// BBCODE: Row -//=========================================================================== -function bbcode_row( $row ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << - {$row['bbcode_title']} - {$row['bbcode_fulltag']} - Опции - - -EOF; - -//--endhtml--// -return $IPBHTML; -} - - -//=========================================================================== -// BADWORD: Wrapper -//=========================================================================== -function badword_wrapper($content) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -
- - - - - -
Список фильтровОпции
- - - - - - - - $content -
СловоЗаменаМетодОпции
- -
-
-
Добавление нового фильтра
- - - - - - - - - - - - - -
СловоЗаменаМетод
- -

- - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// BADWORD: Row -//=========================================================================== -function badword_row( $row ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << - {$row['type']} - {$row['replace']} - {$row['method']} - Опции - - -EOF; - -//--endhtml--// -return $IPBHTML; -} - - -} - - + +
+ + + + + +
Your Custom BBCodesOptions
+ + + + + + + $content +
TitleTagOptions
+ + +
+ + +EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// BBCODE: Row +//=========================================================================== +function bbcode_row( $row ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << + {$row['bbcode_title']} + {$row['bbcode_fulltag']} + Options + + +EOF; + +//--endhtml--// +return $IPBHTML; +} + + +//=========================================================================== +// BADWORD: Wrapper +//=========================================================================== +function badword_wrapper($content) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +
+ + + + + +
Current FiltersOptions
+ + + + + + + + $content +
BeforeAfterMethodOptions
+ +
+
+
Add a new filter
+ + + + + + + + + + + + + +
BeforeAfterMethod
+ +

+ + +EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// BADWORD: Row +//=========================================================================== +function badword_row( $row ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << + {$row['type']} + {$row['replace']} + {$row['method']} + Options + + +EOF; + +//--endhtml--// +return $IPBHTML; +} + + +} + + ?> \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_components.php b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_components.php index 28203d2c..75477bcc 100644 --- a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_components.php +++ b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_components.php @@ -1,33 +1,33 @@ - -
Информация
-
- Эта секция создана для любых компонентов, таких как Invision Gallery, Invision Chat и Invision Blog. -
- - -EOF; - -//--endhtml--// -return $IPBHTML; -} - - - -} - + +
Invision Power Board Information
+
+ This section is reserved for any components, such as Invision Gallery, Invision Chat and Invision Blog +
+ + +EOF; + +//--endhtml--// +return $IPBHTML; +} + + + +} + ?> \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_dashboard.php b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_dashboard.php new file mode 100644 index 00000000..ad8dd2c8 --- /dev/null +++ b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_dashboard.php @@ -0,0 +1,1073 @@ + + Welcome to Invision Power Board + +
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ +
 
+
+
Tasks and Statistics
+ + + + + +
+ {$content['stats']} + +
+
Quick Actions
+ + + + + + + + + + + + + + + + +
+ Find/Edit Member ? +
+
+ Add New Member ? +
+ Edit a Forum ? +
+ IP Address Search ? +
+ Search System Settings ? +
+
+
+
+
 
+
+
Communication
+ + + + + +
+
+
ACP Notes
+
{$content['ad_notes']}
+
+
+ {$content['acp_online']} +
+
+
+
+ + + + + + + + {$content['validating']} +
+
Latest IPS News
+
+
+
+
+
+
+
+
Latest IPS Blogs
+
+
+
+
+
+
IP.Board Bulletin
+
+
+
+ +
+ + + + + + + + +EOF; + +if ( IN_DEV ) +{ +$IPBHTML .= << +
+
DEV Installer XML Exports
+
+ Components + · Log In Modules + · Groups + · Attachments + · Skins + · Tasks + · FAQ + · BBCode +
+
+EOF; +} + +//--endhtml--// +return $IPBHTML; +} + + +//=========================================================================== +// Index +//=========================================================================== +function acp_validating_wrapper($content) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +
Admin Validation Queue
+ {$content} +
+ MORE » +
+ +
+EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// Index +//=========================================================================== +function acp_validating_block( $data ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +
+ Yes  + No +
+
+ {$data['members_display_name']}{$data['_coppa']}
+   {$data['email']}
+ +
  Registered {$data['_entry']}
+
+ +EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// Index +//=========================================================================== +function warning_converter() { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= <<Simply remove convert/index.php from your installation to remove this message. +EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// Index +//=========================================================================== +function acp_notes($notes) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +
+ + +

+
+ +EOF; + +//--endhtml--// +return $IPBHTML; +} + + + +//=========================================================================== +// Index +//=========================================================================== +function acp_last_logins_row( $r ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << + + - + + + {$r['admin_username']} +
+ {$r['_admin_time']} +
+ + + - +
- + + +EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// Index +//=========================================================================== +function acp_last_logins_wrapper($content) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +
+
Latest ACP Log Ins
+ + $content +
+ +
+
+EOF; + +//--endhtml--// +return $IPBHTML; +} + + +//=========================================================================== +// Index +//=========================================================================== +function acp_onlineadmin_row( $r ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << + +
+ + + {$r['members_display_name']} +
Logged in: {$r['_log_in']}
+
IP: {$r['session_ip_address']}
+
Using: {$r['session_location']}
+
Last click: {$r['_click']}
+ + +EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// Index +//=========================================================================== +function acp_onlineadmin_wrapper($content) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +
Administrators Using ACP
+ + $content +
+ +EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// Index +//=========================================================================== +function acp_lastactions_row( $rowb ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << + + - + + + {$rowb['members_display_name']} +
IP: {$rowb['ip_address']}
+ + {$rowb['_ctime']} + +EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// Index +//=========================================================================== +function acp_lastactions_wrapper($content) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +
Last 5 ACP Actions
+ + + + + + + $content +
 Member NameTime of action
+
+ MORE » +
+ + +EOF; + +//--endhtml--// +return $IPBHTML; +} + + +//=========================================================================== +// Index +//=========================================================================== +function acp_stats_wrapper($content) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << + + + + + + + + + + + + + + + + + + +EOF; + +if( $this->ipsclass->vars['ipb_bruteforce_attempts'] > 0 ) +{ +$IPBHTML .= << + + + +EOF; +} + +$IPBHTML .= << + + + + + + + + + + + + + + + + + + + + + + + + +
IP.Board Version  (History){$content['ipb_version']} (ID: {$content['ipb_id']})
Members + Manage + ({$content['members']}) +
  |-Online Users + View Online List + ({$content['sessions']}) +
  |-Awaiting Validation + Manage + ({$content['validate']}) +
  |-Locked Accounts + Manage + ({$content['locked']}) +
  |-COPPA Accounts + Manage + ({$content['coppa']}) +
Topics + {$content['topics']} +
  |-Awaiting Moderation + {$content['topics_mod']} +
Posts + {$content['replies']} +
  |-Awaiting Moderation + {$content['posts_mod']} +
Uploads
Loading...
+ + + +EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// Index +//=========================================================================== +function acp_php_version_warning( $phpversion ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= <<Some sections of the ACP may not operate until you upgrade. +EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// Index +//=========================================================================== +function acp_ftext_warning( $a, $b ) { + +$IPBHTML = ""; +//--starthtml--// + +if( $a ) +{ +$IPBHTML .= <<
+ To create fulltext indexes please see this page (please note that you can submit a ticket for assistance) +

+EOF; +} + +if( $b ) +{ + $query = urlencode( 'Type of search to use' ); +$IPBHTML .= <<this setting if fulltext indexes have been created. +EOF; +} + +//--endhtml--// +return $IPBHTML; +} + + +//=========================================================================== +// Index +//=========================================================================== +function warning_box($title, $content) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +
$title
+ $content + +EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// Index +//=========================================================================== +function warning_unlocked_installer() { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= <<install/index.php from your server at once! +
Leaving it on your server WILL compromise the security of your system. +EOF; + +//--endhtml--// +return $IPBHTML; +} + + +//=========================================================================== +// Index +//=========================================================================== +function warning_upgrade() { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= <<here to complete. +EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// Index +//=========================================================================== +function warning_installer() { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= <<Simply remove install/index.php from your installation to remove this message. +EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// Index +//=========================================================================== +function warning_rebuild_emergency() { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +
  • They were asked to clear their skin settings
  • +
  • They were asked to click a link to attempt access in the ACP
  • +
  • The ACP picked up the skin error and rebuilt the skin ID cache, the default skin and it may have turned on safe mode skins
  • + + What to do now +
      +
    • Firstly, if you don't wish to use safe mode skins, check the CHMOD value of the 'skin_cache' directory to make sure IPB can write into that directory
    • +
    • If the permissions are correct, check your 'System Settings -> General Configuration' settings to check the value of 'Safe Mode Skins' - disable if not required
    • +
    • As a precaution, rebuild all your skins by following the link below
    • +
    + >> REBUILD ALL SKIN CACHES & REMOVE THIS WARNING << +EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// Index +//=========================================================================== +function warning_rebuild_upgrade() { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= <<
    >> REBUILD ALL SKIN CACHES & REMOVE THIS WARNING << +EOF; + +//--endhtml--// +return $IPBHTML; +} + +} + +?> \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_diagnostics.php b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_diagnostics.php index f77f085d..512c61ad 100644 --- a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_diagnostics.php +++ b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_diagnostics.php @@ -14,7 +14,7 @@ var all_queries = new Array(); function fix_all_dberrors() { - var url = ipb_var_base_url + 'section=help&act=diag&code=dbchecker'; + var url = ipb_var_base_url + '§ion=help&act=diag&code=dbchecker'; for( var i=0; i + {$r['upgrade_version_human']} ({$r['upgrade_version_id']}) + {$r['_date']} + +EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// Index +//=========================================================================== +function acp_version_history_wrapper($content) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +
    +
    Version History (Last 5)
    + + $content +
    +
    +
    +EOF; + +//--endhtml--// +return $IPBHTML; +} } diff --git a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_editors.php b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_editors.php index 5961ca64..f208a3d4 100644 --- a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_editors.php +++ b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_editors.php @@ -16,8 +16,9 @@ EOF; if ( $editor_id == 'ed-0' ) { $IPBHTML .= << - + + + @@ -141,13 +142,16 @@ $IPBHTML .= <<
     
    - Emoticons + Emoticons + +
    {$this->ipsclass->lang['js_rte_lite_img']}
    +
    {$this->ipsclass->lang['js_rte_lite_email']}
    diff --git a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_forums.php b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_forums.php index 02711258..53e8d717 100644 --- a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_forums.php +++ b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_forums.php @@ -25,7 +25,7 @@ $IPBHTML .= <<{$r['name']} $reorder - Опции   + Options   @@ -38,8 +38,8 @@ $IPBHTML .= << {$r['name']} - - Опции   + + Options   @@ -60,10 +60,10 @@ $IPBHTML .= << menu_build_menu( "menum-{$r['id']}", - new Array( img_add + " Создать форум", - img_edit + " Настройки", - img_delete + " Удалить", - img_view + " Настройки стиля" + new Array( img_add + " New Forum...", + img_edit + " Edit Settings...", + img_delete + " Delete Category...", + img_view + " Skin Options..." ) );
    @@ -112,24 +112,24 @@ var modshown = 0; function toggle_mod_settings() { var divs = document.getElementsByTagName('div'); - + for ( var i = 0 ; i <= divs.length ; i++ ) { var e = divs[i]; - + if ( e && e.id ) { var name = e.id; var mainname = name.replace( /^(.+?)-.+?$/ , "$1" ); - + if ( mainname == 'moddiv' ) { e.style.display = modshown ? 'none' : ''; } } } - - document.getElementById( 'togglemod' ).innerHTML = modshown ? 'Показать модераторские опции' : 'Скрыть модераторские опции'; + + document.getElementById( 'togglemod' ).innerHTML = modshown ? 'Show Moderator Options' : 'Hide Moderator Options'; modshown = modshown == 1 ? 0 : 1; } //]]> @@ -139,18 +139,18 @@ EOF; if ( $this->ipsclass->input['showall'] ) { $IPBHTML .= <<Показать иерархию форумов +Show Tiered EOF; } else { $IPBHTML .= <<Показать форумы без иерархии +Show All EOF; } $IPBHTML .= << - +
    EOF; @@ -172,8 +172,8 @@ $IPBHTML .= << menu_build_menu( "modmenu{$data['mid']}", - new Array( img_item + " Удалить", - img_item + " Изменить" + new Array( img_item + " Remove...", + img_item + " Edit..." ) ); EOF; @@ -197,33 +197,33 @@ $IPBHTML .= << @@ -231,9 +231,9 @@ function gomodform()
    - - +
    {$choose}  -    + {$choose}  +   
    @@ -245,11 +245,11 @@ function gomodform()
    - + - +
    Добавить модератора в выбранные форумы:Add a moderator to all checked forum(s): - имя пользователя или  группа {$mem_group} + Name OR Group {$mem_group}
    @@ -289,7 +289,7 @@ EOF; if ( ($r['skin_id'] != "") and ($r['skin_id'] > 0) ) { $IPBHTML .= <<[ Использует Стиль: {$skin} ] +
    [ Using Skin Set: {$skin} ] EOF; } @@ -300,24 +300,24 @@ EOF; if ( $r['_modstring'] != "" ) { $IPBHTML .= <<
    + EOF; } $IPBHTML .= << - Опции + Options EOF; @@ -338,8 +338,8 @@ $IPBHTML = ""; $IPBHTML .= << - Невозможно создать форум в этой категории.
    Он не будет отобржен на сайте в независимости от установленных прав доступа.
    - + You have not created any forums in this category yet.
    It will not be displayed on the site, regardless of permission settings, until it contains at least one forum.
    + EOF; @@ -351,7 +351,7 @@ return $IPBHTML; //=========================================================================== // Forum: Build Permissions //=========================================================================== -function render_forum_permissions( $global=array(), $content="", $title='Ограничения уровней доступа' ) { +function render_forum_permissions( $global=array(), $content="", $title='Permission Access Levels' ) { $IPBHTML = ""; //--starthtml--// @@ -373,19 +373,19 @@ function check_all( permtype ) for ( var i = 0 ; i <= checkboxes.length ; i++ ) { var e = checkboxes[i]; - + if ( e && (e.id != 'UPLOAD_ALL') && (e.id != 'DOWNLOAD_ALL') && (e.id != 'READ_ALL') && (e.id != 'REPLY_ALL') && (e.id != 'START_ALL') && (e.id != 'SHOW_ALL') && (e.type == 'checkbox') && (! e.disabled) ) { var s = e.id; var a = s.replace( /^(.+?)_.+?$/, "$1" ); - + if (a == permtype) { e.checked = true; } } } - + if ( document.getElementById( permtype + '_ALL' ).checked ) { document.getElementById( permtype + '_ALL' ).checked = false; @@ -394,7 +394,7 @@ function check_all( permtype ) { document.getElementById( permtype + '_ALL' ).checked = true; } - + return false; } @@ -406,27 +406,27 @@ function obj_checked( permtype, pid ) { var totalboxes = 0; var total_on = 0; - + if ( pid ) { document.getElementById( permtype+'_'+pid ).checked = document.getElementById( permtype+'_'+pid ).checked ? false : true; } - + var checkboxes = formobj.getElementsByTagName('input'); for ( var i = 0 ; i <= checkboxes.length ; i++ ) { var e = checkboxes[i]; - + if ( e && (e.id != 'UPLOAD_ALL') && (e.id != 'DOWNLOAD_ALL') && (e.id != 'READ_ALL') && (e.id != 'REPLY_ALL') && (e.id != 'START_ALL') && (e.id != 'SHOW_ALL') && (e.type == 'checkbox') && (! e.disabled) ) { var s = e.id; var a = s.replace( /^(.+?)_.+?$/, "$1" ); - + if ( a == permtype ) { totalboxes++; - + if ( e.checked ) { total_on++; @@ -434,7 +434,7 @@ function obj_checked( permtype, pid ) } } } - + if ( totalboxes == total_on ) { document.getElementById( permtype + '_ALL' ).checked = true; @@ -443,7 +443,7 @@ function obj_checked( permtype, pid ) { document.getElementById( permtype + '_ALL' ).checked = false; } - + return false; } @@ -458,12 +458,12 @@ function checkcol( permtype ,status) for ( var i = 0 ; i <= checkboxes.length ; i++ ) { var e = checkboxes[i]; - + if ( e && (e.id != 'UPLOAD_ALL') && (e.id != 'DOWNLOAD_ALL') && (e.id != 'READ_ALL') && (e.id != 'REPLY_ALL') && (e.id != 'START_ALL') && (e.id != 'SHOW_ALL') && (e.type == 'checkbox') && (! e.disabled) ) { var s = e.id; var a = s.replace( /^(.+?)_.+?$/, "$1" ); - + if ( a == permtype ) { if ( status == 1 ) @@ -479,7 +479,7 @@ function checkcol( permtype ,status) } } } - + return false; } @@ -497,9 +497,9 @@ function toggle_box( compiled_permid ) { document.getElementById( compiled_permid ).checked = true; } - + obj_checked( compiled_permid.replace( /^(.+?)_.+?$/, "$1" ) , ''); - + return false; } @@ -514,12 +514,12 @@ function init_perms() for ( var i = 0 ; i <= tds.length ; i++ ) { var thisobj = tds[i]; - + if ( thisobj && thisobj.id ) { var name = thisobj.id; var firstpart = name.replace( /^(.+?)_.+?$/, "$1" ); - + if ( firstpart == 'clickable' ) { try @@ -545,70 +545,70 @@ function checkrow( permid, status ) { document.getElementById( "READ" + '_' + permid ).checked = status ? true : false; } - + if( document.getElementById( "REPLY" + '_' + permid ) != null ) { document.getElementById( "REPLY" + '_' + permid ).checked = status ? true : false; } - + if( document.getElementById( "START" + '_' + permid ) != null ) { document.getElementById( "START" + '_' + permid ).checked = status ? true : false; } - + if( document.getElementById( "UPLOAD" + '_' + permid ) != null ) { document.getElementById( "UPLOAD" + '_' + permid ).checked = status ? true : false; } - + if( document.getElementById( "DOWNLOAD" + '_' + permid ) != null ) { document.getElementById( "DOWNLOAD" + '_' + permid ).checked = status ? true : false; } - + if( document.getElementById( "SHOW" + '_' + permid ) != null ) { document.getElementById( "SHOW" + '_' + permid ).checked = status ? true : false; } - - + + obj_checked("READ"); obj_checked("REPLY"); obj_checked("START"); obj_checked("UPLOAD"); obj_checked("DOWNLOAD"); obj_checked("SHOW"); - + return false; } //]]> - +
    {$title}
    - - - - - - + + + + + + - +
     Просмотр форумаЧтение темОтвет в темыСоздание темЗагрузка файловСкачивание файловShow ForumRead TopicsReply TopicsStart TopicsUploadDownload
    - Глобальные настройки доступа (Все текущие и будущие маски доступа) + Global Permissions (All current and future permission sets) - - - - - - + + + + + +
     
    Просмотр форума
    {$global['html_show']}
    Чтение тем
    {$global['html_read']}
    Ответ в темы
    {$global['html_reply']}
    Создание тем
    {$global['html_start']}
    Загрузка файлов
    {$global['html_upload']}
    Скачивание файлов
    {$global['html_download']}
    Show Forum
    {$global['html_show']}
    Read Topics
    {$global['html_read']}
    Reply Topics
    {$global['html_reply']}
    Start Topics
    {$global['html_start']}
    Upload
    {$global['html_upload']}
    Download
    {$global['html_download']}
    @@ -623,7 +623,7 @@ function checkrow( permid, status )
     
     
     
    + +
    $title
     
    - + - + - + - + - + - + - - - - - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Groups -//=========================================================================== -function groups_perm_splash_wrapper($content, $dlist) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -
    Информация
    -
    - Используется группами — указывает на группы пользователей, использующие данную маску доступа. -
    Используется пользователями — указывает количество пользователей, использующих данную маску доступа. -
    Просмотр дает возможность протестировать данную маску доступа. -
    - -
    -
    -
    Маски доступа к форумам
    -
    - Основные настройки + Basic Settings - + EOF; @@ -745,150 +752,150 @@ if( $form['addnew_type'] != 'category' ) { $IPBHTML .= << - + - + - + - + - +
    Название {$form['addnew_type_upper']}{$form['addnew_type_upper']} Name {$form['name']}
    Описание
    HTML разрешен.
    Переносы строк автоматически заменяются на <br>.
    Forum Description
    You may use HTML - linebreaks automatically converted to <br>
    {$form['description']}
    Выберите родительский форум или категориюForum Parent {$form['parent_id']}
    Состояние форумаForum State {$form['status']}
    Это обычный форум (не категория)?
    Если вы выберите «Да», то форум будет обычным, в нем будут разрешено открытие тем, публикация сообщений (если это разрешено).

    Если выберите «Нет», то форум будет категорией, в нем будут запрещено открытие тем и публикация сообщений, соответственно, все нижеследующие настройки не будут иметь силы.
    Treat this forum as a category?
    If this is set to 'Yes' previously posted topics will not display, and posting in this forum will not be allowed. Users will only be allowed to view the subforums under this forum. If this is set to yes, the rest of the settings will have no effect.
    {$form['sub_can_post']}
    - Настройки переадресации + Forum Redirect Settings - + - + - +
    URL адрес для перемещенияRedirection URL {$form['redirect_url']}
    Переключить форум на перемещение?
    При выборе «Да» нижеследующие блоки настроек не будут иметь силы, так как форум станет лишь ссылкой. Уже существующие темы в форуме будут недоступны!
    Enable URL redirection
    If 'yes' you can skip the rest of this form as the settings will have no effect and this forum will act like as a redirect link. Current posts will not be accessible when enabled.
    {$form['redirect_on']}
    Количество нажатий на ссылку (перемещений)Number of redirect clicks {$form['redirect_hits']}
    - Настройки доступа + Permission Settings - + - +
    Разрешить пользователям видеть названия тем в списке, но запретить им просмотр содержимого этих тем?
    При выборе «Да» пользователи смогут видеть только список названий тем, но не смогут в них войти.
    Allow members who can see the forum but cannot read topics to see the topic list
    If yes, the member will be able to see the topic titles but will not be able to read the topic posts when clicked.
    {$form['permission_showtopic']}
    Специальное сообщение, выводимое пользователям при попытке зайти в тему (если включен пункт выше)
    HTML разрешен.
    Переносы строк автоматически заменяются на тег <br>.
    Если оставить это поле пустым, то (при включенном пункте выше, конечно) пользователям, пытающимся зайти в тему будет выводиться стандартное сообщение форума.
    Custom 'Permission Denied' Message
    You may use HTML - linebreaks automatically converted to <br>.
    If left blank, a default 'permission denied' error is used.
    {$form['permission_custom_error']}
    - Настройки сообщений + Postable Forum Settings: Options - + - + - + - + - + - + - +
    Разрешить использование HTML (если разрешает маска доступа группы)?
    Данная опция включит выполнение HTML тегов в публикуемых сообщениях.
    Enable HTML Posting (where allowed)
    This will allow HTML to be posted and executed.
    {$form['use_html']}
    Разрешить использование BB-кодов?Enable BBCode Posting {$form['use_ibc']}
    Включить форму быстрого ответа для этого форума?Enable Quick Reply {$form['quick_reply']}
    Разрешить создание голосований (если это разрешено группе)?Enable Polls (per user group option) {$form['allow_poll']}
    Разрешить поднятие тем в списке при новых голосах?
    Если включено, то новый голос в опросе поднимет соответствующую тему наверх списка тем (когда сортировка идет по дате).
    Enable Poll Bump
    If enabled, a poll vote will move the topic to the top of the list when sorted by date.
    {$form['allow_pollbump']}
    Включить рейтинг тем (если это разрешено группе)Enable Topic Rating (per user group option) {$form['forum_allow_rating']}
    Включить счетчик сообщений пользователей?
    Если это пункт отключить, то за каждое сообщение, оставленное пользователем, его счетчик сообщений не будет увеличиваться!
    Enable Post Count Incrementation
    If enabled, posts in this forum increase member's cumulative post count.
    {$form['inc_postcount']}
    - Настройки модерации + Postable Forum Settings: Moderation - + - + - + - + - +
    Проверять сообщения модератором перед публикацией?
    Если этот пункт включить, то каждое публикуемое сообщение должно будет пройти проверку модератором перед непосредственной публикацией на форум.
    Enable Posting Moderation
    Requires a moderator to manually add posts/topics to the forum.
    {$form['preview_posts']}
    Укажите e-mail адреса, куда будут отправляться уведомления при появлении новых тем?
    (Оставьте поле пустым, если вам не требуются уведомления).
    Разделяйте запятой (пример: ivanov@mail.ru, petrov@mail.ru).
    Email addresses to send new topic awaiting approval notification
    This can be left blank
    {$form['notify_modq_emails']}
    Требовать пароль при заходе на форум?
    Вы можете заблокировать форум и пускать на него только по паролю
    Вы можете оставить поле пустым, чтобы не использовать пароль вообще.
    Если это категория — данный пункт не будет работать.
    Forum Password
    Leave this box empty if you do not require this.
    {$form['password']}
    Освобожденные группы
    Если у вас включен ввод пароля, то вы можете выбрать группы, которые смогут просматривать этот форум без ввода пароля.
    Exempt Groups
    If you require a password to access this forum, you can select groups who will not need to enter the password in.
    {$form['password_override']}
    - Настройки сортировки + Postable Forum Settings: Sorting and Ordering - + - + - + - +
    По умолчанию выводить темы заDefault date cut off for topic display {$form['prune']}
    По умолчанию сортировать поDefault sort key {$form['sort_key']}
    Порядок сортировки по умолчаниюDefault sort order {$form['sort_order']}
    Фильтр сортировки по умолчаниюDefault sort filter {$form['topicfilter']}
    @@ -924,7 +931,7 @@ EOF; } $IPBHTML .= << -
    +
    {$form['convert_button']}
    EOF; @@ -937,7 +944,7 @@ return $IPBHTML; //=========================================================================== // Forum: Build Permissions //=========================================================================== -function render_cat_permissions( $data=array(), $select_all='', $title='Настройки доступа' ) { +function render_cat_permissions( $data=array(), $select_all='', $title='Permission Access Levels' ) { $IPBHTML = ""; //--starthtml--// @@ -953,7 +960,7 @@ function perm_check( obj ) var real_obj = document.getElementById( obj ); var total_options = real_obj.options.length; var total_checked = 0; - + for( var i = 0 ; i < real_obj.options.length ; i++ ) { if ( real_obj.options[i].selected ) @@ -961,7 +968,7 @@ function perm_check( obj ) total_checked++; } } - + if ( total_checked == total_options ) { document.getElementById( 'show_all' ).checked = true; @@ -976,33 +983,33 @@ function perm_check_all( obj ) { var real_obj = document.getElementById( obj ); var isselected = document.getElementById( 'show_all').checked ? true : false; - + for( var i = 0 ; i < real_obj.options.length ; i++ ) { real_obj.options[i].selected = isselected; } - + document.getElementById( 'show_all').checked = isselected; } //]]> - +
    {$title}
    - +
    Показать категориюShow Category
    - Права доступа + Show Permissions - + - +
    Просмотр категорииShow Forum - Выбрать все текущие и будущие маски + Select All Current and Future Sets
    diff --git a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_global.php b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_global.php index e086ea0e..488329f4 100644 --- a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_global.php +++ b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_global.php @@ -14,7 +14,7 @@ $IPBHTML = ""; //--starthtml--// $IPBHTML .= << + IPB @@ -49,9 +49,9 @@ $IPBHTML .= << - + - + $content EOF; @@ -513,13 +554,13 @@ $IPBHTML .= <<
    IPB
    -
    Переадресация....
    +
    Redirecting....
    @@ -561,7 +602,7 @@ $IPBHTML .= <<
    IPB
    -
    Операция завершена
    +
    Function Complete
    {$text} @@ -607,9 +648,9 @@ $IPBHTML .= <<
    -
    Переадресация...
    +
    Page Redirecting...

    -
    Сейчас вы будете автоматически переадресованы.
    +
    Please stand-by as we redirect you.
    @@ -622,7 +663,7 @@ $IPBHTML .= <<{$text}

    - ( нажмите сюда, если не хотите ждать... ) + ( Click here if you do not wish to wait )
    @@ -652,10 +693,10 @@ $IPBHTML = ""; //--starthtml--// $IPBHTML .= << + - + <%TITLE%> @@ -833,7 +874,7 @@ $IPBHTML .= << - +
    @@ -880,15 +921,15 @@ $IPBHTML = ""; $IPBHTML .= << -
    Быстрый переход
    -
    Invision Power Board © $date IPS, Inc.
    +
    Quick Jump
    +
    @@ -897,7 +938,7 @@ EOF; //--endhtml--// return $IPBHTML; } - + //=========================================================================== // GLOBAL MAIN ACP HEADER //=========================================================================== @@ -908,10 +949,10 @@ $IPBHTML = ""; //--starthtml--// $IPBHTML .= << + - + <%TITLE%> @@ -956,8 +997,8 @@ $IPBHTML .= <<
    @@ -991,9 +1032,9 @@ css_mainwrap = 'popupmenu-pagelinks'; menu_build_menu( pgjmp.id, - "
    {$this->ipsclass->lang['global_page_jump']}
    ", + "
    {$this->ipsclass->lang['global_page_jump']}
    ", 1 ); - + css_mainwrap = 'popupmenu'; //]]> @@ -1060,7 +1101,7 @@ $IPBHTML = ""; $IPBHTML .= <<> + > EOF; //--endhtml--// @@ -1092,7 +1133,7 @@ $IPBHTML = ""; $IPBHTML .= <<< +< EOF; //--endhtml--// @@ -1115,7 +1156,7 @@ EOF; return $IPBHTML; } - + } ?> \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_groups.php b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_groups.php index baf15298..3f022e78 100644 --- a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_groups.php +++ b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_groups.php @@ -1,425 +1,417 @@ - -
    Список групп пользователей
    - - - - - - - - - {$content} -
    Название группыДоступ в АЦСупермодераторПользователей 
    - -
    -
    - -
    -
    Создать группу пользователей
    - - - - - - - - -
    Основанную на{$form['_new_dd']}
    -
    -
    -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Groups -//=========================================================================== -function groups_overview_wrapper_row( $r="" ) { -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -
    -EOF; -if ( $r['g_id'] != $this->ipsclass->vars['auth_group'] and $r['g_id'] != $this->ipsclass->vars['guest_group'] ) -{ -$IPBHTML .= <<ipsclass->vars['php_ext']}?act=Members&max_results=30&showall=1&filter={$r['g_id']}&sort_order=asc&sort_key=members_display_name&st=0' target='_blank' title='Список пользователей'>{$r['_title']} -EOF; -} -else -{ -$IPBHTML .= << - --{$r['count']}Опции
    - - - - - - - {$content} -
    Название маскиИспользуется группамиИспользуется пользователями 
    - -
    -
    -
    - -
    -
    Создание новой маски доступа
    - - - - - - - - - -
    Название
    Наследовать права из маски:
    -
    -
    -
    -EOF; - -//--endhtml--// -return $IPBHTML; -} - - -//=========================================================================== -// Groups -//=========================================================================== -function groups_perm_splash_row( $r="" ) { -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << - {$r['name']} - {$r['groups']} - -EOF; -if ( $r['mems'] > 0 ) -{ -$IPBHTML .= <<Просмотреть) -EOF; -} -else -{ -$IPBHTML .= << - Опции - - -EOF; - -//--endhtml--// -return $IPBHTML; -} - - -function permissions_js() -{ -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -// - - -EOF; - -return $IPBHTML; -} - - - -} - + +
    User Group Management
    + + + + + + + + + {$content} +
    Group TitleCan Access ACPIs Super ModMembers 
    +
    +
    +
    + +
    +
    Create a User Group
    + + + + + + + + +
    Base new group on...{$form['_new_dd']}
    +
    +
    +EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// Groups +//=========================================================================== +function groups_overview_wrapper_row( $r="" ) { +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << + +EOF; +if ( $r['g_id'] != $this->ipsclass->vars['auth_group'] and $r['g_id'] != $this->ipsclass->vars['guest_group'] ) +{ +$IPBHTML .= <<ipsclass->vars['php_ext']}?act=Members&max_results=30&showall=1&filter={$r['g_id']}&sort_order=asc&sort_key=members_display_name&st=0' target='_blank' title='List Users'>{$r['_title']} +EOF; +} +else +{ +$IPBHTML .= << + - + - + {$r['count']} + Options + + +EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// Groups +//=========================================================================== +function groups_perm_splash_wrapper($content, $dlist) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +
    Forum Permission Sets
    + + + + + + + + {$content} +
    NameUsed by Group(s)Used by Member(s) 
    + +
    +
    +
    + +
    +
    Create a new permission set
    + + + + + + + + + +
    Permission Set Name
    Base this permission set on which existing set...
    +
    +
    +
    +EOF; + +//--endhtml--// +return $IPBHTML; +} + + +//=========================================================================== +// Groups +//=========================================================================== +function groups_perm_splash_row( $r="" ) { +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << + {$r['name']} + {$r['groups']} + +EOF; +if ( $r['mems'] > 0 ) +{ +$IPBHTML .= <<View) +EOF; +} +else +{ +$IPBHTML .= << + Options + + +EOF; + +//--endhtml--// +return $IPBHTML; +} + + +function permissions_js() +{ +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +// + + +EOF; + +return $IPBHTML; +} + + + +} + ?> \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_index.php b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_index.php deleted file mode 100644 index ed39fed3..00000000 --- a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_index.php +++ /dev/null @@ -1,803 +0,0 @@ - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Index -//=========================================================================== -function acp_licensed() { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -
    Invision Power Board
    -
    - -
    - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Index -//=========================================================================== -function warning_converter() { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << - -
    - Внимание: обнаружена система для конвертирования форумов -

    Мы рекомендуем удалить систему конвертирования в целях безопасности. -
    Удалите файл convert/index.php и это сообщение больше не будет отображаться.
    - - - -  - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Index -//=========================================================================== -function acp_unlicensed() { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -
    Незарегистрированная версия Invision Power Board
    -
    - -
    Данная версия Invision Power Board не зарегистрирована. -
    Узнать подробнее о регистрации можно здесь! -
    - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Index -//=========================================================================== -function acp_ips_news($news_url) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -
    Последние новости компании IBResource
    -
    -
    - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Index -//=========================================================================== -function acp_notes($notes) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << - - -

    - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Index -//=========================================================================== -function acp_board_offline() { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << - -
    -
    Форум выключен
    -
    Ваш форум в данный момент выключен

    » Включить форум
    -
    - - - -   - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Index -//=========================================================================== -function acp_quick_clicks() { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -//ipsclass->adskin->base_url}' + '§ion=content&act=forum&code=new&name=' + escape(document.getElementById('DOIT1').forum_name.value); - } - } - - function phplookup() - { - if (document.getElementById('DOIT2').phpfunc.value == "") - { - alert("Вы должны ввести название функции PHP!"); - return false; - } - else - { - window.location = 'http://www.php.net/' + escape(document.getElementById('DOIT2').phpfunc.value); - } - } -//]]> - - - -
    -
    Быстрые действия
    - - - - - - - - - - - - - -
    Редактирование пользователя
    Создание форума
    Помощь по PHP-функциям
    -
    - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Index -//=========================================================================== -function acp_version_history_row( $r ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << - {$r['upgrade_version_human']} ({$r['upgrade_version_id']}) - {$r['_date']} - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Index -//=========================================================================== -function acp_version_history_wrapper($content) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -
    История обновлений (последние 5)
    - - $content -
    - - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Index -//=========================================================================== -function acp_last_logins_row( $r ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << - - - - - - {$r['admin_username']} -
    IP: {$r['admin_ip_address']}
    - - {$r['_admin_time']} - - - - - - - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Index -//=========================================================================== -function acp_last_logins_wrapper($content) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -
    Последние 5 попыток авторизации в АЦ
    - - - - - - - - - $content -
     ИмяВремяСтатус 
    - - - -EOF; - -//--endhtml--// -return $IPBHTML; -} - - -//=========================================================================== -// Index -//=========================================================================== -function acp_onlineadmin_row( $r ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << - {$r['members_display_name']} - {$r['session_ip_address']} - {$r['_log_in']} - {$r['_click']} - {$r['session_location']} - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Index -//=========================================================================== -function acp_onlineadmin_wrapper($content) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -
    Администраторы, находящиеся в АЦ
    - - - - - - - - - $content -
    ИмяIP-адресВошелПоследнее действиеСтраница
    - - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Index -//=========================================================================== -function acp_lastactions_row( $rowb ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << - - - - - - {$rowb['members_display_name']} -
    IP: {$rowb['ip_address']}
    - - {$rowb['_ctime']} - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Index -//=========================================================================== -function acp_lastactions_wrapper($content) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -
    Последние 5 действий в АЦ
    - - - - - - - $content -
     ИмяВремя
    - - - - -EOF; - -//--endhtml--// -return $IPBHTML; -} - - -//=========================================================================== -// Index -//=========================================================================== -function acp_stats_wrapper($content) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Версия IPB{$content['ipb_version']} (ID: {$content['ipb_id']})
    Версия SQL{$content['sql_driver']} ({$content['sql_version']})
    Версия PHP{$content['php_version']} ({$content['php_sapi']}) ( PHP INFO )
    Статистика форумаТем: {$content['topics']}
    Сообщений: {$content['replies']}
    ПользователейЗарегистрированных: {$content['members']} -
    Ожидающих активации: {$content['validate']} -EOF; - -if( $this->ipsclass->vars['ipb_bruteforce_attempts'] > 0 ) -{ -$IPBHTML .= <<Заблокированных: {$content['locked']} -EOF; -} - -$IPBHTML .= <<COPPA Pending: {$content['coppa']}--> -
    Размер директории загрузок
    Подсчет
    - - - - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Index -//=========================================================================== -function acp_php_version_warning( $phpversion ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << - -
    - ВНИМАНИЕ: Версия PHP на сервере ($phpversion) не соответствует требованиям. -

    Для работы Invision Power Board требуется как минимум PHP версии 4.3.0.
    Некоторые разделы админцентра могут не работать или работать не верно, пока вы не обновите PHP на более новую версию.
    - - - -   - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Index -//=========================================================================== -function warning_unlocked_installer() { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << - -
    - ВНИМАНИЕ: Обнаружен незаблокированный скрипт установки форума -

    Удалите файл install/index.php с сервера! -
    Оставив этот файл на сервере, вы МОЖЕТЕ поставить под угрозу безопасность форума.
    - - - -   - -EOF; - -//--endhtml--// -return $IPBHTML; -} - - -//=========================================================================== -// Index -//=========================================================================== -function warning_upgrade() { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << - -
    - ВНИМАНИЕ: Обнаружено незавершенное обновление -

    IPB обноружил обновление, которое не было закончено. Нажмите здесь для завершения этого обновления.
    - - - -   - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Index -//=========================================================================== -function warning_installer() { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << - -
    - ВНИМАНИЕ: Скрипт установки форума все еще не удален! -

    Скрипт установки форума заблокирован (пока файл install.lock не будет удален — установка форума невозможна), но присутствует на сервере, мы рекомендуем удалить его для повышения безопасности вашего форума! -
    Для удаления скрипта установки достаточно удалить файл /install/index.php, и этого предупреждения вы больше не увидите.
    - - - -   - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Index -//=========================================================================== -function warning_rebuild_emergency() { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << - -
    - Внимание: Ошибка стиля -

    - У некоторых пользователей появилась проблема со стилями. Это могло произойти автоматически по следующим причинам: -
      -
    • Они пробовали очистить настройки стиля.
    • -
    • Они попытались получить доступ к админцентру форума.
    • -
    • Админцентр пропустил ошибку стиля и обновил стиль с этой ошибкой и, возможно, именно это включило безопасный режим стилей.
    • -
    - Что теперь можно и нужно сделать: -
      -
    • Если вы не хотите использовать безопасный режим стилей, проверьте права доступа (CHMOD) к директории /skin_cache/, чтобы убедиться в возможности записи туда файлов с шаблонами.
    • -
    • If the permissions are correct, check your 'System Settings -> General Configuration' settings to check the value of 'Safe Mode Skins' - disable if not required
    • -
    • И попробуйте обновить все кеши стилей, пройдя по ссылке ниже.
    • -
    - >> ОБНОВИТЬ ВСЕ КЕШИ ШАБЛОНОВ И УДАЛИТЬ ЭТО ПРЕДУПРЕЖДЕНИЕ << -
    - - - -   - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Index -//=========================================================================== -function warning_rebuild_upgrade() { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << - -
    - Система определила, что было выполнено обновление форума -

    - Вам необходимо обновить все кеши стилей форума для проверки того, что все новые записи в шаблонах добавлены правильно. -

    >> ОБНОВИТЬ ВСЕ КЕШИ ШАБЛОНОВ И УДАЛИТЬ ЭТО ПРЕДУПРЕЖДЕНИЕ << -
    - - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -//=========================================================================== -// Index http://www.invisionboard.com/acp-ipb/getnews.php -//=========================================================================== -function acp_main_template($content) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {$content['reg_html']} {$content['latest_news']}
     
    {$content['stats']} 
    Заметки

    {$content['ad_notes']}
     
    {$content['quick_clicks']} {$content['version_history']}
     
    -{$content['acp_online']} -
    - - - - - - -
    - -   - -
    -EOF; - -if ( IN_DEV ) -{ -$IPBHTML .= << -
    -
    Режим разработчика: экспорт данных
    - -
    -EOF; -} - -//--endhtml--// -return $IPBHTML; -} - -} - -?> \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_lookandfeel.php b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_lookandfeel.php index 12874678..ae8aec80 100644 --- a/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_lookandfeel.php +++ b/upload/skin_acp/IPB2_Standard/acp_skin_html/cp_skin_lookandfeel.php @@ -5,6 +5,46 @@ class cp_skin_lookandfeel { var $ipsclass; +//=========================================================================== +// LOOK AND FEEL: SKIN DIFF +//=========================================================================== +function skin_cache_settings( $form, $template ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +
    +
    + + + + + +
    Cache Settings: {$template['func_name']} +   +
    +
    + + + + + + + + + +
    Primary Cache File
    The primary cache file for this template bit
    {$form['_title']}
    Secondary Cache File(s)
    Select one or more secondary cache files for this template bit
    {$form['group_names_secondary']}
    +
    +
    + +EOF; + +//--endhtml--// +return $IPBHTML; +} + //=========================================================================== // LOOK AND FEEL: TEMPLATES //=========================================================================== @@ -35,7 +75,7 @@ $IPBHTML .= <<
    - Группа шаблонов + Template Group {$folder_blob} {$group['easy_name']}
    @@ -55,16 +95,16 @@ $IPBHTML = ""; //--starthtml--// $IPBHTML .= << +
    $remove_button - Предпросмотр в виде текста - Предпросмотр в виде HTML  + Text Preview + HTML Preview 
    - Шаблон + Template {$altered_image} - {$sec['easy_name']} + {$sec['easy_name']} {$custom_bit}
    @@ -86,8 +126,8 @@ $IPBHTML .= <<
    {$group['easy_name']}
    - Закрыть  - + Close  +
    @@ -96,7 +136,7 @@ $IPBHTML .= <<
    $add_button
    -
    ipsclass->input['p']}&group_name={$group['group_name']}&type=multiple")' class='realbutton' value='Изменить выбранное' />
    +
    ipsclass->input['p']}&group_name={$group['group_name']}&type=multiple")' class='realbutton' value='Edit Selected' />
    @@ -135,7 +175,7 @@ $javascript @@ -150,7 +190,7 @@ $javascript $content - + @@ -161,10 +201,10 @@ $javascript

    -
    Информация:
    -+ Изменен от начального варианта шаблона. -
    - Не изменен от начального варианта шаблона. -
    | Унаследованный от начального варианта шаблона. +
    Child skin set pop-up menu legend:
    ++ This item has been customized for this skin set. +
    - This item has not been customized from the master skin set. +
    | This item has inherited customizations from the parent skin set.
    + + +
    +
    +
    General Settings
    +
    +
    $title
    +
    +
    + + + + +
    +
    + General Settings + + + + + + + + + + + + + + + + + +
    Title
    The title is for your information only so you can distinguish between items.
    {$form['map_title']}
    Type
    "Contains" will match the string entered below if it occurs anywhere in the query string. "Is Exactly" will look to match the string entered below with the entire query string.
    {$form['map_match_type']}
    URL
    Enter the string to match in the query string.
    {$form['map_url']}
    Skin Set
    Which skin set to map to.
    +
    +
    +
    +
    +
    +
    Save $button
    +
    +
    +
    +
    + +EOF; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// LOOK AND FEEL: SKIN REMAP: MAIN +//=========================================================================== +function skin_remap_overview($remaps=array()) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +
    +
    + + + + +
    Skin Remapping
    +
    + + + + + + +EOF; +if ( count( $remaps ) ) +{ + foreach( $remaps as $data ) + { +$IPBHTML .= << + + + + + + + +EOF; + } +} +else +{ +$IPBHTML .= << + + +EOF; +} +$IPBHTML .= << +
     
    + + +EOF; + +//--endhtml--// +return $IPBHTML; +} + + //=========================================================================== // LOOK AND FEEL: SKIN DIFF: MAIN //=========================================================================== @@ -329,14 +530,14 @@ $IPBHTML .= <<
     TitleSkin Set + AddedOptions +
    {$data['map_title']}{$data['_name']}{$data['_date']}Options
    There are no skin set URL remappings set up currently.
    - +
    Отчет сравнения стилейSkin Differences Reports
    - - + $content @@ -347,22 +548,22 @@ $IPBHTML .= <<
    -
    Создать новый отчет сравнения стилей
    +
    Create New Skin Difference Report
    НазваниеСоздано + Difference TitleCreated  
    - + - + - +
    Введите название
    Это название будет использовано в списке выше, когда сравнение будет завершено
    Enter a new skin difference title
    This title can be anything and will be used in the list above when the comparison is completed
    Пропускать все новые/ошибочные шаблоны?
    Если вы сравниваете старый ipb_templates.xml из более старого IPB, вы можете отключить этот пункт. Если вы сравниваете с XML файлом из измененного стиля, вы должны включить этот пункт.
    Skip all new/missing template bits?
    If you are comparing an old ipb_templates.xml file from an older IPB release, then you may wish to disable this. If you are comparing an XML file from a customized skin set, you should enable this.
    Выберите корректный файл «ipb_templates.xml».
    Будет произведено сравнение с HTML шаблонами главного стиля
    Select a valid XML skin export file from your computer.
    This will be compared against your master HTML templates - so make sure they're up-to-date before running this tool
    -
    +
    EOF; @@ -383,15 +584,15 @@ $IPBHTML .= << {$data['diff_session_title']} {$data['_date']} - Опции + Options EOF; @@ -415,7 +616,7 @@ $IPBHTML .= << - + @@ -424,14 +625,14 @@ $IPBHTML .= <<
    Сравнение стилейSkin Differences  
    - - + $content
    Название шаблонаРазличия - Размер + Template Bit NameDifference + Size  
    -
    $missing новых шаблонов и $changed измененных
    +
    $missing new template bits and $changed changed template bits
    EOF; @@ -473,13 +674,13 @@ $IPBHTML .= << {$diff_is} {$template_bit_size} - Опции + Options EOF; @@ -501,7 +702,7 @@ $IPBHTML .= <<
    - Удален HTML код · Добавлен HTML код + Removed HTML · Added HTML
    EOF; @@ -525,7 +726,7 @@ $IPBHTML .= <<
    - Удален HTML код · Добавлен HTML код + Removed HTML · Added HTML
    EOF; @@ -566,7 +767,6 @@ $IPBHTML = ""; $IPBHTML .= << - $title export
    Простой генератор CSS

    Этот генератор позволяет легко настраивать и создавать пункты CSS таблиц стилей. Он не содержит все CSS пункты — только самые часто используемые.

    Название пункта CSS?
    Названиe шрифта (несколько шрифтов разделяйте запятой)
    Размер шрифта  
    Вес шрифта
    Цвет
    Цвет фона
    Граница Вес (в пикселях, или оставьте пустым)  Цвет 
    Межстрочный интервал  
    Расстояние между буквами  пунктов



    Когда ваш CSS пункт будет готов, он будет показан ниже.
    \ No newline at end of file + CSS Generator
    Simple CSS Generator

    This is designed to generate a simple CSS definition. It does not contain all the CSS attributes, just the most commonly used ones.

    CSS ID Definition name?
    Font name (separate many with a comma)
    Font size  
    Font Weight
    Font Colour
    Background Colour
    Border... Weight (in pixels or leave blank)  Colour
    Line Spacing  
    Letter Spacing  point



    Your CSS will appear below once generated.
    \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/images/about.png b/upload/skin_acp/IPB2_Standard/images/about.png new file mode 100644 index 0000000000000000000000000000000000000000..ba44a7923b057e75adc4fe65963f2f7fd3e8a74c GIT binary patch literal 875 zcmV-x1C;!UP)WdKBJATc%|L}hv)GB7YRATc*OFf=+cHXti7F)%P-HZAS|000McNliru z)CUI$8z*R^KY0KE010qNS#tmY3h)2`3h)6!tTdPa000DMK}|sb0I`n?{9y$E00P5F zL_t(|+J%x|NK?wy%!&OMYPj8UU}(2QX|1Vs{o(5p=PgAhHGKG>7=;EOLI z1`;T~q#2>88JH2eAVdk*^1)0kQ*(}OY`b&IX}Y`Z?sR_h&U}zM@VS3}obS2kocmRQ z63xw@H8z{x9*-w$jYeGs&#U#xWD;VrtzRCG$L06?hx_^-54+v#F-lLt!B||B&Q4B> zU%cKOJS?`i5oc!n*xug%wWj9o6_OkwR2lKqRP@yJ^hPk7oK7R|#$|-c9)ycM7>OW; z!-#%AqR)re(J>G#EwxpX^jN0I=;+VasnnjB-Luc*u3!dCA_fA89uMNm3gX%tVqIPR z7>R9!PEGSxa~wcAO@q;7auQ%8mW1Ob9V`TPGVko1K`Vir9DuU2%F86aKvOu3l?H$S8xrp<*seJ;#~5Uv+;pwf^cv<59L4@c(b z=S21ci4{(g5{dEg0hc6kk|_SR$Z2ifoij(_Q7I1(EE>2*;>}$EEp_O0I?~{Xzn_>T zq=SZ}CZT|^5?2Yk!BEi9+xrH+Uc|PxuDHQqcuwaHggNU(&4B{U-%)~j-AC}XwYTq? z%~lv3e3t0ydh#k7jfRvjM+k&{KOYjUtxsi literal 0 HcmV?d00001 diff --git a/upload/skin_acp/IPB2_Standard/images/acp-login-logo.gif b/upload/skin_acp/IPB2_Standard/images/acp-login-logo.gif index 609c15a336411a713c0ad3a5be378a7ce617d6fb..cec06bcc55fd89502b165df788e4c7f237fed223 100644 GIT binary patch literal 3394 zcmeH{`#;l*Ol1s;>kkr}eA)=1cspFDU$TsvTQ#y1?ZF8Fr#}H<2 zBUY}tU!%>fxzGKQ%iJ%y%q1l3dp>`{_xJDX_t!7a$K(0DYGY-3!Ho}`2X$p3z?2GP(18e`ogx`;nHK z;9`Sdc58cYU}7~WwRL=UeRF&7@bGYd|B%}`6P+z!edrU;Zxq*$hi9~Ns)mz_`tm=G zZhqT)S3R6s(*M4CB>KG|l--tG)R$7+zqYZPSNCOgeYd%1etK~;lG9nmpNz=r{I>I> zyjfU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KJT(clWWY) zHgu}3*CPgh3&)ioqak7-!g$8lP~)u!`h8F9Bt*8FmD&9ArrxRsohT$3>ftjzjbZBb?WPL3;j=C?!O zU3cR!_=SvBp((oMwYh6sOV-}o_jGM;PcaYe=6mf2&mWU?N6o@<|p I1Hi2R16U-WPyhe` diff --git a/upload/skin_acp/IPB2_Standard/images/acp-logo.gif b/upload/skin_acp/IPB2_Standard/images/acp-logo.gif index 7ab9dd916453db0b641a22cc2f95db56a74e0d62..333773b0e4e2bd2a193e488a5915d49d319ac82d 100644 GIT binary patch literal 3894 zcmW+$X;f1O+q_9`HVEXhX+XdPQBbG^#e%k$%OW798Y^v4sSQ>Ue0|%vycIRzO;{3; zB?__&5fBi;2E_%XZ6H9x9u^^}KtRNRpkWPb^4V{G%z5V5oafA$@!jv^wmT#n*a~QL zK;e_VYdNxO*|Pf1F(jwy*MEu!R@by+ALdk3 z^C=}A+}q8=su|7Fs-UE!^VNr$xg|lVd_*-9nI)~NA9^`BwY;*{);GSkrp6jioPMiQ7lTZKK@Wrn-)Iky)~N&B~RGMqyR&hffPFz2lQ=P1^m= zihtf*FKqj(l~$))TweV&vly8vmB`=S ze)zJXYi#h{bbLYE$LU2;?LgO?4-X}S=@nhE`OQU76|H^avkS|y!j_KyiJpNep0HKg z{r+CfE6w6+ZskjMmb6d#vFr6@a!JRP^u}x1O)>eOP1kOg$)7h3b8a^kJyTT6hUYZP zQCZU7!KwU5y?KvbuCA_K&6G;J-g9!AI$nKfQ%pqV$VSI!Z^bwe2U7J7FYMTDaJcrPu9!dRn`rDnq6#H zj91nTjEv7}mOrQSIh5HrVe5isMW@xhXdcOU(4Bm@gOl5QHA6ZuI-OY5#?EYP?VEU5 zH&FWgRmt=IInB!Q>RR5z-pbm+xrOC7qw4v8c{(D!A*G}}Ca-02dF8omWNu+a*8N`f zaUr!#o?I;dtMzSqd3R*CY-Vm*+BG&bHuF|B%gK?YS9HIhoX>suQr4}?c+m5(c5r1y z%NMo|jHc5Z2IlQtZH&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D-w*yRDKujEuMUAOCdO z;Mor8>Ts?oPR@I`AAh>2fA`X@Z%>VG?>gAx&;9M0(Y4M#pgGh6ia%MvM(Kb^ke?XX zwjXFH@X(R!Kas+4AjfL{g%u`RbE4KqIGCQ!%~E4%lGydO$a$G}qHjf>X!AivhJJaG zvo19Ywtr{$mF1PrX3h1DW-4Uj>?&jO<*BaXD4JC0!@{a0r@+t6)*j`}Fu{jsna|3V ztJeC>VpZjpVO!X-WHr;S2`f2v@vYm(bRe-+KtgDnPp1$2F2B|O%ht@~o-Zk=;@7$R q+-|Nz%!e-fJYK(*O;k*Id)m9iWO#o|?Z-al+ahBU z?mv6~>xb!^+cMvt8GU#tq_tVMhE&kkh zTP5$7OY$-@@-Q++adHC92irpvLh&aHBLjmXgAT}ake?XX7C5vPc<4y=pLjCyV2;)N z3oA-qi3F{`k#l*~TQ_d@V<|jOtIqqhC|u6)pLd5fc;5>1x5bvu{@Y*A6_*mq<;{=g zD(V`f=*?rd^CC)?F)cTeAYu-EJHlc%nZ4AuZy C#)R|$ diff --git a/upload/skin_acp/IPB2_Standard/images/folder_components/diagnostics/index.html b/upload/skin_acp/IPB2_Standard/images/folder_components/diagnostics/index.html deleted file mode 100644 index 250b1f72..00000000 --- a/upload/skin_acp/IPB2_Standard/images/folder_components/diagnostics/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/images/folder_components/index.html b/upload/skin_acp/IPB2_Standard/images/folder_components/index.html index 250b1f72..b49fc27d 100644 --- a/upload/skin_acp/IPB2_Standard/images/folder_components/index.html +++ b/upload/skin_acp/IPB2_Standard/images/folder_components/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/images/folder_components/index/bulkmail.png b/upload/skin_acp/IPB2_Standard/images/folder_components/index/bulkmail.png new file mode 100644 index 0000000000000000000000000000000000000000..d9b2c2412ad08b66f60ee968bb8dcb174d6b16d6 GIT binary patch literal 1530 zcmVWdKHUATl!`L2z;)GB7YSATc&NGB!FhIUp-AF)%O$!BKwz000McNliru z)CUI$8Y&M7a)kf@010qNS#tmY3lRVS3lRZ-WM7d0000DMK}|sb0I`n?{9y$E00mM> zL_t(|+MQKx5+b4z1|1Y(TQ{Ly+m*7u?rm?|`|vyE4$8yDaN1w* zx##r!zTfwq?>mQr2WS($<_(jQ)^VLNUV159ID2FUvXkku_U(Zrr%zQJgpF z|GU-Lxz4_Q8f~?n-7ZO$#&kM;diUQ7&Th(^YqS_ck~2rS=6dA**; zlF8|KJU%vsv_(Q)Gr;p}-{|jOymN4{n~Fq|V6*vXcT@MkV0D{qoBvb(gB9Pwhfjj$JJ2G-4gtRF{1r2D_rcGmq zw{Bh4NQ||#IN<2fzoE0cmAO2|aN}1))Nr^94u(9%!=LKjx&SR>S!7rJvA-}vk|1rvwQY@v!<=ByOWSB3V_kbf-L7jER?|2vVr;| zzZ^cx7=h1S=GjZ%SD6(oRgFzS6(c~?!?eFc@8%~mIN9S9@KalD79 zuU2mthuO?S36+b*BKVtI;dy%jWD;k}2N}aNU@)1W2Zd-#6~m*FG_MhpK8=d;%Mlt< z2CTtATS;hS`L+S0(NtS-YZ1nkduG zMbiu#R4}Vr1fJ&P^nZ9bgdeT8(BsJ4R?9~HKlVN{2$^uuq+Gt{Ol~$4ihvW zNo4`aUG)Z-T79eNRrMZ%`w`c_la@{=Quy{A-zkhQ z!7PeTCNIZuI!C-<1tFg#SwyOMZXv^9-ecC(8@QiR@+4V9_9>gqVrtI{;qa-G)6?fN zIDM6Pfg3FRJTh|e>At>Y7;~ytl@&aqNc`(VR8LMw%UF@QTt-W!QvXCEe_c!@!s%=_ zhWVos@-X58LSPRa`gm9r^IhTa>Q@4RrPhv)F5G0Mrk*I9^MJT7iUN{mrC4m@{M6Lh zshOE8q9oaU z$wXyANGrOcm>%1N{x0a*Qqc*uyKh|Tu0Bana{pR&gKoX#^ZGTI*HxD4RnFI_dBz#t gGxC(@Q#oJz7c<`?GZYAQ^Z)<=07*qoM6N<$f?8v~^Z)<= literal 0 HcmV?d00001 diff --git a/upload/skin_acp/IPB2_Standard/images/folder_components/index/emos.png b/upload/skin_acp/IPB2_Standard/images/folder_components/index/emos.png new file mode 100644 index 0000000000000000000000000000000000000000..c424e1a8da0c225a5ed880e8dfbe20ba672ed6a4 GIT binary patch literal 1164 zcmV;71atd|P)WdKuQATl=~Q)O@Gvp@#000McNliru z)CUI$8V^JbrosRK010qNS#tmY3h)2`3h)6!tTdPa000DMK}|sb0I`n?{9y$E00ZPn zL_t(|+LcvHZ(BteJ@@_ao5Ut=93>8JjB6=Hc>tBtQXtuemxNdYLclLz!Im9DV#5+D zAq2Z3sF1P%QBX=nBvc@w3Dm7pLIZ7HxUn1G>j!6iuc{K;NqwcGxij<4cV^D_%{LMb z`R3olSlPi_RTn2~H5lbR{IXTVN3VZ?vz#swwS(3x2Td-Y!Slske5D6dqy3M(96WMt z*0L;RNOlU(oX(;5%LV*IvocZdnqcumBsRA2wHfIP^yi<09qEOxDX>C8gu?-8Z|CZm zTgA=a{=`+Eq|wfg+=+lvyr}932Ln||m0zJ$me?*rah9NA70D!|(E&V7(}xMGlOMIy zgzF+52mk?n1G@7aH11E9D7e@s+js&9TX>MYqr?)i+Z6$|za9(&p$K5xfNs(+9oMP0 zTLEs}1lG5)Nz)Lab@J0uqKm)d+{P{Jic^?$A(KdYfI(wxvMm(Qn7c%+fZO80T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g$TIpa$Gv+yYMX|?5$ zu?03q)_w7_C12-~kw*W5hJaL2({Sg^E}8VEtQe+^N8y$gh?N2=M2R+igqFxONaUD@ zj3(L{XoTxg{G1+H4uX9*L){~x=#m$AXVwAfVpe(3b7(CDmk&yHO+i;nhhZD!W(qL5CE*rGXqCRx)SpfO2^EOZc2cjGC!}SuTnUjipF7RV4sos-~ePb2M%^06sB~T)4jgfO`ShRlVcK zV9yz?06>c^^1!4MY9uIN8*yQDEe@Qcp%jfJ5_2GGGVN>*H48k~3#+yjzGR52M&VP7vXmOW^HSVZjnWw5-2Xmcyn)>W9k39P9GHU+$R_v3R&P9;$1 zwoiVE=dFR8;&OnF*)1gBZd}!5nm6Lm$&re69fj_R>{g;L@ z6%30;JZFVyRnH-tV01#K>0@#J7v~ z>$)F+x2e)#3;5MUB9M(0-!6#KGI}+^&T-FqjW7^+>T%Rfc8p00000NkvXXu0mjfOANU) literal 0 HcmV?d00001 diff --git a/upload/skin_acp/IPB2_Standard/images/folder_components/index/groups.png b/upload/skin_acp/IPB2_Standard/images/folder_components/index/groups.png new file mode 100644 index 0000000000000000000000000000000000000000..252ecf04d10a8404248add4d9ce16c56b4e19347 GIT binary patch literal 1711 zcmV;g22lBlP)WdKBPATcx`PH%P~GB7YQATc&NG&4FdHXti7F)%RO1yJn(000McNliru z)CUI$8ZHQAwwwR}010qNS#tmY3h)2`3h)6!tTdPa000DMK}|sb0I`n?{9y$E00sw1 zL_t(|+O<|`Y*bYg{@yav&a|_1n=UDfEznw7no>$FYa*L5p(3Fz%MU^j5ltikf~E$D z1_>(q!x$wYM1z1u!&(r6XxJA?k-c=G(9%vfy3D*;-tM{6sX;`4nD~-!-hKC;dzSB> zbM65D^CLWKa#I;%mQI1Q!GO`}g+Wu?e>L!zjR)6ZS|Ef?q79RH4i?@-xZjW8d|_-~ z{SA(gNPwUdL_#7Vm5?9R^9!Mapb^Z!8K_>16_SZBGcqAst$@Wc0E7I0&;;{V9k#x| z4_}bz0*}YD(dBZvgTWxJ8(e2+Cv;u!q_uLw)uf;&U?n z<`S9-;fR49%aN}0n9KrV%I-G-%PQ8wl92^i$tjbp${_?As&nv}S2}s>G#cxh(6ToS zjpXT!KuqEMCq(l(m|G6Q9gT$1Z}I^hIW*uI*P#%Qm6-#JD}g?UMnxv&v|9lH78)7Rgd7Vy)SDzT#`Vbvje5ZGpumK-CT{u7=`oA>G%-Xr1}DH0&}F zh__BiJWD6(z`XPf*mNH*$pxss>m1X@$yu}V3}IdIOq*bdfx3Pk9yQ*>P)8wlomX(- zS}(+y7|eg+wAmBL*N+`&W0d*^3`{(*(VfA)n=&#D&Hb<8$Awj#WD#R`j*Ybk*SkC( zm~HK=z>xtyfQ;S4LUYm(&e+q8I?aO#TJvwD`@m!6yy z2nWKEd!ehVi)tHQ!Z`vh`Z^yIbq^kqKy%|9__f=2WXW(_QlV1G(} z@D65I - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/images/folder_components/index/languages.png b/upload/skin_acp/IPB2_Standard/images/folder_components/index/languages.png new file mode 100644 index 0000000000000000000000000000000000000000..dff6c1d943a8f1c5f3cbf460e104c213ae69dab2 GIT binary patch literal 1796 zcmV+f2mAPmP)WdKuQAUPmLWnv&QFfcM8F*Z6dF*-FdAS*C2FfftZS~&m!00(qQO+^RP z2L}ikB-)2P0000032;bRa{vGe@Bjb`@Bu=sG?)MY00d`2O+f$vv5yPCC-zb-weS?|kQdkHTj!<>z9}FHq@?~hc;K(<3vR8cKVjA}ga{Fa? zACa5$w5b{`Cah2#G;2PV`wWWRP85#^TrO~mja|n)^C7Qp-^+8i(u~RW%zXid_w%cG zR{g2dU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B2_Standard/images/folder_components/index/settings.png b/upload/skin_acp/IPB2_Standard/images/folder_components/index/settings.png new file mode 100644 index 0000000000000000000000000000000000000000..41377026a9eaf9d80072c855ee4450cddf6a4bee GIT binary patch literal 1605 zcmV-L2DWdKueAT=OQYjhwoFfcP9GBY|gHaapjAS*C2Ffey8R|o(A00(qQO+^RP z2L}im3qxRH+W-In32;bRa{vGe@Bjb`@Bu=sG?)MY00d`2O+f$vv5yPsp*T;`#NeOfpybcaI2C7qpJKRBHkE6$!hyI+>&nyxP2&!Q-lSu9qWGQ3GNA%Zc< zDW(RnT5TKZ>$hRouI0~Y+C=u|x9XNudmRhQo-BWA&z{4zkx0aO=XI!GZv=bkP>5xqOzE(v+>aYi$*jyI55PtC}aH({A|mXZ~BO%fl!ia z9#d)rU1wm1PINRT{U0fSD+b&T0FU%vL03wtwtqb zBrO16VG#_J=cGKd8Iaw)ev`YN4zmpy_PVWmI-h;j5Oft1vv_6Ltl65cE!kWl2`$>Z#qMd#|hDNku{xEH?S}# zaTXb^7Ayu_vw*EFH&9(M8_VZANZdqejARDiclgoK6OtfVRQ$f}R|NY;h~W}pbehPT zrU@Z(N{lklskU}agG%N3<@~?+w)Hk@OL`z%9+BG;eeHoV3qSQOr z%*{tUXm?FqUwT(l}ly3UR4|y zDBo$p-u3e!nynB`(qslR2jC?VNvpyPDh;)k`P3rZW`;Rg{0wUGHe#X`hu$rRBO?>L zYh;won*$3yqXhmpgXz79YHBBY>NLa86pKa?oM6<(HE5KbNf40lvf}jqDl93rfwy?> zK1LepypN<>5>vj(8#f;InM~%{k|f0FqaReFp-@ay!*h#e`sR-m-oJm-#SfOI#b_^y zW5!7d^s5;@pRbMnB>0HxB;oF~0CYV@SV8b6%cmxxCGYv?(3Tvtl$}nFsfpt<;e7HO zObbB80X2DKBWdKueATcl?MrC3kGB7YQATc#MG&4FfI3O!9F)%PSaWt_2000McNliru z)CUI$8V#xg$L;_C010qNS#tmY3h)2`3h)6!tTdPa000DMK}|sb0I`n?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y{Qe ztgNiQu&{9P_-?lwq!HvoG-m1E%Qa1C6>eb6I)&8a6z~EMhGZNX zAL8z|-Mv9&afHKRard_f;?<9(cK%ziX=!OWTeohl-n41cj?~mtHN{hF3e2KSdyT!A znwk>4UhkyQXuL9ksHLNo;>mr$>S$-+LH z%@(Bcg(5S5IAV&Ch;xEV$)86ch73>t@)8Lt1Wklk5=r2W=w^?=6)B1E??lfdSb8Tm ri#$RojjW5N2t|lQgrAl8e~Ui>D}SHS2DikW00000NkvXXu0mjfEIHpz literal 0 HcmV?d00001 diff --git a/upload/skin_acp/IPB2_Standard/images/folder_components/index/validating.png b/upload/skin_acp/IPB2_Standard/images/folder_components/index/validating.png new file mode 100644 index 0000000000000000000000000000000000000000..aef6a75dc5465c53349949d508ac7310bf6aadfa GIT binary patch literal 1413 zcmV;01$z34P)WdKBPATcx`PH%P~GB7YQATc&NG&4FdHXti7F)%RO1yJn(000McNliru z)CUI$8ZHQAwwwR}010qNS#tmY3h)2`3h)6!tTdPa000DMK}|sb0I`n?{9y$E00iAh zL_t(|+SOHkY!hV||J|*hYu9ewM)}$YUyhj>CWt~%2iurI9Ror@%)k(hF~$(0grJF< zB?e81#vuQgpr~;n8Vw{y8PjbfjtpcIHa1xI$u`!lqwRWY@2>^^i=GW6hzGiES6+U4*PIsFo1^5EAfuQ zfl`(Q0ztIX)6kW&;&_ic(!CGzWM1K1_ptBRmWh(;>6yzq=OOr6{X%)*82fHPMbIaAuPTMIEsu|Q zI-6VQ?l?h7O7J7#+D(s)#g;=89bQH+DYM;#?lvC1AGf$wEida#(FIK8y$a{Sw{ThB zh2o;Tw1NEQN4Dox`P;5H-XS&oT&W&KIj-TpzE7znk~J*q%HAv}Tls{GSz6%0cQto$ zC0LC9%iY+xIfh3=x4>x@T*)F061r#Tpq%6jF_0arnJl?046rsw4=;VgkE79ow5vqoQg(uDASxmz%a? zYpE?B{isdKg&jqB8f)|X_JxN&YMf0^B|++kqS z_1+0dN~lj%hivcj=k?vHxe6F7h9`16$vC-AVCjIgLCNQ?siR2X;bMI=Gm(YQU__^N*e-OAti?g!|^|@l5B~5gBEUtKlNOwI0M^IB-nt$+C{k@y0MJN3u z(h0o}sNHds&`HqqpeClNI-3-6p1G2k_dGsF&8^ry2bq!qF0S+{L2sObg8y7UlR=ZnN&M!6yN T5B3v%00000NkvXXu0mjf_#=LT literal 0 HcmV?d00001 diff --git a/upload/skin_acp/IPB2_Standard/images/folder_components/security/index.html b/upload/skin_acp/IPB2_Standard/images/folder_components/security/index.html index 250b1f72..b49fc27d 100644 --- a/upload/skin_acp/IPB2_Standard/images/folder_components/security/index.html +++ b/upload/skin_acp/IPB2_Standard/images/folder_components/security/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/images/folder_components/skinremap/index.html b/upload/skin_acp/IPB2_Standard/images/folder_components/skinremap/index.html new file mode 100644 index 00000000..b49fc27d --- /dev/null +++ b/upload/skin_acp/IPB2_Standard/images/folder_components/skinremap/index.html @@ -0,0 +1 @@ + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/images/folder_components/skinremap/remap_row.png b/upload/skin_acp/IPB2_Standard/images/folder_components/skinremap/remap_row.png new file mode 100644 index 0000000000000000000000000000000000000000..55c79fa157a3afef5d7288ad03806e946c8efb50 GIT binary patch literal 1581 zcmV+|2GaS7P)WdKHUATc>0L}hv)GB7YRATTjHGcYM6&3F{G&H2tJ10(@(6zL*$dBdV)TvYNZP>8kNLg8#rVkAb!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xmlrpc/api_user.png new file mode 100644 index 0000000000000000000000000000000000000000..3032b8e381ecbab92b31b42aae09762f8600559f GIT binary patch literal 1620 zcmV-a2CMmrP)WdKuQAUGgRa(W;#FfcP9F*73?)Bpeg32;bRa{vGe@Bjb`@Bu=sG?)MY00d`2O+f$vv5yPWgh)MN_E z#mjl+es8LM_q)}XhXFc;m=faH*>?|hgGHfwTrkH4Y*z@EZrVaH*JW@8hvRz8<&4=b zhf7F;?mM({Qe~Jn3V91X-Dz}R>U_In-|EkNOOfpLcBYGb-sSs&5>jPERR0W=j|#J{y&37WA7>wc;%ikDr91 zC}50{F>R-Jo*RHK{)cX&t|h292^YJ4Gj&jEDM^Z`C!%q4?Nk32v@k;SY{f)=oq?OqDr8idCX+ z&HFgEXDiTth&(94&a)3=&B8b|`qCk~MoICEnKQ7rV=oSM9YkKFiETE@Ssc$-twh7L zh5&>@7XV29k0%se<}N95uhAsfnpL3M^@u@ z=r^odP>Z^0<54py1Tn4;+j~C3%0nxVHq(BXykP*xgRaSf{d#@?-yTn(dIH1#raNdl zok5u>z%47o!RB66j?wVisn@Z-ZV_Uo4o(a-p*Md6DKmwPL7pgiT$4_saepIQ_VlvK zVF0QpT~#FPI(#>1Jh@~R1*+Qjw)})#&OpAmAF6P0&>JKaC#mS=a zFf0!SB`QmlHFJ3iA;%LnCCGXA*~I}4qrVy+Rd+UY32CE%kLT{d3sYaB#%JNlBhzss zkwV0Xgh$i?bZS8`sYp06#Uq8B$~!0`lKXSWQx|Q0w{YUIc0l9Ud}Sk+);t?1CoOpD zmsvR0bDMZS37ne`lHAjq)E&AkQ8yGpbq-Z%FsPwPvVwvmp;W|0q(s8H3(t{Q#up3r zprK|%pnUP+nP}~~HS_=s#$g%Rwqbxf_i~-7bP=jXjn3~W;SfUMkf1g!>`V@so<5xa zy~ms_9!VyM0L|$pymj?ONNP}~WcdszZbb!59AFj7SA;k49>(acrU|dIOkNOFU-a))jDjH`?(PTK&@ckH#Mb3l36f S{heX}0000 Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/images/folder_components/xmlrpc/log_row.png b/upload/skin_acp/IPB2_Standard/images/folder_components/xmlrpc/log_row.png new file mode 100644 index 0000000000000000000000000000000000000000..c3cbb4b336eb947499bb2b1e2c9a48f78b211995 GIT binary patch literal 753 zcmVWdKcSAT=OOa(W;#FfcP9F*G_dH99gdAS*C2Ffee&NW}mE00(qQO+^RO z0|pKZ4dO5VmH+?%32;bRa{vGf5&!@T5&_cPe*6Fc00d`2O+f$vv5yPs99^?Lo2OeQ-Gg+gDi1w^CKp51Q0tyZf6g&>L|j7B41 z7zPju`Fvh1l}Z=u_4+iI%Y8^DlbantLKc_H_1xibs1*tYgO{jyxm;2Z%d();=@_%w zY(jS~boaz!vB<1eYoS;yE?5HS_xo4@&k)gUHiPkaOzGS0mO3Di>2wMvlL?$orx}xl z5dMwak&020AqaEkUH#pCgkR;#6bkVqtOaBx7yBr^fmYPAXO?-2BQ z|BQb|AP_jhZhvvR-S<+d6cx4GZ4sOJd9_-_@M+Jn+{vXm_&dB_uN@os5s!B&m5K%( zSy5EE@t8ImjrSbKiT@nsU0_x}*-uX1zQB@=yZ?cCzyC2dYz%?`IGI1;?Ccfr{C9dUlgThw0?;l;_QS)6=Yp^}!sBMU6-aj3d_HIo jhZW~~OcI47c>9e<36JD;Ec41s5-(q~K+s3c2L}DhYu$pcx=N5TjB?zU@M~c`(;;+mtOaZ)L(dRernFe!d|?;?!w494LtKQo7)hBSE<#*{xCn6(;v&RF$fF^Tjy%$U zxCn6(;v&RFh>H*xdGOo?p1Z&!bGTswH%#D$2_y!P7(ikGi2)=AkQhK>u%IJ_f-ES= ziqvF7LDsw=3v46{&KDpQFqfMp)`|!@x*Ib{+d4ZRY;m=)~!pLynbEl=o=!|#4-71hJMKOl;f=3>t{b|pktv+<;XM9_&Q268@1|kfj*6{ksSacyo?_k(Hz+#W!gGBCK)+e+4cb zwV%3##uG@4ke{$NRn-;HF0-{rd@;W<&1#>kaOA_#>Ki0vsT?ofMLJH7PpFqXd|&<$ z-5YdDInmd_@U3lhf~|t+D5aHl-Qc80c_Fguwf=F+Sbt!8>n!?3d8#Sxo(G_uv-C{j z38DJ+nfR%aiUYTvOE$1z_cRG35|alPUC3*sfL-MY1ta>#W=uST zu^#BsRjO+THq?GARI73#b^rPrav1LxPe{tdj@3doc|)|~M`j}KQOgxq-YaLG%YHbn z@`%N|gtliu7rnRB?T%^!DY`r>V>h@=t#L{Q39q z->+Z47VZ4=e`a#e=j%P34F7zcI2>jPFilWvVOYYc$dEb89Sx1q#4wr{MvH>cl5n&n z94!gyR1%hz+hr><*q{1YV>j2YzT(r}$B!S!%knbRY+Sy4d3$@iea^$Xw{PFRFDJlI zv-J1x->08``uOqVU1r9H`r8tR>j^es%A}HOzDqDXxc#G7put4($#Kcs&-WMidb=@1^9zXui^?LJXx#Tm8 zA6uABbId<2`T0_^&grecU6bcumN{v(>9&51+s^sc>6^|J&7N#^Epc}8{rCIN{EB#P z*=PCq?X!R8<~N_|tP9WEUmJ7G_Swg`5pRFqy)L+h|6AI;>z)0NHDl~!_2-?hh>^dw z@!au>X;1H7|Nm^~pM8ASpT?}0e?7IhS?2Nl^UwC5vshODW<%FVdQ&MBb@0HyO9JOBUy diff --git a/upload/skin_acp/IPB2_Standard/images/folder_css_images/index.html b/upload/skin_acp/IPB2_Standard/images/folder_css_images/index.html index 250b1f72..b49fc27d 100644 --- a/upload/skin_acp/IPB2_Standard/images/folder_css_images/index.html +++ b/upload/skin_acp/IPB2_Standard/images/folder_css_images/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/images/icon_help.png b/upload/skin_acp/IPB2_Standard/images/icon_help.png new file mode 100644 index 0000000000000000000000000000000000000000..77b3ef024d4b84a8ec83aa906633eaf9b7e57fdc GIT binary patch literal 3554 zcmV<84IT1{P)WdKBJATc%|L}hv)GB7YRATc*OFf=+cHXti7F)%P-HZAS|000McNliru z)CUI$5D+u!L%je1010qNS#tmY3h)2`3h)6!tTdPa000DMK}|sb0I`n?{9y$E01Y}x zL_t(|+PzwNY!v4ee{<}5y*}0lUSlxW#>5G!LjcjFRiYG#LQDc99)UGY;bLZ0WZe)Z7*JX*Sp^J?99&9_hxpy zhu2pKjPx`+JG0;Sd++_;H8umcc^p6P$+p`|YDH1FUsbg#U57OQs!P{dyQayErYVxD z%F~h*8 zr3nmyvj8$_tI;(*V=1Ak=2=k^&qSjt3=DW-XlO)_M8X4;lit4^Jh<=uaCkU~x0S{4 zaSPoX8j>FHc=S5l^yM{cxWaqxu`#*1oS`>?Vp#y5H_sfG08Q7{XX{MB=^45w%cf$c zax4@V=R-wBIb*YB7b=SST8s^06@8-0r@F|PuHgRwnhWBf;Mx4v$}1{;%; z!x|tg(3Zt@J(VtmnWq@QXE;)fNpOJxTi`9akyxH7D9D5I@=8XQwQ`rM;77H!Tc!H? zQ=PCte9WN`QKr3Jc~cO$UsYA3cS8;4!P1 z8A4sGP!AuU9RzPc zf`M_tkRhJ{o`DefrlPRxduu_8CA>JF#PAt19?#pLsHlnw1pFH-DymVL`gYtZl1wKy z5wP;(qR1bpsbLv%qj8g67OBKHej4%qonIn*884mGQDK#ZjV zTuc#Ko2W^2b~wsle7vU^Ytd9!S36~<5SfkNzh7rXQU2wsRV+h4vQng$A!#KmVgXN9 zQot-z;m(G-0}rP}myWDRQcl^62zN}#l~l)$e>Y3DUfFU9CKtV;aX z=4ohSvAN)__Cb<$@Xuh&tYj`45&>8y|C6s}qjaHR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((S1$6B6R;`4^Ww{6>*>-Ba&PYUGZDB$-i2wXuA5qOqfTw&&su;)1gmoGP+Q51z<=2F`*vk;)= zDv*3=aj%eA&9v1Kk+4bM(;WN2^z@`*{hS;yz^iyc!%A_n4J{vqj*bRw*lrD?0tEU7 z$}L#r?*q4^K)PojzFEc%ozAS;%w)Ig27Sl|6%`Jwx&m6?2kq_k+KCgNpGU>|!R$Cg z01N-AiG{m#Xc}ATbmn3Z%gBEfi*gn8szrDS#?kG)$*TJm1lseU=tbI2;z=)!_ zzpCm%rnoo@K}T^&QSt1>R-sNG9PDX6cI?AW?0Jau^wO62A6x3;cU*zjU;q2=>FMAj zwY85Jb8RFtja;wCtkbGoyLR={^XJb_VF7E4gQvVNF3UQ168yn~f87{~1RFMQ-kFP& z9#Z8BPFTG<&bH0RkAL3b_fJrfBF;CV48_6g%h}_ODS+U&2tv3HQ{q~rvo4C!@$T-< zE6vS~<38Uw)edTpucCCJQ1C9AaqgM|Z@h76^W@~j9-q$}>ge#`NZ9TO1pHLwXcQcZ zgB}F)%>oUg%l;pUJE{PfvE@doMkxZ*x`DV*aiSC%y&d3pS^-*@{!p78|4a%<@pF7m c`(}>+1Mz=701euHtpET307*qoM6N<$f|atzGXMYp literal 0 HcmV?d00001 diff --git a/upload/skin_acp/IPB2_Standard/images/icons_form/index.html b/upload/skin_acp/IPB2_Standard/images/icons_form/index.html index 250b1f72..b49fc27d 100644 --- a/upload/skin_acp/IPB2_Standard/images/icons_form/index.html +++ b/upload/skin_acp/IPB2_Standard/images/icons_form/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/images/icons_menu/index.html b/upload/skin_acp/IPB2_Standard/images/icons_menu/index.html index 250b1f72..b49fc27d 100644 --- a/upload/skin_acp/IPB2_Standard/images/icons_menu/index.html +++ b/upload/skin_acp/IPB2_Standard/images/icons_menu/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/images/iframe.html b/upload/skin_acp/IPB2_Standard/images/iframe.html new file mode 100644 index 00000000..f46dd0b9 --- /dev/null +++ b/upload/skin_acp/IPB2_Standard/images/iframe.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/images/index.html b/upload/skin_acp/IPB2_Standard/images/index.html index 250b1f72..af2fbe79 100644 --- a/upload/skin_acp/IPB2_Standard/images/index.html +++ b/upload/skin_acp/IPB2_Standard/images/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/images/ipsnews_item.gif b/upload/skin_acp/IPB2_Standard/images/ipsnews_item.gif new file mode 100644 index 0000000000000000000000000000000000000000..f737102c7cfb4af37e0a164cdb90f5ac9d65316d GIT binary patch literal 517 zcmZ?wbhEHbE#Mp1!?w`}NgFpXRK;`uyYX?>~M&`SySAsw01X|NZ^z&x^O; zI%jWcox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- - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/images/te_remove.gif b/upload/skin_acp/IPB2_Standard/images/te_remove.gif index e9f8f1c0907df1f0e6c8f455b07f02bc989c632c..0875d0212f85f2f3886434655d19a040c377920d 100644 GIT binary patch literal 333 zcmZ?wbhEHb)L{@{IKsg2|IwrW3=A$dHoKQC>!_@Jclj~{1B0=y?%g9t(xRefc612x z^Ot94hI)IS*}7FpPHxro=|Ba<1I3>#V8uEh5@aU>>!}2VzLd;)8C+{}UhgaT(^Zsv z|I6C<*>OA$N4Pk27}(qx4jq&-nCht^c$1q)p6Q_TjuTun*bc2yWDwzNcV}Wq+`!kG z_id(h$IVAYuNRzW65`TsU|`qg;AN=NE#-9JZDe=RW@=^TN$q0o;PhdcFex;gDN(zq zmZgk&hHh$Zi`z1t(j=bpuE}MqyEw92+9w-_xhJtkck0bp&BDpbF|n!nxZY-Mu57j& pOJ-DR^RRI@Y74M=-dw_9Y4ghHV3f;^JYb^<4$d3I(=07?WP|Bmv^6AzctGL`RtP&C&FB}`dHQ5t8YqK f{3&5)V#v!?i}uBCu&@y`KE0%)>TH|}1A{dHo`E;z diff --git a/upload/skin_acp/IPB2_Standard/images/te_revert.gif b/upload/skin_acp/IPB2_Standard/images/te_revert.gif index 996cc9a1aa9cdfc6e6b586f4ec337b58df9bbfdb..700c8a28a31d301bcd8f33c05064aa30159bb387 100644 GIT binary patch literal 333 zcmZ?wbhEHb)L{@{IKsg2|Is6#@@>19EpxH4>8PxHclolht}X)u!^KgGBU+3sVnVE9LV+R-9S2w*Tz|tF#&j&o+giD>5+avD9ShH0hLaJMdMpv^Z#UJF)OJx=xwE!riW07F9eYwS&Ik)LZMKBL5 p3;S*MYrO31*W4+uVcNK{^svoqBg;4M_1=B>toilZcV$HeYXC)vY%2f& literal 144 zcmZ?wbhEHb)M4OfSi}GV|NsB@Dc=?ulkor1BOn_r#-R9#-T9UKr0>6E|P!!;YGX3=Gx)$yh&6 diff --git a/upload/skin_acp/IPB2_Standard/images/update_icons/index.html b/upload/skin_acp/IPB2_Standard/images/update_icons/index.html new file mode 100644 index 00000000..b49fc27d --- /dev/null +++ b/upload/skin_acp/IPB2_Standard/images/update_icons/index.html @@ -0,0 +1 @@ + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/skin_acp/IPB2_Standard/images/update_icons/update_available.gif b/upload/skin_acp/IPB2_Standard/images/update_icons/update_available.gif new file mode 100644 index 0000000000000000000000000000000000000000..13945ef49a007badd131456ed97a2785cc08f861 GIT binary patch literal 3410 zcmV-Y4XyG=Nk%w1VbTC70K@<{Qds_0L9(N_gMj8~xVK7Bz=sec zO7urTKrVV1cbUppaL)z@3pGs8;NU=m2NY8OQuwA4Km(QEIJM*^b7eb~6kK}4c{At4 zpY7DS)VcGW0SbLO6c|vTsne%WpT;X?L4g7YdnQ;_FoBRrs|YqgK!Csk0Fws*7$946 zEVKqDDL7aQVM0C&WGA?c`@q0hyDLpLSc|{_HwNd&wz z9I&uq!tM(cE<8sInzx|c1I}_&FrfE^m&iXTz|9RocisaK=mbyzyM>h$!oPP+-_`j< z0Gwx6l;MMVMbdo$!6FSH_n&hGDDsW}ZXfJ7lyCpB_kmvCgvXnLhYf_sS#d$|+lRjm zC>%+lO;;d#7Vu#~chDK&o(39}Rvc2@4S*X3{bAQ#2Ap^(o=pLMuoQ3Oz0}@wF2%Ro zdk-Ao(ye)kbcBswQ#dA%vO9E)$9gSNW(<_A>30XXD5L`k7|>k-qTI`%e`x{QKnJ^x=X3#qq13>64p7kE1*A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fds zcUe%Zbaz)E=^U_-kdnS?R!?2F;!(1|nS2!kWFP`e?tpSEaDiBBHSS-BvH+~2d$Z5( z^?r}QRSHvY*DJK|Q5_5Lqw4xfQJgH%;keottebQr*Jb0>p~_hFw?v9yH-H@$n<%-u z$|=Q5bV?`fg*2dSZNQl6NyJGsonX%^`Plnaz^cm*aSf#EjIifvAEyBSXk!4L76D%e zP!}M88t`>mmjO_waas3pP1ZdSaDQsIVHscm^(K4mm3Q@4b+5E)uxCOSxM~SN76(v! z!M9)_)*yG~GFUu1A6&cWO}u zcTz}#{wI3~aDM{uZCTfW8~A!7w_zOsf^YbS!NvzRRVB=#2!7xSh=_>Sc5T68UD>;Ka6eHcTAo*Wr&a}YWCc`shMrahn1qV|{P$@FV1QM~WLkj$ zJoa!}ffokwaK5*3B)DavM~ZOxaRzV|S}0mVc7h)#01#kG8251<6pV0Kiy9z|tTu83 zB!8%pPN?7j8s!Q^;Tk6~jtD^@kmm*7$P12k1>PtKj`l_AXo=NWdJ!;+QYV0>cZRQs zkNH@I2N;0-cU}PXaGwTHQDudpremyjUJQAS*Vu}}$cm&`1)|kna9C@mR*GfjkPf+H zowx^qAPV#+RUjD%!|)5fAP*n;2b%UpUj#+5Z5Ii1v5oz{7s*qNQ$xt-kEo!;4<7!U#gJ8DW4#Q*>R literal 0 HcmV?d00001 diff --git a/upload/skin_acp/IPB2_Standard/images/update_icons/update_info.png b/upload/skin_acp/IPB2_Standard/images/update_icons/update_info.png new file mode 100644 index 0000000000000000000000000000000000000000..ed0a2ac1842688b63990f4d60701bc5c36604e83 GIT binary patch literal 10404 zcmV;VC|lQwP)4;NB9T-a~u0tI5xu8?m85v zLSEehMeq>r0p_0RySmQY_cF7(t9!b81_Mx}4n!pSnCj}PcYN=AFJER0DJA~+@5}oq z{-}Vjhyui4+4=Tey~Na2LPX62;lp# z0Wlr({^!8UM?hEwx`#mLQy`)9_%8w8GJQovpQG<^>cIAY0Jr{!z|lFcaq&9v>OV0K5MQv~SV(9_h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{0oXV~E7Y z+SFAs7otmo)y1Gw1p57F7UvX*rwHy*9+vCs0&ko{ACTqu)L93#???{#?pMEOTfMUf z;gCA2Buozj zgmZRR>^-D4?_h8`o>Awo8CmF{(~E@IrpLXFM}KztES8+}`~;Ge8rCl5UCH#6?YrI= zU};u7&q6rQnePqkIvc#Eb6S;a%m{0$TGZGZX>sg_>sxdUDK=l)kSxw_fAh=(q!8w@ z-#^>`(c6v}l_p}B4Rc`mD=(zOisdhavtgRIkEoYl%e3=|ktrAAgq2Hk6M^>epTs>U zq_Tc~GV%tcz%o-UfO<_U+1Fjwzp~cn{m+XZwkLS79Ura`gRY@ zsaiv){_;xe{0!_TR^mJVWynu#JT`{pdfhU9{IOWAn|=6=N0vS~_HS#p_Jq6L zwcjfl`~IzdG;yE9i#9Xf{Hl7hK5BCC+neErha1K5V7G)n3kjkgt>sZ;bO{C1YrK+S z__o-Pmu%RYX4pGOAxv`#a&PdTx!4`eJ+jRbJ4|fTck zHc%A*njTs(BrcXK$eHcdFnfx`?Ky9z;%l}y$V@ffY+t6CT8Wu@qnSppndWD+{flN= Le_I4dByjkDuukjV literal 0 HcmV?d00001 diff --git a/upload/skin_acp/IPB2_Standard/images/update_icons/update_warning.png b/upload/skin_acp/IPB2_Standard/images/update_icons/update_warning.png new file mode 100644 index 0000000000000000000000000000000000000000..1dd019592fcb872128796451497b9340f490d36d GIT binary patch literal 10086 zcmV-sCz;rZP)LW&*E zXlA$^kOYZFH`?3sb!_U-Jg2HoS9b#q(*P%gA`{hB$N%>GO=dC9Io`hB+>5)Cw8ai1=%d5AZMFZsFVY1046gw+whG z(?}N4r1u#fVm0LWl!*LZy=J|CZ7EeXOq1x%z(XHF;K6meo4)Hjez1XARl`!dgRj*P zd&eyt)3G6G5P!>n=b}DT8Z{#R7ru|bBl5j#S;%Kgm3*eW3@bZH`zQ#!7QFr;_|Z=l z_h=_wv{C+G5%-i3)4yZ*=Wkv7-=0G};$)`iw8EObWx%tE53=zyu8S`MuKat$Honv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g${VYD5 zsbXQSZmi_fRxy(?>}c&C#GyVC9So*K z@UggpUvMjo+p1kw-Y(Y*`< zk~gHq#MZ|Mue`X?d66vpQwhhfh{5a<`wd{9pI}Dtbd!5|1|&_=Ys#klEMCvUfU`OE zX9&deG64Ud5dA8B)zca9_Vs37ZyE5G0dE=bmI`n1_5TDI0FE_=N{KAo=>Px#07*qo IM6N<$g3rlCMF0Q* literal 0 HcmV?d00001 diff --git a/upload/skin_acp/IPB2_Standard/images/update_icons/uptodate.gif b/upload/skin_acp/IPB2_Standard/images/update_icons/uptodate.gif new file mode 100644 index 0000000000000000000000000000000000000000..69b6174a6747078005be1c0749d1d35f0829d7f1 GIT binary patch literal 3501 zcmV;e4N~$)Nk%w1VbTC70K@@}A^8LV00000EC2ui0MY;`000I5;O32FX`X1Ru59bRa4gUCyg7={ z?R@Y5z@TtQEE41ejE#*?(8?(x_GmQtC|_zU^_`u+TNo|c6Q^^AbEa|jbET*$DY!-o(f zN}NcsqQ!H?JTO3zFBzwR_&^RE`K;8%lPFXFs$9vEA%O`3E=36F@nffc=Qw(@Gm;bm z1e7L}LpY&mwW1Rc8Vo8_ol%8M1wln>kX_N1gcx?yI*wvCheH$AG2GA)O0fWv}KwDVYKL7Hniklg?c z3>BY*4&*l!gB#{H<^Tma5MG}M1>hV34aDalP$|wqATe3K=;DU@^zi_VHkR_Fd;>bb zBysH(aOnf#eZas33mlmg1xHR8s2~M27i9oSejuSxu{KwLP>}*i$$zwgIp9+JIgscF z1~gEoAbf7%?6R;myFqiyo)e${1sf<^Cp&yr3*H9>G?49nZw4@&a~f=*s2~QFlH!V_ z9E0k8lIHk81T$WmfOi^dYT=O?;QMI=wHk0K1^W$9Vya}mqU8oiH5R~=Q9jVBP!nwM zUjmBz9gz?c;j;Ig-4V#}Zf%2ty}b1m0wu9_O^9DsSsIvXDY z+X|u~xv{3q;=AL;>u|l#&GA42pitdirV(^tAp<>9)?;H3R`37^1(;U>DHfy2YI7Z! z6lShb=ISGh5ghrz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RhFtY`K0h#Ni+5(9B-$ULq1u(z@8mP7bKnL@?N8JK+jqsXpzL&jZS^`nG zeB=dC0S)B*@sY=XUJifrq6d2cN|Jh)>J3%Gou&XbR`S3-cOg$F>omAoasv{C@Xv+v zb7uFqW)tNBAnF>U66bQ{Ilx&3Kp5o!i2j-rimbf;nb`(tlLhSF0XbR#NgS2PG*VIVOi^7Oh+5&LLH;V>Pg3%{^U`0k4 zFo-S4Y+#i-Hx^9rmvc#oEyr?niGEJmmriMqei@j8IhcXz zepi5CmnVz&SaLjfl~q7(@_3a~vu-~}neR4{zX+K)nS5@Em)iJ}p!u1h37UJkmxOtm zsF|9o`In*Cetvn7t*MyR$cd8|o3_b`lBby`$(Ef-nsG^*aOs=EnU`_7n#OsY$eEnV zxtzy2jo%fV!&#cr33Du0ojO35%$c3qxt-kEozcge-br)f>7C?Rp5}R;P6>1qmjlS+Mo{l bpb#3N5;~z2TA>ztp%_}B2XFuz5CQ-@7^p)O literal 0 HcmV?d00001 diff --git a/upload/skin_acp/IPB2_Standard/index.html b/upload/skin_acp/IPB2_Standard/index.html index 250b1f72..af2fbe79 100644 --- a/upload/skin_acp/IPB2_Standard/index.html +++ b/upload/skin_acp/IPB2_Standard/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/skin_acp/clientscripts/index.html b/upload/skin_acp/clientscripts/index.html index 250b1f72..b49fc27d 100644 --- a/upload/skin_acp/clientscripts/index.html +++ b/upload/skin_acp/clientscripts/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/skin_acp/index.html b/upload/skin_acp/index.html index 250b1f72..af2fbe79 100644 --- a/upload/skin_acp/index.html +++ b/upload/skin_acp/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/sources/acp_loaders/acp_admin.php b/upload/sources/acp_loaders/acp_admin.php index 8110b1a7..666bc875 100644 --- a/upload/sources/acp_loaders/acp_admin.php +++ b/upload/sources/acp_loaders/acp_admin.php @@ -1,123 +1,115 @@ - CP "MYCP" PAGE CLASS -| > Script written by Matt Mecham -| > Date started: Wed. 18th August 2004 -| -+--------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - - -class acp_admin -{ - # Globals - var $ipsclass; - - /** - * Main choice array - * - * @var array - */ - var $another_choice = array(); - - /** - * Section title name - * - * @var string - */ - var $section_title = "Администрирование"; - - /*-------------------------------------------------------------------------*/ - // CONSTRUCTOR - /*-------------------------------------------------------------------------*/ - - function acp_admin() - { - - } - - /*-------------------------------------------------------------------------*/ - // AUTO RUN - /*-------------------------------------------------------------------------*/ - - function auto_run() - { - $this->ipsclass->html_title = "IPB: Администрирование"; - - $another_choice = array( - 'idx' => 'index', - 'stats' => 'statistics', - 'sql' => 'sql', - 'emaillog' => 'emaillogs', - 'spiderlog' => 'spiderlogs', - 'warnlog' => 'warnlogs', - 'modlog' => 'modlogs', - 'adminlog' => 'adminlogs', - 'emailerror'=> 'emailerror', - 'components'=> 'components', - 'acpperms' => 'acppermissions', - 'diag' => 'diagnostics', - 'loginlog' => 'logs_login', - 'security' => 'security', - ); - - if ( !isset($this->ipsclass->input['act']) OR !isset($another_choice[ $this->ipsclass->input['act'] ]) OR !$another_choice[ $this->ipsclass->input['act'] ] ) - { - $this->ipsclass->input['act'] = 'idx'; - } - - $this->ipsclass->form_code = 'section=admin&act=' . $this->ipsclass->input['act']; - $this->ipsclass->form_code_js = 'section=admin&act=' . $this->ipsclass->input['act']; - $this->ipsclass->section_code = 'admin'; - - //----------------------------------------- - // Quick perm check - //----------------------------------------- - - if ( $this->ipsclass->input['act'] != 'idx' AND $this->ipsclass->input['act'] != 'acpperms' AND $this->ipsclass->input['act'] != 'sql' ) - { - $this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' ); - } - - //----------------------------------------- - // Require and run (again) - //----------------------------------------- - - require_once( ROOT_PATH.'sources/action_admin/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' ); - $constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ]; - $runmeagain = new $constructor; - $runmeagain->ipsclass =& $this->ipsclass; - $runmeagain->auto_run(); - } -} - - + CP "MYCP" PAGE CLASS +| > Script written by Matt Mecham +| > Date started: Wed. 18th August 2004 +| ++--------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class acp_admin +{ + # Globals + var $ipsclass; + + /** + * Main choice array + * + * @var array + */ + var $another_choice = array(); + + /** + * Section title name + * + * @var string + */ + var $section_title = "Admin"; + + /*-------------------------------------------------------------------------*/ + // CONSTRUCTOR + /*-------------------------------------------------------------------------*/ + + function acp_admin() + { + + } + + /*-------------------------------------------------------------------------*/ + // AUTO RUN + /*-------------------------------------------------------------------------*/ + + function auto_run() + { + $this->ipsclass->html_title = "IPB: Administration"; + + $another_choice = array( + + 'stats' => 'statistics', + 'sql' => 'sql', + 'emaillog' => 'emaillogs', + 'spiderlog' => 'spiderlogs', + 'warnlog' => 'warnlogs', + 'modlog' => 'modlogs', + 'adminlog' => 'adminlogs', + 'emailerror'=> 'emailerror', + 'components'=> 'components', + 'acpperms' => 'acppermissions', + 'diag' => 'diagnostics', + 'loginlog' => 'logs_login', + 'security' => 'security', + 'api' => 'api', + ); + + if ( !isset($this->ipsclass->input['act']) OR !isset($another_choice[ $this->ipsclass->input['act'] ]) OR !$another_choice[ $this->ipsclass->input['act'] ] ) + { + $this->ipsclass->input['act'] = 'security'; + } + + $this->ipsclass->form_code = 'section=admin&act=' . $this->ipsclass->input['act']; + $this->ipsclass->form_code_js = 'section=admin&act=' . $this->ipsclass->input['act']; + $this->ipsclass->section_code = 'admin'; + + //----------------------------------------- + // Quick perm check + //----------------------------------------- + + if ( $this->ipsclass->input['act'] != 'idx' AND $this->ipsclass->input['act'] != 'acpperms' AND $this->ipsclass->input['act'] != 'sql' ) + { + $this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' ); + } + + //----------------------------------------- + // Require and run (again) + //----------------------------------------- + + require_once( ROOT_PATH.'sources/action_admin/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' ); + $constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ]; + $runmeagain = new $constructor; + $runmeagain->ipsclass =& $this->ipsclass; + $runmeagain->auto_run(); + } +} + + ?> \ No newline at end of file diff --git a/upload/sources/acp_loaders/acp_components.php b/upload/sources/acp_loaders/acp_components.php index d80b9f28..1659ac64 100644 --- a/upload/sources/acp_loaders/acp_components.php +++ b/upload/sources/acp_loaders/acp_components.php @@ -1,167 +1,158 @@ - CP "MYCP" PAGE CLASS -| > Script written by Matt Mecham -| > Date started: Wed. 18th August 2004 -| -+--------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - - -class acp_components -{ - # Globals - var $ipsclass; - - /*-------------------------------------------------------------------------*/ - // CONSTRUCTOR - /*-------------------------------------------------------------------------*/ - - function acp_components() - { - } - - /*-------------------------------------------------------------------------*/ - // AUTO RUN - /*-------------------------------------------------------------------------*/ - - function auto_run() - { - $this->ipsclass->html_title = "IPB: Компоненты"; - - //-------------------------------- - // Get info from DB (Special case) - //-------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'components', 'order' => 'com_position ASC' ) ); - $this->ipsclass->DB->simple_exec(); - - $this->ipsclass->menu_components = array(); - $another_choice = array(); - $first_choice = ""; - $menu_data = array(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - if ( $r['com_section'] AND $r['com_filename'] ) - { - $another_choice[ $r['com_section'] ] = str_replace( ".php", "", $r['com_filename'] ); - - if ( ! $first_choice && $r['com_section'] != 'copyright' ) - { - $first_choice = $r['com_section']; - } - - //-------------------------------- - // Set the default... - //-------------------------------- - - $this->ipsclass->menu_components[] = $r; - - //-------------------------------- - // Grab menu data - //-------------------------------- - - $menu_data[ $r['com_section'] ] = unserialize( $r['com_menu_data'] ); - } - } - - //----------------------------------------- - // Get default action - //----------------------------------------- - - if ( ! isset( $another_choice[ $this->ipsclass->input['act'] ] ) ) - { - $this->ipsclass->input['act'] = $first_choice; - } - - //----------------------------------------- - // Still got nothing? - //----------------------------------------- - - if ( ! $this->ipsclass->input['act'] ) - { - $this->ipsclass->input['act'] = 'default'; - $another_choice['default'] = 'default'; - } - - - $this->ipsclass->form_code = 'section=components&act=' . $this->ipsclass->input['act']; - $this->ipsclass->form_code_js = 'section=components&act=' . $this->ipsclass->input['act']; - $this->ipsclass->section_code = 'components'; - - //----------------------------------------- - // Quick perm check - //----------------------------------------- - - $this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' ); - $this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|'.$this->ipsclass->input['act'] ); - - //----------------------------------------- - // Got a code? - //----------------------------------------- - - if ( $this->ipsclass->input['code'] ) - { - $this->ipsclass->input['code'] = $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['code'] ); - - if ( is_array( $menu_data[ $this->ipsclass->input['act'] ] ) and count( $menu_data[ $this->ipsclass->input['act'] ] ) ) - { - foreach( $menu_data[ $this->ipsclass->input['act'] ] as $menu_array ) - { - if ( preg_match( "/code={$this->ipsclass->input['code']}(&|$)/i", $menu_array['menu_url'] ) ) - { - $this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|'.$this->ipsclass->input['act'].':'.$menu_array['menu_permbit'] ); - break; - } - } - } - } - - //----------------------------------------- - // Require and run (again) - //----------------------------------------- - - require_once( ROOT_PATH.'sources/components_acp/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' ); - $constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ]; - $runmeagain = new $constructor; - $runmeagain->ipsclass =& $this->ipsclass; - $runmeagain->auto_run(); - } - - - - - -} - - + CP "MYCP" PAGE CLASS +| > Script written by Matt Mecham +| > Date started: Wed. 18th August 2004 +| ++--------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class acp_components +{ + # Globals + var $ipsclass; + + /*-------------------------------------------------------------------------*/ + // CONSTRUCTOR + /*-------------------------------------------------------------------------*/ + + function acp_components() + { + } + + /*-------------------------------------------------------------------------*/ + // AUTO RUN + /*-------------------------------------------------------------------------*/ + + function auto_run() + { + $this->ipsclass->html_title = "IPB: Components"; + + //-------------------------------- + // Get info from DB (Special case) + //-------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'components', 'order' => 'com_position ASC' ) ); + $this->ipsclass->DB->simple_exec(); + + $this->ipsclass->menu_components = array(); + $another_choice = array(); + $first_choice = ""; + $menu_data = array(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + if ( $r['com_section'] AND $r['com_filename'] ) + { + $another_choice[ $r['com_section'] ] = str_replace( ".php", "", $r['com_filename'] ); + + if ( ! $first_choice && $r['com_section'] != 'copyright' ) + { + $first_choice = $r['com_section']; + } + + //-------------------------------- + // Set the default... + //-------------------------------- + + $this->ipsclass->menu_components[] = $r; + + //-------------------------------- + // Grab menu data + //-------------------------------- + + $menu_data[ $r['com_section'] ] = unserialize( $r['com_menu_data'] ); + } + } + + //----------------------------------------- + // Get default action + //----------------------------------------- + + if ( ! isset( $another_choice[ $this->ipsclass->input['act'] ] ) ) + { + $this->ipsclass->input['act'] = $first_choice; + } + + //----------------------------------------- + // Still got nothing? + //----------------------------------------- + + if ( ! $this->ipsclass->input['act'] ) + { + $this->ipsclass->input['act'] = 'default'; + $another_choice['default'] = 'default'; + } + + + $this->ipsclass->form_code = 'section=components&act=' . $this->ipsclass->input['act']; + $this->ipsclass->form_code_js = 'section=components&act=' . $this->ipsclass->input['act']; + $this->ipsclass->section_code = 'components'; + + //----------------------------------------- + // Quick perm check + //----------------------------------------- + + $this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' ); + $this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|'.$this->ipsclass->input['act'] ); + + //----------------------------------------- + // Got a code? + //----------------------------------------- + + if ( $this->ipsclass->input['code'] ) + { + $this->ipsclass->input['code'] = $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['code'] ); + + if ( is_array( $menu_data[ $this->ipsclass->input['act'] ] ) and count( $menu_data[ $this->ipsclass->input['act'] ] ) ) + { + foreach( $menu_data[ $this->ipsclass->input['act'] ] as $menu_array ) + { + if ( preg_match( "/code={$this->ipsclass->input['code']}(&|$)/i", $menu_array['menu_url'] ) ) + { + $this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|'.$this->ipsclass->input['act'].':'.$menu_array['menu_permbit'] ); + break; + } + } + } + } + + //----------------------------------------- + // Require and run (again) + //----------------------------------------- + + require_once( ROOT_PATH.'sources/components_acp/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' ); + $constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ]; + $runmeagain = new $constructor; + $runmeagain->ipsclass =& $this->ipsclass; + $runmeagain->auto_run(); + } + + + + + +} + + ?> \ No newline at end of file diff --git a/upload/sources/acp_loaders/acp_content.php b/upload/sources/acp_loaders/acp_content.php index 90490103..c50cd14c 100644 --- a/upload/sources/acp_loaders/acp_content.php +++ b/upload/sources/acp_loaders/acp_content.php @@ -1,110 +1,101 @@ - CP "MYCP" PAGE CLASS -| > Script written by Matt Mecham -| > Date started: Wed. 18th August 2004 -| -+--------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - - -class acp_content -{ - # Globals - var $ipsclass; - - /*-------------------------------------------------------------------------*/ - // CONSTRUCTOR - /*-------------------------------------------------------------------------*/ - - function acp_content() - { - } - - /*-------------------------------------------------------------------------*/ - // AUTO RUN - /*-------------------------------------------------------------------------*/ - - function auto_run() - { - $this->ipsclass->html_title = "IPB: Управление контентом"; - - $another_choice = array( - 'forum' => 'forums', - 'group' => 'groups', - 'mod' => 'moderator', - 'multimod' => 'multi_moderate', - 'mem' => 'member', - 'field' => 'profilefields', - 'mtools' => 'member_tools', - 'msubs' => 'paysubscriptions', - 'bbcode' => 'bbcode', - 'babw' => 'banandbadword', - 'attach' => 'attachments', - 'rssexport' => 'rssexport', - 'rssimport' => 'rssimport', - 'calendars' => 'calendars', - ); - - if ( ! isset( $another_choice[ $this->ipsclass->input['act'] ] ) ) - { - $this->ipsclass->input['act'] = 'forum'; - } - - $this->ipsclass->form_code = 'section=content&act=' . $this->ipsclass->input['act']; - $this->ipsclass->form_code_js = 'section=content&act=' . $this->ipsclass->input['act']; - $this->ipsclass->section_code = 'content'; - - //----------------------------------------- - // Quick perm check - //----------------------------------------- - - $this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' ); - - //----------------------------------------- - // Require and run (again) - //----------------------------------------- - - require_once( ROOT_PATH.'sources/action_admin/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' ); - $constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ]; - $runmeagain = new $constructor; - $runmeagain->ipsclass =& $this->ipsclass; - $runmeagain->auto_run(); - } - - - - - -} - - + CP "MYCP" PAGE CLASS +| > Script written by Matt Mecham +| > Date started: Wed. 18th August 2004 +| ++--------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class acp_content +{ + # Globals + var $ipsclass; + + /*-------------------------------------------------------------------------*/ + // CONSTRUCTOR + /*-------------------------------------------------------------------------*/ + + function acp_content() + { + } + + /*-------------------------------------------------------------------------*/ + // AUTO RUN + /*-------------------------------------------------------------------------*/ + + function auto_run() + { + $this->ipsclass->html_title = "IPB: Content Management"; + + $another_choice = array( + 'forum' => 'forums', + 'group' => 'groups', + 'mod' => 'moderator', + 'multimod' => 'multi_moderate', + 'mem' => 'member', + 'field' => 'profilefields', + 'mtools' => 'member_tools', + 'msubs' => 'paysubscriptions', + 'bbcode' => 'bbcode', + 'babw' => 'banandbadword', + 'attach' => 'attachments', + 'rssexport' => 'rssexport', + 'rssimport' => 'rssimport', + 'calendars' => 'calendars', + ); + + if ( ! isset( $another_choice[ $this->ipsclass->input['act'] ] ) ) + { + $this->ipsclass->input['act'] = 'mem'; + } + + $this->ipsclass->form_code = 'section=content&act=' . $this->ipsclass->input['act']; + $this->ipsclass->form_code_js = 'section=content&act=' . $this->ipsclass->input['act']; + $this->ipsclass->section_code = 'content'; + + //----------------------------------------- + // Quick perm check + //----------------------------------------- + + $this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' ); + + //----------------------------------------- + // Require and run (again) + //----------------------------------------- + + require_once( ROOT_PATH.'sources/action_admin/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' ); + $constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ]; + $runmeagain = new $constructor; + $runmeagain->ipsclass =& $this->ipsclass; + $runmeagain->auto_run(); + } + + + + + +} + + ?> \ No newline at end of file diff --git a/upload/sources/acp_loaders/acp_dashboard.php b/upload/sources/acp_loaders/acp_dashboard.php new file mode 100644 index 00000000..e179acd7 --- /dev/null +++ b/upload/sources/acp_loaders/acp_dashboard.php @@ -0,0 +1,92 @@ + CP "MYCP" PAGE CLASS +| > Script written by Matt Mecham +| > Date started: Wed. 18th August 2004 +| ++--------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class acp_dashboard +{ + # Globals + var $ipsclass; + + /** + * Main choice array + * + * @var array + */ + var $another_choice = array(); + + /** + * Section title name + * + * @var string + */ + var $section_title = "Dashboard"; + + /*-------------------------------------------------------------------------*/ + // CONSTRUCTOR + /*-------------------------------------------------------------------------*/ + + function acp_admin() + { + + } + + /*-------------------------------------------------------------------------*/ + // AUTO RUN + /*-------------------------------------------------------------------------*/ + + function auto_run() + { + $this->ipsclass->html_title = "IPB: Administration"; + + $another_choice = array( + 'dashboard' => 'dashboard', + ); + + if ( !isset($this->ipsclass->input['act']) OR !isset($another_choice[ $this->ipsclass->input['act'] ]) OR !$another_choice[ $this->ipsclass->input['act'] ] ) + { + $this->ipsclass->input['act'] = 'dashboard'; + } + + $this->ipsclass->form_code = 'section=admin&act=' . $this->ipsclass->input['act']; + $this->ipsclass->form_code_js = 'section=admin&act=' . $this->ipsclass->input['act']; + $this->ipsclass->section_code = 'dashboard'; + + //----------------------------------------- + // Require and run (again) + //----------------------------------------- + + require_once( ROOT_PATH.'sources/action_admin/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' ); + $constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ]; + $runmeagain = new $constructor; + $runmeagain->ipsclass =& $this->ipsclass; + $runmeagain->auto_run(); + } +} + + +?> \ No newline at end of file diff --git a/upload/sources/acp_loaders/acp_help.php b/upload/sources/acp_loaders/acp_help.php index da1ccbda..d9ab420a 100644 --- a/upload/sources/acp_loaders/acp_help.php +++ b/upload/sources/acp_loaders/acp_help.php @@ -1,98 +1,89 @@ - CP "MYCP" PAGE CLASS -| > Script written by Matt Mecham -| > Date started: Wed. 18th August 2004 -| -+--------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - - -class acp_help -{ - # Globals - var $ipsclass; - - /*-------------------------------------------------------------------------*/ - // CONSTRUCTOR - /*-------------------------------------------------------------------------*/ - - function acp_content() - { - } - - /*-------------------------------------------------------------------------*/ - // AUTO RUN - /*-------------------------------------------------------------------------*/ - - function auto_run() - { - $this->ipsclass->html_title = "IPB: Помощь и поддержка"; - - $another_choice = array( - 'diag' => 'diagnostics', - 'support' => 'support', - ); - - if ( ! isset( $another_choice[ $this->ipsclass->input['act'] ] ) ) - { - $this->ipsclass->input['act'] = 'support'; - } - - $this->ipsclass->form_code = 'section=help&act=' . $this->ipsclass->input['act']; - $this->ipsclass->form_code_js = 'section=help&act=' . $this->ipsclass->input['act']; - $this->ipsclass->section_code = 'help'; - - //----------------------------------------- - // Quick perm check - //----------------------------------------- - - $this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' ); - - //----------------------------------------- - // Require and run (again) - //----------------------------------------- - - require_once( ROOT_PATH.'sources/action_admin/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' ); - $constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ]; - $runmeagain = new $constructor; - $runmeagain->ipsclass =& $this->ipsclass; - $runmeagain->auto_run(); - } - - - - - -} - - + CP "MYCP" PAGE CLASS +| > Script written by Matt Mecham +| > Date started: Wed. 18th August 2004 +| ++--------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class acp_help +{ + # Globals + var $ipsclass; + + /*-------------------------------------------------------------------------*/ + // CONSTRUCTOR + /*-------------------------------------------------------------------------*/ + + function acp_content() + { + } + + /*-------------------------------------------------------------------------*/ + // AUTO RUN + /*-------------------------------------------------------------------------*/ + + function auto_run() + { + $this->ipsclass->html_title = "IPB: Help & Support"; + + $another_choice = array( + 'diag' => 'diagnostics', + 'support' => 'support', + ); + + if ( ! isset( $another_choice[ $this->ipsclass->input['act'] ] ) ) + { + $this->ipsclass->input['act'] = 'support'; + } + + $this->ipsclass->form_code = 'section=help&act=' . $this->ipsclass->input['act']; + $this->ipsclass->form_code_js = 'section=help&act=' . $this->ipsclass->input['act']; + $this->ipsclass->section_code = 'help'; + + //----------------------------------------- + // Quick perm check + //----------------------------------------- + + $this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' ); + + //----------------------------------------- + // Require and run (again) + //----------------------------------------- + + require_once( ROOT_PATH.'sources/action_admin/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' ); + $constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ]; + $runmeagain = new $constructor; + $runmeagain->ipsclass =& $this->ipsclass; + $runmeagain->auto_run(); + } + + + + + +} + + ?> \ No newline at end of file diff --git a/upload/sources/acp_loaders/acp_lookandfeel.php b/upload/sources/acp_loaders/acp_lookandfeel.php index f8097a38..8217fb75 100644 --- a/upload/sources/acp_loaders/acp_lookandfeel.php +++ b/upload/sources/acp_loaders/acp_lookandfeel.php @@ -1,106 +1,98 @@ - CP "MYCP" PAGE CLASS -| > Script written by Matt Mecham -| > Date started: Wed. 18th August 2004 -| -+--------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - - -class acp_lookandfeel -{ - # Globals - var $ipsclass; - - /*-------------------------------------------------------------------------*/ - // CONSTRUCTOR - /*-------------------------------------------------------------------------*/ - - function acp_lookandfeel() - { - } - - /*-------------------------------------------------------------------------*/ - // AUTO RUN - /*-------------------------------------------------------------------------*/ - - function auto_run() - { - $this->ipsclass->html_title = "IPB: Внешний вид"; - - $another_choice = array( - 'wrap' => 'skin_wrappers', - 'style' => 'skin_css', - 'image' => 'skin_macros', - 'sets' => 'skin_sets', - 'templ' => 'skin_template_bits', - 'import' => 'skin_import', - 'lang' => 'languages', - 'skintools' => 'skintools', - 'emoticons' => 'emoticons', - 'skindiff' => 'skin_diff', - ); - - if ( ! isset( $another_choice[ $this->ipsclass->input['act'] ] ) ) - { - $this->ipsclass->input['act'] = 'sets'; - } - - $this->ipsclass->form_code = 'section=lookandfeel&act=' . $this->ipsclass->input['act']; - $this->ipsclass->form_code_js = 'section=lookandfeel&act=' . $this->ipsclass->input['act']; - $this->ipsclass->section_code = 'lookandfeel'; - - //----------------------------------------- - // Quick perm check - //----------------------------------------- - - $this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' ); - - //----------------------------------------- - // Require and run (again) - //----------------------------------------- - - require_once( ROOT_PATH.'sources/action_admin/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' ); - $constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ]; - $runmeagain = new $constructor; - $runmeagain->ipsclass =& $this->ipsclass; - $runmeagain->auto_run(); - } - - - - - -} - - + CP "MYCP" PAGE CLASS +| > Script written by Matt Mecham +| > Date started: Wed. 18th August 2004 +| ++--------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class acp_lookandfeel +{ + # Globals + var $ipsclass; + + /*-------------------------------------------------------------------------*/ + // CONSTRUCTOR + /*-------------------------------------------------------------------------*/ + + function acp_lookandfeel() + { + } + + /*-------------------------------------------------------------------------*/ + // AUTO RUN + /*-------------------------------------------------------------------------*/ + + function auto_run() + { + $this->ipsclass->html_title = "IPB: Look & Feel"; + + $another_choice = array( + 'wrap' => 'skin_wrappers', + 'style' => 'skin_css', + 'image' => 'skin_macros', + 'sets' => 'skin_sets', + 'templ' => 'skin_template_bits', + 'import' => 'skin_import', + 'lang' => 'languages', + 'skintools' => 'skintools', + 'emoticons' => 'emoticons', + 'skindiff' => 'skin_diff', + 'skinremap' => 'skin_remap', + ); + + if ( ! isset( $another_choice[ $this->ipsclass->input['act'] ] ) ) + { + $this->ipsclass->input['act'] = 'sets'; + } + + $this->ipsclass->form_code = 'section=lookandfeel&act=' . $this->ipsclass->input['act']; + $this->ipsclass->form_code_js = 'section=lookandfeel&act=' . $this->ipsclass->input['act']; + $this->ipsclass->section_code = 'lookandfeel'; + + //----------------------------------------- + // Quick perm check + //----------------------------------------- + + $this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' ); + + //----------------------------------------- + // Require and run (again) + //----------------------------------------- + + require_once( ROOT_PATH.'sources/action_admin/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' ); + $constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ]; + $runmeagain = new $constructor; + $runmeagain->ipsclass =& $this->ipsclass; + $runmeagain->auto_run(); + } + + + + + +} + + ?> \ No newline at end of file diff --git a/upload/sources/acp_loaders/acp_pages_admin.php b/upload/sources/acp_loaders/acp_pages_admin.php index 9dd1cb36..8611b9c1 100644 --- a/upload/sources/acp_loaders/acp_pages_admin.php +++ b/upload/sources/acp_loaders/acp_pages_admin.php @@ -1,25 +1,16 @@ CONTROL PANEL PAGES FILE @@ -30,69 +21,70 @@ */ //=========================================================================== -// Небольшая библиотека, контролирующая все ссылки админцентра +// Simple library that holds all the links for the admin cp //=========================================================================== // CAT_ID => array( PAGE_ID => (PAGE_NAME, URL ) ) -// $PAGES[ $cat_id ][$page_id][0] = Название страницы -// $PAGES[ $cat_id ][$page_id][1] = Ссылка -// $PAGES[ $cat_id ][$page_id][2] = Просмотр директории перед отображением -// $PAGES[ $cat_id ][$page_id][3] = Тип ссылки: 1 = форум 0 = админцентр -// $PAGES[ $cat_id ][$page_id][4] = Иконка меню: 1 = переадресация 0 = нормальная - -$CATS[] = array( 'Безопасность' ); +// $PAGES[ $cat_id ][$page_id][0] = Page name +// $PAGES[ $cat_id ][$page_id][1] = Url +// $PAGES[ $cat_id ][$page_id][2] = Look for folder before showing +// $PAGES[ $cat_id ][$page_id][3] = URL type: 1 = Board URL 0 = ACP URL +// $PAGES[ $cat_id ][$page_id][4] = Item icon: 1= redirect 0 = Normal + +$CATS[] = array( 'Security Center' ); $PAGES[] = array( - 1 => array( 'Центр безопасности' , 'section=admin&act=security' ), - 2 => array( 'Список администраторов', 'section=admin&act=security&code=list_admins' ), + 1 => array( 'Security Center' , 'section=admin&act=security' ), + 2 => array( 'List All Administrators', 'section=admin&act=security&code=list_admins' ), + 3 => array( 'Manage Restrictions' , 'section=admin&act=acpperms&code=acpp_list' ), ); -$CATS[] = array( 'Компоненты' ); +$CATS[] = array( 'Board Logs' ); $PAGES[] = array( - 1 => array( 'Список компонентов' , 'section=admin&act=components' ), - 2 => array( 'Добавить компонент' , 'section=admin&act=components&code=component_add' ), + 1 => array( 'View Moderator Logs' , 'section=admin&act=modlog' ), + 2 => array( 'View Admin Logs' , 'section=admin&act=adminlog' ), + 3 => array( 'View Email Logs' , 'section=admin&act=emaillog' ), + 4 => array( 'View Email Error Logs', 'section=admin&act=emailerror' ), + 5 => array( 'View Bot Logs' , 'section=admin&act=spiderlog' ), + 6 => array( 'View Warn Logs' , 'section=admin&act=warnlog' ), + 7 => array( 'View ACP Log In Logs' , 'section=admin&act=loginlog' ), + ); + +$CATS[] = array( 'Components' ); + +$PAGES[] = array( + 1 => array( 'Manage Components' , 'section=admin&act=components' ), + 2 => array( 'Register New Component' , 'section=admin&act=components&code=component_add' ), + ); + +$CATS[] = array( 'Statistic Center' ); + +$PAGES[] = array( + 1 => array( 'Registration Stats' , 'section=admin&act=stats&code=reg' ), + 2 => array( 'New Topic Stats' , 'section=admin&act=stats&code=topic' ), + 3 => array( 'Post Stats' , 'section=admin&act=stats&code=post' ), + 4 => array( 'Personal Message' , 'section=admin&act=stats&code=msg' ), + 5 => array( 'Topic Views' , 'section=admin&act=stats&code=views' ), + ); + + +$CATS[] = array( 'SQL Management' ); + +$PAGES[] = array( + 1 => array( 'SQL Toolbox' , 'section=admin&act=sql' ), + 2 => array( 'SQL Back Up' , 'section=admin&act=sql&code=backup' ), + 3 => array( 'SQL Runtime Info', 'section=admin&act=sql&code=runtime' ), + 4 => array( 'SQL System Vars' , 'section=admin&act=sql&code=system' ), + 5 => array( 'SQL Processes' , 'section=admin&act=sql&code=processes' ), ); -$CATS[] = array( 'Статистика' ); +$CATS[] = array( 'API Management' ); $PAGES[] = array( - 1 => array( 'Регистраций' , 'section=admin&act=stats&code=reg' ), - 2 => array( 'Новых тем' , 'section=admin&act=stats&code=topic' ), - 3 => array( 'Сообщений' , 'section=admin&act=stats&code=post' ), - 4 => array( 'Личных сообщений' , 'section=admin&act=stats&code=msg' ), - 5 => array( 'Просмотров тем' , 'section=admin&act=stats&code=views' ), - ); - -$CATS[] = array( 'Ограничения доступа в АЦ' ); - -$PAGES[] = array( - 1 => array( 'Управление ограничениями' , 'section=admin&act=acpperms&code=acpp_list' ), - ); - - -$CATS[] = array( 'Управление SQL' ); - -$PAGES[] = array( - 1 => array( 'Инструменты' , 'section=admin&act=sql' ), - 2 => array( 'Резервное копирование' , 'section=admin&act=sql&code=backup' ), - 3 => array( 'Информация о сервере', 'section=admin&act=sql&code=runtime' ), - 4 => array( 'Системные переменные' , 'section=admin&act=sql&code=system' ), - 5 => array( 'Процессы' , 'section=admin&act=sql&code=processes' ), - ); - -$CATS[] = array( 'Журналы операций' ); - -$PAGES[] = array( - 1 => array( 'Модерирование' , 'section=admin&act=modlog' ), - 2 => array( 'Администратирование' , 'section=admin&act=adminlog' ), - 3 => array( 'E-mail отправления' , 'section=admin&act=emaillog' ), - 4 => array( 'E-mail ошибки', 'section=admin&act=emailerror' ), - 5 => array( 'Поисковые роботы' , 'section=admin&act=spiderlog' ), - 6 => array( 'Предупреждения' , 'section=admin&act=warnlog' ), - 7 => array( 'Попытки авторизации в АЦ' , 'section=admin&act=loginlog' ), - ); - + 1 => array( 'Manage XML-RPC Users', 'section=admin&act=api&code=api_list' ), + 2 => array( 'View XML-RPC Logs' , 'section=admin&act=api&code=log_list' ), + ); ?> \ No newline at end of file diff --git a/upload/sources/acp_loaders/acp_pages_components.php b/upload/sources/acp_loaders/acp_pages_components.php index 8265c32b..545e57bc 100644 --- a/upload/sources/acp_loaders/acp_pages_components.php +++ b/upload/sources/acp_loaders/acp_pages_components.php @@ -1,92 +1,83 @@ - CONTROL PANEL (COMPONENTS) PAGES FILE -| > Script written by Matt Mecham -| > Date started: Tue. 15th February 2005 -| -+--------------------------------------------------------------------------- -*/ - -//=========================================================================== -// Небольшая библиотека, контролирующая все ссылки админцентра -// ЭТОТ КЛАСС СТРАНИЦЫ: Генерация меню из БД -//=========================================================================== - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - -global $ipsclass; - -$CATS = array(); -$PAGES = array(); - -//-------------------------------- -// Get info from DB -//-------------------------------- - -foreach( $ipsclass->menu_components as $r ) -{ - //-------------------------------- - // Process data - //-------------------------------- - - $menu_data = unserialize( $r['com_menu_data'] ); - $tmp_pages = array(); - - //-------------------------------- - // Do we have any menu links? - //-------------------------------- - - if ( is_array( $menu_data ) and count( $menu_data ) ) - { - //-------------------------------- - // First item is title... - //-------------------------------- - - $CATS[] = array( $r['com_title'] ); - - foreach( $menu_data as $menu ) - { - if ( $menu['menu_text'] AND $menu['menu_url'] ) - { - if ( $menu['menu_redirect'] ) - { - $tmp_pages[] = array( $menu['menu_text'], $menu['menu_url'], "", 0, 1 ); - } - else - { - $tmp_pages[] = array( $menu['menu_text'], 'section=components&act='.$r['com_section'].'&'.$menu['menu_url'] ); - } - } - } - - $PAGES[] = $tmp_pages; - } -} - + CONTROL PANEL (COMPONENTS) PAGES FILE +| > Script written by Matt Mecham +| > Date started: Tue. 15th February 2005 +| ++--------------------------------------------------------------------------- +*/ + +//=========================================================================== +// Simple library that holds all the links for the admin cp +// THIS PAGE CLASS: Generate menu from DB +//=========================================================================== + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +global $ipsclass; + +$CATS = array(); +$PAGES = array(); + +//-------------------------------- +// Get info from DB +//-------------------------------- + +foreach( $ipsclass->menu_components as $r ) +{ + //-------------------------------- + // Process data + //-------------------------------- + + $menu_data = unserialize( $r['com_menu_data'] ); + $tmp_pages = array(); + + //-------------------------------- + // Do we have any menu links? + //-------------------------------- + + if ( is_array( $menu_data ) and count( $menu_data ) ) + { + //-------------------------------- + // First item is title... + //-------------------------------- + + $CATS[] = array( $r['com_title'] ); + + foreach( $menu_data as $menu ) + { + if ( $menu['menu_text'] AND $menu['menu_url'] ) + { + if ( $menu['menu_redirect'] ) + { + $tmp_pages[] = array( $menu['menu_text'], $menu['menu_url'], "", 0, 1 ); + } + else + { + $tmp_pages[] = array( $menu['menu_text'], 'section=components&act='.$r['com_section'].'&'.$menu['menu_url'] ); + } + } + } + + $PAGES[] = $tmp_pages; + } +} + ?> \ No newline at end of file diff --git a/upload/sources/acp_loaders/acp_pages_content.php b/upload/sources/acp_loaders/acp_pages_content.php index b60c1aef..cb8610c3 100644 --- a/upload/sources/acp_loaders/acp_pages_content.php +++ b/upload/sources/acp_loaders/acp_pages_content.php @@ -1,122 +1,111 @@ - CONTROL PANEL PAGES FILE -| > Script written by Matt Mecham -| > Date started: Fri 8th April 2005 (12:07) -| -+--------------------------------------------------------------------------- -*/ - -//=========================================================================== -// Небольшая библиотека, контролирующая все ссылки админцентра -//=========================================================================== - -// CAT_ID => array( PAGE_ID => (PAGE_NAME, URL ) ) - -// $PAGES[ $cat_id ][$page_id][0] = Название страницы -// $PAGES[ $cat_id ][$page_id][1] = Ссылка -// $PAGES[ $cat_id ][$page_id][2] = Просмотр директории перед отображением -// $PAGES[ $cat_id ][$page_id][3] = Тип ссылки: 1 = форум 0 = админцентр -// $PAGES[ $cat_id ][$page_id][4] = Иконка меню: 1 = переадресация 0 = нормальная - -$CATS[] = array( 'Управление форумами' ); - -$PAGES[] = array( - 1 => array( 'Список форумов' , 'section=content&act=forum' ), - 2 => array( 'Создать категорию' , 'section=content&act=forum&code=new&type=category' ), - 3 => array( 'Создать форум' , 'section=content&act=forum&code=new&type=forum' ), - 4 => array( 'Маски доступа' , 'section=content&act=group&code=permsplash'), - // 6 => array( 'Модераторы' , 'section=content&act=mod' ), - 7 => array( 'Мульти-модерация тем', 'section=content&act=multimod' ), - 8 => array( 'Настройки корзины' , 'section=tools&act=op&code=findsetting&key=trashcanset-up', '', 0, 1 ), - ); - -$CATS[] = array( 'Пользователи и группы' ); - -$PAGES[] = array( - 1 => array ( 'Поиск и редактирование' , 'section=content&act=mem&code=search' ), - 2 => array ( 'Добавить пользователя' , 'section=content&act=mem&code=add' ), - 3 => array ( 'Звания' , 'section=content&act=mem&code=title'), - 4 => array ( 'Группы' , 'section=content&act=group' ), - 5 => array ( 'Неактивированные' , 'section=content&act=mtools&code=mod' ), - 6 => array ( 'Заблокированные' , 'section=content&act=mtools&code=lock' ), - 9 => array ( 'Дополнительные поля' , 'section=content&act=field' ), - 11 => array ( 'Инструменты IP' , 'section=content&act=mtools' ), - 12 => array ( 'Профили пользователей' , 'section=tools&act=op&code=findsetting&key=userprofiles', '', 0, 1 ), - ); - -// Меню «Подписки» неактуально для Российской Федерации - -/*$CATS[] = array( 'Подписки' ); - -$PAGES[] = array( - 1 => array( 'Manage Payment Gateways' , 'section=content&act=msubs&code=index-gateways' ), - 2 => array( 'Manage Packages' , 'section=content&act=msubs&code=index-packages' ), - 3 => array( 'Manage Transactions' , 'section=content&act=msubs&code=index-tools' ), - 4 => array( 'Manage Currencies' , 'section=content&act=msubs&code=currency' , ), - 5 => array( 'Manually Add Transaction' , 'section=content&act=msubs&code=addtransaction' ), - 6 => array( 'Install Payment Gateways' , 'section=content&act=msubs&code=install-index' ), - 9 => array( 'Subscription Settings' , 'section=tools&act=op&code=findsetting&key='.urlencode('subscriptionsmanager'), '', 0, 1 ), - - );*/ - -$CATS[] = array( 'Календари' ); - -$PAGES[] = array( - 1 => array( 'Список календарей' , 'section=content&act=calendars&code=calendar_list' ), - 2 => array( 'Добавить календарь' , 'section=content&act=calendars&code=calendar_add' ), - ); - -$CATS[] = array( 'Управление RSS' ); - -$PAGES[] = array( - 1 => array( 'Экспорт потоков' , 'section=content&act=rssexport&code=rssexport_overview' ), - 2 => array( 'Импорт потоков' , 'section=content&act=rssimport&code=rssimport_overview' ), - ); - -$CATS[] = array( 'Дополнительные BB-коды' ); - -$PAGES[] = array( - 1 => array( 'Список BB-кодов' , 'section=content&act=bbcode&code=bbcode' ), - 2 => array( 'Добавить BB-код' , 'section=content&act=bbcode&code=bbcode_add' ), - ); - -$CATS[] = array( 'Фильтры' ); - -$PAGES[] = array( - 1 => array( 'Нецензурные слова', 'section=content&act=babw&code=badword' ), - 2 => array( 'Блокировка пользователей' , 'section=content&act=babw&code=ban' ), - ); - -$CATS[] = array( 'Прикрепляемые файлы' ); - -$PAGES[] = array( - 1 => array( 'Типы файлов' , 'section=content&act=attach&code=types' ), - 2 => array( 'Статистика' , 'section=content&act=attach&code=stats' ), - 3 => array( 'Поиск' , 'section=content&act=attach&code=search' ), - ); - - + CONTROL PANEL PAGES FILE +| > Script written by Matt Mecham +| > Date started: Fri 8th April 2005 (12:07) +| ++--------------------------------------------------------------------------- +*/ + +//=========================================================================== +// Simple library that holds all the links for the admin cp +//=========================================================================== + +// CAT_ID => array( PAGE_ID => (PAGE_NAME, URL ) ) + +// $PAGES[ $cat_id ][$page_id][0] = Page name +// $PAGES[ $cat_id ][$page_id][1] = Url +// $PAGES[ $cat_id ][$page_id][2] = Look for folder before showing +// $PAGES[ $cat_id ][$page_id][3] = URL type: 1 = Board URL 0 = ACP URL +// $PAGES[ $cat_id ][$page_id][4] = Item icon: 1= redirect 0 = Normal + +$CATS[] = array( 'Users and Groups' ); + +$PAGES[] = array( + 1 => array ( 'Manage Members' , 'section=content&act=mem&code=search' ), + 2 => array ( 'Add New Member' , 'section=content&act=mem&code=add' ), + 3 => array ( 'Manage Ranks' , 'section=content&act=mem&code=title'), + 4 => array ( 'Manage User Groups' , 'section=content&act=group' ), + 5 => array ( 'Manage Validating' , 'section=content&act=mtools&code=mod' ), + 6 => array ( 'Manage Locked' , 'section=content&act=mtools&code=lock' ), + 9 => array ( 'Custom Profile Fields' , 'section=content&act=field' ), + 11 => array ( 'IP Member Tools' , 'section=content&act=mtools' ), + 12 => array ( 'Member Settings' , 'section=tools&act=op&code=findsetting&key=userprofiles', '', 0, 1 ), + ); + +$CATS[] = array( 'Forum Control' ); + +$PAGES[] = array( + 1 => array( 'Manage Forums' , 'section=content&act=forum' ), + 2 => array( 'Add New Category' , 'section=content&act=forum&code=new&type=category' ), + 3 => array( 'Add New Forum' , 'section=content&act=forum&code=new&type=forum' ), + 4 => array( 'Manage Permissions' , 'section=content&act=group&code=permsplash'), + // 6 => array( 'Moderators' , 'section=content&act=mod' ), + 7 => array( 'Topic Multi-Moderation' , 'section=content&act=multimod' ), + 8 => array( 'Trash Can Set-Up' , 'section=tools&act=op&code=findsetting&key=trashcanset-up', '', 0, 1 ), + ); + +$CATS[] = array( 'Subscriptions' ); + +$PAGES[] = array( + 1 => array( 'Manage Payment Gateways' , 'section=content&act=msubs&code=index-gateways' ), + 2 => array( 'Manage Packages' , 'section=content&act=msubs&code=index-packages' ), + 3 => array( 'Manage Transactions' , 'section=content&act=msubs&code=index-tools' ), + 4 => array( 'Manage Currencies' , 'section=content&act=msubs&code=currency' , ), + 5 => array( 'Manually Add Transaction' , 'section=content&act=msubs&code=addtransaction' ), + 6 => array( 'Install Payment Gateways' , 'section=content&act=msubs&code=install-index' ), + 9 => array( 'Subscription Settings' , 'section=tools&act=op&code=findsetting&key='.urlencode('subscriptionsmanager'), '', 0, 1 ), + + ); + +$CATS[] = array( 'Calendars' ); + +$PAGES[] = array( + 1 => array( 'Calendar Manager' , 'section=content&act=calendars&code=calendar_list' ), + 2 => array( 'Add New Calendar' , 'section=content&act=calendars&code=calendar_add' ), + ); + +$CATS[] = array( 'RSS Management' ); + +$PAGES[] = array( + 1 => array( 'RSS Export Manager' , 'section=content&act=rssexport&code=rssexport_overview' ), + 2 => array( 'RSS Import Manager' , 'section=content&act=rssimport&code=rssimport_overview' ), + ); + +$CATS[] = array( 'Custom BBCode' ); + +$PAGES[] = array( + 1 => array( 'Custom BBCode Manager' , 'section=content&act=bbcode&code=bbcode' ), + 2 => array( 'Add New BBCode' , 'section=content&act=bbcode&code=bbcode_add' ), + ); + +$CATS[] = array( 'Word & Ban Filters' ); + +$PAGES[] = array( + 1 => array( 'Manage Badword Filters', 'section=content&act=babw&code=badword' ), + 2 => array( 'Manage Ban Filters' , 'section=content&act=babw&code=ban' ), + ); + +$CATS[] = array( 'Attachments' ); + +$PAGES[] = array( + 1 => array( 'Attachment Types' , 'section=content&act=attach&code=types' ), + 2 => array( 'Attachment Stats' , 'section=content&act=attach&code=stats' ), + 3 => array( 'Attachment Search' , 'section=content&act=attach&code=search' ), + ); + + ?> \ No newline at end of file diff --git a/upload/sources/acp_loaders/acp_pages_help.php b/upload/sources/acp_loaders/acp_pages_help.php index c4549751..1b1290f6 100644 --- a/upload/sources/acp_loaders/acp_pages_help.php +++ b/upload/sources/acp_loaders/acp_pages_help.php @@ -1,74 +1,66 @@ - CONTROL PANEL (COMPONENTS) PAGES FILE -| > Script written by Matt Mecham -| > Date started: Tue. 15th February 2005 -| -+--------------------------------------------------------------------------- -*/ - -//=========================================================================== -// Небольшая библиотека, контролирующая все ссылки админцентра -// ЭТОТ КЛАСС СТРАНИЦЫ: Генерация меню из БД -//=========================================================================== - -// CAT_ID => array( PAGE_ID => (PAGE_NAME, URL ) ) - -// $PAGES[ $cat_id ][$page_id][0] = Название страницы -// $PAGES[ $cat_id ][$page_id][1] = Ссылка -// $PAGES[ $cat_id ][$page_id][2] = Просмотр директории перед отображением -// $PAGES[ $cat_id ][$page_id][3] = Тип ссылки: 1 = форум 0 = админцентр -// $PAGES[ $cat_id ][$page_id][4] = Иконка меню: 1 = переадресация 0 = нормальная - -global $ipsclass; - -$CATS = array(); -$PAGES = array(); - -$CATS[] = array( 'Помощь и поддержка' ); - -$PAGES[] = array( - 0 => array( 'Задать вопрос' , 'section=help&act=support&code=support' ), - 1 => array( 'Документация IPB' , 'section=help&act=support&code=doctor' ), - 2 => array( 'База знаний IPB' , 'section=help&act=support&code=kb' ), - 3 => array( 'Форумы компании IBResource' , 'section=help&act=support&code=ibresource' ), - 4 => array( 'Контактная информация' , 'section=help&act=support&code=contact' ), - 5 => array( 'Предложения и пожелания' , 'section=help&act=support&code=features' ), - 6 => array( 'Сообщить об ошибке' , 'section=help&act=support&code=bugs' ), - ); - -$CATS[] = array( 'Диагностика' ); - -$PAGES[] = array( - 0 => array( 'Обзор системы' , "section=help&act=diag' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ), - //2 => array( 'Проверка версии' , "section=help&act=diag&code=fileversions' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ), - 3 => array( 'Проверка базы данных' , "section=help&act=diag&code=dbchecker' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ), - 4 => array( 'Проверка индексов БД' , "section=help&act=diag&code=dbindex' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ), - 5 => array( 'Проверка атрибутов файлов' , "section=help&act=diag&code=filepermissions' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ), - 6 => array( 'Проверка на пустые символы' , "section=help&act=diag&code=whitespace' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ), - 7 => array( 'Центр безопасности' , "section=admin&act=security", 0, 0, 1 ), - ); - + CONTROL PANEL (COMPONENTS) PAGES FILE +| > Script written by Matt Mecham +| > Date started: Tue. 15th February 2005 +| ++--------------------------------------------------------------------------- +*/ + +//=========================================================================== +// Simple library that holds all the links for the admin cp +// THIS PAGE CLASS: Generate menu from DB +//=========================================================================== + +// CAT_ID => array( PAGE_ID => (PAGE_NAME, URL ) ) + +// $PAGES[ $cat_id ][$page_id][0] = Page name +// $PAGES[ $cat_id ][$page_id][1] = Url +// $PAGES[ $cat_id ][$page_id][2] = Look for folder before showing +// $PAGES[ $cat_id ][$page_id][3] = URL type: 1 = Board URL 0 = ACP URL +// $PAGES[ $cat_id ][$page_id][4] = Item icon: 1= redirect 0 = Normal +// $PAGES[ $cat_id ][$page_id][5] = Regular link - open exact link in new window + +global $ipsclass; + +$CATS = array(); +$PAGES = array(); + +$CATS[] = array( 'Help & Support' ); + +$PAGES[] = array( + 0 => array( 'Submit Support Ticket' , 'section=help&act=support&code=support' ), + 1 => array( 'IPB Knowledgebase' , 'section=help&act=support&code=kb' ), + 2 => array( 'IPB Documentation' , 'section=help&act=support&code=doctor' ), + 3 => array( 'IPS Resources' , 'section=help&act=support&code=resources' ), + 4 => array( 'Contact IPS' , 'section=help&act=support&code=contact' ), + 5 => array( 'Feature Suggestions' , 'section=help&act=support&code=features' ), + 6 => array( 'Bug Reports' , 'section=help&act=support&code=bugs' ), + ); + +$CATS[] = array( 'Diagnostics' ); + +$PAGES[] = array( + 0 => array( 'System Overview' , "section=help&act=diag' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ), + //2 => array( 'Version Checker' , "section=help&act=diag&code=fileversions' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ), + 3 => array( 'Database Checker' , "section=help&act=diag&code=dbchecker' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ), + 4 => array( 'Database Index Checker' , "section=help&act=diag&code=dbindex' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ), + 5 => array( 'File Permissions Checker' , "section=help&act=diag&code=filepermissions' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ), + 6 => array( 'Whitespace Checker' , "section=help&act=diag&code=whitespace' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ), + 7 => array( 'Security Center' , "section=admin&act=security", 0, 0, 1 ), + ); + ?> \ No newline at end of file diff --git a/upload/sources/acp_loaders/acp_pages_lookandfeel.php b/upload/sources/acp_loaders/acp_pages_lookandfeel.php index 2b09aefd..ea22b8ca 100644 --- a/upload/sources/acp_loaders/acp_pages_lookandfeel.php +++ b/upload/sources/acp_loaders/acp_pages_lookandfeel.php @@ -1,25 +1,16 @@ CONTROL PANEL PAGES FILE @@ -30,42 +21,43 @@ */ //=========================================================================== -// Небольшая библиотека, контролирующая все ссылки админцентра +// Simple library that holds all the links for the admin cp //=========================================================================== // CAT_ID => array( PAGE_ID => (PAGE_NAME, URL ) ) -// $PAGES[ $cat_id ][$page_id][0] = Название страницы -// $PAGES[ $cat_id ][$page_id][1] = Ссылка -// $PAGES[ $cat_id ][$page_id][2] = Просмотр директории перед отображением -// $PAGES[ $cat_id ][$page_id][3] = Тип ссылки: 1 = форум 0 = админцентр -// $PAGES[ $cat_id ][$page_id][4] = Иконка меню: 1 = переадресация 0 = нормальная +// $PAGES[ $cat_id ][$page_id][0] = Page name +// $PAGES[ $cat_id ][$page_id][1] = Url +// $PAGES[ $cat_id ][$page_id][2] = Look for folder before showing +// $PAGES[ $cat_id ][$page_id][3] = URL type: 1 = Board URL 0 = ACP URL +// $PAGES[ $cat_id ][$page_id][4] = Item icon: 1= redirect 0 = Normal -$CATS[] = array( 'Управление стилями' ); +$CATS[] = array( 'Skins & Templates' ); $PAGES[] = array( - 1 => array( 'Список стилей' , 'section=lookandfeel&act=sets' ), - 2 => array( 'Инструменты' , 'section=lookandfeel&act=skintools' ), - 3 => array( 'Поиск и замена' , 'section=lookandfeel&act=skintools&code=searchsplash' ), - 4 => array( 'Импорт и экспорт стилей' , 'section=lookandfeel&act=import' ), - 5 => array( 'Сравнение' , 'section=lookandfeel&act=skindiff' ), - 6 => array( 'Простая смена логотипа' , 'section=lookandfeel&act=skintools&code=easylogo' ), + 1 => array( 'Skin Manager' , 'section=lookandfeel&act=sets' ), + 2 => array( 'Skin Tools' , 'section=lookandfeel&act=skintools' ), + 3 => array( 'Skin Search & Replace' , 'section=lookandfeel&act=skintools&code=searchsplash' ), + 4 => array( 'Skin Import/Export' , 'section=lookandfeel&act=import' ), + 5 => array( 'Skin Differences' , 'section=lookandfeel&act=skindiff' ), + 6 => array( 'Skin Remapping' , 'section=lookandfeel&act=skinremap' ), + 7 => array( 'Easy Logo Changer' , 'section=lookandfeel&act=skintools&code=easylogo' ), ); - -$CATS[] = array( 'Управление языками' ); + +$CATS[] = array( 'Languages' ); $PAGES[] = array( - 1 => array( 'Список языков' , 'section=lookandfeel&act=lang' ), - 2 => array( 'Импорт языка' , 'section=lookandfeel&act=lang&code=import' ), + 1 => array( 'Manage Languages' , 'section=lookandfeel&act=lang' ), + 2 => array( 'Import a Language' , 'section=lookandfeel&act=lang&code=import' ), ); - -$CATS[] = array( 'Управление смайликами' ); + +$CATS[] = array( 'Emoticons' ); $PAGES[] = array( - 1 => array( 'Список директорий' , 'section=lookandfeel&act=emoticons&code=emo' ), - 2 => array( 'Импорт и экспорт' , 'section=lookandfeel&act=emoticons&code=emo_packsplash' ), + 1 => array( 'Emoticon Manager' , 'section=lookandfeel&act=emoticons&code=emo' ), + 2 => array( 'Import/Export Packs' , 'section=lookandfeel&act=emoticons&code=emo_packsplash' ), ); - + ?> \ No newline at end of file diff --git a/upload/sources/acp_loaders/acp_pages_tools.php b/upload/sources/acp_loaders/acp_pages_tools.php index 8718cb3c..ea424c87 100644 --- a/upload/sources/acp_loaders/acp_pages_tools.php +++ b/upload/sources/acp_loaders/acp_pages_tools.php @@ -1,25 +1,16 @@ CONTROL PANEL PAGES FILE @@ -30,70 +21,65 @@ */ //=========================================================================== -// Небольшая библиотека, контролирующая все ссылки админцентра +// Simple library that holds all the links for the admin cp //=========================================================================== // CAT_ID => array( PAGE_ID => (PAGE_NAME, URL ) ) -// $PAGES[ $cat_id ][$page_id][0] = Название страницы -// $PAGES[ $cat_id ][$page_id][1] = Ссылка -// $PAGES[ $cat_id ][$page_id][2] = Просмотр директории перед отображением -// $PAGES[ $cat_id ][$page_id][3] = Тип ссылки: 1 = форум 0 = админцентр -// $PAGES[ $cat_id ][$page_id][4] = Иконка меню: 1 = переадресация 0 = нормальная +// $PAGES[ $cat_id ][$page_id][0] = Page name +// $PAGES[ $cat_id ][$page_id][1] = Url +// $PAGES[ $cat_id ][$page_id][2] = Look for folder before showing +// $PAGES[ $cat_id ][$page_id][3] = URL type: 1 = Board URL 0 = ACP URL +// $PAGES[ $cat_id ][$page_id][4] = Item icon: 1= redirect 0 = Normal -$CATS[] = array( 'Системные настройки' ); +$CATS[] = array( 'System Settings' ); $PAGES[] = array( - 1 => array( 'Список настроек', 'section=tools&act=op' ), - 2 => array( 'Добавить настройку' , 'section=tools&act=op&code=settingnew' ), - 7 => array( 'Включение/выключение' , 'section=tools&act=op&code=findsetting&key='.urlencode('boardoffline'), '', 0, 1 ), - 8 => array( 'Правила форума' , 'section=tools&act=op&code=findsetting&key='.urlencode('boardguidelines'), '', 0, 1 ), - 9 => array( 'Основные настройки' , 'section=tools&act=op&code=findsetting&key='.urlencode('general'), '', 0, 1 ), - 10 => array( 'Настройки быстродействия' , 'section=tools&act=op&code=findsetting&key='.urlencode('cpusaving'), '', 0, 1 ), - //11 => array( 'IP Chat' , 'section=tools&act=pin&code=ipchat' ), - //12 => array( 'IPB Лицензия' , 'section=tools&act=pin&code=reg' ), - //14 => array( 'IPB Удаление копирайта' , 'section=tools&act=pin&code=copy' ), + 1 => array( 'View All General Settings', 'section=tools&act=op' ), + 2 => array( 'Add New General Setting' , 'section=tools&act=op&code=settingnew' ), + 3 => array( 'Manage Portal Plug-ins', 'section=tools&act=portal' ), + 7 => array( 'Turn Board On / Off' , 'section=tools&act=op&code=findsetting&key='.urlencode('boardoffline/online'), '', 0, 1 ), + 8 => array( 'Board Guidelines' , 'section=tools&act=op&code=findsetting&key='.urlencode('boardguidelines'), '', 0, 1 ), + 9 => array( 'General Configuration' , 'section=tools&act=op&code=findsetting&key='.urlencode('generalconfiguration'), '', 0, 1 ), + 10 => array( 'CPU Saving' , 'section=tools&act=op&code=findsetting&key='.urlencode('cpusaving'), '', 0, 1 ), + // 11 => array( 'IP Chat' , 'section=tools&act=pin&code=ipchat' ), + //12 => array( 'IPB License' , 'section=tools&act=pin&code=reg' ), + //14 => array( 'IPB Copyright Removal' , 'section=tools&act=pin&code=copy' ), ); - -$CATS[] = array( 'Обслуживание' ); + +$CATS[] = array( 'Maintenance' ); $PAGES[] = array( - 1 => array( 'Разделы помощи' , 'section=tools&act=help' ), - 2 => array( 'Управление кешем' , 'section=tools&act=admin&code=cache' ), - 3 => array( 'Пересчет и обновление' , 'section=tools&act=rebuild' ), - 4 => array( 'Инструменты очистки' , 'section=tools&act=rebuild&code=tools' ), + 1 => array( 'Manage Help Files' , 'section=tools&act=help' ), + 2 => array( 'Cache Control' , 'section=tools&act=admin&code=cache' ), + 3 => array( 'Recount & Rebuild' , 'section=tools&act=rebuild' ), + 4 => array( 'Clean-up Tools' , 'section=tools&act=rebuild&code=tools' ), ); - -$CATS[] = array( 'Работа с e-mail' ); + +$CATS[] = array( 'Post Office' ); $PAGES[] = array( - 1 => array( 'Список рассылок' , 'section=tools&act=postoffice' ), - 2 => array( 'Создать рассылку' , 'section=tools&act=postoffice&code=mail_new' ), - 3 => array( 'Журнал e-mail отправлений' , 'section=admin&act=emaillog', '', 0, 1 ), - 4 => array( 'Журнал e-mail ошибок' , 'section=admin&act=emailerror', '', 0, 1 ), - 5 => array( 'E-mail настройки' , 'section=tools&act=op&code=findsetting&key=emailset-up', '', 0, 1 ), + 1 => array( 'Manage Bulk Mail' , 'section=tools&act=postoffice' ), + 2 => array( 'Create New Email' , 'section=tools&act=postoffice&code=mail_new' ), + 3 => array( 'View Email Logs' , 'section=admin&act=emaillog', '', 0, 1 ), + 4 => array( 'View Email Error Logs' , 'section=admin&act=emailerror', '', 0, 1 ), + 5 => array( 'Email Settings' , 'section=tools&act=op&code=findsetting&key=emailset-up', '', 0, 1 ), ); -$CATS[] = array( 'Управление порталом' ); +$CATS[] = array( 'Log In Manager' ); $PAGES[] = array( - 1 => array( 'Дополнения', 'section=tools&act=portal' ), + 1 => array( 'Log In Manager' , 'section=tools&act=loginauth' ), + 2 => array( 'Create New Log In' , 'section=tools&act=loginauth&code=login_add' ), ); - -$CATS[] = array( 'Методы авторизации' ); + +$CATS[] = array( 'Task Manager' ); $PAGES[] = array( - 1 => array( 'Список методов' , 'section=tools&act=loginauth' ), - 2 => array( 'Создать новый метод' , 'section=tools&act=loginauth&code=login_add' ), + 1 => array( 'Task Manager' , 'section=tools&act=task' ), + 2 => array( 'View Task Logs' , 'section=tools&act=task&code=log' ), ); - -$CATS[] = array( 'Менеджер задач' ); - -$PAGES[] = array( - 1 => array( 'Список задач' , 'section=tools&act=task' ), - 2 => array( 'Журнал выполненных задач' , 'section=tools&act=task&code=log' ), - ); - - + + ?> \ No newline at end of file diff --git a/upload/sources/acp_loaders/acp_tools.php b/upload/sources/acp_loaders/acp_tools.php index 913dfef1..a584721a 100644 --- a/upload/sources/acp_loaders/acp_tools.php +++ b/upload/sources/acp_loaders/acp_tools.php @@ -1,108 +1,99 @@ - CP "MYCP" PAGE CLASS -| > Script written by Matt Mecham -| > Date started: Wed. 18th August 2004 -| -+--------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - - -class acp_tools -{ - # Globals - var $ipsclass; - - /*-------------------------------------------------------------------------*/ - // CONSTRUCTOR - /*-------------------------------------------------------------------------*/ - - function acp_tools() - { - } - - /*-------------------------------------------------------------------------*/ - // AUTO RUN - /*-------------------------------------------------------------------------*/ - - function auto_run() - { - $this->ipsclass->html_title = "IPB: Утилиты и настройки"; - - $another_choice = array( - - 'op' => 'settings', - 'pin' => 'plugins', - 'cache' => 'cache', - 'rebuild' => 'rebuild', - 'help' => 'help', - 'ips' => 'ips', - 'task' => 'task_manager', - 'admin' => 'administration', - 'postoffice'=> 'postoffice', - 'loginauth' => 'login_auth', - 'portal' => 'portal', - ); - - if ( ! isset( $another_choice[ $this->ipsclass->input['act'] ] ) ) - { - $this->ipsclass->input['act'] = 'op'; - } - - $this->ipsclass->form_code = 'section=tools&act=' . $this->ipsclass->input['act']; - $this->ipsclass->form_code_js = 'section=tools&act=' . $this->ipsclass->input['act']; - $this->ipsclass->section_code = 'tools'; - - //----------------------------------------- - // Quick perm check - //----------------------------------------- - - $this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' ); - - //----------------------------------------- - // Require and run (again) - //----------------------------------------- - - require_once( ROOT_PATH.'sources/action_admin/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' ); - $constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ]; - $runmeagain = new $constructor; - $runmeagain->ipsclass =& $this->ipsclass; - $runmeagain->auto_run(); - } - - - - - -} - - + CP "MYCP" PAGE CLASS +| > Script written by Matt Mecham +| > Date started: Wed. 18th August 2004 +| ++--------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class acp_tools +{ + # Globals + var $ipsclass; + + /*-------------------------------------------------------------------------*/ + // CONSTRUCTOR + /*-------------------------------------------------------------------------*/ + + function acp_tools() + { + } + + /*-------------------------------------------------------------------------*/ + // AUTO RUN + /*-------------------------------------------------------------------------*/ + + function auto_run() + { + $this->ipsclass->html_title = "IPB: Tools & Settings"; + + $another_choice = array( + + 'op' => 'settings', + 'pin' => 'plugins', + 'cache' => 'cache', + 'rebuild' => 'rebuild', + 'help' => 'help', + 'ips' => 'ips', + 'task' => 'task_manager', + 'admin' => 'administration', + 'postoffice'=> 'postoffice', + 'loginauth' => 'login_auth', + 'portal' => 'portal', + ); + + if ( ! isset( $another_choice[ $this->ipsclass->input['act'] ] ) ) + { + $this->ipsclass->input['act'] = 'op'; + } + + $this->ipsclass->form_code = 'section=tools&act=' . $this->ipsclass->input['act']; + $this->ipsclass->form_code_js = 'section=tools&act=' . $this->ipsclass->input['act']; + $this->ipsclass->section_code = 'tools'; + + //----------------------------------------- + // Quick perm check + //----------------------------------------- + + $this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' ); + + //----------------------------------------- + // Require and run (again) + //----------------------------------------- + + require_once( ROOT_PATH.'sources/action_admin/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' ); + $constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ]; + $runmeagain = new $constructor; + $runmeagain->ipsclass =& $this->ipsclass; + $runmeagain->auto_run(); + } + + + + + +} + + ?> \ No newline at end of file diff --git a/upload/sources/acp_loaders/index.html b/upload/sources/acp_loaders/index.html index 250b1f72..af2fbe79 100644 --- a/upload/sources/acp_loaders/index.html +++ b/upload/sources/acp_loaders/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/sources/action_admin/acppermissions.php b/upload/sources/action_admin/acppermissions.php index af5bab18..3721cea9 100644 --- a/upload/sources/action_admin/acppermissions.php +++ b/upload/sources/action_admin/acppermissions.php @@ -1,1372 +1,1354 @@ - $Date: 2006-10-06 04:09:22 -0500 (Fri, 06 Oct 2006) $ -| > $Revision: 611 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > Email Error Logs Stuff -| > Module written by Matt Mecham -| > Date started: 7th April 2004 -| -| > Module Version Number: 1.0.0 -| > DBA Checked: Mon 24th May 2004 -+-------------------------------------------------------------------------- -*/ - -/** -* ACP MODULE: ACP Permissions -* -* Manage ACP permissions -* -* @package InvisionPowerBoard -* @subpackage ActionAdmin -* @author Matt Mecham -* @version 2.1 -* @since 2.1.0.2005-07-08 -*/ - -/** -* -*/ -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Неверный вход

    У вас нет доступа к этому файлу. Если проводилось обновление, убедитесь, что не забыли обновить файл admin.php."; - exit(); -} - -/** -* ACP MODULE: ACP Permissions -* -* Manage ACP permissions -* -* @package InvisionPowerBoard -* @subpackage ActionAdmin -* @author Matt Mecham -* @version 2.1 -* @since 2.1.0.2005-07-08 -*/ -class ad_acppermissions -{ - /** - * Member info array - * - * @var array - */ - var $member_info = array(); - - /*-------------------------------------------------------------------------*/ - // AUTO RUN - /*-------------------------------------------------------------------------*/ - - function auto_run() - { - //----------------------------------------- - // Make sure we're a root admin, or else! - //----------------------------------------- - - if ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) - { - $this->ipsclass->admin->error("Извините, но эти функции доступны только для главных администраторов"); - } - - $this->html = $this->ipsclass->acp_load_template('cp_skin_admin'); - - //----------------------------------------- - // What to do? - //----------------------------------------- - - switch( $this->ipsclass->input['code'] ) - { - case 'acpperms-list': - $this->acpperms_list(); - break; - - case 'acpperms-dev-source-to-xml': - $this->acpperms_dev_source_to_xml(); - break; - case 'acpperms-dev-report-missing': - $this->acpperms_dev_report_missing(); - break; - case 'acpperms-dev-report-language': - $this->acpperms_dev_report_language(); - break; - - case 'accperms-xml-import': - $this->acpperms_xml_import(); - break; - - case 'acpperms-member-add': - $this->acpperms_member_add(); - break; - case 'acpperms-member-add-complete': - $this->acpperms_member_add_complete(); - break; - case 'accperms-member-remove': - $this->accperms_member_remove(); - break; - - case 'acpperms-xml-display': - $this->acpperms_xml_display(); - break; - - case 'acpperms-xml-save-tabs': - $this->acpperms_xml_save( 'tabs' ); - break; - - case 'acpperms-xml-save-group': - $this->acpperms_xml_save( 'group' ); - break; - - case 'acpperms-xml-save-mainbit': - $this->acpperms_xml_save( 'mainbit' ); - break; - case 'acpperms-xml-save-bits': - $this->acpperms_xml_save( 'bits' ); - break; - - default: - $this->acpperms_list(); - break; - } - } - - /*-------------------------------------------------------------------------*/ - // ACP Perms: Remove member (and call him names) - /*-------------------------------------------------------------------------*/ - /** - * ACP Perms: XML display screen (depending on tab and other input) - * - * @return void - * @since 2.1.0.2005-7-11 - */ - function accperms_member_remove() - { - //------------------------------- - // INIT - //------------------------------- - - $member_id = intval( $this->ipsclass->input['mid'] ); - - //------------------------------- - // Check... - //------------------------------- - - if ( ! $member_id ) - { - $this->ipsclass->main_msg = "Вы не указали ID пользователя"; - } - - //------------------------------- - // Remove member's row - //------------------------------- - - $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'admin_permission_rows', 'where' => 'row_member_id='.$member_id ) ); - - //------------------------------- - // Print - //------------------------------- - - $this->ipsclass->main_msg = "Ограничения доступа в админцентр удалены"; - $this->acpperms_list(); - } - - /*-------------------------------------------------------------------------*/ - // ACP Perms: XML Display - /*-------------------------------------------------------------------------*/ - /** - * ACP Perms: XML display screen (depending on tab and other input) - * - * @return void - * @since 2.1.0.2005-7-11 - */ - function acpperms_xml_save( $type='tabs' ) - { - //------------------------------- - // INIT - //------------------------------- - - $this->member_id = intval( $this->ipsclass->input['member_id'] ); - $this->tab = trim( $this->ipsclass->input['tab'] ) ? trim( $this->ipsclass->input['tab'] ) : trim( $this->ipsclass->input['perm_main'] ); - $this->perm_main = $this->tab; - $this->perm_child = trim( $this->ipsclass->input['perm_child'] ); - $this->member_info = array(); - - //------------------------------- - // Check... - //------------------------------- - - if ( ! $this->member_id ) - { - exit(); - } - - //------------------------------- - // Get Member info - //------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => 'p.*', - 'from' => array( 'admin_permission_rows' => 'p' ), - 'where' => 'p.row_member_id='.$this->member_id, - 'add_join' => array( 0 => array( - 'select' => 'm.*', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.id=p.row_member_id', - 'type' => 'inner' ) ), - 'order' => 'm.members_display_name DESC' ) ); - - $this->ipsclass->DB->exec_query(); - - $this->member_info = $this->ipsclass->DB->fetch_row(); - - //------------------------------- - // Unpack array - //------------------------------- - - $this->member_info['_perm_cache'] = unserialize( $this->member_info['row_perm_cache'] ); - - //------------------------------- - // What up? - //------------------------------- - - switch( $type ) - { - case 'tabs': - $this->member_info['_perm_cache'][ $this->perm_main ] = intval( $this->ipsclass->input['result'] ); - break; - case 'mainbit': - $this->member_info['_perm_cache'][ $this->perm_main.':'.$this->perm_child ] = intval( $this->ipsclass->input['result'] ); - break; - case 'bits': - //------------------------------- - // Get bits to save... - //------------------------------- - - foreach( $_REQUEST as $key => $value ) - { - if ( preg_match( "#^pbfs_(.+?)$#i", $key, $match ) ) - { - if ( $match[1] ) - { - $_bit = $match[1]; - $_bitvalue = intval( $this->ipsclass->input[ $match[0] ] ); - - $this->member_info['_perm_cache'][ $this->perm_main.':'.$this->perm_child.':'.$_bit ] = intval( $_bitvalue ); - } - } - } - - break; - case 'group': - //------------------------------- - // Allow perms to this bit - //------------------------------- - $this->member_info['_perm_cache'][ $this->perm_main.':'.$this->perm_child ] = intval( $this->ipsclass->input['result'] ); - - //------------------------------- - // Get bits from DB - //------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'admin_permission_keys', 'where' => "perm_main='{$this->perm_main}' AND perm_child='{$this->perm_child}'" ) ); - $this->ipsclass->DB->exec_query(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - if ( $r['perm_main'] AND $r['perm_child'] AND $r['perm_bit'] ) - { - $this->member_info['_perm_cache'][ $r['perm_main'].':'.$r['perm_child'].':'.$r['perm_bit'] ] = intval( $this->ipsclass->input['result'] ); - } - } - - break; - } - - $this->ipsclass->DB->do_update( 'admin_permission_rows', array( 'row_perm_cache' => serialize( $this->member_info['_perm_cache'] ), - 'row_updated' => time() ), 'row_member_id='.$this->member_id ); - - //------------------------------- - // Print - //------------------------------- - - $this->acpperms_xml_display(); - } - - /*-------------------------------------------------------------------------*/ - // ACP Perms: XML Display - /*-------------------------------------------------------------------------*/ - /** - * ACP Perms: XML display screen (depending on tab and other input) - * - * @return void - * @since 2.1.0.2005-7-11 - */ - function acpperms_xml_display() - { - //------------------------------- - // INIT - //------------------------------- - - $this->member_id = intval( $this->ipsclass->input['member_id'] ); - $this->tab = trim( $this->ipsclass->input['tab'] ) ? trim( $this->ipsclass->input['tab'] ) : trim( $this->ipsclass->input['perm_main'] ); - $this->func = trim( $this->ipsclass->input['func'] ); - $this->perm_main = $this->tab; - $this->perm_child = trim( $this->ipsclass->input['perm_child'] ); - $this->lang = array(); - $this->member_info = array(); - $tab_html = ''; - $content = ''; - $tabinit = array(); - - //------------------------------- - // Check... - //------------------------------- - - if ( ! $this->member_id ) - { - exit(); - } - - //------------------------------- - // Get lang: NEEDS SORTIN' - //------------------------------- - - require_once( ROOT_PATH."cache/lang_cache/ru/acp_lang_acpperms.php" ); - $this->lang = $lang; - - //------------------------------- - // Get Member info - //------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => 'p.*', - 'from' => array( 'admin_permission_rows' => 'p' ), - 'where' => 'p.row_member_id='.$this->member_id, - 'add_join' => array( 0 => array( - 'select' => 'm.*', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.id=p.row_member_id', - 'type' => 'inner' ) ), - 'order' => 'm.members_display_name DESC' ) ); - - $this->ipsclass->DB->exec_query(); - - $this->member_info = $this->ipsclass->DB->fetch_row(); - - //------------------------------- - // Unpack array - //------------------------------- - - $this->member_info['_perm_cache'] = unserialize( $this->member_info['row_perm_cache'] ); - - //------------------------------- - // Build tab HTML - //------------------------------- - - $onoff['content'] = 'taboff'; - $onoff['lookandfeel'] = 'taboff'; - $onoff['tools'] = 'taboff'; - $onoff['components'] = 'taboff'; - $onoff['admin'] = 'taboff'; - $onoff['help'] = 'taboff'; - - $onoff[ $this->tab ] = 'tabon'; - - foreach( $onoff as $t => $s ) - { - $tabinit[ $t ] = intval($this->member_info['_perm_cache'][ $t ]); - } - - //echo "
    ";print_r($tabinit);echo "
    "; - - $tab_html = $this->html->acp_xml_tabs( $onoff, $this->member_id, $tabinit ); - - //print $tab_html;exit; - - //------------------------------- - // What to do? - //------------------------------- - - if ( $this->perm_main ) - { - //------------------------------- - // Show side menu w/ global opt - //------------------------------- - - if ( $this->member_info['_perm_cache'][ $this->perm_main ] ) - { - $content = $this->acpperms_xml_show_global(); - } - else - { - $content = $this->html->acp_xml_tab_no_access( $this->member_info ); - } - - } - else - { - //------------------------------- - // Show welcome screen - //------------------------------- - - $content = $this->acpperms_xml_show_welcome(); - - } - - //------------------------------- - // Print - //------------------------------- - - if ( IPB_ACP_AJAX_UTF_CONVERT ) - { - $tab_html = $this->ipsclass->txt_convert_charsets($tab_html, $this->ipsclass->vars['gb_char_set'], 'utf-8'); - $content = $this->ipsclass->txt_convert_charsets($content, $this->ipsclass->vars['gb_char_set'], 'utf-8'); - } - - print $this->html->acp_xml_wrap( $tab_html, $content ); - exit(); - } - - /*-------------------------------------------------------------------------*/ - // ACP Perms: XML Display: Global - /*-------------------------------------------------------------------------*/ - /** - * ACP Perms: XML display screen [ GLOBAL ] - * - * @return void - * @since 2.1.0.2005-7-8 - */ - function acpperms_xml_show_global() - { - //------------------------------- - // INIT - //------------------------------- - - $content = ''; - $sidebar = ''; - $sidebar_content = ''; - $rows = array(); - $bits = array(); - $menu_data = array(); - $main = ''; - $main_content = ''; - $main_img_classes = array( 'tick' => 'img-boxed-off', 'cross' => 'img-boxed-off' ); - $lang_map = array( 'add' => 'Разрешить ДОБАВЛЕНИЕ', - 'edit' => 'Разрешить РЕДАКТИРОВАНИЕ', - 'remove' => 'Разрешить УДАЛЕНИЕ', - 'import' => 'Разрешить ИМПОРТИРОВАНИЕ', - 'export' => 'Разрешить ЭКСПОРТИРОВАНИЕ', - 'rebuild' => 'Разрешить ОБНОВЛЕНИЕ', - 'recount' => 'Разрешить ПЕРЕСЧЕТ', - 'recache' => 'Разрешить КЕШИРОВАНИЕ', - 'view' => 'Разрешить ПРОСМОТР', - 'search' => 'Разрешить ПОИСК', - 'log' => 'Разрешить УПРАВЛЕНИЕ ЛОГАМИ', - 'show' => 'Разрешить ПРОСМОТР ОСНОВНОГО', - 'upload' => "Разрешить ЗАГРУЗКУ", - 'do' => "Разрешить ПРИМЕНЕНИЕ", - ); - - //------------------------------- - // Not components? - //------------------------------- - - if ( $this->perm_main != 'components' ) - { - //------------------------------- - // Get all groups with this tab - //------------------------------- - - $this->ipsclass->DB->cache_add_query( 'acpperms_get_main_groups', array( 'perm_main' => $this->perm_main ) ); - $this->ipsclass->DB->cache_exec_query(); - - //------------------------------- - // Loop through and build side - //------------------------------- - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $rows[] = $r; - - if ( ! $this->perm_child ) - { - //------------------------------- - // Just set up the default one - //------------------------------- - - $this->perm_child = $r['perm_child']; - } - } - - } - else - { - //------------------------------- - // Get component menus - //------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'components', - 'where' => 'com_enabled=1', - 'order' => 'com_position ASC' ) ); - $this->ipsclass->DB->simple_exec(); - - while( $com = $this->ipsclass->DB->fetch_row() ) - { - $menu_data[ $com['com_section'] ] = unserialize( $com['com_menu_data'] ); - - if ( is_array( $menu_data[ $com['com_section'] ] ) and count( $menu_data[ $com['com_section'] ] ) ) - { - if ( ! $this->perm_child ) - { - $this->perm_child = $com['com_section']; - } - - //------------------------------- - // Populate rows - //------------------------------- - - $rows[] = array( 'perm_main' => 'components', - 'perm_child' => $com['com_section'] ); - - $this->lang[ 'components:'.$com['com_section'] ] = $com['com_title']; - } - } - } - - //------------------------------- - // Go froo the rows - //------------------------------- - - foreach( $rows as $r ) - { - $key = $r['perm_main'].':'.$r['perm_child']; - $lang_bit = $this->lang[ $key ]; - - $sidebar_content .= $this->perm_child == $r['perm_child'] ? $this->html->acp_xml_global_sidebar_link_chosen( $lang_bit, $this->member_id, $r['perm_main'], $r['perm_child'], intval($this->member_info['_perm_cache'][ $key ]) ) - : $this->html->acp_xml_global_sidebar_link( $lang_bit, $this->member_id, $r['perm_main'], $r['perm_child'], intval($this->member_info['_perm_cache'][ $key ]) ); - } - - $sidebar = $this->html->acp_xml_global_sidebar_wrap( $sidebar_content ); - - //------------------------------- - // Get main content - //------------------------------- - - $main_value = intval( $this->member_info['_perm_cache'][ $this->perm_main .':'. $this->perm_child ] ); - $main_class = $main_value ? 'perms-green' : 'perms-red'; - - //------------------------------- - // Not components? - //------------------------------- - - if ( $this->perm_main != 'components' ) - { - $this->ipsclass->DB->build_query( array( 'select' => '*', - 'from' => 'admin_permission_keys', - 'where' => "perm_main='{$this->perm_main}' AND perm_child='{$this->perm_child}'", - 'order' => 'perm_bit ASC' ) ); - - $this->ipsclass->DB->exec_query(); - - while ( $bit = $this->ipsclass->DB->fetch_row() ) - { - $bits[] = $bit; - } - } - //------------------------------- - // IS components - //------------------------------- - else - { - if( count($menu_data[ $this->perm_child ]) ) - { - foreach( $menu_data[ $this->perm_child ] as $menu_array ) - { - if ( $menu_array['menu_permbit'] ) - { - $bits[] = array( 'perm_main' => 'components', - 'perm_child' => $this->perm_child, - 'perm_bit' => $menu_array['menu_permbit'] ); - - if ( $menu_array['menu_permlang'] ) - { - $this->lang[ 'components:'.$this->perm_child.':'.$menu_array['menu_permbit'] ] = $menu_array['menu_permlang']; - } - } - } - } - } - - //------------------------------- - // Loop and print - //------------------------------- - - foreach( $bits as $bit ) - { - $img_classes = array( 'tick' => 'img-boxed-off', 'cross' => 'img-boxed-off' ); - - # Set up key perm_main:perm_child:perm_bit - $key = $this->perm_main.':'.$this->perm_child.':'.$bit['perm_bit']; - - # Got a specific language entry? Use it - $lang_bit = $this->lang[ $key ] ? $this->lang[ $key ] : $lang_map[ $bit['perm_bit'] ]; - - # Got a row in the DB matching KEY? - $value = intval( $this->member_info['_perm_cache'][ $key ] ); - - # Set up BG class for perm bit - $class = $value ? 'perms-green' : 'perms-red'; - - # Set up BG class again... actually enabled this bit yet? - $class = $main_value ? $class : 'perms-gray'; - - # Img classes - cross or ticked? - $value ? $img_classes['tick'] = 'img-boxed' : $img_classes['cross'] = 'img-boxed'; - - $main_content .= $this->html->acp_xml_global_main_row( $lang_bit, $bit['perm_bit'], $value, $class, $img_classes ); - } - - //------------------------------- - // Set up main-wrap contents - //------------------------------- - - # Img classes - cross or ticked? - $main_value ? $main_img_classes['tick'] = 'img-boxed' : $main_img_classes['cross'] = 'img-boxed'; - - if( $main_content ) - { - $main = $this->html->acp_xml_global_main_wrap( $main_content, $main_class, $main_value, $main_img_classes ); - } - else - { - $main = $this->html->acp_xml_global_main_nocomponents( 'perm-gray' ); - } - - //------------------------------- - // Print it - //------------------------------- - - return $this->html->acp_xml_main_wrap( $sidebar, $main ); - } - - /*-------------------------------------------------------------------------*/ - // ACP Perms: XML Display: Welcome - /*-------------------------------------------------------------------------*/ - /** - * ACP Perms: XML display screen [ WELCOME ] - * - * @return void - * @since 2.1.0.2005-7-8 - */ - function acpperms_xml_show_welcome() - { - //------------------------------- - // INIT - //------------------------------- - - $content = ''; - - //------------------------------- - // Check... - //------------------------------- - - return $this->html->acp_xml_welcome( $this->member_info ); - } - - /*-------------------------------------------------------------------------*/ - // ACP Perms: Add member complete - /*-------------------------------------------------------------------------*/ - /** - * ACP Perms: Add member complete - * - * Checks input, adds row to DB if OK - * - * @return void - * @since 2.1.0.2005-7-8 - */ - function acpperms_member_add_complete() - { - //------------------------------- - // INIT - //------------------------------- - - $name = trim( $this->ipsclass->input['entered_name'] ); - $isok = 0; - - //------------------------------- - // Check... - //------------------------------- - - if ( ! $name ) - { - $this->ipsclass->main_msg = "Вы не указали имя пользователя."; - $this->acpperms_member_add(); - } - - //------------------------------- - // Get member... - //------------------------------- - - $this->ipsclass->DB->cache_add_query( 'login_getmember_by_dname', array( 'username' => strtolower($name) ) ); - $this->ipsclass->DB->cache_exec_query(); - - $member = $this->ipsclass->DB->fetch_row(); - - //------------------------------- - // Check... - //------------------------------- - - if ( ! $member['id'] ) - { - $this->ipsclass->main_msg = "Пользователь «{$name}» не найден."; - $this->acpperms_member_add(); - } - - //------------------------------- - // Already got 'em - //------------------------------- - - $test = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'row_member_id', 'from' => 'admin_permission_rows', 'where' => 'row_member_id='.$member['id'] ) ); - - if ( $test['row_member_id'] ) - { - $this->ipsclass->main_msg = "Пользователь «{$name}» уже имеет ограничения доступа в админцентр."; - $this->acpperms_member_add(); - } - - //------------------------------- - // Is Root admin? - //------------------------------- - - if ( $this->ipsclass->vars['admin_group'] == $member['mgroup'] ) - { - $this->ipsclass->main_msg = "Пользователь «{$name}» не может быть ограничен, поскольку находится в группе главных администраторов."; - $this->acpperms_member_add(); - } - - //------------------------------- - // Primary ACP group? - //------------------------------- - - if ( $this->ipsclass->cache['group_cache'][ $member['mgroup'] ]['g_access_cp'] ) - { - $isok = 1; - } - //------------------------------- - // Secondary ACP group? - //------------------------------- - else if ( $member['mgroup_others'] ) - { - foreach( explode( ',', $member['mgroup_others'] ) as $gid ) - { - if ( $this->ipsclass->cache['group_cache'][ $gid ]['g_access_cp'] ) - { - $isok = 1; - break; - } - } - } - - //------------------------------- - // Not oK? - //------------------------------- - - if ( ! $isok ) - { - $this->ipsclass->main_msg = "Пользователя «{$member['members_display_name']}» нельзя добавить, поскольку он не имеет доступ в админцентр."; - $this->acpperms_member_add(); - } - - //------------------------------- - // A-OK - //------------------------------- - - $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'admin_permission_rows', 'where' => 'row_member_id='.$member['id'] ) ); - - $this->ipsclass->DB->do_insert( 'admin_permission_rows', array( 'row_member_id' => $member['id'], - 'row_perm_cache' => serialize( array() ), - 'row_updated' => time() ) ); - - $this->ipsclass->main_msg = "Пользователь «{$member['members_display_name']}» успешно добавлен и сейчас не имеет доступа в админцентр, но вы можете дать ему права через управление ограничениями."; - $this->acpperms_list(); - } - - /*-------------------------------------------------------------------------*/ - // ACP Perms: Add member form - /*-------------------------------------------------------------------------*/ - /** - * ACP Perms: Add member form - * - * Shows form asking for input - * - * @return void - * @since 2.1.0.2005-7-7 - */ - function acpperms_member_add() - { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Управление ограничениями' ); - $this->ipsclass->admin->nav[] = array( '' , 'Добавить администратора' ); - - //------------------------------- - // INIT - //------------------------------- - - //------------------------------- - // Show the form - //------------------------------- - - $this->ipsclass->html .= $this->html->acp_perms_add_admin_form(); - - $this->ipsclass->admin->page_title = "Ограничение администратора"; - $this->ipsclass->admin->page_detail = "Эта секция позволит вам управлять ограничением прав доступа в админцентр для администраторов."; - $this->ipsclass->admin->output(); - } - - /*-------------------------------------------------------------------------*/ - // ACP: Import ACP Permissions file - /*-------------------------------------------------------------------------*/ - /** - * Import XML file - * - * Grabs XML file, parses it and updates missing entries - * - * @return void - * @since 2.1.0.2005-7-7 - */ - function acpperms_xml_import( $noreturn=0 ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $updated = 0; - $inserted = 0; - $cur_perms = array(); - - //----------------------------------------- - // Get file - //----------------------------------------- - - if ( $_FILES['FILE_UPLOAD']['name'] == "" or ! $_FILES['FILE_UPLOAD']['name'] or ($_FILES['FILE_UPLOAD']['name'] == "none") ) - { - //----------------------------------------- - // check and load from server - //----------------------------------------- - - if ( ! $this->ipsclass->input['file_location'] ) - { - $this->ipsclass->main_msg = "Указанный файл не найден."; - $this->acpperms_list(); - } - - if ( ! file_exists( ROOT_PATH . $this->ipsclass->input['file_location'] ) ) - { - $this->ipsclass->main_msg = "Невозможно найти файл: " . ROOT_PATH . $this->ipsclass->input['file_location']; - $this->acpperms_list(); - } - - if ( preg_match( "#\.gz$#", $this->ipsclass->input['file_location'] ) ) - { - if ( $FH = @gzopen( ROOT_PATH.$this->ipsclass->input['file_location'], 'rb' ) ) - { - while ( ! @gzeof( $FH ) ) - { - $content .= @gzread( $FH, 1024 ); - } - - @gzclose( $FH ); - } - } - else - { - if ( $FH = @fopen( ROOT_PATH.$this->ipsclass->input['file_location'], 'rb' ) ) - { - $content = @fread( $FH, filesize(ROOT_PATH.$this->ipsclass->input['file_location']) ); - @fclose( $FH ); - } - } - } - else - { - //----------------------------------------- - // Get uploaded schtuff - //----------------------------------------- - - $tmp_name = $_FILES['FILE_UPLOAD']['name']; - $tmp_name = preg_replace( "#\.gz$#", "", $tmp_name ); - - $content = $this->ipsclass->admin->import_xml( $tmp_name ); - } - - //----------------------------------------- - // Get current permission keys. - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'admin_permission_keys' ) ); - - $this->ipsclass->DB->simple_exec(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $cur_perms[ $r['perm_key'] ] = $r['perm_key']; - } - - //----------------------------------------- - // Get xml mah-do-dah - //----------------------------------------- - - require_once( KERNEL_PATH.'class_xml.php' ); - - $xml = new class_xml(); - - //----------------------------------------- - // Unpack the datafile - //----------------------------------------- - - $xml->xml_parse_document( $content ); - - //----------------------------------------- - // Fix up... - //----------------------------------------- - - if ( ! is_array( $xml->xml_array['permsexport']['permsgroup']['perm'][0] ) ) - { - //----------------------------------------- - // Ensure [0] is populated - //----------------------------------------- - - $tmp = $xml->xml_array['permsexport']['permsgroup']['perm']; - - unset($xml->xml_array['permsexport']['permsgroup']['perm']); - - $xml->xml_array['permsexport']['permsgroup']['perm'][0] = $tmp; - } - - //----------------------------------------- - // Loop through and sort out settings... - //----------------------------------------- - - foreach( $xml->xml_array['permsexport']['permsgroup']['perm'] as $entry ) - { - //----------------------------------------- - // Do we have a row matching this already? - //----------------------------------------- - - $_perm_main = $entry['acpperm_main']['VALUE']; - $_perm_child = $entry['acpperm_child']['VALUE']; - $_perm_bit = $entry['acpperm_bit']['VALUE']; - - $_perm_key = $_perm_main.':'.$_perm_child.':'.$_perm_bit; - - if ( ! $cur_perms[ $_perm_key ] ) - { - $this->ipsclass->DB->do_insert( 'admin_permission_keys', array( 'perm_key' => $_perm_key, - 'perm_main' => $_perm_main, - 'perm_child' => $_perm_child, - 'perm_bit' => $_perm_bit ) ); - - $inserted++; - } - } - - $this->ipsclass->main_msg = "Добавлено ограничений: $inserted"; - - if ( ! $noreturn ) - { - $this->acpperms_list(); - } - } - - /*-------------------------------------------------------------------------*/ - // ACP: DEV: Build report: Language file - /*-------------------------------------------------------------------------*/ - /** - * Build language file basics - * - * Generate language files with empty keys - * - * @return void - * @since 2.1.0.2005-7-7 - */ - function acpperms_dev_report_language() - { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Права доступа в админцентр: инструменты разработчика' ); - - //------------------------------- - // INIT - //------------------------------- - - $content = ""; - $temp = ""; - - //------------------------------- - // Pick through dir - //------------------------------- - - $master = $this->_acpperms_parse_source_folder(); - - //------------------------------- - // ...Check for matches - //------------------------------- - - foreach( $master as $_name => $data ) - { - //------------------------------- - // Got anything? - //------------------------------- - - if ( $master[ $_name ]['perm_main'] AND $master[ $_name ]['perm_child'] AND count($master[ $_name ]['perm_bits']) ) - { - $permkey = $master[ $_name ]['perm_main'].':'.$master[ $_name ]['perm_child']; - - $temp[ $permkey ][] = str_pad("'".$permkey."'", 45, " " ) . "=>\t" . '"'. $this->lang[ $permkey ]. '",'."\n"; - - foreach( $master[ $_name ]['perm_bits'] as $_bit => $bit_data ) - { - $bitkey = $master[ $_name ]['perm_main'].':'.$master[ $_name ]['perm_child'].':'.$_bit; - $temp[ $bitkey ][] = str_pad("'".$bitkey."'", 45, " " ) . "=>\t" . '"'. $bit_data['langstring']. '",'."\n"; - } - } - } - - //------------------------------- - // Re-order by key - //------------------------------- - - ksort( $temp ); - - //------------------------------- - // Implode - //------------------------------- - - foreach( $temp as $data ) - { - foreach( $data as $line ) - { - $content .= $line; - } - } - - //------------------------------- - // Add in single entries - //------------------------------- - - foreach( array( 'admin', 'content', 'lookandfeel', 'components', 'tools', 'help' ) as $bitkey ) - { - $content .= str_pad("'".$bitkey."'", 45, " " ) . "=>\t" . '"'. $this->lang[ $bitkey ]. '",'."\n"; - } - - $this->ipsclass->html .= ""; - - $this->ipsclass->admin->page_title = "Права доступа администраторов"; - $this->ipsclass->admin->page_detail = "Эта секция позволит вам управлять правами доступа администраторов."; - $this->ipsclass->admin->output(); - } - - /*-------------------------------------------------------------------------*/ - // ACP: DEV: Build report: Missing sources - /*-------------------------------------------------------------------------*/ - /** - * Build missing files report - * - * Generate list of files which don't have permission info - * - * @return void - * @since 2.1.0.2005-7-7 - */ - function acpperms_dev_report_missing() - { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Права доступа в админцентр: инструменты разработчика' ); - - //------------------------------- - // INIT - //------------------------------- - - $content = ""; - - //------------------------------- - // Pick through dir - //------------------------------- - - $master = $this->_acpperms_parse_source_folder(); - - //------------------------------- - // ...Check for matches - //------------------------------- - - foreach( $master as $_name => $data ) - { - //------------------------------- - // Got anything? - //------------------------------- - - if ( ! count($master[ $_name ]['perm_bits']) ) - { - $content .= "{$_name}.php нет информации о правах доступа....
    "; - } - else - { - $content .= "{$_name}.php есть информация о правах доступа....
    "; - } - } - - $this->ipsclass->html .= $content; - - $this->ipsclass->admin->page_title = "Права доступа администраторов"; - $this->ipsclass->admin->page_detail = "Эта секция позволит вам управлять правами доступа администраторов."; - $this->ipsclass->admin->output(); - } - - /*-------------------------------------------------------------------------*/ - // Go through sources, regex out permission checks, build XML document - /*-------------------------------------------------------------------------*/ - /** - * Source folder to XML - * - * Generate new XML of permission bits - * - * @return void - * @since 2.1.0.2005-7-7 - */ - function acpperms_dev_source_to_xml() - { - //------------------------------- - // INIT - //------------------------------- - - $content = ""; - - //------------------------------- - // Pick through dir - //------------------------------- - - $master = $this->_acpperms_parse_source_folder(); - - //----------------------------------------- - // Get xml mah-do-dah - //----------------------------------------- - - require_once( KERNEL_PATH.'class_xml.php' ); - - $xml = new class_xml(); - - //----------------------------------------- - // Start... - //----------------------------------------- - - $xml->xml_set_root( 'permsexport', array( 'exported' => time(), 'versionid' => '2.1.0', 'type' => 'master' ) ); - - //----------------------------------------- - // Get group - //----------------------------------------- - - $xml->xml_add_group( 'permsgroup' ); - - //------------------------------- - // ...Check for matches - //------------------------------- - - foreach( $master as $_name => $data ) - { - //------------------------------- - // Got anything? - //------------------------------- - - if ( $master[ $_name ]['perm_main'] AND $master[ $_name ]['perm_child'] AND count($master[ $_name ]['perm_bits']) ) - { - foreach( $master[ $_name ]['perm_bits'] as $_bit => $bit_data ) - { - $content = array(); - - $content[] = $xml->xml_build_simple_tag( 'acpperm_bit' , $bit_data['name'] ); - $content[] = $xml->xml_build_simple_tag( 'acpperm_main' , $master[ $_name ]['perm_main'] ); - $content[] = $xml->xml_build_simple_tag( 'acpperm_child' , $master[ $_name ]['perm_child'] ); - - $entry[] = $xml->xml_build_entry( 'perm', $content ); - } - } - } - - $xml->xml_add_entry_to_group( 'permsgroup', $entry ); - - $xml->xml_format_document(); - - //----------------------------------------- - // Send to browser. - //----------------------------------------- - - $this->ipsclass->admin->show_download( $xml->xml_document, 'ipb_acpperms.xml', '', 0 ); - - exit(); - } - - /*-------------------------------------------------------------------------*/ - // Go through sources, regex out permission checks - /*-------------------------------------------------------------------------*/ - - /** - * Parse sources folder - * - * Parse sources folder, put all perm into $master array - * - * @return array $master array - * @since 2.1.0.2005-7-7 - */ - function _acpperms_parse_source_folder() - { - //------------------------------- - // INIT - //------------------------------- - - $dir = ROOT_PATH . "sources/action_admin"; - $master = array(); - - //------------------------------- - // Load lang file... - //------------------------------- - - require_once( ROOT_PATH . 'cache/lang_cache/ru/acp_lang_acpperms.php' ); - - $this->lang = $lang; - - //------------------------------- - // Loop.... - //------------------------------- - - $handle = opendir($dir); - - while ( ( $file = readdir($handle) ) !== false ) - { - if ( ($file != ".") && ($file != "..") && ($file != '.DS_Store') ) - { - if ( is_file( $dir."/".$file ) ) - { - //------------------------------- - // Open file and get perm rows - //------------------------------- - - $code = implode( '', file( $dir."/".$file ) ); - $_name = str_replace( ".php", "", $file ); - - $master[ $_name ] = array(); - - //------------------------------- - // Get perm main.... - //------------------------------- - - preg_match( '#var\s+?\$perm_main\s+?=\s+?[\'"](.+?)[\'"];#', $code, $match ); - - $master[ $_name ]['perm_main'] = $match[1]; - - //------------------------------- - // Get perm child.... - //------------------------------- - - preg_match( '#var\s+?\$perm_child\s+?=\s+?[\'"](.+?)[\'"];#', $code, $match ); - - $master[ $_name ]['perm_child'] = $match[1]; - - if ( $master[ $_name ]['perm_main'] AND $master[ $_name ]['perm_child'] ) - { - //------------------------------- - // Get perm rows - //------------------------------- - - preg_match_all( '#cp_permission_check\(\s+?\$this->perm_main\.[\'"]\|[\'"]\.\$this->perm_child\.[\'"]\:(.+?)[\'"]\s+?\);#i', $code, $match ); - - for ($i=0; $i < count($match[0]); $i++) - { - $_bit = trim($match[1][$i]); - $master[ $_name ]['perm_bits'][ $_bit ]['name'] = $_bit; - $master[ $_name ]['perm_bits'][ $_bit ]['langstring'] = $lang[ $master[ $_name ]['perm_main'].':'.$master[ $_name ]['perm_child'].':'.$_bit ]; - } - } - } - } - } - - closedir($handle); - - return $master; - } - - /*-------------------------------------------------------------------------*/ - // List current members - /*-------------------------------------------------------------------------*/ - - /** - * List members - * - * @return array $master array - * @since 2.1.0.2005-7-7 - */ - function acpperms_list() - { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Управление ограничениями' ); - - //------------------------------- - // INIT - //------------------------------- - - $content = ""; - $rows = array(); - $admin_groups = array(); - - //------------------------------- - // Get current ACP listed members - //------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => 'p.*', - 'from' => array( 'admin_permission_rows' => 'p' ), - 'add_join' => array( 0 => array( - 'select' => 'm.members_display_name, m.id, m.mgroup', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.id=p.row_member_id', - 'type' => 'inner' ) ), - 'order' => 'm.members_display_name DESC' ) ); - - $this->ipsclass->DB->exec_query(); - - while( $r = $this->ipsclass->DB->fetch_row() ) - { - //------------------------------- - // (Alex) Cross - //------------------------------- - - $r['_date'] = $this->ipsclass->get_date( $r['row_updated'], 'SHORT', 1 ); - $r['_group_name'] = $this->ipsclass->cache['group_cache'][ $r['mgroup'] ]['g_title']; - - $content .= $this->html->acp_perms_row($r); - } - - $this->ipsclass->html .= $this->html->acp_perms_overview( $content ); - - $this->ipsclass->admin->page_title = "Управление ограничениями"; - $this->ipsclass->admin->page_detail = "Эта секция позволит вам управлять ограничением прав администраторов."; - $this->ipsclass->admin->output(); - } - - -} - - + $Date: 2007-07-13 13:51:38 -0400 (Fri, 13 Jul 2007) $ +| > $Revision: 1087 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > Email Error Logs Stuff +| > Module written by Matt Mecham +| > Date started: 7th April 2004 +| +| > Module Version Number: 1.0.0 +| > DBA Checked: Mon 24th May 2004 ++-------------------------------------------------------------------------- +*/ + +/** +* ACP MODULE: ACP Permissions +* +* Manage ACP permissions +* +* @package InvisionPowerBoard +* @subpackage ActionAdmin +* @author Matt Mecham +* @version 2.1 +* @since 2.1.0.2005-07-08 +*/ + +/** +* +*/ +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +/** +* ACP MODULE: ACP Permissions +* +* Manage ACP permissions +* +* @package InvisionPowerBoard +* @subpackage ActionAdmin +* @author Matt Mecham +* @version 2.1 +* @since 2.1.0.2005-07-08 +*/ +class ad_acppermissions +{ + /** + * Member info array + * + * @var array + */ + var $member_info = array(); + + /*-------------------------------------------------------------------------*/ + // AUTO RUN + /*-------------------------------------------------------------------------*/ + + function auto_run() + { + //----------------------------------------- + // Make sure we're a root admin, or else! + //----------------------------------------- + + if ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) + { + $this->ipsclass->admin->error("Sorry, these functions are for the root admin group only"); + } + + $this->html = $this->ipsclass->acp_load_template('cp_skin_admin'); + + //----------------------------------------- + // What to do? + //----------------------------------------- + + switch( $this->ipsclass->input['code'] ) + { + case 'acpperms-list': + $this->acpperms_list(); + break; + + case 'acpperms-dev-source-to-xml': + $this->acpperms_dev_source_to_xml(); + break; + case 'acpperms-dev-report-missing': + $this->acpperms_dev_report_missing(); + break; + case 'acpperms-dev-report-language': + $this->acpperms_dev_report_language(); + break; + + case 'accperms-xml-import': + $this->acpperms_xml_import(); + break; + + case 'acpperms-member-add': + $this->acpperms_member_add(); + break; + case 'acpperms-member-add-complete': + $this->acpperms_member_add_complete(); + break; + case 'accperms-member-remove': + $this->accperms_member_remove(); + break; + + case 'acpperms-xml-display': + $this->acpperms_xml_display(); + break; + + case 'acpperms-xml-save-tabs': + $this->acpperms_xml_save( 'tabs' ); + break; + + case 'acpperms-xml-save-group': + $this->acpperms_xml_save( 'group' ); + break; + + case 'acpperms-xml-save-mainbit': + $this->acpperms_xml_save( 'mainbit' ); + break; + case 'acpperms-xml-save-bits': + $this->acpperms_xml_save( 'bits' ); + break; + + default: + $this->acpperms_list(); + break; + } + } + + /*-------------------------------------------------------------------------*/ + // ACP Perms: Remove member (and call him names) + /*-------------------------------------------------------------------------*/ + /** + * ACP Perms: XML display screen (depending on tab and other input) + * + * @return void + * @since 2.1.0.2005-7-11 + */ + function accperms_member_remove() + { + //------------------------------- + // INIT + //------------------------------- + + $member_id = intval( $this->ipsclass->input['mid'] ); + + //------------------------------- + // Check... + //------------------------------- + + if ( ! $member_id ) + { + $this->ipsclass->main_msg = "No member ID passed"; + } + + //------------------------------- + // Remove member's row + //------------------------------- + + $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'admin_permission_rows', 'where' => 'row_member_id='.$member_id ) ); + + //------------------------------- + // Print + //------------------------------- + + $this->ipsclass->main_msg = "Member's restrictions lifted"; + $this->acpperms_list(); + } + + /*-------------------------------------------------------------------------*/ + // ACP Perms: XML Display + /*-------------------------------------------------------------------------*/ + /** + * ACP Perms: XML display screen (depending on tab and other input) + * + * @return void + * @since 2.1.0.2005-7-11 + */ + function acpperms_xml_save( $type='tabs' ) + { + //------------------------------- + // INIT + //------------------------------- + + $this->member_id = intval( $this->ipsclass->input['member_id'] ); + $this->tab = trim( $this->ipsclass->input['tab'] ) ? trim( $this->ipsclass->input['tab'] ) : trim( $this->ipsclass->input['perm_main'] ); + $this->perm_main = $this->tab; + $this->perm_child = trim( $this->ipsclass->input['perm_child'] ); + $this->member_info = array(); + + //------------------------------- + // Check... + //------------------------------- + + if ( ! $this->member_id ) + { + exit(); + } + + //------------------------------- + // Get Member info + //------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => 'p.*', + 'from' => array( 'admin_permission_rows' => 'p' ), + 'where' => 'p.row_member_id='.$this->member_id, + 'add_join' => array( 0 => array( + 'select' => 'm.*', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.id=p.row_member_id', + 'type' => 'inner' ) ), + 'order' => 'm.members_display_name DESC' ) ); + + $this->ipsclass->DB->exec_query(); + + $this->member_info = $this->ipsclass->DB->fetch_row(); + + //------------------------------- + // Unpack array + //------------------------------- + + $this->member_info['_perm_cache'] = unserialize( $this->member_info['row_perm_cache'] ); + + //------------------------------- + // What up? + //------------------------------- + + switch( $type ) + { + case 'tabs': + $this->member_info['_perm_cache'][ $this->perm_main ] = intval( $this->ipsclass->input['result'] ); + break; + case 'mainbit': + $this->member_info['_perm_cache'][ $this->perm_main.':'.$this->perm_child ] = intval( $this->ipsclass->input['result'] ); + break; + case 'bits': + //------------------------------- + // Get bits to save... + //------------------------------- + + foreach( $this->ipsclass->input as $key => $value ) + { + if ( preg_match( "#^pbfs_(.+?)$#i", $key, $match ) ) + { + if ( $match[1] ) + { + $_bit = $match[1]; + $_bitvalue = intval( $this->ipsclass->input[ $match[0] ] ); + + $this->member_info['_perm_cache'][ $this->perm_main.':'.$this->perm_child.':'.$_bit ] = intval( $_bitvalue ); + } + } + } + + break; + case 'group': + //------------------------------- + // Allow perms to this bit + //------------------------------- + $this->member_info['_perm_cache'][ $this->perm_main.':'.$this->perm_child ] = intval( $this->ipsclass->input['result'] ); + + //------------------------------- + // Get bits from DB + //------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'admin_permission_keys', 'where' => "perm_main='{$this->perm_main}' AND perm_child='{$this->perm_child}'" ) ); + $this->ipsclass->DB->exec_query(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + if ( $r['perm_main'] AND $r['perm_child'] AND $r['perm_bit'] ) + { + $this->member_info['_perm_cache'][ $r['perm_main'].':'.$r['perm_child'].':'.$r['perm_bit'] ] = intval( $this->ipsclass->input['result'] ); + } + } + + break; + } + + $this->ipsclass->DB->do_update( 'admin_permission_rows', array( 'row_perm_cache' => serialize( $this->member_info['_perm_cache'] ), + 'row_updated' => time() ), 'row_member_id='.$this->member_id ); + + //------------------------------- + // Print + //------------------------------- + + $this->acpperms_xml_display(); + } + + /*-------------------------------------------------------------------------*/ + // ACP Perms: XML Display + /*-------------------------------------------------------------------------*/ + /** + * ACP Perms: XML display screen (depending on tab and other input) + * + * @return void + * @since 2.1.0.2005-7-11 + */ + function acpperms_xml_display() + { + //------------------------------- + // INIT + //------------------------------- + + $this->member_id = intval( $this->ipsclass->input['member_id'] ); + $this->tab = trim( $this->ipsclass->input['tab'] ) ? trim( $this->ipsclass->input['tab'] ) : trim( $this->ipsclass->input['perm_main'] ); + $this->func = trim( $this->ipsclass->input['func'] ); + $this->perm_main = $this->tab; + $this->perm_child = trim( $this->ipsclass->input['perm_child'] ); + $this->lang = array(); + $this->member_info = array(); + $tab_html = ''; + $content = ''; + $tabinit = array(); + + //------------------------------- + // Check... + //------------------------------- + + if ( ! $this->member_id ) + { + exit(); + } + + //------------------------------- + // Get lang: NEEDS SORTIN' + //------------------------------- + + require_once( ROOT_PATH."cache/lang_cache/en/acp_lang_acpperms.php" ); + $this->lang = $lang; + + //------------------------------- + // Get Member info + //------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => 'p.*', + 'from' => array( 'admin_permission_rows' => 'p' ), + 'where' => 'p.row_member_id='.$this->member_id, + 'add_join' => array( 0 => array( + 'select' => 'm.*', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.id=p.row_member_id', + 'type' => 'inner' ) ), + 'order' => 'm.members_display_name DESC' ) ); + + $this->ipsclass->DB->exec_query(); + + $this->member_info = $this->ipsclass->DB->fetch_row(); + + //------------------------------- + // Unpack array + //------------------------------- + + $this->member_info['_perm_cache'] = unserialize( $this->member_info['row_perm_cache'] ); + + //------------------------------- + // Build tab HTML + //------------------------------- + + $onoff['content'] = 'taboff'; + $onoff['lookandfeel'] = 'taboff'; + $onoff['tools'] = 'taboff'; + $onoff['components'] = 'taboff'; + $onoff['admin'] = 'taboff'; + $onoff['help'] = 'taboff'; + + $onoff[ $this->tab ] = 'tabon'; + + foreach( $onoff as $t => $s ) + { + $tabinit[ $t ] = intval($this->member_info['_perm_cache'][ $t ]); + } + + //echo "
    ";print_r($tabinit);echo "
    "; + + $tab_html = $this->html->acp_xml_tabs( $onoff, $this->member_id, $tabinit ); + + //print $tab_html;exit; + + //------------------------------- + // What to do? + //------------------------------- + + if ( $this->perm_main ) + { + //------------------------------- + // Show side menu w/ global opt + //------------------------------- + + if ( $this->member_info['_perm_cache'][ $this->perm_main ] ) + { + $content = $this->acpperms_xml_show_global(); + } + else + { + $content = $this->html->acp_xml_tab_no_access( $this->member_info ); + } + + } + else + { + //------------------------------- + // Show welcome screen + //------------------------------- + + $content = $this->acpperms_xml_show_welcome(); + + } + + //------------------------------- + // Print + //------------------------------- + + print $this->html->acp_xml_wrap( $tab_html, $content ); + exit(); + } + + /*-------------------------------------------------------------------------*/ + // ACP Perms: XML Display: Global + /*-------------------------------------------------------------------------*/ + /** + * ACP Perms: XML display screen [ GLOBAL ] + * + * @return void + * @since 2.1.0.2005-7-8 + */ + function acpperms_xml_show_global() + { + //------------------------------- + // INIT + //------------------------------- + + $content = ''; + $sidebar = ''; + $sidebar_content = ''; + $rows = array(); + $bits = array(); + $menu_data = array(); + $main = ''; + $main_content = ''; + $main_img_classes = array( 'tick' => 'img-boxed-off', 'cross' => 'img-boxed-off' ); + $lang_map = array( 'add' => 'Allow ADD permission', + 'edit' => 'Allow EDIT permission', + 'remove' => 'Allow DELETE permission', + 'import' => 'Allow IMPORT permission', + 'export' => 'Allow EXPORT permission', + 'rebuild' => 'Allow REBUILD permission', + 'recount' => 'Allow RECOUNT permission', + 'recache' => 'Allow RECACHE permission', + 'view' => 'Allow VIEW permission', + 'search' => 'Allow SEARCH permission', + 'log' => 'Allow MANAGE LOGS permission', + 'show' => 'Allow BASIC VIEW permission', + 'upload' => "Allow UPLOAD permission", + 'do' => "Allow PERFORM permission", + ); + + //------------------------------- + // Not components? + //------------------------------- + + if ( $this->perm_main != 'components' ) + { + //------------------------------- + // Get all groups with this tab + //------------------------------- + + $this->ipsclass->DB->cache_add_query( 'acpperms_get_main_groups', array( 'perm_main' => $this->perm_main ) ); + $this->ipsclass->DB->cache_exec_query(); + + //------------------------------- + // Loop through and build side + //------------------------------- + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $rows[] = $r; + + if ( ! $this->perm_child ) + { + //------------------------------- + // Just set up the default one + //------------------------------- + + $this->perm_child = $r['perm_child']; + } + } + + } + else + { + //------------------------------- + // Get component menus + //------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', + 'from' => 'components', + 'where' => 'com_enabled=1', + 'order' => 'com_position ASC' ) ); + $this->ipsclass->DB->simple_exec(); + + while( $com = $this->ipsclass->DB->fetch_row() ) + { + $menu_data[ $com['com_section'] ] = unserialize( $com['com_menu_data'] ); + + if ( is_array( $menu_data[ $com['com_section'] ] ) and count( $menu_data[ $com['com_section'] ] ) ) + { + if ( ! $this->perm_child ) + { + $this->perm_child = $com['com_section']; + } + + //------------------------------- + // Populate rows + //------------------------------- + + $rows[] = array( 'perm_main' => 'components', + 'perm_child' => $com['com_section'] ); + + $this->lang[ 'components:'.$com['com_section'] ] = $com['com_title']; + } + } + } + + //------------------------------- + // Go froo the rows + //------------------------------- + + foreach( $rows as $r ) + { + $key = $r['perm_main'].':'.$r['perm_child']; + $lang_bit = $this->lang[ $key ]; + + $sidebar_content .= $this->perm_child == $r['perm_child'] ? $this->html->acp_xml_global_sidebar_link_chosen( $lang_bit, $this->member_id, $r['perm_main'], $r['perm_child'], intval($this->member_info['_perm_cache'][ $key ]) ) + : $this->html->acp_xml_global_sidebar_link( $lang_bit, $this->member_id, $r['perm_main'], $r['perm_child'], intval($this->member_info['_perm_cache'][ $key ]) ); + } + + $sidebar = $this->html->acp_xml_global_sidebar_wrap( $sidebar_content ); + + //------------------------------- + // Get main content + //------------------------------- + + $main_value = intval( $this->member_info['_perm_cache'][ $this->perm_main .':'. $this->perm_child ] ); + $main_class = $main_value ? 'perms-green' : 'perms-red'; + + //------------------------------- + // Not components? + //------------------------------- + + if ( $this->perm_main != 'components' ) + { + $this->ipsclass->DB->build_query( array( 'select' => '*', + 'from' => 'admin_permission_keys', + 'where' => "perm_main='{$this->perm_main}' AND perm_child='{$this->perm_child}'", + 'order' => 'perm_bit ASC' ) ); + + $this->ipsclass->DB->exec_query(); + + while ( $bit = $this->ipsclass->DB->fetch_row() ) + { + $bits[] = $bit; + } + } + //------------------------------- + // IS components + //------------------------------- + else + { + if( count($menu_data[ $this->perm_child ]) ) + { + foreach( $menu_data[ $this->perm_child ] as $menu_array ) + { + if ( $menu_array['menu_permbit'] ) + { + $bits[] = array( 'perm_main' => 'components', + 'perm_child' => $this->perm_child, + 'perm_bit' => $menu_array['menu_permbit'] ); + + if ( $menu_array['menu_permlang'] ) + { + $this->lang[ 'components:'.$this->perm_child.':'.$menu_array['menu_permbit'] ] = $menu_array['menu_permlang']; + } + } + } + } + } + + //------------------------------- + // Loop and print + //------------------------------- + + foreach( $bits as $bit ) + { + $img_classes = array( 'tick' => 'img-boxed-off', 'cross' => 'img-boxed-off' ); + + # Set up key perm_main:perm_child:perm_bit + $key = $this->perm_main.':'.$this->perm_child.':'.$bit['perm_bit']; + + # Got a specific language entry? Use it + $lang_bit = $this->lang[ $key ] ? $this->lang[ $key ] : $lang_map[ $bit['perm_bit'] ]; + + # Got a row in the DB matching KEY? + $value = intval( $this->member_info['_perm_cache'][ $key ] ); + + # Set up BG class for perm bit + $class = $value ? 'perms-green' : 'perms-red'; + + # Set up BG class again... actually enabled this bit yet? + $class = $main_value ? $class : 'perms-gray'; + + # Img classes - cross or ticked? + $value ? $img_classes['tick'] = 'img-boxed' : $img_classes['cross'] = 'img-boxed'; + + $main_content .= $this->html->acp_xml_global_main_row( $lang_bit, $bit['perm_bit'], $value, $class, $img_classes ); + } + + //------------------------------- + // Set up main-wrap contents + //------------------------------- + + # Img classes - cross or ticked? + $main_value ? $main_img_classes['tick'] = 'img-boxed' : $main_img_classes['cross'] = 'img-boxed'; + + if( $main_content ) + { + $main = $this->html->acp_xml_global_main_wrap( $main_content, $main_class, $main_value, $main_img_classes ); + } + else + { + $main = $this->html->acp_xml_global_main_nocomponents( 'perm-gray' ); + } + + //------------------------------- + // Print it + //------------------------------- + + return $this->html->acp_xml_main_wrap( $sidebar, $main ); + } + + /*-------------------------------------------------------------------------*/ + // ACP Perms: XML Display: Welcome + /*-------------------------------------------------------------------------*/ + /** + * ACP Perms: XML display screen [ WELCOME ] + * + * @return void + * @since 2.1.0.2005-7-8 + */ + function acpperms_xml_show_welcome() + { + //------------------------------- + // INIT + //------------------------------- + + $content = ''; + + //------------------------------- + // Check... + //------------------------------- + + return $this->html->acp_xml_welcome( $this->member_info ); + } + + /*-------------------------------------------------------------------------*/ + // ACP Perms: Add member complete + /*-------------------------------------------------------------------------*/ + /** + * ACP Perms: Add member complete + * + * Checks input, adds row to DB if OK + * + * @return void + * @since 2.1.0.2005-7-8 + */ + function acpperms_member_add_complete() + { + //------------------------------- + // INIT + //------------------------------- + + $name = trim( $this->ipsclass->input['entered_name'] ); + $isok = 0; + + //------------------------------- + // Check... + //------------------------------- + + if ( ! $name ) + { + $this->ipsclass->main_msg = "You must enter a name before submitting the form."; + $this->acpperms_member_add(); + } + + //------------------------------- + // Get member... + //------------------------------- + + $this->ipsclass->DB->cache_add_query( 'login_getmember_by_dname', array( 'username' => strtolower($name) ) ); + $this->ipsclass->DB->cache_exec_query(); + + $member = $this->ipsclass->DB->fetch_row(); + + //------------------------------- + // Check... + //------------------------------- + + if ( ! $member['id'] ) + { + $this->ipsclass->main_msg = "{$name} cannot be found."; + $this->acpperms_member_add(); + } + + //------------------------------- + // Already got 'em + //------------------------------- + + $test = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'row_member_id', 'from' => 'admin_permission_rows', 'where' => 'row_member_id='.$member['id'] ) ); + + if ( $test['row_member_id'] ) + { + $this->ipsclass->main_msg = "{$name} already has restrictions in place."; + $this->acpperms_member_add(); + } + + //------------------------------- + // Is Root admin? + //------------------------------- + + if ( $this->ipsclass->vars['admin_group'] == $member['mgroup'] ) + { + $this->ipsclass->main_msg = "{$name}'s primary group is the Root Admin group and cannot be restricted."; + $this->acpperms_member_add(); + } + + //------------------------------- + // Primary ACP group? + //------------------------------- + + if ( $this->ipsclass->cache['group_cache'][ $member['mgroup'] ]['g_access_cp'] ) + { + $isok = 1; + } + //------------------------------- + // Secondary ACP group? + //------------------------------- + else if ( $member['mgroup_others'] ) + { + foreach( explode( ',', $member['mgroup_others'] ) as $gid ) + { + if ( $this->ipsclass->cache['group_cache'][ $gid ]['g_access_cp'] ) + { + $isok = 1; + break; + } + } + } + + //------------------------------- + // Not oK? + //------------------------------- + + if ( ! $isok ) + { + $this->ipsclass->main_msg = "{$member['members_display_name']} does not have access to the ACP and cannot be added."; + $this->acpperms_member_add(); + } + + //------------------------------- + // A-OK + //------------------------------- + + $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'admin_permission_rows', 'where' => 'row_member_id='.$member['id'] ) ); + + $this->ipsclass->DB->do_insert( 'admin_permission_rows', array( 'row_member_id' => $member['id'], + 'row_perm_cache' => serialize( array() ), + 'row_updated' => time() ) ); + + $this->ipsclass->main_msg = "{$member['members_display_name']} successfully added and now has no ACP access until you allow it by managing his/her restrictions."; + $this->acpperms_list(); + } + + /*-------------------------------------------------------------------------*/ + // ACP Perms: Add member form + /*-------------------------------------------------------------------------*/ + /** + * ACP Perms: Add member form + * + * Shows form asking for input + * + * @return void + * @since 2.1.0.2005-7-7 + */ + function acpperms_member_add() + { + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'ACP Restrictions' ); + $this->ipsclass->admin->nav[] = array( '' , 'Add an administrator' ); + + //------------------------------- + // INIT + //------------------------------- + + //------------------------------- + // Show the form + //------------------------------- + + $this->ipsclass->html .= $this->html->acp_perms_add_admin_form(); + + $this->ipsclass->admin->page_title = "Admin Restrictions"; + $this->ipsclass->admin->page_detail = "This section will allow you to manage your admin restriction permissions."; + $this->ipsclass->admin->output(); + } + + /*-------------------------------------------------------------------------*/ + // ACP: Import ACP Permissions file + /*-------------------------------------------------------------------------*/ + /** + * Import XML file + * + * Grabs XML file, parses it and updates missing entries + * + * @return void + * @since 2.1.0.2005-7-7 + */ + function acpperms_xml_import( $noreturn=0 ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $updated = 0; + $inserted = 0; + $cur_perms = array(); + + //----------------------------------------- + // Get file + //----------------------------------------- + + if ( $_FILES['FILE_UPLOAD']['name'] == "" or ! $_FILES['FILE_UPLOAD']['name'] or ($_FILES['FILE_UPLOAD']['name'] == "none") ) + { + //----------------------------------------- + // check and load from server + //----------------------------------------- + + if ( ! $this->ipsclass->input['file_location'] ) + { + $this->ipsclass->main_msg = "No upload file was found and no filename was specified."; + $this->acpperms_list(); + } + + if ( ! file_exists( ROOT_PATH . $this->ipsclass->input['file_location'] ) ) + { + $this->ipsclass->main_msg = "Could not find the file to open at: " . ROOT_PATH . $this->ipsclass->input['file_location']; + $this->acpperms_list(); + } + + if ( preg_match( "#\.gz$#", $this->ipsclass->input['file_location'] ) ) + { + if ( $FH = @gzopen( ROOT_PATH.$this->ipsclass->input['file_location'], 'rb' ) ) + { + while ( ! @gzeof( $FH ) ) + { + $content .= @gzread( $FH, 1024 ); + } + + @gzclose( $FH ); + } + } + else + { + if ( $FH = @fopen( ROOT_PATH.$this->ipsclass->input['file_location'], 'rb' ) ) + { + $content = @fread( $FH, filesize(ROOT_PATH.$this->ipsclass->input['file_location']) ); + @fclose( $FH ); + } + } + } + else + { + //----------------------------------------- + // Get uploaded schtuff + //----------------------------------------- + + $tmp_name = $_FILES['FILE_UPLOAD']['name']; + $tmp_name = preg_replace( "#\.gz$#", "", $tmp_name ); + + $content = $this->ipsclass->admin->import_xml( $tmp_name ); + } + + //----------------------------------------- + // Get current permission keys. + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', + 'from' => 'admin_permission_keys' ) ); + + $this->ipsclass->DB->simple_exec(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $cur_perms[ $r['perm_key'] ] = $r['perm_key']; + } + + //----------------------------------------- + // Get xml mah-do-dah + //----------------------------------------- + + require_once( KERNEL_PATH.'class_xml.php' ); + + $xml = new class_xml(); + + //----------------------------------------- + // Unpack the datafile + //----------------------------------------- + + $xml->xml_parse_document( $content ); + + //----------------------------------------- + // Fix up... + //----------------------------------------- + + if ( ! is_array( $xml->xml_array['permsexport']['permsgroup']['perm'][0] ) ) + { + //----------------------------------------- + // Ensure [0] is populated + //----------------------------------------- + + $xml->xml_array['permsexport']['permsgroup']['perm'] = array( 0 => $xml->xml_array['permsexport']['permsgroup']['perm'] ); + } + + //----------------------------------------- + // Loop through and sort out settings... + //----------------------------------------- + + foreach( $xml->xml_array['permsexport']['permsgroup']['perm'] as $entry ) + { + //----------------------------------------- + // Do we have a row matching this already? + //----------------------------------------- + + $_perm_main = $entry['acpperm_main']['VALUE']; + $_perm_child = $entry['acpperm_child']['VALUE']; + $_perm_bit = $entry['acpperm_bit']['VALUE']; + + $_perm_key = $_perm_main.':'.$_perm_child.':'.$_perm_bit; + + if ( ! $cur_perms[ $_perm_key ] ) + { + $this->ipsclass->DB->do_insert( 'admin_permission_keys', array( 'perm_key' => $_perm_key, + 'perm_main' => $_perm_main, + 'perm_child' => $_perm_child, + 'perm_bit' => $_perm_bit ) ); + + $inserted++; + } + } + + $this->ipsclass->main_msg = "$inserted permissions keys inserted"; + + if ( ! $noreturn ) + { + $this->acpperms_list(); + } + } + + /*-------------------------------------------------------------------------*/ + // ACP: DEV: Build report: Language file + /*-------------------------------------------------------------------------*/ + /** + * Build language file basics + * + * Generate language files with empty keys + * + * @return void + * @since 2.1.0.2005-7-7 + */ + function acpperms_dev_report_language() + { + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'ACP Permissions: Developer Tools' ); + + //------------------------------- + // INIT + //------------------------------- + + $content = ""; + $temp = ""; + + //------------------------------- + // Pick through dir + //------------------------------- + + $master = $this->_acpperms_parse_source_folder(); + + //------------------------------- + // ...Check for matches + //------------------------------- + + foreach( $master as $_name => $data ) + { + //------------------------------- + // Got anything? + //------------------------------- + + if ( $master[ $_name ]['perm_main'] AND $master[ $_name ]['perm_child'] AND count($master[ $_name ]['perm_bits']) ) + { + $permkey = $master[ $_name ]['perm_main'].':'.$master[ $_name ]['perm_child']; + + $temp[ $permkey ][] = str_pad("'".$permkey."'", 45, " " ) . "=>\t" . '"'. $this->lang[ $permkey ]. '",'."\n"; + + foreach( $master[ $_name ]['perm_bits'] as $_bit => $bit_data ) + { + $bitkey = $master[ $_name ]['perm_main'].':'.$master[ $_name ]['perm_child'].':'.$_bit; + $temp[ $bitkey ][] = str_pad("'".$bitkey."'", 45, " " ) . "=>\t" . '"'. $bit_data['langstring']. '",'."\n"; + } + } + } + + //------------------------------- + // Re-order by key + //------------------------------- + + ksort( $temp ); + + //------------------------------- + // Implode + //------------------------------- + + foreach( $temp as $data ) + { + foreach( $data as $line ) + { + $content .= $line; + } + } + + //------------------------------- + // Add in single entries + //------------------------------- + + foreach( array( 'admin', 'content', 'lookandfeel', 'components', 'tools', 'help' ) as $bitkey ) + { + $content .= str_pad("'".$bitkey."'", 45, " " ) . "=>\t" . '"'. $this->lang[ $bitkey ]. '",'."\n"; + } + + $this->ipsclass->html .= ""; + + $this->ipsclass->admin->page_title = "Admin Permissions"; + $this->ipsclass->admin->page_detail = "This section will allow you to manage your admin permissions."; + $this->ipsclass->admin->output(); + } + + /*-------------------------------------------------------------------------*/ + // ACP: DEV: Build report: Missing sources + /*-------------------------------------------------------------------------*/ + /** + * Build missing files report + * + * Generate list of files which don't have permission info + * + * @return void + * @since 2.1.0.2005-7-7 + */ + function acpperms_dev_report_missing() + { + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'ACP Permissions: Developer Tools' ); + + //------------------------------- + // INIT + //------------------------------- + + $content = ""; + + //------------------------------- + // Pick through dir + //------------------------------- + + $master = $this->_acpperms_parse_source_folder(); + + //------------------------------- + // ...Check for matches + //------------------------------- + + foreach( $master as $_name => $data ) + { + //------------------------------- + // Got anything? + //------------------------------- + + if ( ! count($master[ $_name ]['perm_bits']) ) + { + $content .= "{$_name}.php has no permission information....
    "; + } + else + { + $content .= "{$_name}.php has permission information....
    "; + } + } + + $this->ipsclass->html .= $content; + + $this->ipsclass->admin->page_title = "Admin Permissions"; + $this->ipsclass->admin->page_detail = "This section will allow you to manage your admin permissions."; + $this->ipsclass->admin->output(); + } + + /*-------------------------------------------------------------------------*/ + // Go through sources, regex out permission checks, build XML document + /*-------------------------------------------------------------------------*/ + /** + * Source folder to XML + * + * Generate new XML of permission bits + * + * @return void + * @since 2.1.0.2005-7-7 + */ + function acpperms_dev_source_to_xml() + { + //------------------------------- + // INIT + //------------------------------- + + $content = ""; + + //------------------------------- + // Pick through dir + //------------------------------- + + $master = $this->_acpperms_parse_source_folder(); + + //----------------------------------------- + // Get xml mah-do-dah + //----------------------------------------- + + require_once( KERNEL_PATH.'class_xml.php' ); + + $xml = new class_xml(); + + //----------------------------------------- + // Start... + //----------------------------------------- + + $xml->xml_set_root( 'permsexport', array( 'exported' => time(), 'versionid' => '2.1.0', 'type' => 'master' ) ); + + //----------------------------------------- + // Get group + //----------------------------------------- + + $xml->xml_add_group( 'permsgroup' ); + + //------------------------------- + // ...Check for matches + //------------------------------- + + foreach( $master as $_name => $data ) + { + //------------------------------- + // Got anything? + //------------------------------- + + if ( $master[ $_name ]['perm_main'] AND $master[ $_name ]['perm_child'] AND count($master[ $_name ]['perm_bits']) ) + { + foreach( $master[ $_name ]['perm_bits'] as $_bit => $bit_data ) + { + $content = array(); + + $content[] = $xml->xml_build_simple_tag( 'acpperm_bit' , $bit_data['name'] ); + $content[] = $xml->xml_build_simple_tag( 'acpperm_main' , $master[ $_name ]['perm_main'] ); + $content[] = $xml->xml_build_simple_tag( 'acpperm_child' , $master[ $_name ]['perm_child'] ); + + $entry[] = $xml->xml_build_entry( 'perm', $content ); + } + } + } + + $xml->xml_add_entry_to_group( 'permsgroup', $entry ); + + $xml->xml_format_document(); + + //----------------------------------------- + // Send to browser. + //----------------------------------------- + + $this->ipsclass->admin->show_download( $xml->xml_document, 'ipb_acpperms.xml', '', 0 ); + + exit(); + } + + /*-------------------------------------------------------------------------*/ + // Go through sources, regex out permission checks + /*-------------------------------------------------------------------------*/ + + /** + * Parse sources folder + * + * Parse sources folder, put all perm into $master array + * + * @return array $master array + * @since 2.1.0.2005-7-7 + */ + function _acpperms_parse_source_folder() + { + //------------------------------- + // INIT + //------------------------------- + + $dir = ROOT_PATH . "sources/action_admin"; + $master = array(); + + //------------------------------- + // Load lang file... + //------------------------------- + + require_once( ROOT_PATH . 'cache/lang_cache/en/acp_lang_acpperms.php' ); + + $this->lang = $lang; + + //------------------------------- + // Loop.... + //------------------------------- + + $handle = opendir($dir); + + while ( ( $file = readdir($handle) ) !== false ) + { + if ( ($file != ".") && ($file != "..") && ($file != '.DS_Store') ) + { + if ( is_file( $dir."/".$file ) ) + { + //------------------------------- + // Open file and get perm rows + //------------------------------- + + $code = implode( '', file( $dir."/".$file ) ); + $_name = str_replace( ".php", "", $file ); + + $master[ $_name ] = array(); + + //------------------------------- + // Get perm main.... + //------------------------------- + + preg_match( '#var\s+?\$perm_main\s+?=\s+?[\'"](.+?)[\'"];#', $code, $match ); + + $master[ $_name ]['perm_main'] = $match[1]; + + //------------------------------- + // Get perm child.... + //------------------------------- + + preg_match( '#var\s+?\$perm_child\s+?=\s+?[\'"](.+?)[\'"];#', $code, $match ); + + $master[ $_name ]['perm_child'] = $match[1]; + + if ( $master[ $_name ]['perm_main'] AND $master[ $_name ]['perm_child'] ) + { + //------------------------------- + // Get perm rows + //------------------------------- + + preg_match_all( '#cp_permission_check\(\s+?\$this->perm_main\.[\'"]\|[\'"]\.\$this->perm_child\.[\'"]\:(.+?)[\'"]\s+?\);#i', $code, $match ); + + for ($i=0; $i < count($match[0]); $i++) + { + $_bit = trim($match[1][$i]); + $master[ $_name ]['perm_bits'][ $_bit ]['name'] = $_bit; + $master[ $_name ]['perm_bits'][ $_bit ]['langstring'] = $lang[ $master[ $_name ]['perm_main'].':'.$master[ $_name ]['perm_child'].':'.$_bit ]; + } + } + } + } + } + + closedir($handle); + + return $master; + } + + /*-------------------------------------------------------------------------*/ + // List current members + /*-------------------------------------------------------------------------*/ + + /** + * List members + * + * @return array $master array + * @since 2.1.0.2005-7-7 + */ + function acpperms_list() + { + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'ACP Restrictions' ); + + //------------------------------- + // INIT + //------------------------------- + + $content = ""; + $rows = array(); + $admin_groups = array(); + + //------------------------------- + // Get current ACP listed members + //------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => 'p.*', + 'from' => array( 'admin_permission_rows' => 'p' ), + 'add_join' => array( 0 => array( + 'select' => 'm.members_display_name, m.id, m.mgroup', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.id=p.row_member_id', + 'type' => 'inner' ) ), + 'order' => 'm.members_display_name DESC' ) ); + + $this->ipsclass->DB->exec_query(); + + while( $r = $this->ipsclass->DB->fetch_row() ) + { + //------------------------------- + // (Alex) Cross + //------------------------------- + + $r['_date'] = $this->ipsclass->get_date( $r['row_updated'], 'SHORT', 1 ); + $r['_group_name'] = $this->ipsclass->cache['group_cache'][ $r['mgroup'] ]['g_title']; + + $content .= $this->html->acp_perms_row($r); + } + + $this->ipsclass->html .= $this->html->acp_perms_overview( $content ); + + $this->ipsclass->admin->page_title = "Admin Restrictions"; + $this->ipsclass->admin->page_detail = "This section will allow you to manage your admin restriction permissions."; + $this->ipsclass->admin->output(); + } + + +} + + ?> \ No newline at end of file diff --git a/upload/sources/action_admin/administration.php b/upload/sources/action_admin/administration.php index 46c7ea6c..3984e9d0 100644 --- a/upload/sources/action_admin/administration.php +++ b/upload/sources/action_admin/administration.php @@ -1,769 +1,761 @@ - $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > Administration Module -| > Module written by Matt Mecham -| > Date started: 27th January 2004 -| -| > Module Version Number: 1.0.0 -| > DBA Checked: Mon 24th May 2004 -+-------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Неверный вход

    У вас нет доступа к этому файлу. Если проводилось обновление, убедитесь, что не забыли обновить файл admin.php."; - exit(); -} - -class ad_administration -{ - var $ipsclass; - var $html; - var $map; - - /** - * Section title name - * - * @var string - */ - var $perm_main = "tools"; - - /** - * Section title name - * - * @var string - */ - var $perm_child = "admin"; - - function auto_run() - { - //----------------------------------------- - // Require and RUN !! THERES A BOMB - //----------------------------------------- - - $this->ipsclass->admin->page_detail = "Управление кешем позволяет вам просматривать и обновлять содержимое кеша форума."; - $this->ipsclass->admin->page_title = "Управление кешем"; - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Управление кешем' ); - - //----------------------------------------- - // Load skin - //----------------------------------------- - - $this->html = $this->ipsclass->acp_load_template('cp_skin_tools'); - - //----------------------------------------- - // Map - //----------------------------------------- - - $this->map = array( 'forum_cache' => 'Форумы', - 'group_cache' => 'Пользовательские группы', - 'systemvars' => 'Системные переменные', - 'skin_id_cache' => 'Стили', - 'moderators' => 'Модераторы', - 'stats' => 'Статистика форума', - 'ranks' => 'Статусы пользователей', - 'profilefields' => 'Дополнительные поля в профиле', - 'birthdays' => 'Дни рождения пользователей', - 'calendar' => 'Предстоящие события календаря', - 'calendars' => 'Созданные календари', - 'multimod' => 'Мульти-модерация', - 'bbcode' => "Дополнительные BB-коды", - 'settings' => "Настройки форума", - 'emoticons' => 'Смайлики', - 'badwords' => 'Фильтр нецензурных слов', - 'languages' => 'Языковые настройки', - 'banfilters' => 'Фильтры блокировки', - 'attachtypes' => 'Типы прикрепляемых файлов', - 'announcements' => 'Объявления', - 'components' => 'Компоненты IPB', - ); - - //----------------------------------------- - // What to do... - //----------------------------------------- - - switch($this->ipsclass->input['code']) - { - case 'cacheend': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recache' ); - $this->cache_end(); - break; - - case 'viewcache': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->view_cache(); - break; - - case 'cache_update_all': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recache' ); - $this->ipsclass->admin->output_multiple_redirect_init( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code_js.'&code=cache_update_all_process&id=0' ); - break; - - case 'cache_update_all_process': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recache' ); - $this->cache_update_all_process(); - break; - - default: - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->cache_start(); - break; - } - } - - /*-------------------------------------------------------------------------*/ - // Process.... - /*-------------------------------------------------------------------------*/ - - function cache_update_all_process() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $id = intval( $this->ipsclass->input['id'] ); - $cache_name = ''; - $count = 0; - $img = '- '; - - //----------------------------------------- - // Get cache name - //----------------------------------------- - - foreach( $this->map as $name => $desc ) - { - if ( $count == $id ) - { - $cache_name = $name; - break; - } - - $count++; - } - - //----------------------------------------- - // Do what, now? - //----------------------------------------- - - $id++; - - if ( $cache_name ) - { - $this->cache_end( $cache_name, 1 ); - - $this->ipsclass->admin->output_multiple_redirect_hit( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code_js.'&code=cache_update_all_process&id='.$id, $img.$cache_name.' обновлен...' ); - } - else - { - $this->ipsclass->admin->output_multiple_redirect_done(); - } - } - - /*-------------------------------------------------------------------------*/ - // DO VIEW - /*-------------------------------------------------------------------------*/ - - function view_cache() - { - if ( ! $this->ipsclass->input['cache'] ) - { - $this->ipsclass->main_msg = "ID не найден, попробуйте еще раз"; - $this->cache_start(); - } - - $row = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='{$this->ipsclass->input['cache']}'" ) ); - - ob_start(); - if ( $row['cs_array'] ) - { - print_r( unserialize($this->ipsclass->txt_stripslashes($row['cs_value'])) ); - } - else - { - print $row['cs_value']; - } - - $out = ob_get_contents(); - ob_end_clean(); - - $this->ipsclass->html = "
    ".htmlspecialchars($out)."
    "; - - $this->ipsclass->admin->print_popup(); - } - - /*-------------------------------------------------------------------------*/ - // DO UPDATE - /*-------------------------------------------------------------------------*/ - - function cache_end( $cache_name='', $dontcancel=0 ) - { - if ( ! $cache_name ) - { - $cache_name = $this->ipsclass->input['cache']; - } - - switch ( $cache_name ) - { - //----------------------------------------- - // Forum cache - //----------------------------------------- - - case 'forum_cache': - - $this->ipsclass->update_forum_cache(); - - $this->ipsclass->main_msg = 'Кеш форумов обновлен'; - break; - - //----------------------------------------- - // Group Cache - //----------------------------------------- - - case 'group_cache': - $this->ipsclass->cache['group_cache'] = array(); - - $this->ipsclass->DB->simple_construct( array( 'select' => "*", - 'from' => 'groups' - ) ); - - $this->ipsclass->DB->simple_exec(); - - while ( $i = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->cache['group_cache'][ $i['g_id'] ] = $i; - } - - $this->ipsclass->update_cache( array( 'name' => 'group_cache', 'array' => 1, 'deletefirst' => 1 ) ); - - $this->ipsclass->main_msg = 'Кеш групп пользователей обновлен'; - break; - - //----------------------------------------- - // Systemvars - //----------------------------------------- - - case 'systemvars': - $this->ipsclass->cache['systemvars'] = array(); - - $result = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as cnt', 'from' => 'mail_queue' ) ); - - $this->ipsclass->cache['systemvars']['mail_queue'] = intval( $result['cnt'] ); - - if ($this->ipsclass->vars['load_limit'] > 0) - { - # @ supressor fixes warning in >4.3.2 with open_basedir restrictions - - if ( @file_exists('/proc/loadavg') ) - { - if ( $fh = @fopen( '/proc/loadavg', 'r' ) ) - { - $data = @fread( $fh, 6 ); - @fclose( $fh ); - - $load_avg = explode( " ", $data ); - - $this->ipsclass->server_load = trim($load_avg[0]); - } - } - else if( strstr( strtolower(PHP_OS), 'win' ) ) - { - /*--------------------------------------------------------------- - | typeperf is an exe program that is included with Win NT, - | XP Pro, and 2K3 Server. It can be installed on 2K from the - | 2K Resource kit. It will return the real time processor - | Percentage, but will take 1 second processing time to do so. - | This is why we shall cache it, and check only every 2 mins. - | - | Can also be obtained from COM, but it's extremely slow... - ---------------------------------------------------------------*/ - - $serverstats = @shell_exec("typeperf \"Processor(_Total)\% Processor Time\" -sc 1"); - - if( $serverstats ) - { - $server_reply = explode( "\n", str_replace( "\r", "", $serverstats ) ); - $serverstats = array_slice( $server_reply, 2, 1 ); - - $statline = explode( ",", str_replace( '"', '', $serverstats[0] ) ); - - $this->ipsclass->server_load = round( $statline[1], 4 ); - } - } - else - { - if ( $serverstats = @exec("uptime") ) - { - preg_match( "/(?:averages)?\: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/", $serverstats, $load ); - - $this->ipsclass->server_load = $load[1]; - } - } - - if( $this->ipsclass->server_load ) - { - $this->ipsclass->cache['systemvars']['loadlimit'] = $this->ipsclass->server_load."-".time(); - } - } - - $this->ipsclass->update_cache( array( 'name' => 'systemvars', 'array' => 1, 'deletefirst' => 1 ) ); - - require_once( ROOT_PATH.'sources/lib/func_taskmanager.php' ); - $task = new func_taskmanager(); - $task->ipsclass =& $this->ipsclass; - $task->save_next_run_stamp(); - - $this->ipsclass->main_msg = 'Кеш переменных системы обновлен'; - break; - - //----------------------------------------- - // Skin ID cache - //----------------------------------------- - - case 'skin_id_cache': - require_once( ROOT_PATH.'sources/lib/admin_cache_functions.php' ); - $admin = new admin_cache_functions(); - $admin->ipsclass =& $this->ipsclass; - $admin->_rebuild_skin_id_cache(); - - $this->ipsclass->main_msg = 'Кеш стилей обновлен'; - break; - - //----------------------------------------- - // Moderators - //----------------------------------------- - - case 'moderators': - - $this->ipsclass->cache['moderators'] = array(); - - require_once( ROOT_PATH.'sources/action_admin/moderator.php' ); - $this->mod = new ad_moderator(); - $this->mod->ipsclass =& $this->ipsclass; - - $this->mod->rebuild_moderator_cache(); - - $this->ipsclass->main_msg = 'Кеш модераторов обновлен'; - break; - - //----------------------------------------- - // Stats - //----------------------------------------- - - case 'stats': - - - - - $this->ipsclass->main_msg = 'Кеш статистики обновлен'; - break; - - //----------------------------------------- - // Ranks - //----------------------------------------- - - case 'ranks': - - $this->ipsclass->cache['ranks'] = array(); - - $this->ipsclass->DB->simple_construct( array( 'select' => 'id, title, pips, posts', - 'from' => 'titles', - 'order' => "posts DESC", - ) ); - - $this->ipsclass->DB->simple_exec(); - - while ($i = $this->ipsclass->DB->fetch_row()) - { - $this->ipsclass->cache['ranks'][ $i['id'] ] = array( - 'TITLE' => $i['title'], - 'PIPS' => $i['pips'], - 'POSTS' => $i['posts'], - ); - } - - $this->ipsclass->update_cache( array( 'name' => 'ranks', 'array' => 1, 'deletefirst' => 1 ) ); - - $this->ipsclass->main_msg = 'Кеш званий обновлен'; - break; - - //----------------------------------------- - // Profile Fields - //----------------------------------------- - - case 'profilefields': - - $this->ipsclass->cache['profilefields'] = array(); - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'pfields_data', 'order' => 'pf_position' ) ); - - $this->ipsclass->DB->simple_exec(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->cache['profilefields'][ $r['pf_id'] ] = $r; - } - - $this->ipsclass->update_cache( array( 'name' => 'profilefields', 'array' => 1, 'deletefirst' => 1 ) ); - - $this->ipsclass->main_msg = 'Кеш полей профиля обновлен'; - break; - - //----------------------------------------- - // Calendar - //----------------------------------------- - - case 'calendar': - - require_once( ROOT_PATH.'sources/lib/func_taskmanager.php' ); - $func = new func_taskmanager(); - $func->ipsclass =& $this->ipsclass; - - require_once( ROOT_PATH.'sources/tasks/calendarevents.php' ); - - $task = new task_item(); - $task->register_class( $func ); - $task->restrict_log = 1; - $task->run_task(); - - $this->ipsclass->main_msg = 'Календарные события обновлены'; - break; - - case 'calendars': - - require_once( ROOT_PATH.'sources/action_admin/calendars.php' ); - $cal = new ad_calendars(); - $cal->ipsclass =& $this->ipsclass; - $cal->calendars_rebuildcache(); - - $this->ipsclass->main_msg = 'Кеш календарей обновлен'; - break; - - //----------------------------------------- - // Birthdays - //----------------------------------------- - - case 'birthdays': - - require_once( ROOT_PATH.'sources/lib/func_taskmanager.php' ); - $func = new func_taskmanager(); - $func->ipsclass =& $this->ipsclass; - - require_once( ROOT_PATH.'sources/tasks/calendarevents.php' ); - - $task = new task_item(); - $task->register_class( $func ); - $task->restrict_log = 1; - $task->run_task(); - - $this->ipsclass->main_msg = 'Кеш дней рождения обновлен'; - break; - - //----------------------------------------- - // Multimoderation - //----------------------------------------- - - case 'multimod': - - $this->ipsclass->cache['multimod'] = array(); - - $this->ipsclass->DB->simple_construct( array( - 'select' => '*', - 'from' => 'topic_mmod', - 'order' => 'mm_title' - ) ); - - $this->ipsclass->DB->simple_exec(); - - while ($i = $this->ipsclass->DB->fetch_row()) - { - $this->ipsclass->cache['multimod'][ $i['mm_id'] ] = $i; - } - - $this->ipsclass->update_cache( array( 'name' => 'multimod', 'array' => 1, 'deletefirst' => 1 ) ); - - $this->ipsclass->main_msg = 'Мульти-модерация обновлена'; - break; - - //----------------------------------------- - // BBCODE - //----------------------------------------- - - case 'bbcode': - - require_once( ROOT_PATH.'sources/action_admin/bbcode.php' ); - $this->bbcode = new ad_bbcode(); - $this->bbcode->ipsclass =& $this->ipsclass; - - $this->bbcode->bbcode_rebuildcache(); - - $this->ipsclass->main_msg = 'Кеш дополнительных BB-кодов обновлен'; - break; - - //----------------------------------------- - // SETTINGS - //----------------------------------------- - - case 'settings': - - $this->ipsclass->cache['settings'] = array(); - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'conf_settings', 'where' => 'conf_add_cache=1' ) ); - $info = $this->ipsclass->DB->simple_exec(); - - while ( $r = $this->ipsclass->DB->fetch_row($info) ) - { - $value = $r['conf_value'] != "" ? $r['conf_value'] : $r['conf_default']; - - if ( $value == '{blank}' ) - { - $value = ''; - } - - $this->ipsclass->cache['settings'][ $r['conf_key'] ] = $value; - } - - $this->ipsclass->update_cache( array( 'name' => 'settings', 'array' => 1, 'deletefirst' => 1 ) ); - - $this->ipsclass->main_msg = 'Настройки обновлены'; - break; - - //----------------------------------------- - // EMOTICONS - //----------------------------------------- - - case 'emoticons': - - require_once( ROOT_PATH.'sources/action_admin/emoticons.php' ); - $this->emoticons = new ad_emoticons(); - $this->emoticons->ipsclass =& $this->ipsclass; - - $this->emoticons->emoticon_rebuildcache(); - - $this->ipsclass->main_msg = 'Смайлики обновлены'; - break; - - //----------------------------------------- - // BADWORDS - //----------------------------------------- - - case 'badwords': - - require_once( ROOT_PATH.'sources/action_admin/banandbadword.php' ); - $this->banandbadword = new ad_banandbadword(); - $this->banandbadword->ipsclass =& $this->ipsclass; - - $this->banandbadword->badword_rebuildcache(); - - $this->ipsclass->main_msg = 'Фильтр нецензурных слов обновлен'; - break; - - //----------------------------------------- - // LANGUAGES - //----------------------------------------- - - case 'languages': - - $this->ipsclass->cache['languages'] = array(); - - $this->ipsclass->DB->simple_construct( array( 'select' => 'ldir,lname', 'from' => 'languages' ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->cache['languages'][] = $r; - } - - $this->ipsclass->update_cache( array( 'name' => 'languages', 'array' => 1, 'deletefirst' => 1 ) ); - - $this->ipsclass->main_msg = 'Языки обновлены'; - break; - - //----------------------------------------- - // BAN FILTERS - //----------------------------------------- - - case 'banfilters': - - require_once( ROOT_PATH.'sources/action_admin/banandbadword.php' ); - $this->banandbadword = new ad_banandbadword(); - $this->banandbadword->ipsclass =& $this->ipsclass; - - $this->banandbadword->ban_rebuildcache(); - - $this->ipsclass->main_msg = 'Фильтр блокировки (ban) обновлен'; - break; - - //----------------------------------------- - // ATTACHMENT TYPES - //----------------------------------------- - - case 'attachtypes': - $this->ipsclass->cache['attachtypes'] = array(); - - $this->ipsclass->DB->simple_construct( array( 'select' => 'atype_extension,atype_mimetype,atype_post,atype_photo,atype_img', 'from' => 'attachments_type', 'where' => "atype_photo=1 OR atype_post=1" ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->cache['attachtypes'][ $r['atype_extension'] ] = $r; - } - - $this->ipsclass->update_cache( array( 'name' => 'attachtypes', 'array' => 1, 'deletefirst' => 1 ) ); - - $this->ipsclass->main_msg = 'Кеш типов прикрепляемых файлов обновлен'; - break; - - //----------------------------------------- - // Announcements - //----------------------------------------- - - case 'announcements': - - require_once( ROOT_PATH.'sources/action_public/announcements.php' ); - $announcements = new announcements(); - $announcements->ipsclass =& $this->ipsclass; - $announcements->announce_recache(); - - $this->ipsclass->main_msg = 'Объявления обновлены'; - break; - - //----------------------------------------- - // BBCODE - //----------------------------------------- - - case 'components': - - require_once( ROOT_PATH.'sources/action_admin/components.php' ); - $this->components = new ad_components(); - $this->components->ipsclass =& $this->ipsclass; - - $this->components->components_rebuildcache(); - - $this->ipsclass->main_msg = 'Компоненты обновлены'; - break; - - default: - $this->ipsclass->main_msg = 'Нечего обновлять'; - break; - } - - if ( ! $dontcancel ) - { - $this->cache_start(); - } - } - - /*-------------------------------------------------------------------------*/ - // SHOW CACHE FORM - /*-------------------------------------------------------------------------*/ - - function cache_start() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $used = array(); - $content = ""; - - //----------------------------------------- - // SHOW CACHES - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'cache_store', 'order' => 'cs_key' ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $row = $this->ipsclass->DB->fetch_row() ) - { - if ( ! in_array( $row['cs_key'], array_keys( $this->map ) ) ) - { - continue; - } - - $used[ $row['cs_key'] ] = $row['cs_key']; - $row['_size'] = ceil( intval( strlen( $row['cs_value'] ) ) / 1024 ); - $row['_desc'] = $this->map[ $row['cs_key'] ]; - - $content .= $this->html->cache_row( $row ); - } - - if ( count( $used ) != count( $this->map ) ) - { - foreach( $this->map as $k => $v ) - { - if ( in_array( $k, array_keys( $used ) ) ) - { - continue; - } - else - { - $row['cs_key'] = $k; - $row['cs_value'] = $v; - $row['_size'] = 0; - $row['_desc'] = $this->map[ $row['cs_key'] ]; - - $content .= $this->html->cache_row( $row ); - } - } - } - - $this->ipsclass->html .= $this->html->cache_overview( $content ); - - $this->ipsclass->admin->output(); - } - - /*-------------------------------------------------------------------------*/ - // PERL - /*-------------------------------------------------------------------------*/ - - function perly_length_sort($a, $b) - { - if ( strlen($a['typed']) == strlen($b['typed']) ) - { - return 0; - } - return ( strlen($a['typed']) > strlen($b['typed']) ) ? -1 : 1; - } - - function perly_word_sort($a, $b) - { - if ( strlen($a['type']) == strlen($b['type']) ) - { - return 0; - } - return ( strlen($a['type']) > strlen($b['type']) ) ? -1 : 1; - } - - - - - - -} - - + $Date: 2007-06-19 11:26:29 -0400 (Tue, 19 Jun 2007) $ +| > $Revision: 1046 $ +| > $Author: matt $ ++--------------------------------------------------------------------------- +| +| > Administration Module +| > Module written by Matt Mecham +| > Date started: 27th January 2004 +| +| > Module Version Number: 1.0.0 +| > DBA Checked: Mon 24th May 2004 ++-------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class ad_administration +{ + var $ipsclass; + var $html; + var $map; + + /** + * Section title name + * + * @var string + */ + var $perm_main = "tools"; + + /** + * Section title name + * + * @var string + */ + var $perm_child = "admin"; + + function auto_run() + { + //----------------------------------------- + // Require and RUN !! THERES A BOMB + //----------------------------------------- + + $this->ipsclass->admin->page_detail = "The cache manager allows you to view the contents of your cache and update them."; + $this->ipsclass->admin->page_title = "Cache Manager"; + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Cache Manager' ); + + //----------------------------------------- + // Load skin + //----------------------------------------- + + $this->html = $this->ipsclass->acp_load_template('cp_skin_tools'); + + //----------------------------------------- + // Map + //----------------------------------------- + + $this->map = array( 'forum_cache' => 'All forum information and data', + 'group_cache' => 'All member group infomation and data', + 'systemvars' => 'System runtime variables', + 'skin_id_cache' => 'Skin set information and data', + 'moderators' => 'All moderator information and data', + 'stats' => 'Board stats, such as total posts, etc', + 'ranks' => 'Member titles and rank information', + 'profilefields' => 'Custom profile field information', + 'birthdays' => 'Members birthdays', + 'calendar' => 'Forthcoming calendar events', + 'calendars' => 'Calendars you have created in the calendar manager', + 'multimod' => 'Multi-moderation information and data', + 'bbcode' => "Custom BBCode information and data", + 'settings' => "Board settings and variables", + 'emoticons' => 'Emoticon information and data', + 'badwords' => 'Bad Word Filters information and data', + 'languages' => 'Language Set information', + 'banfilters' => 'Banned IP addresses', + 'attachtypes' => 'Attachment Types information', + 'announcements' => 'Announcements cache', + 'components' => 'Components enabled on your IPB', + ); + + //----------------------------------------- + // What to do... + //----------------------------------------- + + switch($this->ipsclass->input['code']) + { + case 'cacheend': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recache' ); + $this->cache_end(); + break; + + case 'viewcache': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->view_cache(); + break; + + case 'cache_update_all': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recache' ); + $this->ipsclass->admin->output_multiple_redirect_init( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code_js.'&code=cache_update_all_process&id=0' ); + break; + + case 'cache_update_all_process': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recache' ); + $this->cache_update_all_process(); + break; + + default: + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->cache_start(); + break; + } + } + + /*-------------------------------------------------------------------------*/ + // Process.... + /*-------------------------------------------------------------------------*/ + + function cache_update_all_process() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $id = intval( $this->ipsclass->input['id'] ); + $cache_name = ''; + $count = 0; + $img = '- '; + + //----------------------------------------- + // Get cache name + //----------------------------------------- + + foreach( $this->map as $name => $desc ) + { + if ( $count == $id ) + { + $cache_name = $name; + break; + } + + $count++; + } + + //----------------------------------------- + // Do what, now? + //----------------------------------------- + + $id++; + + if ( $cache_name ) + { + $this->cache_end( $cache_name, 1 ); + + $this->ipsclass->admin->output_multiple_redirect_hit( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code_js.'&code=cache_update_all_process&id='.$id, $img.$cache_name.' processed...' ); + } + else + { + $this->ipsclass->admin->output_multiple_redirect_done(); + } + } + + /*-------------------------------------------------------------------------*/ + // DO VIEW + /*-------------------------------------------------------------------------*/ + + function view_cache() + { + if ( ! $this->ipsclass->input['cache'] ) + { + $this->ipsclass->main_msg = "No ID was passed, please try again"; + $this->cache_start(); + } + + $row = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='{$this->ipsclass->input['cache']}'" ) ); + + ob_start(); + if ( $row['cs_array'] ) + { + print_r( unserialize($this->ipsclass->txt_stripslashes($row['cs_value'])) ); + } + else + { + print $row['cs_value']; + } + + $out = ob_get_contents(); + ob_end_clean(); + + $this->ipsclass->html = "
    ".htmlspecialchars($out)."
    "; + + $this->ipsclass->admin->print_popup(); + } + + /*-------------------------------------------------------------------------*/ + // DO UPDATE + /*-------------------------------------------------------------------------*/ + + function cache_end( $cache_name='', $dontcancel=0 ) + { + if ( ! $cache_name ) + { + $cache_name = $this->ipsclass->input['cache']; + } + + switch ( $cache_name ) + { + //----------------------------------------- + // Forum cache + //----------------------------------------- + + case 'forum_cache': + + $this->ipsclass->update_forum_cache(); + + $this->ipsclass->main_msg = 'Forum Cache Updated'; + break; + + //----------------------------------------- + // Group Cache + //----------------------------------------- + + case 'group_cache': + $this->ipsclass->cache['group_cache'] = array(); + + $this->ipsclass->DB->simple_construct( array( 'select' => "*", + 'from' => 'groups' + ) ); + + $this->ipsclass->DB->simple_exec(); + + while ( $i = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->cache['group_cache'][ $i['g_id'] ] = $i; + } + + $this->ipsclass->update_cache( array( 'name' => 'group_cache', 'array' => 1, 'deletefirst' => 1 ) ); + + $this->ipsclass->main_msg = 'Group Cache Updated'; + break; + + //----------------------------------------- + // Systemvars + //----------------------------------------- + + case 'systemvars': + $this->ipsclass->cache['systemvars'] = ( is_array( $this->ipsclass->cache['systemvars'] ) ) ? $this->ipsclass->cache['systemvars'] : array(); + + require_once( ROOT_PATH.'sources/lib/func_taskmanager.php' ); + $task = new func_taskmanager(); + $task->ipsclass =& $this->ipsclass; + $task->save_next_run_stamp(); + + $result = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as cnt', 'from' => 'mail_queue' ) ); + + $this->ipsclass->cache['systemvars']['mail_queue'] = intval( $result['cnt'] ); + + if ($this->ipsclass->vars['load_limit'] > 0) + { + # @ supressor fixes warning in >4.3.2 with open_basedir restrictions + + if ( @file_exists('/proc/loadavg') ) + { + if ( $fh = @fopen( '/proc/loadavg', 'r' ) ) + { + $data = @fread( $fh, 6 ); + @fclose( $fh ); + + $load_avg = explode( " ", $data ); + + $this->ipsclass->server_load = trim($load_avg[0]); + } + } + else if( strstr( strtolower(PHP_OS), 'win' ) ) + { + /*--------------------------------------------------------------- + | typeperf is an exe program that is included with Win NT, + | XP Pro, and 2K3 Server. It can be installed on 2K from the + | 2K Resource kit. It will return the real time processor + | Percentage, but will take 1 second processing time to do so. + | This is why we shall cache it, and check only every 2 mins. + | + | Can also be obtained from COM, but it's extremely slow... + ---------------------------------------------------------------*/ + + $serverstats = @shell_exec("typeperf \"Processor(_Total)\% Processor Time\" -sc 1"); + + if( $serverstats ) + { + $server_reply = explode( "\n", str_replace( "\r", "", $serverstats ) ); + $serverstats = array_slice( $server_reply, 2, 1 ); + + $statline = explode( ",", str_replace( '"', '', $serverstats[0] ) ); + + $this->ipsclass->server_load = round( $statline[1], 4 ); + } + } + else + { + if ( $serverstats = @exec("uptime") ) + { + preg_match( "/(?:averages)?\: ([0-9\.]+)[^0-9\.]+([0-9\.]+)[^0-9\.]+([0-9\.]+)\s*/", $serverstats, $load ); + + $this->ipsclass->server_load = $load[1]; + } + } + + if( $this->ipsclass->server_load ) + { + $this->ipsclass->cache['systemvars']['loadlimit'] = $this->ipsclass->server_load."-".time(); + } + } + + $this->ipsclass->update_cache( array( 'name' => 'systemvars', 'array' => 1, 'deletefirst' => 1 ) ); + + $this->ipsclass->main_msg = 'System Variables Updated'; + break; + + //----------------------------------------- + // Skin ID cache + //----------------------------------------- + + case 'skin_id_cache': + require_once( ROOT_PATH.'sources/lib/admin_cache_functions.php' ); + $admin = new admin_cache_functions(); + $admin->ipsclass =& $this->ipsclass; + $admin->_rebuild_skin_id_cache(); + + $this->ipsclass->main_msg = 'Skin ID Cache Updated'; + break; + + //----------------------------------------- + // Moderators + //----------------------------------------- + + case 'moderators': + + $this->ipsclass->cache['moderators'] = array(); + + require_once( ROOT_PATH.'sources/action_admin/moderator.php' ); + $this->mod = new ad_moderator(); + $this->mod->ipsclass =& $this->ipsclass; + + $this->mod->rebuild_moderator_cache(); + + $this->ipsclass->main_msg = 'Moderators Updated'; + break; + + //----------------------------------------- + // Stats + //----------------------------------------- + + case 'stats': + + + + + $this->ipsclass->main_msg = 'Statistics Updated'; + break; + + //----------------------------------------- + // Ranks + //----------------------------------------- + + case 'ranks': + + $this->ipsclass->cache['ranks'] = array(); + + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, title, pips, posts', + 'from' => 'titles', + 'order' => "posts DESC", + ) ); + + $this->ipsclass->DB->simple_exec(); + + while ($i = $this->ipsclass->DB->fetch_row()) + { + $this->ipsclass->cache['ranks'][ $i['id'] ] = array( + 'TITLE' => $i['title'], + 'PIPS' => $i['pips'], + 'POSTS' => $i['posts'], + ); + } + + $this->ipsclass->update_cache( array( 'name' => 'ranks', 'array' => 1, 'deletefirst' => 1 ) ); + + $this->ipsclass->main_msg = 'Ranks Updated'; + break; + + //----------------------------------------- + // Profile Fields + //----------------------------------------- + + case 'profilefields': + + $this->ipsclass->cache['profilefields'] = array(); + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'pfields_data', 'order' => 'pf_position' ) ); + + $this->ipsclass->DB->simple_exec(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->cache['profilefields'][ $r['pf_id'] ] = $r; + } + + $this->ipsclass->update_cache( array( 'name' => 'profilefields', 'array' => 1, 'deletefirst' => 1 ) ); + + $this->ipsclass->main_msg = 'Profile Fields Updated'; + break; + + //----------------------------------------- + // Calendar + //----------------------------------------- + + case 'calendar': + + require_once( ROOT_PATH.'sources/lib/func_taskmanager.php' ); + $func = new func_taskmanager(); + $func->ipsclass =& $this->ipsclass; + + require_once( ROOT_PATH.'sources/tasks/calendarevents.php' ); + + $task = new task_item(); + $task->register_class( $func ); + $task->restrict_log = 1; + $task->run_task(); + + $this->ipsclass->main_msg = 'Calendar Events Updated'; + break; + + case 'calendars': + + require_once( ROOT_PATH.'sources/action_admin/calendars.php' ); + $cal = new ad_calendars(); + $cal->ipsclass =& $this->ipsclass; + $cal->calendars_rebuildcache(); + + $this->ipsclass->main_msg = 'Calendars Updated'; + break; + + //----------------------------------------- + // Birthdays + //----------------------------------------- + + case 'birthdays': + + require_once( ROOT_PATH.'sources/lib/func_taskmanager.php' ); + $func = new func_taskmanager(); + $func->ipsclass =& $this->ipsclass; + + require_once( ROOT_PATH.'sources/tasks/calendarevents.php' ); + + $task = new task_item(); + $task->register_class( $func ); + $task->restrict_log = 1; + $task->run_task(); + + $this->ipsclass->main_msg = 'Birthdays Updated'; + break; + + //----------------------------------------- + // Multimoderation + //----------------------------------------- + + case 'multimod': + + $this->ipsclass->cache['multimod'] = array(); + + $this->ipsclass->DB->simple_construct( array( + 'select' => '*', + 'from' => 'topic_mmod', + 'order' => 'mm_title' + ) ); + + $this->ipsclass->DB->simple_exec(); + + while ($i = $this->ipsclass->DB->fetch_row()) + { + $this->ipsclass->cache['multimod'][ $i['mm_id'] ] = $i; + } + + $this->ipsclass->update_cache( array( 'name' => 'multimod', 'array' => 1, 'deletefirst' => 1 ) ); + + $this->ipsclass->main_msg = 'Multi-Moderation Updated'; + break; + + //----------------------------------------- + // BBCODE + //----------------------------------------- + + case 'bbcode': + + require_once( ROOT_PATH.'sources/action_admin/bbcode.php' ); + $this->bbcode = new ad_bbcode(); + $this->bbcode->ipsclass =& $this->ipsclass; + + $this->bbcode->bbcode_rebuildcache(); + + $this->ipsclass->main_msg = 'BBCode Updated'; + break; + + //----------------------------------------- + // SETTINGS + //----------------------------------------- + + case 'settings': + + $this->ipsclass->cache['settings'] = array(); + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'conf_settings', 'where' => 'conf_add_cache=1' ) ); + $info = $this->ipsclass->DB->simple_exec(); + + while ( $r = $this->ipsclass->DB->fetch_row($info) ) + { + $value = $r['conf_value'] != "" ? $r['conf_value'] : $r['conf_default']; + + if ( $value == '{blank}' ) + { + $value = ''; + } + + $this->ipsclass->cache['settings'][ $r['conf_key'] ] = $value; + } + + $this->ipsclass->update_cache( array( 'name' => 'settings', 'array' => 1, 'deletefirst' => 1 ) ); + + $this->ipsclass->main_msg = 'Settings Updated'; + break; + + //----------------------------------------- + // EMOTICONS + //----------------------------------------- + + case 'emoticons': + + require_once( ROOT_PATH.'sources/action_admin/emoticons.php' ); + $this->emoticons = new ad_emoticons(); + $this->emoticons->ipsclass =& $this->ipsclass; + + $this->emoticons->emoticon_rebuildcache(); + + $this->ipsclass->main_msg = 'Emoticons Updated'; + break; + + //----------------------------------------- + // BADWORDS + //----------------------------------------- + + case 'badwords': + + require_once( ROOT_PATH.'sources/action_admin/banandbadword.php' ); + $this->banandbadword = new ad_banandbadword(); + $this->banandbadword->ipsclass =& $this->ipsclass; + + $this->banandbadword->badword_rebuildcache(); + + $this->ipsclass->main_msg = 'Badwords Updated'; + break; + + //----------------------------------------- + // LANGUAGES + //----------------------------------------- + + case 'languages': + + $this->ipsclass->cache['languages'] = array(); + + $this->ipsclass->DB->simple_construct( array( 'select' => 'ldir,lname', 'from' => 'languages' ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->cache['languages'][] = $r; + } + + $this->ipsclass->update_cache( array( 'name' => 'languages', 'array' => 1, 'deletefirst' => 1 ) ); + + $this->ipsclass->main_msg = 'Languages Updated'; + break; + + //----------------------------------------- + // BAN FILTERS + //----------------------------------------- + + case 'banfilters': + + require_once( ROOT_PATH.'sources/action_admin/banandbadword.php' ); + $this->banandbadword = new ad_banandbadword(); + $this->banandbadword->ipsclass =& $this->ipsclass; + + $this->banandbadword->ban_rebuildcache(); + + $this->ipsclass->main_msg = 'Banfilters Updated'; + break; + + //----------------------------------------- + // ATTACHMENT TYPES + //----------------------------------------- + + case 'attachtypes': + $this->ipsclass->cache['attachtypes'] = array(); + + $this->ipsclass->DB->simple_construct( array( 'select' => 'atype_extension,atype_mimetype,atype_post,atype_photo,atype_img', 'from' => 'attachments_type', 'where' => "atype_photo=1 OR atype_post=1" ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->cache['attachtypes'][ $r['atype_extension'] ] = $r; + } + + $this->ipsclass->update_cache( array( 'name' => 'attachtypes', 'array' => 1, 'deletefirst' => 1 ) ); + + $this->ipsclass->main_msg = 'Attachment Types Updated'; + break; + + //----------------------------------------- + // Announcements + //----------------------------------------- + + case 'announcements': + + require_once( ROOT_PATH.'sources/action_public/announcements.php' ); + $announcements = new announcements(); + $announcements->ipsclass =& $this->ipsclass; + $announcements->announce_recache(); + + $this->ipsclass->main_msg = 'Announcements Updated'; + break; + + //----------------------------------------- + // BBCODE + //----------------------------------------- + + case 'components': + + require_once( ROOT_PATH.'sources/action_admin/components.php' ); + $this->components = new ad_components(); + $this->components->ipsclass =& $this->ipsclass; + + $this->components->components_rebuildcache(); + + $this->ipsclass->main_msg = 'Components Updated'; + break; + + default: + $this->ipsclass->main_msg = 'No valid cache was specified to update'; + break; + } + + if ( ! $dontcancel ) + { + $this->cache_start(); + } + } + + /*-------------------------------------------------------------------------*/ + // SHOW CACHE FORM + /*-------------------------------------------------------------------------*/ + + function cache_start() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $used = array(); + $content = ""; + + //----------------------------------------- + // SHOW CACHES + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'cache_store', 'order' => 'cs_key' ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $row = $this->ipsclass->DB->fetch_row() ) + { + if ( ! in_array( $row['cs_key'], array_keys( $this->map ) ) ) + { + continue; + } + + $used[ $row['cs_key'] ] = $row['cs_key']; + $row['_size'] = ceil( intval( strlen( $row['cs_value'] ) ) / 1024 ); + $row['_desc'] = $this->map[ $row['cs_key'] ]; + + $content .= $this->html->cache_row( $row ); + } + + if ( count( $used ) != count( $this->map ) ) + { + foreach( $this->map as $k => $v ) + { + if ( in_array( $k, array_keys( $used ) ) ) + { + continue; + } + else + { + $row['cs_key'] = $k; + $row['cs_value'] = $v; + $row['_size'] = 0; + $row['_desc'] = $this->map[ $row['cs_key'] ]; + + $content .= $this->html->cache_row( $row ); + } + } + } + + $this->ipsclass->html .= $this->html->cache_overview( $content ); + + $this->ipsclass->admin->output(); + } + + /*-------------------------------------------------------------------------*/ + // PERL + /*-------------------------------------------------------------------------*/ + + function perly_length_sort($a, $b) + { + if ( strlen($a['typed']) == strlen($b['typed']) ) + { + return 0; + } + return ( strlen($a['typed']) > strlen($b['typed']) ) ? -1 : 1; + } + + function perly_word_sort($a, $b) + { + if ( strlen($a['type']) == strlen($b['type']) ) + { + return 0; + } + return ( strlen($a['type']) > strlen($b['type']) ) ? -1 : 1; + } + + + + + + +} + + ?> \ No newline at end of file diff --git a/upload/sources/action_admin/adminlogs.php b/upload/sources/action_admin/adminlogs.php index b769a404..8e00f97e 100644 --- a/upload/sources/action_admin/adminlogs.php +++ b/upload/sources/action_admin/adminlogs.php @@ -2,26 +2,18 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ +| > $Date: 2008-03-28 18:08:02 -0400 (Fri, 28 Mar 2008) $ +| > $Revision: 1232 $ +| > $Author: bfarber $ +--------------------------------------------------------------------------- | | > Admin Logs Stuff @@ -36,7 +28,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Неверный вход

    У вас нет доступа к этому файлу. Если проводилось обновление, убедитесь, что не забыли обновить файл admin.php."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -45,34 +37,34 @@ class ad_adminlogs var $base_url; var $colours = array(); - + /** * Section title name * * @var string */ var $perm_main = "admin"; - + /** * Section title name * * @var string */ var $perm_child = "adminlog"; - + function auto_run() { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Журнал администрирования' ); - + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Admin Logs' ); + //----------------------------------------- // Make sure we're a root admin, or else! //----------------------------------------- - + if ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group']) { //$this->ipsclass->admin->error("Sorry, these functions are for the root admin group only"); } - + $this->colours = array( "cat" => "green", "forum" => "darkgreen", @@ -83,7 +75,7 @@ class ad_adminlogs 'help' => 'darkorange', 'modlog' => 'steelblue', ); - + switch($this->ipsclass->input['code']) { @@ -91,263 +83,270 @@ class ad_adminlogs $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->view(); break; - + case 'remove': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->remove(); break; - + //----------------------------------------- default: $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->list_current(); break; } - + } - + //----------------------------------------- // Remove archived files //----------------------------------------- - + function view() { $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; - - $this->ipsclass->admin->page_detail = "Просмотр всех действий, произведенных администраторами"; - $this->ipsclass->admin->page_title = "Журнал администрирования"; - + + $this->ipsclass->admin->page_detail = "Viewing all actions by a administrator"; + $this->ipsclass->admin->page_title = "Administration Logs Manager"; + if ( ( !isset($this->ipsclass->input['search_string']) OR !$this->ipsclass->input['search_string'] ) AND ( !isset($this->ipsclass->input['mid']) OR !$this->ipsclass->input['mid'] ) ) { - $this->ipsclass->main_msg = "Вы не указали действие, которое необходимо найти."; + $this->ipsclass->main_msg = "You must enter a search string"; $this->list_current(); return; } - + if ( !isset($this->ipsclass->input['search_string']) OR !$this->ipsclass->input['search_string'] ) { $this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(id) as count', 'from' => 'admin_logs', 'where' => "member_id=".intval($this->ipsclass->input['mid']) ) ); $this->ipsclass->DB->simple_exec(); - + $row = $this->ipsclass->DB->fetch_row(); - + $row_count = $row['count']; - + $query = "&{$this->ipsclass->form_code}&mid={$this->ipsclass->input['mid']}&code=view"; - + $this->ipsclass->DB->cache_add_query( 'adminlogs_view_one', array( 'mid' => intval($this->ipsclass->input['mid']), 'limit_a' => $start ) ); $this->ipsclass->DB->cache_exec_query(); - + } else { $this->ipsclass->input['search_string'] = urldecode($this->ipsclass->input['search_string']); - - $dbq = "m.".$this->ipsclass->input['search_type']." LIKE '%".$this->ipsclass->input['search_string']."%'"; - + + if( $this->ipsclass->input['search_type'] == 'member_id' ) + { + $dbq = "m.".$this->ipsclass->input['search_type']."='".$this->ipsclass->input['search_string']."'"; + } + else + { + $dbq = "m.".$this->ipsclass->input['search_type']." LIKE '%".$this->ipsclass->input['search_string']."%'"; + } + $row = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(m.id) as count', 'from' => 'admin_logs m', 'where' => $dbq ) ); - + $row_count = $row['count']; - - $query = "&act=adminlog&code=view&search_type={$this->ipsclass->input['search_type']}&search_string=".urlencode($this->ipsclass->input['search_string']); - + + $query = "&{$this->ipsclass->form_code}&code=view&search_type={$this->ipsclass->input['search_type']}&search_string=".urlencode($this->ipsclass->input['search_string']); + $this->ipsclass->DB->cache_add_query( 'adminlogs_view_two', array( 'dbq' => $dbq, 'limit_a' => $start ) ); $this->ipsclass->DB->cache_exec_query(); } - + $links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $row_count, 'PER_PAGE' => 20, 'CUR_ST_VAL' => $start, - 'L_SINGLE' => "Страница", - 'L_MULTI' => "Страницы: ", + 'L_SINGLE' => "Single Page", + 'L_MULTI' => "Pages: ", 'BASE_URL' => $this->ipsclass->base_url.$query, ) ); - - $this->ipsclass->admin->page_detail = "В этой секции вы можете просматривать и управлять журналом администрирования"; - $this->ipsclass->admin->page_title = "Журнал администрирования"; - + + $this->ipsclass->admin->page_detail = "You may view and remove actions performed by your administrators"; + $this->ipsclass->admin->page_title = "Administrator Logs Manager"; + //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( "Администратор" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Действие" , "40%" ); - $this->ipsclass->adskin->td_header[] = array( "Время" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "IP-адрес" , "20%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Журнал действий" ); + + $this->ipsclass->adskin->td_header[] = array( "Member Name" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Action Perfomed" , "40%" ); + $this->ipsclass->adskin->td_header[] = array( "Time of action" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "IP address" , "20%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Admin Logs" ); $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'center', 'tablesubheader'); - + if ( $this->ipsclass->DB->get_num_rows() ) { while ( $row = $this->ipsclass->DB->fetch_row() ) { $row['ctime'] = $this->ipsclass->admin->get_date( $row['ctime'], 'LONG' ); - + $this->colours[$row['act']] = isset($this->colours[$row['act']]) ? $this->colours[$row['act']] : 'black'; - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "{$row['members_display_name']}", "{$row['note']}", "{$row['ctime']}", "{$row['ip_address']}", ) ); - - + + } } else { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    Нет записей
    "); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    No results
    "); } - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'center', 'tablesubheader'); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - + + //----------------------------------------- //------------------------------- - + $this->ipsclass->admin->output(); - + } - + //----------------------------------------- // Remove archived files //----------------------------------------- - + function remove() { if ($this->ipsclass->input['mid'] == "") { - $this->ipsclass->admin->error("Вы не указали ID администратора"); + $this->ipsclass->admin->error("You did not select a member ID to remove by!"); } - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'admin_logs', 'where' => "member_id=".intval($this->ipsclass->input['mid']) ) ); - + $this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}"); } - - + + //----------------------------------------- // SHOW ALL LANGUAGE PACKS //----------------------------------------- - + function list_current() { $form_array = array(); - - $this->ipsclass->admin->page_detail = "В этой секции вы можете просматривать и управлять журналом администрирования"; - $this->ipsclass->admin->page_title = "Журнал администрирования"; - + + $this->ipsclass->admin->page_detail = "You may view and remove actions performed by your administrators in mission critical areas of the administration CP (such as forum control, member control, group control, help files and moderator log management)."; + $this->ipsclass->admin->page_title = "Administration Logs Manager"; + //----------------------------------------- // LAST FIVE ACTIONS //----------------------------------------- - + $this->ipsclass->DB->cache_add_query( 'adminlogs_view_list_current', array() ); $this->ipsclass->DB->cache_exec_query(); - - $this->ipsclass->adskin->td_header[] = array( "Администратор" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Действие" , "40%" ); - $this->ipsclass->adskin->td_header[] = array( "Время" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "IP-адрес" , "20%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "5 последних действий" ); - + + $this->ipsclass->adskin->td_header[] = array( "Member Name" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Action Perfomed" , "40%" ); + $this->ipsclass->adskin->td_header[] = array( "Time of action" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "IP address" , "20%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Last 5 Admin Actions" ); + if ( $this->ipsclass->DB->get_num_rows() ) { while ( $row = $this->ipsclass->DB->fetch_row() ) { - + $row['ctime'] = $this->ipsclass->admin->get_date( $row['ctime'], 'LONG' ); - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "{$row['name']}", "{$row['note']}", "{$row['ctime']}", "{$row['ip_address']}", ) ); - - + + } } else { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    Нет записей
    "); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    No results
    "); } - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - + + //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( "Администратор" , "30%" ); - $this->ipsclass->adskin->td_header[] = array( "Действий совершено" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Просмотр всех действий" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Удаление всех действий" , "30%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Журнал администрирования" ); - + + $this->ipsclass->adskin->td_header[] = array( "Member Name" , "30%" ); + $this->ipsclass->adskin->td_header[] = array( "Actions Perfomed" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "View all by member" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Remove all by member" , "30%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Admininstration Logs" ); + $this->ipsclass->DB->cache_add_query( 'adminlogs_view_list_current_two', array() ); $this->ipsclass->DB->cache_exec_query(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "{$r['name']}", "
    {$r['act_count']}
    ", - "
    Посмотреть
    ", - "
    Удалить
    ", + "
    View
    ", + "
    Remove
    ", ) ); } - - - + + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - + + //----------------------------------------- //------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'view' ), 2 => array( 'act' , 'adminlog' ), 3 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Поиск действий в журнале" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Search Admin Logs" ); + $form_array = array( - 0 => array( 'note' , 'Действие' ), - 1 => array( 'ip_address' , 'IP-адрес' ), - 2 => array( 'member_id' , 'ID администратора' ), - 3 => array( 'act' , 'Настройки ACT' ), - 4 => array( 'code' , 'Настройки CODE' ), + 0 => array( 'note' , 'Action Performed' ), + 1 => array( 'ip_address', 'IP Address' ), + 2 => array( 'member_id' , 'Member ID' ), + 3 => array( 'act' , 'ACT Setting' ), + 4 => array( 'code' , 'CODE Setting' ), ); - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Искать " , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Search for..." , $this->ipsclass->adskin->form_input( "search_string") ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Искать в " , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Search in..." , $this->ipsclass->adskin->form_dropdown( "search_type", $form_array) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Искать"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Search"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- //------------------------------- - + $this->ipsclass->admin->output(); - + } - - - + + + } diff --git a/upload/sources/action_admin/api.php b/upload/sources/action_admin/api.php new file mode 100644 index 00000000..5861df1f --- /dev/null +++ b/upload/sources/action_admin/api.php @@ -0,0 +1,580 @@ + $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $ +| > $Revision: 567 $ +| > $Author: matt $ ++--------------------------------------------------------------------------- +| +| > API User Administration +| > Module written by Matt Mecham +| > Date started: Monday 25 June 2007 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class ad_api +{ + /*-------------------------------------------------------------------------*/ + // Auto run + /*-------------------------------------------------------------------------*/ + + function auto_run() + { + //----------------------------------------- + // Make sure we're a root admin, or else! + //----------------------------------------- + + if ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group']) + { + $this->ipsclass->admin->error("Sorry, these functions are for the root admin group only"); + } + + //----------------------------------------- + // Load skin... + //----------------------------------------- + + $this->html = $this->ipsclass->acp_load_template('cp_skin_api'); + + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'XML-RPC API Management' ); + + //----------------------------------------- + // What are we to do, today? + //----------------------------------------- + + switch( $this->ipsclass->input['code'] ) + { + //----------------------------------------- + // Default: + //----------------------------------------- + case 'api_list': + default: + $this->api_list(); + break; + case 'api_add': + $this->api_form( 'add' ); + break; + case 'api_add_save': + $this->api_save( 'add' ); + break; + case 'api_edit': + $this->api_form( 'edit' ); + break; + case 'api_edit_save': + $this->api_save( 'edit' ); + break; + case 'api_remove': + $this->api_remove(); + break; + + case 'log_list': + $this->log_list(); + break; + case 'log_view_detail': + $this->log_view_detail(); + break; + } + } + + /*-------------------------------------------------------------------------*/ + // API Logs View + /*-------------------------------------------------------------------------*/ + /** + * API Logs View + * View API Log + * + * @author Matt Mecham + * @since 2.3.2 + */ + /* + CREATE TABLE ibf_api_log ( + api_log_id int(10) unsigned NOT NULL auto_increment, + api_log_key VARCHAR(32) NOT NULL, + api_log_ip VARCHAR(16) NOT NULL, + api_log_date INT(10) NOT NULL, + api_log_query TEXT NOT NULL, + api_log_allowed TINYINT(1) unsigned NOT NULL, + PRIMARY KEY (api_log_id) + );*/ + + function log_view_detail() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $api_log_id = intval( $this->ipsclass->input['api_log_id'] ); + + //----------------------------------------- + // Get data from the deebee + //----------------------------------------- + + $log = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', + 'from' => 'api_log', + 'where' => 'api_log_id='.$api_log_id ) ); + + if ( ! $log['api_log_id'] ) + { + $this->ipsclass->main_msg = "No log for that ID found"; + $this->log_list(); + return; + } + + //----------------------------------------- + // Display... + //----------------------------------------- + + $log['_api_log_date'] = $this->ipsclass->get_date( $log['api_log_date'], 'LONG' ); + $log['_api_log_allowed'] = $log['api_log_allowed'] ? 'aff_tick.png' : 'aff_cross.png'; + $log['_api_log_query'] = htmlspecialchars( $log['api_log_query'] ); + + //----------------------------------------- + // Show... + //----------------------------------------- + + $this->ipsclass->html .= $this->html->api_log_detail( $log ); + + $this->ipsclass->admin->print_popup(); + } + + /*-------------------------------------------------------------------------*/ + // API Logs List + /*-------------------------------------------------------------------------*/ + /** + * API Logs List + * List API Logs + * + * @author Matt Mecham + * @since 2.3.2 + */ + function log_list() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $start = intval( $this->ipsclass->input['st'] ); + $perpage = 50; + $logs = array(); + + //----------------------------------------- + // Get log count + //----------------------------------------- + + $count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'count(*) as count', + 'from' => 'api_log' ) ); + + $links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => intval( $count['count'] ), + 'PER_PAGE' => $perpage, + 'CUR_ST_VAL' => $start, + 'L_SINGLE' => "", + 'L_MULTI' => "Pages: ", + 'BASE_URL' => $this->ipsclass->base_url.'&'.$this->ipsclass->form_code ) ); + + //----------------------------------------- + // Get from DB + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => '*', + 'from' => 'api_log', + 'order' => 'api_log_date DESC', + 'limit' => array( $start, $perpage ) ) ); + + $this->ipsclass->DB->exec_query(); + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + $row['_api_log_date'] = $this->ipsclass->admin->get_date( $row['api_log_date'] ); + $row['_api_log_allowed'] = $row['api_log_allowed'] ? 'aff_tick.png' : 'aff_cross.png'; + + $logs[] = $row; + } + + //----------------------------------------- + // Print... + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( "XML-RPC API Logs", "This page shows all the recorded XML-RPC requests.
    The red cross indicates an error during the request and a green tick indicates a successful request." ) . "
    "; + + $this->ipsclass->html .= $this->html->api_login_view( $logs, $links ); + + $this->ipsclass->admin->output(); + } + + /*-------------------------------------------------------------------------*/ + // API User Remove + /*-------------------------------------------------------------------------*/ + /** + * API User Remove + * Removes an API User + * + * @author Brandon Farber + * @since 2.3.2 + */ + function api_remove() + { + $api_user_id = isset($this->ipsclass->input['api_user_id']) ? intval($this->ipsclass->input['api_user_id']) : 0; + + if( !$api_user_id ) + { + $this->ipsclass->main_msg = "Could not determine the user to remove"; + $this->api_list(); + return; + } + + $api_user = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', + 'from' => 'api_users', + 'where' => 'api_user_id='.$api_user_id ) ); + + if ( ! $api_user['api_user_id'] ) + { + $this->ipsclass->main_msg = "The API user could not be found."; + $this->api_list(); + return; + } + + $this->ipsclass->DB->do_delete( 'api_users', 'api_user_id='.$api_user_id ); + + $this->ipsclass->main_msg = "API User successfully removed"; + $this->api_list(); + } + + /*-------------------------------------------------------------------------*/ + // API Form + /*-------------------------------------------------------------------------*/ + /** + * API Save + * Save API user + * + * @author Matt Mecham + * @since 2.3.2 + */ + function api_save( $type='add' ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $api_user_id = isset($this->ipsclass->input['api_user_id']) ? intval($this->ipsclass->input['api_user_id']) : 0; + $api_user_key = $this->ipsclass->input['api_user_key']; + $api_user_name = $this->ipsclass->input['api_user_name']; + $api_user_ip = $this->ipsclass->input['api_user_ip']; + $permissions = array(); + + //----------------------------------------- + // Check (please?) + //----------------------------------------- + + if ( ! $api_user_name ) + { + $this->ipsclass->main_msg = "You must enter a title"; + $this->api_form( $type ); + return; + } + + //----------------------------------------- + // More checking... + //----------------------------------------- + + if ( $type == 'add' ) + { + if ( ! $api_user_key ) + { + $this->ipsclass->main_msg = "No API user key was passed!"; + $this->api_form( $type ); + return; + } + } + else + { + $api_user = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', + 'from' => 'api_users', + 'where' => 'api_user_id='.$api_user_id ) ); + + if ( ! $api_user['api_user_id'] ) + { + $this->ipsclass->main_msg = "The API user could not be found."; + $this->api_list(); + return; + } + } + + //----------------------------------------- + // Save basics + //----------------------------------------- + + $save = array( 'api_user_name' => $api_user_name, + 'api_user_ip' => $api_user_ip ); + + //----------------------------------------- + // Sort out permissions... + //----------------------------------------- + + foreach( $this->ipsclass->input as $key => $value ) + { + if ( preg_match( "#^_perm_([^_]+?)_(.*)$#", $key, $matches ) ) + { + $module = $matches[1]; + $function = $matches[2]; + + if ( $value ) + { + $permissions[ $module ][ $function ] = 1; + } + } + } + + //----------------------------------------- + // Add in perms + //----------------------------------------- + + $save['api_user_perms'] = serialize( $permissions ); + + //----------------------------------------- + // Save... + //----------------------------------------- + + if ( $type == 'add' ) + { + //----------------------------------------- + // Add in key.. + //----------------------------------------- + + $save['api_user_key'] = $api_user_key; + + //----------------------------------------- + // Save it... + //----------------------------------------- + + $this->ipsclass->main_msg = "API User Added"; + + $this->ipsclass->DB->do_insert( 'api_users', $save ); + } + else + { + $this->ipsclass->main_msg = "API User Edit"; + + $this->ipsclass->DB->do_update( 'api_users', $save, 'api_user_id=' . $api_user_id ); + } + + $this->api_list(); + } + + /*-------------------------------------------------------------------------*/ + // API Form + /*-------------------------------------------------------------------------*/ + /** + * API LIST + * List all currently stored API users + * + * @author Matt Mecham + * @since 2.3.2 + */ + function api_form( $type='add' ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $api_user_id = isset($this->ipsclass->input['api_user_id']) ? intval($this->ipsclass->input['api_user_id']) : 0; + $form = array(); + $permissions = array(); + + //----------------------------------------- + // Check (please?) + //----------------------------------------- + + if ( $type == 'add' ) + { + $formcode = 'api_add_save'; + $title = "Create New API User"; + $button = "Create New API User"; + $api_user = array(); + $api_perms = array(); + } + else + { + $api_user = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', + 'from' => 'api_users', + 'where' => 'api_user_id='.$api_user_id ) ); + + if ( ! $api_user['api_user_id'] ) + { + $this->ipsclass->main_msg = "The API user could not be found."; + $this->api_list(); + return; + } + + $formcode = 'api_edit_save'; + $title = "Edit API User: ".$api_user['api_user_name']; + $button = "Save Changes"; + + $api_perms = unserialize( $api_user['api_user_perms'] ); + } + + //----------------------------------------- + // Form + //----------------------------------------- + + $form['api_user_name'] = $this->ipsclass->adskin->form_input( 'api_user_name', ( isset($_POST['api_user_name']) AND $_POST['api_user_name'] ) ? stripslashes($_POST['api_user_name']) : $api_user['api_user_name'] ); + $form['api_user_ip'] = $this->ipsclass->adskin->form_input( 'api_user_ip', ( isset($_POST['api_user_ip']) AND $_POST['api_user_ip'] ) ? stripslashes($_POST['api_user_ip']) : $api_user['api_user_ip'] ); + + //----------------------------------------- + // Get all modules and stuff and other things + //----------------------------------------- + + $path = ROOT_PATH . 'interface/board/modules'; + + if ( is_dir( $path ) ) + { + $handle = opendir( $path ); + + while ( ( $file = readdir($handle) ) !== FALSE ) + { + if ( is_dir( $path . '/' . $file ) ) + { + if ( file_exists( $path . '/' . $file . '/config.php' ) ) + { + $_name = $file; + + require_once( $path . "/" . $file . '/config.php' ); + + if ( $CONFIG['api_module_title'] ) + { + $permissions[ $_name ] = array( 'key' => $api_module_title, + 'title' => $CONFIG['api_module_title'], + 'desc' => $CONFIG['api_module_desc'], + 'path' => $path . "/" . $file, + 'perms' => array() ); + + //----------------------------------------- + // Get all available methods + //----------------------------------------- + + if ( file_exists( $path . '/' . $file . '/methods.php' ) ) + { + require_once( $path . '/' . $file . '/methods.php' ); + + $permissions[ $_name ]['perms'] = array_keys( $ALLOWED_METHODS ); + } + + //----------------------------------------- + // Sort out form field + //----------------------------------------- + + if ( is_array( $permissions[ $_name ]['perms'] ) ) + { + foreach( $permissions[ $_name ]['perms'] as $perm ) + { + $_checked = intval( $api_perms[ $_name ][ $perm ] ); + $permissions[ $_name ]['form_perms'][ $perm ] = array( 'title' => $perm, + 'form' => $this->ipsclass->adskin->form_checkbox( '_perm_' . $_name . '_' . $perm, $_checked, 1 ) ); + } + } + } + + $CONFIG = array(); + $ALLOWED_METHODS = array(); + } + } + } + + closedir( $handle ); + } + + //----------------------------------------- + // Auto-generate API key + //----------------------------------------- + + if ( $type == 'add' ) + { + $form['_api_user_key'] = md5( rand( 0, time() ) . $this->ipsclass->member['member_login_key'] . microtime() ); + } + + $this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( "XML-RPC User Management", "You may create API users for use with the XML-RPC system which allows other applications to access IP.Board data" ) . "
    "; + $this->ipsclass->html .= $this->html->api_form( $form, $title, $formcode, $button, $api_user, $type, $permissions ); + + $this->ipsclass->admin->nav[] = array( "", "Add/Edit API User" ); + $this->ipsclass->admin->output(); + } + + /*-------------------------------------------------------------------------*/ + // API List + /*-------------------------------------------------------------------------*/ + /** + * API LIST + * List all currently stored API users + * + * @author Matt Mecham + * @since 2.3.2 + */ + function api_list() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $users = array(); + + //----------------------------------------- + // Get users from the DB + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => '*', + 'from' => 'api_users', + 'order' => 'api_user_id' ) ); + + $this->ipsclass->DB->exec_query(); + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + $users[] = $row; + } + + //----------------------------------------- + // XML RPC Enabled? + //----------------------------------------- + + if ( ! $this->ipsclass->vars['xmlrpc_enable'] ) + { + $this->ipsclass->html .= $this->ipsclass->skin_acp_global->warning_box( "XML-RPC System Disabled", "The XML-RPC system is not enabled!
    All API requests will fail. Click here to enable it" ) . "
    "; + } + else + { + $this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( "XML-RPC User Management", "You may create API users for use with the XML-RPC system which allows other applications to access IP.Board data" ) . "
    "; + } + + //----------------------------------------- + // Dun... + //----------------------------------------- + + $this->ipsclass->html .= $this->html->api_list( $users ); + + //----------------------------------------- + // PRINT + //----------------------------------------- + + $this->ipsclass->admin->output(); + } +} + + +?> \ No newline at end of file diff --git a/upload/sources/action_admin/attachments.php b/upload/sources/action_admin/attachments.php index a0dcd32c..4f76310e 100644 --- a/upload/sources/action_admin/attachments.php +++ b/upload/sources/action_admin/attachments.php @@ -2,22 +2,15 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 -| ============================================= +| Invision Power Board +| ======================================== | by Matthew Mecham -| (c) 2001 - 2006 Invision Power Services, Inc. -| http://www.invisionpower.com -| ============================================= +| (c) 2004 Invision Power Services +| http://www.invisionboard.com +| ======================================== | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 +| Email: matt@invisionpower.com | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +--------------------------------------------------------------------------- | | > Admin: Attachment Functions @@ -33,7 +26,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Неверный вход

    У вас нет доступа к этому файлу. Если проводилось обновление, убедитесь, что не забыли обновить файл admin.php."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -44,36 +37,36 @@ class ad_attachments { var $ipsclass; var $html; var $image_dir; - + /** * Section title name * * @var string */ var $perm_main = "content"; - + /** * Section title name * * @var string */ var $perm_child = "attach"; - + function auto_run() { $this->html = $this->ipsclass->acp_load_template('cp_skin_attachments'); - - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Управление прикрепляемыми файлами' ); - - $this->ipsclass->admin->page_detail = "Эта секция позволяет вам управлять прикрепленными пользователями файлами и устанавливать разрешения для различных типов файлов."; - $this->ipsclass->admin->page_title = "Управление прикрепляемыми файлами"; - + + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Attachments Manager' ); + + $this->ipsclass->admin->page_detail = "This section will allow you to manage your member's attachments and attachment permissions"; + $this->ipsclass->admin->page_title = "Attachments Manager"; + $this->ipsclass->DB->simple_construct( array( 'select' => 'set_image_dir', 'from' => 'skin_sets', 'where' => 'set_default=1' ) ); $this->ipsclass->DB->simple_exec(); - + $image_set = $this->ipsclass->DB->fetch_row(); $this->image_dir = $image_set['set_image_dir']; - + //----------------------------------------- // StRT! //----------------------------------------- @@ -121,14 +114,14 @@ class ad_attachments { break; //----------------------------------------- // Bulk Remove - //----------------------------------------- + //----------------------------------------- case 'attach_bulk_remove': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->attach_bulk_remove(); break; //----------------------------------------- // Search - //----------------------------------------- + //----------------------------------------- case 'search': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':search' ); $this->attach_search_start(); @@ -149,170 +142,170 @@ class ad_attachments { break; } } - + /*-------------------------------------------------------------------------*/ // Export Master XML /*-------------------------------------------------------------------------*/ - + function master_xml_export() { //----------------------------------------- // INIT //----------------------------------------- - + $entry = array(); - + //----------------------------------------- // Get XML class //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); - + $xml = new class_xml(); - + $xml->doc_type = $this->ipsclass->vars['gb_char_set']; $xml->xml_set_root( 'export', array( 'exported' => time() ) ); - + //----------------------------------------- // Set group //----------------------------------------- - + $xml->xml_add_group( 'group' ); - + //----------------------------------------- // Get templates... //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'attachments_type' ) ); - + $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $content = array(); - + //----------------------------------------- // Sort the fields... //----------------------------------------- - + foreach( $r as $k => $v ) { $content[] = $xml->xml_build_simple_tag( $k, $v ); } - + $entry[] = $xml->xml_build_entry( 'row', $content ); } - + $xml->xml_add_entry_to_group( 'group', $entry ); - + $xml->xml_format_document(); - + $doc = $xml->xml_document; - + //----------------------------------------- // Print to browser //----------------------------------------- - + $this->ipsclass->admin->show_download( $doc, 'attachments.xml', '', 0 ); } - + //----------------------------------------- // // SEARCH: Complete // //----------------------------------------- - + function attach_search_complete() { $show = intval($this->ipsclass->input['show']); - + $show = $show > 100 ? 100 : $show; - + //----------------------------------------- // Get attachment details //----------------------------------------- - + $this->ipsclass->cache['attachtypes'] = array(); - + $this->ipsclass->DB->simple_construct( array( 'select' => 'atype_extension,atype_mimetype,atype_post,atype_photo,atype_img', 'from' => 'attachments_type', 'where' => "atype_photo=1 OR atype_post=1" ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $this->ipsclass->cache['attachtypes'][ $r['atype_extension'] ] = $r; } - + //----------------------------------------- // Build URL //----------------------------------------- - + $url = ""; $url_components = array( 'extension', 'filesize', 'filesize_gt', 'days', 'days_gt', 'hits', 'hits_gt', 'filename', 'authorname', 'onlyimage' ); - + foreach( $url_components as $u ) { $url .= $u.'='.$this->ipsclass->input[ $u ].'&'; } - + $url .= 'orderby='.$this->ipsclass->input['orderby'].'&sort='.$this->ipsclass->input['sort'].'&show='.$this->ipsclass->input['show']; - + //----------------------------------------- // Build Query //----------------------------------------- - + $queryfinal = ""; $query = array(); - + if ( $this->ipsclass->input['extension'] ) { $query[] = 'a.attach_ext="'.strtolower( str_replace( ".", "", $this->ipsclass->input['extension'] ) ).'"'; } - + if ( $this->ipsclass->input['filesize'] ) { $gt = $this->ipsclass->input['filesize_gt'] == 'gt' ? '>=' : '<'; - + $query[] = "a.attach_filesize $gt ".intval($this->ipsclass->input['filesize']*1024); } - + if ( $this->ipsclass->input['days'] ) { $day_break = time() - intval( $this->ipsclass->input['days'] * 86400 ); - + $gt = $this->ipsclass->input['days_gt'] == 'lt' ? '>=' : '<'; - + $query[] = "a.attach_date $gt ".$day_break; } - + if ( $this->ipsclass->input['hits'] ) { $gt = $this->ipsclass->input['hits_gt'] == 'gt' ? '>=' : '<'; - + $query[] = "a.attach_hits $gt ".intval($this->ipsclass->input['hits']); } - + if ( $this->ipsclass->input['filename'] ) { $query[] = 'LOWER(a.attach_file) LIKE "%'.strtolower( $this->ipsclass->input['filename'] ).'%"'; } - + if ( $this->ipsclass->input['authorname'] ) { $query[] = 'LOWER(p.author_name) LIKE "%'.strtolower( $this->ipsclass->input['authorname'] ).'%"'; } - + if ( $this->ipsclass->input['onlyimage'] ) { $query[] = 'a.attach_is_image=1'; } - + if ( count($query) ) { $queryfinal = 'AND '. implode( " AND ", $query ); } - + $this->ipsclass->DB->build_query( array( 'select' => 'a.*', 'from' => array( 'attachments' => 'a' ), 'where' => "attach_rel_module='post'".$queryfinal, @@ -322,7 +315,7 @@ class ad_attachments { 'from' => array( 'posts' => 'p' ), 'where' => 'p.pid=a.attach_rel_id', 'type' => 'left' ), - # TOPIC TABLE JOIN + # TOPIC TABLE JOIN 0 => array( 'select' => 't.tid, t.forum_id, t.title', 'from' => array( 'topics' => 't' ), 'where' => 'p.topic_id=t.tid', @@ -335,30 +328,30 @@ class ad_attachments { ), 'order' => "a.attach_{$this->ipsclass->input['orderby']} {$this->ipsclass->input['sort']}", 'limit' => array( 0, $show ) ) ); - + $this->ipsclass->DB->exec_query(); - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'attach_bulk_remove' ), 2 => array( 'act' , 'attach' ), 3 => array( 'return', 'search' ), 4 => array( 'url' , $url ), 5 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "1%" ); - $this->ipsclass->adskin->td_header[] = array( "Файл", "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Размер" , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Автор" , "15%" ); - $this->ipsclass->adskin->td_header[] = array( "Тема" , "25%" ); - $this->ipsclass->adskin->td_header[] = array( "Дата ", "25%" ); + $this->ipsclass->adskin->td_header[] = array( "Attachment", "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Size" , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "Author" , "15%" ); + $this->ipsclass->adskin->td_header[] = array( "Topic" , "25%" ); + $this->ipsclass->adskin->td_header[] = array( "Posted ", "25%" ); $this->ipsclass->adskin->td_header[] = array( " " , "1%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Прикрепляемые файлы: результаты поиска" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Attachments: Search Results" ); while ( $r = $this->ipsclass->DB->fetch_row() ) { $r['stitle'] = $this->ipsclass->txt_truncate($r['title'], 30); - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "image_dir}/{$this->ipsclass->cache['attachtypes'][ $r['attach_ext'] ]['atype_img']}' border='0' />" , "ipsclass->form_code}&type=post&id={$r['attach_id']}' target='_blank'>{$r['attach_file']}", $this->ipsclass->size_format($r['attach_filesize']), @@ -368,125 +361,125 @@ class ad_attachments { "
    ", ) ); } - - $removebutton = ""; - + + $removebutton = ""; + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( $removebutton, "right", "tablesubheader"); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // PRINT //----------------------------------------- - + $this->ipsclass->admin->output(); - + } - + //----------------------------------------- // // SEARCH: Start // //----------------------------------------- - + function attach_search_start() { //----------------------------------------- // HEADER //----------------------------------------- - + $this->ipsclass->html .= " "; - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Поиск прикрепленных файлов" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Search Attachments" ); + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'attach_search_complete' ), 2 => array( 'act' , 'attach' ), 3 => array( 'section', $this->ipsclass->section_code ), ) ); - - $gt_array = array( 0 => array( 'gt', 'Больше чем' ), 1 => array( 'lt', 'Меньше чем' ) ); - + + $gt_array = array( 0 => array( 'gt', 'More Than' ), 1 => array( 'lt', 'Less Than' ) ); + //----------------------------------------- // FORM //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Расширение файла
    Оставьте пустым, чтобы пропустить при поиске
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Match File Extension
    Leave blank to omit
    ", $this->ipsclass->adskin->form_simple_input( 'extension', isset($_POST['extension']) ? $_POST['extension'] : '', 10 ), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Размер файла (в килобайтах)
    Оставьте пустым, чтобы пропустить при поиске
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Match File Size (in kb)
    Leave blank to omit
    ", $this->ipsclass->adskin->form_dropdown( 'filesize_gt', $gt_array, isset($_POST['filesize_gt']) ? $_POST['filesize_gt'] : '' ).' '. $this->ipsclass->adskin->form_simple_input( 'filesize', isset($_POST['filesize']) ? $_POST['filesize'] : '', 10 ), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Добавлен n дней
    Оставьте пустым, чтобы пропустить при поиске
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Match Posted n Days
    Leave blank to omit
    ", $this->ipsclass->adskin->form_dropdown( 'days_gt', $gt_array, isset($_POST['days_gt']) ? $_POST['days_gt'] : '' ).' '. - $this->ipsclass->adskin->form_simple_input( 'days', isset($_POST['days']) ? $_POST['days'] : '', 10 ).' дней назад', + $this->ipsclass->adskin->form_simple_input( 'days', isset($_POST['days']) ? $_POST['days'] : '', 10 ).' ago', ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Просмотрен n дней
    Оставьте пустым, чтобы пропустить при поиске
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Match Viewed n Times
    Leave blank to omit
    ", $this->ipsclass->adskin->form_dropdown( 'hits_gt', $gt_array, isset($_POST['hits_gt']) ? $_POST['hits_gt'] : '' ).' '. - $this->ipsclass->adskin->form_simple_input( 'hits', isset($_POST['hits']) ? $_POST['hits'] : '', 10 ).' раз', + $this->ipsclass->adskin->form_simple_input( 'hits', isset($_POST['hits']) ? $_POST['hits'] : '', 10 ).' times', ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Имя файла
    Оставьте пустым, чтобы пропустить при поиске
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Match File Name
    Leave blank to omit
    ", $this->ipsclass->adskin->form_simple_input( 'filename', isset($_POST['filename']) ? $_POST['filename'] : '', 30 ), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Автор
    Оставьте пустым, чтобы пропустить при поиске
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Match Post Author Name
    Leave blank to omit
    ", $this->ipsclass->adskin->form_input( 'authorname', isset($_POST['authorname']) ? $_POST['authorname'] : '', 'text', "id='authorname'" ), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Искать только изображения?
    Если выбрано «Да», в результатах поиска будут только изображения.
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Match Only Images?
    If 'yes', this search will only return image attachments.
    ", $this->ipsclass->adskin->form_yes_no( 'onlyimage', isset($_POST['onlyimage']) ? $_POST['onlyimage'] : '', 30 ), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Сортировать результаты по", - $this->ipsclass->adskin->form_dropdown( 'orderby', array( 0 => array( 'date' , 'дате прикрепления' ), - 1 => array( 'hits' , 'количеству просмотров' ), - 2 => array( 'filesize', 'размеру файла' ), - 3 => array( 'file' , 'имени файла' ), + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Order Results By", + $this->ipsclass->adskin->form_dropdown( 'orderby', array( 0 => array( 'date' , 'Attach Date' ), + 1 => array( 'hits' , 'Attach Views' ), + 2 => array( 'filesize', 'Attach File Size' ), + 3 => array( 'file' , 'Attach File Name' ), ), isset($_POST['orderby']) ? $_POST['orderby'] : '' ).' '. - $this->ipsclass->adskin->form_dropdown( 'sort' , array( 0 => array( 'desc' , 'по убыванию [9-0]' ), - 1 => array( 'asc' , 'по возрастанию [0-9]' ), + $this->ipsclass->adskin->form_dropdown( 'sort' , array( 0 => array( 'desc' , 'Descending [9-0]' ), + 1 => array( 'asc' , 'Ascending [0-9]' ), ), isset($_POST['sort']) ? $_POST['sort'] : '' ) - - + + ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Показать n результатов
    Не более 100 за раз
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Show n Results
    Maximum is 100 regardless of your entry
    ", $this->ipsclass->adskin->form_simple_input( 'show', isset($_POST['show']) ? $_POST['show'] : 25, 10 ), ) ); - - - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Искать"); - + + + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Search"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->html .= ""; - + "; + //----------------------------------------- //------------------------------- - + $this->ipsclass->admin->output(); } - + //----------------------------------------- // // BULK REMOVE // //----------------------------------------- - + function attach_bulk_remove() { foreach ($this->ipsclass->input as $key => $value) @@ -499,22 +492,22 @@ class ad_attachments { } } } - + $ids = $this->ipsclass->clean_int_array( $ids ); - + $attach_tid = array(); - + if ( count( $ids ) ) { //----------------------------------------- // Get attach details? //----------------------------------------- - + $this->ipsclass->DB->cache_add_query( 'attachments_bulk_remove', array( 'ids' => $ids ) ); $this->ipsclass->DB->cache_exec_query(); - + $attach_ids = array(); - + while ( $killmeh = $this->ipsclass->DB->fetch_row() ) { if ( $killmeh['attach_location'] ) @@ -525,29 +518,29 @@ class ad_attachments { { @unlink( $this->ipsclass->vars['upload_dir']."/".$killmeh['attach_thumb_location'] ); } - + $attach_tid[ $killmeh['topic_id'] ] = $killmeh['topic_id']; } - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'attachments', 'where' => "attach_id IN(".implode(",",$ids).")" ) ); - + //----------------------------------------- // Recount topic upload marker //----------------------------------------- - + require_once( ROOT_PATH.'sources/classes/post/class_post.php' ); - + $postlib = new class_post(); $postlib->ipsclass =& $this->ipsclass; - + foreach( $attach_tid as $tid ) { $postlib->pf_recount_topic_attachments($tid); } } - - $this->ipsclass->main_msg = "Прикрепленные файлы удалены"; - + + $this->ipsclass->main_msg = "Attachments Removed"; + if ( $this->ipsclass->input['return'] == 'stats' ) { $this->attach_stats_start(); @@ -559,77 +552,77 @@ class ad_attachments { foreach( explode( '&', $_POST['url'] ) as $u ) { list ( $k, $v ) = explode( '=', $u ); - + $this->ipsclass->input[ $k ] = $v; } } - + $this->attach_search_complete(); } } - + //----------------------------------------- // // STATS: Start // //----------------------------------------- - + function attach_stats_start() { //----------------------------------------- // Get attachment details //----------------------------------------- - + $this->ipsclass->cache['attachtypes'] = array(); - + $this->ipsclass->DB->simple_construct( array( 'select' => 'atype_extension,atype_mimetype,atype_post,atype_photo,atype_img', 'from' => 'attachments_type', 'where' => "atype_photo=1 OR atype_post=1" ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $this->ipsclass->cache['attachtypes'][ $r['atype_extension'] ] = $r; } - + $this->ipsclass->adskin->td_header[] = array( "{none}", "30%" ); $this->ipsclass->adskin->td_header[] = array( "{none}", "20%" ); $this->ipsclass->adskin->td_header[] = array( "{none}", "30%" ); $this->ipsclass->adskin->td_header[] = array( "{none}", "20%" ); - + //----------------------------------------- // Get quick stats //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Прикрепленные файлы: обзор" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Attachments: Overview" ); + $stats = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as count, sum(attach_filesize) as sum', 'from' => 'attachments' ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Количество файлов" , $this->ipsclass->do_number_format($stats['count']), - "Занимают места на диске", $this->ipsclass->size_format($stats['sum']), + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Number of Attachments" , $this->ipsclass->do_number_format($stats['count']), + "Attachments Disk Usage", $this->ipsclass->size_format($stats['sum']), ) ); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'attach_bulk_remove' ), 2 => array( 'act' , 'attach' ), 3 => array( 'return', 'stats' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + //----------------------------------------- // Recent 5 Attachments //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "1%" ); - $this->ipsclass->adskin->td_header[] = array( "Файл", "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Размер" , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Автор" , "15%" ); - $this->ipsclass->adskin->td_header[] = array( "Тема" , "25%" ); - $this->ipsclass->adskin->td_header[] = array( "Дата ", "25%" ); + $this->ipsclass->adskin->td_header[] = array( "Attachment", "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Size" , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "Author" , "15%" ); + $this->ipsclass->adskin->td_header[] = array( "Topic" , "25%" ); + $this->ipsclass->adskin->td_header[] = array( "Posted ", "25%" ); $this->ipsclass->adskin->td_header[] = array( " " , "1%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Прикрепленные файлы: 5 последних" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Attachments: Last 5 Attached" ); + $this->ipsclass->DB->build_query( array( 'select' => 'a.*', 'from' => array( 'attachments' => 'a' ), 'where' => "attach_rel_module='post'", @@ -639,7 +632,7 @@ class ad_attachments { 'from' => array( 'posts' => 'p' ), 'where' => 'p.pid=a.attach_rel_id', 'type' => 'left' ), - # TOPIC TABLE JOIN + # TOPIC TABLE JOIN 0 => array( 'select' => 't.tid, t.forum_id, t.title', 'from' => array( 'topics' => 't' ), 'where' => 'p.topic_id=t.tid', @@ -652,13 +645,13 @@ class ad_attachments { ), 'order' => "a.attach_date DESC", 'limit' => array( 0, 5 ) ) ); - + $this->ipsclass->DB->exec_query(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $r['stitle'] = $this->ipsclass->txt_truncate($r['title'], 30); - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "image_dir}/{$this->ipsclass->cache['attachtypes'][ $r['attach_ext'] ]['atype_img']}' border='0' />" , "{$r['attach_file']}", $this->ipsclass->size_format($r['attach_filesize']), @@ -668,23 +661,23 @@ class ad_attachments { "
    ", ) ); } - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // Largest 5 Attachments //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "1%" ); - $this->ipsclass->adskin->td_header[] = array( "Файл", "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Размер" , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Автор" , "15%" ); - $this->ipsclass->adskin->td_header[] = array( "Тема" , "25%" ); - $this->ipsclass->adskin->td_header[] = array( "Дата ", "25%" ); + $this->ipsclass->adskin->td_header[] = array( "Attachment", "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Size" , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "Author" , "15%" ); + $this->ipsclass->adskin->td_header[] = array( "Topic" , "25%" ); + $this->ipsclass->adskin->td_header[] = array( "Posted ", "25%" ); $this->ipsclass->adskin->td_header[] = array( " " , "1%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Прикрепленные файлы: 5 самых больших" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Attachments: Largest 5 Topic Attachments" ); + $this->ipsclass->DB->build_query( array( 'select' => 'a.*', 'from' => array( 'attachments' => 'a' ), 'where' => "attach_rel_module='post'", @@ -694,7 +687,7 @@ class ad_attachments { 'from' => array( 'posts' => 'p' ), 'where' => 'p.pid=a.attach_rel_id', 'type' => 'left' ), - # TOPIC TABLE JOIN + # TOPIC TABLE JOIN 0 => array( 'select' => 't.tid, t.forum_id, t.title', 'from' => array( 'topics' => 't' ), 'where' => 'p.topic_id=t.tid', @@ -707,13 +700,13 @@ class ad_attachments { ), 'order' => "a.attach_filesize DESC", 'limit' => array( 0, 5 ) ) ); - + $this->ipsclass->DB->exec_query(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $r['stitle'] = $this->ipsclass->txt_truncate($r['title'], 30); - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "image_dir}/{$this->ipsclass->cache['attachtypes'][ $r['attach_ext'] ]['atype_img']}' border='0' />" , "{$r['attach_file']}", $this->ipsclass->size_format($r['attach_filesize']), @@ -723,23 +716,23 @@ class ad_attachments { "
    ", ) ); } - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // Most popular //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "1%" ); - $this->ipsclass->adskin->td_header[] = array( "Файл", "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Просмотров" , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Автор" , "15%" ); - $this->ipsclass->adskin->td_header[] = array( "Тема" , "25%" ); - $this->ipsclass->adskin->td_header[] = array( "Дата ", "25%" ); + $this->ipsclass->adskin->td_header[] = array( "Attachment", "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Viewed" , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "Author" , "15%" ); + $this->ipsclass->adskin->td_header[] = array( "Topic" , "25%" ); + $this->ipsclass->adskin->td_header[] = array( "Posted ", "25%" ); $this->ipsclass->adskin->td_header[] = array( " " , "1%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Прикрепленные файлы: 5 самых просматриваемых" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Attachments: Top 5 Most Viewed" ); + $this->ipsclass->DB->build_query( array( 'select' => 'a.*', 'from' => array( 'attachments' => 'a' ), 'where' => "attach_rel_module='post'", @@ -749,7 +742,7 @@ class ad_attachments { 'from' => array( 'posts' => 'p' ), 'where' => 'p.pid=a.attach_rel_id', 'type' => 'left' ), - # TOPIC TABLE JOIN + # TOPIC TABLE JOIN 0 => array( 'select' => 't.tid, t.forum_id, t.title', 'from' => array( 'topics' => 't' ), 'where' => 'p.topic_id=t.tid', @@ -762,15 +755,15 @@ class ad_attachments { ), 'order' => "a.attach_hits DESC", 'limit' => array( 0, 5 ) ) ); - + $this->ipsclass->DB->exec_query(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $r['stitle'] = $this->ipsclass->txt_truncate($r['title'], 30); - + $size = $this->ipsclass->size_format($r['attach_filesize']); - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "image_dir}/{$this->ipsclass->cache['attachtypes'][ $r['attach_ext'] ]['atype_img']}' border='0' />" , "{$r['attach_file']}", $r['attach_hits'], @@ -780,72 +773,72 @@ class ad_attachments { "
    ", ) ); } - - $removebutton = ""; - + + $removebutton = ""; + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( $removebutton, "right", "tablesubheader"); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // PRINT //----------------------------------------- - + $this->ipsclass->admin->output(); } - - - + + + //----------------------------------------- // TYPE: Import //----------------------------------------- - + function attach_type_import() { $content = $this->ipsclass->admin->import_xml( 'ipb_attachtypes.xml' ); - + //----------------------------------------- // Got anything? //----------------------------------------- - + if ( ! $content ) { - $this->ipsclass->main_msg = "Импортирование не выполнено, поскольку файл «ipb_attachtypes.xml» содержит ошибку, либо он пустой."; + $this->ipsclass->main_msg = "Upload failed, ipb_attachtypes.xml was either missing or empty"; $this->attach_type_start(); } - + //----------------------------------------- // Get xml mah-do-dah //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); $xml = new class_xml(); - + //----------------------------------------- // Unpack the datafile //----------------------------------------- - + $xml->xml_parse_document( $content ); - + //----------------------------------------- // Get current attachment types //----------------------------------------- - + $types = array(); - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'attachments_type', 'order' => "atype_extension" ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $types[ $r['atype_extension'] ] = 1; } - + //----------------------------------------- // pArse //----------------------------------------- - + foreach( $xml->xml_array['attachtypesexport']['attachtypesgroup']['attachtype'] as $entry ) { $insert_array = array( 'atype_extension' => $entry['atype_extension']['VALUE'], @@ -854,178 +847,178 @@ class ad_attachments { 'atype_photo' => $entry['atype_photo']['VALUE'], 'atype_img' => $entry['atype_img']['VALUE'] ); - + if ( $types[ $entry['atype_extension']['VALUE'] ] ) { continue; } - + if ( $entry['atype_extension']['VALUE'] and $entry['atype_mimetype']['VALUE'] ) { $this->ipsclass->DB->do_insert( 'attachments_type', $insert_array ); } } - + $this->attach_type_rebuildcache(); - - $this->ipsclass->main_msg = "Импортирование типов прикрепляемых файлов успешно завершено."; - + + $this->ipsclass->main_msg = "Attachment Types XML file import completed"; + $this->attach_type_start(); - + } - + //----------------------------------------- // // TYPES: Export // //----------------------------------------- - + function attach_type_export() { //----------------------------------------- // Get xml mah-do-dah //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); $xml = new class_xml(); - + //----------------------------------------- // Start... //----------------------------------------- - + $xml->xml_set_root( 'attachtypesexport', array( 'exported' => time() ) ); - + //----------------------------------------- // Get emo group //----------------------------------------- - + $xml->xml_add_group( 'attachtypesgroup' ); - + $this->ipsclass->DB->simple_construct( array( 'select' => 'atype_extension,atype_mimetype,atype_post,atype_photo,atype_img', 'from' => 'attachments_type', 'order' => "atype_extension" ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $content = array(); - + foreach ( $r as $k => $v ) { $content[] = $xml->xml_build_simple_tag( $k, $v ); } - + $entry[] = $xml->xml_build_entry( 'attachtype', $content ); } - + $xml->xml_add_entry_to_group( 'attachtypesgroup', $entry ); - + $xml->xml_format_document(); - + //----------------------------------------- // Send to browser. //----------------------------------------- - + $this->ipsclass->admin->show_download( $xml->xml_document, 'ipb_attachtypes.xml' ); } - + //----------------------------------------- // // TYPES: DELETE // //----------------------------------------- - + function attach_type_delete() { $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'attachments_type', 'where' => 'atype_id='.$this->ipsclass->input['id'] ) ); - + $this->attach_type_rebuildcache(); - - $this->ipsclass->main_msg = "Тип прикрепляемого файла удален"; - + + $this->ipsclass->main_msg = "Attachment type deleted"; + $this->attach_type_start(); } - + //----------------------------------------- // // TYPES: SAVE (edit / add) // //----------------------------------------- - + function attach_type_save( $type='add' ) { $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); - + //----------------------------------------- // check basics //----------------------------------------- - + if ( ! $this->ipsclass->input['atype_extension'] or ! $this->ipsclass->input['atype_mimetype'] ) { - $this->ipsclass->main_msg = "Вы не указали расширение и MIME-тип файла."; + $this->ipsclass->main_msg = "You must enter at least an extension and mime-type before continuing."; $this->attach_type_form( $type ); } - + $save_array = array( 'atype_extension' => str_replace( ".", "", $this->ipsclass->input['atype_extension'] ), 'atype_mimetype' => $this->ipsclass->input['atype_mimetype'], 'atype_post' => $this->ipsclass->input['atype_post'], 'atype_photo' => $this->ipsclass->input['atype_photo'], 'atype_img' => $this->ipsclass->input['atype_img'] ); - + if ( $type == 'add' ) { //----------------------------------------- // Check for existing.. //----------------------------------------- - + $attach = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'attachments_type', 'where' => "atype_extension='".$save_array['atype_extension']."'" ) ); - + if ( $attach['atype_id'] ) { - $this->ipsclass->main_msg = "Расширение файла «{$save_array['atype_extension']}» уже существует. Пожалуйста, выберите другое расширение файла."; + $this->ipsclass->main_msg = "The extension '{$save_array['atype_extension']}' already exists, please choose another extension."; $this->attach_type_form($type); } - + $this->ipsclass->DB->do_insert( 'attachments_type', $save_array ); - - $this->ipsclass->main_msg = "Тип прикрепляемого файла добавлен."; - + + $this->ipsclass->main_msg = "Attachment type added"; + } else { $this->ipsclass->DB->do_update( 'attachments_type', $save_array, 'atype_id='.$this->ipsclass->input['id'] ); - - $this->ipsclass->main_msg = "Тип прикрепляемого файла изменен."; + + $this->ipsclass->main_msg = "Attachment type edited"; } - + $this->attach_type_rebuildcache(); - + $this->attach_type_start(); - + } - + //----------------------------------------- // // TYPES: FORM (edit / add) // //----------------------------------------- - + function attach_type_form( $type='add' ) { $this->ipsclass->input['id'] = isset($this->ipsclass->input['id']) ? intval($this->ipsclass->input['id']) : 0; $this->ipsclass->input['baseon'] = isset($this->ipsclass->input['baseon']) ? intval($this->ipsclass->input['baseon']) : 0; - - $this->ipsclass->admin->nav[] = array( '', 'Добавление/изменение типов файлов' ); - + + $this->ipsclass->admin->nav[] = array( '', 'Add/Edit Attachment Type' ); + if ( $type == 'add' ) { $code = 'attach_doadd'; - $button = 'Добавить'; - + $button = 'Add New Attachment Type'; + if ( $this->ipsclass->input['baseon'] ) { $attach = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'attachments_type', 'where' => 'atype_id='.$this->ipsclass->input['baseon'] ) ); @@ -1038,178 +1031,178 @@ class ad_attachments { 'atype_photo' => '', 'atype_img' => '' ); } - + //----------------------------------------- // Generate 'base on' //----------------------------------------- - + $dd = ""; - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'attachments_type', 'order' => 'atype_extension' ) ); $this->ipsclass->DB->simple_exec(); - + while( $r = $this->ipsclass->DB->fetch_row() ) { - $dd .= "\n"; + $dd .= "\n"; } - + $title = "
    -   +  
    {$button}
    "; - + } else { $code = 'attach_doedit'; - $button = 'Изменить'; + $button = 'Edit Attachment Type'; $title = $button; $attach = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'attachments_type', 'where' => 'atype_id='.$this->ipsclass->input['id'] ) ); - + if ( ! $attach['atype_id'] ) { - $this->ipsclass->main_msg = "ID не найден, попробуйте еще раз."; + $this->ipsclass->main_msg = "No ID was passed, please try again."; $this->attach_type_start(); } } - + //----------------------------------------- // HEADER //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( $title ); - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , $code ), 2 => array( 'act' , 'attach' ), 3 => array( 'id' , $this->ipsclass->input['id'] ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + //----------------------------------------- // FORM //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Расширение прикрепляемого файла
    Обычно состоит из трех символов, является суффиксом файла.
    Не требуется вводить точку («.») до расширения файла.
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Attachment File Extension
    This is the (usually) three character filename suffix.
    You don't need to add the '.' before the extension
    ", $this->ipsclass->adskin->form_simple_input( 'atype_extension', ( isset($_POST['atype_extension']) AND $_POST['atype_extension'] ) ? $_POST['atype_extension'] : $attach['atype_extension'], 10 ), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "MIME-тип файла
    Не уверены какой MIME-тип у выбранного файла?
    Попробуйте найти здесь
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Attachment Mime-Type
    Unsure what the correct mime-type is?. Try looking here
    ", $this->ipsclass->adskin->form_simple_input( 'atype_mimetype', ( isset($_POST['atype_mimetype']) AND $_POST['atype_mimetype'] ) ? $_POST['atype_mimetype'] : $attach['atype_mimetype'], 40 ), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Разрешить прикреплять этот тип файла к сообщениям?", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Allow this attachment in posts?", $this->ipsclass->adskin->form_yes_no( 'atype_post', ( isset($_POST['atype_post']) AND $_POST['atype_post'] ) ? $_POST['atype_post'] : $attach['atype_post'] ), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Разрешить использовать этот тип файла как аватар или фотографию?", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Allow this attachment in avatars / personal photos?", $this->ipsclass->adskin->form_yes_no( 'atype_photo', ( isset($_POST['atype_photo']) AND $_POST['atype_photo'] ) ? $_POST['atype_photo'] : $attach['atype_photo'] ), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Иконка этого типа файлов
    Маленькая иконка, указывающая тип файла в сообщении.
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Attachment Mini-Image
    This is the little icon that represents the attachment type in a post.
    ", $this->ipsclass->adskin->form_simple_input( 'atype_img', ( isset($_POST['atype_img']) AND $_POST['atype_img'] ) ? $_POST['atype_img'] : $attach['atype_img'], 40 ), - ) ); - + ) ); + $this->ipsclass->html .= $this->ipsclass->adskin->end_form($button); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- //------------------------------- - + $this->ipsclass->admin->output(); } - - + + //----------------------------------------- // // TYPES: Start // //----------------------------------------- - + function attach_type_start() { //----------------------------------------- // Get 'em //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'attachments_type', 'order' => 'atype_extension' ) ); $this->ipsclass->DB->simple_exec(); - + $attach_html = ""; - + while( $r = $this->ipsclass->DB->fetch_row() ) { $r['_imagedir'] = $this->image_dir; - + $checked_img = "X"; $r['apost_checked'] = $r['atype_post'] ? $checked_img : ' '; $r['aphoto_checked'] = $r['atype_photo'] ? $checked_img : ' '; - + $attach_html .= $this->html->attach_row( $r ); } - + $this->ipsclass->html .= $this->html->attach_wrapper( $attach_html ); - + //----------------------------------------- // IMPORT: Start output //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'attach_import' ), 2 => array( 'act' , 'attach' ), 3 => array( 'MAX_FILE_SIZE', '10000000000' ), 4 => array( 'section', $this->ipsclass->section_code ), ) , "uploadform", " enctype='multipart/form-data'" ); - - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Импортирование списка прикрепляемых файлов" ); - + + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Import an Attachment Types List" ); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "Загрузка XML-архива со списком прикрепляемых файлов
    Выберите файл для загрузки с вашего компьютера 'ipb_attachtypes.xml' или 'ipb_attachtypes.xml.gz'. Двойные записи импортированы не будут.
    ", + "Upload XML Attachment Types List
    Browse your computer for 'ipb_attachtypes.xml' or 'ipb_attachtypes.xml.gz'. Duplicate entries will not be imported.
    ", $this->ipsclass->adskin->form_upload( ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Импортировать"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Import"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- - + $this->ipsclass->admin->output(); } - + //----------------------------------------- // // TYPES: Rebuild Cache // //----------------------------------------- - + function attach_type_rebuildcache() { $this->ipsclass->cache['attachtypes'] = array(); - + $this->ipsclass->DB->simple_construct( array( 'select' => 'atype_extension,atype_mimetype,atype_post,atype_photo,atype_img', 'from' => 'attachments_type', 'where' => "atype_photo=1 OR atype_post=1" ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $this->ipsclass->cache['attachtypes'][ $r['atype_extension'] ] = $r; } - + $this->ipsclass->update_cache( array( 'name' => 'attachtypes', 'array' => 1, 'deletefirst' => 1 ) ); } - - - - - - - + + + + + + + } ?> \ No newline at end of file diff --git a/upload/sources/action_admin/banandbadword.php b/upload/sources/action_admin/banandbadword.php index 1affa033..afb5be1a 100644 --- a/upload/sources/action_admin/banandbadword.php +++ b/upload/sources/action_admin/banandbadword.php @@ -2,25 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-11-03 16:54:54 -0600 (Fri, 03 Nov 2006) $ -| > $Revision: 709 $ +| > $Date: 2007-04-19 18:08:46 -0400 (Thu, 19 Apr 2007) $ +| > $Revision: 947 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -35,7 +27,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Неверный вход

    У вас нет доступа к этому файлу. Если проводилось обновление, убедитесь, что не забыли обновить файл admin.php."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -44,81 +36,81 @@ class ad_banandbadword { var $functions = ""; var $ipsclass; var $html; - + /** * Section title name * * @var string */ var $perm_main = "content"; - + /** * Section title name * * @var string */ var $perm_child = "babw"; - + function auto_run() { $this->html = $this->ipsclass->acp_load_template('cp_skin_bbcode_badword'); - + //----------------------------------------- // Require and RUN !! THERES A BOMB //----------------------------------------- - + $this->ipsclass->admin->page_detail = ""; - $this->ipsclass->admin->page_title = "Фильтры блокировки (ban)"; + $this->ipsclass->admin->page_title = "Ban Manager"; //----------------------------------------- // What to do... //----------------------------------------- - + switch($this->ipsclass->input['code']) { //----------------------------------------- // Badword //----------------------------------------- - + case 'badword': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->badword_start(); break; - + case 'badword_add': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':bw-add' ); $this->badword_add(); break; - + case 'badword_remove': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':bw-remove' ); $this->badword_remove(); break; - + case 'badword_edit': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':bw-edit' ); $this->badword_edit(); break; - + case 'badword_doedit': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':bw-edit' ); $this->badword_doedit(); break; - + case 'badword_export': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':bw-export' ); $this->badword_export(); break; - + case 'badword_import': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':bw-import' ); $this->badword_import(); break; - + //----------------------------------------- // BAN (d-aid) //----------------------------------------- - + case 'ban': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':ban-view' ); $this->ban_start(); @@ -133,38 +125,38 @@ class ad_banandbadword { break; } } - + //----------------------------------------- // BAN: Rebuild cache //----------------------------------------- - + function ban_rebuildcache() { require_once ROOT_PATH.'sources/classes/bbcode/class_bbcode_core.php'; - + $this->ipsclass->cache['banfilters'] = array(); - + $this->ipsclass->DB->simple_construct( array( 'select' => 'ban_content', 'from' => 'banfilters', 'where' => "ban_type='ip'" ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $this->ipsclass->cache['banfilters'][] = $r['ban_content']; } - + usort( $this->ipsclass->cache['banfilters'] , array( 'class_bbcode_core', 'word_length_sort' ) ); - + $this->ipsclass->update_cache( array( 'name' => 'banfilters', 'array' => 1, 'deletefirst' => 1 ) ); } - + //----------------------------------------- // BAN: DELETE //----------------------------------------- - + function ban_delete() { $ids = array(); - + foreach ($this->ipsclass->input as $key => $value) { if ( preg_match( "/^id_(\d+)$/", $key, $match ) ) @@ -175,104 +167,104 @@ class ad_banandbadword { } } } - + $ids = $this->ipsclass->clean_int_array( $ids ); - + if ( count( $ids ) ) { $this->ipsclass->DB->simple_construct( array( 'delete' => 'banfilters', 'where' => 'ban_id IN('.implode( ",",$ids ).')' ) ); $this->ipsclass->DB->simple_exec(); } - + $this->ban_rebuildcache(); - - $this->ipsclass->main_msg = "Фильтр на блокировку успешно удален"; + + $this->ipsclass->main_msg = "Ban filters removed"; $this->ban_start(); } - + //----------------------------------------- // BAN: ADD //----------------------------------------- - + function ban_add() { if ( ! $this->ipsclass->input['bantext'] ) { - $this->ipsclass->main_msg = "Вы должны ввести заменяемое слово!"; + $this->ipsclass->main_msg = "You must enter something to add to the ban filters!"; $this->ban_start(); } - + //----------------------------------------- // Check for existing entry //----------------------------------------- - + $result = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'banfilters', 'where' => "ban_content='{$this->ipsclass->input['bantext']}' and ban_type='{$this->ipsclass->input['bantype']}'" ) ); - + if ( $result['ban_id'] ) { - $this->ipsclass->main_msg = "Такое значение уже есть."; + $this->ipsclass->main_msg = "Duplicate entry, entry not added to the ban filters database."; $this->ban_start(); } - + $this->ipsclass->DB->do_insert( 'banfilters', array( 'ban_type' => $this->ipsclass->input['bantype'], 'ban_content' => trim($this->ipsclass->input['bantext']), 'ban_date' => time() ) ); - + $this->ban_rebuildcache(); - - $this->ipsclass->main_msg = "Новый фильтр блокировки успешно добавлен."; - + + $this->ipsclass->main_msg = "Ban filter added"; + $this->ban_start(); - + } - + //----------------------------------------- // BAN: START //----------------------------------------- - + function ban_start() { - $this->ipsclass->admin->page_title = "Управление фильтрами блокировки"; + $this->ipsclass->admin->page_title = "Ban Control"; $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=ban', 'Ban Filters' ); - - $this->ipsclass->admin->page_detail = "Эта секция позволяет вам изменять, удалять и добавлять ip-адреса, e-mail и зарезервированные имена в фильтр для блокировки. -
    Вы можете использовать «символ звездочки» — * , для любого(ых) символа(ов) ip-адреса или e-mail. (например: 127.0.*, *@mail.ru)"; - + + $this->ipsclass->admin->page_detail = "This section allows you to modify, delete or add IP addresses, email addresses and reserved names to the ban filters. +
    You can use * as a wildcard in any Username, IP or email filter. (Example: 127.0.*, *@yahoo.com, bannedname*)"; + //----------------------------------------- // Get things //----------------------------------------- - + $ban = array(); - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'banfilters', 'order' => 'ban_date desc' ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $ban[ $r['ban_type'] ][ $r['ban_id'] ] = $r; } - + //----------------------------------------- // SHOW THEM! //----------------------------------------- + + $add_form = "
    + +
    +
    "; - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'ban_delete'), - 2 => array( 'act' , 'babw' ), - 4 => array( 'section', $this->ipsclass->section_code ), - ) ); - - $this->ipsclass->adskin->td_header[] = array( " " , "1%" ); - $this->ipsclass->adskin->td_header[] = array( "Запись" , "80%" ); - $this->ipsclass->adskin->td_header[] = array( "Дата добавления" , "20%" ); - + $this->ipsclass->adskin->td_header[] = array( "{none}" , "1%" ); + $this->ipsclass->adskin->td_header[] = array( "{none}" , "80%" ); + $this->ipsclass->adskin->td_header[] = array( "{none}" , "20%" ); + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Управление фильтрами блокировки" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ban Control" ); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( $add_form, "center", "tablesubheader"); //----------------------------------------- // Banned IP Addresses //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Заблокированные ip-адреса", "left", "tablesubheader"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Banned IP Addresses", "left", "tablesubheader"); + if ( isset($ban['ip']) AND is_array( $ban['ip'] ) AND count( $ban['ip'] ) ) { foreach ( $ban['ip'] as $entry ) @@ -285,15 +277,15 @@ class ad_banandbadword { } else { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Заблокированных IP-адресов нет", "left", "tablerow1"); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("No Entered Banned IP Addresses", "left", "tablerow1"); } - + //----------------------------------------- // Banned Email Addresses //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Заблокированные e-mail адреса", "left", "tablesubheader"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Banned Email Addresses", "left", "tablesubheader"); + if ( isset($ban['email']) AND is_array( $ban['email'] ) AND count( $ban['email'] ) ) { foreach ( $ban['email'] as $entry ) @@ -306,15 +298,15 @@ class ad_banandbadword { } else { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Заблокированных e-mail адресов нет", "left", "tablerow1"); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("No Entered Banned Email Addresses", "left", "tablerow1"); } - + //----------------------------------------- // Banned Names //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Запрещенные к регистрации имена пользователей", "left", "tablesubheader"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Non-Registerable Names", "left", "tablesubheader"); + if ( isset($ban['name']) AND is_array( $ban['name'] ) AND count( $ban['name'] ) ) { foreach ( $ban['name'] as $entry ) @@ -327,422 +319,399 @@ class ad_banandbadword { } else { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Запрещенных к регистрации имен пользователей нет", "left", "tablerow1"); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("No Entered Names", "left", "tablerow1"); } - + $end_it_now = "
    - -
    -
    - -
    "; - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( $end_it_now, "center", "tablesubheader"); - + + "; + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( $end_it_now, "center", "tablesubheader"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); - + } - + //----------------------------------------- // BADWORDS: Import //----------------------------------------- - + function badword_import() { $content = $this->ipsclass->admin->import_xml( 'ipb_badwords.xml' ); - + //----------------------------------------- // Got anything? //----------------------------------------- - + if ( ! $content ) { - $this->ipsclass->main_msg = "Импортирование записей не выполнено, так как файл «ipb_badwords.xml» содержит ошибку либо он пуст"; + $this->ipsclass->main_msg = "Upload failed, ipb_badwords.xml was either missing or empty"; $this->badword_start(); return; } - + //----------------------------------------- // Get xml mah-do-dah //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); $xml = new class_xml(); - + //----------------------------------------- // Unpack the datafile //----------------------------------------- - - $xml->lite_parser = 1; + $xml->xml_parse_document( $content ); - + if( !is_array($xml->xml_array['badwordexport']['badwordgroup']['badword']) OR !count($xml->xml_array['badwordexport']['badwordgroup']['badword']) ) { - $this->ipsclass->main_msg = "Импортирование записей не выполнено, так как файл «ipb_badwords.xml» содержит ошибку либо он пуст"; + $this->ipsclass->main_msg = "XML Import failed: ipb_badwords.xml is either empty or in the wrong format"; $this->badword_start(); return; } - + //----------------------------------------- // Get current badwords //----------------------------------------- - + $words = array(); - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'badwords', 'order' => 'type' ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $words[ $r['type'] ] = 1; } - + //----------------------------------------- // pArse //----------------------------------------- - + foreach( $xml->xml_array['badwordexport']['badwordgroup']['badword'] as $entry ) { $type = $entry['type']['VALUE']; $swop = $entry['swop']['VALUE']; $m_exact = $entry['m_exact']['VALUE']; - + if ( $words[ $type ] ) { continue; } - + if ( $type ) { $this->ipsclass->DB->do_insert( 'badwords', array( 'type' => $type, 'swop' => $swop, 'm_exact' => $m_exact ) ); } } - + $this->badword_rebuildcache(); - - $this->ipsclass->main_msg = "Импортирование записей успешно выполнено"; - + + $this->ipsclass->main_msg = "Badword XML file import completed"; + $this->badword_start(); - + } - + //----------------------------------------- // BADWORD: Export //----------------------------------------- - + function badword_export() { //----------------------------------------- // Get xml mah-do-dah //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); $xml = new class_xml(); - + //----------------------------------------- // Start... //----------------------------------------- - + $xml->xml_set_root( 'badwordexport', array( 'exported' => time() ) ); - + //----------------------------------------- // Get emo group //----------------------------------------- - + $xml->xml_add_group( 'badwordgroup' ); - + $this->ipsclass->DB->simple_construct( array( 'select' => 'type, swop, m_exact', 'from' => 'badwords', 'order' => 'type' ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $content = array(); - + foreach ( $r as $k => $v ) { $content[] = $xml->xml_build_simple_tag( $k, $v ); } - + $entry[] = $xml->xml_build_entry( 'badword', $content ); } - + $xml->xml_add_entry_to_group( 'badwordgroup', $entry ); - + $xml->xml_format_document(); - + //----------------------------------------- // Send to browser. //----------------------------------------- - + $this->ipsclass->admin->show_download( $xml->xml_document, 'ipb_badwords.xml' ); } - + //----------------------------------------- // BADWORD: Start //----------------------------------------- - + function badword_start() { //----------------------------------------- // INIT //----------------------------------------- - + $badword_html = ""; - - $this->ipsclass->admin->page_detail = "В этой секции вы можете добавлять, изменять и удалять фильтры нецензурных слов.
    Фильтр нецензурных слов позволяет вам заменять нецензурные слова в сообщениях пользователей, в подписях и в названиях тем.

    Совпадение по маске: при выборе способа «Маска», введенное вами слово будет изменяться даже в словах, содержащих в себе это слово. Например, если вы введете в фильтр слово «коза», то это слово будет изменено на указанный вами заменитель и в слове «стрекоза». Если вы не введете заменитель, то нецензурное слово будет изменено на шесть символов «решетки» — #

    Точное совпадение: При выборе способа «Точный», введенное вами слово будет изменяться на заменитель только при точном совпадении этого слова. Например, если вы введете в фильтр слово «коза», то это слово будет изменено на указанный вами заменитель, только в слове «коза». Если вы не введете заменитель, то нецензурное слово будет изменено на шесть символов «решетки» — #.

    Данная опция не чувствительна к регистру."; - $this->ipsclass->admin->page_title = "Фильтр нецензурных слов"; - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=badword', 'Фильтр нецензурных слов' ); - + + $this->ipsclass->admin->page_detail = "You can add/edit and remove bad word filters in this section.
    The badword filter allows you to globally replace words from a members post, signature and topic title.

    Loose matching: If you entered 'hell' as a bad word, it will replace 'hell' and 'hello' with either your replacement if entered or 6 hashes (case insensitive)

    Exact matching: If you entered 'hell' as a bad word, it will replace 'hell' only with either your replacement if entered or 6 hashes (case insensitive)"; + $this->ipsclass->admin->page_title = "Bad Word Filter"; + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=badword', 'Bad Word Filters' ); + //----------------------------------------- // Start form //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'badword_add' ), 2 => array( 'act' , 'babw' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'badwords', 'order' => 'type' ) ); $this->ipsclass->DB->simple_exec(); - + if ( $this->ipsclass->DB->get_num_rows() ) { while ( $r = $this->ipsclass->DB->fetch_row() ) { $words[] = $r; } - + foreach($words as $r) { $r['replace'] = $r['swop'] ? stripslashes($r['swop']) : '######'; - $r['method'] = $r['m_exact'] ? 'Точный' : 'Маска'; + $r['method'] = $r['m_exact'] ? 'Exact' : 'Loose'; $r['type'] = stripslashes($r['type']); - + $badword_html .= $this->html->badword_row( $r ); } - + } - + $this->ipsclass->html .= $this->html->badword_wrapper( $badword_html ); - + //----------------------------------------- // IMPORT: Start table //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - + //----------------------------------------- // IMPORT: Start output //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'badword_import' ), 2 => array( 'act' , 'babw' ), 3 => array( 'MAX_FILE_SIZE', '10000000000' ), 4 => array( 'section', $this->ipsclass->section_code ), ) , "uploadform", " enctype='multipart/form-data'" ); - - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Импортирование списка с фильтрами нецензурных слов" ); - + + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Import a Badword List" ); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "Загрузка XML-файла с фильтрами
    Выберите файл «ipb_badwords.xml» или «ipb_badwords.xml.gz» на вашем компьютере. Записи уже содержащиеся в базе не будут импортированы.
    ", + "Upload XML Badword List
    Browse your computer for 'ipb_badwords.xml' or 'ipb_badwords.xml.gz'. Duplicate entries will not be imported.
    ", $this->ipsclass->adskin->form_upload( ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Импортировать"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Import"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); } - + //----------------------------------------- // BADWORD: Complete Edit //----------------------------------------- - + function badword_doedit() { if ($this->ipsclass->input['before'] == "") { - $this->ipsclass->admin->error("Вы не указали заменяемое слово."); + $this->ipsclass->admin->error("You must enter a word to replace, silly!"); } - + if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Вы не указали ID фильтра."); + $this->ipsclass->admin->error("You must pass a valid filter id, silly!"); } - + $this->ipsclass->input['match'] = $this->ipsclass->input['match'] ? 1 : 0; - + strlen($this->ipsclass->input['swop']) > 1 ? $this->ipsclass->input['swop'] : ""; - + $this->ipsclass->DB->do_update( 'badwords', array( 'type' => trim($this->ipsclass->input['before']), 'swop' => trim($this->ipsclass->input['after']), 'm_exact' => $this->ipsclass->input['match'], ), "wid='".$this->ipsclass->input['id']."'" ); - + $this->badword_rebuildcache(); - - $this->ipsclass->main_msg = "Фильтр изменен"; - + + $this->ipsclass->main_msg = "Filter edited"; + $this->badword_start(); } - + //----------------------------------------- // BADWORD: Edit //----------------------------------------- - + function badword_edit() { - $this->ipsclass->admin->page_detail = "Вы можете изменить выбранный фильтр в форме ниже"; - $this->ipsclass->admin->page_title = "Фильтр нецензурных слов"; - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=badword', 'Фильтр нецензурных слов' ); - $this->ipsclass->admin->nav[] = array( '', 'Изменение фильтра нецензурных слов' ); - + $this->ipsclass->admin->page_detail = "You may edit the chosen filter below"; + $this->ipsclass->admin->page_title = "Bad Word Filter"; + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=badword', 'Bad Word Filters' ); + $this->ipsclass->admin->nav[] = array( '', 'Edit Bad Word Filter' ); + //----------------------------------------- - + if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Вы не указали ID фильтра."); + $this->ipsclass->admin->error("You must pass a valid filter id, silly!"); } - + //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'badwords', 'where' => "wid='".$this->ipsclass->input['id']."'" ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $r = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Указанный вами фильтр не найден в базе данных."); + $this->ipsclass->admin->error("We could not find that filter in the database"); } - + //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'badword_doedit' ), 2 => array( 'act' , 'babw' ), 3 => array( 'id' , $this->ipsclass->input['id'] ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - - - - $this->ipsclass->adskin->td_header[] = array( "Слово" , "40%" ); - $this->ipsclass->adskin->td_header[] = array( "Замена" , "40%" ); - $this->ipsclass->adskin->td_header[] = array( "Метод" , "20%" ); - + + + + $this->ipsclass->adskin->td_header[] = array( "Before" , "40%" ); + $this->ipsclass->adskin->td_header[] = array( "After" , "40%" ); + $this->ipsclass->adskin->td_header[] = array( "Method" , "20%" ); + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Редактирование фильтра" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Edit a filter" ); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $this->ipsclass->adskin->form_input('before', stripslashes($r['type']) ), $this->ipsclass->adskin->form_input('after' , stripslashes($r['swop']) ), - $this->ipsclass->adskin->form_dropdown( 'match', array( 0 => array( 1, 'Точный' ), 1 => array( 0, 'Маска' ) ), $r['m_exact'] ) + $this->ipsclass->adskin->form_dropdown( 'match', array( 0 => array( 1, 'Exact' ), 1 => array( 0, 'Loose' ) ), $r['m_exact'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Изменить'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Edit Filter'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); - + } - + //----------------------------------------- // BADWORD: Remove badowrd //----------------------------------------- - + function badword_remove() { if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Вы не указали ID фильтра."); + $this->ipsclass->admin->error("You must pass a valid filter id, silly!"); } - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'badwords', 'where' => "wid='".$this->ipsclass->input['id']."'" ) ); - + $this->badword_rebuildcache(); - - $this->ipsclass->main_msg = "Фильтр удален."; - + + $this->ipsclass->main_msg = "Filter removed"; + $this->badword_start(); return; } - + //----------------------------------------- // BADWORD: Add badword //----------------------------------------- - + function badword_add() { if ($this->ipsclass->input['before'] == "") { - $this->ipsclass->admin->error("Вы не указали слово для замены."); + $this->ipsclass->admin->error("You must enter a word to replace, silly!"); } - + $this->ipsclass->input['match'] = $this->ipsclass->input['match'] ? 1 : 0; - + strlen($this->ipsclass->input['swop']) > 1 ? $this->ipsclass->input['swop'] : ""; - + $this->ipsclass->DB->do_insert( 'badwords', array( 'type' => trim($this->ipsclass->input['before']), 'swop' => trim($this->ipsclass->input['after']), 'm_exact' => $this->ipsclass->input['match'], ) ); - + $this->badword_rebuildcache(); - - $this->ipsclass->main_msg = "Фильтр успешно добавлен."; - + + $this->ipsclass->main_msg = "New filter added"; + $this->badword_start(); } - + //----------------------------------------- // BADWORD Rebuild Cache //----------------------------------------- - + function badword_rebuildcache() { + require_once ROOT_PATH.'sources/classes/bbcode/class_bbcode_core.php'; + $this->ipsclass->cache['badwords'] = array(); - + $this->ipsclass->DB->simple_construct( array( 'select' => 'type,swop,m_exact', 'from' => 'badwords' ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $this->ipsclass->cache['badwords'][] = $r; } - + + usort( $this->ipsclass->cache['emoticons'] , array( 'class_bbcode_core', 'word_length_sort' ) ); + $this->ipsclass->update_cache( array( 'name' => 'badwords', 'array' => 1, 'deletefirst' => 1 ) ); } - - - function perly_length_sort($a, $b) - { - if ( strlen($a['typed']) == strlen($b['typed']) ) - { - return 0; - } - return ( strlen($a['typed']) > strlen($b['typed']) ) ? -1 : 1; - } - - function perly_word_sort($a, $b) - { - if ( strlen($a['type']) == strlen($b['type']) ) - { - return 0; - } - return ( strlen($a['type']) > strlen($b['type']) ) ? -1 : 1; - } - - - - - + } diff --git a/upload/sources/action_admin/bbcode.php b/upload/sources/action_admin/bbcode.php index 4008b8e5..9182be78 100644 --- a/upload/sources/action_admin/bbcode.php +++ b/upload/sources/action_admin/bbcode.php @@ -2,26 +2,18 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-10-30 06:40:23 -0600 (Mon, 30 Oct 2006) $ -| > $Revision: 684 $ -| > $Author: matt $ +| > $Date: 2007-04-24 17:35:27 -0400 (Tue, 24 Apr 2007) $ +| > $Revision: 952 $ +| > $Author: bfarber $ +--------------------------------------------------------------------------- | | > Administration Module @@ -35,7 +27,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -44,147 +36,146 @@ class ad_bbcode { var $functions = ""; var $ipsclass; var $html; - + /** * Section title name * * @var string */ var $perm_main = "content"; - + /** * Section title name * * @var string */ var $perm_child = "bbcode"; - + function auto_run() { $this->html = $this->ipsclass->acp_load_template('cp_skin_bbcode_badword'); - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Управление BB-кодами' ); + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'BBCode Manager' ); //----------------------------------------- // Require and RUN !! THERES A BOMB //----------------------------------------- - - $this->ipsclass->admin->page_detail = "Эта секция позволяет вам добавлять новые BB-коды."; - $this->ipsclass->admin->page_title = "Менеджер настройки BB-кодов"; + + $this->ipsclass->admin->page_detail = "The BBCode manager allows you to create and manage your BBCodes."; + $this->ipsclass->admin->page_title = "BBCode Manager"; //----------------------------------------- // What to do... //----------------------------------------- - + switch($this->ipsclass->input['code']) { case 'bbcode': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->bbcode_start(); break; - + case 'bbcode_add': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); $this->bbcode_form('add'); break; - + case 'bbcode_doadd': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); $this->bbcode_save('add'); break; - + case 'bbcode_edit': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->bbcode_form('edit'); break; - + case 'bbcode_doedit': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->bbcode_save('edit'); break; - + case 'bbcode_test': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->bbcode_test(); break; - + case 'bbcode_delete': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->bbcode_delete(); break; - + case 'bbcode_export': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':export' ); $this->bbcode_export(); break; - + case 'bbcode_import': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':import' ); $this->bbcode_import(); break; - + default: $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->bbcode_start(); break; } } - + //----------------------------------------- // BBCODE: Import //----------------------------------------- - + function bbcode_import() { $content = $this->ipsclass->admin->import_xml( 'bbcode.xml' ); - + //----------------------------------------- // Got anything? //----------------------------------------- - + if ( ! $content ) { - $this->ipsclass->main_msg = "Невозможно выполнить импортирование, поискольку в файле «bbcode.xml» ошибка или он не имеет записей."; + $this->ipsclass->main_msg = "Upload failed, ipb_bbcode.xml was either missing or empty"; $this->bbcode_start(); } - + //----------------------------------------- // Get xml mah-do-dah //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); $xml = new class_xml(); - + //----------------------------------------- // Unpack the datafile //----------------------------------------- - - $xml->lite_parser = 1; + $xml->xml_parse_document( $content ); - + //----------------------------------------- // Get current custom bbcodes //----------------------------------------- - + $tags = array(); - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'custom_bbcode' ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $tags[ $r['bbcode_tag'] ] = 1; } - + //----------------------------------------- // pArse //----------------------------------------- - + if ( ! is_array( $xml->xml_array['bbcodeexport']['bbcodegroup']['bbcode'][0] ) ) { $xml->xml_array['bbcodeexport']['bbcodegroup']['bbcode'][0] = $xml->xml_array['bbcodeexport']['bbcodegroup']['bbcode']; } - + foreach( $xml->xml_array['bbcodeexport']['bbcodegroup']['bbcode'] as $entry ) { $bbcode_title = $entry['bbcode_title']['VALUE']; @@ -197,7 +188,7 @@ class ad_bbcode { $bbcode_add_into_menu = $entry['bbcode_add_into_menu']['VALUE']; $bbcode_menu_option_text = $entry['bbcode_menu_option_text']['VALUE']; $bbcode_menu_content_text = $entry['bbcode_menu_content_text']['VALUE']; - + if ( $tags[ $bbcode_tag ] ) { $bbarray = array( @@ -212,12 +203,12 @@ class ad_bbcode { 'bbcode_menu_option_text' => $bbcode_menu_option_text, 'bbcode_menu_content_text' => $bbcode_menu_content_text, ); - + $this->ipsclass->DB->do_update( 'custom_bbcode', $bbarray, "bbcode_tag='".$bbcode_tag."'" ); - + continue; } - + if ( $bbcode_tag ) { $bbarray = array( @@ -232,101 +223,108 @@ class ad_bbcode { 'bbcode_menu_option_text' => $bbcode_menu_option_text, 'bbcode_menu_content_text' => $bbcode_menu_content_text, ); - + $this->ipsclass->DB->do_insert( 'custom_bbcode', $bbarray ); } } - + $this->bbcode_rebuildcache(); - - $this->ipsclass->main_msg = "Записи с BB-кодовами успешно импортирован."; - + + $this->ipsclass->main_msg = "BBCode XML file import completed"; + $this->bbcode_start(); - + } - + //----------------------------------------- // BBCODE: Export //----------------------------------------- - + function bbcode_export() { //----------------------------------------- // Get xml mah-do-dah //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); $xml = new class_xml(); - + //----------------------------------------- // Start... //----------------------------------------- - + $xml->xml_set_root( 'bbcodeexport', array( 'exported' => time() ) ); - + //----------------------------------------- // Get emo group //----------------------------------------- - + $xml->xml_add_group( 'bbcodegroup' ); - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'custom_bbcode' ) ); + + $select = array( 'select' => '*', 'from' => 'custom_bbcode' ); + + if( $this->ipsclass->input['id'] ) + { + $select['where'] = 'bbcode_id=' . intval($this->ipsclass->input['id']); + } + + $this->ipsclass->DB->simple_construct( $select ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $content = array(); - + foreach ( $r as $k => $v ) { $content[] = $xml->xml_build_simple_tag( $k, $v ); } - + $entry[] = $xml->xml_build_entry( 'bbcode', $content ); } - + $xml->xml_add_entry_to_group( 'bbcodegroup', $entry ); - + $xml->xml_format_document(); - + //----------------------------------------- // Send to browser. //----------------------------------------- - + $this->ipsclass->admin->show_download( $xml->xml_document, 'bbcode.xml', '', 0 ); } - + //----------------------------------------- // BBCODE Remove //----------------------------------------- - + function bbcode_delete() { if ( ! $this->ipsclass->input['id'] ) { - $this->ipsclass->main_msg = "Вы не указали ID BB-кода для удаления."; + $this->ipsclass->main_msg = "No ID was passed, please try again."; $this->bbcode_start(); } - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'custom_bbcode', 'where' => 'bbcode_id='.intval($this->ipsclass->input['id']) ) ); - + $this->bbcode_rebuildcache(); - + $this->bbcode_start(); } - + //----------------------------------------- // BBCODE Rebuild Cache //----------------------------------------- - + function bbcode_rebuildcache() { $this->ipsclass->cache['bbcode'] = array(); - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'custom_bbcode' ) ); $bbcode = $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row($bbcode) ) { $this->ipsclass->cache['bbcode'][] = $r; @@ -334,32 +332,32 @@ class ad_bbcode { $this->ipsclass->update_cache( array( 'name' => 'bbcode', 'array' => 1, 'deletefirst' => 1 ) ); } - + //----------------------------------------- // BBCODE Test //----------------------------------------- - + function bbcode_test() { $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'custom_bbcode', 'order' => 'bbcode_title' ) ); $this->ipsclass->DB->simple_exec(); - + $t = $this->ipsclass->txt_stripslashes($_POST['bbtest']); - + while ( $row = $this->ipsclass->DB->fetch_row() ) { $preg_tag = preg_quote($row['bbcode_tag'], '#' ); - + if ( substr_count( $row['bbcode_replace'], '{content}' ) >= 1 ) { //----------------------------------------- // Slightly slower //----------------------------------------- - + if ( $row['bbcode_useoption'] ) { preg_match_all( "#(\[".preg_quote($row['bbcode_tag'], '#' )."=(?:"|&\#39;)?(.+?)(?:"|&\#39;)?\])(.+?)(\[/".preg_quote($row['bbcode_tag'], '#' )."\])#si", $t, $match ); - + for ($i=0; $i < count($match[0]); $i++) { # XSS Check: Bug ID: 980 @@ -367,20 +365,20 @@ class ad_bbcode { { $match[2][$i] = intval( $match[2][$i] ); } - + //----------------------------------------- // Does the option tag come first? //----------------------------------------- - + $_option = 2; $_content = 3; - + if ( $row['bbcode_switch_option'] ) { $_option = 3; $_content = 2; } - + $tmp = $row['bbcode_replace']; $tmp = str_replace( '{option}' , $match[ $_option ][$i], $tmp ); $tmp = str_replace( '{content}', $match[ $_content ][$i], $tmp ); @@ -391,7 +389,7 @@ class ad_bbcode { { # Tricky.. match anything that's not a closing tag, or nothing preg_match_all( "#(\[$preg_tag\])((?!\[/$preg_tag\]).+?)?(\[/$preg_tag\])#si", $t, $match ); - + for ($i=0; $i < count($match[0]); $i++) { $tmp = $row['bbcode_replace']; @@ -403,7 +401,7 @@ class ad_bbcode { else { $replace = explode( '{content}', $row['bbcode_replace'] ); - + if ( $row['bbcode_useoption'] ) { $t = preg_replace( "#\[".$row['bbcode_tag']."=(?:"|&\#39;)?(.+?)(?:"|&\#39;)?\]#si", str_replace( '{option}', "\\1", $replace[0] ), $t ); @@ -412,53 +410,53 @@ class ad_bbcode { { $t = preg_replace( '#\['.$row['bbcode_tag'].'\]#i' , $replace[0], $t ); } - + $t = preg_replace( '#\[/'.$row['bbcode_tag'].'\]#i', $replace[1], $t ); } } - - $this->ipsclass->main_msg = "Проверка BB-кода:

    ".$t; - + + $this->ipsclass->main_msg = "BBCode Test:

    ".$t; + $this->bbcode_start(); } - + //----------------------------------------- // BBCODE Save Form //----------------------------------------- - + function bbcode_save($type='add') { if ( $type == 'edit' ) { if ( ! $this->ipsclass->input['id'] ) { - $this->ipsclass->main_msg = "Вы не указали ID для изменения."; + $this->ipsclass->main_msg = "No ID was passed, please try again"; $this->bbcode_form($type); } } - + //----------------------------------------- // check... //----------------------------------------- - + if ( ! $this->ipsclass->input['bbcode_title'] or ! $this->ipsclass->input['bbcode_tag'] or ! $this->ipsclass->input['bbcode_replace'] ) { - $this->ipsclass->main_msg = "Вы должны заполнить все поля."; + $this->ipsclass->main_msg = "You must complete the form fully."; $this->bbcode_form($type); } - + if ( ! strstr( $this->ipsclass->input['bbcode_replace'], '{content}' ) ) { - $this->ipsclass->main_msg = "Вы должны использовать {content} в тех местах, где происходит замена BB-кодов."; + $this->ipsclass->main_msg = "You must use {content} somewhere in the BBCode replacement section."; $this->bbcode_form($type); } - + if ( ! strstr( $this->ipsclass->input['bbcode_replace'], '{option}' ) AND $this->ipsclass->input['bbcode_useoption'] ) { - $this->ipsclass->main_msg = "Вы должны использовать {option}, в тех местах, где происходит замена BB-кодов или параметру «Использовать настройки в тегах» установить значение «Нет»."; + $this->ipsclass->main_msg = "You must use {option} somewhere in the BBCode replacement section or set 'Use Option in tag?' to 'no'."; $this->bbcode_form($type); } - + $array = array( 'bbcode_title' => $this->ipsclass->input['bbcode_title'], 'bbcode_desc' => $this->ipsclass->txt_safeslashes( $_POST['bbcode_desc'] ), 'bbcode_tag' => $this->ipsclass->input['bbcode_tag'], @@ -470,48 +468,48 @@ class ad_bbcode { 'bbcode_menu_option_text' => trim( $this->ipsclass->input['bbcode_menu_option_text'] ), 'bbcode_menu_content_text' => trim( $this->ipsclass->input['bbcode_menu_content_text'] ) ); - + if ( $type == 'add' ) { $this->ipsclass->DB->do_insert( 'custom_bbcode', $array ); - $this->ipsclass->main_msg = 'Новый BB-код успешно добавлен.'; + $this->ipsclass->main_msg = 'New BBCode Added'; } else { $this->ipsclass->DB->do_update( 'custom_bbcode', $array, 'bbcode_id='.intval($this->ipsclass->input['id']) ); - $this->ipsclass->main_msg = 'BB-код успешно изменен.'; + $this->ipsclass->main_msg = 'Custom BBCode Edited'; } - + $this->bbcode_rebuildcache(); - + $this->bbcode_start(); - + } - - + + //----------------------------------------- // BBCODE Start Form //----------------------------------------- - + function bbcode_form($type='add') { - $this->ipsclass->admin->page_detail = "В этой секции вы сможете просмотреть все созданные вами BB-коды, а так же изменить их или удалить."; - $this->ipsclass->admin->page_title = "Дополнительные BB-коды"; - $this->ipsclass->admin->nav[] = array( '', 'Добавление/изменение BB-кодов' ); - + $this->ipsclass->admin->page_detail = "The BBCode manager allows you to add new custom BBCode."; + $this->ipsclass->admin->page_title = "BBCode Manager"; + $this->ipsclass->admin->nav[] = array( '', 'Add/Edit BBCode' ); + if ( $type == 'edit' ) { if ( ! $this->ipsclass->input['id'] ) { - $this->ipsclass->main_msg = "Вы не указали ID BB-кода для удаления"; + $this->ipsclass->main_msg = "No ID was passed, please try again"; $this->bbcode_start(); } - + $bbcode = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'custom_bbcode', 'where' => 'bbcode_id='.intval($this->ipsclass->input['id']) ) ); - - $button = "Изменить"; + + $button = "Edit BBCode"; $code = 'bbcode_doedit'; - $title = "Редактирование BB-кода: ".$bbcode['bbcode_title']; + $title = "Editing BBCode: ".$bbcode['bbcode_title']; } else { @@ -522,99 +520,99 @@ class ad_bbcode { 'bbcode_useoption' => '', 'bbcode_replace' => '' ); $code = 'bbcode_doadd'; - $title = "Добавление нового BB-кода"; - $button = "Добавить"; + $title = "Adding a new custom BBCode"; + $button = "Add BBCode"; } - + //----------------------------------------- // Show the codes mahn! //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'bbcode' ), 2 => array( 'code' , $code ), 3 => array( 'id' , $this->ipsclass->input['id'] ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( $title ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Название BB-кода
    Используется во всплывающей подсказке BB-кода
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Custom BBCode Title
    Used on the BBCode pop-up legend
    ", $this->ipsclass->adskin->form_input( 'bbcode_title', ( isset($this->ipsclass->input['bbcode_title']) AND $this->ipsclass->input['bbcode_title'] ) ? $this->ipsclass->input['bbcode_title'] : $bbcode['bbcode_title'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Полное описание этого BB-кода
    Используется во всплывающей подсказке BB-код
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Custom BBCode Description
    Used on the BBCode pop-up legend
    ", $this->ipsclass->adskin->form_textarea( 'bbcode_desc', ( isset($this->ipsclass->input['bbcode_desc']) AND $this->ipsclass->input['bbcode_desc'] ) ? $this->ipsclass->input['bbcode_desc'] : $bbcode['bbcode_desc'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Пример этого BB-кода
    Используется во всплывающей подсказке BB-код
    Тег для примера: [tag]Здесь ваш пример![/tag]
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Custom BBCode Example
    Used on the BBCode pop-up legend
    Use the tag in the example: [tag]This is an example![/tag]
    ", $this->ipsclass->adskin->form_textarea( 'bbcode_example', ( isset($this->ipsclass->input['bbcode_example']) AND $this->ipsclass->input['bbcode_example'] ) ? $this->ipsclass->input['bbcode_example'] : $bbcode['bbcode_example'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Тег этого BB-кода
    Пример: Для [tag] введите tag
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Custom BBCode Tag
    Example: For [tag] enter tag
    ", '[ '.$this->ipsclass->adskin->form_simple_input( 'bbcode_tag', ( isset($this->ipsclass->input['bbcode_tag']) AND $this->ipsclass->input['bbcode_tag'] ) ? $this->ipsclass->input['bbcode_tag'] : $bbcode['bbcode_tag'], 10).' ]' ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Использовать опции в теге?
    Используется для создания BB-кода с опциями: [tag=option]
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Use Option in tag?
    Use to create [tag=option] style tags
    ", $this->ipsclass->adskin->form_yes_no( 'bbcode_useoption', ( isset($this->ipsclass->input['bbcode_useoption']) AND $this->ipsclass->input['bbcode_useoption'] ) ? $this->ipsclass->input['bbcode_useoption'] : $bbcode['bbcode_useoption'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Сменить операнды?
    Если вы желаете заменять {content} на {option} (при использовании тегов IE «любит» [tag={content}]{option}[/tag]
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Switch option around?
    Use this if you wish to swap the {content} for {option} (IE when using tags like [tag={content}]{option}[/tag]
    ", $this->ipsclass->adskin->form_yes_no( 'bbcode_switch_option', ( isset($this->ipsclass->input['bbcode_switch_option']) AND $this->ipsclass->input['bbcode_switch_option'] ) ? $this->ipsclass->input['bbcode_switch_option'] : $bbcode['bbcode_switch_option'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Замена BB-кода
    <tag>{content}</tag>
    <tag thing='{option}'>{content}</tag>
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Custom BBCode Replacement
    <tag>{content}</tag>
    <tag thing='{option}'>{content}</tag>
    ", $this->ipsclass->adskin->form_textarea( 'bbcode_replace', ( isset($this->ipsclass->input['bbcode_replace']) AND $this->ipsclass->input['bbcode_replace'] ) ? $this->ipsclass->input['bbcode_replace'] : $bbcode['bbcode_replace'] ) ) ); //----------------------------------------- // Insert Special Options //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Добавить в меню «Спец. элементы» редактора?", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Insert into the editor's 'Insert Special' menu?", $this->ipsclass->adskin->form_yes_no( 'bbcode_add_into_menu', ( isset($this->ipsclass->input['bbcode_add_into_menu']) AND $this->ipsclass->input['bbcode_add_into_menu'] ) ? $this->ipsclass->input['bbcode_add_into_menu'] : $bbcode['bbcode_add_into_menu'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Введите текст для 'option'
    Текст для помощи в использовании поля 'Option'. Он будет отображаться, когда будет выбран тег в редакторе.
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Enter 'option' dialogue text
    Help text to use above the 'Option' text field. This will appear when the tag is chosen from the 'Insert Special' menu.
    ", $this->ipsclass->adskin->form_simple_input( 'bbcode_menu_option_text', ( isset($this->ipsclass->input['bbcode_menu_option_text']) AND $this->ipsclass->input['bbcode_menu_option_text'] ) ? $this->ipsclass->input['bbcode_menu_option_text'] : $bbcode['bbcode_menu_option_text'], 50) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Введите текст для 'content'
    Текст для помощи в использовании поля 'Content'. Он будет отображаться, когда будет выбран тег в редакторе.
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Enter 'content' dialogue text
    Help text to use above the 'Content' text field. This will appear when the tag is chosen from the 'Insert Special' menu.
    ", $this->ipsclass->adskin->form_simple_input( 'bbcode_menu_content_text', ( isset($this->ipsclass->input['bbcode_menu_content_text']) AND $this->ipsclass->input['bbcode_menu_content_text'] ) ? $this->ipsclass->input['bbcode_menu_content_text'] : $bbcode['bbcode_menu_content_text'], 50) ) ); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_form( $button ); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - $this->ipsclass->html .= "
    Дополнительная информация
    Во время добавления замены BB-кода, не забудьте добавить блок {content} там, где это требуется.
    - Если вы используете опцию BB-кода [tag=option][/tag], не забудьте добавить блок {option} там, где это требуется в замене BB-кода.
    "; - + + $this->ipsclass->html .= "
    More Information
    When adding the BBCode replacement, don't forget to add the {content} block where you wish the tag content to go when parsed.
    + If you are using an option [tag=option][/tag] tag, don't forget to add in {option} in the BBCode replacement where you want the option to go.
    "; + //----------------------------------------- - + $this->ipsclass->admin->output(); - + } - + //----------------------------------------- // BBCODE Splash //----------------------------------------- - + function bbcode_start() { - $this->ipsclass->admin->page_detail = "В этой секции вы сможете создать новые BB-коды, которые в последсвие смогут использовать пользователи вашего форума."; - $this->ipsclass->admin->page_title = "Добавление нового дополнительного BB-кода"; - + $this->ipsclass->admin->page_detail = "The BBCode manager allows you to add new custom BBCode."; + $this->ipsclass->admin->page_title = "BBCode Manager"; + //----------------------------------------- // Show the codes mahn! //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'custom_bbcode', 'order' => 'bbcode_title' ) ); $this->ipsclass->DB->simple_exec(); - + $bbcode_rows = ""; - + while ( $row = $this->ipsclass->DB->fetch_row() ) { if ( $row['bbcode_useoption'] ) @@ -625,89 +623,67 @@ class ad_bbcode { { $option = ''; } - + $row['bbcode_fulltag'] = '['.$row['bbcode_tag'].$option.']{content}[/'.$row['bbcode_tag'].']'; - + $bbcode_rows .= $this->html->bbcode_row( $row ); } - + $this->ipsclass->html .= $this->html->bbcode_wrapper( $bbcode_rows ); - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'bbcode' ), 2 => array( 'code' , 'bbcode_test' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Проверить BB-код" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Введите в поле BB-код", + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Test your custom BBCode" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Test your BBCode", $this->ipsclass->adskin->form_textarea( 'bbtest', isset($_POST['bbtest']) ? $_POST['bbtest'] : '' ), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Начать проверку"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Run Test"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // IMPORT: Start table //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - + //----------------------------------------- // IMPORT: Start output //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'bbcode_import' ), 2 => array( 'act' , 'bbcode' ), 3 => array( 'MAX_FILE_SIZE', '10000000000' ), 4 => array( 'section', $this->ipsclass->section_code ), ) , "uploadform", " enctype='multipart/form-data'" ); - - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Импортирование списка BB-кодов" ); - + + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Import a BBCode List" ); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "Загрузка XML списка BB-кодов
    Выберите на вашем компьютере файл «ipb_bbcode.xml». Дублирование [tag] невозможно — импортировать не удастся.
    ", + "Upload XML BBCode List
    Browse your computer for 'bbcode.xml' or 'bbcode.xml.gz'. Duplicate [tag] entries will not be imported.
    ", $this->ipsclass->adskin->form_upload( ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Импортировать"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Import"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); - + } + - - function perly_length_sort($a, $b) - { - if ( strlen($a['typed']) == strlen($b['typed']) ) - { - return 0; - } - return ( strlen($a['typed']) > strlen($b['typed']) ) ? -1 : 1; - } - - function perly_word_sort($a, $b) - { - if ( strlen($a['type']) == strlen($b['type']) ) - { - return 0; - } - return ( strlen($a['type']) > strlen($b['type']) ) ? -1 : 1; - } - - - - - - + } diff --git a/upload/sources/action_admin/calendars.php b/upload/sources/action_admin/calendars.php index 0341793c..ec651534 100644 --- a/upload/sources/action_admin/calendars.php +++ b/upload/sources/action_admin/calendars.php @@ -1,1004 +1,977 @@ - $Date: 2006-10-06 17:00:51 -0500 (Fri, 06 Oct 2006) $ -| > $Revision: 617 $ -| > $Author: bfarber $ -+--------------------------------------------------------------------------- -| -| > Components Functions -| > Module written by Matt Mecham -| > Date started: 12th April 2005 (13:09) -+-------------------------------------------------------------------------- -*/ - -# CALENDAR SORTING! - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Неверный вход

    У вас нет доступа к этому файлу. Если проводилось обновление, убедитесь, что не забыли обновить файл admin.php."; - exit(); -} - -class ad_calendars -{ - # Globals - var $ipsclass; - - var $perm_main = 'content'; - var $perm_child = 'calendars'; - - /*-------------------------------------------------------------------------*/ - // Main handler - /*-------------------------------------------------------------------------*/ - - function auto_run() - { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Менеджер календарей' ); - $this->html = $this->ipsclass->acp_load_template('cp_skin_management'); - - switch($this->ipsclass->input['code']) - { - case 'calendar_list': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->calendar_list(); - break; - - case 'calendar_delete': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); - $this->calendar_delete(); - break; - - case 'calendar_add': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); - $this->calendar_form('add'); - break; - case 'calendar_add_do': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); - $this->calendar_save('add'); - break; - - case 'calendar_edit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->calendar_form('edit'); - break; - case 'calendar_edit_do': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->calendar_save('edit'); - break; - - - case 'calendar_move': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->calendar_move(); - break; - case 'calendar_rebuildcache': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recache' ); - $this->calendar_rebuildcache( 1 ); - break; - case 'calendar_rss_cache': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recache' ); - $this->calendar_rss_cache( intval($this->ipsclass->input['cal_id']), 1 ); - break; - - default: - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->calendar_list(); - break; - } - } - - /*-------------------------------------------------------------------------*/ - // Components: Delete - /*-------------------------------------------------------------------------*/ - - function calendar_delete() - { - //-------------------------------------------- - // INIT - //-------------------------------------------- - - $cal_id = intval($this->ipsclass->input['cal_id']); - - //-------------------------------------------- - // Checks... - //-------------------------------------------- - - if ( ! $cal_id ) - { - $this->ipsclass->main_msg = "Вы не указали ID календаря для удаления."; - $this->components_list(); - return; - } - - //-------------------------------------------- - // Delete calendar events - //-------------------------------------------- - - $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'cal_events', 'where' => 'event_calendar_id='.$cal_id ) ); - - //-------------------------------------------- - // Delete calendar - //-------------------------------------------- - - $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'cal_calendars', 'where' => 'cal_id='.$cal_id ) ); - - //-------------------------------------------- - // Recache and re-RSS - //-------------------------------------------- - - $this->calendar_rebuildcache(); - $this->calendar_rss_cache(); - - $this->ipsclass->main_msg = "Календарь успешно удален."; - $this->calendar_list(); - } - - /*-------------------------------------------------------------------------*/ - // Components: Position - /*-------------------------------------------------------------------------*/ - - function calendar_move() - { - //-------------------------------------------- - // INIT - //-------------------------------------------- - - $cal_id = intval($this->ipsclass->input['cal_id']); - $move = trim($this->ipsclass->input['move']); - - //-------------------------------------------- - // Checks... - //-------------------------------------------- - - if ( ! $cal_id OR ! $move ) - { - $this->ipsclass->main_msg = "Вы не указали ID..."; - $this->calendar_list(); - return; - } - - //-------------------------------------------- - // Get from database - //-------------------------------------------- - - $calendar = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'cal_calendars', 'where' => 'cal_id='.$cal_id ) ); - - $new_position = ( $move == 'up' ) ? intval($calendar['cal_position']) - 1 : intval($calendar['cal_position']) + 1; - - $this->ipsclass->DB->do_update( 'cal_calendars', array( 'cal_position' => $new_position ), 'cal_id='.$cal_id ); - - $this->ipsclass->main_msg = "Календарь обновлен."; - $this->calendar_list(); - } - - /*-------------------------------------------------------------------------*/ - // Components Rebuild Cache - /*-------------------------------------------------------------------------*/ - - function calendar_rss_cache( $calendar_id='all', $return=0 ) - { - //-------------------------------------------- - // INIT - //-------------------------------------------- - - $seenids = array(); - $calevents = ""; - - //-------------------------------------------- - // Get classes - //-------------------------------------------- - - require_once( ROOT_PATH . 'sources/action_public/calendar.php' ); - $calendar = new calendar(); - $calendar->ipsclass =& $this->ipsclass; - - //-------------------------------------------- - // Require classes - //-------------------------------------------- - - require_once( KERNEL_PATH . 'class_rss.php' ); - $class_rss = new class_rss(); - $class_rss->ipsclass =& $this->ipsclass; - $class_rss->use_sockets = $this->use_sockets; - $class_rss->doc_type = $this->ipsclass->vars['gb_char_set']; - - //----------------------------------------- - // Load and config the post parser - //----------------------------------------- - - require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); - $this->parser = new parse_bbcode(); - $this->parser->ipsclass = $this->ipsclass; - $this->parser->allow_update_caches = 1; - $this->parser->bypass_badwords = 0; - - //----------------------------------------- - // Make sure we have the HTML component - //----------------------------------------- - - if ( ! is_object( $this->html ) ) - { - $this->html = $this->ipsclass->acp_load_template('cp_skin_management'); - } - - //-------------------------------------------- - // Reset rss_export cache - //-------------------------------------------- - - $this->ipsclass->cache['rss_calendar'] = array(); - - //-------------------------------------------- - // Get stuff - //-------------------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'cal_calendars', 'where' => 'cal_rss_export_days > 0 AND cal_rss_export_max > 0 AND cal_rss_export=1' ) ); - $outer = $this->ipsclass->DB->exec_query(); - - while( $row = $this->ipsclass->DB->fetch_row( $outer ) ) - { - if ( $row['cal_rss_export'] ) - { - $this->ipsclass->cache['rss_calendar'][] = array( 'url' => $this->ipsclass->vars['board_url'].'/index.php?act=rssout&type=calendar&id='.$row['cal_id'], - 'title' => $row['cal_title'] ); - } - - if ( $calendar_id == $row['cal_id'] OR $calendar_id == 'all' ) - { - //-------------------------------------------- - // Create Channel - //-------------------------------------------- - - $channel_id = $class_rss->create_add_channel( array( 'title' => $row['cal_title'], - 'link' => $this->ipsclass->vars['board_url'].'/index.php?act=calendar&calendar_id='.$row['cal_id'], - 'pubDate' => $class_rss->rss_unix_to_rfc( time() ), - 'ttl' => $row['cal_rss_update'] * 60, - 'description' => $row['cal_title'] - ) ); - - //-------------------------------------------- - // Check permissions - //-------------------------------------------- - - $_perms = unserialize( $row['cal_permissions'] ); - $pass = 0; - - if ( $_perms['perm_read'] == '*' OR preg_match( "/(^|,)".$this->ipsclass->vars['guest_group']."(,|$)/", $_perms['perm_read'] ) ) - { - $pass = 1; - } - - if ( ! $pass ) - { - continue; - } - - //-------------------------------------------- - // Sort out dates - //-------------------------------------------- - - $row['cal_rss_export_days'] = intval($row['cal_rss_export_days']) + 1; - - list( $month, $day, $year ) = explode( ',', gmdate('n,j,Y', time()) ); - - $timenow = gmmktime( 0,0,0, $month, 1, $year ); - $timethen = time() + ($row['cal_rss_export_days'] * 86400) + 86400; - $nowtime = time() - 86400; - $items = 0; - - //-------------------------------------------- - // Get events - //-------------------------------------------- - - $calendar->get_events_sql( 0, 0, array('timenow' => $timenow, 'timethen' => $timethen, 'cal_id' => $row['cal_id'] ), 0 ); - - //-------------------------------------------- - // OK.. Go through days and check events - //-------------------------------------------- - - for( $i = 0 ; $i <= $row['cal_rss_export_days'] ; $i++ ) - { - //-------------------------------------------- - // Get more then! - //-------------------------------------------- - - list( $month, $day, $year ) = explode( ',', gmdate('n,j,Y', $nowtime) ); - - $eventcache = $calendar->get_day_events( $month, $day, $year ); - - foreach( $eventcache as $event ) - { - if ( ! in_array( $event['event_id'], $seenids ) ) - { - //-------------------------------------------- - // Got enough? - //-------------------------------------------- - - if ( $row['cal_rss_export_max'] <= $items ) - { - break; - } - - if ( $calendar->get_info_events( $event, $month, $day, $year, 0 ) ) - { - if ( ! $event['event_approved'] ) - { - continue; - } - - if ( $event['event_private'] ) - { - continue; - } - - if ( $event['event_perms'] != '*' AND ! preg_match( "/(^|,)".$this->ipsclass->vars['guest_group']."(,|$)/", $event['event_perms'] ) ) - { - continue; - } - - //-------------------------------------------- - // Parse - //-------------------------------------------- - - $this->parser->parse_html = 0; - $this->parser->parse_nl2br = 1; - - //-------------------------------------------- - // Get dates - //-------------------------------------------- - - list( $m , $d , $y ) = explode( ",", gmdate('n,j,Y', $event['event_unix_from'] ) ); - list( $m1, $d1, $y1 ) = explode( ",", gmdate('n,j,Y', $event['event_unix_to'] ) ); - - $event['_from_month'] = $m; - $event['_from_day'] = $d; - $event['_from_year'] = $y; - $event['_to_month'] = $m1; - $event['_to_day'] = $d1; - $event['_to_year'] = $y1; - - $event['event_content'] = $this->parser->pre_db_parse( $event['event_content'] ); - $event['event_content'] = $this->parser->pre_display_parse( $event['event_content'] ); - - if ( $event['recurring'] ) - { - $event['event_content'] = $this->html->calendar_rss_recurring( $event ); - } - else if ( $event['single'] ) - { - $event['event_content'] = $this->html->calendar_rss_single( $event ); - } - else - { - $event['event_content'] = $this->html->calendar_rss_range( $event ); - } - - $event['event_unix_from'] = $event['event_tz'] ? $event['event_unix_from'] : $event['event_unix_from'] + ( $this->ipsclass->vars['time_offset'] * 3600 ); - - $class_rss->create_add_item( $channel_id, array( 'title' => $event['event_title'], - 'link' => $this->ipsclass->vars['board_url'].'/index.php?act=calendar&code=showevent&calendar_id='.$row['cal_id'].'&event_id='.$event['event_id'], - 'description' => $event['event_content'], - 'pubDate' => $class_rss->rss_unix_to_rfc( $event['event_unix_from'] ), - 'guid' => $event['event_id'] - ) ); - - } - - //-------------------------------------------- - // Increment - //-------------------------------------------- - - $seenids[ $event['event_id'] ] = $event['event_id']; - $items++; - } - } - - $nowtime += 86400; - } - - //-------------------------------------------- - // Compile and save RSS document - //-------------------------------------------- - - $class_rss->rss_create_document(); - - //-------------------------------------------- - // Update the cache - //-------------------------------------------- - - $this->ipsclass->DB->do_update( 'cal_calendars', array( 'cal_rss_update_last' => time(), - 'cal_rss_cache' => $class_rss->rss_document ), 'cal_id='.$row['cal_id'] ); - } - } - - //-------------------------------------------- - // Update cache - //-------------------------------------------- - - $this->ipsclass->update_cache( array( 'name' => 'rss_calendar', 'deletefirst' => 1, 'donow' => 1, 'array' => 1 ) ); - - if ( $return ) - { - $this->ipsclass->main_msg = "RSS события календаря были перекешованы"; - $this->calendar_list(); - } - else - { - return $class_rss->rss_document; - } - } - - /*-------------------------------------------------------------------------*/ - // Components Rebuild Cache - /*-------------------------------------------------------------------------*/ - - function calendar_rebuildcache( $return=0 ) - { - //-------------------------------------------- - // INIT - //-------------------------------------------- - - $this->ipsclass->vars['calendar_limit'] = intval($this->ipsclass->vars['calendar_limit']) < 2 ? 1 : intval($this->ipsclass->vars['calendar_limit']); - - //-------------------------------------------- - // Grab an extra day for the TZ diff - //-------------------------------------------- - - $this->ipsclass->vars['calendar_limit']++; - - list( $month, $day, $year ) = explode( ',', gmdate('n,j,Y', time() ) ); - - $timenow = gmmktime( 0,0,0, $month, 1, $year ); - $timethen = time() + (intval($this->ipsclass->vars['calendar_limit']) * 86400); - $seenids = array(); - $nowtime = time() - 86400; - $birthdays = ""; - $calevents = ""; - $calendars = array(); - - $a = explode( ',', gmdate( 'Y,n,j,G,i,s', time() ) ); - $day = $a[2]; - $month = $a[1]; - $year = $a[0]; - $daysinmonth = date( 't', time() ); - - //----------------------------------------- - // Get 24hr before and 24hr after to make - // sure we don't break any timezones - //----------------------------------------- - - $last_day = $day - 1; - $last_month = $month; - $last_year = $year; - $next_day = $day + 1; - $next_month = $month; - $next_year = $year; - - //----------------------------------------- - // Calculate dates.. - //----------------------------------------- - - if ( $last_day == 0 ) - { - $last_month -= 1; - $last_day = gmdate( 't', time() ); - } - - if ( $last_month == 0 ) - { - $last_month = 12; - $last_year -= 1; - } - - if ( $next_day > gmdate( 't', time() ) ) - { - $next_month += 1; - $next_day = 1; - } - - if ( $next_month == 13 ) - { - $next_month = 1; - $next_year += 1; - } - - //-------------------------------------------- - // Get classes - //-------------------------------------------- - - require_once( ROOT_PATH . 'sources/action_public/calendar.php' ); - $calendar = new calendar(); - $calendar->ipsclass =& $this->ipsclass; - - //-------------------------------------------- - // Get stuff - //-------------------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'cal_calendars' ) ); - $this->ipsclass->DB->exec_query(); - - while( $row = $this->ipsclass->DB->fetch_row() ) - { - $perms = unserialize( $row['cal_permissions'] ); - $row['_perm_read'] = $perms['perm_read']; - - $calendars[ $row['cal_id'] ] = $row; - } - - $calendar->get_events_sql( 0, 0, array('timenow' => $timenow, 'timethen' => $timethen ) ); - - //echo "
    ";print_r($calendar->event_cache);exit;
    -		//--------------------------------------------
    -		// OK.. Go through days and check events
    -		//--------------------------------------------
    -		
    -		for( $i = 0 ; $i <= $this->ipsclass->vars['calendar_limit'] ; $i++ )
    -		{
    -			list( $_month, $tday, $year ) = explode( ',', gmdate('n,j,Y', $nowtime) );
    -			
    -			$eventcache = $calendar->get_day_events( $_month, $tday, $year );
    -			
    -			foreach( $eventcache as $event )
    -			{
    -				if ( ! in_array( $event['event_id'], $seenids ) )
    -				{ 
    -					if ( $calendar->get_info_events( $event, $_month, $tday, $year, 0 ) )
    -					{
    -						if ( ! $event['event_approved'] )
    -						{
    -							continue;
    -						}
    -						
    -						unset( $event['event_content'], $event['event_smilies'] );
    -						
    -						$event['_perm_read']             = $calendars[ $event['event_calendar_id'] ]['_perm_read'];
    -						$calevents[ $event['event_id'] ] = $event;
    -					}
    -					
    -					$seenids[ $event['event_id'] ] = $event['event_id'];
    -				}
    -			}
    -			
    -			$nowtime += 86400;
    -		}
    -
    -		//-----------------------------------------
    -		// Grab birthdays
    -		//-----------------------------------------
    -		
    -		$append_string = "";
    -		
    -        if( !date("L") )
    -        {
    -	        if( $month == "2" AND ( $day == "28" OR $day == "27" ) )
    -	        {
    -		        $append_string = " or( bday_month=2 AND bday_day=29 )";
    -	        }
    -		}
    -        
    -		$this->ipsclass->DB->simple_construct( array( 'select' => 'id, members_display_name, mgroup, bday_day, bday_month, bday_year',
    -													  'from'   => 'members',
    -													  'where'  => "( bday_day=$last_day AND bday_month=$last_month )
    -																   or ( bday_day=$day AND bday_month=$month )
    -																   or ( bday_day=$next_day AND bday_month=$next_month ) {$append_string}"
    -											 )      );
    -							 
    -		$this->ipsclass->DB->simple_exec();
    -		
    -		while ( $r = $this->ipsclass->DB->fetch_row() )
    -		{
    -			$birthdays[ $r['id'] ] = $r;
    -		}
    -		
    -		//--------------------------------------------
    -		// Update calendar array
    -		//--------------------------------------------
    -		
    -		$this->ipsclass->cache['birthdays'] =& $birthdays;
    -		$this->ipsclass->cache['calendar'] =& $calevents;
    -		
    -		$this->ipsclass->update_cache( array( 'name' => 'calendar', 'array' => 1, 'deletefirst' => 1 ) );
    -		$this->ipsclass->update_cache( array( 'name' => 'birthdays', 'array' => 1, 'deletefirst' => 1 ) );
    -
    -		if ( $return )
    -		{
    -			$this->ipsclass->main_msg = "Кеш событий календаря был успешно обновлен";
    -			$this->calendar_list();
    -		}
    -	}
    -	
    -	
    -	/*-------------------------------------------------------------------------*/
    -	// Components Save
    -	/*-------------------------------------------------------------------------*/
    -	
    -	function calendar_save($type='add')
    -	{
    -		//--------------------------------------------
    -		// INIT
    -		//--------------------------------------------
    -		
    -		$cal_id              = intval($this->ipsclass->input['cal_id']);
    -		$cal_title           = trim( $this->ipsclass->txt_stripslashes( $this->ipsclass->txt_htmlspecialchars($_POST['cal_title'])) );
    -		$cal_moderate        = intval($this->ipsclass->input['cal_moderate']);
    -		$cal_event_limit     = intval($this->ipsclass->input['cal_event_limit']);
    -		$cal_bday_limit      = intval($this->ipsclass->input['cal_bday_limit']);
    -		$cal_rss_export      = intval($this->ipsclass->input['cal_rss_export']);
    -		$cal_rss_export_days = intval($this->ipsclass->input['cal_rss_export_days']);
    -		$cal_rss_export_max  = intval($this->ipsclass->input['cal_rss_export_max']);
    -		$cal_rss_update      = intval($this->ipsclass->input['cal_rss_update']);
    -		$cal_perms			 = array( 'perm_read' => '', 'perm_post' => '', 'perm_nomod' => '' );
    -		
    -		//--------------------------------------------
    -		// Checks...
    -		//--------------------------------------------
    -		
    -		if ( $type == 'edit' )
    -		{
    -			if ( ! $cal_id OR ! $cal_title )
    -			{
    -				$this->ipsclass->main_msg = "Вы не указали ID календаря или его название.";
    -				$this->calendar_list();
    -				return;
    -			}
    -		}
    -		else
    -		{
    -			if ( ! $cal_title )
    -			{
    -				$this->ipsclass->main_msg = "Вы не указали название календаря.";
    -				$this->calendar_form( $type );
    -				return;
    -			}
    -		}
    -		
    -		//--------------------------------------------
    -		// Permission: Read
    -		//--------------------------------------------
    -		
    -		if ( $this->ipsclass->input['perm_read_all'] )
    -		{
    -			$cal_perms['perm_read'] = '*';
    -		}
    -		else if ( is_array( $_POST['perm_read'] ) )
    -		{
    -			$cal_perms['perm_read'] = implode( ',', $_POST['perm_read'] );
    -		}
    -		
    -		//--------------------------------------------
    -		// Permission: Start
    -		//--------------------------------------------
    -		
    -		if ( $this->ipsclass->input['perm_post_all'] )
    -		{
    -			$cal_perms['perm_post'] = '*';
    -		}
    -		else if ( is_array( $_POST['perm_post'] ) )
    -		{
    -			$cal_perms['perm_post'] = implode( ',', $_POST['perm_post'] );
    -		}
    -		
    -		//--------------------------------------------
    -		// Permission: No mod
    -		//--------------------------------------------
    -		
    -		if ( $this->ipsclass->input['perm_nomod_all'] )
    -		{
    -			$cal_perms['perm_nomod'] = '*';
    -		}
    -		else if ( is_array( $_POST['perm_nomod'] ) )
    -		{
    -			$cal_perms['perm_nomod'] = implode( ',', $_POST['perm_nomod'] );
    -		}
    -		
    -		//--------------------------------------------
    -		// Save...
    -		//--------------------------------------------
    -		
    -		$array = array( 'cal_title'           => $cal_title,
    -						'cal_moderate'        => $cal_moderate,
    -						'cal_event_limit'     => $cal_event_limit,
    -						'cal_bday_limit'      => $cal_bday_limit,
    -						'cal_rss_export'      => $cal_rss_export,
    -						'cal_rss_export_days' => $cal_rss_export_days,
    -						'cal_rss_export_max'  => $cal_rss_export_max,
    -						'cal_rss_update'      => $cal_rss_update,
    -						'cal_permissions'     => serialize($cal_perms),
    -					 );
    -					 
    -		if ( $type == 'add' )
    -		{
    -			$this->ipsclass->DB->do_insert( 'cal_calendars', $array );
    -			$cal_id = $this->ipsclass->DB->get_insert_id();
    -			
    -			$this->ipsclass->main_msg = 'Новый календарь добавлен.';
    -		}
    -		else
    -		{
    -			
    -			$this->ipsclass->DB->do_update( 'cal_calendars', $array, 'cal_id='.$cal_id );
    -			$this->ipsclass->main_msg = 'Календарь изменен.';
    -		}
    -		
    -		$this->calendars_rebuildcache();
    -		$this->calendar_rebuildcache( $cal_id, 0 );
    -		$this->calendar_rss_cache( $cal_id, 0 );
    -		$this->calendar_list();
    -	}
    -	
    -	/*-------------------------------------------------------------------------*/
    -	// Components: Form
    -	/*-------------------------------------------------------------------------*/
    -	
    -	function calendar_form( $type='add' )
    -	{
    -		//-----------------------------------------
    -		// Init Vars
    -		//-----------------------------------------
    -		
    -		$cal_id             	= isset($this->ipsclass->input['cal_id']) ? intval($this->ipsclass->input['cal_id']) : 0;
    -		$form               	= array();
    -		$form['perm_read']  	= "";
    -		$form['perm_post']  	= "";
    -		$form['perm_nomod'] 	= "";
    -		$form['perm_read_all'] 	= "";
    -		$form['perm_post_all']	= "";
    -		$form['perm_nomod_all']	= "";
    -		
    -		//-----------------------------------------
    -		// Check (please?)
    -		//-----------------------------------------
    -		
    -		if ( $type == 'add' )
    -		{
    -			$formcode = 'calendar_add_do';
    -			$title    = "Добавление нового календаря";
    -			$button   = "Добавить";
    -			
    -			$calendar = array( 'perm_read'			=> '',
    -								'perm_post'			=> '',
    -								'perm_nomod'		=> '',
    -								'cal_title'			=> '',
    -								'cal_moderate'		=> '',
    -								'cal_event_limit'	=> '',
    -								'cal_bday_limit'	=> '',
    -								'cal_rss_export'	=> '',
    -								'cal_rss_update'	=> '',
    -								'cal_rss_export_days' => '',
    -								'cal_rss_export_max' => '',
    -								'cal_id'			=> 0 );
    -		}
    -		else
    -		{
    -			$calendar = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'cal_calendars', 'where' => 'cal_id='.$cal_id ) );
    -			$calendar = array_merge( $calendar, unserialize( $calendar['cal_permissions'] ) );
    -			
    -			if ( ! $calendar['cal_id'] )
    -			{
    -				$this->ipsclass->main_msg = "Вы не указали ID календаря.";
    -				$this->components_list();
    -				return;
    -			}
    -			
    -			$formcode = 'calendar_edit_do';
    -			$title    = "Редактирование: ".$calendar['cal_title'];
    -			$button   = "Изменить";
    -		}
    -		
    -		//-----------------------------------------
    -		// Build Groups
    -		//-----------------------------------------
    -		
    -		$perm_read_array  = ( isset($_POST['perm_read'])  AND is_array( $_POST['perm_read'] ) )  ? $_POST['perm_read']  : explode( ',', $calendar['perm_read']  );
    -		$perm_post_array  = ( isset($_POST['perm_post'])  AND is_array( $_POST['perm_post'] ) )  ? $_POST['perm_post']  : explode( ',', $calendar['perm_post']  );
    -		$perm_nomod_array = ( isset($_POST['perm_nomod']) AND is_array( $_POST['perm_nomod'] ) ) ? $_POST['perm_nomod'] : explode( ',', $calendar['perm_nomod'] );
    -		$perm_read_all    = FALSE;
    -		$perm_post_all    = FALSE;
    -		$perm_nomod_all   = FALSE;
    -		
    -		if ( in_array( '*', $perm_read_array ) OR ( isset($_POST['perm_read_all']) AND $_POST['perm_read_all'] ) )
    -		{
    -			$perm_read_all         = TRUE;
    -			$form['perm_read_all'] = ' checked="checked"';
    -		}
    -		
    -		if ( in_array( '*', $perm_post_array ) OR ( isset($_POST['perm_post_all']) AND $_POST['perm_post_all'] ) )
    -		{
    -			$perm_post_all         = TRUE;
    -			$form['perm_post_all'] = ' checked="checked"';
    -		}
    -		
    -		if ( in_array( '*', $perm_nomod_array ) OR ( isset($_POST['perm_nomod_all']) AND $_POST['perm_nomod_all'] ) )
    -		{
    -			$perm_nomod_all         = TRUE;
    -			$form['perm_nomod_all'] = ' checked="checked"';
    -		}
    -		
    -		//-----------------------------------------
    -		// Perms masks section
    -		//-----------------------------------------
    -		
    -		$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms' ) );
    -		$this->ipsclass->DB->simple_exec();
    -		
    -		while ( $data = $this->ipsclass->DB->fetch_row() )
    -		{
    -			//-----------------------------------------
    -			// READ
    -			//-----------------------------------------
    -			
    -			if ( is_array($perm_read_array) AND in_array( $data['perm_id'], $perm_read_array ) OR $perm_read_all == TRUE )
    -			{
    -				$form['perm_read'] .= "";
    -			}
    -			else
    -			{
    -				$form['perm_read'] .= "";
    -			}
    -			
    -			//-----------------------------------------
    -			// POST
    -			//-----------------------------------------
    -			
    -			if ( is_array($perm_post_array) AND in_array( $data['perm_id'], $perm_post_array ) OR $perm_post_all == TRUE )
    -			{
    -				$form['perm_post'] .= "";
    -			}
    -			else
    -			{
    -				$form['perm_post'] .= "";
    -			}
    -			
    -			//-----------------------------------------
    -			// NO MOD
    -			//-----------------------------------------
    -			
    -			if ( is_array($perm_nomod_array) AND in_array( $data['perm_id'], $perm_nomod_array ) OR $perm_nomod_all == TRUE )
    -			{
    -				$form['perm_nomod'] .= "";
    -			}
    -			else
    -			{
    -				$form['perm_nomod'] .= "";
    -			}
    -		}
    -		
    -		//-----------------------------------------
    -		// Form elements
    -		//-----------------------------------------
    -		
    -		$form['cal_title']           = $this->ipsclass->adskin->form_input(        'cal_title'           , $this->ipsclass->txt_htmlspecialchars( ( isset($_POST['cal_title']) AND $_POST['cal_title'] ) ? $_POST['cal_title'] : $calendar['cal_title'] ) );
    -		$form['cal_moderate']        = $this->ipsclass->adskin->form_yes_no(       'cal_moderate'        , ( isset($_POST['cal_moderate']) 			AND $_POST['cal_moderate'] )         ? $_POST['cal_moderate']         : $calendar['cal_moderate'] );
    -		$form['cal_event_limit']     = $this->ipsclass->adskin->form_simple_input( 'cal_event_limit'     , ( isset($_POST['cal_event_limit']) 		AND $_POST['cal_event_limit'] )      ? $_POST['cal_event_limit']      : $calendar['cal_event_limit'], 5 );
    -		$form['cal_bday_limit']      = $this->ipsclass->adskin->form_simple_input( 'cal_bday_limit'      , ( isset($_POST['cal_bday_limit']) 		AND $_POST['cal_bday_limit'] )       ? $_POST['cal_bday_limit']       : $calendar['cal_bday_limit'], 5 );
    -		$form['cal_rss_export']      = $this->ipsclass->adskin->form_yes_no(       'cal_rss_export'      , ( isset($_POST['cal_rss_export']) 		AND $_POST['cal_rss_export'] )       ? $_POST['cal_rss_export']       : $calendar['cal_rss_export'] );
    -		$form['cal_rss_update']      = $this->ipsclass->adskin->form_simple_input( 'cal_rss_update'      , ( isset($_POST['cal_rss_update']) 		AND $_POST['cal_rss_update'] )       ? $_POST['cal_rss_update']       : $calendar['cal_rss_update'], 5 );
    -		$form['cal_rss_export_days'] = $this->ipsclass->adskin->form_simple_input( 'cal_rss_export_days' , ( isset($_POST['cal_rss_export_days']) 	AND $_POST['cal_rss_export_days'] )  ? $_POST['cal_rss_export_days']  : $calendar['cal_rss_export_days'], 5 );
    -		$form['cal_rss_export_max']  = $this->ipsclass->adskin->form_simple_input( 'cal_rss_export_max'  , ( isset($_POST['cal_rss_export_max']) 	AND $_POST['cal_rss_export_max'] )   ? $_POST['cal_rss_export_max']   : $calendar['cal_rss_export_max'], 5 );
    -		
    -		$this->ipsclass->html .= $this->html->calendar_form( $form, $title, $formcode, $button, $calendar );
    -		
    -		$this->ipsclass->html_help_title = "Управление календарем";
    -		$this->ipsclass->html_help_msg   = "Эта секция позволит вам добавить или изменить календарь.";
    -		
    -		$this->ipsclass->admin->nav[]    = array( '', "Добавление/изменение календаря" );
    -		$this->ipsclass->admin->output();
    -	}
    -	
    -	/*-------------------------------------------------------------------------*/
    -	// List current calendars
    -	/*-------------------------------------------------------------------------*/
    -	
    -	function calendar_list()
    -	{
    -		//-------------------------------
    -		// INIT
    -		//-------------------------------
    -		
    -		$content     = "";
    -		$seen_count  = 0;
    -		$total_items = 0;
    -		$rows        = array();
    -		
    -		//-------------------------------
    -		// Get components
    -		//-------------------------------
    -		
    -		$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'cal_calendars', 'order' => 'cal_position ASC' ) );
    -		$this->ipsclass->DB->simple_exec();
    -		
    -		while( $r = $this->ipsclass->DB->fetch_row() )
    -		{
    -			$total_items++;
    -			$rows[] = $r;
    -		}
    -		
    -		foreach( $rows as $r )
    -		{
    -			//-------------------------------
    -			// Work out position images
    -			//-------------------------------
    -			
    -			$r['_pos_up']   = $this->html->calendar_position_blank($r['cal_id']);
    -			$r['_pos_down'] = $this->html->calendar_position_blank($r['cal_id']);
    -			
    -			//-------------------------------
    -			// Work out position images
    -			//-------------------------------
    -			
    -			if ( $total_items > 1 )
    -			{
    -				if ( ($seen_count + 1) == $total_items )
    -				{
    -					# Show up only
    -					$r['_pos_up']   = $this->html->calendar_position_up($r['cal_id']);
    -				}
    -				else if ( $seen_count > 0 AND $seen_count < $total_items )
    -				{
    -					# Show both...
    -					$r['_pos_up']   = $this->html->calendar_position_up($r['cal_id']);
    -					$r['_pos_down'] = $this->html->calendar_position_down($r['cal_id']);
    -				}
    -				else
    -				{
    -					# Show down only
    -					$r['_pos_down'] = $this->html->calendar_position_down($r['cal_id']);
    -				}
    -			}
    -			
    -			$seen_count++;
    -				
    -			$content .= $this->html->calendar_row($r);
    -		}
    -		
    -		$this->ipsclass->html .= $this->html->calendar_overview( $content );
    -		
    -		$this->ipsclass->admin->page_title  = "Управление календарями";
    -		$this->ipsclass->admin->page_detail = "Эта секция позволит вам управлять всеми созданными календарями.";
    -		$this->ipsclass->admin->output();
    -	}
    -	
    -	
    -	/*-------------------------------------------------------------------------*/
    -	// Builds a cache of the current calendars
    -	/*-------------------------------------------------------------------------*/
    -		
    -	function calendars_rebuildcache()
    -	{
    -		$this->ipsclass->cache['calendars'] = array();
    -		
    -		$this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'cal_calendars', 'order' => 'cal_position ASC' ) );
    -		
    -		$this->ipsclass->DB->exec_query();
    -		
    -		while( $r = $this->ipsclass->DB->fetch_row() )
    -		{
    -			$this->ipsclass->cache['calendars'][ $r['cal_id'] ] = $r;
    -		}
    -		
    -		$this->ipsclass->update_cache( array( 'name' => 'calendars', 'deletefirst' => 1, 'donow' => 1, 'array' => 1 ) );
    -		
    -		return TRUE;
    -	}
    -}
    -
    -
    + $Date: 2008-04-10 14:23:41 -0400 (Thu, 10 Apr 2008) $
    +|   > $Revision: 1235 $
    +|   > $Author: jason $
    ++---------------------------------------------------------------------------
    +|
    +|   > Components Functions
    +|   > Module written by Matt Mecham
    +|   > Date started: 12th April 2005 (13:09)
    ++--------------------------------------------------------------------------
    +*/
    +
    +# CALENDAR SORTING!
    +
    +if ( ! defined( 'IN_ACP' ) )
    +{
    +	print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class ad_calendars +{ + # Globals + var $ipsclass; + + var $perm_main = 'content'; + var $perm_child = 'calendars'; + + /*-------------------------------------------------------------------------*/ + // Main handler + /*-------------------------------------------------------------------------*/ + + function auto_run() + { + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Manage Calendars' ); + $this->html = $this->ipsclass->acp_load_template('cp_skin_management'); + + switch($this->ipsclass->input['code']) + { + case 'calendar_list': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->calendar_list(); + break; + + case 'calendar_delete': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); + $this->calendar_delete(); + break; + + case 'calendar_add': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); + $this->calendar_form('add'); + break; + case 'calendar_add_do': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); + $this->calendar_save('add'); + break; + + case 'calendar_edit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->calendar_form('edit'); + break; + case 'calendar_edit_do': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->calendar_save('edit'); + break; + + + case 'calendar_move': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->calendar_move(); + break; + case 'calendar_rebuildcache': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recache' ); + $this->calendar_rebuildcache( 1 ); + break; + case 'calendar_rss_cache': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recache' ); + $this->calendar_rss_cache( intval($this->ipsclass->input['cal_id']), 1 ); + break; + + default: + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->calendar_list(); + break; + } + } + + /*-------------------------------------------------------------------------*/ + // Components: Delete + /*-------------------------------------------------------------------------*/ + + function calendar_delete() + { + //-------------------------------------------- + // INIT + //-------------------------------------------- + + $cal_id = intval($this->ipsclass->input['cal_id']); + + //-------------------------------------------- + // Checks... + //-------------------------------------------- + + if ( ! $cal_id ) + { + $this->ipsclass->main_msg = "No ID was passed, please try again"; + $this->components_list(); + return; + } + + //-------------------------------------------- + // Delete calendar events + //-------------------------------------------- + + $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'cal_events', 'where' => 'event_calendar_id='.$cal_id ) ); + + //-------------------------------------------- + // Delete calendar + //-------------------------------------------- + + $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'cal_calendars', 'where' => 'cal_id='.$cal_id ) ); + + //-------------------------------------------- + // Recache and re-RSS + //-------------------------------------------- + + $this->calendars_rebuildcache(); + $this->calendar_rebuildcache(); + $this->calendar_rss_cache(); + + $this->ipsclass->main_msg = "Calendar Removed"; + $this->calendar_list(); + } + + /*-------------------------------------------------------------------------*/ + // Components: Position + /*-------------------------------------------------------------------------*/ + + function calendar_move() + { + //-------------------------------------------- + // INIT + //-------------------------------------------- + + $cal_id = intval($this->ipsclass->input['cal_id']); + $move = trim($this->ipsclass->input['move']); + + //-------------------------------------------- + // Checks... + //-------------------------------------------- + + if ( ! $cal_id OR ! $move ) + { + $this->ipsclass->main_msg = "No ID was passed, please try again"; + $this->calendar_list(); + return; + } + + //-------------------------------------------- + // Get from database + //-------------------------------------------- + + $calendar = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'cal_calendars', 'where' => 'cal_id='.$cal_id ) ); + + $new_position = ( $move == 'up' ) ? intval($calendar['cal_position']) - 1 : intval($calendar['cal_position']) + 1; + + $this->ipsclass->DB->do_update( 'cal_calendars', array( 'cal_position' => $new_position ), 'cal_id='.$cal_id ); + + $this->calendars_rebuildcache(); + + $this->ipsclass->main_msg = "Calendar repositioned"; + $this->calendar_list(); + } + + /*-------------------------------------------------------------------------*/ + // Components Rebuild Cache + /*-------------------------------------------------------------------------*/ + + function calendar_rss_cache( $calendar_id='all', $return=0 ) + { + //-------------------------------------------- + // INIT + //-------------------------------------------- + + $seenids = array(); + $calevents = ""; + + //-------------------------------------------- + // Get classes + //-------------------------------------------- + + require_once( ROOT_PATH . 'sources/action_public/calendar.php' ); + $calendar = new calendar(); + $calendar->ipsclass =& $this->ipsclass; + + //-------------------------------------------- + // Require classes + //-------------------------------------------- + + require_once( KERNEL_PATH . 'class_rss.php' ); + $class_rss = new class_rss(); + $class_rss->ipsclass =& $this->ipsclass; + $class_rss->use_sockets = $this->use_sockets; + $class_rss->doc_type = $this->ipsclass->vars['gb_char_set']; + + //----------------------------------------- + // Make sure we have the HTML component + //----------------------------------------- + + if ( ! is_object( $this->html ) ) + { + $this->html = $this->ipsclass->acp_load_template('cp_skin_management'); + } + + //-------------------------------------------- + // Reset rss_export cache + //-------------------------------------------- + + $this->ipsclass->cache['rss_calendar'] = array(); + + //-------------------------------------------- + // Get stuff + //-------------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'cal_calendars', 'where' => 'cal_rss_export_days > 0 AND cal_rss_export_max > 0 AND cal_rss_export=1' ) ); + $outer = $this->ipsclass->DB->exec_query(); + + while( $row = $this->ipsclass->DB->fetch_row( $outer ) ) + { + if ( $row['cal_rss_export'] ) + { + $this->ipsclass->cache['rss_calendar'][] = array( 'url' => $this->ipsclass->vars['board_url'].'/index.php?act=rssout&type=calendar&id='.$row['cal_id'], + 'title' => $row['cal_title'] ); + } + + if ( $calendar_id == $row['cal_id'] OR $calendar_id == 'all' ) + { + //-------------------------------------------- + // Create Channel + //-------------------------------------------- + + $channel_id = $class_rss->create_add_channel( array( 'title' => $row['cal_title'], + 'link' => $this->ipsclass->vars['board_url'].'/index.php?act=calendar&calendar_id='.$row['cal_id'], + 'pubDate' => $class_rss->rss_unix_to_rfc( time() ), + 'ttl' => $row['cal_rss_update'], + 'description' => $row['cal_title'] + ) ); + + //-------------------------------------------- + // Check permissions + //-------------------------------------------- + + $_perms = unserialize( $row['cal_permissions'] ); + $pass = 0; + + if ( $_perms['perm_read'] == '*' OR preg_match( "/(^|,)".$this->ipsclass->vars['guest_group']."(,|$)/", $_perms['perm_read'] ) ) + { + $pass = 1; + } + + if ( ! $pass ) + { + continue; + } + + //-------------------------------------------- + // Sort out dates + //-------------------------------------------- + + list( $month, $day, $year ) = explode( ',', gmdate('n,j,Y', time()) ); + + $timenow = gmmktime( 0,0,0, $month, 1, $year ); + $timethen = time() + ($row['cal_rss_export_days'] * 86400) + 86400; + $nowtime = time() - 86400; + $items = 0; + + //-------------------------------------------- + // Get events + //-------------------------------------------- + + $calendar->get_events_sql( 0, 0, array('timenow' => $timenow, 'timethen' => $timethen, 'cal_id' => $row['cal_id'] ), 0 ); + + //-------------------------------------------- + // OK.. Go through days and check events + //-------------------------------------------- + + for( $i = 1 ; $i <= $row['cal_rss_export_days'] ; $i++ ) + { + //-------------------------------------------- + // Get more then! + //-------------------------------------------- + + list( $month, $day, $year ) = explode( ',', gmdate('n,j,Y', $nowtime) ); + + $eventcache = $calendar->get_day_events( $month, $day, $year ); + + foreach( $eventcache as $event ) + { + if ( ! in_array( $event['event_id'], $seenids ) ) + { + //-------------------------------------------- + // Got enough? + //-------------------------------------------- + + if ( $row['cal_rss_export_max'] <= $items ) + { + break; + } + + if ( $calendar->get_info_events( $event, $month, $day, $year, 0 ) ) + { + if ( ! $event['event_approved'] ) + { + continue; + } + + if ( $event['event_private'] ) + { + continue; + } + + if ( $event['event_perms'] != '*' AND ! preg_match( "/(^|,)".$this->ipsclass->vars['guest_group']."(,|$)/", $event['event_perms'] ) ) + { + continue; + } + + //-------------------------------------------- + // Get dates + //-------------------------------------------- + + list( $m , $d , $y ) = explode( ",", gmdate('n,j,Y', $event['event_unix_from'] ) ); + list( $m1, $d1, $y1 ) = explode( ",", gmdate('n,j,Y', $event['event_unix_to'] ) ); + + $event['_from_month'] = $m; + $event['_from_day'] = $d; + $event['_from_year'] = $y; + $event['_to_month'] = $m1; + $event['_to_day'] = $d1; + $event['_to_year'] = $y1; + + if ( $event['recurring'] ) + { + $event['event_content'] = $this->html->calendar_rss_recurring( $event ); + } + else if ( $event['single'] ) + { + $event['event_content'] = $this->html->calendar_rss_single( $event ); + } + else + { + $event['event_content'] = $this->html->calendar_rss_range( $event ); + } + + $event['event_unix_from'] = $this->ipsclass->vars['time_offset'] > 0 ? $event['event_unix_from'] + ( $this->ipsclass->vars['time_offset'] * 3600 ) : $event['event_unix_from']; + + $class_rss->create_add_item( $channel_id, array( 'title' => $event['event_title'], + 'link' => $this->ipsclass->vars['board_url'].'/index.php?act=calendar&code=showevent&calendar_id='.$row['cal_id'].'&event_id='.$event['event_id'], + 'description' => $event['event_content'], + 'pubDate' => $class_rss->rss_unix_to_rfc( $event['event_unix_from'] ), + 'guid' => $event['event_id'] + ) ); + + } + + //-------------------------------------------- + // Increment + //-------------------------------------------- + + $seenids[ $event['event_id'] ] = $event['event_id']; + $items++; + } + } + + $nowtime += 86400; + } + + //-------------------------------------------- + // Compile and save RSS document + //-------------------------------------------- + + $class_rss->rss_create_document(); + + //-------------------------------------------- + // Update the cache + //-------------------------------------------- + + $this->ipsclass->DB->do_update( 'cal_calendars', array( 'cal_rss_update_last' => time(), + 'cal_rss_cache' => $class_rss->rss_document ), 'cal_id='.$row['cal_id'] ); + } + } + + //-------------------------------------------- + // Update cache + //-------------------------------------------- + + $this->ipsclass->update_cache( array( 'name' => 'rss_calendar', 'deletefirst' => 1, 'donow' => 1, 'array' => 1 ) ); + + if ( $return ) + { + $this->ipsclass->main_msg = "Calendar Events RSS Recached"; + $this->calendar_list(); + } + else + { + return $class_rss->rss_document; + } + } + + /*-------------------------------------------------------------------------*/ + // Components Rebuild Cache + /*-------------------------------------------------------------------------*/ + + function calendar_rebuildcache( $return=0 ) + { + //-------------------------------------------- + // INIT + //-------------------------------------------- + + $this->ipsclass->vars['calendar_limit'] = intval($this->ipsclass->vars['calendar_limit']) < 2 ? 1 : intval($this->ipsclass->vars['calendar_limit']); + + //-------------------------------------------- + // Grab an extra day for the TZ diff + //-------------------------------------------- + + $this->ipsclass->vars['calendar_limit']++; + + list( $month, $day, $year ) = explode( ',', gmdate('n,j,Y', time() ) ); + + $timenow = gmmktime( 0,0,0, $month, 1, $year ); + $timethen = time() + (intval($this->ipsclass->vars['calendar_limit']) * 86400); + $seenids = array(); + $nowtime = time() - 86400; + $birthdays = ""; + $calevents = ""; + $calendars = array(); + + $a = explode( ',', gmdate( 'Y,n,j,G,i,s', time() ) ); + $day = $a[2]; + $month = $a[1]; + $year = $a[0]; + $daysinmonth = date( 't', time() ); + + //----------------------------------------- + // Get 24hr before and 24hr after to make + // sure we don't break any timezones + //----------------------------------------- + + $last_day = $day - 1; + $last_month = $month; + $last_year = $year; + $next_day = $day + 1; + $next_month = $month; + $next_year = $year; + + //----------------------------------------- + // Calculate dates.. + //----------------------------------------- + + if ( $last_day == 0 ) + { + $last_month -= 1; + $last_day = gmdate( 't', time() ); + } + + if ( $last_month == 0 ) + { + $last_month = 12; + $last_year -= 1; + } + + if ( $next_day > gmdate( 't', time() ) ) + { + $next_month += 1; + $next_day = 1; + } + + if ( $next_month == 13 ) + { + $next_month = 1; + $next_year += 1; + } + + //-------------------------------------------- + // Get classes + //-------------------------------------------- + + require_once( ROOT_PATH . 'sources/action_public/calendar.php' ); + $calendar = new calendar(); + $calendar->ipsclass =& $this->ipsclass; + + //-------------------------------------------- + // Get stuff + //-------------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'cal_calendars' ) ); + $this->ipsclass->DB->exec_query(); + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + $perms = unserialize( $row['cal_permissions'] ); + $row['_perm_read'] = $perms['perm_read']; + + $calendars[ $row['cal_id'] ] = $row; + } + + $calendar->get_events_sql( 0, 0, array('timenow' => $timenow, 'timethen' => $timethen ) ); + + //echo "
    ";print_r($calendar->event_cache);exit;
    +		//--------------------------------------------
    +		// OK.. Go through days and check events
    +		//--------------------------------------------
    +		
    +		for( $i = 0 ; $i <= $this->ipsclass->vars['calendar_limit'] ; $i++ )
    +		{
    +			list( $_month, $tday, $year ) = explode( ',', gmdate('n,j,Y', $nowtime) );
    +			
    +			$eventcache = $calendar->get_day_events( $_month, $tday, $year );
    +			
    +			foreach( $eventcache as $event )
    +			{
    +				if ( ! in_array( $event['event_id'], $seenids ) )
    +				{ 
    +					if ( $calendar->get_info_events( $event, $_month, $tday, $year, 0 ) )
    +					{
    +						if ( ! $event['event_approved'] )
    +						{
    +							continue;
    +						}
    +						
    +						unset( $event['event_content'], $event['event_smilies'] );
    +						
    +						$event['_perm_read']             = $calendars[ $event['event_calendar_id'] ]['_perm_read'];
    +						$calevents[ $event['event_id'] ] = $event;
    +					}
    +					
    +					$seenids[ $event['event_id'] ] = $event['event_id'];
    +				}
    +			}
    +			
    +			$nowtime += 86400;
    +		}
    +
    +		//-----------------------------------------
    +		// Grab birthdays
    +		//-----------------------------------------
    +		
    +		$append_string = "";
    +		
    +        if( !date("L") )
    +        {
    +	        if( $month == "2" AND ( $day == "28" OR $day == "27" ) )
    +	        {
    +		        $append_string = " or( bday_month=2 AND bday_day=29 )";
    +	        }
    +		}
    +        
    +		$this->ipsclass->DB->simple_construct( array( 'select' => 'id, members_display_name, mgroup, bday_day, bday_month, bday_year',
    +													  'from'   => 'members',
    +													  'where'  => "( bday_day=$last_day AND bday_month=$last_month )
    +																   or ( bday_day=$day AND bday_month=$month )
    +																   or ( bday_day=$next_day AND bday_month=$next_month ) {$append_string}"
    +											 )      );
    +							 
    +		$this->ipsclass->DB->simple_exec();
    +		
    +		while ( $r = $this->ipsclass->DB->fetch_row() )
    +		{
    +			$birthdays[ $r['id'] ] = $r;
    +		}
    +		
    +		//--------------------------------------------
    +		// Update calendar array
    +		//--------------------------------------------
    +		
    +		$this->ipsclass->cache['birthdays'] =& $birthdays;
    +		$this->ipsclass->cache['calendar'] =& $calevents;
    +		
    +		$this->ipsclass->update_cache( array( 'name' => 'calendar', 'array' => 1, 'deletefirst' => 1 ) );
    +		$this->ipsclass->update_cache( array( 'name' => 'birthdays', 'array' => 1, 'deletefirst' => 1 ) );
    +
    +		if ( $return )
    +		{
    +			$this->ipsclass->main_msg = "Calendar Events Recached";
    +			$this->calendar_list();
    +		}
    +	}
    +	
    +	
    +	/*-------------------------------------------------------------------------*/
    +	// Components Save
    +	/*-------------------------------------------------------------------------*/
    +	
    +	function calendar_save($type='add')
    +	{
    +		//--------------------------------------------
    +		// INIT
    +		//--------------------------------------------
    +		
    +		$cal_id              = intval($this->ipsclass->input['cal_id']);
    +		$cal_title           = trim( $this->ipsclass->txt_stripslashes( $this->ipsclass->txt_htmlspecialchars($_POST['cal_title'])) );
    +		$cal_moderate        = intval($this->ipsclass->input['cal_moderate']);
    +		$cal_event_limit     = intval($this->ipsclass->input['cal_event_limit']);
    +		$cal_bday_limit      = intval($this->ipsclass->input['cal_bday_limit']);
    +		$cal_rss_export      = intval($this->ipsclass->input['cal_rss_export']);
    +		$cal_rss_export_days = intval($this->ipsclass->input['cal_rss_export_days']);
    +		$cal_rss_export_max  = intval($this->ipsclass->input['cal_rss_export_max']);
    +		$cal_rss_update      = intval($this->ipsclass->input['cal_rss_update']);
    +		$cal_perms			 = array( 'perm_read' => '', 'perm_post' => '', 'perm_nomod' => '' );
    +		
    +		//--------------------------------------------
    +		// Checks...
    +		//--------------------------------------------
    +		
    +		if ( $type == 'edit' )
    +		{
    +			if ( ! $cal_id OR ! $cal_title )
    +			{
    +				$this->ipsclass->main_msg = "No ID was passed, please try again";
    +				$this->calendar_list();
    +				return;
    +			}
    +		}
    +		else
    +		{
    +			if ( ! $cal_title )
    +			{
    +				$this->ipsclass->main_msg = "You must complete the entire form.";
    +				$this->calendar_form( $type );
    +				return;
    +			}
    +		}
    +		
    +		//--------------------------------------------
    +		// Permission: Read
    +		//--------------------------------------------
    +		
    +		if ( $this->ipsclass->input['perm_read_all'] )
    +		{
    +			$cal_perms['perm_read'] = '*';
    +		}
    +		else if ( is_array( $_POST['perm_read'] ) )
    +		{
    +			$cal_perms['perm_read'] = implode( ',', $_POST['perm_read'] );
    +		}
    +		
    +		//--------------------------------------------
    +		// Permission: Start
    +		//--------------------------------------------
    +		
    +		if ( $this->ipsclass->input['perm_post_all'] )
    +		{
    +			$cal_perms['perm_post'] = '*';
    +		}
    +		else if ( is_array( $_POST['perm_post'] ) )
    +		{
    +			$cal_perms['perm_post'] = implode( ',', $_POST['perm_post'] );
    +		}
    +		
    +		//--------------------------------------------
    +		// Permission: No mod
    +		//--------------------------------------------
    +		
    +		if ( $this->ipsclass->input['perm_nomod_all'] )
    +		{
    +			$cal_perms['perm_nomod'] = '*';
    +		}
    +		else if ( is_array( $_POST['perm_nomod'] ) )
    +		{
    +			$cal_perms['perm_nomod'] = implode( ',', $_POST['perm_nomod'] );
    +		}
    +		
    +		//--------------------------------------------
    +		// Save...
    +		//--------------------------------------------
    +		
    +		$array = array( 'cal_title'           => $cal_title,
    +						'cal_moderate'        => $cal_moderate,
    +						'cal_event_limit'     => $cal_event_limit,
    +						'cal_bday_limit'      => $cal_bday_limit,
    +						'cal_rss_export'      => $cal_rss_export,
    +						'cal_rss_export_days' => $cal_rss_export_days,
    +						'cal_rss_export_max'  => $cal_rss_export_max,
    +						'cal_rss_update'      => $cal_rss_update,
    +						'cal_permissions'     => serialize($cal_perms),
    +					 );
    +					 
    +		if ( $type == 'add' )
    +		{
    +			$this->ipsclass->DB->do_insert( 'cal_calendars', $array );
    +			$cal_id = $this->ipsclass->DB->get_insert_id();
    +			
    +			$this->ipsclass->main_msg = 'New Calendar Added';
    +		}
    +		else
    +		{
    +			
    +			$this->ipsclass->DB->do_update( 'cal_calendars', $array, 'cal_id='.$cal_id );
    +			$this->ipsclass->main_msg = 'Calendar Edited';
    +		}
    +		
    +		$this->calendars_rebuildcache();
    +		$this->calendar_rebuildcache( $cal_id, 0 );
    +		$this->calendar_rss_cache( $cal_id, 0 );
    +		$this->calendar_list();
    +	}
    +	
    +	/*-------------------------------------------------------------------------*/
    +	// Components: Form
    +	/*-------------------------------------------------------------------------*/
    +	
    +	function calendar_form( $type='add' )
    +	{
    +		//-----------------------------------------
    +		// Init Vars
    +		//-----------------------------------------
    +		
    +		$cal_id             	= isset($this->ipsclass->input['cal_id']) ? intval($this->ipsclass->input['cal_id']) : 0;
    +		$form               	= array();
    +		$form['perm_read']  	= "";
    +		$form['perm_post']  	= "";
    +		$form['perm_nomod'] 	= "";
    +		$form['perm_read_all'] 	= "";
    +		$form['perm_post_all']	= "";
    +		$form['perm_nomod_all']	= "";
    +		
    +		//-----------------------------------------
    +		// Check (please?)
    +		//-----------------------------------------
    +		
    +		if ( $type == 'add' )
    +		{
    +			$formcode = 'calendar_add_do';
    +			$title    = "Add New Calendar";
    +			$button   = "Add New Calendar";
    +			
    +			$calendar = array( 'perm_read'			=> '',
    +								'perm_post'			=> '',
    +								'perm_nomod'		=> '',
    +								'cal_title'			=> '',
    +								'cal_moderate'		=> '',
    +								'cal_event_limit'	=> '',
    +								'cal_bday_limit'	=> '',
    +								'cal_rss_export'	=> '',
    +								'cal_rss_update'	=> '',
    +								'cal_rss_export_days' => '',
    +								'cal_rss_export_max' => '',
    +								'cal_id'			=> 0 );
    +		}
    +		else
    +		{
    +			$calendar = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'cal_calendars', 'where' => 'cal_id='.$cal_id ) );
    +			$calendar = array_merge( $calendar, unserialize( $calendar['cal_permissions'] ) );
    +			
    +			if ( ! $calendar['cal_id'] )
    +			{
    +				$this->ipsclass->main_msg = "No ID was passed, please try again.";
    +				$this->components_list();
    +				return;
    +			}
    +			
    +			$formcode = 'calendar_edit_do';
    +			$title    = "Edit Calendar ".$calendar['cal_title'];
    +			$button   = "Save Changes";
    +		}
    +		
    +		//-----------------------------------------
    +		// Build Groups
    +		//-----------------------------------------
    +		
    +		$perm_read_array  = ( isset($_POST['perm_read'])  AND is_array( $_POST['perm_read'] ) )  ? $_POST['perm_read']  : explode( ',', $calendar['perm_read']  );
    +		$perm_post_array  = ( isset($_POST['perm_post'])  AND is_array( $_POST['perm_post'] ) )  ? $_POST['perm_post']  : explode( ',', $calendar['perm_post']  );
    +		$perm_nomod_array = ( isset($_POST['perm_nomod']) AND is_array( $_POST['perm_nomod'] ) ) ? $_POST['perm_nomod'] : explode( ',', $calendar['perm_nomod'] );
    +		$perm_read_all    = FALSE;
    +		$perm_post_all    = FALSE;
    +		$perm_nomod_all   = FALSE;
    +		
    +		if ( in_array( '*', $perm_read_array ) OR ( isset($_POST['perm_read_all']) AND $_POST['perm_read_all'] ) )
    +		{
    +			$perm_read_all         = TRUE;
    +			$form['perm_read_all'] = ' checked="checked"';
    +		}
    +		
    +		if ( in_array( '*', $perm_post_array ) OR ( isset($_POST['perm_post_all']) AND $_POST['perm_post_all'] ) )
    +		{
    +			$perm_post_all         = TRUE;
    +			$form['perm_post_all'] = ' checked="checked"';
    +		}
    +		
    +		if ( in_array( '*', $perm_nomod_array ) OR ( isset($_POST['perm_nomod_all']) AND $_POST['perm_nomod_all'] ) )
    +		{
    +			$perm_nomod_all         = TRUE;
    +			$form['perm_nomod_all'] = ' checked="checked"';
    +		}
    +		
    +		//-----------------------------------------
    +		// Perms masks section
    +		//-----------------------------------------
    +		
    +		$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms' ) );
    +		$this->ipsclass->DB->simple_exec();
    +		
    +		while ( $data = $this->ipsclass->DB->fetch_row() )
    +		{
    +			//-----------------------------------------
    +			// READ
    +			//-----------------------------------------
    +			
    +			if ( is_array($perm_read_array) AND in_array( $data['perm_id'], $perm_read_array ) OR $perm_read_all == TRUE )
    +			{
    +				$form['perm_read'] .= "";
    +			}
    +			else
    +			{
    +				$form['perm_read'] .= "";
    +			}
    +			
    +			//-----------------------------------------
    +			// POST
    +			//-----------------------------------------
    +			
    +			if ( is_array($perm_post_array) AND in_array( $data['perm_id'], $perm_post_array ) OR $perm_post_all == TRUE )
    +			{
    +				$form['perm_post'] .= "";
    +			}
    +			else
    +			{
    +				$form['perm_post'] .= "";
    +			}
    +			
    +			//-----------------------------------------
    +			// NO MOD
    +			//-----------------------------------------
    +			
    +			if ( is_array($perm_nomod_array) AND in_array( $data['perm_id'], $perm_nomod_array ) OR $perm_nomod_all == TRUE )
    +			{
    +				$form['perm_nomod'] .= "";
    +			}
    +			else
    +			{
    +				$form['perm_nomod'] .= "";
    +			}
    +		}
    +		
    +		//-----------------------------------------
    +		// Form elements
    +		//-----------------------------------------
    +		
    +		$form['cal_title']           = $this->ipsclass->adskin->form_input(        'cal_title'           , $this->ipsclass->txt_htmlspecialchars( ( isset($_POST['cal_title']) AND $_POST['cal_title'] ) ? $_POST['cal_title'] : $calendar['cal_title'] ) );
    +		$form['cal_moderate']        = $this->ipsclass->adskin->form_yes_no(       'cal_moderate'        , ( isset($_POST['cal_moderate']) 			AND $_POST['cal_moderate'] )         ? $_POST['cal_moderate']         : $calendar['cal_moderate'] );
    +		$form['cal_event_limit']     = $this->ipsclass->adskin->form_simple_input( 'cal_event_limit'     , ( isset($_POST['cal_event_limit']) 		AND $_POST['cal_event_limit'] )      ? $_POST['cal_event_limit']      : $calendar['cal_event_limit'], 5 );
    +		$form['cal_bday_limit']      = $this->ipsclass->adskin->form_simple_input( 'cal_bday_limit'      , ( isset($_POST['cal_bday_limit']) 		AND $_POST['cal_bday_limit'] )       ? $_POST['cal_bday_limit']       : $calendar['cal_bday_limit'], 5 );
    +		$form['cal_rss_export']      = $this->ipsclass->adskin->form_yes_no(       'cal_rss_export'      , ( isset($_POST['cal_rss_export']) 		AND $_POST['cal_rss_export'] )       ? $_POST['cal_rss_export']       : $calendar['cal_rss_export'] );
    +		$form['cal_rss_update']      = $this->ipsclass->adskin->form_simple_input( 'cal_rss_update'      , ( isset($_POST['cal_rss_update']) 		AND $_POST['cal_rss_update'] )       ? $_POST['cal_rss_update']       : $calendar['cal_rss_update'], 5 );
    +		$form['cal_rss_export_days'] = $this->ipsclass->adskin->form_simple_input( 'cal_rss_export_days' , ( isset($_POST['cal_rss_export_days']) 	AND $_POST['cal_rss_export_days'] )  ? $_POST['cal_rss_export_days']  : $calendar['cal_rss_export_days'], 5 );
    +		$form['cal_rss_export_max']  = $this->ipsclass->adskin->form_simple_input( 'cal_rss_export_max'  , ( isset($_POST['cal_rss_export_max']) 	AND $_POST['cal_rss_export_max'] )   ? $_POST['cal_rss_export_max']   : $calendar['cal_rss_export_max'], 5 );
    +		
    +		$this->ipsclass->html .= $this->html->calendar_form( $form, $title, $formcode, $button, $calendar );
    +		
    +		$this->ipsclass->html_help_title = "Calendar Manager";
    +		$this->ipsclass->html_help_msg   = "This section will allow you to manage your calendars.";
    +		
    +		$this->ipsclass->admin->nav[]    = array( '', "Add/Edit Calendar" );
    +		$this->ipsclass->admin->output();
    +	}
    +	
    +	/*-------------------------------------------------------------------------*/
    +	// List current calendars
    +	/*-------------------------------------------------------------------------*/
    +	
    +	function calendar_list()
    +	{
    +		//-------------------------------
    +		// INIT
    +		//-------------------------------
    +		
    +		$content     = "";
    +		$seen_count  = 0;
    +		$total_items = 0;
    +		$rows        = array();
    +		
    +		//-------------------------------
    +		// Get components
    +		//-------------------------------
    +		
    +		$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'cal_calendars', 'order' => 'cal_position ASC' ) );
    +		$this->ipsclass->DB->simple_exec();
    +		
    +		while( $r = $this->ipsclass->DB->fetch_row() )
    +		{
    +			$total_items++;
    +			$rows[] = $r;
    +		}
    +		
    +		foreach( $rows as $r )
    +		{
    +			//-------------------------------
    +			// Work out position images
    +			//-------------------------------
    +			
    +			$r['_pos_up']   = $this->html->calendar_position_blank($r['cal_id']);
    +			$r['_pos_down'] = $this->html->calendar_position_blank($r['cal_id']);
    +			
    +			//-------------------------------
    +			// Work out position images
    +			//-------------------------------
    +			
    +			if ( $total_items > 1 )
    +			{
    +				if ( ($seen_count + 1) == $total_items )
    +				{
    +					# Show up only
    +					$r['_pos_up']   = $this->html->calendar_position_up($r['cal_id']);
    +				}
    +				else if ( $seen_count > 0 AND $seen_count < $total_items )
    +				{
    +					# Show both...
    +					$r['_pos_up']   = $this->html->calendar_position_up($r['cal_id']);
    +					$r['_pos_down'] = $this->html->calendar_position_down($r['cal_id']);
    +				}
    +				else
    +				{
    +					# Show down only
    +					$r['_pos_down'] = $this->html->calendar_position_down($r['cal_id']);
    +				}
    +			}
    +			
    +			$seen_count++;
    +				
    +			$content .= $this->html->calendar_row($r);
    +		}
    +		
    +		$this->ipsclass->html .= $this->html->calendar_overview( $content );
    +		
    +		$this->ipsclass->admin->page_title  = "Calendar Manager";
    +		$this->ipsclass->admin->page_detail = "This section will allow you to manage your calendars.";
    +		$this->ipsclass->admin->output();
    +	}
    +	
    +	
    +	/*-------------------------------------------------------------------------*/
    +	// Builds a cache of the current calendars
    +	/*-------------------------------------------------------------------------*/
    +		
    +	function calendars_rebuildcache()
    +	{
    +		$this->ipsclass->cache['calendars'] = array();
    +		
    +		$this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'cal_calendars', 'order' => 'cal_position ASC' ) );
    +		
    +		$this->ipsclass->DB->exec_query();
    +		
    +		while( $r = $this->ipsclass->DB->fetch_row() )
    +		{
    +			$this->ipsclass->cache['calendars'][ $r['cal_id'] ] = $r;
    +		}
    +		
    +		$this->ipsclass->update_cache( array( 'name' => 'calendars', 'deletefirst' => 1, 'donow' => 1, 'array' => 1 ) );
    +		
    +		return TRUE;
    +	}
    +}
    +
    +
     ?>
    \ No newline at end of file
    diff --git a/upload/sources/action_admin/components.php b/upload/sources/action_admin/components.php
    index 79cfe500..19e96ff2 100644
    --- a/upload/sources/action_admin/components.php
    +++ b/upload/sources/action_admin/components.php
    @@ -1,1028 +1,1457 @@
    - $Date: 2006-10-06 04:09:22 -0500 (Fri, 06 Oct 2006) $
    -|   > $Revision: 611 $
    -|   > $Author: matt $
    -+---------------------------------------------------------------------------
    -|
    -|   > Components Functions
    -|   > Module written by Matt Mecham
    -|   > Date started: 12th April 2005 (13:09)
    -+--------------------------------------------------------------------------
    -*/
    -
    -if ( ! defined( 'IN_ACP' ) )
    -{
    -	print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - -class ad_components -{ - # Globals - var $ipsclass; - var $html; - - var $perm_main = 'admin'; - var $perm_child = 'components'; - - /*-------------------------------------------------------------------------*/ - // Main handler - /*-------------------------------------------------------------------------*/ - - function auto_run() - { - $this->html = $this->ipsclass->acp_load_template('cp_skin_tools'); - - switch($this->ipsclass->input['code']) - { - case 'master_xml_export': - $this->master_xml_export(); - break; - - case 'manage': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->components_list(); - break; - - case 'component_add': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); - $this->components_form('add'); - break; - case 'component_add_do': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); - $this->components_save('add'); - break; - - case 'component_edit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->components_form('edit'); - break; - case 'component_edit_do': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->components_save('edit'); - break; - - case 'component_delete': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->components_delete(); - break; - - case 'component_export': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':export' ); - $this->components_export('single'); - break; - case 'component_import': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':import' ); - $this->components_import(); - break; - - case 'component_move': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->components_move(); - break; - case 'component_toggle_enabled': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->components_toggle_enabled(); - break; - default: - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->components_list(); - break; - } - } - - /*-------------------------------------------------------------------------*/ - // Export Master XML - /*-------------------------------------------------------------------------*/ - - function master_xml_export() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $entry = array(); - - //----------------------------------------- - // Get XML class - //----------------------------------------- - - require_once( KERNEL_PATH.'class_xml.php' ); - - $xml = new class_xml(); - - $xml->doc_type = $this->ipsclass->vars['gb_char_set']; - - $xml->xml_set_root( 'export', array( 'exported' => time() ) ); - - //----------------------------------------- - // Set group - //----------------------------------------- - - $xml->xml_add_group( 'group' ); - - //----------------------------------------- - // Get templates... - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'components', - 'where' => "com_section != 'bugtracker'" ) ); - - $this->ipsclass->DB->simple_exec(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $content = array(); - - //----------------------------------------- - // Sort the fields... - //----------------------------------------- - - foreach( $r as $k => $v ) - { - $content[] = $xml->xml_build_simple_tag( $k, $v ); - } - - $entry[] = $xml->xml_build_entry( 'row', $content ); - } - - $xml->xml_add_entry_to_group( 'group', $entry ); - - $xml->xml_format_document(); - - $doc = $xml->xml_document; - - //----------------------------------------- - // Print to browser - //----------------------------------------- - - $this->ipsclass->admin->show_download( $doc, 'components.xml', '', 0 ); - } - - /*-------------------------------------------------------------------------*/ - // Components: Toggle enabled - /*-------------------------------------------------------------------------*/ - - function components_toggle_enabled() - { - //-------------------------------------------- - // INIT - //-------------------------------------------- - - $com_id = intval($this->ipsclass->input['com_id']); - - //-------------------------------------------- - // Checks... - //-------------------------------------------- - - if ( ! $com_id ) - { - $this->ipsclass->main_msg = "Вы не указали ID компонента."; - $this->components_list(); - return; - } - - //-------------------------------------------- - // Get from database - //-------------------------------------------- - - $component = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'components', 'where' => 'com_id='.$com_id ) ); - - $com_enabled = $component['com_enabled'] ? 0 : 1; - - $this->ipsclass->DB->do_update( 'components', array( 'com_enabled' => $com_enabled ), 'com_id='.$com_id ); - - $this->components_rebuildcache(); - - $this->ipsclass->main_msg = "Переключатель компонентов"; - $this->components_list(); - } - - /*-------------------------------------------------------------------------*/ - // Components: Position - /*-------------------------------------------------------------------------*/ - - function components_move() - { - //-------------------------------------------- - // INIT - //-------------------------------------------- - - $com_id = intval($this->ipsclass->input['com_id']); - $move = trim($this->ipsclass->input['move']); - $components = array(); - $final_coms = array(); - $used_pos = array(); - $max_pos = 0; - - //-------------------------------------------- - // Checks... - //-------------------------------------------- - - if ( ! $com_id OR ! $move ) - { - $this->ipsclass->main_msg = "Вы не указали ID..."; - $this->components_list(); - return; - } - - //-------------------------------------------- - // Get components from database - //-------------------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => '*', - 'from' => 'components', - 'order' => 'com_position ASC' ) ); - $this->ipsclass->DB->exec_query(); - - while( $c = $this->ipsclass->DB->fetch_row() ) - { - $max_pos += 1; - - if ( in_array( $c['com_position'], $used_pos ) ) - { - - $c['com_position'] = $max_pos; - } - else - { - $used_pos[] = $c['com_position']; - } - - $components[ $c['com_id'] ] = $c['com_position']; - } - - asort($components); - - $i = 0; - $did_move = 0; - - foreach( $components as $k => $v ) - { - $i++; - - if( $k == $com_id ) - { - if( $move == 'up' ) - { - // Move up (lower #) - $last = array_pop( $final_coms ); - $final_coms[ $k ] = $i - 1; - - foreach( $components as $k2 => $v2 ) - { - if ( $v2 == $last ) - { - $final_coms[ $k2 ] = $i; - break; - } - } - } - else - { - // Move down (higher #) - - $final_coms[ $k ] = $i + 1; - $did_move = 1; - } - } - else - { - if ( $did_move == 1 ) - { - $final_coms[ $k ] = $i - 1; - $did_move = 0; - } - else - { - $final_coms[ $k ] = $i; - } - } - } - - /*echo "
    ";
    -		print_r($final_coms);
    -		exit;*/
    -		
    -		foreach( $final_coms as $k => $v )
    -		{
    -			$this->ipsclass->DB->do_update( 'components', array( 'com_position' => $v ), 'com_id='.$k );
    -		}
    -		
    -		$this->components_rebuildcache();
    -		
    -		$this->ipsclass->main_msg = "Формирование пунктов компонента";
    -		$this->components_list();
    -	}
    -	
    -	/*-------------------------------------------------------------------------*/
    -	// Components Rebuild Cache
    -	/*-------------------------------------------------------------------------*/
    -	
    -	function components_rebuildcache()
    -	{
    -		$this->ipsclass->cache['components'] = array();
    -			
    -		$this->ipsclass->DB->simple_construct( array( 'select' => 'com_id,com_enabled,com_section,com_filename,com_url_uri,com_url_title,com_position',
    -													  'from'   => 'components',
    -													  'where'  => 'com_enabled=1',
    -													  'order'  => 'com_position ASC' ) );
    -		$this->ipsclass->DB->simple_exec();
    -	
    -		while ( $r = $this->ipsclass->DB->fetch_row() )
    -		{
    -			$this->ipsclass->cache['components'][] = $r;
    -		}
    -		
    -		$this->ipsclass->update_cache( array( 'name' => 'components', 'array' => 1, 'deletefirst' => 1 ) );
    -	}
    -	
    -	/*-------------------------------------------------------------------------*/
    -	// Components Import
    -	/*-------------------------------------------------------------------------*/
    -	
    -	function components_import()
    -	{
    -		//-----------------------------------------
    -		// INIT
    -		//-----------------------------------------
    -		
    -		$updated        = 0;
    -		$inserted       = 0;
    -		$cur_components = array();
    -		
    -		if ( $_FILES['FILE_UPLOAD']['name'] == "" or ! $_FILES['FILE_UPLOAD']['name'] or ($_FILES['FILE_UPLOAD']['name'] == "none") )
    -		{
    -			//-----------------------------------------
    -			// check and load from server
    -			//-----------------------------------------
    -			
    -			if ( ! $this->ipsclass->input['file_location'] )
    -			{
    -				$this->ipsclass->main_msg = "Вы не указали файл для импортирования.";
    -				$this->components_list();
    -				return;
    -			}
    -			
    -			if ( ! file_exists( ROOT_PATH . $this->ipsclass->input['file_location'] ) )
    -			{
    -				$this->ipsclass->main_msg = "Невозможно открыть указанный файл: " . ROOT_PATH . $this->ipsclass->input['file_location'];
    -				$this->components_list();
    -				return;
    -			}
    -			
    -			if ( preg_match( "#\.gz$#", $this->ipsclass->input['file_location'] ) )
    -			{
    -				if ( $FH = @gzopen( ROOT_PATH.$this->ipsclass->input['file_location'], 'rb' ) )
    -				{
    -					while ( ! @gzeof( $FH ) )
    -					{
    -						$content .= @gzread( $FH, 1024 );
    -					}
    -					
    -					@gzclose( $FH );
    -				}
    -			}
    -			else
    -			{
    -				if ( $FH = @fopen( ROOT_PATH.$this->ipsclass->input['file_location'], 'rb' ) )
    -				{
    -					$content = @fread( $FH, filesize(ROOT_PATH.$this->ipsclass->input['lang_location']) );
    -					@fclose( $FH );
    -				}
    -			}
    -		}
    -		else
    -		{
    -			//-----------------------------------------
    -			// Get uploaded schtuff
    -			//-----------------------------------------
    -			
    -			$tmp_name = $_FILES['FILE_UPLOAD']['name'];
    -			$tmp_name = preg_replace( "#\.gz$#", "", $tmp_name );
    -			
    -			$content  = $this->ipsclass->admin->import_xml( $tmp_name );
    -			
    -			if ( ! $content )
    -			{
    -				$this->ipsclass->main_msg = "Невозможно прочитать загруженный файл.";
    -				$this->components_list();
    -				return;
    -			}			
    -		}
    -		
    -		//-----------------------------------------
    -		// Get current components.
    -		//-----------------------------------------
    -		
    -		$this->ipsclass->DB->simple_construct( array( 'select' => 'com_id, com_section',
    -													  'from'   => 'components',
    -													  'order'  => 'com_id' ) );
    -		
    -		$this->ipsclass->DB->simple_exec();
    -		
    -		while ( $r = $this->ipsclass->DB->fetch_row() )
    -		{
    -			$cur_components[ $r['com_section'] ] = $r['com_id'];
    -		}
    -		
    -		//-----------------------------------------
    -		// Get xml mah-do-dah
    -		//-----------------------------------------
    -		
    -		require_once( KERNEL_PATH.'class_xml.php' );
    -
    -		$xml = new class_xml();
    -		
    -		//-----------------------------------------
    -		// Unpack the datafile
    -		//-----------------------------------------
    -		
    -		$xml->xml_parse_document( $content );
    -		
    -		//-----------------------------------------
    -		// pArse
    -		//-----------------------------------------
    -		
    -		$fields = array( 'com_title'   , 'com_description', 'com_author' , 'com_url', 'com_version', 'com_menu_data',
    -						 'com_enabled' , 'com_safemode'   , 'com_section', 'com_filename', 'com_url_title', 'com_url_uri' );
    -		
    -		if ( ! is_array( $xml->xml_array['componentexport']['componentgroup']['component'][0]  ) )
    -		{
    -			//-----------------------------------------
    -			// Ensure [0] is populated
    -			//-----------------------------------------
    -			
    -			$tmp = $xml->xml_array['componentexport']['componentgroup']['component'];
    -			
    -			unset($xml->xml_array['componentexport']['componentgroup']['component']);
    -			
    -			$xml->xml_array['componentexport']['componentgroup']['component'][0] = $tmp;
    -		}
    -		
    -		foreach( $xml->xml_array['componentexport']['componentgroup']['component'] as $entry )
    -		{
    -			$newrow = array();
    -				
    -			foreach( $fields as $f )
    -			{
    -				$newrow[$f] = $entry[ $f ]['VALUE'];
    -			}
    -			
    -			$this->ipsclass->DB->force_data_type = array( 'com_version' => 'string' );
    -			
    -			if ( $cur_components[ $entry['com_section']['VALUE'] ] )
    -			{
    -				//-----------------------------------------
    -				// Update
    -				//-----------------------------------------
    -				
    -				$this->ipsclass->DB->do_update( 'components', $newrow, 'com_id='.$cur_components[ $entry['com_section']['VALUE'] ] );
    -				$updated++;
    -			}
    -			else
    -			{
    -				//-----------------------------------------
    -				// INSERT
    -				//-----------------------------------------
    -				
    -				$newrow['com_date_added'] = time();
    -				
    -				$this->ipsclass->DB->do_insert( 'components', $newrow );
    -				$inserted++;
    -			}
    -		}
    -		
    -		//-----------------------------------------
    -		// Done...
    -		//-----------------------------------------
    -		
    -		$this->components_rebuildcache();
    -		
    -		$this->ipsclass->main_msg = "$updated компонентов обновлено, $inserted компонентов добавлено.";
    -		
    -		$this->components_list();
    -	}
    -	
    -	/*-------------------------------------------------------------------------*/
    -	// Components Export
    -	/*-------------------------------------------------------------------------*/
    -	
    -	function components_export($type='single')
    -	{
    -		//--------------------------------------------
    -		// INIT
    -		//--------------------------------------------
    -		
    -		$com_id = intval($this->ipsclass->input['com_id']);
    -		$rows   = array();
    -		
    -		//--------------------------------------------
    -		// Checks...
    -		//--------------------------------------------
    -		
    -		if ( $type == 'single' )
    -		{
    -			if ( ! $com_id )
    -			{
    -				$this->ipsclass->main_msg = "Вы не указали ID компонента.";
    -				$this->components_list();
    -				return;
    -			}
    -			
    -			//--------------------------------------------
    -			// Get DB row(s)
    -			//--------------------------------------------
    -			
    -			$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'components', 'where' => 'com_id='.$com_id ) );
    -			$this->ipsclass->DB->simple_exec();
    -			
    -			while ( $r = $this->ipsclass->DB->fetch_row() )
    -			{
    -				$rows[] = $r;
    -			}
    -		}
    -		else
    -		{
    -			//--------------------------------------------
    -			// Get DB row(s)
    -			//--------------------------------------------
    -			
    -			$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'components' ) );
    -			$this->ipsclass->DB->simple_exec();
    -			
    -			while ( $r = $this->ipsclass->DB->fetch_row() )
    -			{
    -				$rows[] = $r;
    -			}
    -		}
    -		
    -		//-------------------------------
    -		// Get XML class
    -		//-------------------------------
    -		
    -		require_once( KERNEL_PATH.'class_xml.php' );
    -		
    -		$xml = new class_xml();
    -		
    -		$xml->xml_set_root( 'componentexport', array( 'exported' => time() ) );
    -		
    -		//-------------------------------
    -		// Add component
    -		//-------------------------------
    -		
    -		$xml->xml_add_group( 'componentgroup' );
    -		
    -		$entry = array();
    -		
    -		foreach( $rows as $r )
    -		{
    -			$content = array();
    -			
    -			foreach( $r as $k => $v )
    -			{
    -				$content[] = $xml->xml_build_simple_tag( $k, $v );
    -			}
    -			
    -			$entry[] = $xml->xml_build_entry( 'component', $content );
    -		}
    -		
    -		$xml->xml_add_entry_to_group( 'componentgroup', $entry );
    -		
    -		$xml->xml_format_document();
    -		
    -		$doc = $xml->xml_document;
    -
    -		//-------------------------------
    -		// Print to browser
    -		//-------------------------------
    -		
    -		$this->ipsclass->admin->show_download( $doc, 'ipd_components.xml', '', 0 );
    -	}
    -	
    -	/*-------------------------------------------------------------------------*/
    -	// Components Save
    -	/*-------------------------------------------------------------------------*/
    -	
    -	function components_save($type='add')
    -	{
    -		//--------------------------------------------
    -		// INIT
    -		//--------------------------------------------
    -		
    -		$com_id          = intval($this->ipsclass->input['com_id']);
    -		$com_title       = trim( $this->ipsclass->txt_stripslashes($this->ipsclass->input['com_title']) );
    -		$com_version     = trim( $this->ipsclass->txt_stripslashes($this->ipsclass->input['com_version']) );
    -		$com_description = trim( $this->ipsclass->txt_stripslashes( $this->ipsclass->txt_htmlspecialchars($_POST['com_description'])) );
    -		$com_author      = trim( $this->ipsclass->txt_stripslashes($this->ipsclass->input['com_author']) );
    -		$com_url         = trim( $this->ipsclass->txt_stripslashes($this->ipsclass->input['com_url']) );
    -		//$com_menu_data   = trim( $this->ipsclass->txt_stripslashes( $this->ipsclass->txt_windowstounix($_POST['com_menu_data']) ) );
    -		$com_enabled     = intval($this->ipsclass->input['com_enabled']);
    -		$com_section     = trim( $this->ipsclass->txt_stripslashes($this->ipsclass->input['com_section']) );
    -		$com_filename    = trim( $this->ipsclass->txt_stripslashes($this->ipsclass->input['com_section']) );
    -		$com_safemode    = intval($this->ipsclass->input['com_safemode']);
    -		$com_url_title   = trim( $this->ipsclass->txt_stripslashes( $this->ipsclass->txt_windowstounix($_POST['com_url_title']) ) );
    -		$com_url_uri     = trim( $this->ipsclass->txt_stripslashes( $this->ipsclass->txt_windowstounix($_POST['com_url_uri']) ) );
    -		
    -		//--------------------------------------------
    -		// Checks...
    -		//--------------------------------------------
    -		
    -		if ( $type == 'edit' )
    -		{
    -			if ( ! $com_id )
    -			{
    -				$this->ipsclass->main_msg = "Вы не указали ID компонента.";
    -				$this->components_list();
    -				return;
    -			}
    -		}
    -		
    -		if ( ! $com_title OR ! $com_section OR ! $com_filename )
    -		{
    -			$this->ipsclass->main_msg = "Вы должны заполнить все поля.";
    -			$this->components_form( $type );
    -			return;
    -		}
    -		
    -		//--------------------------------------------
    -		// Build menu
    -		//--------------------------------------------
    -		
    -		$menu_data = array();
    -		
    -		if ( is_array( $_POST['menu_text'] ) and count( $_POST['menu_text'] ) )
    -		{
    -			foreach( $_POST['menu_text'] as $mainid => $text )
    -			{
    -				if ( ! $mainid OR ! $text OR ! $_POST['menu_url'][ $mainid ] )
    -				{
    -					continue;
    -				}
    -				
    -				$menu_data[ $mainid ]['menu_text']      = $this->ipsclass->parse_clean_value( $text );
    -				$menu_data[ $mainid ]['menu_url']       = $this->ipsclass->txt_stripslashes( $_POST['menu_url'][ $mainid ] );
    -				$menu_data[ $mainid ]['menu_redirect']  = intval( $_POST['menu_redirect'][ $mainid ] );
    -				$menu_data[ $mainid ]['menu_permbit']   = $this->ipsclass->txt_stripslashes( $_POST['menu_permbit'][ $mainid ] );
    -				$menu_data[ $mainid ]['menu_permlang']  = $this->ipsclass->parse_clean_value( $_POST['menu_permlang'][ $mainid ] );
    -			}
    -		}
    -	
    -		//--------------------------------------------
    -		// Save...
    -		//--------------------------------------------
    -		
    -		$this->ipsclass->DB->force_data_type = array( 'com_version' => 'string' );
    -		
    -		$array = array( 'com_title'       => $com_title,
    -						'com_author'      => $com_author,
    -						'com_version'     => $com_version,
    -						'com_url'         => $com_url,
    -						'com_menu_data'   => serialize( $menu_data ),
    -						'com_enabled'     => $com_enabled,
    -						'com_safemode'    => $com_safemode,
    -						'com_section'     => $com_section,
    -						'com_filename'    => $com_filename,
    -						'com_description' => $com_description,
    -						'com_url_uri'     => $com_url_uri,
    -						'com_url_title'   => $com_url_title,
    -					 );
    -					 
    -		if ( $type == 'add' )
    -		{
    -			//--------------------------------------------
    -			// Same filename or section?
    -			//--------------------------------------------
    -			
    -			$test = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'com_id', 'from' => 'components', 'where' => "com_section='{$com_section}' OR com_filename='{$com_filename}'" ) );
    -			
    -			if ( $test['com_id'] )
    -			{
    -				$this->ipsclass->main_msg = "Убедитесь в том, что в этом компоненте код и имя файла уникальны.";
    -				$this->components_form( $type );
    -				return;
    -			}
    -		
    -			$array['com_date_added'] = time();
    -			
    -			$this->ipsclass->DB->do_insert( 'components', $array );
    -			$this->ipsclass->main_msg = 'Новый компонент добавлен.';
    -		}
    -		else
    -		{
    -			
    -			$this->ipsclass->DB->do_update( 'components', $array, 'com_id='.$com_id );
    -			$this->ipsclass->main_msg = 'Компонент изменен.';
    -		}
    -		
    -		$this->components_rebuildcache();
    -		
    -		$this->components_list();
    -	}
    -	
    -	/*-------------------------------------------------------------------------*/
    -	// Components: Form
    -	/*-------------------------------------------------------------------------*/
    -	
    -	function components_form( $type='add' )
    -	{
    -		//-----------------------------------------
    -		// Init Vars
    -		//-----------------------------------------
    -		
    -		$com_id    = intval($this->ipsclass->input['com_id']);
    -		$menu_data = array();
    -		$menu_title    = '';
    -		$menu_url      = '';
    -		$menu_redirect = '';
    -		$menu_permbit  = '';
    -		$menu_permlang = '';
    -		
    -		//-----------------------------------------
    -		// Check (please?)
    -		//-----------------------------------------
    -		
    -		if ( $type == 'add' )
    -		{
    -			$formcode = 'component_add_do';
    -			$title    = "Добавление нового компонента";
    -			$button   = "Добавить";
    -		}
    -		else
    -		{
    -			$component = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'components', 'where' => 'com_id='.$com_id ) );
    -			
    -			if ( ! $component['com_id'] )
    -			{
    -				$this->ipsclass->main_msg = "Вы не указали ID компонента";
    -				$this->components_list();
    -				return;
    -			}
    -			
    -			$formcode = 'component_edit_do';
    -			$title    = "Редактирование компонента «{$component['com_title']}»";
    -			$button   = "Изменить";
    -		}
    -				
    -		//--------------------------------------------
    -		// Build menu: Did we just hit preview?
    -		//--------------------------------------------
    -		
    -		if ( is_array( $_POST['menu_text'] ) and count( $_POST['menu_text'] ) )
    -		{
    -			foreach( $_POST['menu_text'] as $mainid => $text )
    -			{
    -				$menu_text .=  "\t{$mainid} : '".str_replace( "'", ''', $text )."',\n";
    -			}
    -			
    -			foreach( $_POST['menu_url'] as $mainid => $text )
    -			{
    -				$menu_url .=  "\t{$mainid} : '".str_replace( "'", ''', $text )."',\n";
    -			}
    -			
    -			foreach( $_POST['menu_redirect'] as $mainid => $text )
    -			{
    -				$menu_redirect .=  "\t{$mainid} : '".str_replace( "'", ''', $text )."',\n";
    -			}
    -			
    -			foreach( $_POST['menu_permbit'] as $mainid => $text )
    -			{
    -				$menu_permbit .=  "\t{$mainid} : '".str_replace( "'", ''', $text )."',\n";
    -			}
    -			
    -			foreach( $_POST['menu_permlang'] as $mainid => $text )
    -			{
    -				$menu_permlang .=  "\t{$mainid} : '".str_replace( "'", ''', $text )."',\n";
    -			}
    -		}
    -		else
    -		{
    -			//--------------------------------------------
    -			// Build menu: Guess not...
    -			//--------------------------------------------
    -			
    -			if ( $component['com_menu_data'] )
    -			{
    -				$menu_data_raw = unserialize( $component['com_menu_data'] );
    -				
    -				if ( is_array( $menu_data_raw ) )
    -				{
    -					foreach( $menu_data_raw as $mainid => $data )
    -					{
    -						$menu_text     .=  "\t{$mainid} : '".str_replace( "'", ''', $data['menu_text'] )."',\n";
    -						$menu_url      .=  "\t{$mainid} : '".str_replace( "'", ''', $data['menu_url'] )."',\n";
    -						$menu_redirect .=  "\t{$mainid} : '".str_replace( "'", ''', $data['menu_redirect'] )."',\n";
    -						$menu_permbit  .=  "\t{$mainid} : '".str_replace( "'", ''', $data['menu_permbit'] )."',\n";
    -						$menu_permlang .=  "\t{$mainid} : '".str_replace( "'", ''', $data['menu_permlang'] )."',\n";
    -					}
    -				}
    -			}
    -		}
    -		
    -		//-----------------------------------------
    -		// Trim off trailing commas (Safari hates it)
    -		//-----------------------------------------
    -		
    -		$menu_text     = preg_replace( "#,(\n)?$#", "\\1", $menu_text );
    -		$menu_url      = preg_replace( "#,(\n)?$#", "\\1", $menu_url );
    -		$menu_redirect = preg_replace( "#,(\n)?$#", "\\1", $menu_redirect );
    -		$menu_permbit  = preg_replace( "#,(\n)?$#", "\\1", $menu_permbit );
    -		$menu_permlang = preg_replace( "#,(\n)?$#", "\\1", $menu_permlang );
    -		
    -		//-------------------------------
    -		// Form elements
    -		//-------------------------------
    -		
    -		$form = array();
    -		
    -		$form['com_title']       = $this->ipsclass->adskin->form_input(        'com_title'      , $this->ipsclass->input['com_title']       ? stripslashes($this->ipsclass->input['com_title'])       : $component['com_title'] );
    -		$form['com_description'] = $this->ipsclass->adskin->form_input(        'com_description', $this->ipsclass->input['com_description'] ? stripslashes($this->ipsclass->input['com_description']) : $component['com_description'] );
    -		$form['com_author']      = $this->ipsclass->adskin->form_input(        'com_author'     , $this->ipsclass->input['com_author']      ? stripslashes($this->ipsclass->input['com_author'])      : $component['com_author'] );
    -		$form['com_url']         = $this->ipsclass->adskin->form_input(        'com_url'        , $this->ipsclass->input['com_url']         ? stripslashes($this->ipsclass->input['com_url'])         : $component['com_url'] );
    -		$form['com_version']     = $this->ipsclass->adskin->form_simple_input( 'com_version'    , $this->ipsclass->input['com_version']     ? stripslashes($this->ipsclass->input['com_version'])     : $component['com_version'], 10 );
    -		$form['com_enabled']     = $this->ipsclass->adskin->form_yes_no(       'com_enabled'    , $this->ipsclass->input['com_enabled']     ? stripslashes($this->ipsclass->input['com_enabled'])     : $component['com_enabled'] );
    -		$form['com_section']     = $this->ipsclass->adskin->form_simple_input( 'com_section'    , $this->ipsclass->input['com_section']     ? stripslashes($this->ipsclass->input['com_section'])     : $component['com_section'], 20 );
    -		$form['com_filename']    = $this->ipsclass->adskin->form_simple_input( 'com_filename'   , $this->ipsclass->input['com_filename']    ? stripslashes($this->ipsclass->input['com_filename'])    : $component['com_filename'], 20 );
    -		$form['com_url_title']   = $this->ipsclass->adskin->form_input(        'com_url_title'  , $this->ipsclass->input['com_url_title'] ? stripslashes($this->ipsclass->input['com_url_title']) : $component['com_url_title'] );
    -		$form['com_url_uri']     = $this->ipsclass->adskin->form_input(        'com_url_uri'    , $this->ipsclass->input['com_url_uri']   ? stripslashes($this->ipsclass->input['com_url_uri'])   : $component['com_url_uri']   );
    -		
    -		if ( IN_DEV )
    -		{
    -			$form['com_safemode'] = $this->ipsclass->adskin->form_yes_no( 'com_safemode', $this->ipsclass->input['com_safemode'] ? $this->ipsclass->input['com_safemode']: $component['com_safemode'] );
    -		}
    -		
    -		$this->ipsclass->html .= $this->html->components_form( $form, $title, $formcode, $button, $component, $menu_text, $menu_url, $menu_redirect, $menu_permbit, $menu_permlang );
    -		
    -		$this->ipsclass->html_help_title = "Управление компонентами";
    -		$this->ipsclass->html_help_msg   = "Эта секция позволит вам добавить новый или изменить уже существующий компонент.";
    -		
    -		$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Управление компонентами' );
    -		$this->ipsclass->admin->nav[] = array( '', 'Добавление/изменение компонента' );
    -		$this->ipsclass->admin->output();
    -	}
    -	
    -	/*-------------------------------------------------------------------------*/
    -	// List current filetypes
    -	/*-------------------------------------------------------------------------*/
    -	
    -	function components_list()
    -	{
    -		$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Управление компонентами' );
    -		$this->ipsclass->admin->page_title  = "Управление компонентами";
    -		$this->ipsclass->admin->page_detail = "Эта секция позволит вам управлять компонентами форума.";
    -		
    -		//-------------------------------
    -		// INIT
    -		//-------------------------------
    -		
    -		$content     = "";
    -		$seen_count  = 0;
    -		$total_items = 0;
    -		$rows        = array();
    -		
    -		//-------------------------------
    -		// Get components
    -		//-------------------------------
    -		
    -		$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'components', 'order' => 'com_position ASC' ) );
    -		$this->ipsclass->DB->simple_exec();
    -		
    -		while( $r = $this->ipsclass->DB->fetch_row() )
    -		{
    -			$total_items++;
    -			$rows[] = $r;
    -		}
    -		
    -		foreach( $rows as $r )
    -		{
    -			//-------------------------------
    -			// Version...
    -			//-------------------------------
    -			
    -			$r['_fullname'] = $r['com_title'];
    -			
    -			if ( $r['com_version'] )
    -			{
    -				$r['_fullname'] .= ' v'.$r['com_version'];
    -			}
    -			
    -			//-------------------------------
    -			// Author...
    -			//-------------------------------
    -			
    -			$r['_fullauthor'] = $r['com_author'];
    -			
    -			if ( $r['com_url'] )
    -			{
    -				$r['_fullauthor'] = "{$r['_fullauthor']}";
    -			}
    -			
    -			//-------------------------------
    -			// (Alex) Cross
    -			//-------------------------------
    -			
    -			$r['_enabled_img'] = $r['com_enabled'] ? 'aff_tick.png' : 'aff_cross.png';
    -			
    -			//-------------------------------
    -			// Work out position images
    -			//-------------------------------
    -			
    -			$r['_pos_up']   = $this->html->components_position_blank($r['com_id']);
    -			$r['_pos_down'] = $this->html->components_position_blank($r['com_id']);
    -			
    -			//-------------------------------
    -			// Work out position images
    -			//-------------------------------
    -			
    -			if ( ($seen_count + 1) == $total_items )
    -			{
    -				# Show up only
    -				$r['_pos_up']   = $this->html->components_position_up($r['com_id']);
    -			}
    -			else if ( $seen_count > 0 AND $seen_count < $total_items )
    -			{
    -				# Show both...
    -				$r['_pos_up']   = $this->html->components_position_up($r['com_id']);
    -				$r['_pos_down'] = $this->html->components_position_down($r['com_id']);
    -			}
    -			else
    -			{
    -				# Show down only
    -				$r['_pos_down'] = $this->html->components_position_down($r['com_id']);
    -			}
    -			
    -			$seen_count++;
    -				
    -			$content .= $this->html->component_row($r);
    -		}
    -		
    -		$this->ipsclass->html .= $this->html->component_overview( $content );
    -		
    -		$this->ipsclass->admin->output();
    -	}
    -	
    -	
    -	function components_delete( )
    -	{
    -		//-----------------------------------------
    -		// Init Vars
    -		//-----------------------------------------
    -		
    -		$com_id    = intval($this->ipsclass->input['com_id']);
    -		
    -		if( !$com_id )
    -		{
    -			$this->ipsclass->main_msg = "Вы не указали ID компонента.";
    -			$this->components_list();
    -			return;
    -		}		
    -			
    -		$component = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'components', 'where' => 'com_id='.$com_id ) );
    -		
    -		if ( ! $component['com_id'] )
    -		{
    -			$this->ipsclass->main_msg = "Указанный компонент не найден в базе данных.";
    -			$this->components_list();
    -			return;
    -		}
    -		
    -		if( $component['com_safemode'] && !IN_DEV )
    -		{
    -			$this->ipsclass->main_msg = "Этот компонент нельзя изменить или удалить.";
    -			$this->components_list();
    -			return;
    -		}
    -		
    -		$this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'components', 'where' => 'com_id='.$com_id ) );
    -
    -		$this->components_rebuildcache();
    -		$this->ipsclass->main_msg = "Компонент был успешно удален.";
    -		$this->components_list();
    -	}		
    -	
    -
    -}
    -
    -
    + $Date: 2007-08-21 17:49:04 -0400 (Tue, 21 Aug 2007) $
    +|   > $Revision: 1099 $
    +|   > $Author: bfarber $
    ++---------------------------------------------------------------------------
    +|
    +|   > Components Functions
    +|   > Module written by Matt Mecham
    +|   > Date started: 12th April 2005 (13:09)
    ++--------------------------------------------------------------------------
    +*/
    +
    +if ( ! defined( 'IN_ACP' ) )
    +{
    +	print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class ad_components +{ + # Globals + var $ipsclass; + var $html; + + var $perm_main = 'admin'; + var $perm_child = 'components'; + + /*-------------------------------------------------------------------------*/ + // Main handler + /*-------------------------------------------------------------------------*/ + + function auto_run() + { + $this->html = $this->ipsclass->acp_load_template('cp_skin_tools'); + + switch($this->ipsclass->input['code']) + { + case 'master_xml_export': + $this->master_xml_export(); + break; + + case 'manage': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->components_list(); + break; + + case 'component_add': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); + $this->components_form('add'); + break; + case 'component_add_do': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); + $this->components_save('add'); + break; + + case 'component_edit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->components_form('edit'); + break; + case 'component_edit_do': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->components_save('edit'); + break; + + case 'component_delete': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->components_delete(); + break; + + case 'component_export': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':export' ); + $this->components_export('single'); + break; + case 'component_import': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':import' ); + $this->components_import(); + break; + + case 'component_uninstall': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->components_uninstall(); + break; + + case 'component_move': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->components_move(); + break; + case 'component_toggle_enabled': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->components_toggle_enabled(); + break; + default: + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->components_list(); + break; + } + } + + /*-------------------------------------------------------------------------*/ + // Export Master XML + /*-------------------------------------------------------------------------*/ + + function master_xml_export() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $entry = array(); + + //----------------------------------------- + // Get XML class + //----------------------------------------- + + require_once( KERNEL_PATH.'class_xml.php' ); + + $xml = new class_xml(); + + $xml->doc_type = $this->ipsclass->vars['gb_char_set']; + + $xml->xml_set_root( 'export', array( 'exported' => time() ) ); + + //----------------------------------------- + // Set group + //----------------------------------------- + + $xml->xml_add_group( 'group' ); + + //----------------------------------------- + // Get templates... + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', + 'from' => 'components', + 'where' => "com_section != 'bugtracker'" ) ); + + $this->ipsclass->DB->simple_exec(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $content = array(); + + //----------------------------------------- + // Sort the fields... + //----------------------------------------- + + foreach( $r as $k => $v ) + { + $content[] = $xml->xml_build_simple_tag( $k, $v ); + } + + $entry[] = $xml->xml_build_entry( 'row', $content ); + } + + $xml->xml_add_entry_to_group( 'group', $entry ); + + $xml->xml_format_document(); + + $doc = $xml->xml_document; + + //----------------------------------------- + // Print to browser + //----------------------------------------- + + $this->ipsclass->admin->show_download( $doc, 'components.xml', '', 0 ); + } + + /*-------------------------------------------------------------------------*/ + // Components: Toggle enabled + /*-------------------------------------------------------------------------*/ + + function components_toggle_enabled() + { + //-------------------------------------------- + // INIT + //-------------------------------------------- + + $com_id = intval($this->ipsclass->input['com_id']); + + //-------------------------------------------- + // Checks... + //-------------------------------------------- + + if ( ! $com_id ) + { + $this->ipsclass->main_msg = "No ID was passed, please try again"; + $this->components_list(); + return; + } + + //-------------------------------------------- + // Get from database + //-------------------------------------------- + + $component = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'components', 'where' => 'com_id='.$com_id ) ); + + $com_enabled = $component['com_enabled'] ? 0 : 1; + + $this->ipsclass->DB->do_update( 'components', array( 'com_enabled' => $com_enabled ), 'com_id='.$com_id ); + + $this->components_rebuildcache(); + + $this->ipsclass->main_msg = "Component Toggled"; + $this->components_list(); + } + + /*-------------------------------------------------------------------------*/ + // Components: Position + /*-------------------------------------------------------------------------*/ + + function components_move() + { + //-------------------------------------------- + // INIT + //-------------------------------------------- + + $com_id = intval($this->ipsclass->input['com_id']); + $move = trim($this->ipsclass->input['move']); + $components = array(); + $final_coms = array(); + $used_pos = array(); + $max_pos = 0; + + //-------------------------------------------- + // Checks... + //-------------------------------------------- + + if ( ! $com_id OR ! $move ) + { + $this->ipsclass->main_msg = "No ID was passed, please try again"; + $this->components_list(); + return; + } + + //-------------------------------------------- + // Get components from database + //-------------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => '*', + 'from' => 'components', + 'order' => 'com_position ASC' ) ); + $this->ipsclass->DB->exec_query(); + + while( $c = $this->ipsclass->DB->fetch_row() ) + { + $max_pos += 1; + + if ( in_array( $c['com_position'], $used_pos ) ) + { + + $c['com_position'] = $max_pos; + } + else + { + $used_pos[] = $c['com_position']; + } + + $components[ $c['com_id'] ] = $c['com_position']; + } + + asort($components); + + $i = 0; + $did_move = 0; + + foreach( $components as $k => $v ) + { + $i++; + + if( $k == $com_id ) + { + if( $move == 'up' ) + { + // Move up (lower #) + $last = array_pop( $final_coms ); + $final_coms[ $k ] = $i - 1; + + foreach( $components as $k2 => $v2 ) + { + if ( $v2 == $last ) + { + $final_coms[ $k2 ] = $i; + break; + } + } + } + else + { + // Move down (higher #) + + $final_coms[ $k ] = $i + 1; + $did_move = 1; + } + } + else + { + if ( $did_move == 1 ) + { + $final_coms[ $k ] = $i - 1; + $did_move = 0; + } + else + { + $final_coms[ $k ] = $i; + } + } + } + + /*echo "
    ";
    +		print_r($final_coms);
    +		exit;*/
    +
    +		foreach( $final_coms as $k => $v )
    +		{
    +			$this->ipsclass->DB->do_update( 'components', array( 'com_position' => $v ), 'com_id='.$k );
    +		}
    +
    +		$this->components_rebuildcache();
    +
    +		$this->ipsclass->main_msg = "Component item repositioned";
    +		$this->components_list();
    +	}
    +
    +	/*-------------------------------------------------------------------------*/
    +	// Components Rebuild Cache
    +	/*-------------------------------------------------------------------------*/
    +
    +	function components_rebuildcache()
    +	{
    +		$this->ipsclass->cache['components'] = array();
    +
    +		$this->ipsclass->DB->simple_construct( array( 'select' => 'com_id,com_enabled,com_section,com_filename,com_url_uri,com_url_title,com_position',
    +													  'from'   => 'components',
    +													  'where'  => 'com_enabled=1',
    +													  'order'  => 'com_position ASC' ) );
    +		$this->ipsclass->DB->simple_exec();
    +
    +		while ( $r = $this->ipsclass->DB->fetch_row() )
    +		{
    +			$this->ipsclass->cache['components'][] = $r;
    +		}
    +
    +		$this->ipsclass->update_cache( array( 'name' => 'components', 'array' => 1, 'deletefirst' => 1 ) );
    +	}
    +
    +	/*-------------------------------------------------------------------------*/
    +	// Components Import
    +	/*-------------------------------------------------------------------------*/
    +
    +	function components_import()
    +	{
    +		//-----------------------------------------
    +		// INIT
    +		//-----------------------------------------
    +
    +		$updated        = 0;
    +		$inserted       = 0;
    +		$cur_components = array();
    +
    +		if ( $_FILES['FILE_UPLOAD']['name'] == "" or ! $_FILES['FILE_UPLOAD']['name'] or ($_FILES['FILE_UPLOAD']['name'] == "none") )
    +		{
    +			//-----------------------------------------
    +			// check and load from server
    +			//-----------------------------------------
    +
    +			if ( ! $this->ipsclass->input['file_location'] )
    +			{
    +				$this->ipsclass->main_msg = "No upload file was found and no filename was specified.";
    +				$this->components_list();
    +				return;
    +			}
    +
    +			if ( ! file_exists( ROOT_PATH . $this->ipsclass->input['file_location'] ) )
    +			{
    +				$this->ipsclass->main_msg = "Could not find the file to open at: " . ROOT_PATH . $this->ipsclass->input['file_location'];
    +				$this->components_list();
    +				return;
    +			}
    +
    +			if ( preg_match( "#\.gz$#", $this->ipsclass->input['file_location'] ) )
    +			{
    +				if ( $FH = @gzopen( ROOT_PATH.$this->ipsclass->input['file_location'], 'rb' ) )
    +				{
    +					while ( ! @gzeof( $FH ) )
    +					{
    +						$content .= @gzread( $FH, 1024 );
    +					}
    +
    +					@gzclose( $FH );
    +				}
    +			}
    +			else
    +			{
    +				if ( $FH = @fopen( ROOT_PATH.$this->ipsclass->input['file_location'], 'rb' ) )
    +				{
    +					$content = @fread( $FH, filesize(ROOT_PATH.$this->ipsclass->input['file_location']) );
    +					@fclose( $FH );
    +				}
    +			}
    +		}
    +		else
    +		{
    +			//-----------------------------------------
    +			// Get uploaded schtuff
    +			//-----------------------------------------
    +
    +			$tmp_name = $_FILES['FILE_UPLOAD']['name'];
    +			$tmp_name = preg_replace( "#\.gz$#", "", $tmp_name );
    +
    +			$content  = $this->ipsclass->admin->import_xml( $tmp_name );
    +
    +			if ( ! $content )
    +			{
    +				$this->ipsclass->main_msg = "Could not read the uploaded file.";
    +				$this->components_list();
    +				return;
    +			}
    +		}
    +
    +		//-----------------------------------------
    +		// Get current components.
    +		//-----------------------------------------
    +
    +		$this->ipsclass->DB->simple_construct( array( 'select' => 'com_id, com_section',
    +													  'from'   => 'components',
    +													  'order'  => 'com_id' ) );
    +
    +		$this->ipsclass->DB->simple_exec();
    +
    +		while ( $r = $this->ipsclass->DB->fetch_row() )
    +		{
    +			$cur_components[ $r['com_section'] ] = $r['com_id'];
    +		}
    +
    +		//-----------------------------------------
    +		// Get xml mah-do-dah
    +		//-----------------------------------------
    +
    +		require_once( KERNEL_PATH.'class_xml.php' );
    +
    +		$xml = new class_xml();
    +
    +		//-----------------------------------------
    +		// Unpack the datafile
    +		//-----------------------------------------
    +
    +		$xml->xml_parse_document( $content );
    +
    +		//-----------------------------------------
    +		// pArse
    +		//-----------------------------------------
    +
    +		$fields = array( 'com_title'   , 'com_description', 'com_author' , 'com_url', 'com_version', 'com_menu_data',
    +						 'com_enabled' , 'com_safemode'   , 'com_section', 'com_filename', 'com_url_title', 'com_url_uri' );
    +
    +		if ( ! is_array( $xml->xml_array['componentexport']['componentgroup']['component'][0]  ) )
    +		{
    +			//-----------------------------------------
    +			// Ensure [0] is populated
    +			//-----------------------------------------
    +
    +			$xml->xml_array['componentexport']['componentgroup']['component'] = array( 0 => $xml->xml_array['componentexport']['componentgroup']['component'] );
    +		}
    +
    +		foreach( $xml->xml_array['componentexport']['componentgroup']['component'] as $entry )
    +		{
    +			$newrow = array();
    +
    +			foreach( $fields as $f )
    +			{
    +				$newrow[$f] = $entry[ $f ]['VALUE'];
    +			}
    +
    +			$this->ipsclass->DB->force_data_type = array( 'com_version' => 'string' );
    +
    +			if ( $cur_components[ $entry['com_section']['VALUE'] ] )
    +			{
    +				//-----------------------------------------
    +				// Update
    +				//-----------------------------------------
    +
    +				$this->ipsclass->DB->do_update( 'components', $newrow, 'com_id='.$cur_components[ $entry['com_section']['VALUE'] ] );
    +				$updated++;
    +			}
    +			else
    +			{
    +				//-----------------------------------------
    +				// INSERT
    +				//-----------------------------------------
    +
    +				$newrow['com_date_added'] = time();
    +
    +				$this->ipsclass->DB->do_insert( 'components', $newrow );
    +				$inserted++;
    +			}
    +		}
    +
    +		//-----------------------------------------
    +		// Done...
    +		//-----------------------------------------
    +
    +		$this->components_rebuildcache();
    +
    +		$this->ipsclass->main_msg = "$updated components updated $inserted components inserted";
    +
    +		$this->components_list();
    +	}
    +
    +	/*-------------------------------------------------------------------------*/
    +	// Components Export
    +	/*-------------------------------------------------------------------------*/
    +
    +	function components_export($type='single')
    +	{
    +		//--------------------------------------------
    +		// INIT
    +		//--------------------------------------------
    +
    +		$com_id = intval($this->ipsclass->input['com_id']);
    +		$rows   = array();
    +
    +		//--------------------------------------------
    +		// Checks...
    +		//--------------------------------------------
    +
    +		if ( $type == 'single' )
    +		{
    +			if ( ! $com_id )
    +			{
    +				$this->ipsclass->main_msg = "No ID was passed, please try again";
    +				$this->components_list();
    +				return;
    +			}
    +
    +			//--------------------------------------------
    +			// Get DB row(s)
    +			//--------------------------------------------
    +
    +			$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'components', 'where' => 'com_id='.$com_id ) );
    +			$this->ipsclass->DB->simple_exec();
    +
    +			while ( $r = $this->ipsclass->DB->fetch_row() )
    +			{
    +				$rows[] = $r;
    +			}
    +		}
    +		else
    +		{
    +			//--------------------------------------------
    +			// Get DB row(s)
    +			//--------------------------------------------
    +
    +			$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'components' ) );
    +			$this->ipsclass->DB->simple_exec();
    +
    +			while ( $r = $this->ipsclass->DB->fetch_row() )
    +			{
    +				$rows[] = $r;
    +			}
    +		}
    +
    +		//-------------------------------
    +		// Get XML class
    +		//-------------------------------
    +
    +		require_once( KERNEL_PATH.'class_xml.php' );
    +
    +		$xml = new class_xml();
    +
    +		$xml->xml_set_root( 'componentexport', array( 'exported' => time() ) );
    +
    +		//-------------------------------
    +		// Add component
    +		//-------------------------------
    +
    +		$xml->xml_add_group( 'componentgroup' );
    +
    +		$entry = array();
    +
    +		foreach( $rows as $r )
    +		{
    +			$content = array();
    +
    +			foreach( $r as $k => $v )
    +			{
    +				$content[] = $xml->xml_build_simple_tag( $k, $v );
    +			}
    +
    +			$entry[] = $xml->xml_build_entry( 'component', $content );
    +		}
    +
    +		$xml->xml_add_entry_to_group( 'componentgroup', $entry );
    +
    +		$xml->xml_format_document();
    +
    +		$doc = $xml->xml_document;
    +
    +		//-------------------------------
    +		// Print to browser
    +		//-------------------------------
    +
    +		$this->ipsclass->admin->show_download( $doc, 'ipd_components.xml', '', 0 );
    +	}
    +
    +	/*-------------------------------------------------------------------------*/
    +	// Components Save
    +	/*-------------------------------------------------------------------------*/
    +
    +	function components_save($type='add')
    +	{
    +		//--------------------------------------------
    +		// INIT
    +		//--------------------------------------------
    +
    +		$com_id          = intval($this->ipsclass->input['com_id']);
    +		$com_title       = trim( $this->ipsclass->txt_stripslashes($this->ipsclass->input['com_title']) );
    +		$com_version     = trim( $this->ipsclass->txt_stripslashes($this->ipsclass->input['com_version']) );
    +		$com_description = trim( $this->ipsclass->txt_stripslashes( $this->ipsclass->txt_htmlspecialchars($_POST['com_description'])) );
    +		$com_author      = trim( $this->ipsclass->txt_stripslashes($this->ipsclass->input['com_author']) );
    +		$com_url         = trim( $this->ipsclass->txt_stripslashes($this->ipsclass->input['com_url']) );
    +		//$com_menu_data   = trim( $this->ipsclass->txt_stripslashes( $this->ipsclass->txt_windowstounix($_POST['com_menu_data']) ) );
    +		$com_enabled     = intval($this->ipsclass->input['com_enabled']);
    +		$com_section     = trim( $this->ipsclass->txt_stripslashes($this->ipsclass->input['com_section']) );
    +		$com_filename    = trim( $this->ipsclass->txt_stripslashes($this->ipsclass->input['com_section']) );
    +		$com_safemode    = intval($this->ipsclass->input['com_safemode']);
    +		$com_url_title   = trim( $this->ipsclass->txt_stripslashes( $this->ipsclass->txt_windowstounix($_POST['com_url_title']) ) );
    +		$com_url_uri     = trim( $this->ipsclass->txt_stripslashes( $this->ipsclass->txt_windowstounix($_POST['com_url_uri']) ) );
    +
    +		//--------------------------------------------
    +		// Checks...
    +		//--------------------------------------------
    +
    +		if ( $type == 'edit' )
    +		{
    +			if ( ! $com_id )
    +			{
    +				$this->ipsclass->main_msg = "No ID was passed, please try again";
    +				$this->components_list();
    +				return;
    +			}
    +		}
    +
    +		if ( ! $com_title OR ! $com_section OR ! $com_filename )
    +		{
    +			$this->ipsclass->main_msg = "You must complete the entire form.";
    +			$this->components_form( $type );
    +			return;
    +		}
    +
    +		//--------------------------------------------
    +		// Build menu
    +		//--------------------------------------------
    +
    +		$menu_data = array();
    +
    +		if ( is_array( $_POST['menu_text'] ) and count( $_POST['menu_text'] ) )
    +		{
    +			foreach( $_POST['menu_text'] as $mainid => $text )
    +			{
    +				if ( ! $mainid OR ! $text OR ! $_POST['menu_url'][ $mainid ] )
    +				{
    +					continue;
    +				}
    +
    +				$menu_data[ $mainid ]['menu_text']      = $this->ipsclass->parse_clean_value( $text );
    +				$menu_data[ $mainid ]['menu_url']       = $this->ipsclass->txt_stripslashes( $_POST['menu_url'][ $mainid ] );
    +				$menu_data[ $mainid ]['menu_redirect']  = intval( $_POST['menu_redirect'][ $mainid ] );
    +				$menu_data[ $mainid ]['menu_permbit']   = $this->ipsclass->txt_stripslashes( $_POST['menu_permbit'][ $mainid ] );
    +				$menu_data[ $mainid ]['menu_permlang']  = $this->ipsclass->parse_clean_value( $_POST['menu_permlang'][ $mainid ] );
    +			}
    +		}
    +
    +		//--------------------------------------------
    +		// Save...
    +		//--------------------------------------------
    +
    +		$this->ipsclass->DB->force_data_type = array( 'com_version' => 'string' );
    +
    +		$array = array( 'com_title'       => $com_title,
    +						'com_author'      => $com_author,
    +						'com_version'     => $com_version,
    +						'com_url'         => $com_url,
    +						'com_menu_data'   => serialize( $menu_data ),
    +						'com_enabled'     => $com_enabled,
    +						'com_safemode'    => $com_safemode,
    +						'com_section'     => $com_section,
    +						'com_filename'    => $com_filename,
    +						'com_description' => $com_description,
    +						'com_url_uri'     => $com_url_uri,
    +						'com_url_title'   => $com_url_title,
    +					 );
    +
    +		if ( $type == 'add' )
    +		{
    +			//--------------------------------------------
    +			// Same filename or section?
    +			//--------------------------------------------
    +
    +			$test = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'com_id', 'from' => 'components', 'where' => "com_section='{$com_section}' OR com_filename='{$com_filename}'" ) );
    +
    +			if ( $test['com_id'] )
    +			{
    +				$this->ipsclass->main_msg = "You must ensure that both the section code and the filename are unique to this component.";
    +				$this->components_form( $type );
    +				return;
    +			}
    +
    +			$array['com_date_added'] = time();
    +
    +			$this->ipsclass->DB->do_insert( 'components', $array );
    +			$this->ipsclass->main_msg = 'New Component Added';
    +		}
    +		else
    +		{
    +
    +			$this->ipsclass->DB->do_update( 'components', $array, 'com_id='.$com_id );
    +			$this->ipsclass->main_msg = 'Component Edited';
    +		}
    +
    +		$this->components_rebuildcache();
    +
    +		$this->components_list();
    +	}
    +
    +	/*-------------------------------------------------------------------------*/
    +	// Components: Form
    +	/*-------------------------------------------------------------------------*/
    +
    +	function components_form( $type='add' )
    +	{
    +		//-----------------------------------------
    +		// Init Vars
    +		//-----------------------------------------
    +
    +		$com_id    = intval($this->ipsclass->input['com_id']);
    +		$menu_data = array();
    +		$menu_title    = '';
    +		$menu_url      = '';
    +		$menu_redirect = '';
    +		$menu_permbit  = '';
    +		$menu_permlang = '';
    +
    +		//-----------------------------------------
    +		// Check (please?)
    +		//-----------------------------------------
    +
    +		if ( $type == 'add' )
    +		{
    +			$formcode = 'component_add_do';
    +			$title    = "Register New Component";
    +			$button   = "Register New Component";
    +		}
    +		else
    +		{
    +			$component = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'components', 'where' => 'com_id='.$com_id ) );
    +
    +			if ( ! $component['com_id'] )
    +			{
    +				$this->ipsclass->main_msg = "No ID was passed, please try again.";
    +				$this->components_list();
    +				return;
    +			}
    +
    +			$formcode = 'component_edit_do';
    +			$title    = "Edit Component ".$component['com_title'];
    +			$button   = "Save Changes";
    +		}
    +
    +		//--------------------------------------------
    +		// Build menu: Did we just hit preview?
    +		//--------------------------------------------
    +
    +		if ( is_array( $_POST['menu_text'] ) and count( $_POST['menu_text'] ) )
    +		{
    +			foreach( $_POST['menu_text'] as $mainid => $text )
    +			{
    +				$menu_text .=  "\t{$mainid} : '".str_replace( "'", ''', $text )."',\n";
    +			}
    +
    +			foreach( $_POST['menu_url'] as $mainid => $text )
    +			{
    +				$menu_url .=  "\t{$mainid} : '".str_replace( "'", ''', $text )."',\n";
    +			}
    +
    +			foreach( $_POST['menu_redirect'] as $mainid => $text )
    +			{
    +				$menu_redirect .=  "\t{$mainid} : '".str_replace( "'", ''', $text )."',\n";
    +			}
    +
    +			foreach( $_POST['menu_permbit'] as $mainid => $text )
    +			{
    +				$menu_permbit .=  "\t{$mainid} : '".str_replace( "'", ''', $text )."',\n";
    +			}
    +
    +			foreach( $_POST['menu_permlang'] as $mainid => $text )
    +			{
    +				$menu_permlang .=  "\t{$mainid} : '".str_replace( "'", ''', $text )."',\n";
    +			}
    +		}
    +		else
    +		{
    +			//--------------------------------------------
    +			// Build menu: Guess not...
    +			//--------------------------------------------
    +
    +			if ( $component['com_menu_data'] )
    +			{
    +				$menu_data_raw = unserialize( $component['com_menu_data'] );
    +
    +				if ( is_array( $menu_data_raw ) )
    +				{
    +					foreach( $menu_data_raw as $mainid => $data )
    +					{
    +						$menu_text     .=  "\t{$mainid} : '".str_replace( "'", ''', $data['menu_text'] )."',\n";
    +						$menu_url      .=  "\t{$mainid} : '".str_replace( "'", ''', $data['menu_url'] )."',\n";
    +						$menu_redirect .=  "\t{$mainid} : '".str_replace( "'", ''', $data['menu_redirect'] )."',\n";
    +						$menu_permbit  .=  "\t{$mainid} : '".str_replace( "'", ''', $data['menu_permbit'] )."',\n";
    +						$menu_permlang .=  "\t{$mainid} : '".str_replace( "'", ''', $data['menu_permlang'] )."',\n";
    +					}
    +				}
    +			}
    +		}
    +
    +		//-----------------------------------------
    +		// Trim off trailing commas (Safari hates it)
    +		//-----------------------------------------
    +
    +		$menu_text     = preg_replace( "#,(\n)?$#", "\\1", $menu_text );
    +		$menu_url      = preg_replace( "#,(\n)?$#", "\\1", $menu_url );
    +		$menu_redirect = preg_replace( "#,(\n)?$#", "\\1", $menu_redirect );
    +		$menu_permbit  = preg_replace( "#,(\n)?$#", "\\1", $menu_permbit );
    +		$menu_permlang = preg_replace( "#,(\n)?$#", "\\1", $menu_permlang );
    +
    +		//-------------------------------
    +		// Form elements
    +		//-------------------------------
    +
    +		$form = array();
    +
    +		$form['com_title']       = $this->ipsclass->adskin->form_input(        'com_title'      , $this->ipsclass->input['com_title']       ? stripslashes($this->ipsclass->input['com_title'])       : $component['com_title'] );
    +		$form['com_description'] = $this->ipsclass->adskin->form_input(        'com_description', $this->ipsclass->input['com_description'] ? stripslashes($this->ipsclass->input['com_description']) : $component['com_description'] );
    +		$form['com_author']      = $this->ipsclass->adskin->form_input(        'com_author'     , $this->ipsclass->input['com_author']      ? stripslashes($this->ipsclass->input['com_author'])      : $component['com_author'] );
    +		$form['com_url']         = $this->ipsclass->adskin->form_input(        'com_url'        , $this->ipsclass->input['com_url']         ? stripslashes($this->ipsclass->input['com_url'])         : $component['com_url'] );
    +		$form['com_version']     = $this->ipsclass->adskin->form_simple_input( 'com_version'    , $this->ipsclass->input['com_version']     ? stripslashes($this->ipsclass->input['com_version'])     : $component['com_version'], 10 );
    +		$form['com_enabled']     = $this->ipsclass->adskin->form_yes_no(       'com_enabled'    , $this->ipsclass->input['com_enabled']     ? stripslashes($this->ipsclass->input['com_enabled'])     : $component['com_enabled'] );
    +		$form['com_section']     = $this->ipsclass->adskin->form_simple_input( 'com_section'    , $this->ipsclass->input['com_section']     ? stripslashes($this->ipsclass->input['com_section'])     : $component['com_section'], 20 );
    +		$form['com_filename']    = $this->ipsclass->adskin->form_simple_input( 'com_filename'   , $this->ipsclass->input['com_filename']    ? stripslashes($this->ipsclass->input['com_filename'])    : $component['com_filename'], 20 );
    +		$form['com_url_title']   = $this->ipsclass->adskin->form_input(        'com_url_title'  , $this->ipsclass->input['com_url_title'] ? stripslashes($this->ipsclass->input['com_url_title']) : $component['com_url_title'] );
    +		$form['com_url_uri']     = $this->ipsclass->adskin->form_input(        'com_url_uri'    , $this->ipsclass->input['com_url_uri']   ? stripslashes($this->ipsclass->input['com_url_uri'])   : $component['com_url_uri']   );
    +
    +		if ( IN_DEV )
    +		{
    +			$form['com_safemode'] = $this->ipsclass->adskin->form_yes_no( 'com_safemode', $this->ipsclass->input['com_safemode'] ? $this->ipsclass->input['com_safemode']: $component['com_safemode'] );
    +		}
    +
    +		$this->ipsclass->html .= $this->html->components_form( $form, $title, $formcode, $button, $component, $menu_text, $menu_url, $menu_redirect, $menu_permbit, $menu_permlang );
    +
    +		$this->ipsclass->html_help_title = "Components Manager";
    +		$this->ipsclass->html_help_msg   = "This section will allow you to manage your components.";
    +
    +		$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Manage Components' );
    +		$this->ipsclass->admin->nav[] = array( '', 'Add/Edit Components' );
    +		$this->ipsclass->admin->output();
    +	}
    +
    +	/*-------------------------------------------------------------------------*/
    +	// List current filetypes
    +	/*-------------------------------------------------------------------------*/
    +
    +	function components_list()
    +	{
    +		$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Manage Components' );
    +		$this->ipsclass->admin->page_title  = "Components Manager";
    +		$this->ipsclass->admin->page_detail = "This section will allow you to manage your components.";
    +
    +		//-------------------------------
    +		// INIT
    +		//-------------------------------
    +
    +		$content     = "";
    +		$seen_count  = 0;
    +		$total_items = 0;
    +		$rows        = array();
    +
    +		//-------------------------------
    +		// Get components
    +		//-------------------------------
    +
    +		$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'components', 'order' => 'com_position ASC' ) );
    +		$this->ipsclass->DB->simple_exec();
    +
    +		while( $r = $this->ipsclass->DB->fetch_row() )
    +		{
    +			$total_items++;
    +			$rows[] = $r;
    +		}
    +
    +		foreach( $rows as $r )
    +		{
    +			//-------------------------------
    +			// Version...
    +			//-------------------------------
    +
    +			$r['_fullname'] = $r['com_title'];
    +
    +			if ( $r['com_version'] )
    +			{
    +				$r['_fullname'] .= ' v'.$r['com_version'];
    +			}
    +
    +			//-------------------------------
    +			// Author...
    +			//-------------------------------
    +
    +			$r['_fullauthor'] = $r['com_author'];
    +
    +			if ( $r['com_url'] )
    +			{
    +				$r['_fullauthor'] = "{$r['_fullauthor']}";
    +			}
    +
    +			//-------------------------------
    +			// (Alex) Cross
    +			//-------------------------------
    +
    +			$r['_enabled_img'] = $r['com_enabled'] ? 'aff_tick.png' : 'aff_cross.png';
    +
    +			//-------------------------------
    +			// Work out position images
    +			//-------------------------------
    +
    +			$r['_pos_up']   = $this->html->components_position_blank($r['com_id']);
    +			$r['_pos_down'] = $this->html->components_position_blank($r['com_id']);
    +
    +			//-------------------------------
    +			// Work out position images
    +			//-------------------------------
    +
    +			if ( ($seen_count + 1) == $total_items )
    +			{
    +				# Show up only
    +				$r['_pos_up']   = $this->html->components_position_up($r['com_id']);
    +			}
    +			else if ( $seen_count > 0 AND $seen_count < $total_items )
    +			{
    +				# Show both...
    +				$r['_pos_up']   = $this->html->components_position_up($r['com_id']);
    +				$r['_pos_down'] = $this->html->components_position_down($r['com_id']);
    +			}
    +			else
    +			{
    +				# Show down only
    +				$r['_pos_down'] = $this->html->components_position_down($r['com_id']);
    +			}
    +
    +			$seen_count++;
    +
    +			//-------------------------------
    +			// Is there an uninstall script
    +			//-------------------------------
    +			if ( file_exists( ROOT_PATH.'/resources/'.$r['com_section'].'/uninstall.xml' ) )
    +			{
    +				$r['com_hasuninstall'] = TRUE;
    +			}
    +			else
    +			{
    +				$r['com_hasuninstall'] = FALSE;
    +			}
    +
    +			$content .= $this->html->component_row($r);
    +		}
    +
    +		$this->ipsclass->html .= $this->html->component_overview( $content );
    +
    +		$this->ipsclass->admin->output();
    +	}
    +
    +
    +	function components_delete( )
    +	{
    +		//-----------------------------------------
    +		// Init Vars
    +		//-----------------------------------------
    +
    +		$com_id    = intval($this->ipsclass->input['com_id']);
    +
    +		if( !$com_id )
    +		{
    +			$this->ipsclass->main_msg = "No ID was passed, please try again.";
    +			$this->components_list();
    +			return;
    +		}
    +
    +		$component = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'components', 'where' => 'com_id='.$com_id ) );
    +
    +		if ( ! $component['com_id'] )
    +		{
    +			$this->ipsclass->main_msg = "No ID was passed, please try again.";
    +			$this->components_list();
    +			return;
    +		}
    +
    +		if( $component['com_safemode'] && !IN_DEV )
    +		{
    +			$this->ipsclass->main_msg = "This component cannot be edited or deleted.";
    +			$this->components_list();
    +			return;
    +		}
    +
    +		$this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'components', 'where' => 'com_id='.$com_id ) );
    +
    +		$this->components_rebuildcache();
    +		$this->ipsclass->main_msg = "The component has been deleted.";
    +		$this->components_list();
    +	}
    +
    +
    +	function components_uninstall( )
    +	{
    +		//-----------------------------------------
    +		// Make sure we're a root admin, or else!
    +		//-----------------------------------------
    +
    +		if ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'])
    +		{
    +			$this->ipsclass->admin->error("Sorry, these functions are for the root admin group only");
    +		}
    +
    +		//-----------------------------------------
    +		// Init Vars
    +		//-----------------------------------------
    +
    +		$com_id    = intval($this->ipsclass->input['com_id']);
    +
    +		if( !$com_id )
    +		{
    +			$this->ipsclass->main_msg = "No ID was passed, please try again.";
    +			$this->components_list();
    +			return;
    +		}
    +
    +		$component = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'components', 'where' => 'com_id='.$com_id ) );
    +
    +		if ( ! $component['com_id'] )
    +		{
    +			$this->ipsclass->main_msg = "No ID was passed, please try again.";
    +			$this->components_list();
    +			return;
    +		}
    +
    +		$uninstall_script = ROOT_PATH.'/resources/'.$component['com_section'].'/uninstall.xml';
    +
    +		if ( ! file_exists( $uninstall_script ) )
    +		{
    +			$this->ipsclass->main_msg = "No uninstall script detected, the component cannot be uninstalled.";
    +			$this->components_list();
    +			return;
    +		}
    +
    +		if ( $FH = @fopen( $uninstall_script, 'rb' ) )
    +		{
    +			$content = @fread( $FH, filesize( $uninstall_script ) );
    +			@fclose( $FH );
    +		}
    +
    +		//-----------------------------------------
    +		// Unpack the datafile
    +		//-----------------------------------------
    +		require_once( KERNEL_PATH.'class_xml.php' );
    +		$xml = new class_xml();
    +
    +		$xml->xml_parse_document( $content );
    +
    +		$com_section = $xml->xml_array['componentuninstall']['description']['com_section']['VALUE'];
    +		$post_uninstall_message = $xml->xml_array['componentuninstall']['post_uninstall']['message']['VALUE'];
    +
    +		if ( $component['com_section'] != $com_section )
    +		{
    +			$this->ipsclass->main_msg = "The uninstall script does not match the selected component.";
    +			$this->components_list();
    +			return;
    +		}
    +
    +		if ( isset( $this->ipsclass->input['douninstall'] ) && $this->ipsclass->input['douninstall'] == 1 )
    +		{
    +			//-----------------------------------------
    +			// Run the uninstaller
    +			//-----------------------------------------
    +
    +			if ( !$todo = $this->parse_uninstall_xml( $xml ) )
    +			{
    +				$this->ipsclass->main_msg = "Failed to parse the uninstall script, uninstall failed.";
    +				$this->components_list();
    +				return;
    +			}
    +
    +			//-----------------------------------------
    +			// drop tables
    +			//-----------------------------------------
    +			if ( isset( $todo['droptables'] ) && count( $todo['droptables'] ) > 0 )
    +			{
    +				foreach( $todo['droptables'] as $table )
    +				{
    +					$this->ipsclass->DB->sql_drop_table( $table );
    +				}
    +			}
    +
    +			//-----------------------------------------
    +			// drop columns
    +			//-----------------------------------------
    +			if ( isset( $todo['dropcolumns'] ) && count( $todo['dropcolumns'] ) > 0 )
    +			{
    +				foreach( $todo['dropcolumns'] as $dropcol )
    +				{
    +					if ( $this->ipsclass->DB->field_exists( $dropcol['column'], $dropcol['table'] ) )
    +					{
    +						$this->ipsclass->DB->sql_drop_field( $dropcol['table'], $dropcol['column'] );
    +					}
    +				}
    +			}
    +
    +			//-----------------------------------------
    +			// remove settings
    +			//-----------------------------------------
    +			if ( isset( $todo['removesettings'] ) && count( $todo['removesettings'] ) > 0 )
    +			{
    +				foreach( $todo['removesettings'] as $settingsgroup )
    +				{
    +					$config_group = $this->ipsclass->DB->simple_exec_query ( array ( 'select'	=> "conf_title_id",
    +																					 'from'		=> "conf_settings_titles",
    +																					 'where'	=> "conf_title_keyword = '".$settingsgroup."'"
    +																		   )	   );
    +					$this->ipsclass->DB->do_delete( 'conf_settings', "conf_group = ".intval( $config_group['conf_title_id'] ) );
    +					$this->ipsclass->DB->do_delete( 'conf_settings_titles', "conf_title_id = ".intval( $config_group['conf_title_id'] ) );
    +				}
    +			}
    +
    +			//-----------------------------------------
    +			// delete rows
    +			//-----------------------------------------
    +			if ( isset( $todo['deleterows'] ) && count( $todo['deleterows'] ) > 0 )
    +			{
    +				foreach( $todo['deleterows'] as $delrow )
    +				{
    +					$this->ipsclass->DB->do_delete( $delrow['table'], $delrow['where'] );
    +				}
    +			}
    +
    +			//-----------------------------------------
    +			// update rows
    +			//-----------------------------------------
    +			if ( isset( $todo['updaterows'] ) && count( $todo['updaterows'] ) > 0 )
    +			{
    +				foreach( $todo['updaterows'] as $updrow )
    +				{
    +					$this->ipsclass->DB->do_update( $updrow['table'], $updrow['set'], $updrow['where'] );
    +				}
    +			}
    +
    +			//-----------------------------------------
    +			// remove the component
    +			//-----------------------------------------
    +
    +			if ( $FH = @fopen( ROOT_PATH.'/resources/components.xml', 'rb' ) )
    +			{
    +				$content = @fread( $FH, filesize( ROOT_PATH.'/resources/components.xml' ) );
    +				@fclose( $FH );
    +			}
    +
    +			unset( $xml );
    +			$xml = new class_xml();
    +			$xml->xml_parse_document( $content );
    +
    +			//-----------------------------------------
    +			// pArse
    +			//-----------------------------------------
    +
    +			$fields = array( 'com_title'   , 'com_description', 'com_author' , 'com_url', 'com_version', 'com_menu_data',
    +							 'com_enabled' , 'com_safemode'   , 'com_section', 'com_filename', 'com_url_title', 'com_url_uri' );
    +
    +			if ( ! is_array( $xml->xml_array['export']['group']['row'][0]  ) )
    +			{
    +				//-----------------------------------------
    +				// Ensure [0] is populated
    +				//-----------------------------------------
    +
    +				$xml->xml_array['export']['group']['row'] = array( 0 => $xml->xml_array['export']['group']['row'] );
    +			}
    +
    +			$updated=0;
    +
    +			foreach( $xml->xml_array['export']['group']['row'] as $entry )
    +			{
    +				$newrow = array();
    +
    +				foreach( $fields as $f )
    +				{
    +					$newrow[$f] = $entry[ $f ]['VALUE'];
    +				}
    +
    +				if ( $newrow['com_section'] == $com_section )
    +				{
    +					$this->ipsclass->DB->force_data_type = array( 'com_version' => 'string' );
    +					$this->ipsclass->DB->do_update( 'components', $newrow, 'com_id='.$com_id );
    +					$updated++;
    +				}
    +			}
    +			if ( ! $updated )
    +			{
    +				$this->ipsclass->DB->do_delete( 'components', 'com_id='.$com_id );
    +			}
    +			$this->components_rebuildcache();
    +
    +			//-----------------------------------------
    +			// recache
    +			//-----------------------------------------
    +			if ( isset( $todo['recache'] ) && count( $todo['recache'] ) > 0 )
    +			{
    +				require_once( ROOT_PATH.'/sources/action_admin/administration.php' );
    +				$recache_funcs = new ad_administration;
    +				$recache_funcs->ipsclass = & $this->ipsclass;
    +
    +				foreach( $todo['recache'] as $cache )
    +				{
    +					$recache_funcs->cache_end( $cache, 1 );
    +				}
    +			}
    +
    +			$this->ipsclass->main_msg = "Succesfully uninstalled ".$component['com_title'];
    +
    +			if ( $post_uninstall_message )
    +			{
    +				$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Finalize Uninstall" );
    +				$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $post_uninstall_message."
    " ) ); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + } + + $this->ipsclass->admin->done_screen("Succesfully uninstalled ".$component['com_title'], "Manage Components", "{$this->ipsclass->form_code}" ); + } + else + { + //----------------------------------------- + // Uninstall confirmation screen + //----------------------------------------- + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Manage Components' ); + $this->ipsclass->admin->nav[] = array( '', 'Uninstall Component '.$component['com_title'] ); + + $this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( 'Uninstall component '.$component['com_title'], 'This section will start the uninstall of '.$component['com_title'] ) . "
    "; + + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'component_uninstall' ), + 2 => array( 'act' , 'components' ), + 3 => array( 'douninstall' , '1' ), + 4 => array( 'section' , $this->ipsclass->section_code ), + 5 => array( 'com_id' , $com_id ) + ) ); + + $this->ipsclass->adskin->td_header[] = array( "{none}" , "100%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Uninstall ".$component['com_title'] ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "
    WARNING

    If you procede this will completely remove ".$component['com_title']." from your database. There is no undo.

    Click the UNINSTALL button to start the uninstallation of ".$component['com_title']."." + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form( 'UNINSTALL'); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + $this->ipsclass->admin->output(); + } + } + + + function parse_uninstall_xml( & $xml ) + { + if ( !is_object( $xml ) ) + { + return false; + } + + $return_todo = array(); + + //----------------------------------------- + // Dropping tables? + //----------------------------------------- + + if ( is_array ( $xml->xml_array['componentuninstall']['uninstall']['droptables']['table'] ) ) + { + if ( count( $xml->xml_array['componentuninstall']['uninstall']['droptables']['table'] ) > 1 ) + { + foreach( $xml->xml_array['componentuninstall']['uninstall']['droptables']['table'] as $table ) + { + if ( $table['VALUE'] ) + { + $return_todo['droptables'][] = $table['VALUE']; + } + } + } + elseif ( $xml->xml_array['componentuninstall']['uninstall']['droptables']['table']['VALUE'] ) + { + $return_todo['droptables'][] = $xml->xml_array['componentuninstall']['uninstall']['droptables']['table']['VALUE']; + } + } + + //----------------------------------------- + // Dropping columns? + //----------------------------------------- + + if ( is_array ( $xml->xml_array['componentuninstall']['uninstall']['dropcolumns']['field'] ) ) + { + if ( $xml->xml_array['componentuninstall']['uninstall']['dropcolumns']['field']['table']['VALUE'] ) + { + $return_todo['dropcolumns'][] = array( 'table' => $xml->xml_array['componentuninstall']['uninstall']['dropcolumns']['field']['table']['VALUE'], 'column' => $xml->xml_array['componentuninstall']['uninstall']['dropcolumns']['field']['column']['VALUE'] ); + } + elseif ( count( $xml->xml_array['componentuninstall']['uninstall']['dropcolumns']['field'] ) > 1 ) + { + foreach( $xml->xml_array['componentuninstall']['uninstall']['dropcolumns']['field'] as $field ) + { + if ( $field['table']['VALUE'] && $field['column']['VALUE'] ) + { + $return_todo['dropcolumns'][] = array( 'table' => $field['table']['VALUE'], 'column' => $field['column']['VALUE'] ); + } + } + } + } + + //----------------------------------------- + // Remove settings? + //----------------------------------------- + + if ( is_array ( $xml->xml_array['componentuninstall']['uninstall']['removesettings']['settingsgroup'] ) ) + { + if ( count( $xml->xml_array['componentuninstall']['uninstall']['removesettings']['settingsgroup'] ) > 1 ) + { + foreach( $xml->xml_array['componentuninstall']['uninstall']['removesettings']['settingsgroup'] as $settingsgroup ) + { + if ( $settingsgroup['VALUE'] ) + { + $return_todo['removesettings'][] = $settingsgroup['VALUE']; + } + } + } + elseif ( $xml->xml_array['componentuninstall']['uninstall']['removesettings']['settingsgroup']['VALUE'] ) + { + $return_todo['removesettings'][] = $xml->xml_array['componentuninstall']['uninstall']['removesettings']['settingsgroup']['VALUE']; + } + } + + //----------------------------------------- + // Deleting rows? + //----------------------------------------- + + if ( is_array ( $xml->xml_array['componentuninstall']['uninstall']['deleterows']['deletesql'] ) ) + { + if ( $xml->xml_array['componentuninstall']['uninstall']['deleterows']['deletesql']['table']['VALUE'] ) + { + $return_todo['deleterows'][] = array( 'table' => $xml->xml_array['componentuninstall']['uninstall']['deleterows']['deletesql']['table']['VALUE'], 'where' => $xml->xml_array['componentuninstall']['uninstall']['deleterows']['deletesql']['where']['VALUE'] ); + } + elseif ( count( $xml->xml_array['componentuninstall']['uninstall']['deleterows']['deletesql'] ) > 1 ) + { + foreach( $xml->xml_array['componentuninstall']['uninstall']['deleterows']['deletesql'] as $delrow ) + { + if ( $delrow['table']['VALUE'] ) + { + $return_todo['deleterows'][] = array( 'table' => $delrow['table']['VALUE'], 'where' => $delrow['where']['VALUE'] ); + } + } + } + } + + //----------------------------------------- + // updating rows? + //----------------------------------------- + + if ( is_array ( $xml->xml_array['componentuninstall']['uninstall']['updaterows']['updatesql'] ) ) + { + if ( $xml->xml_array['componentuninstall']['uninstall']['updaterows']['updatesql']['table']['VALUE'] ) + { + $set = array(); + if ( $xml->xml_array['componentuninstall']['uninstall']['updaterows']['updatesql']['set']['update_column']['field']['VALUE'] ) + { + $set = array( $xml->xml_array['componentuninstall']['uninstall']['updaterows']['updatesql']['set']['update_column']['field']['VALUE'] => $xml->xml_array['componentuninstall']['uninstall']['updaterows']['updatesql']['set']['update_column']['value']['VALUE'] ); + } + elseif ( count( $xml->xml_array['componentuninstall']['uninstall']['updaterows']['updatesql']['set']['update_column'] ) > 1 ) + { + foreach ( $xml->xml_array['componentuninstall']['uninstall']['updaterows']['updatesql']['set']['update_column'] as $update_column ) + { + $set[$update_column['field']['VALUE']] = $update_column['value']['VALUE']; + } + } + $return_todo['updaterows'][] = array( 'table' => $xml->xml_array['componentuninstall']['uninstall']['updaterows']['updatesql']['table']['VALUE'], + 'set' => $set, + 'where' => $xml->xml_array['componentuninstall']['uninstall']['updaterows']['updatesql']['where']['VALUE'] ); + } + elseif ( count( $xml->xml_array['componentuninstall']['uninstall']['updaterows']['updatesql'] ) > 1 ) + { + foreach( $xml->xml_array['componentuninstall']['uninstall']['updaterows']['updatesql'] as $updaterow ) + { + if ( $updaterow['table']['VALUE'] ) + { + $set = array(); + if ( $updaterow['set']['update_column']['field']['VALUE'] ) + { + $set = array( $updaterow['set']['update_column']['field']['VALUE'] => $updaterow['set']['update_column']['value']['VALUE'] ); + } + elseif ( count( $updaterow['set']['update_column'] ) > 1 ) + { + foreach ( $updaterow['set']['update_column'] as $update_column ) + { + $set[$update_column['field']['VALUE']] = $update_column['value']['VALUE']; + } + } + $return_todo['updaterows'][] = array( 'table' => $updaterow['table']['VALUE'], 'set' => $set, 'where' => $updaterow['where']['VALUE'] ); + } + } + } + } + + //----------------------------------------- + // recache? + //----------------------------------------- + + if ( is_array ( $xml->xml_array['componentuninstall']['uninstall']['recache']['cache'] ) ) + { + if ( count( $xml->xml_array['componentuninstall']['uninstall']['recache']['cache'] ) > 1 ) + { + foreach( $xml->xml_array['componentuninstall']['uninstall']['recache']['cache'] as $cache ) + { + if ( $cache['VALUE'] ) + { + $return_todo['recache'][] = $cache['VALUE']; + } + } + } + elseif ( $xml->xml_array['componentuninstall']['uninstall']['recache']['cache']['VALUE'] ) + { + $return_todo['recache'][] = $xml->xml_array['componentuninstall']['uninstall']['recache']['cache']['VALUE']; + } + } + + return $return_todo; + } +} + + ?> \ No newline at end of file diff --git a/upload/sources/action_admin/index.php b/upload/sources/action_admin/dashboard.php similarity index 57% rename from upload/sources/action_admin/index.php rename to upload/sources/action_admin/dashboard.php index 6059f104..4068bb9c 100644 --- a/upload/sources/action_admin/index.php +++ b/upload/sources/action_admin/dashboard.php @@ -1,533 +1,577 @@ - $Date: 2006-12-05 09:12:45 -0600 (Tue, 05 Dec 2006) $ -| > $Revision: 765 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > Admin "welcome" screen functions -| > Module written by Matt Mecham -| > Date started: 1st march 2002 -| -| > Module Version Number: 1.0.0 -| > DBA Checked: Tue 25th May 2004 -+-------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} -class ad_index -{ - # Global - var $ipsclass; - var $html; - - var $mysql_version = ""; - - /** - * Section title name - * - * @var string - */ - var $perm_main = "admin"; - - /** - * Section title name - * - * @var string - */ - var $perm_child = "splash"; - - function auto_run() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - define( 'IPS_NEWS_URL' , 'http://www.ibresource.ru/forums/ibr_news.php' ); - define( 'IPS_VERSION_CHECK_URL', 'http://external.iblink.ru/latestversioncheck/version.php' ); - - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - - $content = array(); - $thiscontent = ""; - $upgrade_history = array(); - $latest_version = array(); - $reg_end = ""; - $sm_install = 0; - $lock_file = 0; - $converter = 0; - - if ( @file_exists( ROOT_PATH . 'install/index.php' ) ) - { - $sm_install = 1; - } - - if ( @file_exists( ROOT_PATH . 'install/installfiles/lock.php' ) ) - { - $lock_file = 1; - } - - if ( @file_exists( ROOT_PATH . 'convert/index.php' ) ) - { - $converter = 1; - } - - if ( @file_exists( ROOT_PATH . 'upgrade/core/class_installer.php' ) ) - { - define( 'INS_ROOT_PATH', ROOT_PATH.'upgrade/' ); - - require_once ROOT_PATH . 'upgrade/core/class_installer.php'; - require_once ROOT_PATH . 'upgrade/custom/app.php'; - - $upgrade = new application_installer(); - $upgrade->ipsclass =& $this->ipsclass; - - $upgrade->get_version_latest(); - - if( $upgrade->last_poss_id > $upgrade->current_version ) - { - $unfinished_upgrade = 1; - } - } - - //----------------------------------------- - // LOAD HTML - //----------------------------------------- - - $this->html = $this->ipsclass->acp_load_template('cp_skin_index'); - - //----------------------------------------- - // continue... - //----------------------------------------- - - $this->ipsclass->admin->page_title = "Добро пожаловать в админцентр вашего Invision Power Board"; - $this->ipsclass->admin->page_detail = ""; - - //----------------------------------------- - // PHP INFO? - //----------------------------------------- - - if ( isset($this->ipsclass->input['phpinfo']) AND $this->ipsclass->input['phpinfo'] ) - { - @ob_start(); - phpinfo(); - $parsed = @ob_get_contents(); - @ob_end_clean(); - - preg_match( "#(.*)#is" , $parsed, $match1 ); - - $php_body = $match1[1]; - - # PREVENT WRAP: Most cookies - $php_body = str_replace( "; " , ";
    " , $php_body ); - # PREVENT WRAP: Very long string cookies - $php_body = str_replace( "%3B", "
    " , $php_body ); - # PREVENT WRAP: Serialized array string cookies - $php_body = str_replace( ";i:", ";
    i:" , $php_body ); - # PREVENT WRAP: LS_COLORS env - $php_body = str_replace( ":*.", "
    :*." , $php_body ); - # PREVENT WRAP: PATH env - $php_body = str_replace( "bin:/", "bin
    :/" , $php_body ); - # PREVENT WRAP: Cookie %2C split - $php_body = str_replace( "%2C", "%2C
    " , $php_body ); - #PREVENT WRAP: Cookie , split - $php_body = preg_replace( "#,(\d+),#", ",
    \\1," , $php_body ); - - - $php_style = "\n"; - - $this->ipsclass->html = $php_style . $php_body; - $this->ipsclass->admin->output(); - } - - //----------------------------------------- - // Get MySQL & PHP Version - //----------------------------------------- - - $this->ipsclass->DB->sql_get_version(); - - //----------------------------------------- - // Upgrade history? - //----------------------------------------- - - $latest_version = array( 'upgrade_version_id' => NULL ); - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'upgrade_history', 'order' => 'upgrade_version_id DESC', 'limit' => array(0, 5) ) ); - $this->ipsclass->DB->simple_exec(); - - while( $r = $this->ipsclass->DB->fetch_row() ) - { - if ( $r['upgrade_version_id'] > $latest_version['upgrade_version_id'] ) - { - $latest_version = $r; - } - - $upgrade_history[] = $r; - } - - //----------------------------------------- - // Resetting security image? - //----------------------------------------- - - if ( isset($_REQUEST['reset_security_flag']) AND $_REQUEST['reset_security_flag'] == 1 AND $_REQUEST['new_build'] ) - { - $new_build = intval( $_REQUEST['new_build'] ); - $new_reason = trim( substr( $_REQUEST['new_reason'], 0, 1 ) ); - $new_version = $latest_version['upgrade_version_id'].'.'.$new_build.'.'.$new_reason; - - $this->ipsclass->DB->do_update( 'upgrade_history', array( 'upgrade_notes' => $new_version ), 'upgrade_version_id='.$latest_version['upgrade_version_id'] ); - - $latest_version['upgrade_notes'] = $new_version; - } - - //----------------------------------------- - // Got real version number? - //----------------------------------------- - - $this->ipsclass->version = 'v'.$latest_version['upgrade_version_human']; - $this->ipsclass->vn_full = ( isset($latest_version['upgrade_notes']) AND $latest_version['upgrade_notes'] ) ? $latest_version['upgrade_notes'] : $this->ipsclass->vn_full; - - $content['update_img'] = $this->html->update_img( IPS_VERSION_CHECK_URL . '?' . base64_encode( $this->ipsclass->vn_full.'|^|'.$this->ipsclass->vars['board_url'] ) ); - - //----------------------------------------- - // Licensed? - //----------------------------------------- - - $content['reg_html'] = $this->html->acp_licensed(); - - //----------------------------------------- - // Notepad - //----------------------------------------- - - if ( isset($this->ipsclass->input['save']) AND $this->ipsclass->input['save'] == 1 ) - { - $this->ipsclass->update_cache( array( 'value' => $this->ipsclass->txt_stripslashes($_POST['notes']), 'name' => 'adminnotes', 'donow' => 1, 'deletefirst' => 0, 'array' => 0 ) ); - } - - $text = "Вы можете использовать этот блок для записи какой-либо информации для всех администраторов."; - - $this->ipsclass->init_load_cache( array( 'adminnotes', 'skinpanic' ) ); - - if ( !isset($this->ipsclass->cache['adminnotes']) OR !$this->ipsclass->cache['adminnotes'] ) - { - $this->ipsclass->update_cache( array( 'value' => $text, 'name' => 'adminnotes', 'donow' => 1, 'deletefirst' => 0, 'array' => 0 ) ); - - $this->ipsclass->cache['adminnotes'] = $text; - } - - $this->ipsclass->cache['adminnotes'] = htmlspecialchars($this->ipsclass->cache['adminnotes'], ENT_QUOTES); - $this->ipsclass->cache['adminnotes'] = str_replace( "&#", "&#", $this->ipsclass->cache['adminnotes'] ); - - $content['ad_notes'] = $this->html->acp_notes( $this->ipsclass->cache['adminnotes'] ); - - //----------------------------------------- - // Quick clicks - //----------------------------------------- - - $content['quick_clicks'] = $this->html->acp_quick_clicks(); - - //----------------------------------------- - // Version History - //----------------------------------------- - - foreach( $upgrade_history as $r ) - { - $r['_date'] = $this->ipsclass->get_date( $r['upgrade_date'], 'SHORT' ); - - $thiscontent .= $this->html->acp_version_history_row( $r ); - } - - $content['version_history'] = $this->html->acp_version_history_wrapper( $thiscontent ); - - //----------------------------------------- - // ADMINS USING CP - //----------------------------------------- - - $t_time = time() - 60*10; - $time_now = time(); - $seen_name = array(); - $acponline = ""; - - $this->ipsclass->DB->build_query( array( 'select' => 's.session_member_name, s.session_location, s.session_log_in_time, s.session_running_time, s.session_ip_address', - 'from' => array( 'admin_sessions' => 's' ), - 'add_join' => array( 0 => array( 'select' => 'm.members_display_name', - 'from' => array( 'members' => 'm' ), - 'where' => "m.id=s.session_member_id", - 'type' => 'left' ) ) ) ); - - $this->ipsclass->DB->exec_query(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - if ( isset($seen_name[ $r['session_member_name'] ]) AND $seen_name[ $r['session_member_name'] ] == 1 ) - { - continue; - } - else - { - $seen_name[ $r['session_member_name'] ] = 1; - } - - $r['_log_in'] = $time_now - $r['session_log_in_time']; - $r['_click'] = $time_now - $r['session_running_time']; - - if ( ($r['_log_in'] / 60) < 1 ) - { - $r['_log_in'] = sprintf("%0d", $r['_log_in']) . " секунд назад"; - } - else - { - $r['_log_in'] = sprintf("%0d", ($r['_log_in'] / 60) ) . " минут назад"; - } - - if ( ($r['_click'] / 60) < 1 ) - { - $r['_click'] = sprintf("%0d", $r['_click']) . " секунд назад"; - } - else - { - $r['_click'] = sprintf("%0d", ($r['_click'] / 60) ) . " минут назад"; - } - - $r['session_location'] = $r['session_location'] ? $r['session_location'] : 'index'; - - $acponline .= $this->html->acp_onlineadmin_row( $r ); - } - - $content['acp_online'] = $this->html->acp_onlineadmin_wrapper( $acponline ); - - //----------------------------------------- - // IPS latest news - //----------------------------------------- - - $content['latest_news'] = $this->html->acp_ips_news( IPS_NEWS_URL ); - - //----------------------------------------- - // Stats - //----------------------------------------- - - $reg = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'COUNT(*) as reg' , 'from' => 'validating', 'where' => 'lost_pass <> 1' ) ); - - if( $this->ipsclass->vars['ipb_bruteforce_attempts'] ) - { - $lock = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'COUNT(*) as mems' , 'from' => 'members', 'where' => 'failed_login_count >= ' . $this->ipsclass->vars['ipb_bruteforce_attempts'] ) ); - } - - $coppa = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'COUNT(*) as coppa', 'from' => 'validating', 'where' => 'coppa_user=1' ) ); - - $content['stats'] = $this->html->acp_stats_wrapper( array( 'topics' => intval($this->ipsclass->cache['stats']['total_topics']), - 'replies' => intval($this->ipsclass->cache['stats']['total_replies']), - 'members' => intval($this->ipsclass->cache['stats']['mem_count']), - 'validate' => intval( $reg['reg'] ), - 'locked' => intval( $lock['mems'] ), - 'coppa' => intval( $coppa['coppa'] ), - 'sql_driver' => strtoupper(SQL_DRIVER), - 'sql_version' => $this->ipsclass->DB->true_version, - 'php_version' => phpversion(), - 'php_sapi' => @php_sapi_name(), - 'ipb_version' => $this->ipsclass->version, - 'ipb_id' => $this->ipsclass->vn_full ) ); - - //----------------------------------------- - // Piece it together - //----------------------------------------- - - $this->ipsclass->html .= $this->html->acp_main_template( $content ); - - //----------------------------------------- - // Update img - //----------------------------------------- - - $this->ipsclass->html = str_replace( '', $content['update_img'], $this->ipsclass->html ); - - //----------------------------------------- - // Trashed skin? - //----------------------------------------- - - if ( isset($this->ipsclass->cache['skinpanic']) AND $this->ipsclass->cache['skinpanic'] == 'rebuildemergency' ) - { - $this->ipsclass->html = str_replace( '', $this->html->warning_rebuild_emergency(), $this->ipsclass->html ); - } - - if ( isset($this->ipsclass->cache['skinpanic']) AND $this->ipsclass->cache['skinpanic'] == 'rebuildupgrade' ) - { - $this->ipsclass->html = str_replace( '', $this->html->warning_rebuild_upgrade(), $this->ipsclass->html ); - } - - //----------------------------------------- - // IN DEV stuff... - //----------------------------------------- - - if ( IN_DEV ) - { - $last_update = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', - 'from' => 'cache_store', - 'where' => "cs_key='in_dev_setting_update'" ) ); - - if ( ! $last_update['cs_value'] ) - { - $this->ipsclass->DB->do_delete( 'cache_store', "cs_key='in_dev_setting_update'" ); - $this->ipsclass->DB->do_insert( 'cache_store', array( 'cs_value' => time(), 'cs_key' => "in_dev_setting_update" ) ); - $last_update = time(); - } - - $last_settings_save = intval( @filemtime( ROOT_PATH . 'resources/settings.xml' ) ); - - if ( $last_settings_save > $last_update['cs_value'] ) - { - $_mtime = $this->ipsclass->get_date( $last_settings_save , 'JOINED' ); - $_dbtime = $this->ipsclass->get_date( $last_update['cs_value'], 'JOINED' ); - - $_html = $this->ipsclass->skin_acp_global->warning_box( "settings.xml File Updated", - "The 'resources/settings.xml' file has been updated. Please visit this page to re-import it to make sure your settings are up-to-date -
    Last modified time for 'settings.xml': $_mtime. -
    Last import run: $_dbtime" ) . "
    "; - - $this->ipsclass->html = str_replace( '', $_html, $this->ipsclass->html ); - } - - if ( @file_exists( ROOT_PATH . '_dev_notes.txt' ) ) - { - $_notes = @file_get_contents( ROOT_PATH . '_dev_notes.txt' ); - - if ( $_notes ) - { - $_html = $this->ipsclass->skin_acp_global->information_box( "Developers' Notes", nl2br($_notes) ) . "
    "; - $this->ipsclass->html = str_replace( '', $_html, $this->ipsclass->html ); - } - } - } - - //----------------------------------------- - // INSTALLER PRESENT? - //----------------------------------------- - - if ( $sm_install == 1 ) - { - if ( $lock_file != 1 ) - { - $this->ipsclass->html = str_replace( '', $this->html->warning_unlocked_installer(), $this->ipsclass->html ); - } - else - { - $this->ipsclass->html = str_replace( '', $this->html->warning_installer(), $this->ipsclass->html ); - } - } - else if( $converter ) - { - $this->ipsclass->html = str_replace( '', $this->html->warning_converter(), $this->ipsclass->html ); - } - - //----------------------------------------- - // UNFINISHED UPGRADE? - //----------------------------------------- - - if ( $unfinished_upgrade == 1 ) - { - $this->ipsclass->html = str_replace( '', $this->html->warning_upgrade(), $this->ipsclass->html ); - } - - //----------------------------------------- - // INSUFFICIENT PHP VERSION? - //----------------------------------------- - - if ( PHP_VERSION < '4.3.0' ) - { - $this->ipsclass->html = str_replace( '', $this->html->acp_php_version_warning( PHP_VERSION ), $this->ipsclass->html ); - } - - //----------------------------------------- - // BOARD OFFLINE? - //----------------------------------------- - - if ( $this->ipsclass->vars['board_offline'] ) - { - $this->ipsclass->html = str_replace( '', $this->html->acp_board_offline(), $this->ipsclass->html ); - } - - //----------------------------------------- - // ROOT ADMIN? - //----------------------------------------- - - $lastactions = ""; - - if ( $this->ipsclass->member['mgroup'] == $this->ipsclass->vars['admin_group'] ) - { - //----------------------------------------- - // LAST 5 Admin Actions - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'index_admin_logs', array() ); - $this->ipsclass->DB->cache_exec_query(); - - while ( $rowb = $this->ipsclass->DB->fetch_row() ) - { - $rowb['_ctime'] = $this->ipsclass->admin->get_date( $rowb['ctime'] ); - - $lastactions .= $this->html->acp_lastactions_row( $rowb ); - } - - $this->ipsclass->html = str_replace( '', $this->html->acp_lastactions_wrapper( $lastactions ), $this->ipsclass->html ); - - //----------------------------------------- - // Last 5 log in attempts - //----------------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => '*', - 'from' => 'admin_login_logs', - 'order' => 'admin_time DESC', - 'limit' => array( 0, 5 ) ) ); - - $this->ipsclass->DB->exec_query(); - - while ( $rowb = $this->ipsclass->DB->fetch_row() ) - { - $rowb['_admin_time'] = $this->ipsclass->admin->get_date( $rowb['admin_time'] ); - $rowb['_admin_img'] = $rowb['admin_success'] ? 'aff_tick.png' : 'aff_cross.png'; - - $logins .= $this->html->acp_last_logins_row( $rowb ); - } - - $this->ipsclass->html = str_replace( '', $this->html->acp_last_logins_wrapper( $logins ), $this->ipsclass->html ); - } - - $this->ipsclass->admin->output(); - } - -} - - + $Date: 2007-05-01 19:00:44 +0100 (Tue, 01 May 2007) $ +| > $Revision: 958 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > Admin "welcome" screen functions +| > Module written by Matt Mecham +| > Date started: 1st march 2002 +| +| > Module Version Number: 1.0.0 +| > DBA Checked: Tue 25th May 2004 ++-------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} +class ad_dashboard +{ + # Global + var $ipsclass; + var $html; + + var $mysql_version = ""; + + /** + * Section title name + * + * @var string + */ + var $perm_main = "dashboard"; + + /** + * Section title name + * + * @var string + */ + var $perm_child = "dashboard"; + + function auto_run() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + /* Nulled by TrioxX + define( 'IPS_NEWS_URL' , 'http://anonym.to/http://external.ipslink.com/globalfeeds/news/' ); + define( 'IPS_BULLETINS_URL' , 'http://anonym.to/http://external.ipslink.com/ipbfeeds/235/staffbulletin/' ); + define( 'IPS_VERSION_CHECK_URL' , 'http://anonym.to/http://www.invisionpower.com/latestversioncheck/ipb23x.php' ); + */ + + #$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + + $content = array(); + $thiscontent = ""; + $latest_version = array(); + $reg_end = ""; + $sm_install = 0; + $lock_file = 0; + $converter = 0; + $fulltext_a = 0; + $fulltext_b = 0; + $unfinished_upgrade = 0; + $urls = array( 'news' => IPS_NEWS_URL, + 'keiths_bits' => IPS_BULLETINS_URL, + 'version_check' => IPS_VERSION_CHECK_URL + /* Nulled by TrioxX + 'blogs' => 'http://external.ipslink.com/globalfeeds/blog/' + */); + + if ( @file_exists( ROOT_PATH . 'install/index.php' ) ) + { + $sm_install = 1; + } + + if ( @file_exists( ROOT_PATH . 'install/installfiles/lock.php' ) ) + { + $lock_file = 1; + } + + if ( @file_exists( ROOT_PATH . 'convert/index.php' ) ) + { + $converter = 1; + } + + if( $this->ipsclass->DB->sql_can_fulltext() ) + { + if( ! $this->ipsclass->DB->sql_is_currently_fulltext( 'posts' ) ) + { + $fulltext_a = 1; + } + + if( $this->ipsclass->vars['search_sql_method'] != 'ftext' ) + { + $fulltext_b = 1; + } + } + + if ( @file_exists( ROOT_PATH . 'upgrade/core/class_installer.php' ) ) + { + define( 'INS_ROOT_PATH', ROOT_PATH.'upgrade/' ); + + require_once ROOT_PATH . 'upgrade/core/class_installer.php'; + require_once ROOT_PATH . 'upgrade/custom/app.php'; + + $upgrade = new application_installer(); + $upgrade->ipsclass =& $this->ipsclass; + + $upgrade->get_version_latest(); + + if( $upgrade->last_poss_id > $upgrade->current_version ) + { + $unfinished_upgrade = 1; + } + } + + //----------------------------------------- + // LOAD HTML + //----------------------------------------- + + $this->html = $this->ipsclass->acp_load_template('cp_skin_dashboard'); + + //----------------------------------------- + // continue... + //----------------------------------------- + + $this->ipsclass->admin->page_title = ""; + $this->ipsclass->admin->page_detail = ""; + + //----------------------------------------- + // Get MySQL & PHP Version + //----------------------------------------- + + $this->ipsclass->DB->sql_get_version(); + + //----------------------------------------- + // Upgrade history? + //----------------------------------------- + + $latest_version = array( 'upgrade_version_id' => NULL ); + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'upgrade_history', 'order' => 'upgrade_version_id DESC', 'limit' => array(1) ) ); + $this->ipsclass->DB->simple_exec(); + + while( $r = $this->ipsclass->DB->fetch_row() ) + { + $latest_version = $r; + } + + //----------------------------------------- + // Resetting security image? + //----------------------------------------- + + if ( isset($this->ipsclass->input['reset_security_flag']) AND $this->ipsclass->input['reset_security_flag'] == 1 AND $this->ipsclass->input['new_build'] ) + { + $new_build = intval( $this->ipsclass->input['new_build'] ); + $new_reason = trim( substr( $this->ipsclass->input['new_reason'], 0, 1 ) ); + $new_version = $latest_version['upgrade_version_id'].'.'.$new_build.'.'.$new_reason; + + $this->ipsclass->DB->do_update( 'upgrade_history', array( 'upgrade_notes' => $new_version ), 'upgrade_version_id='.$latest_version['upgrade_version_id'] ); + + $latest_version['upgrade_notes'] = $new_version; + } + + //----------------------------------------- + // Got real version number? + //----------------------------------------- + + $this->ipsclass->version = 'v'.$latest_version['upgrade_version_human']; + $this->ipsclass->vn_full = ( isset($latest_version['upgrade_notes']) AND $latest_version['upgrade_notes'] ) ? $latest_version['upgrade_notes'] : $this->ipsclass->vn_full; + + //----------------------------------------- + // Licensed? + //----------------------------------------- + + $urls['keiths_bits'] = IPS_BULLETINS_URL . '?v=' . $this->ipsclass->vn_full; + + //----------------------------------------- + // Notepad + //----------------------------------------- + + if ( isset($this->ipsclass->input['save']) AND $this->ipsclass->input['save'] == 1 ) + { + $this->ipsclass->update_cache( array( 'value' => $this->ipsclass->txt_stripslashes($_POST['notes']), 'name' => 'adminnotes', 'donow' => 1, 'deletefirst' => 0, 'array' => 0 ) ); + } + + $text = "You can use this section to keep notes for yourself and other admins, etc."; + + $this->ipsclass->init_load_cache( array( 'adminnotes', 'skinpanic' ) ); + + if ( !isset($this->ipsclass->cache['adminnotes']) OR !$this->ipsclass->cache['adminnotes'] ) + { + $this->ipsclass->update_cache( array( 'value' => $text, 'name' => 'adminnotes', 'donow' => 1, 'deletefirst' => 0, 'array' => 0 ) ); + + $this->ipsclass->cache['adminnotes'] = $text; + } + + $this->ipsclass->cache['adminnotes'] = htmlspecialchars($this->ipsclass->cache['adminnotes'], ENT_QUOTES); + $this->ipsclass->cache['adminnotes'] = str_replace( "&#", "&#", $this->ipsclass->cache['adminnotes'] ); + + $content['ad_notes'] = $this->html->acp_notes( $this->ipsclass->cache['adminnotes'] ); + + //----------------------------------------- + // ADMINS USING CP + //----------------------------------------- + + $t_time = time() - 60*10; + $time_now = time(); + $seen_name = array(); + $acponline = ""; + + $this->ipsclass->DB->build_query( array( 'select' => 's.session_member_name, s.session_member_id, s.session_location, s.session_log_in_time, s.session_running_time, s.session_ip_address', + 'from' => array( 'admin_sessions' => 's' ), + 'add_join' => array( 0 => array( 'select' => 'm.*', + 'from' => array( 'members' => 'm' ), + 'where' => "m.id=s.session_member_id", + 'type' => 'left' ), + 1 => array( 'select' => 'pp.*', + 'from' => array( 'profile_portal' => 'pp' ), + 'where' => 'pp.pp_member_id=m.id', + 'type' => 'left' ) ) ) ); + + $this->ipsclass->DB->exec_query(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + if ( isset($seen_name[ $r['session_member_name'] ]) AND $seen_name[ $r['session_member_name'] ] == 1 ) + { + continue; + } + else + { + $seen_name[ $r['session_member_name'] ] = 1; + } + + $r['_log_in'] = $time_now - $r['session_log_in_time']; + $r['_click'] = $time_now - $r['session_running_time']; + + if ( ($r['_log_in'] / 60) < 1 ) + { + $r['_log_in'] = sprintf("%0d", $r['_log_in']) . " seconds ago"; + } + else + { + $r['_log_in'] = sprintf("%0d", ($r['_log_in'] / 60) ) . " minutes ago"; + } + + if ( ($r['_click'] / 60) < 1 ) + { + $r['_click'] = sprintf("%0d", $r['_click']) . " seconds ago"; + } + else + { + $r['_click'] = sprintf("%0d", ($r['_click'] / 60) ) . " minutes ago"; + } + + $r['session_location'] = ( $r['session_location'] == ',' ) ? 'dashboard,' : $r['session_location']; + + $sessionbits = explode( ",", $r['session_location'] ); + + $r['session_location'] = $r['session_location'] ? "{$r['session_location']}" : 'Index'; + + $acponline .= $this->html->acp_onlineadmin_row( $this->ipsclass->member_set_information( $r ) ); + } + + $content['acp_online'] = $this->html->acp_onlineadmin_wrapper( $acponline ); + + //----------------------------------------- + // Stats + //----------------------------------------- + + $reg = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'COUNT(*) as reg' , + 'from' => array( 'validating' => 'v' ), + 'where' => 'v.lost_pass <> 1 AND m.mgroup=' . $this->ipsclass->vars['auth_group'], + 'add_join' => array( + array( 'from' => array( 'members' => 'm' ), + 'where' => 'm.id=v.member_id', + 'type' => 'left' + ) + ) + ) ); + + if( $this->ipsclass->vars['ipb_bruteforce_attempts'] ) + { + $lock = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'COUNT(*) as mems' , 'from' => 'members', 'where' => 'failed_login_count >= ' . $this->ipsclass->vars['ipb_bruteforce_attempts'] ) ); + } + + $coppa = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'COUNT(*) as coppa', 'from' => 'validating', 'where' => 'coppa_user=1' ) ); + + $my_timestamp = time() - $this->ipsclass->vars['au_cutoff'] * 60; + + $online = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'COUNT(*) as sessions', 'from' => 'sessions', 'where' => 'running_time>' . $my_timestamp ) ); + + $pending = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'SUM(queued_topics) as topics, SUM(queued_posts) as posts', 'from' => 'forums' ) ); + + $content['stats'] = $this->html->acp_stats_wrapper( array( 'topics' => intval($this->ipsclass->cache['stats']['total_topics']), + 'replies' => intval($this->ipsclass->cache['stats']['total_replies']), + 'topics_mod' => intval($pending['topics']), + 'posts_mod' => intval($pending['posts']), + 'members' => intval($this->ipsclass->cache['stats']['mem_count']), + 'validate' => intval( $reg['reg'] ), + 'locked' => intval( $lock['mems'] ), + 'coppa' => intval( $coppa['coppa'] ), + 'sql_driver' => strtoupper(SQL_DRIVER), + 'sql_version' => $this->ipsclass->DB->true_version, + 'php_version' => phpversion(), + 'sessions' => intval($online['sessions']), + 'php_sapi' => @php_sapi_name(), + 'ipb_version' => $this->ipsclass->version, + 'ipb_id' => $this->ipsclass->vn_full ) ); + + //----------------------------------------- + // Members awaiting admin validation? + //----------------------------------------- + + if( $this->ipsclass->vars['reg_auth_type'] == 'admin_user' OR $this->ipsclass->vars['reg_auth_type'] == 'admin' ) + { + $where_extra = $this->ipsclass->vars['reg_auth_type'] == 'admin_user' ? ' AND user_verified=1' : ''; + + $admin_reg = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as reg' , 'from' => 'validating', 'where' => 'new_reg=1' . $where_extra ) ); + + if( $admin_reg['reg'] > 0 ) + { + // We have some member's awaiting admin validation + $data = null; + + $this->ipsclass->DB->build_query( array( 'select' => 'v.*', + 'from' => array( 'validating' => 'v' ), + 'where' => 'new_reg=1' . $where_extra, + 'limit' => array( 3 ), + 'add_join' => array( + array( 'type' => 'left', + 'select' => 'm.members_display_name, m.email, m.ip_address', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.id=v.member_id' + ) + ) + ) ); + $this->ipsclass->DB->exec_query(); + + while( $r = $this->ipsclass->DB->fetch_row() ) + { + if ($r['coppa_user'] == 1) + { + $r['_coppa'] = ' ( COPPA )'; + } + else + { + $r['_coppa'] = ""; + } + + $r['_entry'] = $this->ipsclass->get_date( $r['entry_date'], 'TINY' ); + + $data .= $this->html->acp_validating_block( $r ); + + + } + + $content['validating'] = $this->html->acp_validating_wrapper( $data ); + } + } + + //----------------------------------------- + // Forum and group dropdowns + //----------------------------------------- + $this->ipsclass->forums->forums_init(); + + $forums = $this->ipsclass->forums->forums_forum_jump( 1 ); + + $groups = array(); + $groups_html = ''; + + foreach( $this->ipsclass->cache['group_cache'] as $k => $v ) + { + $groups[ $v['g_title'] ] = ""; + } + + ksort( $groups ); + + $groups_html = implode( "\n", $groups ); + + //----------------------------------------- + // Piece it together + //----------------------------------------- + + $urls['version_check'] = IPS_VERSION_CHECK_URL . '?' . base64_encode( $this->ipsclass->vn_full.'|^|'.$this->ipsclass->vars['board_url'] ); + + $this->ipsclass->html .= $this->html->acp_main_template( $content, $forums, $groups_html, $urls ); + + //----------------------------------------- + // Trashed skin? + //----------------------------------------- + + if ( isset($this->ipsclass->cache['skinpanic']) AND $this->ipsclass->cache['skinpanic'] == 'rebuildemergency' ) + { + $skinpanic = $this->html->warning_box( "Warning: A skin error occured", $this->html->warning_rebuild_emergency() ) . "
    "; + + $this->ipsclass->html = str_replace( '', $skinpanic, $this->ipsclass->html ); + } + + if ( isset($this->ipsclass->cache['skinpanic']) AND $this->ipsclass->cache['skinpanic'] == 'rebuildupgrade' ) + { + $skinupgrade = $this->html->warning_box( "An upgrade has been performed", $this->html->warning_rebuild_upgrade() ) . "
    "; + + $this->ipsclass->html = str_replace( '', $skinupgrade, $this->ipsclass->html ); + } + + //----------------------------------------- + // IN DEV stuff... + //----------------------------------------- + + if ( IN_DEV ) + { + $last_update = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', + 'from' => 'cache_store', + 'where' => "cs_key='in_dev_setting_update'" ) ); + + if ( ! $last_update['cs_value'] ) + { + $this->ipsclass->DB->do_delete( 'cache_store', "cs_key='in_dev_setting_update'" ); + $this->ipsclass->DB->do_insert( 'cache_store', array( 'cs_value' => time(), 'cs_key' => "in_dev_setting_update" ) ); + $last_update = time(); + } + + $last_settings_save = intval( @filemtime( ROOT_PATH . 'resources/settings.xml' ) ); + + if ( $last_settings_save > $last_update['cs_value'] ) + { + $_mtime = $this->ipsclass->get_date( $last_settings_save , 'JOINED' ); + $_dbtime = $this->ipsclass->get_date( $last_update['cs_value'], 'JOINED' ); + + $_html = $this->ipsclass->skin_acp_global->warning_box( "settings.xml File Updated", + "The 'resources/settings.xml' file has been updated. Please visit this page to re-import it to make sure your settings are up-to-date +
    Last modified time for 'settings.xml': $_mtime. +
    Last import run: $_dbtime" ) . "
    "; + + $this->ipsclass->html = str_replace( '', $_html, $this->ipsclass->html ); + } + + if ( @file_exists( ROOT_PATH . '_dev_notes.txt' ) ) + { + $_notes = @file_get_contents( ROOT_PATH . '_dev_notes.txt' ); + + if ( $_notes ) + { + $_html = $this->ipsclass->skin_acp_global->information_box( "Developers' Notes", nl2br($_notes) ) . "
    "; + $this->ipsclass->html = str_replace( '', $_html, $this->ipsclass->html ); + } + } + } + + //----------------------------------------- + // INSTALLER PRESENT? + //----------------------------------------- + + if ( $sm_install == 1 ) + { + if ( $lock_file != 1 ) + { + $installer = $this->html->warning_box( "Unlocked Installer", $this->html->warning_unlocked_installer() ) . "
    "; + + $this->ipsclass->html = str_replace( '', $installer, $this->ipsclass->html ); + } + else + { + $installer = $this->html->warning_box( "Installer Present", $this->html->warning_installer() ) . "
    "; + + $this->ipsclass->html = str_replace( '', $installer, $this->ipsclass->html ); + } + } + else if( $converter ) + { + $installer = $this->html->warning_box( "Converter Present", $this->html->warning_converter() ) . "
    "; + + $this->ipsclass->html = str_replace( '', $installer, $this->ipsclass->html ); + } + + //----------------------------------------- + // UNFINISHED UPGRADE? + //----------------------------------------- + + if ( $unfinished_upgrade == 1 ) + { + $upgrade = $this->html->warning_box( "Unfinished Upgrade", $this->html->warning_upgrade() ) . "
    "; + + $this->ipsclass->html = str_replace( '', $upgrade, $this->ipsclass->html ); + } + + //----------------------------------------- + // INSUFFICIENT PHP VERSION? + //----------------------------------------- + + if ( PHP_VERSION < '4.3.0' ) + { + $version = $this->html->warning_box( "Your PHP Version (" . PHP_VERSION . ") is insufficient", + $this->html->acp_php_version_warning() ) . "
    "; + + $this->ipsclass->html = str_replace( '', $version, $this->ipsclass->html ); + } + + //----------------------------------------- + // FULLTEXT NOT ENABLED? + //----------------------------------------- + + if ( $fulltext_a OR $fulltext_b ) + { + $hide = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'conf_value', 'from' => 'conf_settings', 'where' => "conf_key='hide_ftext_note'" ) ); + + if( !$hide['conf_value'] ) + { + $fulltext = $this->html->warning_box( "Not Using Full Text", $this->html->acp_ftext_warning( $fulltext_a, $fulltext_b ) ) . "
    "; + + $this->ipsclass->html = str_replace( '', $fulltext, $this->ipsclass->html ); + } + } + + //----------------------------------------- + // BOARD OFFLINE? + //----------------------------------------- + + if ( $this->ipsclass->vars['board_offline'] ) + { + $offline = $this->html->warning_box( "Board Offline", "Your board is currently offline

    » Turn Board Online" ) . "
    "; + + $this->ipsclass->html = str_replace( '', $offline, $this->ipsclass->html ); + } + + //----------------------------------------- + // ROOT ADMIN? + //----------------------------------------- + // X - All admins can see normal logs, no point in limiting this to root admin only + //if ( $this->ipsclass->member['mgroup'] == $this->ipsclass->vars['admin_group'] ) + //{ + //----------------------------------------- + // Last 5 log in attempts + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => '*', + 'from' => 'admin_login_logs', + 'order' => 'admin_time DESC', + 'limit' => array( 0, 5 ) ) ); + + $this->ipsclass->DB->exec_query(); + + while ( $rowb = $this->ipsclass->DB->fetch_row() ) + { + $rowb['_admin_time'] = $this->ipsclass->admin->get_date( $rowb['admin_time'] ); + $rowb['_admin_img'] = $rowb['admin_success'] ? 'aff_tick.png' : 'aff_cross.png'; + + $logins .= $this->html->acp_last_logins_row( $rowb ); + } + + $this->ipsclass->html = str_replace( '', $this->html->acp_last_logins_wrapper( $logins ), $this->ipsclass->html ); + //} + + $this->ipsclass->admin->output(); + } + +} + + ?> \ No newline at end of file diff --git a/upload/sources/action_admin/diagnostics.php b/upload/sources/action_admin/diagnostics.php index 60d23c55..7a8ec68d 100644 --- a/upload/sources/action_admin/diagnostics.php +++ b/upload/sources/action_admin/diagnostics.php @@ -2,22 +2,14 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +--------------------------------------------------------------------------- | > $Date: 2006-03-23 07:34:25 -0500 (Thu, 23 Mar 2006) $ | > $Revision: 177 $ @@ -34,7 +26,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Неверный вход

    У вас нет доступа к этому файлу. Если проводилось обновление, убедитесь, что не забыли обновить файл admin.php."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -43,40 +35,40 @@ class ad_diagnostics { var $base_url; var $dir_split = "/"; - + /** * Section title name * * @var string */ var $perm_main = "help"; - + /** * Section title name * * @var string */ var $perm_child = "diag"; - + function auto_run() { //----------------------------------------- // Load skin //----------------------------------------- - + $this->html = $this->ipsclass->acp_load_template( 'cp_skin_diagnostics' ); - + //----------------------------------------- // Set default nav //----------------------------------------- - - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Диагностика' ); - + + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Diagnostics' ); + if ( strtoupper( substr(PHP_OS, 0, 3) ) === 'WIN' ) { $this->dir_split = "\\"; } - + //----------------------------------------- switch($this->ipsclass->input['code']) @@ -85,27 +77,27 @@ class ad_diagnostics $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':do' ); $this->db_index_check(); break; - + case 'dbchecker': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':do' ); $this->db_check(); - break; - + break; + case 'whitespace': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':do' ); $this->whitespace_check(); break; - + case 'filepermissions': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':do' ); $this->permissions_check(); break; - + case 'fileversions': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':do' ); $this->version_check(); break; - + //----------------------------------------- default: $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':do' ); @@ -113,83 +105,83 @@ class ad_diagnostics break; } } - + /*-------------------------------------------------------------------------*/ // Version Check /*-------------------------------------------------------------------------*/ - + function version_check() { - $this->ipsclass->admin->page_detail = "Запуск файлов разных версий программного обеспечения может привести к весьма неожиданным результатам.
    Например, файлы версии 2.1 не совместимы с файлами более ранних версий. Если напротив какого-либо файла вы увидите красную пометку, рекомендуется заменить этот файл на более новый."; - $this->ipsclass->admin->page_title = "Диагностика IPB"; - - $this->ipsclass->admin->nav[] = array( '', 'Результат проверки совместимости версий файлов' ); + $this->ipsclass->admin->page_detail = "Running different version files can produce unexpected results. For example, a version 2.1 file is not compatible with a verison 2.0 file. If any files are listed below in red, it is recommended you upload fresh copies of those files."; + $this->ipsclass->admin->page_title = "IPB Diagnostics"; + + $this->ipsclass->admin->nav[] = array( '', 'Version Check Results' ); set_time_limit(0); - + $dir = preg_replace( "#^(.+?)\/$#", "\\1", ROOT_PATH ); - + $file_versions = array(); $upgrade_history = array(); $latest_version = array( 'upgrade_version_id' => '' ); $file_versions = $this->version_recur_dir( $dir ); - + $this->ipsclass->adskin->td_header[] = array( "" , "30%" ); $this->ipsclass->adskin->td_header[] = array( "" , "70%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Информация о версии" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Version Information" ); + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'upgrade_history', 'order' => 'upgrade_version_id DESC', 'limit' => array(0, 5) ) ); $this->ipsclass->DB->simple_exec(); - + while( $r = $this->ipsclass->DB->fetch_row() ) { if ( $r['upgrade_version_id'] > $latest_version['upgrade_version_id'] ) { $latest_version = $r; } - + $upgrade_history[] = $r; } - + //----------------------------------------- // Got real version number? //----------------------------------------- - + if ( $this->ipsclass->version == 'v<{%dyn.down.var.human.version%}>' ) { $this->ipsclass->version = 'v'.$latest_version['upgrade_version_human']; } - + if ( $this->ipsclass->acpversion == '<{%dyn.down.var.long_version_id%}>' ) { $this->ipsclass->acpversion = $latest_version['upgrade_version_id']; } - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Версия IPB", $this->ipsclass->version.' (ID: '.$this->ipsclass->acpversion.')' ) ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "IPB Version", $this->ipsclass->version.' (ID: '.$this->ipsclass->acpversion.')' ) ); + if( !count($upgrade_history) ) { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "История обновлений", 'Не доступно' ) ); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Upgrade History", 'None Available' ) ); } else { foreach( $upgrade_history as $history_row ) { $history_row['_date'] = $this->ipsclass->get_date( $history_row['upgrade_date'], 'SHORT' ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Обновление {$history_row['_date']}", "{$history_row['upgrade_version_human']} ({$history_row['upgrade_version_id']})" ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Upgrade {$history_row['_date']}", "{$history_row['upgrade_version_human']} ({$history_row['upgrade_version_id']})" ) ); } } - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - $this->ipsclass->adskin->td_header[] = array( "Файл" , "70%" ); - $this->ipsclass->adskin->td_header[] = array( "Версия" , "30%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Результат проверки совместимости версий файлов" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + $this->ipsclass->adskin->td_header[] = array( "File" , "70%" ); + $this->ipsclass->adskin->td_header[] = array( "Version" , "30%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Version Check Results" ); + if( is_array($file_versions) && count($file_versions) ) - { + { foreach( $file_versions as $file => $version ) { if( 'v'.$version == $this->ipsclass->version ) @@ -200,46 +192,46 @@ class ad_diagnostics { $version = "{$version}"; } - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $file, $version ) ); } } else { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Невозможно произвести чтение файлов." ) ); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( " There was a processing error - we could not read the files" ) ); } - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // Version check, recursive /*-------------------------------------------------------------------------*/ - + function version_recur_dir($dir) { $skip_dirs = array( 'jscripts', 'cache', 'ssi_templates', 'style_avatars', 'style_emoticons', 'style_images', 'upgrade', 'uploads', 'images', 'i18n', 'PEAR', 'components_acp', 'components_init', 'components_location', 'components_ucp', 'components_public' ); $skip_files = array( 'conf_global.php', 'conf.php', $this->ipsclass->vars['sql_driver'].'_fulltext.php', $this->ipsclass->vars['sql_driver'].'_tables.php', $this->ipsclass->vars['sql_driver'].'_inserts.php', $this->ipsclass->vars['sql_driver'].'_install.php' ); - + $files = array(); $dh = @opendir($dir); - + while (false !== ($file = readdir($dh))) { if ( preg_match( "#^[_\.]#", $file ) ) { continue; } - + if ( $file != '.' && $file != '..' ) { $newpath = $dir.$this->dir_split.$file; $level = explode( $this->dir_split, $newpath ); - + if ( is_dir($newpath) && !in_array( $file, $skip_dirs ) && ($newpath.'../' != 'modules') ) { $files = array_merge( $files, $this->version_recur_dir($newpath) ); @@ -251,28 +243,28 @@ class ad_diagnostics $file = file_get_contents($newpath); preg_match( "#Invision Power Board v(.+?)\s+?#i", $file, $matches); - + $files[$newpath] = isset($matches[1]) ? $matches[1] : ''; } } } } - + closedir($dh); return $files; } - + /*-------------------------------------------------------------------------*/ // Permission Checks /*-------------------------------------------------------------------------*/ - + function permissions_check() { - $this->ipsclass->admin->page_detail = "Определенные файлы и директории должны иметь надлежащие атрибуты доступа для корректной работы IPB.
    На операционных системах Windows с файловой системой NTFS файлы должны иметь атрибуты «Чтение/Запись», в то время как на Unix/Linux — «CHMOD 0777»."; - $this->ipsclass->admin->page_title = "Диагностика IPB"; - - $this->ipsclass->admin->nav[] = array( '', 'Результат проверки атрибутов доступа к файлам' ); - + $this->ipsclass->admin->page_detail = "Certain files and directories must have the proper permissions set on them in order for IPB to properly write data to your disk. On Windows, you should ensure the files have \"Read/Write\" permissions, while on Unix/Linux you should ensure the files are \"CHMOD 777\"."; + $this->ipsclass->admin->page_title = "IPB Diagnostics"; + + $this->ipsclass->admin->nav[] = array( '', 'Permission Check Results' ); + $checkdirs = array( 'style_images', 'style_emoticons', 'cache', 'cache'.$this->dir_split.'skin_cache', 'cache'.$this->dir_split.'lang_cache', 'uploads' ); $langfiles = array( 'lang_boards', 'lang_buddy', 'lang_calendar', 'lang_emails', 'lang_email_content', 'lang_error', 'lang_forum', 'lang_global', 'lang_help', 'lang_legends', 'lang_login', 'lang_mlist', @@ -283,19 +275,19 @@ class ad_diagnostics ); $root_dir = preg_replace( "#^(.+?)\/$#", "\\1".$this->dir_split, ROOT_PATH ); - - //----------------------------------------- + + //----------------------------------------- // Get language directories //----------------------------------------- - + $this->ipsclass->init_load_cache( array( 'languages' ) ); - + if( is_array( $this->ipsclass->cache['languages'] ) && count( $this->ipsclass->cache['languages'] ) ) { foreach( $this->ipsclass->cache['languages'] as $v ) { $checkdirs[] = 'cache'.$this->dir_split.'lang_cache'.$this->dir_split.$v['ldir']; - + foreach( $langfiles as $filename ) { $checkdirs[] = 'cache'.$this->dir_split.'lang_cache'.$this->dir_split.$v['ldir'].$this->dir_split.$filename.'.php'; @@ -306,22 +298,22 @@ class ad_diagnostics { $this->ipsclass->DB->build_query( array( 'select' => 'ldir', 'from' => 'languages' ) ); $this->ipsclass->DB->exec_query(); - + while( $v = $this->ipsclass->DB->fetch_row() ) { $checkdirs[] = 'cache'.$this->dir_split.'lang_cache'.$this->dir_split.$v['ldir']; - + foreach( $langfiles as $filename ) { $checkdirs[] = 'cache'.$this->dir_split.'lang_cache'.$this->dir_split.$v['ldir'].$this->dir_split.$filename.'.php'; - } + } } } - - //----------------------------------------- + + //----------------------------------------- // Get emoticon directories //----------------------------------------- - + if( is_array( $this->ipsclass->cache['emoticons'] ) && count( $this->ipsclass->cache['emoticons'] ) ) { foreach( $this->ipsclass->cache['emoticons'] as $v ) @@ -333,19 +325,19 @@ class ad_diagnostics { $this->ipsclass->DB->build_query( array( 'select' => 'emo_set', 'from' => 'emoticons' ) ); $this->ipsclass->DB->exec_query(); - + while( $v = $this->ipsclass->DB->fetch_row() ) { $checkdirs[] = 'style_emoticons'.$this->dir_split.$v['emo_set']; } } - - //----------------------------------------- + + //----------------------------------------- // Get skin directories //----------------------------------------- - + $skin_dirs = array(); - + if( is_array( $this->ipsclass->cache['skin_id_cache'] ) && count( $this->ipsclass->cache['skin_id_cache'] ) ) { foreach( $this->ipsclass->cache['skin_id_cache'] as $k => $v ) @@ -354,7 +346,7 @@ class ad_diagnostics { continue; } - + $checkdirs[] = 'cache'.$this->dir_split.'skin_cache'.$this->dir_split.'cacheid_'.$v['set_skin_set_id']; $skin_dirs[] = $v['set_skin_set_id']; } @@ -363,23 +355,23 @@ class ad_diagnostics { $this->ipsclass->DB->build_query( array( 'select' => 'set_skin_set_id', 'from' => 'skin_sets' ) ); $this->ipsclass->DB->exec_query(); - + while( $v = $this->ipsclass->DB->fetch_row() ) { $checkdirs[] = 'cache'.$this->dir_split.'skin_cache'.$this->dir_split.'cacheid_'.$v['set_skin_set_id ']; $skin_dirs[] = $v['set_skin_set_id']; } } - - //----------------------------------------- + + //----------------------------------------- // Get skin files //----------------------------------------- - + $this->ipsclass->DB->load_cache_file( ROOT_PATH.'sources/sql/'.SQL_DRIVER.'_extra_queries.php', 'sql_extra_queries' ); - + $this->ipsclass->DB->cache_add_query( 'diag_distinct_skins', array(), 'sql_extra_queries' ); $this->ipsclass->DB->cache_exec_query(); - + while( $v = $this->ipsclass->DB->fetch_row() ) { foreach( $skin_dirs as $dir ) @@ -387,32 +379,39 @@ class ad_diagnostics $checkdirs[] = 'cache'.$this->dir_split.'skin_cache'.$this->dir_split.'cacheid_'.$dir.$this->dir_split.$v['group_name'].'.php'; } } - + set_time_limit(0); - + $checkdirs = array_unique($checkdirs); $output = array(); - + foreach( $checkdirs as $dir_to_check ) { if( !file_exists( $root_dir.$dir_to_check ) ) { - $output[] = "Невозможно найти файл или директорию ".$root_dir.$dir_to_check.""; + # Could be skin files from custom skins for components they don't own + # or they could be using safe_mode skins + # Make sure skin_cache still shows up though... + + if( !strpos( $dir_to_check, 'skin_' ) OR !strpos( $dir_to_check, '.php' ) ) + { + $output[] = "We could not find the file or folder ".$root_dir.$dir_to_check.""; + } } else if( !is_writeable( $root_dir.$dir_to_check ) ) { - $output[] = "Директория или файл ".$root_dir.$dir_to_check." недоступны для записи"; + $output[] = "The following file or folder is not writeable ".$root_dir.$dir_to_check.""; } else if( is_writeable( $root_dir.$dir_to_check ) ) { - $output[] = "".$root_dir.$dir_to_check." доступен для записи"; + $output[] = "".$root_dir.$dir_to_check." is writeable"; } } - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Результат проверки атрибутов доступа к файлам" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Permissions Check Results" ); + if( is_array($output) && count($output) ) - { + { foreach( $output as $html_row ) { $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $html_row ) ); @@ -420,53 +419,53 @@ class ad_diagnostics } else { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "К сожалению, невозможно найти некоторые файлы или директории." ) ); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "We did not find any files or folders to check. Oooops." ) ); } - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); } - - + + /*-------------------------------------------------------------------------*/ // WHITE SPACE CHECK /*-------------------------------------------------------------------------*/ - + function whitespace_check() { - $this->ipsclass->admin->page_detail = "Если в файлах, которые используются форумом, перед конструкцией имеются пробелы или переносы строк, то это может привести к некорректной работе форума.
    Если в результате проверки такие файлы будут найдены, то вам необходимо открыть указанные файлы и удалить все символы до ."; - $this->ipsclass->admin->page_title = "Диагностика IPB"; - - $this->ipsclass->admin->nav[] = array( '', 'Результаты проверки на лишние пробелы и переносы строк' ); - + $this->ipsclass->admin->page_detail = "If there is any whitespace before or after the php tags in files used by IPB, it can result in blank pages or malformed html. If any results are returned you should open those files and delete the extra spaces or line breaks at the beginning and/or end of the file."; + $this->ipsclass->admin->page_title = "IPB Diagnostics"; + + $this->ipsclass->admin->nav[] = array( '', 'Whitespace Check Results' ); + set_time_limit(0); - + $dir = preg_replace( "#^(.+?)\/$#", "\\1", ROOT_PATH ); - + $files_with_junk = array(); $files_with_junk = $this->recur_dir( $dir ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Результаты проверки на лишние пробелы и переносы строк" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Whitespace Check Results" ); + if( is_array($files_with_junk) && count($files_with_junk) ) - { + { foreach( $files_with_junk as $html_row ) { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $html_row." имеет лишние пробелы или переносы строк в начале или конце файла." ) ); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $html_row." has whitespace at the beginning or end of the file" ) ); } } else { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Все файлы системы находятся в нормальном состоянии." ) ); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( " All files appear to be in good order" ) ); } - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); } - - + + function recur_dir($dir) { $skip_dirs = array( 'uploads', 'style_images', 'gallery_setup', 'blog_setup', 'style_emoticons', 'style_avatars', @@ -474,19 +473,19 @@ class ad_diagnostics $files = array(); $dh = @opendir($dir); - + while (false !== ($file = readdir($dh))) { if ( preg_match( "#^[_\.]#", $file ) ) { continue; } - + if ( $file != '.' && $file != '..' ) { $newpath = $dir.$this->dir_split.$file; $level = explode( $this->dir_split, $newpath ); - + if ( is_dir($newpath) && !in_array( $file, $skip_dirs ) ) { $files = array_merge( $files, $this->recur_dir($newpath) ); @@ -498,11 +497,11 @@ class ad_diagnostics $file = file_get_contents($newpath); $current_length = strlen($file); - + $file = trim($file); - + $actual_length = strlen($file); - + if ( $current_length != $actual_length ) { $files[] = $newpath; @@ -511,204 +510,414 @@ class ad_diagnostics } } } - + closedir($dh); return $files; } - + /*-------------------------------------------------------------------------*/ // CHECK DB INDEXES /*-------------------------------------------------------------------------*/ - + function db_index_check() { - $this->ipsclass->admin->page_detail = "Индексы базы данных позволяют вашему форуму работать более эффективно.
    В случае, если какой-либо индекс отсутствует, ваш форум может работать медленнее. Этот инструмент проверит все индексы и в случае необходимости поможет вам исправить ошибки."; - $this->ipsclass->admin->page_title = "Диагностика IPB"; - - $this->ipsclass->admin->nav[] = array( '', 'Результат проверки индексов БД' ); - + $this->ipsclass->admin->page_detail = "Database indexes help your database engine work more efficiently with the data it hosts. If any of the indexes are missing, it can cause your site to run slower than it should. Please use the appropriate links or queries to fix any indexes reported missing below."; + $this->ipsclass->admin->page_title = "IPB Diagnostics"; + + $this->ipsclass->admin->nav[] = array( '', 'Database Index Results' ); + + //----------------------------------------- + // Fixing something? //----------------------------------------- + + $queries_to_run = array(); + + foreach( $this->ipsclass->input as $k => $v ) + { + if( preg_match( "/^query(\d+)$/", $k, $matches ) ) + { + $queries_to_run[] = $v; + } + } + + if( isset($this->ipsclass->input['query']) AND $this->ipsclass->input['query'] ) + { + $queries_to_run[] = $this->ipsclass->input['query']; + } + + if( count($queries_to_run) > 0 ) + { + foreach( $queries_to_run as $the_query ) + { + $sql = trim( urldecode( base64_decode($the_query) ) ); + + if ( preg_match( "/^(DROP|FLUSH)/i", trim($sql) ) ) + { + $this->ipsclass->main_msg = "Sorry, those queries are not allowed for your safety"; + + continue; + } + else if ( preg_match( "/^(?!SELECT)/i", preg_replace( "#\s{1,}#s", "", $sql ) ) and preg_match( "/admin_login_logs/i", preg_replace( "#\s{1,}#s", "", $sql ) ) ) + { + $this->ipsclass->main_msg = "Sorry, those queries are not allowed for your safety. Please use the 'Fix Manually' option for this query."; + + continue; + } + else + { + $this->ipsclass->DB->return_die = 1; + + $this->ipsclass->DB->query($sql,1); + + if( $this->ipsclass->DB->error != "" ) + { + $this->ipsclass->main_msg .= "SQL Error
    {$this->ipsclass->DB->error}
    "; + } + else + { + $this->ipsclass->main_msg .= "Query: ".htmlspecialchars($sql)."
    Executed Successfully
    "; + } + + $this->ipsclass->DB->error = ""; + $this->ipsclass->DB->failed = 0; + } + } + } + + //----------------------------------------- // Get current table definitions //----------------------------------------- - + if( !file_exists( ROOT_PATH."/install/sql/{$this->ipsclass->vars['sql_driver']}_tables.php" ) ) { - $this->ipsclass->admin->error( "Вы должны загрузить файл /install/sql/{$this->ipsclass->vars['sql_driver']}_tables.php из дистрибутива IPB для запуска этого инструмента." ); + $this->ipsclass->admin->error( "You must upload /install/sql/{$this->ipsclass->vars['sql_driver']}_tables.php from the IPB installation package for your current version to run this tool" ); } - require ROOT_PATH."sources/action_admin/sql_{$this->ipsclass->vars['sql_driver']}.php"; - - $this->sql_driver = new ad_sql_module(); - $this->sql_driver->ipsclass =& $this->ipsclass; - + //require ROOT_PATH."sources/action_admin/sql_{$this->ipsclass->vars['sql_driver']}.php"; + require_once( KERNEL_PATH . 'db_lib/' . strtolower($this->ipsclass->vars['sql_driver']) . '_tools.php' ); + require_once( ROOT_PATH . 'install/sql/' . strtolower($this->ipsclass->vars['sql_driver']) . '_tables.php' ); + $db_tools = new db_tools( $this->ipsclass ); + $output = array(); - $output = $this->sql_driver->db_index_diag(); - - if( $this->sql_driver->db_has_issues ) + + if ( !$output = $db_tools->db_index_diag( $TABLE ) ) + { + $this->ipsclass->admin->error( "There was an error and we could not process your " . strtolower($this->ipsclass->vars['sql_driver']) . "_tables.php file." ); + } + + if( $output['error_count'] > 0 ) { $this->ipsclass->adskin->td_header[] = array( "{none}" , "50%" ); $this->ipsclass->adskin->td_header[] = array( "{none}" , "50%" ); - + $this->ipsclass->html .= $this->html->dbindexer_javascript(); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "ВНИМАНИЕ: НАЙДЕНЫ ОШИБКИ" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( array( "При проверке индексов базы данных были найдены ошибки. Пожалуйста, нажмите здесь для исправления этих ошибок.", 2 ) ) ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "WARNING: ERRORS FOUND" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( array( "There were errors found with indexes in your database. Please review them below, or click here to correct these errors.", 2 ) ) ); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); } else { $this->ipsclass->adskin->td_header[] = array( "{none}" , "50%" ); $this->ipsclass->adskin->td_header[] = array( "{none}" , "50%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ошибки не найдены" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( array( "При проверке индексов вашей базы данных ошибок не найдено.", 2 ) ) ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "No Errors Found" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( array( "There were no errors found with your database indexes.", 2 ) ) ); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - } - - $this->ipsclass->adskin->td_header[] = array( "Таблица" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Название индекса" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Исправление" , "60%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Результат проверки индексов БД" ); - - foreach( $output as $html_row ) + } + + $this->ipsclass->adskin->td_header[] = array( "Table" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Index Name" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Fix" , "60%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Database Index Results" ); + + $i = 0; + + foreach( $output['results'] as $data ) { - $this->ipsclass->html .= $html_row; + if( $data['status'] == 'error' ) + { + $popup_div = ""; + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "{$data['table']}", + "{$data['index']}
    {$data['message']}
    ", + "
    Fix Automatically   |   Fix Manually
    {$popup_div}
    " + ) ); + $i++; + } + else + { + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "{$data['table']}", + "{$data['index']}", + " " + ) ); + } } - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // DB TABLES /*-------------------------------------------------------------------------*/ - + function db_check() { - $this->ipsclass->admin->page_detail = "Данный инструмент проверит все таблицы и поля вашей базы данных.
    Это полезно в тех случаях, когда при просмотре IPB вы получаете ошибку SQL или же информацию о том, что некоторые необходимые файлы отсутствуют.
    Внимание! Инструмент осуществляет проверку только стандартных таблиц и полей. Это означает, что ошибки с неправильно установленными модификациями или модулями он не исправит."; - $this->ipsclass->admin->page_title = "Диагностика IPB"; - - $this->ipsclass->admin->nav[] = array( '', 'Результат проверки БД' ); - + $this->ipsclass->admin->page_detail = "If you are missing necessary database tables, or columns in those database tables, you will see database errors (or missing data) when browsing IPB. Please use the links or queries provided below to remedy any missing columns or tables."; + $this->ipsclass->admin->page_title = "IPB Diagnostics"; + + $this->ipsclass->admin->nav[] = array( '', 'Database Schema Results' ); + + //----------------------------------------- + // Fixing something? //----------------------------------------- + + $queries_to_run = array(); + + foreach( $this->ipsclass->input as $k => $v ) + { + if( preg_match( "/^query(\d+)$/", $k, $matches ) ) + { + $queries_to_run[] = $v; + } + } + + if( isset($this->ipsclass->input['query']) AND $this->ipsclass->input['query'] ) + { + $queries_to_run[] = $this->ipsclass->input['query']; + } + + if( count($queries_to_run) > 0 ) + { + foreach( $queries_to_run as $the_query ) + { + $sql = trim( urldecode( base64_decode($the_query) ) ); + + if ( preg_match( "/^(DROP|FLUSH)/i", trim($sql) ) ) + { + $this->ipsclass->main_msg = "Sorry, those queries are not allowed for your safety"; + + continue; + } + else if ( preg_match( "/^(?!SELECT)/i", preg_replace( "#\s{1,}#s", "", $sql ) ) and preg_match( "/admin_login_logs/i", preg_replace( "#\s{1,}#s", "", $sql ) ) ) + { + $this->ipsclass->main_msg = "Sorry, those queries are not allowed for your safety. Please use the 'Fix Manually' option for this query."; + + continue; + } + else + { + $this->ipsclass->DB->return_die = 1; + + $this->ipsclass->DB->query($sql,1); + + if( $this->ipsclass->DB->error != "" ) + { + $this->ipsclass->main_msg .= "SQL Error
    {$this->ipsclass->DB->error}
    "; + } + else + { + $this->ipsclass->main_msg .= "Query: ".htmlspecialchars($sql)."
    Executed Successfully
    "; + } + + $this->ipsclass->DB->error = ""; + $this->ipsclass->DB->failed = 0; + } + } + } + + //----------------------------------------- // Get current table definitions //----------------------------------------- - + if( !file_exists( ROOT_PATH."/install/sql/{$this->ipsclass->vars['sql_driver']}_tables.php" ) ) { - $this->ipsclass->admin->error( "Вы должны загрузить файл /install/sql/{$this->ipsclass->vars['sql_driver']}_tables.php из дистрибутива IPB для запуска этого инструмента." ); + $this->ipsclass->admin->error( "You must upload /install/sql/{$this->ipsclass->vars['sql_driver']}_tables.php from the IPB installation package for your current version to run this tool" ); } - require ROOT_PATH."sources/action_admin/sql_{$this->ipsclass->vars['sql_driver']}.php"; - - $this->sql_driver = new ad_sql_module(); - $this->sql_driver->ipsclass =& $this->ipsclass; - + //require ROOT_PATH."sources/action_admin/sql_{$this->ipsclass->vars['sql_driver']}.php"; + require_once( KERNEL_PATH . 'db_lib/' . strtolower($this->ipsclass->vars['sql_driver']) . '_tools.php' ); + require_once( ROOT_PATH . 'install/sql/' . strtolower($this->ipsclass->vars['sql_driver']) . '_tables.php' ); + $db_tools = new db_tools( $this->ipsclass ); + $output = array(); - $output = $this->sql_driver->db_table_diag(); - - if( $this->sql_driver->db_has_issues ) + + if ( !$output = $db_tools->db_table_diag( $TABLE ) ) + { + $this->ipsclass->admin->error( "There was an error and we could not process your " . strtolower($this->ipsclass->vars['sql_driver']) . "_tables.php file." ); + } + + if( $output['error_count'] > 0 ) { $this->ipsclass->adskin->td_header[] = array( "{none}" , "50%" ); $this->ipsclass->adskin->td_header[] = array( "{none}" , "50%" ); - + $this->ipsclass->html .= $this->html->dbchecker_javascript(); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "ВНИМАНИЕ: НАЙДЕНЫ ОШИБКИ" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( array( "При проверке таблиц и полей вашей базы данных были найдены ошибки. Пожалуйста, нажмите здесь для исправления этих ошибок.", 2 ) ) ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "WARNING: ERRORS FOUND" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( array( "There were errors found with your database. Please review them below, or click here to correct these errors.", 2 ) ) ); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); } else { $this->ipsclass->adskin->td_header[] = array( "{none}" , "50%" ); $this->ipsclass->adskin->td_header[] = array( "{none}" , "50%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ошибки не найдены" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( array( "При проверке таблиц и полей вашей базы данных ошибок не найдено.", 2 ) ) ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "No Errors Found" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( array( "There were no errors found with your database.", 2 ) ) ); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - } - - $this->ipsclass->adskin->td_header[] = array( "Таблица" , "30%" ); - $this->ipsclass->adskin->td_header[] = array( "Статус" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Исправление" , "50%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Результат проверки БД" ); - - foreach( $output as $html_row ) + } + + $this->ipsclass->adskin->td_header[] = array( "Table" , "30%" ); + $this->ipsclass->adskin->td_header[] = array( "Status" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Fix" , "50%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Database Table Results" ); + + $good_img = "YN"; + $bad_img = "YN"; + + $i = 0; + + foreach( $output['results'] as $data ) { - $this->ipsclass->html .= $html_row; + if( $data['status'] == 'error' ) + { + $popup_div = ""; + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "{$data['table']}", + "{$good_img}", + "
    Fix Automatically   |   Fix Manually
    {$popup_div}
    " + ) ); + $i++; + } + else + { + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "{$data['table']}", + "{$good_img}", + " " + ) ); + } } - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); - } - + } + /*-------------------------------------------------------------------------*/ // SHOW FUNCTIONS /*-------------------------------------------------------------------------*/ - + function list_functions() { - $this->ipsclass->admin->page_detail = "На этой странице вы можете провести диагностику системы.

    Помните, что работа этих инструментов — трудоемкий процесс, и для их выполнения требуется некоторое время."; - $this->ipsclass->admin->page_title = "Диагностика IPB"; + $this->ipsclass->admin->page_detail = "This page will give you a diagnostic overview of your system, pulling various data about the server and it's current status where permitted"; + $this->ipsclass->admin->page_title = "IPB Diagnostics"; + + //----------------------------------------- + // PHP INFO? + //----------------------------------------- + + if ( isset($this->ipsclass->input['phpinfo']) AND $this->ipsclass->input['phpinfo'] ) + { + @ob_start(); + phpinfo(); + $parsed = @ob_get_contents(); + @ob_end_clean(); + + preg_match( "#(.*)#is" , $parsed, $match1 ); + + $php_body = $match1[1]; + + # PREVENT WRAP: Most cookies + $php_body = str_replace( "; " , ";
    " , $php_body ); + # PREVENT WRAP: Very long string cookies + $php_body = str_replace( "%3B", "
    " , $php_body ); + # PREVENT WRAP: Serialized array string cookies + $php_body = str_replace( ";i:", ";
    i:" , $php_body ); + # PREVENT WRAP: LS_COLORS env + $php_body = str_replace( ":*.", "
    :*." , $php_body ); + # PREVENT WRAP: PATH env + $php_body = str_replace( "bin:/", "bin
    :/" , $php_body ); + # PREVENT WRAP: Cookie %2C split + $php_body = str_replace( "%2C", "%2C
    " , $php_body ); + #PREVENT WRAP: Cookie , split + $php_body = preg_replace( "#,(\d+),#", ",
    \\1," , $php_body ); + + + $php_style = "\n"; + + $this->ipsclass->html = $php_style . $php_body; + $this->ipsclass->admin->output(); + } - $this->ipsclass->DB->sql_get_version(); + $this->ipsclass->DB->sql_get_version(); $sql_version = strtoupper(SQL_DRIVER)." ".$this->ipsclass->DB->true_version; - - $php_version = phpversion()." (".@php_sapi_name().") ( PHP INFO )"; + + $php_version = phpversion()." (".@php_sapi_name().") ( PHP INFO )"; $server_software = php_uname(); - + $load_limit = "--"; $server_load_found = 0; - + //----------------------------------------- // Check cache first... //----------------------------------------- - + if( $this->ipsclass->cache['systemvars']['loadlimit'] ) { $loadinfo = explode( "-", $this->ipsclass->cache['systemvars']['loadlimit'] ); - + if ( intval($loadinfo[1]) > (time() - 10) ) { //----------------------------------------- - // Cache is less than 2 minutes old, use it + // Cache is less than 10 secs old, use it //----------------------------------------- - + $server_load_found = 1; - + $load_limit = $loadinfo[0]; } } - + //----------------------------------------- // No cache or it's old, check real time //----------------------------------------- - + if( !$server_load_found ) { # @ supressor fixes warning in >4.3.2 with open_basedir restrictions - + if ( @file_exists('/proc/loadavg') ) { if ( $fh = @fopen( '/proc/loadavg', 'r' ) ) { $data = @fread( $fh, 6 ); @fclose( $fh ); - + $load_avg = explode( " ", $data ); - + $load_limit = trim($load_avg[0]); } } @@ -723,16 +932,16 @@ class ad_diagnostics | | Can also be obtained from COM, but it's extremely slow... ---------------------------------------------------------------*/ - + $serverstats = @shell_exec("typeperf \"Processor(_Total)\% Processor Time\" -sc 1"); - + if( $serverstats ) { $server_reply = explode( "\n", str_replace( "\r", "", $serverstats ) ); $serverstats = array_slice( $server_reply, 2, 1 ); - + $statline = explode( ",", str_replace( '"', '', $serverstats[0] ) ); - + $load_limit = round( $statline[1], 4 ); } } @@ -741,39 +950,39 @@ class ad_diagnostics if ( $serverstats = @exec("uptime") ) { preg_match( "/(?:averages)?\: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/", $serverstats, $load ); - + $load_limit = $load[1]; } } - + if( $load_limit ) { $this->ipsclass->cache['systemvars']['loadlimit'] = $load_limit."-".time(); - + $this->ipsclass->update_cache( array( 'name' => 'systemvars', 'array' => 1, 'deletefirst' => 0 ) ); } } - + $total_memory = $avail_memory = "--"; if( strstr( strtolower(PHP_OS), 'win' ) ) { $mem = @shell_exec('systeminfo'); - + if( $mem ) { $server_reply = explode( "\n", str_replace( "\r", "", $mem ) ); - + if( count($server_reply) ) { foreach( $server_reply as $info ) { - if( strstr( $info, "Всего физической памяти" ) ) + if( strstr( $info, "Total Physical Memory" ) ) { $total_memory = trim( str_replace( ":", "", strrchr( $info, ":" ) ) ); } - - if( strstr( $info, "Доступно физической памяти" ) ) + + if( strstr( $info, "Available Physical Memory" ) ) { $avail_memory = trim( str_replace( ":", "", strrchr( $info, ":" ) ) ); } @@ -791,44 +1000,82 @@ class ad_diagnostics $total_memory = $mem[1].' MB'; $avail_memory = $mem[3].' MB'; } + + $disabled_functions = @ini_get('disable_functions') ? str_replace( ",", ", ", @ini_get('disable_functions') ) : "no information"; + + //----------------------------------------- + // Upgrade history? + //----------------------------------------- + + $upgrade_history = array(); + $latest_version = array( 'upgrade_version_id' => NULL ); + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'upgrade_history', 'order' => 'upgrade_version_id DESC', 'limit' => array(0, 5) ) ); + $this->ipsclass->DB->simple_exec(); + + while( $r = $this->ipsclass->DB->fetch_row() ) + { + if ( $r['upgrade_version_id'] > $latest_version['upgrade_version_id'] ) + { + $latest_version = $r; + } + + $upgrade_history[] = $r; + } + + //----------------------------------------- + // Got real version number? + //----------------------------------------- + + $this->ipsclass->version = 'v'.$latest_version['upgrade_version_human']; + $this->ipsclass->vn_full = ( isset($latest_version['upgrade_notes']) AND $latest_version['upgrade_notes'] ) ? $latest_version['upgrade_notes'] : $this->ipsclass->vn_full; - $disabled_functions = @ini_get('disable_functions') ? @ini_get('disable_functions') : "нет информации"; + //----------------------------------------- + // Version History + //----------------------------------------- + + foreach( $upgrade_history as $r ) + { + $r['_date'] = $this->ipsclass->get_date( $r['upgrade_date'], 'SHORT' ); + + $thiscontent .= $this->html->acp_version_history_row( $r ); + } + + $this->ipsclass->adskin->td_header[] = array( "{none}" , "40%" ); + $this->ipsclass->adskin->td_header[] = array( "{none}" , "60%" ); + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "System Overview" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "IPB Version", + $this->ipsclass->version . " (ID:" . $this->ipsclass->vn_full . ")" ) ); - $this->ipsclass->adskin->td_header[] = array( "" , "40%" ); - $this->ipsclass->adskin->td_header[] = array( "" , "60%" ); - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Информация о системе" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Версия IPB", - $this->ipsclass->version." (ID:".$this->ipsclass->acpversion.")" ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Версия ".strtoupper(SQL_DRIVER), + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( strtoupper(SQL_DRIVER)." Version", $sql_version ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Версия PHP", + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "PHP Version", $php_version ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Disabled PHP Functions", + $disabled_functions ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Отключенные функции PHP", - $disabled_functions ) ); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Safe Mode", + SAFE_MODE_ON == 1 ? "ON" : "OFF" ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Безопасный режим", - SAFE_MODE_ON == 1 ? "ВКЛЮЧЕН" : "ВЫКЛЮЧЕН" ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "ПО Сервера", + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Server Software", $server_software ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Текущая загрузка сервера", + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Current Server Load", $load_limit ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Общий объем памяти сервера", + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Total Server Memory", $total_memory ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Доступно физической памяти", + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Available Physical Memory", $avail_memory ) ); $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Процессы системы" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "System Processes" ); + if( strstr( strtolower(PHP_OS), 'win' ) ) { $tasks = @shell_exec( "tasklist" ); @@ -839,20 +1086,22 @@ class ad_diagnostics $tasks = @shell_exec( "top -b -n 1" ); $tasks = str_replace( " ", " ", $tasks ); } - + if( !$tasks ) { - $tasks = "Невозможно получить информацию о процессах"; + $tasks = "Unable to obtain process information"; } else { $tasks = "
    ".$tasks."
    "; } - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $tasks ) ); $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - //----------------------------------------- + + $this->ipsclass->html .= $this->html->acp_version_history_wrapper( $thiscontent ); + + //----------------------------------------- // File Version Checker //----------------------------------------- /* @@ -861,89 +1110,89 @@ class ad_diagnostics 4 => array( 'section', $this->ipsclass->section_code ), ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Проверка версии файлов" ); - + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "File Version Checker" ); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "This tool will check your file versions to verify they match. Running different versions of core files can result in unexpected behavior." ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Запустить'); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Run Tool'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - */ - //----------------------------------------- + + //----------------------------------------- // Whitespace Checker //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'whitespace' ), 2 => array( 'act' , 'diag' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Проверка на пробелы и переносы строк" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Если ваши php-файлы содержат пробелы или переносы строк в конце или начале, это может негативно сказаться на работе вашего IPB.
    Этот инструмент проверит файлы вашей системы на лишние пробелы и переносы." ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Запустить'); + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Whitespace Checker" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "If your php files have whitespace at the beginning or end of the file, it can cause certain issues with IPB. This tool will check for any files that have this problem." ) ); + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Run Tool'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - //----------------------------------------- + + //----------------------------------------- // File Permissions Checker //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'filepermissions' ), 2 => array( 'act' , 'diag' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Проверка атрибутов файлов" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Этот инструмент проверит атрибуты файлов и папок на возможность записи данных. При неправильно установленных атрибутах невозможно произвести установку новых стилей, языковых пакетов и прочих элементов форума." ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Запустить'); + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "File Permissions Checker" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "This tool will check your file and folder permissions to verify those that need to be writeable are. If permissions are not set properly your skins, languages and other board elements may not be saved correctly." ) ); + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Run Tool'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - //----------------------------------------- + + //----------------------------------------- // DB Table/Column Checker //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'dbchecker' ), 2 => array( 'act' , 'diag' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Проверка таблиц и полей базы данных" ); + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Database Table/Column Checker" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "This tool will check your database tables to verify they are up to date and accurate." ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Этот инструмент проверит на целостность таблицы и поля вашей базы данных." ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Запустить'); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - //----------------------------------------- + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Run Tool'); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + //----------------------------------------- // DB Index Checker //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'dbindex' ), 2 => array( 'act' , 'diag' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Проверка индексов таблицы" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Этот инструмент проверит на целостность индексы вашей базы данных. Если индексы не установлены должным образом, это может привести к менее эффективной работе вашей базы данных." ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Запустить'); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Database Index Checker" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "This tool will check your database indexes to ensure they are correct. If databases indexes are not set properly, your database may not run as fast or as efficient as it should." ) ); + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Run Tool'); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + */ //----------------------------------------- - + $this->ipsclass->admin->output(); - + } - - + + } diff --git a/upload/sources/action_admin/emailerror.php b/upload/sources/action_admin/emailerror.php index 2ec3963e..907cf81f 100644 --- a/upload/sources/action_admin/emailerror.php +++ b/upload/sources/action_admin/emailerror.php @@ -2,25 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-12-01 15:07:16 -0600 (Fri, 01 Dec 2006) $ -| > $Revision: 752 $ +| > $Date: 2007-01-16 17:59:04 -0500 (Tue, 16 Jan 2007) $ +| > $Revision: 830 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -36,7 +28,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -49,109 +41,109 @@ class ad_emailerror * @var string */ var $perm_main = "admin"; - + /** * Section title name * * @var string */ var $perm_child = "emailerror"; - + function auto_run() { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Журнал ошибок при работе с почтой' ); - + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Email Error Logs' ); + //----------------------------------------- // Make sure we're a root admin, or else! //----------------------------------------- - + if ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group']) { - //$this->ipsclass->admin->error("Извините, эта функция доступна только главным администраторам."); + //$this->ipsclass->admin->error("Sorry, these functions are for the root admin group only"); } - + switch($this->ipsclass->input['code']) { case 'list': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->list_current(); break; - + case 'remove': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->remove_entries(); break; - + case 'viewemail': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->view_email(); break; - - + + //----------------------------------------- default: $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->list_current(); break; } - + } - + //----------------------------------------- // View a single email. //----------------------------------------- - + function view_email() { if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Вы не указали ID e-mail адреса."); + $this->ipsclass->admin->error("Could not resolve the email ID, please try again"); } - + $id = intval($this->ipsclass->input['id']); - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'mail_error_logs', 'where' => "mlog_id=$id" ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $row = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Указанный вами ID ($id) не найден в базе данных."); + $this->ipsclass->admin->error("Could not resolve the email ID, please try again ($id)"); } - + $this->ipsclass->adskin->td_header[] = array( " " , "100%" ); - + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( $row['mlog_subject'] ); - + $row['mlog_date'] = $this->ipsclass->admin->get_date( $row['mlog_date'], 'LONG' ); $row['mlog_content'] = nl2br($row['mlog_content']); - - $row['mlog_msg'] = $row['mlog_msg'] ? $row['mlog_msg'] : 'Нет информации'; - $row['mlog_code'] = $row['mlog_code'] ? $row['mlog_code'] : 'Нет информации'; - $row['mlog_smtp_error'] = $row['mlog_smtp_error'] ? $row['mlog_smtp_error'] : 'Нет информации'; - + + $row['mlog_msg'] = $row['mlog_msg'] ? $row['mlog_msg'] : 'No Info'; + $row['mlog_code'] = $row['mlog_code'] ? $row['mlog_code'] : 'No Info'; + $row['mlog_smtp_error'] = $row['mlog_smtp_error'] ? $row['mlog_smtp_error'] : 'No Info'; + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "От: <{$row['mlog_from']}> -
    Кому: <{$row['mlog_to']}> -
    Отправлено: {$row['mlog_date']} -
    Тема: {$row['mlog_subject']} + "From: <{$row['mlog_from']}> +
    To: <{$row['mlog_to']}> +
    Sent: {$row['mlog_date']} +
    Subject: {$row['mlog_subject']}

    {$row['mlog_content']}....
    -
    IPB ОШИБКА: {$row['mlog_msg']} -
    SMTP КОД: {$row['mlog_code']} -
    SMTP ОШИБКА: {$row['mlog_smtp_error']} +
    IPB ERROR: {$row['mlog_msg']} +
    SMTP CODE: {$row['mlog_code']} +
    SMTP ERROR: {$row['mlog_smtp_error']} " ) ); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->print_popup(); } - + //----------------------------------------- // Remove row(s) //----------------------------------------- - + function remove_entries() { if ( $this->ipsclass->input['type'] == 'all' ) @@ -161,7 +153,7 @@ class ad_emailerror else { $ids = array(); - + foreach ($this->ipsclass->input as $k => $v) { if ( preg_match( "/^id_(\d+)$/", $k, $match ) ) @@ -172,57 +164,57 @@ class ad_emailerror } } } - + $ids = $this->ipsclass->clean_int_array( $ids ); - + //----------------------------------------- - + if ( count($ids) < 1 ) { - $this->ipsclass->admin->error("Вы должны выбрать как минимум одну запись для удаления."); + $this->ipsclass->admin->error("You did not select any email log entries to approve or delete"); } - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'mail_error_logs', 'where' => "mlog_id IN (".implode(',', $ids ).")" ) ); } - - $this->ipsclass->admin->save_log("Журнал e-mail ошибок очищен"); - + + $this->ipsclass->admin->save_log("Removed email error log entries"); + $this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}"); } - + //----------------------------------------- // SHOW EMAIL ERROR LOGS //----------------------------------------- - + function list_current() { $this->ipsclass->html .= ""; // removed js popwin - + $form_array = array(); - + $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; - - $this->ipsclass->admin->page_detail = "Журнал сохраненных e-mail ошибок"; - $this->ipsclass->admin->page_title = "Управление журналом e-mail ошибок"; - + + $this->ipsclass->admin->page_detail = "Stored email error logs"; + $this->ipsclass->admin->page_title = "Email Error Logs Manager"; + //----------------------------------------- // Check URL parameters //----------------------------------------- - + $url_query = array(); $db_query = array(); - + if ( isset($this->ipsclass->input['type']) AND $this->ipsclass->input['type'] != "" ) { - $this->ipsclass->admin->page_title .= " (Результаты поиска)"; - + $this->ipsclass->admin->page_title .= " (Search Results)"; + switch( $this->ipsclass->input['type'] ) { case 'subject': $string = urldecode($this->ipsclass->input['string']); if ( $string == "" ) { - $this->ipsclass->admin->error("Вы должны ввести хоть что-нибудь"); + $this->ipsclass->admin->error("You must enter something to search by"); } $url_query[] = 'type='.$this->ipsclass->input['type']; $url_query[] = 'string='.urlencode($string); @@ -232,7 +224,7 @@ class ad_emailerror $string = urldecode($this->ipsclass->input['string']); if ( $string == "" ) { - $this->ipsclass->admin->error("Вы должны ввести хоть что-нибудь"); + $this->ipsclass->admin->error("You must enter something to search by"); } $url_query[] = 'type='.$this->ipsclass->input['type']; $url_query[] = 'string='.urlencode($string); @@ -242,7 +234,7 @@ class ad_emailerror $string = urldecode($this->ipsclass->input['string']); if ( $string == "" ) { - $this->ipsclass->admin->error("Вы должны ввести хоть что-нибудь"); + $this->ipsclass->admin->error("You must enter something to search by"); } $url_query[] = 'type='.$this->ipsclass->input['type']; $url_query[] = 'string='.urlencode($string); @@ -252,13 +244,13 @@ class ad_emailerror $string = urldecode($this->ipsclass->input['string']); if ( $string == "" ) { - $this->ipsclass->admin->error("Вы должны ввести хоть что-нибудь"); + $this->ipsclass->admin->error("You must enter something to search by"); } $url_query[] = 'type='.$this->ipsclass->input['type']; $url_query[] = 'string='.urlencode($string); $db_query[] = $this->ipsclass->input['match'] == 'loose' ? "mlog_msg LIKE '%{$string}%' or mlog_smtp_msg LIKE '%{$string}%'" : "mlog_msg='{$string} or mlog_smtp_msg='{$string}'"; break; - + default: // break; @@ -268,48 +260,48 @@ class ad_emailerror //----------------------------------------- // LIST 'EM //----------------------------------------- - + $dbe = ""; $url = ""; - + if ( count($db_query) > 0 ) { $dbe = implode(' AND ', $db_query ); } - + if ( count($url_query) > 0 ) { $url = '&'.implode( '&', $url_query); } - + $this->ipsclass->DB->simple_construct( array( 'select' => 'count(*) as cnt', 'from' => 'mail_error_logs', 'where' => $dbe ) ); $this->ipsclass->DB->simple_exec(); - + $count = $this->ipsclass->DB->fetch_row(); - + $links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $count['cnt'], 'PER_PAGE' => 25, 'CUR_ST_VAL' => $start, - 'L_SINGLE' => "Одна страница", - 'L_MULTI' => "Страницы: ", + 'L_SINGLE' => "Single Page", + 'L_MULTI' => "Pages: ", 'BASE_URL' => $this->ipsclass->base_url."&{$this->ipsclass->form_code}".$url, ) ); - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'mail_error_logs', 'where' => $dbe, 'order' => 'mlog_date DESC', 'limit' => array( $start, 25 ) ) ); $this->ipsclass->DB->simple_exec(); - + $this->ipsclass->html .= ""; - + "; + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'remove' ), 2 => array( 'act' , 'emailerror' ), 3 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( "" , "1%" ); - $this->ipsclass->adskin->td_header[] = array( "Кому" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Тема" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Ошибка" , "30%" ); - $this->ipsclass->adskin->td_header[] = array( "Вермя" , "20%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Список неотправленных писем" ); + $this->ipsclass->adskin->td_header[] = array( "To" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Subject" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Error MSG" , "30%" ); + $this->ipsclass->adskin->td_header[] = array( "Date" , "20%" ); + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Logged Emails Errors" ); + if ( $this->ipsclass->DB->get_num_rows() ) { while ( $row = $this->ipsclass->DB->fetch_row() ) { $row['mlog_date'] = $this->ipsclass->admin->get_date( $row['mlog_date'], 'SHORT' ); - + $row['mlog_subject'] = ( strpos( $row['mlog_subject'], "=?{$this->ipsclass->vars['gb_char_set']}?Q?" ) !== FALSE ) ? str_replace( "=?{$this->ipsclass->vars['gb_char_set']}?Q?", "", str_replace( "?=", "", preg_replace_callback( '/=([A-F0-9]{2})/', create_function( '$match', 'return chr( hexdec( "$match[1]" ) );' ), $row['mlog_subject'] ) ) ) //base64_decode( str_replace( "=?utf-8?B?", "", str_replace( "=?=", "", str_replace( "=20", "", $row['mlog_subject'] ) ) ) ) : $row['mlog_subject']; - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "
    ", ''.$row['mlog_to'].'', - "".$row['mlog_subject']."", + "".$row['mlog_subject']."", $row['mlog_msg'].'
    '.$row['mlog_code']. ' '.$row['mlog_smtp_msg'], $row['mlog_date'], ) ); - - + + } } else { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    Записей не найдено.
    "); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    No results
    "); } - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic('
      Удалить все?
    '.$links.'
    ', 'left', 'tablesubheader'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic('
      Remove all?
    '.$links.'
    ', 'left', 'tablesubheader'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - - - + + + + //----------------------------------------- //------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'list' ), 2 => array( 'act' , 'emailerror' ), 3 => array( 'section', $this->ipsclass->section_code ), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Поиск записей ошибок" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Search Email Error Logs" ); + $form_array = array( - 0 => array( 'subject' , 'Тема письма' ), - 2 => array( 'email_from' , 'От (E-mail)' ), - 3 => array( 'email_to' , 'Кому (E-mail)' ), - 4 => array( 'error' , 'Сообщение об ошибке' ), + 0 => array( 'subject' , 'Email Subject' ), + 2 => array( 'email_from' , 'From Email Address' ), + 3 => array( 'email_to' , 'To Email Address' ), + 4 => array( 'error' , 'Error Message' ), ); - + $type_array = array( - 0 => array( 'exact' , 'совпадение' ), - 1 => array( 'loose' , 'содержит' ), + 0 => array( 'exact' , 'is exactly' ), + 1 => array( 'loose' , 'contains' ), ); - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Поиск в  " + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Search where  " . $this->ipsclass->adskin->form_dropdown( "type" , $form_array, isset($_POST['type']) ? $_POST['type'] : '' ) ." " . $this->ipsclass->adskin->form_dropdown( "match", $type_array, isset($_POST['match']) ? $_POST['match'] : '') ." " . $this->ipsclass->adskin->form_input( "string", isset($_POST['string']) ? $_POST['string'] : '' ), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Найти"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Search"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- //------------------------------- - + $this->ipsclass->admin->output(); - + } - - - + + + } diff --git a/upload/sources/action_admin/emaillogs.php b/upload/sources/action_admin/emaillogs.php index abdd98e7..268d2788 100644 --- a/upload/sources/action_admin/emaillogs.php +++ b/upload/sources/action_admin/emaillogs.php @@ -2,24 +2,16 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ +| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ | > $Revision: 567 $ | > $Author: matt $ +--------------------------------------------------------------------------- @@ -36,7 +28,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -52,7 +44,7 @@ class ad_emaillogs * @var string */ var $perm_main = "admin"; - + /** * Section title name * @@ -62,92 +54,92 @@ class ad_emaillogs function auto_run() { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Журнал e-mail отправлений' ); - + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Email Logs' ); + // Make sure we're a root admin, or else! - + if ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group']) { - //$this->ipsclass->admin->error("Извините, эта функция доступна только главным администраторам."); + //$this->ipsclass->admin->error("Sorry, these functions are for the root admin group only"); } - + switch($this->ipsclass->input['code']) { case 'list': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->list_current(); break; - + case 'remove': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->remove_entries(); break; - + case 'viewemail': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->view_email(); break; - + //----------------------------------------- default: $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->list_current(); break; } - + } - + //----------------------------------------- // View a single email. //----------------------------------------- - + function view_email() { if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Невозможно определить ID адреса email, вернитесь и попробуйте еще раз"); + $this->ipsclass->admin->error("Could not resolve the email ID, please try again"); } - + $id = intval($this->ipsclass->input['id']); - + $this->ipsclass->DB->cache_add_query( 'emaillogs_view_email', array( 'id' => $id ) ); $this->ipsclass->DB->cache_exec_query(); - + if ( ! $row = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Невозможно определить ID адреса email, вернитесь и попробуйте еще раз ($id)"); + $this->ipsclass->admin->error("Could not resolve the email ID, please try again ($id)"); } - + $this->ipsclass->adskin->td_header[] = array( " " , "100%" ); - + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( $row['email_subject'] ); - - - + + + $row['email_date'] = $this->ipsclass->admin->get_date( $row['email_date'], 'LONG' ); - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "От: {$row['name']} <{$row['from_email_address']}> -
    Кому: {$row['to_name']} <{$row['to_email_address']}> -
    Отправлено: {$row['email_date']} -
    IP-адрес: {$row['from_ip_address']} -
    Тема: {$row['email_subject']} + "From: {$row['name']} <{$row['from_email_address']}> +
    To: {$row['to_name']} <{$row['to_email_address']}> +
    Sent: {$row['email_date']} +
    From IP: {$row['from_ip_address']} +
    Subject: {$row['email_subject']}

    {$row['email_content']} " ) ); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->print_popup(); } + - - + //----------------------------------------- // Remove row(s) //----------------------------------------- - + function remove_entries() { if ( $this->ipsclass->input['type'] == 'all' ) @@ -157,7 +149,7 @@ class ad_emaillogs else { $ids = array(); - + foreach ($this->ipsclass->input as $k => $v) { if ( preg_match( "/^id_(\d+)$/", $k, $match ) ) @@ -168,57 +160,57 @@ class ad_emaillogs } } } - + $ids = $this->ipsclass->clean_int_array( $ids ); - + //----------------------------------------- - + if ( count($ids) < 1 ) { - $this->ipsclass->admin->error("Вы должны выбрать хоть одну запись из журнала для удаления"); + $this->ipsclass->admin->error("You did not select any email log entries to approve or delete"); } - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'email_logs', 'where' => " email_id IN (".implode(',', $ids ).")" ) ); } - - $this->ipsclass->admin->save_log("Удалены записи из журнала e-mail отправлений"); - + + $this->ipsclass->admin->save_log("Removed email log entries"); + $this->ipsclass->boink_it($this->ipsclass->base_url."&act=emaillog"); exit(); - - + + } + + - - - - + + //----------------------------------------- // SHOW ALL LANGUAGE PACKS //----------------------------------------- - + function list_current() { $this->ipsclass->html .= ""; // removed js popwin - + $form_array = array(); - + $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; - - $this->ipsclass->admin->page_detail = "Сохраненные записи журнала e-mail отправлений"; - $this->ipsclass->admin->page_title = "Управление журналом e-mail отправлений"; - + + $this->ipsclass->admin->page_detail = "Stored email logs"; + $this->ipsclass->admin->page_title = "Email Logs Manager"; + //----------------------------------------- // Check URL parameters //----------------------------------------- - + $url_query = array(); $db_query = array(); - + if ( isset($this->ipsclass->input['type']) AND $this->ipsclass->input['type'] != "" ) { - $this->ipsclass->admin->page_title .= " (Результаты поиска)"; - + $this->ipsclass->admin->page_title .= " (Search Results)"; + switch( $this->ipsclass->input['type'] ) { case 'fromid': @@ -235,7 +227,7 @@ class ad_emaillogs $string = urldecode($this->ipsclass->input['string']); if ( $string == "" ) { - $this->ipsclass->admin->error("Вы должны ввести хоть что-нибудь"); + $this->ipsclass->admin->error("You must enter something to search by"); } $url_query[] = 'type='.$this->ipsclass->input['type']; $url_query[] = 'string='.urlencode($string); @@ -245,7 +237,7 @@ class ad_emaillogs $string = urldecode($this->ipsclass->input['string']); if ( $string == "" ) { - $this->ipsclass->admin->error("Вы должны ввести хоть что-нибудь"); + $this->ipsclass->admin->error("You must enter something to search by"); } $url_query[] = 'type='.$this->ipsclass->input['type']; $url_query[] = 'string='.urlencode($string); @@ -255,7 +247,7 @@ class ad_emaillogs $string = urldecode($this->ipsclass->input['string']); if ( $string == "" ) { - $this->ipsclass->admin->error("Вы должны ввести хоть что-нибудь"); + $this->ipsclass->admin->error("You must enter something to search by"); } $url_query[] = 'type='.$this->ipsclass->input['type']; $url_query[] = 'string='.urlencode($string); @@ -265,7 +257,7 @@ class ad_emaillogs $string = urldecode($this->ipsclass->input['string']); if ( $string == "" ) { - $this->ipsclass->admin->error("Вы должны ввести хоть что-нибудь"); + $this->ipsclass->admin->error("You must enter something to search by"); } $url_query[] = 'type='.$this->ipsclass->input['type']; $url_query[] = 'string='.urlencode($string); @@ -275,43 +267,43 @@ class ad_emaillogs $string = urldecode($this->ipsclass->input['string']); if ( $string == "" ) { - $this->ipsclass->admin->error("Вы должны ввести хоть что-нибудь"); + $this->ipsclass->admin->error("You must enter something to search by"); } - + if ( $this->ipsclass->input['match'] == 'loose' ) { $this->ipsclass->DB->simple_construct( array( 'select' => 'id,name', 'from' => 'members', 'where' => "name LIKE '%{$string}%'" ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $this->ipsclass->DB->get_num_rows() ) { - $this->ipsclass->admin->error("Не найдено никаких записей, соответствующих запросу в журнале e-mail отправлений"); + $this->ipsclass->admin->error("No matches found in the email logs"); } - + $ids = array(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $ids[] = $r['id']; } - + $db_query[] = 'email.from_member_id IN('.implode( ',', $ids ).')'; } else { $this->ipsclass->DB->simple_construct( array( 'select' => 'id,name', 'from' => 'members', 'where' => "name='{$string}'" ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $this->ipsclass->DB->get_num_rows() ) { - $this->ipsclass->admin->error("Не найдено никаких записей, соответствующих запросу в журнале e-mail отправлений"); + $this->ipsclass->admin->error("No matches found in the email logs"); } - + $r = $this->ipsclass->DB->fetch_row(); - + $db_query[] = 'email.from_member_id IN('.$r['id'].')'; } - + $url_query[] = 'type='.$this->ipsclass->input['type']; $url_query[] = 'string='.urlencode($string); break; @@ -319,43 +311,43 @@ class ad_emaillogs $string = urldecode($this->ipsclass->input['string']); if ( $string == "" ) { - $this->ipsclass->admin->error("Вы должны ввести хоть что-нибудь"); + $this->ipsclass->admin->error("You must enter something to search by"); } - + if ( $this->ipsclass->input['match'] == 'loose' ) { $this->ipsclass->DB->simple_construct( array( 'select' => 'id,name', 'from' => 'members', 'where' => "name LIKE '%{$string}%'" ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $this->ipsclass->DB->get_num_rows() ) { - $this->ipsclass->admin->error("Не найдено никаких записей, соответствующих запросу в журнале e-mail отправлений"); + $this->ipsclass->admin->error("No matches found in the email logs"); } - + $ids = array(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $ids[] = $r['id']; } - + $db_query[] = 'email.to_member_id IN('.implode( ',', $ids ).')'; } else { $this->ipsclass->DB->simple_construct( array( 'select' => 'id,name', 'from' => 'members', 'where' => "name='{$string}'" ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $this->ipsclass->DB->get_num_rows() ) { - $this->ipsclass->admin->error("Не найдено никаких записей, соответствующих запросу в журнале e-mail отправлений"); + $this->ipsclass->admin->error("No matches found in the email logs"); } - + $r = $this->ipsclass->DB->fetch_row(); - + $db_query[] = 'email.to_member_id IN('.$r['id'].')'; } - + $url_query[] = 'type='.$this->ipsclass->input['type']; $url_query[] = 'string='.urlencode($string); break; @@ -364,41 +356,41 @@ class ad_emaillogs break; } } - + if( isset($this->ipsclass->input['match']) ) { $url_query[] = 'match='.$this->ipsclass->input['match']; } - + //----------------------------------------- // LIST 'EM //----------------------------------------- - + $dbe = ""; $url = ""; - + if ( count($db_query) > 0 ) { $dbe = implode(' AND ', $db_query ); } - + if ( count($url_query) > 0 ) { $url = '&'.implode( '&', $url_query); } - + $this->ipsclass->DB->simple_construct( array( 'select' => 'count(email.email_id) as cnt', 'from' => 'email_logs email', 'where' => $dbe ) ); $this->ipsclass->DB->simple_exec(); - + $count = $this->ipsclass->DB->fetch_row(); - + $links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $count['cnt'], 'PER_PAGE' => 25, 'CUR_ST_VAL' => $start, - 'L_SINGLE' => "Одна страница", - 'L_MULTI' => "Страницы: ", + 'L_SINGLE' => "Single Page", + 'L_MULTI' => "Pages: ", 'BASE_URL' => $this->ipsclass->base_url."&{$this->ipsclass->form_code}".$url, ) ); @@ -406,21 +398,21 @@ class ad_emaillogs { $dbe = 'WHERE '.$dbe; } - + $this->ipsclass->DB->cache_add_query( 'emaillogs_list_current', array( 'dbe' => $dbe, 'limit_a' => $start ) ); $this->ipsclass->DB->cache_exec_query(); - + $this->ipsclass->html .= ""; - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'remove' ), 2 => array( 'act' , 'emaillog' ), 3 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( "" , "5%" ); - $this->ipsclass->adskin->td_header[] = array( "От" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Тема" , "30%" ); - $this->ipsclass->adskin->td_header[] = array( "Кому" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Дата" , "25%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Список отправленных писем" ); + $this->ipsclass->adskin->td_header[] = array( "From Member" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Subject" , "30%" ); + $this->ipsclass->adskin->td_header[] = array( "To Member" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Sent Time" , "25%" ); + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Logged Emails" ); + if ( $this->ipsclass->DB->get_num_rows() ) { while ( $row = $this->ipsclass->DB->fetch_row() ) { - + $row['email_date'] = $this->ipsclass->admin->get_date( $row['email_date'], 'SHORT' ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "
    ", - "..by id ipsclass->vars['php_ext']}?showuser={$row['id']}' title='Профиль пользователя (откроется в новом окне)' target='blank'>{$row['name']}", - "{$row['email_subject']}", - "..by id ipsclass->vars['php_ext']}?showuser={$row['to_id']}' title='Профиль пользователя (откроется в новом окне)' target='blank'>{$row['to_name']}", + "..by id ipsclass->vars['php_ext']}?showuser={$row['id']}' title='Members profile (new window)' target='blank'>{$row['name']}", + "{$row['email_subject']}", + "..by id ipsclass->vars['php_ext']}?showuser={$row['to_id']}' title='Members profile (new window)' target='blank'>{$row['to_name']}", "{$row['email_date']}", ) ); - - + + } } else { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    Записей не найдено.
    "); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    No results
    "); } - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic('
      Удалить все?
    '.$links.'
    ', 'left', 'tablesubheader'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic('
      Remove all?
    '.$links.'
    ', 'left', 'tablesubheader'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - - - + + + + //----------------------------------------- //------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'list' ), 2 => array( 'act' , 'emaillog' ), 3 => array( 'section', $this->ipsclass->section_code ), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Поиск записей" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Search Email Logs" ); + $form_array = array( - 0 => array( 'subject' , 'Тема письма' ), - 1 => array( 'content' , 'Содержимое' ), - 2 => array( 'email_from' , 'От (E-mail)' ), - 3 => array( 'email_to' , 'Кому (E-mail)' ), - 4 => array( 'name_from' , 'От (имя пользователя)'), - 5 => array( 'name_to' , 'Кому (имя пользователя)' ), + 0 => array( 'subject' , 'Email Subject' ), + 1 => array( 'content' , 'Email Body' ), + 2 => array( 'email_from' , 'From Email Address' ), + 3 => array( 'email_to' , 'To Email Address' ), + 4 => array( 'name_from' , 'From Member Name'), + 5 => array( 'name_to' , 'To Member Name' ), ); - + $type_array = array( - 0 => array( 'exact' , 'совпадение' ), - 1 => array( 'loose' , 'содержит' ), + 0 => array( 'exact' , 'is exactly' ), + 1 => array( 'loose' , 'contains' ), ); - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Поиск в  " + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Search where  " . $this->ipsclass->adskin->form_dropdown( "type", $form_array) ." " . $this->ipsclass->adskin->form_dropdown( "match", $type_array) ." " . $this->ipsclass->adskin->form_input( "string"), - + ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Искать"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Search"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- //------------------------------- - + $this->ipsclass->admin->output(); - + } - - - + + + } diff --git a/upload/sources/action_admin/emoticons.php b/upload/sources/action_admin/emoticons.php index 89939c6e..899fc5e7 100644 --- a/upload/sources/action_admin/emoticons.php +++ b/upload/sources/action_admin/emoticons.php @@ -2,24 +2,16 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-12-04 14:32:28 -0600 (Mon, 04 Dec 2006) $ +| > $Date: 2006-12-04 15:32:28 -0500 (Mon, 04 Dec 2006) $ | > $Revision: 759 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- @@ -35,7 +27,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -43,160 +35,160 @@ class ad_emoticons { var $functions = ""; var $html; - + /** * Section title name * * @var string */ var $perm_main = "lookandfeel"; - + /** * Section title name * * @var string */ var $perm_child = "emoticons"; - + /** * Allowed file types */ var $allowed_files = array( 'png', 'jpeg', 'jpg', 'gif' ); - + function auto_run() { //----------------------------------------- // Require and RUN !! THERES A BOMB //----------------------------------------- - + $this->ipsclass->admin->page_detail = ""; - $this->ipsclass->admin->page_title = "Управление смайликами"; - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Управление смайликами' ); - + $this->ipsclass->admin->page_title = "Emoticons Manager"; + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Emoticons Manager' ); + $this->html = $this->ipsclass->acp_load_template('cp_skin_lookandfeel'); //----------------------------------------- // What to do... //----------------------------------------- - + switch($this->ipsclass->input['code']) { //----------------------------------------- // Emu? //----------------------------------------- - + case 'emo': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->emoticon_start(); break; - + case 'emo_packsplash': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':export' ); $this->emoticon_pack_splash(); break; - + case 'emo_packexport': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':export' ); $this->emoticon_pack_export(); break; - + case 'emo_packimport': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':import' ); $this->emoticon_pack_import(); break; - + case 'emo_manage': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->emoticon_manage(); break; - + case 'emo_doedit': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->emoticon_edit(); break; - + case 'emo_doadd': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); $this->emoticon_add(); break; - + case 'emo_remove': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->emoticon_remove(); break; - + case 'emo_setadd': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); $this->emoticon_setalter($type='add'); break; - + case 'emo_setedit': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->emoticon_setalter($type='edit'); break; - + case 'emo_setremove': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->emoticon_setremove(); break; - + case 'emo_upload': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':upload' ); - $this->emoticon_upload(); - + $this->emoticon_upload(); + default: $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->emoticon_start(); break; } } - + //----------------------------------------- // EMOTICON Set add //----------------------------------------- - + function emoticon_setalter($type='add') { $name = preg_replace( "/[^a-zA-Z0-9\-_]/", "", $this->ipsclass->input['emoset'] ); - + if ($name == "") { - $this->ipsclass->main_msg = "Вы указали недопустимое название директории.
    В имени директории допустимы только символы: A-Z, a-z, 0-9."; + $this->ipsclass->main_msg = "No valid folder name was entered, please try again using only alphanumerics (A-Z, a-z, 0-9)"; $this->emoticon_start(); } - + //----------------------------------------- // Safe mode? //----------------------------------------- - + if ( SAFE_MODE_ON ) { - $this->ipsclass->main_msg = "Безопасный режим: IPB не может создать или изменить директорию.
    Пожалуйста, создайте или удалите директорию при помощи FTP-программы в /style_emoticons/."; + $this->ipsclass->main_msg = "SAFE MODE DETECTED: IPB cannot create or edit folders for you, please create or edit the folder manually using FTP in 'style_emoticons'"; $this->emoticon_start(); } - + //----------------------------------------- // Directory exists? //----------------------------------------- - + if ( file_exists( CACHE_PATH.'style_emoticons/'.$name ) ) { - $this->ipsclass->main_msg = "Директория «style_emoticons/{$name}» уже существует.
    Пожалуйста, выберете другие имя."; + $this->ipsclass->main_msg = "'style_emoticons/$name' already exists, please choose another name."; $this->emoticon_start(); } - + if ( $type == 'add' ) { //----------------------------------------- // Create directory? //----------------------------------------- - + if ( @mkdir( CACHE_PATH.'style_emoticons/'.$name, 0777 ) ) { @chmod( CACHE_PATH.'style_emoticons/'.$name, 0777 ); - + $dh = opendir( CACHE_PATH.'style_emoticons/default' ); - + while ( FALSE !== ( $file = readdir( $dh ) ) ) { if (($file != ".") && ($file != "..")) @@ -205,23 +197,23 @@ class ad_emoticons { @chmod( CACHE_PATH.'style_emoticons/'.$name.'/'.$file, 0777 ); } } - + closedir( $dh ); - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'emoticons', 'where' => "emo_set='default'" ) ); $outer = $this->ipsclass->DB->simple_exec(); - + while( $r = $this->ipsclass->DB->fetch_row($outer) ) { $this->ipsclass->DB->do_insert( "emoticons", array( 'clickable' => $r['clickable'], 'typed' => $r['typed'], 'emo_set' => $name, 'image' => $r['image'] ) ); } - $this->ipsclass->main_msg = "Новая директория добавлена"; + $this->ipsclass->main_msg = "New Folder Added"; $this->emoticon_start(); } else { - $this->ipsclass->main_msg = "IPB не может создать или отредактировать директорию за вас, пожалуйста, создайте сами (или удалите) директорию при помощи FTP в 'style_emoticons'"; + $this->ipsclass->main_msg = "IPB cannot create a new folder for you, please create the folder manually using FTP in 'style_emoticons'"; $this->emoticon_start(); } } @@ -229,22 +221,22 @@ class ad_emoticons { { if ( ! $this->ipsclass->input['id'] ) { - $this->ipsclass->main_msg = "Директории с таким названием нет."; + $this->ipsclass->main_msg = "Missing directory name, please try again."; $this->emoticon_start(); return; } - + if( $this->ipsclass->input['id'] == 'default' ) { - $this->ipsclass->main_msg = "Вы не можете переименовать эту директорию."; + $this->ipsclass->main_msg = "You cannot rename the default folder."; $this->emoticon_start(); return; } - + //----------------------------------------- // Rename directory? //----------------------------------------- - + if ( @rename( CACHE_PATH.'style_emoticons/'.$this->ipsclass->input['id'], CACHE_PATH.'style_emoticons/'.$name ) ) { if ( file_exists( CACHE_PATH.'style_emoticons/'.$name ) ) @@ -252,55 +244,55 @@ class ad_emoticons { //----------------------------------------- // Update the emos //----------------------------------------- - + $this->ipsclass->DB->do_update( 'emoticons', array( 'emo_set' => $name ), "emo_set='".$this->ipsclass->input['id']."'" ); } - + $this->emoticon_rebuildcache(); - + //----------------------------------------- // Update the skins using this set //----------------------------------------- - + $rebuild_sets = array(); - + $this->ipsclass->DB->build_query( array( 'select' => 'set_skin_set_id', 'from' => 'skin_sets', 'where' => "set_emoticon_folder='{$this->ipsclass->input['id']}'" ) ); $outer = $this->ipsclass->DB->exec_query(); - + while( $r = $this->ipsclass->DB->fetch_row($outer) ) { $this->ipsclass->DB->do_update( 'skin_sets', array( 'set_emoticon_folder' => $name ), 'set_skin_set_id='.$r['set_skin_set_id'] ); $rebuild_sets[] = $r['set_skin_set_id']; } - + if( count($rebuild_sets) ) { $this->ipsclass->cache_func->_rebuild_all_caches( $rebuild_sets ); } - - $this->ipsclass->main_msg = "Директория переименована."; + + $this->ipsclass->main_msg = "Folder renamed."; $this->emoticon_start(); } else { - $this->ipsclass->main_msg = "IPB не может переименовать эту директорию за вас."; + $this->ipsclass->main_msg = "IPB cannot rename this folder for you."; $this->emoticon_start(); } } } - + //----------------------------------------- // EMOTICON Edit //----------------------------------------- - + function emoticon_edit() { if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->main_msg = "Не выбран ID группы смайликов."; + $this->ipsclass->main_msg = "No emoticon group ID was passed"; $this->emoticon_start(); } - + foreach ($this->ipsclass->input as $key => $value) { if ( preg_match( "/^emo_id_(\d+)$/", $key, $match ) ) @@ -314,17 +306,17 @@ class ad_emoticons { $typed = str_replace( '"', "", $this->ipsclass->input['emo_type_'.$match[1]] ); $typed = str_replace( '\', "", $typed ); } - + $click = $this->ipsclass->input[ 'emo_click_'.$match[1] ]; - + if ( $match[1] ) { if( $typed ) { $orig_typed = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'typed', 'from' => 'emoticons', 'where' => 'id='.intval($match[1]) ) ); - + $this->ipsclass->DB->do_update( 'emoticons', array( 'clickable' => intval($click), 'typed' => $typed ), 'id='.intval($match[1]) ); - + $this->ipsclass->DB->do_update( 'emoticons', array( 'typed' => $typed ), "typed='".$orig_typed['typed']."'" ); } else @@ -335,74 +327,74 @@ class ad_emoticons { } } } - + $this->emoticon_rebuildcache(); - - $this->ipsclass->main_msg = "Смайлики обновлены"; - + + $this->ipsclass->main_msg = "Emoticons updated"; + $this->emoticon_manage(); - + } - + //----------------------------------------- // EMOTICON Remove //----------------------------------------- - + function emoticon_remove() { if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->main_msg = "Не выбран ID группы смайликов"; + $this->ipsclass->main_msg = "No emoticon group ID was passed"; $this->emoticon_start(); } - + if ($this->ipsclass->input['id'] != "default" ) { - $this->ipsclass->main_msg = "Вы можете только добавлять,изменять или удалять смайлики в этой директории."; + $this->ipsclass->main_msg = "You may only add, edit, and remove emoticons from the default set"; $this->emoticon_start(); - } - + } + if ($this->ipsclass->input['eid'] == "") { - $this->ipsclass->main_msg = "Не выбран ID смайликов"; + $this->ipsclass->main_msg = "No emoticon ID was passed"; $this->emoticon_manage(); } - + $emo_info = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'typed', 'from' => 'emoticons', 'where' => "id=".intval($this->ipsclass->input['eid']) ) ); - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'emoticons', 'where' => "typed='".$emo_info['typed']."'" ) ); - + $this->emoticon_rebuildcache(); - - $this->ipsclass->main_msg = "Смайлик удален"; - + + $this->ipsclass->main_msg = "Emoticon removed"; + $this->emoticon_manage(); } - + //----------------------------------------- // EMOTICON ADD //----------------------------------------- - + function emoticon_add() { if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->main_msg = "Не выбран ID группы иконок."; + $this->ipsclass->main_msg = "No emoticon group ID was passed"; $this->emoticon_start(); } - + if ($this->ipsclass->input['id'] != "default" ) { - $this->ipsclass->main_msg = "Вы можете только добавлять,изменять или удалять смайлики в этой директории."; + $this->ipsclass->main_msg = "You may only add, edit, and remove emoticons from the default set"; $this->emoticon_start(); - } - + } + if ($this->ipsclass->input['id'] != "default") { - $this->ipsclass->main_msg = "Вы можете только добавлять,изменять или удалять смайлики в этой директории."; + $this->ipsclass->main_msg = "You may only add, edit, and remove emoticons from the default set."; $this->emoticon_start(); - } - + } + foreach ($this->ipsclass->input as $key => $value) { if ( preg_match( "/^emo_type_(\d+)$/", $key, $match ) ) @@ -414,22 +406,22 @@ class ad_emoticons { $add = $this->ipsclass->input['emo_add_'.$match[1] ]; $image = $this->ipsclass->input['emo_image_'.$match[1] ]; $set = trim($this->ipsclass->input['id']); - + $typed = str_replace( '\', "", $typed ); - + if ( $this->ipsclass->input['addall'] ) { $add = 1; } - + if ( $add and $typed and $image ) { $this->ipsclass->DB->do_insert( 'emoticons', array( 'clickable' => intval($click), 'typed' => $typed, 'image' => $image, 'emo_set' => $set ) ); - + $emodirs = array( 0 => ''); - + $dh = opendir( CACHE_PATH.'style_emoticons' ); - + while ( FALSE !== ( $file = readdir( $dh ) ) ) { if (($file != ".") && ($file != "..")) @@ -448,48 +440,48 @@ class ad_emoticons { } } closedir( $dh ); - + foreach( $emodirs as $directory ) { if( $directory == $set ) { continue; } - - $this->ipsclass->DB->do_insert( 'emoticons', array( 'clickable' => intval($click), 'typed' => $typed, 'image' => $image, 'emo_set' => $directory ) ); + + $this->ipsclass->DB->do_insert( 'emoticons', array( 'clickable' => intval($click), 'typed' => $typed, 'image' => $image, 'emo_set' => $directory ) ); } } } } } - + $this->emoticon_rebuildcache(); - - $this->ipsclass->main_msg = "Смайлики обновлены"; - + + $this->ipsclass->main_msg = "Emoticons updated"; + $this->emoticon_manage(); } - - + + //----------------------------------------- // EMOTICON Upload //----------------------------------------- - + function emoticon_upload() { //----------------------------------------- // INIT //----------------------------------------- - + $overwrite = 1; - + //----------------------------------------- // Which folders? //----------------------------------------- - + $directories = array(); $first_dir = ''; - + foreach ($this->ipsclass->input as $key => $value) { if ( preg_match( "/^dir_(.*)$/", $key, $match ) ) @@ -500,28 +492,28 @@ class ad_emoticons { } } } - + if ( ! count( $directories ) ) { - $this->ipsclass->main_msg = "Вы не выбрали смайлик чтобы произвести загрузку!"; + $this->ipsclass->main_msg = "You must choose a folder other than 'default' to upload into."; $this->emoticon_start(); } - + //----------------------------------------- // Excuse me, can you shift? //----------------------------------------- - + if ( ! in_array( 'default', $directories ) ) { array_push( $directories, 'default' ); } - + $first_dir = array_shift( $directories ); - + $emodirs = array( 0 => ''); - + $dh = opendir( CACHE_PATH.'style_emoticons' ); - + while ( FALSE !== ( $file = readdir( $dh ) ) ) { if ( ($file != ".") && ($file != "..") ) @@ -541,65 +533,65 @@ class ad_emoticons { } closedir( $dh ); - + //----------------------------------------- // Loopy loo? //----------------------------------------- - + foreach( array( 1,2,3,4 ) as $i ) { $field = 'upload_'.$i; - + $FILE_NAME = $_FILES[$field]['name']; $FILE_SIZE = $_FILES[$field]['size']; $FILE_TYPE = $_FILES[$field]['type']; - + //----------------------------------------- // Naughty Opera adds the filename on the end of the // mime type - we don't want this. //----------------------------------------- - + $FILE_TYPE = preg_replace( "/^(.+?);.*$/", "\\1", $FILE_TYPE ); - - //----------------------------------------- + + //----------------------------------------- // Naughty Mozilla likes to use "none" to indicate an empty upload field. // I love universal languages that aren't universal. //----------------------------------------- - + if ( $_FILES[$field]['name'] == "" or ! $_FILES[$field]['name'] or ($_FILES[$field]['name'] == "none") ) { continue; } - + //----------------------------------------- // Make sure it's not a NAUGHTY file //----------------------------------------- - + $file_extension = preg_replace( "#^.*\.(.+?)$#si", "\\1", strtolower( $_FILES[ $field ]['name'] ) ); - + if ( ! in_array( $file_extension, $this->allowed_files ) ) { - $this->ipsclass->main_msg = "Вы можете загружать файлы только с расширением jpeg, jpg, gif и png."; + $this->ipsclass->main_msg = "You can only upload image files (jpeg, jpg, gif and png)"; $this->emoticon_start(); - } - + } + //----------------------------------------- // Copy the upload to the uploads directory //----------------------------------------- - + if ( ! @move_uploaded_file( $_FILES[ $field ]['tmp_name'], CACHE_PATH.'style_emoticons/'.$first_dir."/".$FILE_NAME) ) { - $this->ipsclass->main_msg = "Невозможно произвести запись в указанную директорию."; + $this->ipsclass->main_msg = "The upload failed, sorry!"; $this->emoticon_start(); } else { @chmod( CACHE_PATH.'style_emoticons/'.$first_dir."/".$FILE_NAME, 0777 ); - + //----------------------------------------- // Copy to other folders //----------------------------------------- - + if ( is_array( $directories ) and count( $directories ) ) { foreach ( $directories as $newdir ) @@ -611,14 +603,14 @@ class ad_emoticons { continue; } } - + if ( @copy( CACHE_PATH.'style_emoticons/'.$first_dir."/".$FILE_NAME, CACHE_PATH.'style_emoticons/'.$newdir."/".$FILE_NAME ) ) { @chmod( CACHE_PATH.'style_emoticons/'.$newdir."/".$FILE_NAME, 0777 ); } } } - + // Let's make sure this 'image' is available in all directories too if ( is_array( $emodirs ) and count( $emodirs ) ) { @@ -628,53 +620,53 @@ class ad_emoticons { { continue; } - + if( @copy( CACHE_PATH.'style_emoticons/'.$first_dir."/".$FILE_NAME, CACHE_PATH.'style_emoticons/'.$newdir."/".$FILE_NAME ) ) { @chmod( CACHE_PATH.'style_emoticons/'.$newdir."/".$FILE_NAME, 0777 ); } } - } + } } } - - $this->ipsclass->main_msg = "Загрузка завершена!"; + + $this->ipsclass->main_msg = "Uploads complete!"; $this->emoticon_start(); } - - + + //----------------------------------------- // EMOTICON Start //----------------------------------------- - + function emoticon_start() { if ( ! is_dir( CACHE_PATH. 'style_emoticons') ) { - $this->ipsclass->admin->error("Нельзя найти директорию со смайликами — убедитесь, что путь к директории /style_emoticons/ указан верно."); + $this->ipsclass->admin->error("Could not locate the emoticons directory - make sure the 'style_emoticons' path is set correctly"); $this->ipsclass->admin->output(); } - + //----------------------------------------- // Get emoticon count //----------------------------------------- - + $this->ipsclass->DB->cache_add_query( 'admin_emo_count', array() ); $this->ipsclass->DB->cache_exec_query(); - + while( $r = $this->ipsclass->DB->fetch_row() ) { $emo_db[ $r['emo_set'] ] = $r; } - + //----------------------------------------- // Get emoticon folders //----------------------------------------- - + $emodirs = array( 0 => ''); - + $dh = opendir( CACHE_PATH.'style_emoticons' ); - + while ( FALSE !== ( $file = readdir( $dh ) ) ) { if (($file != ".") && ($file != "..")) @@ -693,36 +685,36 @@ class ad_emoticons { } } closedir( $dh ); - + //----------------------------------------- // Start output //----------------------------------------- - + $this->ipsclass->html .= $this->html->emoticon_overview_wrapper_addform(); - + $row_html = ""; - + $i = 0; $total = count($emodirs); - + foreach( $emodirs as $dir ) { $i++; $data = array(); - + $files = $this->emoticon_get_folder_contents( $dir ); $data['count'] = intval( count($files) ); - + if( $dir == 'default' ) { $data['line_image'] = ''; - $data['link_text'] = "Управление смайликами"; + $data['link_text'] = "Manage Emoticons"; } else { - $data['link_text'] = "Сделать нажимаемым"; - + $data['link_text'] = "Set Clickable"; + if( $i == $total ) { $data['line_image'] = " "; @@ -732,7 +724,7 @@ class ad_emoticons { $data['line_image'] = " "; } } - + if ( is_writeable( CACHE_PATH . '/style_emoticons/'.$dir ) ) { if( $dir == 'default' ) @@ -743,101 +735,101 @@ class ad_emoticons { { $checked_def = ""; } - + $data['icon'] = 'icon_can_write.gif'; - $data['title'] = 'В эту директорию можно произвести запись — вы можете добавить в нее новые смайлики'; + $data['title'] = 'This folder is writeable and new emoticons can be added'; $data['checkbox'] = ""; } else { $data['icon'] = 'icon_cannot_write.gif'; - $data['title'] = 'В эту директорию нельзя произвести запись — вам необходимо изменить атрибуты доступа (CHMOD)'; + $data['title'] = 'This folder is NOT writeable and the CHMOD must be changed'; $data['checkbox'] = "-"; } - + $data['dir'] = $dir; $data['dir_count'] = intval($emo_db[ $dir ]['count']); - + $row_html .= $this->html->emoticon_overview_row( $data ); } - + $this->ipsclass->html .= $this->html->emoticon_overview_wrapper( $row_html ); - - $this->ipsclass->admin->page_detail = "В этой секции вы можете управлять смайликами системы."; - $this->ipsclass->admin->page_title = "Управление смайликами"; - + + $this->ipsclass->admin->page_detail = "You may add/edit or remove emoticons in this section."; + $this->ipsclass->admin->page_title = "Emoticon Control"; + $this->ipsclass->admin->output(); - + } - + //----------------------------------------- // EMOTICON Remove set //----------------------------------------- - + function emoticon_setremove() { - $this->ipsclass->admin->page_detail = "Удалить IPB пак смайликов."; - $this->ipsclass->admin->page_title = "Управление смайликами"; - + $this->ipsclass->admin->page_detail = "Remove an IPB emoticon pack."; + $this->ipsclass->admin->page_title = "Emoticon Management"; + if ( ! $this->ipsclass->input['id'] ) { - $this->ipsclass->main_msg = "Не выбран ни один смайлик."; + $this->ipsclass->main_msg = "No emoticon set was passed."; $this->emoticon_start(); } - + if( $this->ipsclass->input['id'] == 'default' ) { - $this->ipsclass->main_msg = "Вы не можете переименовать эту директорию."; + $this->ipsclass->main_msg = "You cannot rename the default folder."; $this->emoticon_start(); return; } - + $this->ipsclass->admin->rm_dir( CACHE_PATH.'style_emoticons/'.$this->ipsclass->input['id'] ); $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'emoticons', 'where' => "emo_set='{$this->ipsclass->input['id']}'" ) ); - + $this->emoticon_rebuildcache(); - - $this->ipsclass->main_msg = "Директория со смайликами успешно удалена."; + + $this->ipsclass->main_msg = "Emoticon folder removed."; $this->emoticon_start(); } - + //----------------------------------------- // EMOTICON Import/Export Pack Splash //----------------------------------------- - + function emoticon_pack_splash() { - $this->ipsclass->admin->page_detail = "В этой секции вы можете произвести импортирование или экспортирование смайликов."; - $this->ipsclass->admin->page_title = "Импорт и экспорт смайликов"; - $this->ipsclass->admin->nav[] = array( '', 'Импорт и экспорт смайликов' ); - + $this->ipsclass->admin->page_detail = "Export or import IPB emoticon packs."; + $this->ipsclass->admin->page_title = "Emoticon Management"; + $this->ipsclass->admin->nav[] = array( '', 'Import/Export Emoticon Packs' ); + if ( ! is_dir( CACHE_PATH. 'style_emoticons') ) { - $this->ipsclass->admin->error("Нельзя найти месторасположение директории со смайликами — убедитесь что путь к /style_emoticons/ указан верно."); + $this->ipsclass->admin->error("Could not locate the emoticons directory - make sure the 'style_emoticons' path is set correctly"); $this->ipsclass->admin->output(); } - + //----------------------------------------- // Get emoticon count //----------------------------------------- - + $this->ipsclass->DB->cache_add_query( 'admin_emo_count', array() ); $this->ipsclass->DB->cache_exec_query(); - + while( $r = $this->ipsclass->DB->fetch_row() ) { $emo_db[ $r['emo_set'] ] = $r; } - + //----------------------------------------- // Get emoticon folders //----------------------------------------- - + $emodirs = array(); $emodd = array(); - + $dh = opendir( CACHE_PATH.'style_emoticons' ); - + while ( FALSE !== ( $file = readdir( $dh ) ) ) { if (($file != ".") && ($file != "..")) @@ -850,134 +842,134 @@ class ad_emoticons { } } closedir( $dh ); - + //----------------------------------------- // EXPORT: Start table //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - + //----------------------------------------- // EXPORT: Start output //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'emo_packexport' ), 2 => array( 'act' , 'emoticons' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Экспорт директории" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Export an Emoticon Pack" ); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "Какую директорию смайликов экспортировать?
    Содержимое директории будет упаковано в XML-архив с изображениями и марекарми вызова смайликов (например :smile:)
    ", + "Export which emoticon group?
    An IPB Emoticon Pack is an XMLarchive of the images and activation words (i.e. :smile:)
    ", $this->ipsclass->adskin->form_dropdown( 'emo_set', $emodd ) ) ); - - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Запустить"); - + + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Export"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // IMPORT: Start table //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - + //----------------------------------------- // IMPORT: Start output //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'emo_packimport' ), 2 => array( 'act' , 'emoticons' ), 3 => array( 'MAX_FILE_SIZE', '10000000000' ), 4 => array( 'section', $this->ipsclass->section_code ), ) , "uploadform", " enctype='multipart/form-data'" ); - - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Импортирование директории" ); - + + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Import an Emoticon Pack" ); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "В какую существующую директорию произвести импортирование?", + "Import into which emoticon group?
    An IPB Emoticon Pack is an XMLarchive of the images and activation words (i.e. :smile:)
    ", $this->ipsclass->adskin->form_dropdown( 'emo_set', $emodd ) ) ); - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "ИЛИ Импортировать в новую директорию:
    Введите название новой директории смайликов.
    ", + "OR Import into a new group named:
    Enter the name of the new emoticon group.
    ", $this->ipsclass->adskin->form_input( 'new_emo_set' ) ) ); - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "Перезаписать существующие изображение и маркеры вызова смайликов?
    Если выбрано «Да», новые изображения заменят старые.
    ", + "Overwrite existing images and activation words?
    If yes, new images replace old
    ", $this->ipsclass->adskin->form_yes_no( 'overwrite' ) ) ); - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "Загрузка XML-архива смайликов
    Выберите файл для загрузки с вашего компьютера 'ipb_emoticons.xml' или 'ipb_emoticons.xml.gz'
    ", + "Upload XML Emoticon Archive
    Browse your computer for 'ipb_emoticons.xml' or 'ipb_emoticons.xml.gz'
    ", $this->ipsclass->adskin->form_upload( ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Запустить"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Import"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - + + $this->ipsclass->admin->output(); - + } - + //----------------------------------------- // EMOTICON EXPORT! EXPORT! EX... oh, that's abort isn't it? //----------------------------------------- - + function emoticon_pack_export() { //----------------------------------------- // Get xml mah-do-dah //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); $xml = new class_xml(); - + require_once( KERNEL_PATH.'class_xmlarchive.php' ); $xmlarchive = new class_xmlarchive(); - + //----------------------------------------- // Checkdamoonah //----------------------------------------- - + if ( ! $this->ipsclass->input['emo_set'] ) { - $this->ipsclass->main_msg = "Вы должны указать какую директорию смайликов экспортировать."; + $this->ipsclass->main_msg = "You must specify which emoticon group you wish to export"; } - + //----------------------------------------- // Get emowticuns //----------------------------------------- - + $emo_db = array(); - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'emoticons', 'where' => "emo_set='".$this->ipsclass->input['emo_set']."'" ) ); $this->ipsclass->DB->simple_exec(); - + while( $r = $this->ipsclass->DB->fetch_row() ) { $emo_db[ $r['image'] ] = $r; } - + //----------------------------------------- // Get ;) :D folders //----------------------------------------- - + $emodirs = array(); $emodd = array(); - + $dh = opendir( CACHE_PATH.'style_emoticons/'.$this->ipsclass->input['emo_set'] ); - + while ( FALSE !== ( $file = readdir( $dh ) ) ) { if (($file != ".") && ($file != "..")) @@ -988,106 +980,104 @@ class ad_emoticons { } } } - + closedir( $dh ); - + //----------------------------------------- // Add um into the ark-hive //----------------------------------------- - + foreach( $files_to_add as $f ) { $xmlarchive->xml_add_file( $f ); } - + //----------------------------------------- // Create the database archive... //----------------------------------------- - + $xml->xml_set_root( 'emoticonexport', array( 'exported' => time(), 'name' => $this->ipsclass->input['emo_set'] ) ); - + //----------------------------------------- // Get emo group //----------------------------------------- - + $xml->xml_add_group( 'emogroup' ); - + foreach( $emo_db as $r ) { $content = array(); - + $content[] = $xml->xml_build_simple_tag( 'typed' , $r['typed'] ); $content[] = $xml->xml_build_simple_tag( 'image' , $r['image'] ); $content[] = $xml->xml_build_simple_tag( 'clickable', $r['clickable'] ); - + $entry[] = $xml->xml_build_entry( 'emoticon', $content ); } - + $xml->xml_add_entry_to_group( 'emogroup', $entry ); - + $xml->xml_format_document(); - + //----------------------------------------- // Add in emoticons doc to archive //----------------------------------------- - + $xmlarchive->xml_add_file_contents( $xml->xml_document, 'emoticon_data.xml' ); - + $xmlarchive->xml_create_archive(); - + //----------------------------------------- // Create archive and send to // browser. //----------------------------------------- - + $imagearchive = $xmlarchive->xml_get_contents(); - + $this->ipsclass->admin->show_download( $imagearchive, 'ipb_emoticons.xml' ); - + } - - + + //----------------------------------------- // IMPORT THE EMOTICONS //----------------------------------------- - + function emoticon_pack_import() { $content = $this->ipsclass->admin->import_xml( 'ipb_emoticons.xml' ); - + //----------------------------------------- // Got anything? //----------------------------------------- - + if ( ! $content ) { - $this->ipsclass->main_msg = "Импортирование не соверешно, поскольку в файле «ipb_emoticons.xml» ошибка или он не имеет записей."; + $this->ipsclass->main_msg = "Upload failed, ipb_emoticons.xml was either missing or empty"; $this->emoticon_pack_splash(); } - + //----------------------------------------- // Get xml mah-do-dah //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); $xml = new class_xml(); - - $xml->lite_parser = 1; - + require_once( KERNEL_PATH.'class_xmlarchive.php' ); $xmlarchive = new class_xmlarchive(); - + $xmlarchive->xml_read_archive_data( $content ); - + //----------------------------------------- // Get the datafile //----------------------------------------- - + $emoticons = array(); $emoticon_data = array(); - + foreach( $xmlarchive->file_array as $f ) { if ( $f['filename'] == 'emoticon_data.xml' ) @@ -1099,111 +1089,111 @@ class ad_emoticons { $emoticons[ $f['filename'] ] = $f['content']; } } - + //----------------------------------------- // Unpack the datafile //----------------------------------------- - + $xml->xml_parse_document( $emoticon_data ); - + //----------------------------------------- // New set, old set - we're set! //----------------------------------------- - + if ( ! $this->ipsclass->input['emo_set'] and ! $this->ipsclass->input['new_emo_set'] ) { - $this->ipsclass->main_msg = "Вы должны указать в какую директорию произвести импортирование новых смайликов."; + $this->ipsclass->main_msg = "You must specify which emoticon group you wish to import into"; } - + $emo_set_dir = $this->ipsclass->input['emo_set']; - + $this->ipsclass->input['new_emo_set'] = preg_replace( "/[^a-zA-Z0-9\-_]/", "",$this->ipsclass->input['new_emo_set'] ); - + if ( $this->ipsclass->input['new_emo_set'] ) { $emo_set_dir = $this->ipsclass->input['new_emo_set']; - + //----------------------------------------- // Directory exists? //----------------------------------------- - + if ( file_exists( CACHE_PATH.'style_emoticons/'.$emo_set_dir ) ) { - $this->ipsclass->main_msg = "Директория «style_emoticons/{$emo_set_dir}» уже существует, выберите другие имя."; + $this->ipsclass->main_msg = "'style_emoticons/$emo_set_dir' already exists, please choose another name."; $this->emoticon_pack_splash(); } - + //----------------------------------------- // Create directory? //----------------------------------------- - + if ( @mkdir( CACHE_PATH.'style_emoticons/'.$emo_set_dir, 0777 ) ) { @chmod( CACHE_PATH.'style_emoticons/'.$emo_set_dir, 0777 ); } else { - $this->ipsclass->main_msg = ": IPB не может создать или отредактировать директорию за вас, пожалуйста, создайте сами (или удалите) директорию при помощи FTP в 'style_emoticons'"; + $this->ipsclass->main_msg = "IPB cannot create a new folder for you, please create the folder manually using FTP in 'style_emoticons'"; $this->emoticon_pack_splash(); } } - + //----------------------------------------- // Are we over writing? //----------------------------------------- - + $emo_image = array(); $emo_typed = array(); - + if ( $this->ipsclass->input['overwrite'] != 1 ) { $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'emoticons', 'where' => "emo_set='".$emo_set_dir."'" ) ); $this->ipsclass->DB->simple_exec(); - + while( $r = $this->ipsclass->DB->fetch_row() ) { $emo_image[ $r['image'] ] = 1; $emo_typed[ $r['typed'] ] = 1; } } - + foreach( $xml->xml_array['emoticonexport']['emogroup']['emoticon'] as $entry ) { $image = $entry['image']['VALUE']; $typed = $entry['typed']['VALUE']; $click = $entry['clickable']['VALUE']; - + if ( $emo_image[ $image ] or $emo_typed[ $typed ] ) { continue; } - + $file_extension = preg_replace( "#^.*\.(.+?)$#si", "\\1", strtolower( $image ) ); - + if ( ! in_array( $file_extension, $this->allowed_files ) ) { continue; } - + @unlink( CACHE_PATH.'style_emoticons/'.$emo_set_dir.'/'.$image ); - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'emoticons', 'where' => "typed='$typed' and image='$image' and emo_set='$emo_set_dir'" ) ); - + if ( $FH = fopen( CACHE_PATH.'style_emoticons/'.$emo_set_dir.'/'.$image, 'wb' ) ) { if ( fwrite( $FH, $emoticons[ $image ] ) ) { fclose( $FH ); - + $this->ipsclass->DB->do_insert( 'emoticons', array( 'typed' => $typed, 'image' => $image, 'clickable' => $click, 'emo_set' => $emo_set_dir ) ); } } - + // Let's add it to all other directories if // the image doesn't already exist - + $dh = opendir( CACHE_PATH.'style_emoticons' ); - + while ( FALSE !== ( $file = readdir( $dh ) ) ) { if (($file != ".") && ($file != "..")) @@ -1213,13 +1203,13 @@ class ad_emoticons { if( !file_exists( CACHE_PATH.'style_emoticons/'.$file.'/'.$image ) ) { $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'emoticons', 'where' => "typed='$typed' and image='$image' and emo_set='$file'" ) ); - + if ( $FH = fopen( CACHE_PATH.'style_emoticons/'.$file.'/'.$image, 'wb' ) ) { if ( fwrite( $FH, $emoticons[ $image ] ) ) { fclose( $FH ); - + $this->ipsclass->DB->do_insert( 'emoticons', array( 'typed' => $typed, 'image' => $image, 'clickable' => $click, 'emo_set' => $file ) ); } } @@ -1229,87 +1219,87 @@ class ad_emoticons { } closedir( $dh ); } - + $this->emoticon_rebuildcache(); - - $this->ipsclass->main_msg = "Импортирование XML-архива смайликов завершено."; - + + $this->ipsclass->main_msg = "Emoticon XMLarchive import completed"; + $this->emoticon_start(); - + } - - + + //----------------------------------------- // EMOTICON Manage //----------------------------------------- - + function emoticon_manage() { $this->ipsclass->input['id'] = trim($this->ipsclass->input['id']); - - $this->ipsclass->admin->nav[] = array( '', "Управление директорией «{$this->ipsclass->input['id']}»" ); - + + $this->ipsclass->admin->nav[] = array( '', 'Managing Set '.$this->ipsclass->input['id'] ); + if( $this->ipsclass->input['id'] == 'default' ) { - $this->ipsclass->admin->page_detail = "В этой секции вы можете добавлять, изменять и удалять смайлики.
    "; + $this->ipsclass->admin->page_detail = "You may add/edit or remove emoticons in this section.
    "; } - - $this->ipsclass->admin->page_detail .= "Атрибут «Нажимаемый» означает, что смайлик будет выведен в таблице смайликов при создании темы/сообщения"; - + + $this->ipsclass->admin->page_detail .= "Clickable refers to emoticons that are in the posting screens 'Clickable Emoticons' table."; + if( $this->ipsclass->input['id'] == 'default' ) { - $this->ipsclass->admin->page_detail = "
    В названиях смайликов нельзя использовать символ "."; - } - - $this->ipsclass->admin->page_title = "Управление смайликами"; + $this->ipsclass->admin->page_detail = "
    You may NOT use the character " in the emoticons code section."; + } + $this->ipsclass->admin->page_title = "Emoticon Control"; + //----------------------------------------- // Get emoticons for this group //----------------------------------------- - + $emo_db = array(); $emo_file = array(); - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'emoticons', 'where' => "emo_set='".$this->ipsclass->input['id']."'", 'order' => 'clickable DESC, image ASC' ) ); $this->ipsclass->DB->simple_exec(); - + while( $r = $this->ipsclass->DB->fetch_row() ) { $emo_db[ $r['image'] ] = $r; } - + $emo_file = array(); $emo_rfile = $this->emoticon_get_folder_contents( $this->ipsclass->input['id'] ); - + foreach( $emo_rfile as $ef ) { $emo_file[ $ef ] = $ef; } - + //----------------------------------------- // Start output //----------------------------------------- - + $per_row = 5; $td_width = 100 / $per_row; - + $this->ipsclass->html .= "
    -
    Список установленных смайликов в «{$this->ipsclass->input['id']}»
    +
    Assigned Emoticons in set '{$this->ipsclass->input['id']}'
    "; - + $count = 0; $smilies = "\n"; $poss_names = array(); - + foreach( $emo_db as $image => $data ) { $count++; - + unset( $emo_file[ $image ] ); - + if ( $data['clickable'] ) { $click = 'checked="checked"'; @@ -1320,7 +1310,7 @@ class ad_emoticons { $click = ''; $class = 'tablerow2'; } - + $smilies .= ""; - + if ($count == $per_row ) { $smilies .= "\n\n"; $count = 0; } - + $poss_names[$data['typed']] = $data['typed']; } - + $smilies = preg_replace( "#style_emoticons#", $this->ipsclass->vars['board_url'].'/style_emoticons', $smilies ); - + if ( $count > 0 and $count != $per_row ) { for ($i = $count ; $i < $per_row ; ++$i) { $smilies .= "\n"; } - + $smilies .= ""; } - - + + $this->ipsclass->html .= $smilies; - + $this->ipsclass->html .= "
    {$image} @@ -1329,7 +1319,7 @@ class ad_emoticons { if( $this->ipsclass->input['id'] == 'default' ) { - $smilies .= "ipsclass->input['id']}' title='Удалить'>Удалить + $smilies .= "ipsclass->input['id']}' title='Remove this emoticon'>Delete
    "; } @@ -1337,147 +1327,147 @@ class ad_emoticons { { $smilies .= "

    {$data['typed']}"; } - - $smilies .= "

    Нажимаемый? + + $smilies .= "

    Clickable?
     
    -

    "; - - +

    "; + + //----------------------------------------- // Images left in the dir? //----------------------------------------- - + if ( count( $emo_file ) && $this->ipsclass->input['id'] == 'default' ) { $this->ipsclass->html .= "
    -
    Список неустановленных смайликов в «{$this->ipsclass->input['id']}»
    +
    Unassigned images in folder '{$this->ipsclass->input['id']}'
    "; - + $count = 0; $smilies = "\n"; - + $master_count = 0; - + foreach( $emo_file as $image ) { $count++; $master_count++; - + $poss_name = ':'.preg_replace( "/(.*)(\..+?)$/", "\\1", $image ).':'; - + if ( isset($poss_names[ $poss_name ]) AND $poss_names[ $poss_name ] ) { $poss_name = preg_replace( "/:$/", "2:", $poss_name ); } - + $smilies .= ""; - + if ($count == $per_row ) { $smilies .= "\n\n"; $count = 0; } } - + if ( $count > 0 and $count != $per_row ) { for ($i = $count ; $i < $per_row ; ++$i) { $smilies .= "\n"; } - + $smilies .= ""; } - + $smilies = preg_replace( "#style_emoticons#", $this->ipsclass->vars['board_url'].'/style_emoticons', $smilies ); - - + + $this->ipsclass->html .= $smilies; - + $this->ipsclass->html .= "
    {$image} -   Добавить +   Add
    - Вызов: -

    Нажимаемый? + Type: +

    Clickable?
     
    -
      
    "; +
      
    "; } - + $this->ipsclass->admin->output(); - + } - + //----------------------------------------- // EMOTICON Rebuild Cache //----------------------------------------- - + function emoticon_rebuildcache() { require_once ROOT_PATH.'sources/classes/bbcode/class_bbcode_core.php'; - + $this->ipsclass->cache['emoticons'] = array(); - + $this->ipsclass->DB->simple_construct( array( 'select' => 'typed,image,clickable,emo_set', 'from' => 'emoticons' ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $this->ipsclass->cache['emoticons'][] = $r; } - + usort( $this->ipsclass->cache['emoticons'] , array( 'class_bbcode_core', 'smilie_length_sort' ) ); - + $this->ipsclass->update_cache( array( 'name' => 'emoticons', 'array' => 1, 'deletefirst' => 1 ) ); } - + //----------------------------------------- // EMOTICON Get folder contents //----------------------------------------- - + function emoticon_get_folder_contents($folder='default') { $files = array(); - + //----------------------------------------- // Get emoticon folders //----------------------------------------- - + $dh = opendir( CACHE_PATH.'style_emoticons/'.$folder ); - + while ( FALSE !== ( $file = readdir( $dh ) ) ) { if ( ($file != ".") && ($file != "..") ) @@ -1488,14 +1478,14 @@ class ad_emoticons { } } } - + closedir( $dh ); - + return $files; } - - + + function perly_length_sort($a, $b) { if ( strlen($a['typed']) == strlen($b['typed']) ) @@ -1504,7 +1494,7 @@ class ad_emoticons { } return ( strlen($a['typed']) > strlen($b['typed']) ) ? -1 : 1; } - + function perly_word_sort($a, $b) { if ( strlen($a['type']) == strlen($b['type']) ) @@ -1513,8 +1503,8 @@ class ad_emoticons { } return ( strlen($a['type']) > strlen($b['type']) ) ? -1 : 1; } - + } -?> +?> \ No newline at end of file diff --git a/upload/sources/action_admin/forums.php b/upload/sources/action_admin/forums.php index 0759547c..8a60d7fd 100644 --- a/upload/sources/action_admin/forums.php +++ b/upload/sources/action_admin/forums.php @@ -2,25 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-12-11 17:58:35 -0500 (Mon, 11 Dec 2006) $ -| > $Revision: 783 $ +| > $Date: 2008-02-29 18:09:47 -0500 (Fri, 29 Feb 2008) $ +| > $Revision: 1197 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -35,7 +27,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -45,49 +37,49 @@ class ad_forums var $ipsclass; var $html; var $forumfunc; - + var $base_url; - + /** * Section title name * * @var string */ var $perm_main = "content"; - + /** * Section title name * * @var string */ var $perm_child = "forum"; - + /*-------------------------------------------------------------------------*/ // RUN! /*-------------------------------------------------------------------------*/ - + function auto_run() { $this->ipsclass->input['showall'] = isset($this->ipsclass->input['showall']) ? $this->ipsclass->input['showall'] : 0; - + $this->ipsclass->forums->forums_init(); - + //----------------------------------------- // Load class //----------------------------------------- - + require ROOT_PATH.'sources/lib/admin_forum_functions.php'; - + $this->forumfunc = new admin_forum_functions(); $this->forumfunc->ipsclass =& $this->ipsclass; - + //----------------------------------------- // LOAD HTML //----------------------------------------- - + $this->html = $this->ipsclass->acp_load_template('cp_skin_forums'); $this->forumfunc->html =& $this->html; - + //----------------------------------------- // To do... //----------------------------------------- @@ -174,225 +166,225 @@ class ad_forums $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':skin' ); $this->do_skin_edit(); break; - //----------------------------------------- + //----------------------------------------- default: $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->show_forums(); break; } } - + /*-------------------------------------------------------------------------*/ // Edit forum skins /*-------------------------------------------------------------------------*/ - + function skin_edit() { if ($this->ipsclass->input['f'] == "") { - $this->ipsclass->admin->error("Невозможно определить ID форума, чтобы очистить его."); + $this->ipsclass->admin->error("Could not determine the forum ID to empty."); } - + $forum = $this->ipsclass->forums->forum_by_id[ $this->ipsclass->input['f'] ]; - + //----------------------------------------- // Make sure we have a legal forum //----------------------------------------- - + if ( ! $forum['id'] ) { - $this->ipsclass->admin->error("Нельзя изменить ID этого Форума"); + $this->ipsclass->admin->error("Could not resolve that forum ID"); } - + if ( ! $forum['skin_id'] ) { $forum['skin_id'] = -1; } - + //----------------------------------------- // Get skins.. //----------------------------------------- - + $tmp = $this->ipsclass->skin['_setid']; - + $this->ipsclass->skin['_setid'] = $forum['skin_id']; - + require_once( ROOT_PATH.'sources/classes/class_display.php' ); $display = new display(); $display->ipsclass =& $this->ipsclass; - + $skin_list = $display->_build_skin_list(); - + $this->ipsclass->skin['_setid'] = $tmp; - + //----------------------------------------- // Do form.. //----------------------------------------- - - $this->ipsclass->admin->page_title = "Установка стиля для форума или категории"; - $this->ipsclass->admin->page_detail = "В этой секции вы можете установить или удалить стиль для выбранного форума или категории.
    Выбранный стиль будет автоматически заменять стиль, который используют пользователи по умолчанию."; - + + $this->ipsclass->admin->page_title = "Forum Skin Options"; + $this->ipsclass->admin->page_detail = "You may choose to either add or remove a skin set to this forum. The skin choice will override the users choice."; + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doskinedit'), 2 => array( 'act' , 'forum' ), 3 => array( 'section', 'content' ), 4 => array( 'f' , $this->ipsclass->input['f'] ), ) ); - - + + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Установка стиля для «{$forum['name']}»" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Какой стиль установить для этого форума?" , - "" + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Skin choices for forum: {$forum['name']}" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Apply which skin to this forum?" , + "" ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Применить ко всем подфорумам?" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Apply to all children of this forum (all sub-forums)" , $this->ipsclass->adskin->form_yes_no( 'apply_to_children' ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Изменить"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Edit forum skin options"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // Complete forum skin edit /*-------------------------------------------------------------------------*/ - + function do_skin_edit() { if ($this->ipsclass->input['f'] == "") { - $this->ipsclass->admin->error("Невозможно определить ID форума, чтобы принять этот стиль."); + $this->ipsclass->admin->error("Could not determine the forum ID to apply this skin to."); } - + $forum = $this->ipsclass->forums->forum_by_id[ $this->ipsclass->input['f'] ]; - + //----------------------------------------- // Make sure we have a legal forum //----------------------------------------- - + $this->ipsclass->DB->do_update( 'forums', array( 'skin_id' => $this->ipsclass->input['fsid'] ), 'id='.$this->ipsclass->input['f'] ); - + //----------------------------------------- // Find children? //----------------------------------------- - + if ( $this->ipsclass->input['apply_to_children'] ) { //----------------------------------------- // Get children! //----------------------------------------- - + $ids = $this->ipsclass->forums->forums_get_children( $this->ipsclass->input['f'] ); - + if ( count( $ids ) ) { $this->ipsclass->DB->do_update( 'forums', array( 'skin_id' => $this->ipsclass->input['fsid'] ), 'id IN ('.implode(",",$ids).')' ); } } - - $this->ipsclass->main_msg = "Шаблон форума обновлен"; - + + $this->ipsclass->main_msg = "Forum skin updated"; + $this->recache_forums(); - + $this->ipsclass->forums->forums_init(); - + //----------------------------------------- // Bounce back to parent... //----------------------------------------- - + $this->ipsclass->input['f'] = $this->ipsclass->forums->forum_by_id[ $this->ipsclass->input['f'] ]['parent_id']; $this->show_forums(); } - + /*-------------------------------------------------------------------------*/ // Show forum rules /*-------------------------------------------------------------------------*/ - + function show_rules() { if ($this->ipsclass->input['f'] == "") { - $this->ipsclass->admin->error("Невозможно определить ID форума, чтобы очистить его."); + $this->ipsclass->admin->error("Could not determine the forum ID to empty."); } - + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, show_rules, rules_title, rules_text', 'from' => 'forums', 'where' => "id=".$this->ipsclass->input['f'] ) ); $this->ipsclass->DB->simple_exec(); - + //----------------------------------------- // Make sure we have a legal forum //----------------------------------------- - + if ( ! $this->ipsclass->DB->get_num_rows() ) { - $this->ipsclass->admin->error("Нельзя изменить ID этого Форума"); + $this->ipsclass->admin->error("Could not resolve that forum ID"); } - + $forum = $this->ipsclass->DB->fetch_row(); - + //----------------------------------------- // Load and config the std/rte editors //----------------------------------------- - + require_once( ROOT_PATH."sources/handlers/han_editor.php" ); $this->han_editor = new han_editor(); $this->han_editor->ipsclass =& $this->ipsclass; + $this->han_editor->from_acp = 1; $this->han_editor->init(); - $this->han_editor->from_acp = 1; - + $this->han_editor->ed_width = "550px"; $this->han_editor->ed_height = "200px"; $this->ipsclass->vars['rte_width'] = "500px"; $this->ipsclass->vars['rte_height'] = "200px"; - + //----------------------------------------- // Load and config the post parser //----------------------------------------- - + require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); $this->parser = new parse_bbcode(); $this->parser->ipsclass =& $this->ipsclass; $this->parser->allow_update_caches = 1; - - $this->parser->bypass_badwords = 1; - + + $this->parser->bypass_badwords = 1; + //----------------------------------------- - - $this->ipsclass->admin->page_title = "Правила форума"; - $this->ipsclass->admin->page_detail = "В этой секции вы можете добавлять, изменять и удалять отображаемые правила выбранного форума"; - + + $this->ipsclass->admin->page_title = "Forum Rules"; + $this->ipsclass->admin->page_detail = "You may edit, add, remove or change the state of the forum rules display"; + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'dorules'), 2 => array( 'act' , 'forum' ), 3 => array( 'section', 'content' ), 4 => array( 'f' , $this->ipsclass->input['f'] ), ), "theAdminForm", "onclick='return ValidateForm();'", "postingform" ); - - + + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Настройки правил форума" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Способ отображения" , + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Forum Rules set up" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Display method" , $this->ipsclass->adskin->form_dropdown( "show_rules", - array( - 0 => array( '0' , 'Не показывать' ), - 1 => array( '1' , 'Показывать только ссылку' ), - 2 => array( '2' , 'Показывать весь текст' ) + array( + 0 => array( '0' , 'Don\'t Show' ), + 1 => array( '1' , 'Show Link Only' ), + 2 => array( '2' , 'Show full text' ) ), $forum['show_rules'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Заголовок правил" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Rules Title" , $this->ipsclass->adskin->form_input("title", $this->ipsclass->txt_stripslashes(str_replace( "'", ''', $forum['rules_title']))) ) ); - + if ( $this->han_editor->method == 'rte' ) { $forum['rules_text'] = $this->parser->pre_display_parse( $this->parser->pre_db_parse( $forum['rules_text'] ) ); @@ -404,364 +396,368 @@ class ad_forums $this->parser->parse_nl2br = 1; $this->parser->parse_smilies = 0; $this->parser->parse_bbcode = 1; - + $forum['rules_text'] = $this->parser->pre_edit_parse( $forum['rules_text'] ); } - + $form_element = $this->han_editor->show_editor( $forum['rules_text'], 'body' ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Текст" , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Rules Text
    (HTML Editing Mode)" , $form_element ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Сохранить изменения"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Edit forum rules"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // Save forum rules /*-------------------------------------------------------------------------*/ - + function do_rules() { if ($this->ipsclass->input['f'] == "") { - $this->ipsclass->admin->error("Невозможно определить ID форума, чтобы очистить его."); + $this->ipsclass->admin->error("Could not determine the forum ID to empty."); } - + //----------------------------------------- // Load and config the std/rte editors //----------------------------------------- - + require_once( ROOT_PATH."sources/handlers/han_editor.php" ); $this->han_editor = new han_editor(); $this->han_editor->ipsclass =& $this->ipsclass; + $this->han_editor->from_acp = 1; $this->han_editor->init(); - + //----------------------------------------- // Load and config the post parser //----------------------------------------- - + require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); $this->parser = new parse_bbcode(); $this->parser->ipsclass =& $this->ipsclass; $this->parser->allow_update_caches = 1; - + $this->parser->bypass_badwords = 1; - + $_POST[ 'body' ] = $this->han_editor->process_raw_post( 'body' ); $this->parser->parse_smilies = 0; $this->parser->parse_html = 1; $this->parser->parse_bbcode = 1; - $_POST[ 'body' ] = $this->parser->pre_display_parse( $this->parser->pre_db_parse( $_POST[ 'body' ] ) ); - - $rules = array( + $_POST[ 'body' ] = $this->parser->pre_display_parse( $this->parser->pre_db_parse( $_POST[ 'body' ] ) ); + + $rules = array( 'rules_title' => $this->ipsclass->admin->make_safe($this->ipsclass->txt_stripslashes($_POST['title'])), 'rules_text' => $this->ipsclass->admin->make_safe($_POST['body']), 'show_rules' => $this->ipsclass->input['show_rules'] ); - + $this->ipsclass->DB->do_update( 'forums', $rules, 'id='.$this->ipsclass->input['f'] ); - + $this->recache_forums(); - $this->ipsclass->main_msg = "Правила форума обновлены"; - + $this->ipsclass->main_msg = "Forum rules updated"; + //----------------------------------------- // Bounce back to parent... //----------------------------------------- - + $this->ipsclass->input['f'] = $this->ipsclass->forums->forum_by_id[ $this->ipsclass->input['f'] ]['parent_id']; $this->show_forums(); } - + /*-------------------------------------------------------------------------*/ // RECOUNT FORUM: Recounts topics and posts /*-------------------------------------------------------------------------*/ - + function recount($f_override="") { if ($f_override != "") { // Internal call, remap - + $this->ipsclass->input['f'] = $f_override; } - + require_once( ROOT_PATH.'sources/lib/func_mod.php' ); $modfunc = new func_mod(); $modfunc->ipsclass =& $this->ipsclass; - + $modfunc->forum_recount($this->ipsclass->input['f']); $this->recache_forums(); - - $this->ipsclass->admin->save_log("Все сообщения на форуме пересчитаны '{$this->ipsclass->forums->forum_by_id[$this->ipsclass->input['f']]['name']}'"); - - $this->ipsclass->main_msg = "Форум ресинхронизирован"; - + + $this->ipsclass->admin->save_log("Recounted posts in forum '{$this->ipsclass->forums->forum_by_id[$this->ipsclass->input['f']]['name']}'"); + + $this->ipsclass->main_msg = "Forum resynschronized"; + //----------------------------------------- // Bounce back to parent... //----------------------------------------- - + $this->ipsclass->input['f'] = $this->ipsclass->forums->forum_by_id[ $this->ipsclass->input['f'] ]['parent_id']; $this->show_forums(); } - + /*-------------------------------------------------------------------------*/ // EMPTY FORUM: Removes all topics and posts, etc. /*-------------------------------------------------------------------------*/ - + function empty_form() { $form_array = array(); - + if ($this->ipsclass->input['f'] == "") { - $this->ipsclass->admin->error("Невозможно определить ID форума, чтобы очистить его."); + $this->ipsclass->admin->error("Could not determine the forum ID to empty."); } - + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name', 'from' => 'forums', 'where' => "id=".$this->ipsclass->input['f'] ) ); $this->ipsclass->DB->simple_exec(); - + //----------------------------------------- // Make sure we have a legal forum //----------------------------------------- - + if ( !$this->ipsclass->DB->get_num_rows() ) { - $this->ipsclass->admin->error("Нельзя изменить ID этого Форума"); + $this->ipsclass->admin->error("Could not resolve that forum ID"); } - + $forum = $this->ipsclass->DB->fetch_row(); - + //----------------------------------------- - - $this->ipsclass->admin->page_title = "Очистить форум '{$forum['name']}'"; - - $this->ipsclass->admin->page_detail = "ЭТА ОПЦИЯ УДАЛЯЕТ ВСЕ ТЕМЫ, СООБЩЕНИЯ И ГОЛОСОВАНИЯ.
    Сам же форум не будет удален - убедитесь в том, что это действительно необходимо."; - + + $this->ipsclass->admin->page_title = "Empty Forum '{$forum['name']}'"; + + $this->ipsclass->admin->page_detail = "This WILL DELETE ALL TOPICS, POSTS AND POLLS.
    The forum itself will not be deleted - please ensure you wish to carry out this action before continuing."; + //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doempty' ), 2 => array( 'act' , 'forum' ), 3 => array( 'section' , 'content' ), 4 => array( 'f' , $this->ipsclass->input['f'] ), 5 => array( 'name' , $forum['name'] ), ) ); - + //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Очистка форума '{$forum['name']}'" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Очистить форум: " , $forum['name'] ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Очистить этот форум"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Empty Forum '{$forum['name']}'" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Forum to empty: " , $forum['name'] ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Empty this forum"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // Do empty /*-------------------------------------------------------------------------*/ - + function do_empty() { //----------------------------------------- // Get module //----------------------------------------- - + require_once( ROOT_PATH.'sources/lib/func_mod.php' ); $modfunc = new func_mod(); $modfunc->ipsclass =& $this->ipsclass; - + if ($this->ipsclass->input['f'] == "") { - $this->ipsclass->admin->error("Невозможно определить ID форума"); + $this->ipsclass->admin->error("Could not determine the source forum ID."); } - + //----------------------------------------- // Check to make sure its a valid forum. //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, posts, topics', 'from' => 'forums', 'where' => "id=".$this->ipsclass->input['f'] ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $forum = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Невозможно определить ID форума"); + $this->ipsclass->admin->error("Could not get the forum details for the forum to empty"); } - + $this->ipsclass->DB->simple_construct( array( 'select' => 'tid', 'from' => 'topics', 'where' => "forum_id=".$this->ipsclass->input['f'] ) ); $outer = $this->ipsclass->DB->simple_exec(); - + //----------------------------------------- // What to do.. //----------------------------------------- - + while( $t = $this->ipsclass->DB->fetch_row($outer) ) { $modfunc->topic_delete($t['tid']); } - + //----------------------------------------- // Rebuild stats //----------------------------------------- - + $modfunc->forum_recount($this->ipsclass->input['f']); $modfunc->stats_recount(); - + //----------------------------------------- // Rebuild forum cache //----------------------------------------- - + $this->recache_forums(); - - $this->ipsclass->admin->save_log("'{$this->ipsclass->input['name']}' очищен от всех сообщений"); - + + $this->ipsclass->admin->save_log("Emptied forum '{$this->ipsclass->input['name']}' of all posts"); + $this->ipsclass->input['f'] = $this->ipsclass->forums->forum_by_id[ $this->ipsclass->input['f'] ]['parent_id']; - $this->ipsclass->main_msg = "Форум очищен ;("; + $this->ipsclass->main_msg = "Forum emptied"; $this->show_forums(); } - + /*-------------------------------------------------------------------------*/ // REMOVE FORUM /*-------------------------------------------------------------------------*/ - + function delete_form() { $form_array = array(); - + $this->ipsclass->input['f'] = intval($this->ipsclass->input['f']); - + if ( ! $this->ipsclass->input['f'] ) { - $this->ipsclass->admin->error("Невозможно определить ID форума, чтобы удалить."); + $this->ipsclass->admin->error("Could not determine the forum or category ID to delete."); } - - $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name', 'from' => 'forums', 'order' => 'position' ) ); + + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, parent_id', 'from' => 'forums', 'order' => 'position' ) ); $this->ipsclass->DB->simple_exec(); - + //----------------------------------------- // Make sure we have more than 1 // forum.. //----------------------------------------- - + if ( $this->ipsclass->DB->get_num_rows() < 2 ) { - $this->ipsclass->admin->error("Вы не можете удалить этот форум, создайте хоть один форум кроме этого для удаления выбранного форума."); + $this->ipsclass->admin->error("Can not remove this forum, please create another before attempting to remove this one"); } - + while ( $r = $this->ipsclass->DB->fetch_row() ) { if ($r['id'] == $this->ipsclass->input['f']) { - $name = $r['name']; + $name = $r['name']; + $is_cat = $r['parent_id'] > 0 ? 0 : 1; continue; } } - + $form_array = $this->forumfunc->ad_forums_forum_list(1); - + //----------------------------------------- // Count the number of topics //----------------------------------------- - + $posts = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as count', 'from' => 'topics', 'where' => 'forum_id='.$this->ipsclass->input['f'] ) ); - + //----------------------------------------- // Count the number of children //----------------------------------------- - + $children = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as count', 'from' => 'forums', 'where' => 'parent_id='.$this->ipsclass->input['f'] ) ); - + //----------------------------------------- // Start form //----------------------------------------- - - $this->ipsclass->admin->page_title = "Удаление форума '$name'"; - - $this->ipsclass->admin->page_detail = "До того как вы удалите этот форум: если выбранный форум не пуст, выберите, что вы будете делать с сообщениями этого форума."; - + + $text = $is_cat ? "Category" : "Forum"; + + $this->ipsclass->admin->page_title = "Removing {$text} '{$name}'"; + + $this->ipsclass->admin->page_detail = "Before we remove this {$text}, if this {$text} is not empty, we need to determine what to do with any topics and posts you may have left in this {$text}."; + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'dodelete'), 2 => array( 'act' , 'forum' ), 3 => array( 'section', 'content' ), 4 => array( 'f' , $this->ipsclass->input['f'] ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - + //----------------------------------------- // Main form //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Дополнительная информация" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Удалить форум: " , $name ) ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Required" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "{$text} to remove: " , $name ) ); + if ( $posts['count'] ) { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Переместить все имеющиеся темы и сообщения в этом форуме в другой?" , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Move all existing topics and posts in this {$text} to which forum?" , $this->ipsclass->adskin->form_dropdown( "MOVE_ID", $form_array ) ) ); - + } - + if ( $children['count'] ) { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Переместить все существующие темы, сообщения и голосования из этого форума в форум:" , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Move all children forums to which forum or category?" , $this->ipsclass->adskin->form_dropdown( "new_parent_id", $form_array ) ) ); } - - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form( "Удалить форум" ); - + + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form( "Remove {$text}" ); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // PROCESS DELETE /*-------------------------------------------------------------------------*/ - + function do_delete() { //----------------------------------------- // Auth check... //----------------------------------------- - + $this->ipsclass->admin->security_auth_check(); - + //----------------------------------------- // Continue //----------------------------------------- - + $this->ipsclass->input['f'] = intval($this->ipsclass->input['f']); $this->ipsclass->input['MOVE_ID'] = intval($this->ipsclass->input['MOVE_ID']); $this->ipsclass->input['new_parent_id'] = intval($this->ipsclass->input['new_parent_id']); - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forums', 'where' => "id=".$this->ipsclass->input['f'] ) ); $this->ipsclass->DB->simple_exec(); - + $forum = $this->ipsclass->DB->fetch_row(); - + if ( ! $this->ipsclass->input['f'] ) { - $this->ipsclass->admin->error("Невозможно определить источник ID форума."); + $this->ipsclass->admin->error("Could not determine the source forum ID."); } - + if ( ! $this->ipsclass->input['new_parent_id'] ) { $this->ipsclass->input['new_parent_id'] = -1; @@ -770,264 +766,272 @@ class ad_forums { if ( $this->ipsclass->input['new_parent_id'] == $this->ipsclass->input['f'] ) { - $this->ipsclass->main_msg = "Вы не можете переместить подфорумы в удаляемый форум!"; + $this->ipsclass->main_msg = "You cannot move children forums to the forum you're removing!"; $this->delete_form(); } } - + //----------------------------------------- // Get library //----------------------------------------- - + require_once( ROOT_PATH.'sources/lib/func_mod.php' ); $modfunc = new func_mod(); $modfunc->ipsclass =& $this->ipsclass; - + //----------------------------------------- // Move stuff //----------------------------------------- - + if ( $this->ipsclass->input['MOVE_ID'] ) { if ( $this->ipsclass->input['MOVE_ID'] == $this->ipsclass->input['f'] ) { - $this->ipsclass->main_msg = "Вы не можете переместить темы, сообщения и голосования в удаляемый форум!"; + $this->ipsclass->main_msg = "You cannot move topics into the forum you're removing!"; $this->delete_form(); } - + //----------------------------------------- // Move topics... //----------------------------------------- - + $this->ipsclass->DB->do_update( 'topics', array( 'forum_id' => $this->ipsclass->input['MOVE_ID'] ), 'forum_id='.$this->ipsclass->input['f'] ); - + //----------------------------------------- // Move polls... //----------------------------------------- - + $this->ipsclass->DB->do_update( 'polls', array( 'forum_id' => $this->ipsclass->input['MOVE_ID'] ), 'forum_id='.$this->ipsclass->input['f'] ); - + //----------------------------------------- // Move voters... //----------------------------------------- - + $this->ipsclass->DB->do_update( 'voters', array( 'forum_id' => $this->ipsclass->input['MOVE_ID'] ), 'forum_id='.$this->ipsclass->input['f'] ); - + $modfunc->forum_recount( $this->ipsclass->input['MOVE_ID'] ); } - + //----------------------------------------- // Delete the forum //----------------------------------------- - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'forums', 'where' => "id=".$this->ipsclass->input['f'] ) ); - + //----------------------------------------- // Delete any moderators, if any.. //----------------------------------------- - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'moderators', 'where' => "forum_id=".$this->ipsclass->input['f'] ) ); - + //----------------------------------------- // Delete forum subscriptions //----------------------------------------- - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'forum_tracker', 'where' => "forum_id=".$this->ipsclass->input['f'] ) ); - + //----------------------------------------- // Update children //----------------------------------------- - - if ( ! $this->ipsclass->input['new_parent_id'] ) - { - $this->ipsclass->input['new_parent_id'] = -1; - } - + $this->ipsclass->DB->do_update( 'forums', array( 'parent_id' => $this->ipsclass->input['new_parent_id'] ), "parent_id={$this->ipsclass->input['f']}" ); - + //----------------------------------------- // Rebuild forum cache //----------------------------------------- - + $this->recache_forums(); - + //----------------------------------------- // Rebuild moderator cache //----------------------------------------- - + require_once( ROOT_PATH.'sources/action_admin/moderator.php' ); $moderator = new ad_moderator(); $moderator->ipsclass =& $this->ipsclass; - + $moderator->rebuild_moderator_cache(); - - $this->ipsclass->admin->save_log("Форум удален '{$forum['name']}'"); - - $this->ipsclass->admin->done_screen("Форум был успешно удален", "Управление форумом", $this->ipsclass->form_code, 'redirect' ); + + $this->ipsclass->admin->save_log("Removed forum '{$forum['name']}'"); + + $this->ipsclass->admin->done_screen("Forum Removed", "Forum Control", $this->ipsclass->form_code, 'redirect' ); } - + /*-------------------------------------------------------------------------*/ // ADD / EDIT FORUM /*-------------------------------------------------------------------------*/ - function forum_form( $type='edit' ) + function forum_form( $type='edit', $changetype=0 ) { //----------------------------------------- // INIT //----------------------------------------- - + $addnew_type = ( isset($this->ipsclass->input['type']) AND $this->ipsclass->input['type'] ) ? $this->ipsclass->input['type'] : 'forum'; - + $form = array(); $forum = array(); $forum_id = isset($this->ipsclass->input['f']) ? intval($this->ipsclass->input['f']) : 0; $parentid = intval($this->ipsclass->input['p']) ? intval($this->ipsclass->input['p']) : -1; $cat_id = isset($this->ipsclass->input['c']) ? intval($this->ipsclass->input['c']) : 0; - $f_name = isset($_REQUEST['name']) ? $this->ipsclass->parse_clean_value(urldecode($_REQUEST['name'])) : ''; + $f_name = isset($this->ipsclass->input['name']) ? $this->ipsclass->input['name'] : ''; $subcanpost = ( $cat_id == 1 ) ? 0 : 1; $perm_matrix = ""; - $dd_state = array( 0 => array( 1, 'активный' ), 1 => array( 0, 'только для чтения архивов' ) ); + $dd_state = array( 0 => array( 1, 'Active' ), 1 => array( 0, 'Read Only Archive' ) ); $dd_moderate = array( - 0 => array( 0, 'нет' ), - 1 => array( 1, 'все новые темы и сообщения' ), - 2 => array( 2, 'новые темы' ), - 3 => array( 3, 'только новые ответы' ), + 0 => array( 0, 'No' ), + 1 => array( 1, 'Moderate all new topics and all replies' ), + 2 => array( 2, 'Moderate new topics but don\'t moderate replies' ), + 3 => array( 3, 'Moderate replies but don\'t moderate new topics' ), ); - $dd_prune = array( - 0 => array( 1, 'день' ), - 1 => array( 5, '5 дней' ), - 2 => array( 7, '7 дней' ), - 3 => array( 10, '10 дней' ), - 4 => array( 15, '15 дней' ), - 5 => array( 20, '20 дней' ), - 6 => array( 25, '25 дней' ), - 7 => array( 30, '30 дней' ), - 8 => array( 60, '60 дней' ), - 9 => array( 90, '90 дней' ), - 10=> array( 100,'все время' ), + $dd_prune = array( + 0 => array( 1, 'Today' ), + 1 => array( 5, 'Last 5 days' ), + 2 => array( 7, 'Last 7 days' ), + 3 => array( 10, 'Last 10 days' ), + 4 => array( 15, 'Last 15 days' ), + 5 => array( 20, 'Last 20 days' ), + 6 => array( 25, 'Last 25 days' ), + 7 => array( 30, 'Last 30 days' ), + 8 => array( 60, 'Last 60 days' ), + 9 => array( 90, 'Last 90 days' ), + 10=> array( 100,'Show All' ), ); - - $dd_order = array( - 0 => array( 'last_post', 'по дате последнего сообщения' ), - 1 => array( 'title' , 'названиям тем' ), - 2 => array( 'starter_name', 'автору тем' ), - 3 => array( 'posts' , 'сообщениям в темах' ), - 4 => array( 'views' , 'просмотру тем' ), - 5 => array( 'start_date', 'дате создания тем' ), - 6 => array( 'last_poster_name' , 'последним авторам' ) + + $dd_order = array( + 0 => array( 'last_post', 'Date of the last post' ), + 1 => array( 'title' , 'Topic Title' ), + 2 => array( 'starter_name', 'Topic Starters Name' ), + 3 => array( 'posts' , 'Topic Posts' ), + 4 => array( 'views' , 'Topic Views' ), + 5 => array( 'start_date', 'Date topic started' ), + 6 => array( 'last_poster_name' , 'Name of the last poster' ) ); - - - - $dd_by = array( - 0 => array( 'Z-A', 'по убыванию (Я—А, 0—10)' ), - 1 => array( 'A-Z', 'по возрастанию (А—Я, 10—0)' ) + + + + $dd_by = array( + 0 => array( 'Z-A', 'Descending (Z - A, 0 - 10)' ), + 1 => array( 'A-Z', 'Ascending (A - Z, 10 - 0)' ) ); - + $dd_filter = array( - 0 => array( 'all', 'все темы' ), - 1 => array( 'open', 'открытые темы' ), - 2 => array( 'hot', 'горячие темы' ), - 3 => array( 'poll', 'опросы' ), - 4 => array( 'locked', 'закрытые темы' ), - 5 => array( 'moved', 'открытые темы' ), - 6 => array( 'istarted', 'темы, созданные пользователем' ), - 7 => array( 'ireplied', 'темы, с ответами пользователя' ), + 0 => array( 'all', 'All Topics' ), + 1 => array( 'open', 'Open Topics' ), + 2 => array( 'hot', 'Hot Topics' ), + 3 => array( 'poll', 'Polls' ), + 4 => array( 'locked', 'Locked Topics' ), + 5 => array( 'moved', 'Moved Topics' ), + 6 => array( 'istarted', 'Topics Reader Started' ), + 7 => array( 'ireplied', 'Topics Reader Replied' ), ); - - + + //----------------------------------------- // Set up title, desc //----------------------------------------- - - $this->ipsclass->admin->page_detail = "Эта секция позволяет вам добавлять новые и изменять уже существующие форумы или категории.
    Если вы хотите установить маски доступа к существующему форуму (такие как возможность просмотра форума, создание тем, ответы и загрузки) нажмите на «Маски доступа»."; - + + $this->ipsclass->admin->page_detail = "This section will allow you to add or edit an existing {$addnew_type}. If you wish to adjust the forum permissions (who has the ability to + start, reply and read topics) click on 'Edit Permissions on the Forums and Categories overview."; + //----------------------------------------- // EDIT //----------------------------------------- - + if ( $type == 'edit' ) { //----------------------------------------- // Check //----------------------------------------- - + if ( ! $forum_id ) { - $this->ipsclass->admin->error("Вы не выбрали форум для редактирования!"); + $this->ipsclass->admin->error("You didn't choose a forum to edit, duh!"); } - + //----------------------------------------- // Do not show forum in forum list //----------------------------------------- - + $this->forumfunc->exclude_from_list = $forum_id; - + //----------------------------------------- // Get this forum //----------------------------------------- - + $forum = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'forums', 'where' => 'id='.$this->ipsclass->input['f'] ) ); - + //----------------------------------------- // Check //----------------------------------------- - + if ($forum['id'] == "") { - $this->ipsclass->admin->error("Невозможно найти форум с ID {$this->ipsclass->input['f']}"); + $this->ipsclass->admin->error("Could not retrieve the forum data based on ID {$this->ipsclass->input['f']}"); } - + //----------------------------------------- // Set up code buttons //----------------------------------------- - - $addnew_type = ( $forum['parent_id'] == -1 ) ? 'category' : 'forum'; - $lang_title = ( $forum['parent_id'] == -1 ) ? 'категории' : 'форума'; - - $title = "Изменение {$lang_title}: {$forum['name']}"; - $button = "Сохранить"; + + $addnew_type = $forum['parent_id'] == -1 ? 'category' : 'forum'; + + if( $changetype ) + { + $addnew_type = $addnew_type == 'category' ? 'forum' : 'category'; + } + + $title = "Editing {$addnew_type}: {$forum['name']}"; + $button = "Edit {$addnew_type}"; $code = "doedit"; - + if( $addnew_type == 'category' ) { - $perms = unserialize(stripslashes($forum['permission_array'])); - $forum = array_merge( $forum, $perms ); + $perms = unserialize(stripslashes($forum['permission_array'])); + $forum = array_merge( $forum, $perms ); + + $convert = ""; } - + else + { + $convert = ""; + } + //----------------------------------------- // Basic title //----------------------------------------- - + $basic_title = " - +
    Основные настройки {$forum['name']}Basic Settings for {$forum['name']} ". - $this->ipsclass->adskin->js_make_button("Изменить {$addnew_type} правила" , $this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=frules&f={$this->ipsclass->input['f']}")." ". - $this->ipsclass->adskin->js_make_button("Шаблон форума", $this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=skinedit&f={$this->ipsclass->input['f']}")." ". - $this->ipsclass->adskin->js_make_button("Пересчитать {$addnew_type}" , $this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=recount&f={$this->ipsclass->input['f']}") + $this->ipsclass->adskin->js_make_button("Edit {$addnew_type} Rules" , $this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=frules&f={$this->ipsclass->input['f']}")." ". + $this->ipsclass->adskin->js_make_button("Edit Skin Settings", $this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=skinedit&f={$this->ipsclass->input['f']}")." ". + $this->ipsclass->adskin->js_make_button("Recount {$addnew_type}" , $this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=recount&f={$this->ipsclass->input['f']}") ."  
    "; } - + //----------------------------------------- // NEW //----------------------------------------- - + else { # Ensure there is an ID $this->ipsclass->input['f'] = 0; - - $lang_title = ( $addnew_type == 'category' ) ? 'категории' : 'форума'; - $name_value = ( $addnew_type == 'category' ) ? 'Новая категория' : 'Новый форум'; - + + if( $changetype ) + { + $addnew_type = $addnew_type == 'category' ? 'forum' : 'category'; + } + $forum = array( 'sub_can_post' => $subcanpost, - 'name' => $f_name ? $f_name : $name_value, + 'name' => $f_name ? $f_name : 'New '.ucwords($addnew_type), 'parent_id' => $parentid, 'use_ibc' => 1, 'quick_reply' => 1, @@ -1050,67 +1054,74 @@ class ad_forums 'allow_pollbump' => 0, 'forum_allow_rating' => 0, 'preview_posts' => 0, - 'notify_modq_emails' => 0, + 'notify_modq_emails' => '', 'show_perms' => '', 'read_perms' => '', 'start_perms' => '', 'reply_perms' => '', 'upload_perms' => '', 'download_perms' => '', - + ); - - $title = "Добавление " . $lang_title; - $button = "Создать"; + + $title = "Add a ".ucwords($addnew_type); + $button = "Add ".ucwords($addnew_type); $code = "donew"; - $basic_title = 'Основные настройки'; + $basic_title = 'Basic Settings'; - + if( $addnew_type == 'category' ) + { + $convert = ""; + } + else + { + $convert = ""; + } } //----------------------------------------- // Build forumlist //----------------------------------------- - + $forumlist = $this->forumfunc->ad_forums_forum_list(); - + //----------------------------------------- // Build group list - //----------------------------------------- - + //----------------------------------------- + $mem_group = array(); - + foreach( $this->ipsclass->cache['group_cache'] as $g_id => $group ) { $mem_group[] = array( $g_id , $group['g_title'] ); - } - + } + //----------------------------------------- // Page title... //----------------------------------------- - + $this->ipsclass->admin->page_title = $title; - + //----------------------------------------- // Generate form items //----------------------------------------- - + # Main settings $form['name'] = $this->ipsclass->adskin->form_input( 'name' , ( isset($_POST['name']) AND $_POST['name'] ) ? $this->ipsclass->parse_clean_value( $_POST['name'] ) : $forum['name'] ); $form['description'] = $this->ipsclass->adskin->form_textarea("description" , $this->ipsclass->my_br2nl( ( isset($_POST['description']) AND $_POST['description'] )? $_POST['description'] : $forum['description'] ) ); $form['parent_id'] = $this->ipsclass->adskin->form_dropdown("parent_id" , $forumlist, ( isset($_POST['parent_id']) AND $_POST['parent_id'] ) ? $_POST['parent_id'] : $forum['parent_id'] ); $form['status'] = $this->ipsclass->adskin->form_dropdown("status" , $dd_state , ( isset($_POST['status']) AND $_POST['status'] ) ? $_POST['status'] : $forum['status'] ); - $form['sub_can_post'] = $this->ipsclass->adskin->form_yes_no( 'sub_can_post', ( isset($_POST['sub_can_post']) AND $_POST['sub_can_post'] ) ? $_POST['sub_can_post'] : $forum['sub_can_post'] ); - + $form['sub_can_post'] = $this->ipsclass->adskin->form_yes_no( 'sub_can_post', ( isset($_POST['sub_can_post']) AND $_POST['sub_can_post'] ) ? $_POST['sub_can_post'] : ( $forum['sub_can_post'] == 1 ? 0 : 1 ) ); + # Redirect options $form['redirect_url'] = $this->ipsclass->adskin->form_input( 'redirect_url' , ( isset($_POST['redirect_url']) AND $_POST['redirect_url'] ) ? $_POST['redirect_url'] : $forum['redirect_url'] ); $form['redirect_on'] = $this->ipsclass->adskin->form_yes_no('redirect_on' , ( isset($_POST['redirect_on']) AND $_POST['redirect_on'] ) ? $_POST['redirect_on'] : $forum['redirect_on'] ); $form['redirect_hits'] = $this->ipsclass->adskin->form_input( 'redirect_hits', ( isset($_POST['redirect_hits']) AND $_POST['redirect_hits'] ) ? $_POST['redirect_hits'] : $forum['redirect_hits'] ); - + # Permission settings $form['permission_showtopic'] = $this->ipsclass->adskin->form_yes_no( 'permission_showtopic' , ( isset($_POST['permission_showtopic']) AND $_POST['permission_showtopic'] ) ? $_POST['permission_showtopic'] : $forum['permission_showtopic'] ); $form['permission_custom_error'] = $this->ipsclass->adskin->form_textarea("permission_custom_error", $this->ipsclass->my_br2nl( ( isset($_POST['permission_custom_error']) AND $_POST['permission_custom_error'] ) ? $_POST['permission_custom_error'] : $forum['permission_custom_error'] ) ); - + # Forum settings $form['use_html'] = $this->ipsclass->adskin->form_yes_no('use_html' , ( isset($_POST['use_html']) AND $_POST['use_html'] ) ? $_POST['use_html'] : $forum['use_html'] ); $form['use_ibc'] = $this->ipsclass->adskin->form_yes_no('use_ibc' , ( isset($_POST['use_ibc']) AND $_POST['use_ibc'] ) ? $_POST['use_ibc'] : $forum['use_ibc'] ); @@ -1119,27 +1130,30 @@ class ad_forums $form['allow_pollbump'] = $this->ipsclass->adskin->form_yes_no('allow_pollbump' , ( isset($_POST['allow_pollbump']) AND $_POST['allow_pollbump'] ) ? $_POST['allow_pollbump'] : $forum['allow_pollbump'] ); $form['inc_postcount'] = $this->ipsclass->adskin->form_yes_no('inc_postcount' , ( isset($_POST['inc_postcount']) AND $_POST['inc_postcount'] ) ? $_POST['inc_postcount'] : $forum['inc_postcount'] ); $form['forum_allow_rating'] = $this->ipsclass->adskin->form_yes_no('forum_allow_rating', ( isset($_POST['forum_allow_rating']) AND $_POST['forum_allow_rating'] ) ? $_POST['forum_allow_rating'] : $forum['forum_allow_rating'] ); - + # Mod settings $form['preview_posts'] = $this->ipsclass->adskin->form_dropdown( "preview_posts" , $dd_moderate, ( isset($_POST['preview_posts']) AND $_POST['preview_posts'] ) ? $_POST['preview_posts'] : $forum['preview_posts'] ); $form['notify_modq_emails'] = $this->ipsclass->adskin->form_input( 'notify_modq_emails' , ( isset($_POST['notify_modq_emails']) AND $_POST['notify_modq_emails'] ) ? $_POST['notify_modq_emails'] : $forum['notify_modq_emails'] ); $form['password'] = $this->ipsclass->adskin->form_input( 'password' , ( isset($_POST['password']) AND $_POST['password'] ) ? $_POST['password'] : $forum['password'] ); $form['password_override'] = $this->ipsclass->adskin->form_multiselect( 'password_override[]' , $mem_group, ( isset($_POST['password_override']) AND $_POST['password_override'] ) ? $_POST['password_override'] : explode( ",", $forum['password_override'] ), 5 ); - + # Sorting settings $form['prune'] = $this->ipsclass->adskin->form_dropdown("prune" , $dd_prune, ( isset($_POST['prune']) AND $_POST['prune'] ) ? $_POST['prune'] : $forum['prune'] ); $form['sort_key'] = $this->ipsclass->adskin->form_dropdown("sort_key" , $dd_order, ( isset($_POST['sort_key']) AND $_POST['sort_key'] ) ? $_POST['sort_key'] : $forum['sort_key'] ); $form['sort_order'] = $this->ipsclass->adskin->form_dropdown("sort_order", $dd_by , ( isset($_POST['sort_order']) AND $_POST['sort_order'] ) ? $_POST['sort_order'] : $forum['sort_order'] ); $form['topicfilter'] = $this->ipsclass->adskin->form_dropdown("topicfilter", $dd_filter, ( isset($_POST['topicfilter']) AND $_POST['topicfilter'] ) ? $_POST['topicfilter'] : $forum['topicfilter'] ); - + # Trim the form for categories... - $form['addnew_type'] = $addnew_type; - $form['addnew_type_upper'] = $lang_title; - + $form['addnew_type'] = $addnew_type; + $this->ipsclass->input['type'] = $addnew_type; + $form['addnew_type_upper'] = ucwords($addnew_type); + + $form['convert_button'] =& $convert; + //----------------------------------------- // Show permission matrix //----------------------------------------- - + if ( $type != 'edit' OR $addnew_type == 'category' )//&& $addnew_type != 'category' ) { if( $addnew_type == 'category' ) @@ -1147,85 +1161,98 @@ class ad_forums $perm_matrix = $this->build_group_cat_perms( $forum['show_perms'] ); } else - { + { $perm_matrix = $this->build_group_perms( $forum['show_perms'], $forum['read_perms'], $forum['start_perms'], $forum['reply_perms'], $forum['upload_perms'], $forum['download_perms'] ); } } - + //----------------------------------------- // Show form... //----------------------------------------- - + $this->ipsclass->html .= $this->html->forum_form( $form, $button, $code, $title, $button, $forum, $perm_matrix ); - + //----------------------------------------- // Nav and print //----------------------------------------- - - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Управление форумами' ); - $this->ipsclass->admin->nav[] = array( '', 'Добавление/изменение '.$lang_title ); - + + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Manage Forums' ); + $this->ipsclass->admin->nav[] = array( '', 'Add/Edit '.ucwords($addnew_type) ); + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // Do save form /*-------------------------------------------------------------------------*/ - + function forum_save($type='new') { //----------------------------------------- - // INIT + // Converting the type? //----------------------------------------- + if( $this->ipsclass->input['convert'] ) + { + $this->forum_form( $type, 1 ); + return; + } + + //----------------------------------------- + // INIT + //----------------------------------------- + $this->ipsclass->input['name'] = trim($this->ipsclass->input['name']); $this->ipsclass->input['f'] = intval($this->ipsclass->input['f']); - - $forum_cat_lang_msg = intval($this->ipsclass->input['parent_id']) == -1 ? 'категории' : 'форума'; - $forum_cat_lang = intval($this->ipsclass->input['parent_id']) == -1 ? 'Категория' : 'Форум'; - $forum_cat_lang_log = intval($this->ipsclass->input['parent_id']) == -1 ? 'а' : ''; + + $forum_cat_lang = intval($this->ipsclass->input['parent_id']) == -1 ? 'Category' : 'Forum'; //----------------------------------------- // Auth check... //----------------------------------------- - + $this->ipsclass->admin->security_auth_check(); - + //----------------------------------------- // Check //----------------------------------------- - + if ( $this->ipsclass->input['name'] == "" ) { - $this->ipsclass->main_msg = "Вы должны ввести название " . $forum_cat_lang_msg; + $this->ipsclass->main_msg = "You must enter a ".strtolower($forum_cat_lang)." title"; $this->forum_form( $type ); return; } - + //----------------------------------------- // Are we trying to do something stupid // like running with scissors or moving // the parent of a forum into itself // spot? //----------------------------------------- - + if ( $this->ipsclass->input['parent_id'] != $this->ipsclass->forums->forum_by_id[ $this->ipsclass->input['f'] ]['parent_id'] ) { $ids = $this->ipsclass->forums->forums_get_children( $this->ipsclass->input['f'] ); $ids[] = $this->ipsclass->input['f']; - + if ( in_array( $this->ipsclass->input['parent_id'], $ids ) ) { - $this->ipsclass->main_msg = "Извините, сделать это невозможно. Вы хотите переместить родительский форума в него же самого. Пожалуйста, вернитесь назад и попытайтесь выбрать другой форум."; + $this->ipsclass->main_msg = "Sorry, that is not possible. You are attempting to move a parent forum or category into its own child structure. Please go back and choose a different parent forum."; $this->forum_form( $type ); return; } } - + + if( $this->ipsclass->input['parent_id'] < 1 ) + { + $this->ipsclass->input['sub_can_post'] = 1; + } + //----------------------------------------- // Save array //----------------------------------------- - + $save = array ( 'name' => $this->ipsclass->input['name'], 'description' => $this->ipsclass->xss_html_clean( $this->ipsclass->my_nl2br( $this->ipsclass->txt_stripslashes( $_POST['description'] ) ) ), 'use_ibc' => intval($this->ipsclass->input['use_ibc']), @@ -1243,7 +1270,7 @@ class ad_forums 'forum_allow_rating' => intval($this->ipsclass->input['forum_allow_rating']), 'inc_postcount' => intval($this->ipsclass->input['inc_postcount']), 'parent_id' => intval($this->ipsclass->input['parent_id']), - 'sub_can_post' => intval($this->ipsclass->input['sub_can_post']), + 'sub_can_post' => ( intval($this->ipsclass->input['sub_can_post']) == 1 ? 0 : 1 ), 'quick_reply' => intval($this->ipsclass->input['quick_reply']), 'redirect_on' => intval($this->ipsclass->input['redirect_on']), 'redirect_hits' => intval($this->ipsclass->input['redirect_hits']), @@ -1252,27 +1279,27 @@ class ad_forums 'notify_modq_emails' => $this->ipsclass->input['notify_modq_emails'], 'permission_showtopic' => intval($this->ipsclass->input['permission_showtopic']), 'permission_custom_error' => $this->ipsclass->my_nl2br( $this->ipsclass->txt_stripslashes($_POST['permission_custom_error']) ) ); - + //----------------------------------------- // ADD //----------------------------------------- - + if ( $type == 'new' ) { $this->ipsclass->DB->simple_construct( array( 'select' => 'MAX(id) as top_forum', 'from' => 'forums' ) ); $this->ipsclass->DB->simple_exec(); - + $row = $this->ipsclass->DB->fetch_row(); - + if ( $row['top_forum'] < 1 ) { $row['top_forum'] = 0; } - + $row['top_forum']++; - + $perms = array(); - + if( $this->ipsclass->input['parent_id'] == -1 ) { if( $this->ipsclass->input['show_all'] ) @@ -1282,10 +1309,10 @@ class ad_forums else { if( is_array( $this->ipsclass->input['show_permissions'] ) ) - { + { $this->ipsclass->DB->simple_construct( array( 'select' => 'perm_id, perm_name', 'from' => 'forum_perms', 'order' => "perm_id" ) ); $this->ipsclass->DB->simple_exec(); - + while ( $data = $this->ipsclass->DB->fetch_row() ) { if ( in_array( $data['perm_id'], $this->ipsclass->input['show_permissions'] ) ) @@ -1293,7 +1320,7 @@ class ad_forums $perms['SHOW'] .= $data['perm_id'].","; } } - + $perms['SHOW'] = preg_replace( "/,$/", "", $perms['SHOW'] ); } } @@ -1302,7 +1329,7 @@ class ad_forums { $perms = $this->ipsclass->admin->compile_forum_perms(); } - + $perm_array = addslashes(serialize(array( 'start_perms' => $perms['START'], 'reply_perms' => $perms['REPLY'], @@ -1311,11 +1338,11 @@ class ad_forums 'download_perms' => $perms['DOWNLOAD'], 'show_perms' => $perms['SHOW'] ) ) ); - + //----------------------------------------- // Add to save array //----------------------------------------- - + $save['id'] = $row['top_forum']; $save['position'] = $row['top_forum']; $save['topics'] = 0; @@ -1324,12 +1351,12 @@ class ad_forums $save['last_poster_id'] = 0; $save['last_poster_name'] = ""; $save['permission_array'] = $perm_array; - + $this->ipsclass->DB->do_insert( 'forums', $save ); - - $this->ipsclass->main_msg = $forum_cat_lang . " создан" . $forum_cat_lang_log ."."; - - $this->ipsclass->admin->save_log($forum_cat_lang." «{$this->ipsclass->input['name']}» создан" . $forum_cat_lang_log . "."); + + $this->ipsclass->main_msg = $forum_cat_lang." Created"; + + $this->ipsclass->admin->save_log($forum_cat_lang." '{$this->ipsclass->input['name']}' created"); } else { @@ -1342,10 +1369,10 @@ class ad_forums else { if( is_array( $this->ipsclass->input['show_permissions'] ) ) - { + { $this->ipsclass->DB->simple_construct( array( 'select' => 'perm_id, perm_name', 'from' => 'forum_perms', 'order' => "perm_id" ) ); $this->ipsclass->DB->simple_exec(); - + while ( $data = $this->ipsclass->DB->fetch_row() ) { if ( in_array( $data['perm_id'], $this->ipsclass->input['show_permissions'] ) ) @@ -1353,11 +1380,11 @@ class ad_forums $perms['SHOW'] .= $data['perm_id'].","; } } - + $perms['SHOW'] = preg_replace( "/,$/", "", $perms['SHOW'] ); } } - + $perm_array = addslashes(serialize(array( 'start_perms' => '', 'reply_perms' => '', @@ -1366,161 +1393,161 @@ class ad_forums 'download_perms' => '', 'show_perms' => $perms['SHOW'] ) ) ); - - $save['permission_array'] = $perm_array; + + $save['permission_array'] = $perm_array; } - + $this->ipsclass->DB->do_update( 'forums', $save, "id={$this->ipsclass->input['f']}" ); - - $this->ipsclass->main_msg = $forum_cat_lang." изменен". $forum_cat_lang_log . "."; - - $this->ipsclass->admin->save_log($forum_cat_lang." «{$this->ipsclass->input['name']}» изменен" . $forum_cat_lang_log . "."); + + $this->ipsclass->main_msg = $forum_cat_lang." Edited"; + + $this->ipsclass->admin->save_log($forum_cat_lang." '{$this->ipsclass->input['name']}' edited"); } - + $this->recache_forums(); - + $this->ipsclass->input['f'] = ''; if( $save['parent_id'] > 0 ) { $this->ipsclass->input['f'] = $save['parent_id']; } - + $this->ipsclass->forums->forums_init(); - + $this->show_forums(); } - + /*-------------------------------------------------------------------------*/ // EDIT FORUM /*-------------------------------------------------------------------------*/ - + function perm_edit_form() { //----------------------------------------- // INIT //----------------------------------------- - + $this->ipsclass->input['f'] = intval($this->ipsclass->input['f']); - + //----------------------------------------- // check.. //----------------------------------------- - + if ( ! $this->ipsclass->input['f'] ) { - $this->ipsclass->admin->error("Вы не выбрали форум для редактирования!"); + $this->ipsclass->admin->error("You didn't choose a forum to edit, duh!"); } - + //----------------------------------------- // Get this forum details //----------------------------------------- - + $forum = $this->ipsclass->forums->forum_by_id[$this->ipsclass->input['f']]; //----------------------------------------- // Next id... //----------------------------------------- - + $relative = $this->get_next_id( $this->ipsclass->input['f'] ); - + //----------------------------------------- // check... //----------------------------------------- - + if ( ! $forum['id'] ) { - $this->ipsclass->admin->error("Нельзя извлечь из базы данных ID форума {$this->ipsclass->input['f']}"); + $this->ipsclass->admin->error("Could not retrieve the forum data based on ID {$this->ipsclass->input['f']}"); } - - $this->ipsclass->admin->page_title = "Изменение прав доступа «{$forum['name']}»"; - + + $this->ipsclass->admin->page_title = "Edit permissions for ".$forum['name']; + //----------------------------------------- // HTML //----------------------------------------- if( $forum['parent_id'] != 'root' ) { - $perm_matrix = $this->build_group_perms( $forum['show_perms'], $forum['read_perms'], $forum['start_perms'], $forum['reply_perms'], $forum['upload_perms'], $forum['download_perms'], - $this->ipsclass->forums->forum_by_id[ $forum['parent_id'] ]['name'].' > '.$forum['name'].' > '."Права доступа" ); - - $this->ipsclass->admin->page_detail = "Маски доступа к форуму
    Если вы запрещаете маске доступа просмотр форума, то группы, которые закреплены за этой маской, не смогут просматривать этот форум."; + $perm_matrix = $this->build_group_perms( $forum['show_perms'], $forum['read_perms'], $forum['start_perms'], $forum['reply_perms'], $forum['upload_perms'], $forum['download_perms'], + $this->ipsclass->forums->forum_by_id[ $forum['parent_id'] ]['name'].' > '.$forum['name'].' > '."Permission Access Levels" ); + + $this->ipsclass->admin->page_detail = "Forum access permissions
    (Check box for access, uncheck to not allow access)
    If you deny read access for a permission set, they will not see the forum"; } else { - $perm_matrix = $this->build_group_cat_perms( $forum['show_perms'], $forum['name'].' > '."Права доступа" ); - - $this->ipsclass->admin->page_detail = "Маски доступа к категории
    Если вы не разрешите маске доступа просмотра форума, то группы, которые закреплены за этой маской, не смогут просматривать все форумы, относящиеся к этой категории."; + $perm_matrix = $this->build_group_cat_perms( $forum['show_perms'], $forum['name'].' > '."Permission Access Levels" ); + + $this->ipsclass->admin->page_detail = "Category access permissions
    (Select permission set for access, deselect to not allow access)
    If you do not select a permission set, they will not be able to see any forums in that category."; } - + $this->ipsclass->html .= $this->html->forum_permission_form( $forum, $relative, $perm_matrix ); - - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Управление форумами' ); - $this->ipsclass->admin->nav[] = array( '', "Изменение масок доступа «{$forum['name']}»" ); - + + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Manage Forums' ); + $this->ipsclass->admin->nav[] = array( '', 'Permissions for forum '.$forum['name'] ); + $this->ipsclass->admin->output(); - - + + } - + /*-------------------------------------------------------------------------*/ // Get next forum ID /*-------------------------------------------------------------------------*/ - + function get_next_id($fid) { $nextid = 0; $ids = array(); $index = 0; $count = 0; - + foreach( $this->ipsclass->forums->forum_cache['root'] as $forum_data ) { $ids[ $count ] = $forum_data['id']; - + if ( $forum_data['id'] == $fid ) { $index = $count; } - + $count++; - + if ( isset($this->ipsclass->forums->forum_cache[ $forum_data['id'] ]) AND is_array( $this->ipsclass->forums->forum_cache[ $forum_data['id'] ] ) ) { foreach( $this->ipsclass->forums->forum_cache[ $forum_data['id'] ] as $forum_data ) { $children = $this->ipsclass->forums->forums_get_children( $forum_data['id'] ); - + $ids[ $count ] = $forum_data['id']; - + if ( $forum_data['id'] == $fid ) { $index = $count; } - + $count++; - + if ( is_array($children) and count($children) ) { foreach( $children as $kid ) { $ids[ $count ] = $kid; - + if ( $kid == $fid ) { $index = $count; } - + $count++; } } } } } - + return array( 'next' => $ids[ $index + 1 ], 'previous' => $ids[ $index - 1 ] ); } - + /*-------------------------------------------------------------------------*/ // RECACHE FORUMS /*-------------------------------------------------------------------------*/ @@ -1537,13 +1564,13 @@ class ad_forums function perm_do_edit() { $perms = array(); - + //----------------------------------------- // Auth check... //----------------------------------------- - + $this->ipsclass->admin->security_auth_check(); - + //----------------------------------------- // Continue //----------------------------------------- @@ -1558,10 +1585,10 @@ class ad_forums else { if( is_array( $this->ipsclass->input['show_permissions'] ) ) - { + { $this->ipsclass->DB->simple_construct( array( 'select' => 'perm_id, perm_name', 'from' => 'forum_perms', 'order' => "perm_id" ) ); $this->ipsclass->DB->simple_exec(); - + while ( $data = $this->ipsclass->DB->fetch_row() ) { if ( in_array( $data['perm_id'], $this->ipsclass->input['show_permissions'] ) ) @@ -1569,16 +1596,16 @@ class ad_forums $perms['SHOW'] .= $data['perm_id'].","; } } - + $perms['SHOW'] = preg_replace( "/,$/", "", $perms['SHOW'] ); } } - } + } else { $perms = $this->ipsclass->admin->compile_forum_perms(); } - + $this->ipsclass->DB->do_update( 'forums', array( 'permission_array' => addslashes(serialize(array( 'start_perms' => $perms['START'], 'reply_perms' => $perms['REPLY'], @@ -1587,27 +1614,27 @@ class ad_forums 'download_perms' => $perms['DOWNLOAD'], 'show_perms' => $perms['SHOW'] ) ) ) ), 'id='.$this->ipsclass->input['f']); - - - - $this->ipsclass->admin->save_log("Изменены маски доступа к '{$this->ipsclass->input['name']}'"); - + + + + $this->ipsclass->admin->save_log("Forum access permission edited in '{$this->ipsclass->input['name']}'"); + $this->recache_forums(); - + if ( isset($this->ipsclass->input['doprevious']) AND $this->ipsclass->input['doprevious'] and $this->ipsclass->input['previd'] > 0 ) { - $this->ipsclass->main_msg = 'Маски доступа изменены'; - + $this->ipsclass->main_msg = 'Forum permissions edited'; + $this->ipsclass->input['f'] = $this->ipsclass->input['previd']; - + $this->ipsclass->boink_it( $this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=pedit&f={$this->ipsclass->input['f']}" ); } else if ( isset($this->ipsclass->input['donext']) AND $this->ipsclass->input['donext'] and $this->ipsclass->input['nextid'] > 0 ) { - $this->ipsclass->main_msg = 'Маски доступа изменены'; - + $this->ipsclass->main_msg = 'Forum permissions edited'; + $this->ipsclass->input['f'] = $this->ipsclass->input['nextid']; - + $this->ipsclass->boink_it( $this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=pedit&f={$this->ipsclass->input['f']}" ); } else if ( isset($this->ipsclass->input['reload']) AND $this->ipsclass->input['reload'] ) @@ -1616,70 +1643,70 @@ class ad_forums } else { - $this->ipsclass->admin->done_screen("Маски доступа изменены", "Управление форумами", $this->ipsclass->form_code, 'redirect' ); + $this->ipsclass->admin->done_screen("Forum Access Permissions Edited", "Forum Control", $this->ipsclass->form_code, 'redirect' ); } } - + /*-------------------------------------------------------------------------*/ // RE-ORDER FORUMS /*-------------------------------------------------------------------------*/ - + function reorder_form() { //----------------------------------------- // INIT //----------------------------------------- - + $temp_html = ""; $depth_guide = ""; - + //----------------------------------------- // Check... //----------------------------------------- - + if ( ! $this->ipsclass->input['f'] ) { - $this->ipsclass->admin->error("Вы не указали ID форума..."); + $this->ipsclass->admin->error("Cannot go any further, not F passed"); } - - $this->ipsclass->admin->page_detail = "Эта секция позволяет вам изменить порядок отображения (сортировку) форумов и категорий, достаточно ввести лишь порядковый номер для каждого форума."; - + + $this->ipsclass->admin->page_detail = "Simply select the position you require for each forum and submit the form to complete the re-order."; + $this->forumfunc->type = 'reorder'; - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doreorder' ), 2 => array( 'act' , 'forum' ), 3 => array( 'section', $this->ipsclass->section_code ), ) ); - - + + $cat_data = $this->ipsclass->forums->forum_by_id[ $this->ipsclass->input['f'] ]; - + if ( is_array( $this->ipsclass->forums->forum_cache[ $this->ipsclass->input['f'] ] ) ) { foreach( $this->ipsclass->forums->forum_cache[ $this->ipsclass->input['f'] ] as $forum_data ) { - + $temp_html .= $this->forumfunc->render_forum($forum_data, $depth_guide); - + $temp_html = $this->forumfunc->forum_build_children( $forum_data['id'], $temp_html, $depth_guide . $this->ipsclass->forums->depth_guide ); } } - + $this->ipsclass->html .= $this->forumfunc->forum_show_cat($temp_html, $cat_data); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form_standalone("Пересортировать"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form_standalone("Re-order"); + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // Re order the root forums /*-------------------------------------------------------------------------*/ - + function do_reorder() { $ids = array(); - + foreach ($this->ipsclass->input as $key => $value) { if ( preg_match( "/^f_(\d+)$/", $key, $match ) ) @@ -1690,170 +1717,179 @@ class ad_forums } } } - + $ids = $this->ipsclass->clean_int_array( $ids ); - + //----------------------------------------- // Save changes //----------------------------------------- - + if ( count($ids) ) - { + { foreach( $ids as $forum_id => $new_position ) { $this->ipsclass->DB->do_update( 'forums', array( 'position' => intval($new_position) ), 'id='.$forum_id ); } } - + $this->recache_forums(); - + $this->ipsclass->boink_it( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code ); } - + /*-------------------------------------------------------------------------*/ // SHOW THE FORUMS WOOHOO, ETC /*-------------------------------------------------------------------------*/ - + function show_forums() { //----------------------------------------- // INIT //----------------------------------------- - - $this->ipsclass->admin->page_title = "Управление форумами"; - $this->ipsclass->admin->page_detail = "В этой секции вы можете создавать новые, изменять и удалять существующие форумы. А также устанавливать правила и стили для каждого форума."; - + + $this->ipsclass->admin->page_title = "Category and Forums Overview"; + $this->ipsclass->admin->page_detail = "You can manage your forums from here. Click on the icons for more information."; + //----------------------------------------- // Nav //----------------------------------------- - + if ( $this->ipsclass->input['f'] ) { $nav = $this->ipsclass->forums->forums_breadcrumb_nav($this->ipsclass->input['f'], '&'.$this->ipsclass->form_code.'&f='); - + if ( is_array($nav) and count($nav) > 1 ) { array_shift($nav); - - $this->ipsclass->html .= "
    "; + + $this->ipsclass->html .= "
    "; } } - + //----------------------------------------- // Grab the moderators //----------------------------------------- - + $this->forumfunc->moderators = array(); - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'moderators' ) ); - $this->ipsclass->DB->simple_exec(); - + + $this->ipsclass->DB->build_query( array( 'select' => 'm.*', + 'from' => array( 'moderators' => 'm' ), + 'add_join' => array( + array( 'select' => 'mm.members_display_name', + 'from' => array( 'members' => 'mm' ), + 'where' => 'mm.id=m.member_id AND m.is_group=0', + 'type' => 'left' + ) + ) + ) ); + $this->ipsclass->DB->exec_query(); + while ($r = $this->ipsclass->DB->fetch_row()) { $this->forumfunc->moderators[] = $r; } - + //----------------------------------------- // Print screen //----------------------------------------- - + $this->forumfunc->type = 'manage'; - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doreordercat'), 2 => array( 'act' , 'forum' ), 3 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->html .= $this->html->render_forum_header(); - + $this->forumfunc->forums_list_forums(); - + $choose = ""; - + //----------------------------------------- // Member groups //----------------------------------------- - + $mem_group = ""; - + //----------------------------------------- // Add footer //----------------------------------------- - + $this->ipsclass->html .= $this->html->render_forum_footer( $choose, $mem_group ); - - $this->ipsclass->admin->nav[] = array( '', 'Настройка форумов' ); - + + $this->ipsclass->admin->nav[] = array( '', 'Manage Forums' ); + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // Build group permissions /*-------------------------------------------------------------------------*/ - - function build_group_perms( $show='*', $read='*', $write='*', $reply='*', $upload='*', $download='*', $title="Маски доступа" ) + + function build_group_perms( $show='*', $read='*', $write='*', $reply='*', $upload='*', $download='*', $title="Permission Access Levels" ) { //----------------------------------------- // Load skin if required //----------------------------------------- - + if ( ! $this->html ) { $this->html = $this->ipsclass->acp_load_template('cp_skin_forums'); } - + //----------------------------------------- // INIT //----------------------------------------- - + $global = array(); $perm = array(); $data = array(); $checked = ""; $check = " checked='checked'"; $content = ""; - + //----------------------------------------- // GLOBALS //----------------------------------------- - + # SHOW FORUM $checked = ($show == '*') ? $check : ""; $global['html_show'] = "\n"; - + # READ FORUM $checked = ($read == '*') ? $check : ""; $global['html_read'] = "\n"; - + # REPLY FORUM $checked = ($reply == '*') ? $check : ""; $global['html_reply'] = "\n"; - + # START TOPICS $checked = ($write == '*') ? $check : ""; $global['html_start'] = "\n"; - + # UPLOAD $checked = ($upload == '*') ? $check : ""; $global['html_upload'] = "\n"; - + # DOWNLOAD $checked = ($download == '*') ? $check : ""; $global['html_download'] = "\n"; @@ -1861,32 +1897,32 @@ class ad_forums //----------------------------------------- // Per mask settings //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms', 'order' => "perm_name ASC" ) ); $this->ipsclass->DB->simple_exec(); - + while ( $data = $this->ipsclass->DB->fetch_row() ) { # SHOW FORUM $checked = ($show == '*' OR preg_match( "/(^|,)".$data['perm_id']."(,|$)/", $show ) ) ? $check : ""; $perm['html_show'] = ""; - + # READ FORUM $checked = ($read == '*' OR preg_match( "/(^|,)".$data['perm_id']."(,|$)/", $read ) ) ? $check : ""; $perm['html_read'] = ""; - + # REPLY FORUM $checked = ($reply == '*' OR preg_match( "/(^|,)".$data['perm_id']."(,|$)/", $reply ) ) ? $check : ""; $perm['html_reply'] = ""; - + # WRITE FORUM $checked = ($write == '*' OR preg_match( "/(^|,)".$data['perm_id']."(,|$)/", $write ) ) ? $check : ""; $perm['html_start'] = ""; - + # UPLOAD $checked = ($upload == '*' OR preg_match( "/(^|,)".$data['perm_id']."(,|$)/", $upload ) ) ? $check : ""; $perm['html_upload'] = ""; - + # DOWNLOAD $checked = ($download == '*' OR preg_match( "/(^|,)".$data['perm_id']."(,|$)/", $download ) ) ? $check : ""; $perm['html_download'] = ""; @@ -1897,33 +1933,33 @@ class ad_forums $data['perm_id3'] = $data['perm_id']."_3"; $data['perm_id4'] = $data['perm_id']."_4"; $data['perm_id5'] = $data['perm_id']."_5"; - + $content .= $this->html->render_forum_permissions_row( $perm, $data ); } - + //----------------------------------------- // Wrapper... //----------------------------------------- - + return $this->html->render_forum_permissions( $global, $content, $title ); } - - - function build_group_cat_perms( $show='*', $title='Маски доступа' ) + + + function build_group_cat_perms( $show='*', $title='Permission Access Levels' ) { //----------------------------------------- // Load skin if required //----------------------------------------- - + if ( ! $this->html ) { $this->html = $this->ipsclass->acp_load_template('cp_skin_forums'); } - + //----------------------------------------- // INIT //----------------------------------------- - + if( $show == '*' ) { $select_all = "checked='checked'"; @@ -1932,33 +1968,33 @@ class ad_forums { $select_all = ""; } - + $perms = array(); - + //----------------------------------------- // Per mask settings //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms', 'order' => "perm_name ASC" ) ); $this->ipsclass->DB->simple_exec(); - + while ( $data = $this->ipsclass->DB->fetch_row() ) { $checked = ($show == '*' OR preg_match( "/(^|,)".$data['perm_id']."(,|$)/", $show ) ) ? "selected='selected'" : ""; - + $data['perm_selected'] = $checked; - + $perms[] = $data; } - + //----------------------------------------- // Wrapper... //----------------------------------------- - + return $this->html->render_cat_permissions( $perms, $select_all, $title ); - } - + } + } -?> +?> \ No newline at end of file diff --git a/upload/sources/action_admin/groups.php b/upload/sources/action_admin/groups.php index ecf368cf..50def894 100644 --- a/upload/sources/action_admin/groups.php +++ b/upload/sources/action_admin/groups.php @@ -2,25 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-12-11 17:58:35 -0500 (Mon, 11 Dec 2006) $ -| > $Revision: 783 $ +| > $Date: 2007-05-11 17:54:34 -0400 (Fri, 11 May 2007) $ +| > $Revision: 994 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -35,7 +27,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -45,116 +37,116 @@ class ad_groups # Global var $ipsclass; var $html; - + var $base_url; - + /** * Section title name * * @var string */ var $perm_main = "content"; - + /** * Section title name * * @var string */ var $perm_child = "group"; - + function auto_run() { $this->ipsclass->forums->forums_init(); - + require ROOT_PATH.'sources/lib/admin_forum_functions.php'; - + $this->forumfunc = new admin_forum_functions(); $this->forumfunc->ipsclass =& $this->ipsclass; - + //----------------------------------------- // LOAD HTML //----------------------------------------- - + $this->html = $this->ipsclass->acp_load_template('cp_skin_groups'); //----------------------------------------- // To do //----------------------------------------- - + switch($this->ipsclass->input['code']) { case 'doadd': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); $this->save_group('add'); break; - + case 'add': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); $this->group_form('add'); break; - + case 'edit': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->group_form('edit'); break; - + case 'doedit': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->save_group('edit'); break; - + case 'delete': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->delete_form(); break; - + case 'dodelete': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->do_delete(); break; - - //----------------------------------------- - + + //----------------------------------------- + case 'fedit': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':perms' ); $this->forum_perms(); break; - + case 'pdelete': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':perms' ); $this->delete_mask(); break; - + case 'dofedit': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':perms' ); $this->do_forum_perms(); break; - + case 'permsplash': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':perms' ); $this->permsplash(); break; - + case 'view_perm_users': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':perms' ); $this->view_perm_users(); break; - + case 'remove_mask': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':perms' ); $this->remove_mask(); break; - + case 'preview_forums': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':perms' ); $this->preview_forums(); break; - + case 'dopermadd': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':perms' ); $this->add_new_perm(); break; - + case 'donameedit': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':perms' ); $this->edit_name_perm(); @@ -163,119 +155,119 @@ class ad_groups case 'master_xml_export': $this->master_xml_export(); break; - + default: $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->main_screen(); break; } } - + /*-------------------------------------------------------------------------*/ // Export Master XML /*-------------------------------------------------------------------------*/ - + function master_xml_export() { //----------------------------------------- // INIT //----------------------------------------- - + $entry = array(); - + //----------------------------------------- // Get XML class //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); - + $xml = new class_xml(); - + $xml->doc_type = $this->ipsclass->vars['gb_char_set']; $xml->xml_set_root( 'export', array( 'exported' => time() ) ); - + //----------------------------------------- // Set group //----------------------------------------- - + $xml->xml_add_group( 'group' ); - + //----------------------------------------- // Get templates... //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'groups', 'order' => 'g_id ASC', 'limit' => array( 0, 6 ) ) ); - + $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $content = array(); - + $r['g_icon'] = ''; - + //----------------------------------------- // Sort the fields... //----------------------------------------- - + foreach( $r as $k => $v ) { $content[] = $xml->xml_build_simple_tag( $k, $v ); } - + $entry[] = $xml->xml_build_entry( 'row', $content ); } - + $xml->xml_add_entry_to_group( 'group', $entry ); - + $xml->xml_format_document(); - + $doc = $xml->xml_document; - + //----------------------------------------- // Print to browser //----------------------------------------- - + $this->ipsclass->admin->show_download( $doc, 'groups.xml', '', 0 ); } - + /*-------------------------------------------------------------------------*/ // Member group /forum mask permission form thingy doodle do yes. Viewing Perm users /*-------------------------------------------------------------------------*/ - + function delete_mask() { //----------------------------------------- // Check for a valid ID //----------------------------------------- - + if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Нельзя произвести изменения в масках доступа этому ID, пожалуйста, попытайтесь еще раз"); + $this->ipsclass->admin->error("Could not resolve the permission set ID, please try again"); } - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'forum_perms', 'where' => "perm_id=".intval($this->ipsclass->input['id']) ) ); - + $old_id = intval($this->ipsclass->input['id']); - + //----------------------------------------- // Remove from forums... //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, permission_array', 'from' => 'forums' ) ); $get = $this->ipsclass->DB->simple_exec(); - + while( $f = $this->ipsclass->DB->fetch_row($get) ) { $d_str = ""; $d_arr = unserialize(stripslashes( $f['permission_array'] ) ); - + $perms = unserialize(stripslashes( $f['permission_array'] ) ); - + foreach( array( 'read_perms', 'reply_perms', 'start_perms', 'upload_perms', 'show_perms' ) as $perm_bit ) { if ($perms[ $perm_bit ] != '*') @@ -283,86 +275,86 @@ class ad_groups if ( preg_match( "/(^|,)".$old_id."(,|$)/", $perms[ $perm_bit ]) ) { $perms[ $perm_bit ] = preg_replace( "/(^|,)".$old_id."(,|$)/", "\\1\\2", $perms[ $perm_bit ] ); - + $d_arr[ $perm_bit ] = $this->clean_perms( $perms[ $perm_bit ] ); } } } - + //----------------------------------------- // Do we have anything to save? //----------------------------------------- - + if ( count($d_arr) > 0 ) { //----------------------------------------- // Sure?.. //----------------------------------------- - + $string = addslashes(serialize( $d_arr ) ); - + if ( strlen($string) > 5) { $this->ipsclass->DB->do_update( 'forums', array( 'permission_array' => $string ), 'id='.$f['id'] ); } } } - + //----------------------------------------- // Recache forums //----------------------------------------- - + require_once( ROOT_PATH.'sources/action_admin/forums.php' ); $ad_forums = new ad_forums(); $ad_forums->ipsclass =& $this->ipsclass; $ad_forums->recache_forums(); - + $this->permsplash(); } - + /*-------------------------------------------------------------------------*/ // Add new perm mask /*-------------------------------------------------------------------------*/ - + function add_new_perm() { $this->ipsclass->input['new_perm_name'] = trim($this->ipsclass->input['new_perm_name']); - + if ($this->ipsclass->input['new_perm_name'] == "") { - $this->ipsclass->admin->error("Необходимо ввести имя"); + $this->ipsclass->admin->error("You must enter a name"); } - + $copy_id = $this->ipsclass->input['new_perm_copy']; - + //----------------------------------------- // UPDATE DB //----------------------------------------- - + $this->ipsclass->DB->do_insert( 'forum_perms', array( 'perm_name' => $this->ipsclass->input['new_perm_name'] ) ); - + $new_id = $this->ipsclass->DB->get_insert_id(); - + if ( $copy_id != 'none' ) { //----------------------------------------- // Add new mask to forum accesses //----------------------------------------- - + $old_id = intval($copy_id); - + if ( ($new_id > 0) and ($old_id > 0) ) { $this->ipsclass->DB->simple_construct( array( 'select' => 'id, permission_array', 'from' => 'forums' ) ); $get = $this->ipsclass->DB->simple_exec(); - + while( $f = $this->ipsclass->DB->fetch_row($get) ) { $d_str = ""; $d_arr = unserialize(stripslashes( $f['permission_array'] ) ); - + $perms = unserialize(stripslashes( $f['permission_array'] ) ); - + foreach( array( 'read_perms', 'reply_perms', 'start_perms', 'upload_perms', 'show_perms', 'download_perms' ) as $perm_bit ) { if ( $perms[ $perm_bit ] != '*') @@ -373,19 +365,19 @@ class ad_groups } } } - + //----------------------------------------- // Do we have anything to save? //----------------------------------------- - + if ( count($d_arr) > 0 ) { $string = addslashes(serialize( $d_arr ) ); - + //----------------------------------------- // Sure?.. //----------------------------------------- - + if ( strlen($string) > 5) { $this->ipsclass->DB->do_update( 'forums', array( 'permission_array' => $string ), 'id='.$f['id'] ); @@ -394,103 +386,103 @@ class ad_groups } } } - + //----------------------------------------- // Recache forums //----------------------------------------- - + require_once( ROOT_PATH.'sources/action_admin/forums.php' ); $ad_forums = new ad_forums(); $ad_forums->ipsclass =& $this->ipsclass; $ad_forums->recache_forums(); - - $this->ipsclass->main_msg = "Маска доступа «{$this->ipsclass->input['new_perm_name']}» добавлена."; + + $this->ipsclass->main_msg = "The permission set '{$this->ipsclass->input['new_perm_name']}' has been added"; $this->permsplash(); } - + /*-------------------------------------------------------------------------*/ // Preview masks /*-------------------------------------------------------------------------*/ - + function preview_forums() { //----------------------------------------- // Check for a valid ID //----------------------------------------- - + if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Нельзя произвести изменения в масках доступа этому ID, пожалуйста, попытайтесь еще раз"); + $this->ipsclass->admin->error("Could not resolve the permission set ID, please try again"); } - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms', 'where' => "perm_id=".intval($this->ipsclass->input['id']) ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $perms = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Нельзя произвести изменения в масках доступа этому ID, пожалуйста, попытайтесь еще раз"); + $this->ipsclass->admin->error("Could not resolve the permission set ID, please try again"); } - + //----------------------------------------- // What we doin'? //----------------------------------------- - + switch( $this->ipsclass->input['t'] ) { case 'start': - $human_type = 'Создание тем в этом форуме'; + $human_type = 'Start Topics in this forum'; $code_word = 'start_perms'; break; - + case 'reply': - $human_type = 'Публикация ответов в этом форуме'; + $human_type = 'Reply to Topics in this forum'; $code_word = 'reply_perms'; break; - + case 'show': - $human_type = 'Просмотр форума в этом форуме'; + $human_type = 'See this forum'; $code_word = 'show_perms'; break; - + case 'upload': - $human_type = 'Загрузка файлов в этом форуме'; + $human_type = 'Upload Attachments to this forum'; $code_word = 'upload_perms'; break; - + case 'download': - $human_type = 'Скачивание файлов в этом форуме'; + $human_type = 'Download Attachments in this forum'; $code_word = 'download_perms'; - break; - + break; + default: - $human_type = 'Просмотр этого форума'; + $human_type = 'Read Topics in this forum'; $code_word = 'read_perms'; break; } - + //----------------------------------------- // Get all members using that ID then! //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( "$human_type" , "100%" ); - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Просмотр: " . $perms['perm_name'] ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Preview using: " . $perms['perm_name'] ); + $the_html = ""; - + $perm_id = intval($this->ipsclass->input['id']); - + $theforums = $this->forumfunc->ad_forums_forum_list(1); - + foreach( $theforums as $v ) { $id = $v[0]; $name = $v[1]; - + $this->ipsclass->forums->forum_by_id[$id][ $code_word ] = isset($this->ipsclass->forums->forum_by_id[$id][ $code_word ]) ? $this->ipsclass->forums->forum_by_id[$id][ $code_word ] : ''; - + if ($this->ipsclass->forums->forum_by_id[$id][ $code_word ] == '*') { $the_html[] = "".$name.""; @@ -506,7 +498,7 @@ class ad_groups //----------------------------------------- // CATEGORY //----------------------------------------- - + $the_html[] = "".$name.""; } else @@ -514,96 +506,96 @@ class ad_groups //----------------------------------------- // CAN'T ACCESS //----------------------------------------- - + $the_html[] = "".$name.""; } } } - + $html = implode( "
    ", $the_html ); - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $html ) ); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'preview_forums' ), 2 => array( 'act' , 'group' ), 3 => array( 'id' , $this->ipsclass->input['id'] ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Информация" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Legend & Info" ); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "$human_type: возможно", + "Can $human_type", "" ) ); - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "$human_type: невозможно", + "CANNOT $human_type", "" ) ); if( $code_word != "show_perms" ) { $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "Категория (эта маска не используется)", + "Category (doesn't use this permission)", "" ) ); } - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "Проверить на...", + "Test with...", $this->ipsclass->adskin->form_dropdown( 't', - array( 0 => array( 'start', 'Создание тем' ), - 1 => array( 'reply', 'Публикацию ответов' ), - 2 => array( 'read' , 'Чтение тем' ), - 3 => array( 'show' , 'Просмотр форума' ), - 4 => array( 'upload', 'Загрузку файлов' ), - 5 => array( 'download', 'Скачивание файлов' ), + array( 0 => array( 'start', 'Start Topics' ), + 1 => array( 'reply', 'Reply To Topics' ), + 2 => array( 'read' , 'Read Topics' ), + 3 => array( 'show' , 'See Forum' ), + 4 => array( 'upload', 'Upload to Forum' ), + 5 => array( 'download', 'Download From Forum' ), ), $this->ipsclass->input['t'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form( "Просмотреть" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form( "Update" ); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->print_popup(); - + } - + /*-------------------------------------------------------------------------*/ // Remove mask /*-------------------------------------------------------------------------*/ - + function remove_mask() { //----------------------------------------- // Check for a valid ID //----------------------------------------- - + if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Нельзя изменить ID пользователя, попытайтесь снова"); + $this->ipsclass->admin->error("Could not resolve the member ID, please try again"); } - + //----------------------------------------- // Get, check and reset //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, org_perm_id', 'from' => 'members', 'where' => "id=".intval($this->ipsclass->input['id']) ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $mem = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Нельзя изменить ID пользователя, попытайтесь снова"); + $this->ipsclass->admin->error("Could not resolve the member ID, please try again"); } - + if ( $this->ipsclass->input['pid'] == 'all' ) { $this->ipsclass->DB->do_update( 'members', array( 'org_perm_id' => 0 ), 'id='.intval($this->ipsclass->input['id'])); @@ -611,9 +603,9 @@ class ad_groups else { $this->ipsclass->input['pid'] = intval($this->ipsclass->input['pid']); - + $pid_array = explode( ",", $this->ipsclass->clean_perm_string($mem['org_perm_id']) ); - + if ( count($pid_array) < 2 ) { $this->ipsclass->DB->do_update( 'members', array( 'org_perm_id' => 0 ), 'id='.intval($this->ipsclass->input['id'])); @@ -621,7 +613,7 @@ class ad_groups else { $new_arr = array(); - + foreach( $pid_array as $sid ) { if ( $sid != $this->ipsclass->input['pid'] ) @@ -629,62 +621,62 @@ class ad_groups $new_arr[] = $sid; } } - + $this->ipsclass->DB->do_update( 'members', array( 'org_perm_id' => implode(",",$new_arr) ), 'id='.intval($this->ipsclass->input['id'])); - } + } } - + //----------------------------------------- // Get all members using that ID then! //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "100%" ); - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Результат" ); - - - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Удалить созданные параметры доступа у {$mem['name']}." ) ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Result" ); + + + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Removed the custom set of permissions from {$mem['name']}." ) ); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->print_popup(); } - + /*-------------------------------------------------------------------------*/ // View perm users /*-------------------------------------------------------------------------*/ - + function view_perm_users() { //----------------------------------------- // Check for a valid ID //----------------------------------------- - + if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Нельзя произвести изменения в масках доступа этому ID, пожалуйста, попытайтесь еще раз"); + $this->ipsclass->admin->error("Could not resolve the permission set ID, please try again"); } - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms', 'where' => "perm_id=".intval($this->ipsclass->input['id']) ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $perms = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Нельзя произвести изменения в масках доступа этому ID, пожалуйста, попытайтесь еще раз"); + $this->ipsclass->admin->error("Could not resolve the permission set ID, please try again"); } - + //----------------------------------------- // Get all members using that ID then! //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( "Сведения о пользователе" , "50%" ); - $this->ipsclass->adskin->td_header[] = array( "Действие" , "50%" ); - + + $this->ipsclass->adskin->td_header[] = array( "User Details" , "50%" ); + $this->ipsclass->adskin->td_header[] = array( "Action" , "50%" ); + //----------------------------------------- - + $this->ipsclass->html .= ""; - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Используется пользователями: " . $perms['perm_name'] ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Members using: " . $perms['perm_name'] ); + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, email, posts, org_perm_id', 'from' => 'members', 'where' => "(org_perm_id IS NOT NULL AND org_perm_id != '')", 'order' => 'name' ) ); $outer = $this->ipsclass->DB->simple_exec(); - + while( $r = $this->ipsclass->DB->fetch_row($outer) ) { $exp_pid = explode( ",", $r['org_perm_id'] ); - + foreach( explode( ",", $r['org_perm_id'] ) as $pid ) { if ( $pid == $this->ipsclass->input['id'] ) { if ( count($exp_pid) > 1 ) { - $extra = "
  • Также используются: "; - + $extra = "
  • Also using: "; + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms', 'where' => "perm_id IN (".$this->ipsclass->clean_perm_string($r['org_perm_id']).") AND perm_id <> {$this->ipsclass->input['id']}" ) ); $this->ipsclass->DB->simple_exec(); - + while ( $mr = $this->ipsclass->DB->fetch_row() ) { $extra .= $mr['perm_name'].","; } - + $extra = preg_replace( "/,$/", "", $extra ); - + $extra .= ""; } else { $extra = ""; } - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "
    {$r['name']}
    -
  • Сообщений: {$r['posts']} +
  • Posts: {$r['posts']}
  • Email: {$r['email']} $extra" , - "• Удалить эту маску -
    • Удалить все дополнительные маски -

    • Изменить пользователя", + "• Remove This Permission Set +
    • Remove All Custom Permission Sets +

    • Edit Member", ) ); } } } - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->print_popup(); } - - + + /*-------------------------------------------------------------------------*/ // Member Group Perms: Called in "Forums" menu block /*-------------------------------------------------------------------------*/ - + function permsplash() { //----------------------------------------- // INIT //----------------------------------------- - + $perms = array(); $mems = array(); $groups = array(); $dlist = ""; $content = ""; - + //----------------------------------------- // Page title & desc //----------------------------------------- - - $this->ipsclass->admin->page_title = "Управление группами"; - $this->ipsclass->admin->page_detail = "Здесь вы сможете отредактировать параметры доступа для каждой группы."; - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=permsplash', 'Управление группами' ); - + + $this->ipsclass->admin->page_title = "Forum Permission Management [ HOME ]"; + $this->ipsclass->admin->page_detail = "You can manage your forum permissions from this section."; + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=permsplash', 'Manage Permissions' ); + //----------------------------------------- // Get the names for the perm masks w/id //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms', 'order' => 'perm_name ASC' ) ); $this->ipsclass->DB->simple_exec(); - + while( $r = $this->ipsclass->DB->fetch_row() ) { $perms[ $r['perm_id'] ] = $r['perm_name']; } - + //----------------------------------------- // Get the number of members using this mask // as an over ride //----------------------------------------- - + $this->ipsclass->DB->cache_add_query( 'groups_permsplash', array() ); $this->ipsclass->DB->cache_exec_query(); - + while( $r = $this->ipsclass->DB->fetch_row() ) { if ( strstr( $r['org_perm_id'] , "," ) ) @@ -811,15 +803,15 @@ class ad_groups $mems[ $r['org_perm_id'] ] += $r['count']; } } - + //----------------------------------------- // Get the member group names and the mask // they use //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => 'g_id, g_title, g_perm_id', 'from' => 'groups' ) ); $this->ipsclass->DB->simple_exec(); - + while( $r = $this->ipsclass->DB->fetch_row() ) { if ( strstr( $r['g_perm_id'] , "," ) ) @@ -834,129 +826,129 @@ class ad_groups $groups[ $r['g_perm_id'] ][] = $r['g_title']; } } - + //----------------------------------------- // Print the splash screen //----------------------------------------- - + foreach( $perms as $id => $name ) { $groups_used = ""; $mems_used = 0; $is_active = 0; $dlist .= "\n"; - + if ( isset($groups[ $id ]) AND is_array( $groups[ $id ] ) ) { foreach( $groups[ $id ] as $g_title ) { $groups_used .= '· ' . $g_title . "
    "; } - + $is_active = 1; } else { - $groups_used = "
    Нет
    "; - } - + $groups_used = "
    None
    "; + } + if ( isset($mems[ $id ]) AND $mems[ $id ] > 0 ) { $is_active = 1; } - + $r['id'] = $id; $r['name'] = $name; $r['isactive'] = $is_active; $r['groups'] = $groups_used; $r['mems'] = isset($mems[ $id ]) ? intval( $mems[ $id ] ) : 0; - + $content .= $this->html->groups_perm_splash_row( $r ); } - + $this->ipsclass->html .= $this->html->groups_perm_splash_wrapper( $content, $dlist ); - + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // Forum permissions /*-------------------------------------------------------------------------*/ - + function forum_perms() { if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Нельзя изменить ID группы, попытайтесь снова"); + $this->ipsclass->admin->error("Could not resolve the group ID, please try again"); } - + //----------------------------------------- - - $this->ipsclass->admin->page_title = "Управление масками доступа"; - $this->ipsclass->admin->page_detail = "В этой секции вы можете изменить выбранную маску доступа."; - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=permsplash', 'Управление масками доступа' ); - $this->ipsclass->admin->nav[] = array( '', 'Добавление/изменение масок доступа' ) ; - - $this->ipsclass->admin->page_detail .= "
    Для разрешения выполнения действия поставьте галочку, для запрета выполнения действия просто не ставьте или уберите галочку. -
    Атрибут «Глобальный» означает, что все маски доступа имеют права на выполнение этого действия, поэтому изменить этот параметр здесь нельзя. -
    Категории имеют настройки доступа только на просмотр, потому что остальные действия просто не применимы для категорий."; - + + $this->ipsclass->admin->page_title = "Forum Permission Management [ EDIT ]"; + $this->ipsclass->admin->page_detail = "You can edit a set of permissions from this section."; + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=permsplash', 'Manage Permissions' ); + $this->ipsclass->admin->nav[] = array( '', 'Add/Edit Permissions' ) ; + + $this->ipsclass->admin->page_detail .= "
    Simply check the boxes to allow permission for that action, or uncheck the box to deny permission for that action. +
    Global indicates that all present and future permission sets have access to that action and as such, cannot be changed. +
    Categories only use \"Show\" permissions, and as such the rest of the permission settings for categories are marked not used."; + //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms', 'where' => "perm_id=".intval($this->ipsclass->input['id']) ) ); $this->ipsclass->DB->simple_exec(); - + $group = $this->ipsclass->DB->fetch_row(); - + $gid = $group['perm_id']; $gname = $group['perm_name']; - + //----------------------------------------- //| EDIT NAME //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'donameedit' ), 2 => array( 'act' , 'group' ), 3 => array( 'id' , $gid ), 4 => array( 'section', $this->ipsclass->section_code ), ), "nameForm" ); - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Изменение названия: ".$group['perm_name'] ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Название маски" , + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Rename Permission Set: ".$group['perm_name'] ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Permission Set Name" , $this->ipsclass->adskin->form_input("perm_name", $gname ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Изменить"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Edit Name"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - + + //----------------------------------------- //| MAIN FORM //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'dofedit' ), 2 => array( 'act' , 'group' ), 3 => array( 'id' , $gid ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - - $this->ipsclass->adskin->td_header[] = array( "Форум" , "25%" ); - $this->ipsclass->adskin->td_header[] = array( "Просмотр форума
    " , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Чтение тем
    " , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Ответ в темы
    " , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Создание тем
    " , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Загрузка файлов
    " , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Скачивание файлов
    " , "10%" ); - + + $this->ipsclass->adskin->td_header[] = array( "Forum Name" , "25%" ); + $this->ipsclass->adskin->td_header[] = array( "Show
    " , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "Read
    " , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "Reply
    " , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "Start
    " , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "Upload
    " , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "Download
    " , "10%" ); + $forum_data = $this->forumfunc->ad_forums_forum_data(); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Параметры доступа: ".$group['perm_name'] ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Forum Access Permissions for ".$group['perm_name'] ); + foreach( $forum_data as $r ) { $show = ""; @@ -964,9 +956,9 @@ class ad_groups $start = ""; $reply = ""; $upload = ""; - - $global = '
    Глобальный
    '; - + + $global = '
    Global
    '; + if ($r['show_perms'] == '*') { $show = $global; @@ -979,11 +971,11 @@ class ad_groups { $show = "
    "; } - + //----------------------------------------- - - $global = '
    Глобальный
    '; - + + $global = '
    Global
    '; + if ($r['read_perms'] == '*') { $read = $global; @@ -996,11 +988,11 @@ class ad_groups { $read = "
    "; } - + //----------------------------------------- - - $global = '
    Глобальный
    '; - + + $global = '
    Global
    '; + if ($r['start_perms'] == '*') { $start = $global; @@ -1013,11 +1005,11 @@ class ad_groups { $start = "
    "; } - + //----------------------------------------- - - $global = '
    Глобальный
    '; - + + $global = '
    Global
    '; + if ($r['reply_perms'] == '*') { $reply = $global; @@ -1030,11 +1022,11 @@ class ad_groups { $reply = "
    "; } - + //----------------------------------------- - - $global = '
    Глобальный
    '; - + + $global = '
    Global
    '; + if ($r['upload_perms'] == '*') { $upload = $global; @@ -1047,11 +1039,11 @@ class ad_groups { $upload = "
    "; } - + //----------------------------------------- - - $global = '
    Глобальный
    '; - + + $global = '
    Global
    '; + if ($r['download_perms'] == '*') { $download = $global; @@ -1063,20 +1055,20 @@ class ad_groups else { $download = "
    "; - } - + } + //----------------------------------------- - + if ( $r['root_forum'] ) { $css = 'tablerow4'; - $download = $upload = $reply = $start = $read = "
    Не используется
    "; + $download = $upload = $reply = $start = $read = "
    Not Used
    "; } else { $css = ''; } - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "
      @@ -1089,121 +1081,121 @@ class ad_groups "
    ".$upload."
    ", "
    ".$download."
    ", ) ,$css ); - + } - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Обновить настройки доступа"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Update Forum Permissions"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->html .= $this->html->permissions_js(); - + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // Edit perm name /*-------------------------------------------------------------------------*/ - + function edit_name_perm() { //----------------------------------------- // Check for legal ID //----------------------------------------- - + if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Нельзя изменить ID группы, попытайтесь снова"); + $this->ipsclass->admin->error("Could not resolve that group ID"); } - + if ( $this->ipsclass->input['perm_name'] == "" ) { - $this->ipsclass->admin->error("Необходимо ввести имя"); + $this->ipsclass->admin->error("You must enter a name"); } - + $gid = $this->ipsclass->input['id']; - + //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms', 'where' => "perm_id=".intval($this->ipsclass->input['id']) ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $gr = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Не действительный ID группы"); + $this->ipsclass->admin->error("Not a valid group ID"); } - + $this->ipsclass->DB->do_update( 'forum_perms', array( 'perm_name' => $this->ipsclass->input['perm_name'] ), 'perm_id='.intval($this->ipsclass->input['id']) ); - - $this->ipsclass->admin->save_log("Права доступа на форум отредактированы для маски: '{$gr['perm_name']}'"); - + + $this->ipsclass->admin->save_log("Forum Access Permissions Name Edited for Set: '{$gr['perm_name']}'"); + $this->ipsclass->main_msg = "Permission Set Name Updated"; - + $this->forum_perms( ); } - + /*-------------------------------------------------------------------------*/ // Save forum perms /*-------------------------------------------------------------------------*/ - + function do_forum_perms() { //----------------------------------------- // Check for legal ID //----------------------------------------- - + if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Нельзя изменить ID группы"); + $this->ipsclass->admin->error("Could not resolve that group ID"); } - + $gid = intval($this->ipsclass->input['id']); - + //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms', 'where' => "perm_id=".$gid ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $gr = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Недействительный ID группы"); + $this->ipsclass->admin->error("Not a valid group ID"); } - + //----------------------------------------- // Pull the forum data.. //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forums', 'order' => "position ASC" ) ); $forum_q = $this->ipsclass->DB->simple_exec(); - + while ( $row = $this->ipsclass->DB->fetch_row( $forum_q ) ) { $perms = unserialize(stripslashes( $row['permission_array'] ) ); - + $read = ""; $reply = ""; $start = ""; $upload = ""; $download = ""; $show = ""; - + //----------------------------------------- // Is this global? //----------------------------------------- - + if ($perms['read_perms'] == '*') { $read = '*'; - + } else { //----------------------------------------- // Split the set IDs //----------------------------------------- - + $read_ids = explode( ",", $perms['read_perms'] ); - + if ( is_array($read_ids) ) { foreach ($read_ids as $i) @@ -1211,7 +1203,7 @@ class ad_groups //----------------------------------------- // If it's the current ID, skip //----------------------------------------- - + if ($gid == $i) { continue; @@ -1225,25 +1217,25 @@ class ad_groups //----------------------------------------- // Was the box checked? //----------------------------------------- - + if ($this->ipsclass->input[ 'read_'.$row['id'] ] == 1) { // Add our group ID... - + $read .= $gid.","; } - + // Tidy.. - + $read = preg_replace( "/,$/", "", $read ); $read = preg_replace( "/^,/", "", $read ); - + } - + //----------------------------------------- // Reply topics.. //----------------------------------------- - + if ($perms['reply_perms'] == '*') { $reply = '*'; @@ -1251,7 +1243,7 @@ class ad_groups else { $reply_ids = explode( ",", $perms['reply_perms'] ); - + if ( is_array($reply_ids) ) { foreach ($reply_ids as $i) @@ -1265,22 +1257,22 @@ class ad_groups $reply .= $i.","; } } - + } - + if ($this->ipsclass->input[ 'reply_'.$row['id'] ] == 1) { $reply .= $gid.","; } - + $reply = preg_replace( "/,$/", "", $reply ); $reply = preg_replace( "/^,/", "", $reply ); } - + //----------------------------------------- // Start topics.. //----------------------------------------- - + if ($perms['start_perms'] == '*') { $start = '*'; @@ -1288,10 +1280,10 @@ class ad_groups else { $start_ids = explode( ",", $perms['start_perms'] ); - + if ( is_array($start_ids) ) { - + foreach ($start_ids as $i) { if ($gid == $i) @@ -1303,22 +1295,22 @@ class ad_groups $start .= $i.","; } } - + } - + if ($this->ipsclass->input[ 'start_'.$row['id'] ] == 1) { $start .= $gid.","; } - + $start = preg_replace( "/,$/", "", $start ); $start = preg_replace( "/^,/", "", $start ); } - + //----------------------------------------- // Upload topics.. //----------------------------------------- - + if ($perms['upload_perms'] == '*') { $upload = '*'; @@ -1326,10 +1318,10 @@ class ad_groups else { $upload_ids = explode( ",", $perms['upload_perms'] ); - + if ( is_array($upload_ids) ) { - + foreach ($upload_ids as $i) { if ($gid == $i) @@ -1341,22 +1333,22 @@ class ad_groups $upload .= $i.","; } } - + } - + if ($this->ipsclass->input[ 'upload_'.$row['id'] ] == 1) { $upload .= $gid.","; } - + $upload = preg_replace( "/,$/", "", $upload ); $upload = preg_replace( "/^,/", "", $upload ); } - + //----------------------------------------- // Download attach.. //----------------------------------------- - + if ($perms['download_perms'] == '*') { $download = '*'; @@ -1364,7 +1356,7 @@ class ad_groups else { $download_ids = explode( ",", $perms['download_perms'] ); - + if ( is_array($download_ids) ) { foreach ($download_ids as $i) @@ -1378,22 +1370,22 @@ class ad_groups $download .= $i.","; } } - + } - + if ($this->ipsclass->input[ 'download_'.$row['id'] ] == 1) { $download .= $gid.","; } - + $download = preg_replace( "/,$/", "", $download ); $download = preg_replace( "/^,/", "", $download ); - } - + } + //----------------------------------------- // Show topics.. //----------------------------------------- - + if ($perms['show_perms'] == '*') { $show = '*'; @@ -1401,7 +1393,7 @@ class ad_groups else { $show_ids = explode( ",", $perms['show_perms'] ); - + if ( is_array($show_ids) ) { foreach ($show_ids as $i) @@ -1415,22 +1407,22 @@ class ad_groups $show .= $i.","; } } - + } - + if ($this->ipsclass->input[ 'show_'.$row['id'] ] == 1) { $show .= $gid.","; } - + $show = preg_replace( "/,$/", "", $show ); $show = preg_replace( "/^,/", "", $show ); } - + //----------------------------------------- // Update the DB... //----------------------------------------- - + $this->ipsclass->DB->do_update( 'forums', array( 'permission_array' => addslashes(serialize(array( 'start_perms' => $start, 'reply_perms' => $reply, @@ -1439,54 +1431,54 @@ class ad_groups 'show_perms' => $show, 'download_perms' => $download, ) ) ) ), 'id='.$row['id']); - + } - + //----------------------------------------- // Recache forums //----------------------------------------- - + require_once( ROOT_PATH.'sources/action_admin/forums.php' ); $adforums = new ad_forums(); $adforums->ipsclass =& $this->ipsclass; - + $adforums->recache_forums(); - - $this->ipsclass->admin->save_log("Права доступа на форум отредактированы для маски: '{$gr['perm_name']}'"); - + + $this->ipsclass->admin->save_log("Forum Access Permissions Edited for Set: '{$gr['perm_name']}'"); + $this->ipsclass->main_msg = "Forum Access Permissions Updated"; $this->permsplash( ); - + } - + /*-------------------------------------------------------------------------*/ // Delete a group /*-------------------------------------------------------------------------*/ - + function delete_form() { if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Нельзя изменить ID группы, попытайтесь снова"); + $this->ipsclass->admin->error("Could not resolve the group ID, please try again"); } - + if ($this->ipsclass->input['id'] < 5) { - $this->ipsclass->admin->error("Вы не можете перемещать группы, которые используются в данный момент, но переименовать и отредактировать функции можно"); + $this->ipsclass->admin->error("You can not move the preset groups. You can rename them and edit the functionality"); } - - $this->ipsclass->admin->page_title = "Удаление пользовательской группы"; - - $this->ipsclass->admin->page_detail = "Пожалуйста, убедитесь в том, что хотите удалить данную группу."; - - + + $this->ipsclass->admin->page_title = "Deleting a User Group"; + + $this->ipsclass->admin->page_detail = "Please check to ensure that you are attempting to remove the correct group."; + + //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(id) as users', 'from' => 'members', 'where' => "mgroup=".intval($this->ipsclass->input['id']) ) ); $this->ipsclass->DB->simple_exec(); - + $black_adder = $this->ipsclass->DB->fetch_row(); - + if ($black_adder['users'] < 1) { $black_adder['users'] = 0; @@ -1494,33 +1486,33 @@ class ad_groups $this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(id) as users', 'from' => 'members', 'where' => "mgroup_others LIKE '%".intval($this->ipsclass->input['id'])."%'" ) ); $this->ipsclass->DB->simple_exec(); - + $extra_group = $this->ipsclass->DB->fetch_row(); - + if ($extra_group['users'] < 1) { $extra_group['users'] = 0; } - + $this->ipsclass->DB->simple_construct( array( 'select' => 'g_title', 'from' => 'groups', 'where' => "g_id=".intval($this->ipsclass->input['id']) ) ); $this->ipsclass->DB->simple_exec(); - + $group = $this->ipsclass->DB->fetch_row(); - + //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => 'g_id, g_title', 'from' => 'groups', 'where' => "g_id <> ".intval($this->ipsclass->input['id']) ) ); $this->ipsclass->DB->simple_exec(); - + $mem_groups = array(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { //----------------------------------------- // Leave out root admin group //----------------------------------------- - + if ( $this->ipsclass->vars['admin_group'] == $r['g_id'] ) { if ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) @@ -1528,136 +1520,136 @@ class ad_groups continue; } } - + $mem_groups[] = array( $r['g_id'], $r['g_title'] ); } - + //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'dodelete' ), 2 => array( 'act' , 'group' ), 3 => array( 'id' , $this->ipsclass->input['id'] ), 4 => array( 'name' , $group['g_title'] ), 5 => array( 'section', $this->ipsclass->section_code ), ) ); - - - + + + //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Подтверждение перемещения: ".$group['g_title'] ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Количество пользователей в этой группе" , + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Removal Confirmation: ".$group['g_title'] ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Number of users in this group" , "".$black_adder['users']."", ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Количество пользователей с этой группой, как вторичная группа
    Эта вторичная группа будет удалена у этих пользователей." , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Number of users with this group as their secondary group
    This secondary group will be removed for these users." , "".$extra_group['users']."", ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Переместить пользователей из этой группы в..." , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Move users in this group to..." , $this->ipsclass->adskin->form_dropdown("to_id", $mem_groups ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Удалить эту группу"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Delete this group"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // DO DELETE /*-------------------------------------------------------------------------*/ - + function do_delete() { //----------------------------------------- // INIT //----------------------------------------- - + $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); $this->ipsclass->input['to_id'] = intval($this->ipsclass->input['to_id']); - + //----------------------------------------- // Auth check... //----------------------------------------- $this->ipsclass->admin->security_auth_check(); - + //----------------------------------------- // Check //----------------------------------------- - + if ( ! $this->ipsclass->input['id'] ) { - $this->ipsclass->admin->error("Нельзя изменить ID группы, попытайтесь снова"); + $this->ipsclass->admin->error("Could not resolve the group ID, please try again"); } - + if ( ! $this->ipsclass->input['to_id'] ) { $this->ipsclass->admin->error("No move to group ID was specified. /me cries."); } - + //----------------------------------------- // Ensure we didn't choose the root admin // group if we're not a root admin //----------------------------------------- - + if ( $this->ipsclass->vars['admin_group'] == $this->ipsclass->input['id'] ) { if ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) { - $this->ipsclass->admin->error("Извините, но у вас нет прав, чтобы переместить в эту группу"); + $this->ipsclass->admin->error("Sorry, you do not have permission to move into that group"); } } - + //----------------------------------------- // Check to make sure that the relevant groups exist. //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => 'g_id', 'from' => 'groups', 'where' => "g_id IN(".$this->ipsclass->input['id'].",".$this->ipsclass->input['to_id'].")" ) ); $this->ipsclass->DB->simple_exec(); - + if ( $this->ipsclass->DB->get_num_rows() != 2 ) { - $this->ipsclass->admin->error("Нельзя изменить ID удаленной группы"); + $this->ipsclass->admin->error("Could not resolve the ID's passed to group deletion"); } - + $this->ipsclass->DB->do_update( 'members', array( 'mgroup' => $this->ipsclass->input['to_id'] ), 'mgroup='.$this->ipsclass->input['id'] ); - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'groups', 'where' => "g_id=".$this->ipsclass->input['id'] ) ); - + //----------------------------------------- // Look for promotions in case we have members to be promoted to this group... //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => 'g_id', 'from' => 'groups', 'where' => "g_promotion LIKE '{$this->ipsclass->input['id']}&%'" ) ); $prq = $this->ipsclass->DB->simple_exec(); - + while ( $row = $this->ipsclass->DB->fetch_row($prq) ) { $this->ipsclass->DB->do_update( 'groups', array( 'g_promotion' => '-1&-1' ), 'g_id='.$row['g_id'] ); } - + //----------------------------------------- // Remove from moderators table //----------------------------------------- - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'moderators', 'where' => "is_group=1 AND group_id=".$this->ipsclass->input['id'] ) ); //----------------------------------------- // Remove as a secondary group //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => 'mgroup,mgroup_others,id', 'from' => 'members', 'where' => "mgroup_others LIKE '%".$this->ipsclass->input['id']."%'" ) ); $exg = $this->ipsclass->DB->simple_exec(); - + while( $others = $this->ipsclass->DB->fetch_row($exg) ) { $extra = array(); @@ -1690,105 +1682,105 @@ class ad_groups } $this->rebuild_group_cache(); - + // Make sure deleted group is not still listed as a moderator $this->ipsclass->cache['moderators'] = array(); - + require_once( ROOT_PATH.'sources/action_admin/moderator.php' ); $this->mod = new ad_moderator(); $this->mod->ipsclass =& $this->ipsclass; - + $this->mod->rebuild_moderator_cache(); - - $this->ipsclass->admin->save_log("Пользовательская группа'{$this->ipsclass->input['name']}' удалена"); - - $this->ipsclass->main_msg = "Группа удалена"; + + $this->ipsclass->admin->save_log("Member Group '{$this->ipsclass->input['name']}' removed"); + + $this->ipsclass->main_msg = "Group Removed"; $this->main_screen(); } - - + + /*-------------------------------------------------------------------------*/ // Save changes to DB /*-------------------------------------------------------------------------*/ - + function save_group($type='edit') { //----------------------------------------- // INIT //----------------------------------------- - + $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); - + //----------------------------------------- // Auth check... //----------------------------------------- $this->ipsclass->admin->security_auth_check(); - + //----------------------------------------- // Check... //----------------------------------------- - + if ($this->ipsclass->input['g_title'] == "") { - $this->ipsclass->admin->error("Вы должны ввести название группы."); + $this->ipsclass->admin->error("You must enter a group title."); } - + if ($type == 'edit') { if ( ! $this->ipsclass->input['id'] ) { - $this->ipsclass->admin->error("Нельзя изменить id группы"); + $this->ipsclass->admin->error("Could not resolve the group id"); } - + if ($this->ipsclass->input['id'] == $this->ipsclass->vars['admin_group'] and $this->ipsclass->input['g_access_cp'] != 1) { - $this->ipsclass->admin->error("Вы не можете удалить права на админцентр у этой группы"); + $this->ipsclass->admin->error("You can not remove the ability to access the admin control panel for this group"); } } - + //----------------------------------------- // Sort out the perm mask id things //----------------------------------------- - + if ( is_array( $_POST['permid'] ) ) { $perm_id = implode( ",", $_POST['permid'] ); } else { - $this->ipsclass->admin->error("Ни одной маски доступа не выбрано"); + $this->ipsclass->admin->error("No permission sets chosen"); } - + // Build up the hashy washy for the database ..er.. wase. - + $prefix = str_replace( "'", "'" , $this->ipsclass->txt_safeslashes($_POST['prefix']) ); $prefix = str_replace( "<" , "<" , $prefix ); $suffix = str_replace( "'", "'" , $this->ipsclass->txt_safeslashes($_POST['suffix']) ); $suffix = str_replace( "<" , "<" , $suffix ); - + $promotion_a = '-1'; //id $promotion_b = '-1'; // posts - + if (isset($this->ipsclass->input['g_promotion_id']) AND $this->ipsclass->input['g_promotion_id'] > 0) { $promotion_a = $this->ipsclass->input['g_promotion_id']; $promotion_b = $this->ipsclass->input['g_promotion_posts']; } - + if ( $this->ipsclass->input['g_attach_per_post'] and $this->ipsclass->input['g_attach_max'] > 0 ) { if ( $this->ipsclass->input['g_attach_per_post'] > $this->ipsclass->input['g_attach_max'] ) { - $this->ipsclass->main_msg = "Вы не можете указывать лимит на сообщения более, чем общий глобальный лимит."; + $this->ipsclass->main_msg = "You cannot specify a per post limit greater than the globally allowed limit."; $this->group_form('edit'); } } - + $this->ipsclass->input['p_max'] = str_replace( ":", "", $this->ipsclass->input['p_max'] ); $this->ipsclass->input['p_width'] = str_replace( ":", "", $this->ipsclass->input['p_width'] ); $this->ipsclass->input['p_height'] = str_replace( ":", "", $this->ipsclass->input['p_height'] ); - + $db_string = array( 'g_view_board' => $this->ipsclass->input['g_view_board'], 'g_mem_info' => $this->ipsclass->input['g_mem_info'], @@ -1839,112 +1831,112 @@ class ad_groups 'g_dname_changes' => intval($this->ipsclass->input['g_dname_changes']), 'g_dname_date' => intval($this->ipsclass->input['g_dname_date']), ); - - $this->ipsclass->DB->force_data_type = array( 'g_title' => 'string' ); - + + $this->ipsclass->DB->force_data_type = array( 'g_title' => 'string' ); + if ($type == 'edit') { $this->ipsclass->DB->do_update( 'groups', $db_string, 'g_id='.$this->ipsclass->input['id'] ); - + // Update the title of the group held in the mod table incase it changed. - + $this->ipsclass->DB->do_update( 'moderators', array( 'group_name' => trim($this->ipsclass->input['g_title']) ), 'group_id='.$this->ipsclass->input['id'] ); - - $this->ipsclass->admin->save_log("Отредактирована группа '{$this->ipsclass->input['g_title']}'"); - + + $this->ipsclass->admin->save_log("Edited Group '{$this->ipsclass->input['g_title']}'"); + $this->rebuild_group_cache(); - - $this->ipsclass->main_msg = "Группа отредактирована"; + + $this->ipsclass->main_msg = "Group Edited"; $this->main_screen(); - + } else { $this->ipsclass->DB->do_insert( 'groups', $db_string ); - - $this->ipsclass->admin->save_log("Добавлена группа '{$this->ipsclass->input['g_title']}'"); - + + $this->ipsclass->admin->save_log("Added Group '{$this->ipsclass->input['g_title']}'"); + $this->rebuild_group_cache(); - - $this->ipsclass->main_msg = "Группа добавлена"; + + $this->ipsclass->main_msg = "Group Added"; $this->main_screen(); } } - + /*-------------------------------------------------------------------------*/ // Rebuild group cache /*-------------------------------------------------------------------------*/ - + function rebuild_group_cache() { $this->ipsclass->cache['group_cache'] = array(); - + $this->ipsclass->DB->simple_construct( array( 'select' => "*", 'from' => 'groups' ) ); - + $this->ipsclass->DB->simple_exec(); - + while ( $i = $this->ipsclass->DB->fetch_row() ) { $this->ipsclass->cache['group_cache'][ $i['g_id'] ] = $i; } - + $this->ipsclass->update_cache( array( 'name' => 'group_cache', 'array' => 1, 'deletefirst' => 1 ) ); } - + /*-------------------------------------------------------------------------*/ // Clean Perm string /*-------------------------------------------------------------------------*/ - + function clean_perms($str) { $str = preg_replace( "/,$/", "", $str ); $str = str_replace( ",,", ",", $str ); - + return $str; } - + /*-------------------------------------------------------------------------*/ // Add / edit group /*-------------------------------------------------------------------------*/ - + function group_form($type='edit') { - $all_groups = array( 0 => array ('none', 'Не продвигать') ); - + $all_groups = array( 0 => array ('none', 'Don\'t Promote') ); + if ($type == 'edit') { if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Невозможно определить идентификатор (id) группы пользователей."); + $this->ipsclass->admin->error("No group id to select from the database, please try again."); } - + if ( $this->ipsclass->vars['admin_group'] == $this->ipsclass->input['id'] ) { if ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) { - $this->ipsclass->admin->error("Извините, у вас нет доступа к редактированию этой группы. Эта группа относится к главным администраторам."); + $this->ipsclass->admin->error("Sorry, you are unable to edit that group as it's the root admin group"); } } - + $form_code = 'doedit'; - $button = 'Изменить'; - + $button = 'Complete Edit'; + } else { $form_code = 'doadd'; - $button = 'Добавить'; + $button = 'Add Group'; } - + if ($this->ipsclass->input['id'] != "") { $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'groups', 'where' => "g_id=".intval($this->ipsclass->input['id']) ) ); $this->ipsclass->DB->simple_exec(); - + $group = $this->ipsclass->DB->fetch_row(); - + $this->ipsclass->DB->simple_construct( array( 'select' => 'g_id, g_title', 'from' => 'groups', 'where' => "g_id <> ".intval($this->ipsclass->input['id']), @@ -1953,96 +1945,96 @@ class ad_groups else { $group = array(); - + $this->ipsclass->DB->simple_construct( array( 'select' => 'g_id, g_title', 'from' => 'groups', 'order' => 'g_title' ) ); } - + //----------------------------------------- // sort out the promotion stuff //----------------------------------------- - + list($group['g_promotion_id'], $group['g_promotion_posts']) = explode( '&', $group['g_promotion'] ); - + if ($group['g_promotion_posts'] < 1) { $group['g_promotion_posts'] = ''; } - + $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { if ( $r['g_id'] == $this->ipsclass->vars['admin_group'] ) { continue; } - + $all_groups[] = array( $r['g_id'], $r['g_title'] ); } - + //----------------------------------------- - + $perm_masks = array(); - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms' ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $perm_masks[] = array( $r['perm_id'], $r['perm_name'] ); } - + //----------------------------------------- - + if ($type == 'edit') { - $this->ipsclass->admin->page_title = "Изменение группы пользователей «{$group['g_title']}»"; + $this->ipsclass->admin->page_title = "Editing User Group ".$group['g_title']; } else { - $this->ipsclass->admin->page_title = 'Добавление группы пользователей'; - $group['g_title'] = 'Новая группа'; + $this->ipsclass->admin->page_title = 'Adding a new user group'; + $group['g_title'] = 'New Group'; } - + $guest_legend = ""; - + if ($group['g_id'] == $this->ipsclass->vars['guest_group']) { - $guest_legend = "

    Не применительно к гостям."; + $guest_legend = "
    (Does not apply to guests)"; } - - $this->ipsclass->admin->page_detail = "Пожалуйста, перепроверьте все еще раз перед продолжением."; - - + + $this->ipsclass->admin->page_detail = "Please double check the information before submitting the form."; + + //----------------------------------------- - + $this->ipsclass->html .= "\n"; - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , $form_code ), 2 => array( 'act' , 'group' ), 3 => array( 'id' , $this->ipsclass->input['id'] ), 4 => array( 'section', $this->ipsclass->section_code ), ) , 'adform', "onSubmit='return checkform()'" ); - - + + list($p_max, $p_width, $p_height) = explode( ":", $group['g_photo_max_vars'] ); - + //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - + //----------------------------------------- - + $prefix = str_replace( "'", "'", $group['prefix'] ); $prefix = str_replace( '"', """, $prefix ); $prefix = str_replace( "<", "<" , $prefix ); $suffix = str_replace( "'", "'", $group['suffix'] ); $suffix = str_replace( '"', """, $suffix ); $suffix = str_replace( "<", "<" , $suffix ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Глобальные настройки", "Основные настройки группы" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Название группы" , + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Global Settings", "Basic Group Settings" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Group Title" , $this->ipsclass->adskin->form_input("g_title", $group['g_title'] ) ) ); - + //----------------------------------------- // Sort out default array //----------------------------------------- - + $this->ipsclass->html .= ""; - + $arr = explode( ",", $group['g_perm_id'] ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Использовать следующие маски доступа к форумам...
    Можно выбрать несколько, удерживая клавишу Ctrl." , - $this->ipsclass->adskin->form_multiselect("permid[]", $perm_masks, $arr, 5, 'onfocus="saveit(this)"; onchange="saveit(this)";' )."
    " + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Use which permission sets...
    You may choose more than one" , + $this->ipsclass->adskin->form_multiselect("permid[]", $perm_masks, $arr, 5, 'onfocus="saveit(this)"; onchange="saveit(this)";' )."
    " ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Картинка (иконка) группы
    Может выглядеть как style_images/1/folder_team_icons/admin.gif,
    так и в виде полного адреса 'http://'
    Используйте style_images/<#IMG_DIR#>/folder_team_icons/{image} (заменив {image} именем картинки) для динамической загрузки картинок из директории /style_images/ в стиль пользователей.
    (заполнять не обязательно)
    " , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Group Icon Image
    Can be a relative link, i.e. style_images/1/folder_team_icons/admin.gif
    or it can a full URL starting with 'http://'
    Use style_images/<#IMG_DIR#>/folder_team_icons/{image} (replace {image} with the image name) to dynamically load the image from the style_image folder based on the member's skin choice.
    " , $this->ipsclass->adskin->form_textarea("g_icon", htmlspecialchars($group['g_icon']) ) ) ); - - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Отображение в списке активных пользователей
    [приставка перед именем пользователя]

    (поле можно оставить пустым)
    (Пример: <span style='color:red'>)" , + + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Online List Format [Prefix]
    (Can be left blank)
    (Example:<span style='color:red'>)" , $this->ipsclass->adskin->form_input("prefix", $prefix ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Отображение в списке активных пользователей
    [суффикс после имени пользователя]

    (поле можно оставить пустым)
    (Пример: </span>)" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Online List Format [Suffix]
    (Can be left blank)
    (Example:</span>)" , $this->ipsclass->adskin->form_input("suffix", $suffix ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Скрыть эту группу из списка пользователей?" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Hide this group from the member list?" , $this->ipsclass->adskin->form_yes_no("g_hide_from_list", $group['g_hide_from_list'] ) ) ); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Прикрепление файлов", "Управление правами на прикрепление файлов к сообщениям в темах, личных сообщениях и т.д." ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Upload Permissions", "Manage permissions for PM and post uploads, etc" ); + if( $type == 'edit' AND $group['g_attach_max'] == 0 ) { - $group['g_attach_maxdis'] = "не ограничено"; + $group['g_attach_maxdis'] = "unlimited"; } else if( $type == 'edit' AND $group['g_attach_max'] == -1 ) { - $group['g_attach_maxdis'] = "отключено"; + $group['g_attach_maxdis'] = "disabled"; } else { $group['g_attach_maxdis'] = $this->ipsclass->size_format( $group['g_attach_max'] * 1024 ); } - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Глобальные: Максимальное общее место на диске для всех файлов (включая личные сообщения и сообщения в темах) (в килобайтах)".$this->ipsclass->adskin->js_help_link('mg_upload')."
    Введите -1 для отключения возможности прикреплять файлы.
    Введите 0 для отключения действия ограничения на место.
    " , - $this->ipsclass->adskin->form_input("g_attach_max", $group['g_attach_max'] ). ' (сейчас: '.$group['g_attach_maxdis'].')' + + $ini_max = @ini_get( 'upload_max_filesize' ) ? @ini_get( 'upload_max_filesize' ) : 'cannot obtain'; + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "GLOBAL: Max total global file space for all uploads (Inc. PMs and posts) (in KB)".$this->ipsclass->adskin->js_help_link('mg_upload')."
    Enter -1 to disable uploads or enter 0 to disable this limit.
    " , + $this->ipsclass->adskin->form_input("g_attach_max", $group['g_attach_max'] ). ' (currently: '.$group['g_attach_maxdis'].')' . "
    Note that single file uploads are also limited by your PHP configuration to {$ini_max}" ) ); - + if( $type == 'edit' AND $group['g_attach_per_post'] == 0 ) { - $group['g_attach_per_postdis'] = "не ограничено"; + $group['g_attach_per_postdis'] = "unlimited"; } else if( $type == 'edit' AND $group['g_attach_per_post'] == -1 ) { - $group['g_attach_per_postdis'] = "отключено"; + $group['g_attach_per_postdis'] = "disabled"; } else { $group['g_attach_per_postdis'] = $this->ipsclass->size_format( $group['g_attach_per_post'] * 1024 ); } - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "В сообщениях: Максимальное общее место на диске для прикрепленных файлов каждого сообщения или личного сообщения (в килобайтах)".$this->ipsclass->adskin->js_help_link('mg_upload')."
    Введите 0 для отключения действия ограничения на место.
    Это значение должны быть меньшим, чем глобальное ограничение.
    " , - $this->ipsclass->adskin->form_input("g_attach_per_post", $group['g_attach_per_post'] ). ' (сейчас: '.$group['g_attach_per_postdis'].')' + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "PER POST: Max total file space allowed in each post or PM (in KB)".$this->ipsclass->adskin->js_help_link('mg_upload')."
    Enter 0 to disable a per post limit. This number must be less than the global amount.
    " , + $this->ipsclass->adskin->form_input("g_attach_per_post", $group['g_attach_per_post'] ). ' (currently: '.$group['g_attach_per_postdis'].')' . "
    Note that single file uploads are also limited by your PHP configuration to {$ini_max}" ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Фотография: Максимальное место на диске для фотографии пользователя (в килобайтах)
    (Оставьте поле пустым для запрета загрузки фотографии вообще)" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "PERSONAL PHOTO: Max upload file size (in KB)
    (Leave blank to disallow uploads)" , $this->ipsclass->adskin->form_input("p_max", $p_max )."
    " - ."Максимальная ширина (px): " - ."Максимальная высота (px): " + ."Max Width (px): " + ."Max Height (px): " ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Аватар: Разрешить загрузку аватара с жесткого диска пользователя?$guest_legend" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "AVATARS: Allow avatar uploads?$guest_legend" , $this->ipsclass->adskin->form_yes_no("g_avatar_upload", $group['g_avatar_upload'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Личные сообщения: Разрешить прикрепление файлов к личным сообщениям?$guest_legend" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "PMs: Allow PM attachments?$guest_legend" , $this->ipsclass->adskin->form_yes_no("g_can_msg_attach", $group['g_can_msg_attach'] ) ) ); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Основные права", "Ограничения группы: что могут и не могут делать пользователи из данной группы" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Могут просматривать весь форум?" , + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Global Permissions", "Restricting what this group can do" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can view board?" , $this->ipsclass->adskin->form_yes_no("g_view_board", $group['g_view_board'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Могут просматривать ОТКЛЮЧЕННЫЙ (OFFLINE) ФОРУМ?" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can view OFFLINE board?" , $this->ipsclass->adskin->form_yes_no("g_access_offline", $group['g_access_offline'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Могут просматривать профили пользователей и список пользователей?" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can view member profiles and the member list?" , $this->ipsclass->adskin->form_yes_no("g_mem_info", $group['g_mem_info'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Могут просматривать темы, созданные другими пользователями?" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can view other members topics?" , $this->ipsclass->adskin->form_yes_no("g_other_topics", $group['g_other_topics'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Могут использовать поиск по форуму?" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can use search?" , $this->ipsclass->adskin->form_yes_no("g_use_search", $group['g_use_search'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Временной интервал между повторным поиском по форуму (защита от массовых атак сервера) (в секундах)
    Введите количество секунд, в течение которых пользователь этой группы после использования поиска не сможет им воспользоваться повторно. Эта опция защищает форум от атак на сервер за счет массового поиска в короткий период времени.
    Введите 0 для отключения ограничения.
    " , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Number of seconds for search flood control
    Stops search abuse, enter 0 or leave blank for no flood control" , $this->ipsclass->adskin->form_input("g_search_flood", $group['g_search_flood'] ) ) ); - - list( $limit, $flood ) = explode( ":", $group['g_email_limit'] ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Пользователи этой группы могут отправлять письма с форума на e-mail?
    Для отключения ограничений оставьте поле пустым $guest_legend" , + + list( $limit, $flood ) = explode( ":", $group['g_email_limit'] ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can email members from the board?
    Leave bottom section blank to remove limits $guest_legend
    " , $this->ipsclass->adskin->form_yes_no("g_email_friend", $group['g_email_friend'] ) - ."
    Разрешить отправку писем на e-mail только ". $this->ipsclass->adskin->form_simple_input("join_limit", $limit, 2 )." штук в 24 часа" - ."
    ... и разрешить отправку только 1 письма на e-mail каждые ".$this->ipsclass->adskin->form_simple_input("join_flood", $flood, 2 )." минут" + ."
    Only allow ". $this->ipsclass->adskin->form_simple_input("join_limit", $limit, 2 )." emails in a 24hr period" + ."
    ...and only allow 1 email every ".$this->ipsclass->adskin->form_simple_input("join_flood", $flood, 2 )." minutes" ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Могут редактировать свои личные данные?$guest_legend" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can edit own profile info?$guest_legend" , $this->ipsclass->adskin->form_yes_no("g_edit_profile", $group['g_edit_profile'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Могут использовать личные сообщения (PM)?$guest_legend" , + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can use PM system?$guest_legend" , $this->ipsclass->adskin->form_yes_no("g_use_pm", $group['g_use_pm'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Введите максимальное число пользователей для массовой рассылки через личные сообщения пользователем данной группы?
    (Введите 0 или оставьте поле пустым для отключения возможности массовой отправки личных сообщений)
    " , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Max. Number users allowed to mass PM?$guest_legend
    (Enter 0 or leave blank to disable mass PM)" , $this->ipsclass->adskin->form_input("g_max_mass_pm", $group['g_max_mass_pm'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Максимальное количество сохраняемых личных сообщений?$guest_legend" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Max. Number of storable messages?$guest_legend" , $this->ipsclass->adskin->form_input("g_max_messages", $group['g_max_messages'] ) ) ); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - + //----------------------------------------- - - $dd_topic_rate = array( 0 => array( 0, 'Нет' ), 1 => array( 1, 'Да (Не позволять изменять голоса)' ), 2 => array( 2, 'Да (Разрешить изменять голоса)' ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Настройки сообщений", "Права пользователей этой группы для тем и сообщений" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Могут открывать новые темы (где разрешено)?" , + + $dd_topic_rate = array( 0 => array( 0, 'No' ), 1 => array( 1, 'Yes (Not allowed to change vote)' ), 2 => array( 2, 'Yes (Allowed to change vote)' ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Posting Permissions", "Restrict where this group can post" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can post new topics (where allowed)?" , $this->ipsclass->adskin->form_yes_no("g_post_new_topics", $group['g_post_new_topics'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Могут оценивать темы (где это разрешено)?" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can rate topics (in forums where allowed)?" , $this->ipsclass->adskin->form_dropdown("g_topic_rate_setting", $dd_topic_rate, $group['g_topic_rate_setting'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Могут публиковать ответы в СВОИХ (созданных самим пользователем) темах?" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can reply to OWN topics?" , $this->ipsclass->adskin->form_yes_no("g_reply_own_topics", $group['g_reply_own_topics'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Могут публиковать ответы на ЧУЖИЕ темы (где разрешено)?" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can reply to OTHER members topics (where allowed)?" , $this->ipsclass->adskin->form_yes_no("g_reply_other_topics", $group['g_reply_other_topics'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Могут редактировать свои сообщения?$guest_legend" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can edit own posts?$guest_legend" , $this->ipsclass->adskin->form_yes_no("g_edit_posts", $group['g_edit_posts'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Временное ограничение с даты публикации сообщения, после которого редактирование сообщения будет запрещено (в минутах)?$guest_legend
    Запрещает пользователям этой группы редактировать свои сообщения после окончания указанного периода времени.
    Введите 0 или оставьте поле пустым для отключения ограничения.
    " , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Edit time restriction (in minutes)?$guest_legend
    Denies user edit after the time set has passed. Leave blank or enter 0 for no restriction" , $this->ipsclass->adskin->form_input("g_edit_cutoff", $group['g_edit_cutoff'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Могут удалять пометку «Отредактировано...» при редактировании сообщения?$guest_legend" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Allow user to remove 'Edited by' legend?$guest_legend" , $this->ipsclass->adskin->form_yes_no("g_append_edit", $group['g_append_edit'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Могут удалять свои сообщения?$guest_legend" , + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can delete own posts?$guest_legend" , $this->ipsclass->adskin->form_yes_no("g_delete_own_posts", $group['g_delete_own_posts'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Могут открывать/закрывать свои темы?$guest_legend" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can open/close own topics?$guest_legend" , $this->ipsclass->adskin->form_yes_no("g_open_close_posts", $group['g_open_close_posts'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Могут изменять названия и описания своих тем?$guest_legend" , + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can edit own topic title & description?$guest_legend" , $this->ipsclass->adskin->form_yes_no("g_edit_topic", $group['g_edit_topic'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Могут удалять свои темы?$guest_legend" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can delete own topics?$guest_legend" , $this->ipsclass->adskin->form_yes_no("g_delete_own_topics", $group['g_delete_own_topics'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Могут создавать новые опросы (где разрешено)?$guest_legend" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can start new polls (where allowed)?$guest_legend" , $this->ipsclass->adskin->form_yes_no("g_post_polls", $group['g_post_polls'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Могут голосовать (где разрешено)?$guest_legend" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can vote in polls (where allowed)?$guest_legend" , $this->ipsclass->adskin->form_yes_no("g_vote_polls", $group['g_vote_polls'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Не применять к пользователям данной группы флуд-контроль?" , + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can avoid flood control?" , $this->ipsclass->adskin->form_yes_no("g_avoid_flood", $group['g_avoid_flood'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Не применять проверку сообщений перед публикацией модераторами для пользователей этой группы?" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can avoid moderation queues?" , $this->ipsclass->adskin->form_yes_no("g_avoid_q", $group['g_avoid_q'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Могут использовать HTML в сообщениях?$guest_legend
    ".$this->ipsclass->adskin->js_help_link('mg_dohtml') , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can post HTML?$guest_legend
    ".$this->ipsclass->adskin->js_help_link('mg_dohtml') , $this->ipsclass->adskin->form_yes_no("g_dohtml", $group['g_dohtml'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Не применять к пользователям данной группы фильтры плохих слов?$guest_legend
    " , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can bypass the bad word filter?$guest_legend
    " , $this->ipsclass->adskin->form_yes_no("g_bypass_badwords", $group['g_bypass_badwords'] ) ) ); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // DISPLAY NAME OPTIONS //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Права на изменения имен", "Действителен, только когда стоит показ имен" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Изменение имени: Лимит дней
    Это количество дней в течение которых пользователь может произвести изменения. Для примера \"30\" это означает, что пользователь может изменить свое имя только на протяжении 30-ти дней.
    " , + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Display Name Permissions", "Only valid when allowing display names" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Display Name Change: Limit Days
    This is the number of days in which the number of changes are made. For example \"30\" would mean that the user could only change their name X amount of times in a 30 day period
    " , $this->ipsclass->adskin->form_input("g_dname_date", $group['g_dname_date'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( " Изменение имени: Макс. кол-во изменений в Х дней
    Здесь вы указываете число раз, сколько пользователь сможет изменить свое имя в течение Х дней. Установите \"0\", чтобы запретить пользоваться этим преимуществом.
    " , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Display Name Change: Max changes per X days
    This relates to the maximum number of changes a user can make to their display name within the X day period set. Use \"0\" to disallow users from changing their own display name.
    " , $this->ipsclass->adskin->form_input("g_dname_changes", $group['g_dname_changes'] ) ) ); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // MODERATOR OPTIONS //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Установки модерирования", "Управление модераторскими возможностями для этой группы пользователей" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Сделать пользователей этой группы супермодераторами (возможность модерировать везде)?$guest_legend" , + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Moderation Permissions", "Allow or deny this group moderation abilities" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Is Super Moderator (can moderate anywhere)?$guest_legend" , $this->ipsclass->adskin->form_yes_no("g_is_supmod", $group['g_is_supmod'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Разрешить доступ к админцентру форума для пользователей этой группы (очень важный пункт!)?$guest_legend" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can access the Admin CP?$guest_legend" , $this->ipsclass->adskin->form_yes_no("g_access_cp", $group['g_access_cp'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Позволить публиковать ответы в закрытых темах?" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Allow user group to post in 'closed' topics?" , $this->ipsclass->adskin->form_yes_no("g_post_closed", $group['g_post_closed'] ) ) ); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Продвижение пользователей группы" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Group Promotion" ); + if ($group['g_id'] == $this->ipsclass->vars['admin_group']) { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Выберите 'Не перемещать' для отключения продвижения
    ".$this->ipsclass->adskin->js_help_link('mg_promote') , - "Эта возможность отключена для группы главных администраторов." + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Choose 'Don't Promote' to disable promotions
    ".$this->ipsclass->adskin->js_help_link('mg_promote') , + "Feature disabled for the root admin group, after all - if you're at the top where can you be promoted to?" ) ); } else { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Выберите «Не продвигать» для отключения продвижения пользователей этой группы$guest_legend
    ".$this->ipsclass->adskin->js_help_link('mg_promote') , - 'Перемещать пользователей этой группы в другую группу пользователей (например, с более высокими правами) '.$this->ipsclass->adskin->form_dropdown("g_promotion_id", $all_groups, $group['g_promotion_id'] ) - .'
    когда они набирают указанное далее количество сообщений: '.$this->ipsclass->adskin->form_simple_input('g_promotion_posts', $group['g_promotion_posts'] ).'
    (Тут используется значение счетчика сообщений пользователя).' + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Choose 'Don't Promote' to disable promotions$guest_legend
    ".$this->ipsclass->adskin->js_help_link('mg_promote') , + 'Promote members of this group to: '.$this->ipsclass->adskin->form_dropdown("g_promotion_id", $all_groups, $group['g_promotion_id'] ) + .'
    when they reach '.$this->ipsclass->adskin->form_simple_input('g_promotion_posts', $group['g_promotion_posts'] ).' posts' ) ); } - - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form($button); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); - - + + } /*-------------------------------------------------------------------------*/ // Show "Management Screen /*-------------------------------------------------------------------------*/ - + function main_screen() { //----------------------------------------- // INIT //----------------------------------------- - + $g_array = array(); $content = ""; $form = array(); - + //----------------------------------------- // Page details //----------------------------------------- - - $this->ipsclass->admin->page_title = "Группы пользователей"; - $this->ipsclass->admin->page_detail = "Разделение на группы является очень полезной и мощной функцией для организации пользователей на форуме. Нужно помнить, что есть 4 группы, которые Вы не сможете удалить, это: (Неактивированные, Гости, Пользователи и Администраторы), однако Вы можете их редактировать. Рекомендуем Вам создать группу «Модераторы» и наделить их соответствующими правам на форуме (в разделах), которых нет у простых пользователей.
    В параметрах доступа Вы можете произвести быстрые настройки доступов к созданию тем, ответам и чтению форумов. Параметры доступа можно также отредактировать и через меню «Управление форумами»."; - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Управление группами пользователей' ); - + + $this->ipsclass->admin->page_title = "User Groups"; + $this->ipsclass->admin->page_detail = "User Grouping is a quick and powerful way to organise your members. There are 4 preset groups that you cannot remove (Validating, Guest, Member and Admin) although you may edit these at will. A good example of user grouping is to set up a group called 'Moderators' and allow them access to certain forums other groups do not have access to.
    Forum access allows you to make quick changes to that groups forum read, write and reply settings. You may do this on a forum per forum basis in forum control."; + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Manage User Groups' ); + //----------------------------------------- // Get groups //----------------------------------------- - + $this->ipsclass->DB->cache_add_query( 'groups_main_screen', array() ); $this->ipsclass->DB->cache_exec_query(); - + while ( $row = $this->ipsclass->DB->fetch_row() ) { //----------------------------------------- // Set up basics //----------------------------------------- - + $row['_can_delete'] = ( $row['g_id'] > 4 ) ? 1 : 0; $row['_can_acp'] = ( $row['g_access_cp'] == 1 ) ? 1 : 0; $row['_can_supmod'] = ( $row['g_is_supmod'] == 1 ) ? 1 : 0; $row['_title'] = $row['prefix'].$row['g_title'].$row['suffix']; - + if ( $this->ipsclass->vars['admin_group'] == $row['g_id'] ) { $row['_title'] .= " ( ROOT )"; } - + //----------------------------------------- // IMAGES //----------------------------------------- - + $row['_can_acp_img'] = $row['_can_acp'] ? 'aff_tick.png' : 'aff_cross.png'; $row['_can_supmod_img'] = $row['_can_supmod'] ? 'aff_tick.png' : 'aff_cross.png'; - + //----------------------------------------- // Add //----------------------------------------- - + $content .= $this->html->groups_overview_wrapper_row( $row ); - + //----------------------------------------- // Add to array //----------------------------------------- - + $g_array[] = array( $row['g_id'], $row['g_title'] ); } - + //----------------------------------------- // Add form //----------------------------------------- - + $form['_new_dd'] = $this->ipsclass->adskin->form_dropdown("id", $g_array, 3 ); - + $this->ipsclass->html .= $this->html->groups_overview_wrapper( $content, $form ); - + $this->ipsclass->admin->output(); } - - + + } diff --git a/upload/sources/action_admin/help.php b/upload/sources/action_admin/help.php index ae248696..09c91a5f 100644 --- a/upload/sources/action_admin/help.php +++ b/upload/sources/action_admin/help.php @@ -1,538 +1,620 @@ - $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > Help Control functions -| > Module written by Matt Mecham -| > Date started: 2nd April 2002 -| -| > Module Version Number: 1.0.0 -| > DBA Checked: Mon 24th May 2004 -+-------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - - -class ad_help -{ - var $base_url; - var $html; - var $parser; - var $han_editor; - var $image_dir; - - /** - * Section title name - * - * @var string - */ - var $perm_main = "tools"; - - /** - * Section title name - * - * @var string - */ - var $perm_child = "help"; - - function auto_run() - { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Управление разделами помощи' ); - - //----------------------------------------- - - switch($this->ipsclass->input['code']) - { - case 'edit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->show_form('edit'); - break; - case 'new': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); - $this->show_form('new'); - break; - - case 'doedit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->doedit(); - break; - - case 'doreorder': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->doreorder(); - break; - - case 'donew': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); - $this->doadd(); - break; - - case 'remove': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); - $this->remove(); - break; - - case 'master_xml_export': - $this->master_xml_export(); - break; - - //----------------------------------------- - default: - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->list_files(); - break; - } - } - - /*-------------------------------------------------------------------------*/ - // Export Master XML - /*-------------------------------------------------------------------------*/ - - function master_xml_export() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $entry = array(); - - //----------------------------------------- - // Get XML class - //----------------------------------------- - - require_once( KERNEL_PATH.'class_xml.php' ); - - $xml = new class_xml(); - - $xml->doc_type = $this->ipsclass->vars['gb_char_set']; - - $xml->xml_set_root( 'export', array( 'exported' => time() ) ); - - //----------------------------------------- - // Set group - //----------------------------------------- - - $xml->xml_add_group( 'group' ); - - //----------------------------------------- - // Get templates... - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'faq' ) ); - - $this->ipsclass->DB->simple_exec(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $content = array(); - - //----------------------------------------- - // Sort the fields... - //----------------------------------------- - - foreach( $r as $k => $v ) - { - $content[] = $xml->xml_build_simple_tag( $k, $v ); - } - - $entry[] = $xml->xml_build_entry( 'row', $content ); - } - - $xml->xml_add_entry_to_group( 'group', $entry ); - - $xml->xml_format_document(); - - $doc = $xml->xml_document; - - //----------------------------------------- - // Print to browser - //----------------------------------------- - - $this->ipsclass->admin->show_download( $doc, 'faq.xml', '', 0 ); - } - - //----------------------------------------- - // HELP FILE FUNCTIONS - //----------------------------------------- - - function doedit() - { - if ($this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Вы должны ввести правильный ID раздела помощи!"); - } - - //----------------------------------------- - // Load and config the std/rte editors - //----------------------------------------- - - $this->ipsclass->load_skin(); - - require_once( ROOT_PATH."sources/handlers/han_editor.php" ); - $this->han_editor = new han_editor(); - $this->han_editor->ipsclass =& $this->ipsclass; - $this->han_editor->init(); - - //----------------------------------------- - // Load and config the post parser - //----------------------------------------- - - require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); - $this->parser = new parse_bbcode(); - $this->parser->ipsclass =& $this->ipsclass; - $this->parser->allow_update_caches = 1; - - $this->parser->bypass_badwords = 1; - - if ($this->ipsclass->input['title'] == "") - { - $this->ipsclass->admin->error("You must enter a title, silly!"); - } - - $text = $this->han_editor->process_raw_post( 'text' ); - $this->parser->parse_smilies = 1; - $this->parser->parse_html = 1; - $this->parser->parse_bbcode = 1; - $text = $this->parser->pre_display_parse( $this->parser->pre_db_parse( $text ) ); - - //$text = preg_replace( "/\n/", "
    ", stripslashes($_POST['text'] ) ); - //$title = preg_replace( "/\n/", "
    ", stripslashes($_POST['title'] ) ); - //$desc = preg_replace( "/\n/", "
    ", stripslashes($_POST['description'] ) ); - - $text = preg_replace( "/\\\/", "\", $text ); - - $this->ipsclass->DB->do_update( 'faq', array( 'title' => $this->ipsclass->input['title'], - 'text' => $text, - 'description' => $this->ipsclass->my_nl2br( $this->ipsclass->input['description'] ), - ) , "id=".intval($this->ipsclass->input['id']) ); - - $this->ipsclass->admin->save_log("Изменен раздел помощи"); - - $this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}"); - exit(); - - } - - - function doreorder() - { - foreach ($this->ipsclass->input as $key => $value) - { - if ( preg_match( "/^order_(\d+)$/", $key, $match ) ) - { - if ($this->ipsclass->input[$match[0]]) - { - $ids[ $match[1] ] = $this->ipsclass->input[$match[0]]; - } - } - } - - $ids = $this->ipsclass->clean_int_array( $ids ); - - //----------------------------------------- - // Save changes - //----------------------------------------- - - if ( count($ids) ) - { - foreach( $ids as $this_id => $new_position ) - { - $this->ipsclass->DB->do_update( 'faq', array( 'position' => intval($new_position) ), 'id='.$this_id ); - } - } - - $this->ipsclass->boink_it( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code ); - } - - //===================================================== - - - function show_form($type='new') - { - $this->ipsclass->admin->page_detail = "В этой секции вы можете добавлять, изменять и удалять разделы помощи."; - $this->ipsclass->admin->page_title = "Управление разделами помощи"; - $this->ipsclass->admin->nav[] = array( '', 'Добавление/изменение разделами помощи' ); - - //----------------------------------------- - // Load and config the std/rte editors - //----------------------------------------- - - require_once( ROOT_PATH."sources/handlers/han_editor.php" ); - $this->han_editor = new han_editor(); - $this->han_editor->ipsclass =& $this->ipsclass; - $this->han_editor->init(); - $this->han_editor->from_acp = 1; - - $this->han_editor->ed_width = "550px"; - $this->han_editor->ed_height = "200px"; - $this->ipsclass->vars['rte_width'] = "500px"; - $this->ipsclass->vars['rte_height'] = "200px"; - - //----------------------------------------- - // Load and config the post parser - //----------------------------------------- - - require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); - $this->parser = new parse_bbcode(); - $this->parser->ipsclass =& $this->ipsclass; - $this->parser->allow_update_caches = 1; - - $this->parser->bypass_badwords = 1; - - //----------------------------------------- - - if ($type != 'new') - { - - if ($this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Вы должны ввести правильный ID раздела помощи!"); - } - - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'faq', 'where' => "id=".intval($this->ipsclass->input['id']) ) ); - $this->ipsclass->DB->simple_exec(); - - if ( ! $r = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->admin->error("Невозможно найти в базе данных раздел помощи с таким ID"); - } - - if ( $this->han_editor->method == 'rte' ) - { - $r['text'] = $this->parser->pre_display_parse( $this->parser->pre_db_parse( $r['text'] ) ); - $r['text'] = $this->parser->convert_ipb_html_to_html( $r['text'] ); - } - else - { - $this->parser->parse_html = 1; - $this->parser->parse_nl2br = 1; - $this->parser->parse_smilies = 1; - $this->parser->parse_bbcode = 1; - - $r['text'] = $this->parser->pre_edit_parse( $r['text'] ); - } - - //----------------------------------------- - - $button = 'Изменить'; - $code = 'doedit'; - } - else - { - $r = array(); - $button = 'Добавить'; - $code = 'donew'; - } - - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , $code ), - 2 => array( 'act' , 'help' ), - 3 => array( 'id' , $this->ipsclass->input['id'] ), - 4 => array( 'section', $this->ipsclass->section_code ), - ), "theAdminForm", "onclick='return ValidateForm()'", "postingform" ); - - - - $this->ipsclass->adskin->td_header[] = array( " " , "20%" ); - $this->ipsclass->adskin->td_header[] = array( " " , "80%" ); - - //$r['text'] = preg_replace( "/
    /i", "\n", stripslashes($r['text']) ); - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( $button ); - - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Название", - $this->ipsclass->adskin->form_input('title' , $r['title'] ), - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Краткое описание", - $this->ipsclass->adskin->form_textarea('description', $r['description'] ), - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Текст", - //$this->ipsclass->adskin->form_textarea('text', $r['text'], "60", "10" ), - $this->han_editor->show_editor( $r['text'], 'text' ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form($button); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - $this->ipsclass->admin->output(); - - } - - //===================================================== - - function remove() - { - if ($this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Вы должны ввести правильный ID раздела помощи!"); - } - - $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'faq', 'where' => "id=".intval($this->ipsclass->input['id']) ) ); - - $this->ipsclass->admin->save_log("Удален раздел помощи."); - - $this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}"); - exit(); - - - } - - //===================================================== - - function doadd() - { - //----------------------------------------- - // Load and config the std/rte editors - //----------------------------------------- - - $this->ipsclass->load_skin(); - - require_once( ROOT_PATH."sources/handlers/han_editor.php" ); - $this->han_editor = new han_editor(); - $this->han_editor->ipsclass =& $this->ipsclass; - $this->han_editor->init(); - - //----------------------------------------- - // Load and config the post parser - //----------------------------------------- - - require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); - $this->parser = new parse_bbcode(); - $this->parser->ipsclass =& $this->ipsclass; - $this->parser->allow_update_caches = 1; - - $this->parser->bypass_badwords = 1; - - if ($this->ipsclass->input['title'] == "") - { - $this->ipsclass->admin->error("Вы должны ввести название раздела помощи!"); - } - - $text = $this->han_editor->process_raw_post( 'text' ); - $this->parser->parse_smilies = 1; - $this->parser->parse_html = 1; - $this->parser->parse_bbcode = 1; - $text = $this->parser->pre_display_parse( $this->parser->pre_db_parse( $text ) ); - - - //$text = preg_replace( "/\n/", "
    ", stripslashes($_POST['text'] ) ); - //$title = preg_replace( "/\n/", "
    ", stripslashes($_POST['title'] ) ); - //$desc = preg_replace( "/\n/", "
    ", stripslashes($_POST['description'] ) ); - - $text = preg_replace( "/\\\/", "\", $text ); - - $this->ipsclass->DB->do_insert( 'faq', array( 'title' => $this->ipsclass->input['title'], - 'text' => $text, - 'description' => $this->ipsclass->my_nl2br( $this->ipsclass->input['description'] ), - ) ); - - $this->ipsclass->admin->save_log("Добавлен раздел помощи"); - - $this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}"); - exit(); - - - } - - //===================================================== - - function list_files() - { - $this->ipsclass->admin->page_detail = "В этой секции вы можете добавлять, изменять и удалять разделы помощи"; - $this->ipsclass->admin->page_title = "Управление разделами помощи"; - - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doreorder' ), - 2 => array( 'act' , 'help' ), - 5 => array( 'section' , 'tools' ), - ) ); - - //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( "Название" , "45%" ); - $this->ipsclass->adskin->td_header[] = array( "Изменение" , "30%" ); - $this->ipsclass->adskin->td_header[] = array( "Удаление" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Позиция" , "5%" ); - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Разделы помощи" ); - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'faq', 'order' => "position" ) ); - $this->ipsclass->DB->simple_exec(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - $count = $this->ipsclass->DB->get_num_rows(); - - $order_values = array(); - - for( $i=1; $i<=$count; $i++ ) - { - $order_values[] = array( $i, $i ); - } - - $last = 1; - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "".stripslashes($r['title'])."
    ".stripslashes($r['description']), - "
    Изменить
    ", - "
    Удалить
    ", - "
    ".$this->ipsclass->adskin->form_dropdown( 'order_'.$r['id'], $order_values, $r['order'] > 0 ? $r['order'] : $last )."
    ", - ) ); - $last++; - } - } - - $form_button = ""; - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    {$form_button}
    ", "center", "tablesubheader" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - //----------------------------------------- - - $this->ipsclass->admin->output(); - - } - - -} - - + $Date: 2007-05-08 16:35:01 -0400 (Tue, 08 May 2007) $ +| > $Revision: 981 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > Help Control functions +| > Module written by Matt Mecham +| > Date started: 2nd April 2002 +| +| > Module Version Number: 1.0.0 +| > DBA Checked: Mon 24th May 2004 ++-------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class ad_help +{ + var $base_url; + var $html; + var $parser; + var $han_editor; + var $image_dir; + + /** + * Section title name + * + * @var string + */ + var $perm_main = "tools"; + + /** + * Section title name + * + * @var string + */ + var $perm_child = "help"; + + function auto_run() + { + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Manage Help Files' ); + + //----------------------------------------- + + switch($this->ipsclass->input['code']) + { + case 'edit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->show_form('edit'); + break; + case 'new': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); + $this->show_form('new'); + break; + + case 'doedit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->doedit(); + break; + + case 'doreorder': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->doreorder(); + break; + + case 'donew': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); + $this->doadd(); + break; + + case 'remove': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); + $this->remove(); + break; + + case 'master_xml_export': + $this->master_xml_export(); + break; + + case 'acp_help': + $this->rebuild_acp_help(); + break; + + //----------------------------------------- + default: + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->list_files(); + break; + } + } + + + /*-------------------------------------------------------------------------*/ + // Rebuild ACP Help + /*-------------------------------------------------------------------------*/ + + function rebuild_acp_help() + { + $new = 0; + $updated = 0; + $keys = array(); + + $this->ipsclass->DB->build_query( array( 'select' => 'page_key', 'from' => 'acp_help' ) ); + $this->ipsclass->DB->exec_query(); + + while( $r = $this->ipsclass->DB->fetch_row() ) + { + $keys[] = $r['page_key']; + } + + require_once( KERNEL_PATH . 'class_xml.php' ); + $xml = new class_xml(); + $xml->lite_parser = 1; + + $content = implode( "", file( ROOT_PATH . 'resources/help_sections.xml' ) ); + $xml->xml_parse_document( $content ); + + foreach( $xml->xml_array['helpsectionsexport']['helpsectionsgroup']['helpsections'] as $id => $entry ) + { + $newrow = array( + 'is_setting' => 0, + 'page_key' => $entry['key']['VALUE'], + 'help_title' => $entry['title']['VALUE'], + 'help_body' => $entry['helptext']['VALUE'], + ); + + if( in_array( $newrow['page_key'], $keys ) ) + { + $this->ipsclass->DB->do_update( 'acp_help', $newrow, "page_key='{$newrow['page_key']}'" ); + + $updated++; + } + else + { + $this->ipsclass->DB->do_insert( 'acp_help', $newrow ); + + $new++; + } + } + + $xml = new class_xml(); + $xml->lite_parser = 1; + + $content = implode( "", file( ROOT_PATH . 'resources/help_settings.xml' ) ); + $xml->xml_parse_document( $content ); + + foreach( $xml->xml_array['helpsettingsexport']['helpsettingsgroup']['helpsettings'] as $id => $entry ) + { + $newrow = array( + 'is_setting' => 1, + 'page_key' => $entry['key']['VALUE'], + 'help_title' => $entry['title']['VALUE'], + 'help_body' => $entry['helptext']['VALUE'], + 'help_mouseover'=> $entry['mouseover']['VALUE'], + ); + + if( in_array( $newrow['page_key'], $keys ) ) + { + $this->ipsclass->DB->do_update( 'acp_help', $newrow, "page_key='{$newrow['page_key']}'" ); + + $updated++; + } + else + { + $this->ipsclass->DB->do_insert( 'acp_help', $newrow ); + + $new++; + } + } + + $this->ipsclass->main_msg = "{$new} new ACP help files and {$updated} updated ACP help files imported"; + + $this->list_files(); + } + + + /*-------------------------------------------------------------------------*/ + // Export Master XML + /*-------------------------------------------------------------------------*/ + + function master_xml_export() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $entry = array(); + + //----------------------------------------- + // Get XML class + //----------------------------------------- + + require_once( KERNEL_PATH.'class_xml.php' ); + + $xml = new class_xml(); + + $xml->doc_type = $this->ipsclass->vars['gb_char_set']; + + $xml->xml_set_root( 'export', array( 'exported' => time() ) ); + + //----------------------------------------- + // Set group + //----------------------------------------- + + $xml->xml_add_group( 'group' ); + + //----------------------------------------- + // Get templates... + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', + 'from' => 'faq' ) ); + + $this->ipsclass->DB->simple_exec(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $content = array(); + + //----------------------------------------- + // Sort the fields... + //----------------------------------------- + + foreach( $r as $k => $v ) + { + $content[] = $xml->xml_build_simple_tag( $k, $v ); + } + + $entry[] = $xml->xml_build_entry( 'row', $content ); + } + + $xml->xml_add_entry_to_group( 'group', $entry ); + + $xml->xml_format_document(); + + $doc = $xml->xml_document; + + //----------------------------------------- + // Print to browser + //----------------------------------------- + + $this->ipsclass->admin->show_download( $doc, 'faq.xml', '', 0 ); + } + + //----------------------------------------- + // HELP FILE FUNCTIONS + //----------------------------------------- + + function doedit() + { + if ($this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("You must pass a valid emoticon id, silly!"); + } + + //----------------------------------------- + // Load and config the std/rte editors + //----------------------------------------- + + $this->ipsclass->load_skin(); + + require_once( ROOT_PATH."sources/handlers/han_editor.php" ); + $this->han_editor = new han_editor(); + $this->han_editor->ipsclass =& $this->ipsclass; + $this->han_editor->init(); + + //----------------------------------------- + // Load and config the post parser + //----------------------------------------- + + require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); + $this->parser = new parse_bbcode(); + $this->parser->ipsclass =& $this->ipsclass; + $this->parser->allow_update_caches = 1; + + $this->parser->bypass_badwords = 1; + + if ($this->ipsclass->input['title'] == "") + { + $this->ipsclass->admin->error("You must enter a title, silly!"); + } + + $text = $this->han_editor->process_raw_post( 'text' ); + $this->parser->parse_smilies = 1; + $this->parser->parse_html = 1; + $this->parser->parse_bbcode = 1; + $text = $this->parser->pre_display_parse( $this->parser->pre_db_parse( $text ) ); + + //$text = preg_replace( "/\n/", "
    ", stripslashes($_POST['text'] ) ); + //$title = preg_replace( "/\n/", "
    ", stripslashes($_POST['title'] ) ); + //$desc = preg_replace( "/\n/", "
    ", stripslashes($_POST['description'] ) ); + + $text = preg_replace( "/\\\/", "\", $text ); + + $this->ipsclass->DB->do_update( 'faq', array( 'title' => $this->ipsclass->input['title'], + 'text' => $text, + 'description' => $this->ipsclass->my_nl2br( $this->ipsclass->input['description'] ), + ) , "id=".intval($this->ipsclass->input['id']) ); + + $this->ipsclass->admin->save_log("Edited help files"); + + $this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}"); + exit(); + + } + + + function doreorder() + { + foreach ($this->ipsclass->input as $key => $value) + { + if ( preg_match( "/^order_(\d+)$/", $key, $match ) ) + { + if ($this->ipsclass->input[$match[0]]) + { + $ids[ $match[1] ] = $this->ipsclass->input[$match[0]]; + } + } + } + + $ids = $this->ipsclass->clean_int_array( $ids ); + + //----------------------------------------- + // Save changes + //----------------------------------------- + + if ( count($ids) ) + { + foreach( $ids as $this_id => $new_position ) + { + $this->ipsclass->DB->do_update( 'faq', array( 'position' => intval($new_position) ), 'id='.$this_id ); + } + } + + $this->ipsclass->boink_it( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code ); + } + + //===================================================== + + + function show_form($type='new') + { + $this->ipsclass->admin->page_detail = "You may add/edit and remove help files below."; + $this->ipsclass->admin->page_title = "Help File Management"; + $this->ipsclass->admin->nav[] = array( '', 'Add/Edit Help Files' ); + + //----------------------------------------- + // Load and config the std/rte editors + //----------------------------------------- + + require_once( ROOT_PATH."sources/handlers/han_editor.php" ); + $this->han_editor = new han_editor(); + $this->han_editor->ipsclass =& $this->ipsclass; + $this->han_editor->from_acp = 1; + $this->han_editor->ed_width = "550px"; + $this->han_editor->ed_height = "200px"; + $this->ipsclass->vars['rte_width'] = "500px"; + $this->ipsclass->vars['rte_height'] = "200px"; + $this->han_editor->init(); + + //----------------------------------------- + // Load and config the post parser + //----------------------------------------- + + require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); + $this->parser = new parse_bbcode(); + $this->parser->ipsclass =& $this->ipsclass; + $this->parser->allow_update_caches = 1; + + $this->parser->bypass_badwords = 1; + + //----------------------------------------- + + if ($type != 'new') + { + + if ($this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("You must pass a valid help file id, silly!"); + } + + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'faq', 'where' => "id=".intval($this->ipsclass->input['id']) ) ); + $this->ipsclass->DB->simple_exec(); + + if ( ! $r = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->admin->error("We could not find that help file in the database"); + } + + if ( $this->han_editor->method == 'rte' ) + { + $r['text'] = $this->parser->pre_display_parse( $this->parser->pre_db_parse( $r['text'] ) ); + $r['text'] = $this->parser->convert_ipb_html_to_html( $r['text'] ); + } + else + { + $this->parser->parse_html = 1; + $this->parser->parse_nl2br = 1; + $this->parser->parse_smilies = 1; + $this->parser->parse_bbcode = 1; + + $r['text'] = $this->parser->pre_edit_parse( $r['text'] ); + } + + //----------------------------------------- + + $button = 'Edit this Help File'; + $code = 'doedit'; + } + else + { + $r = array(); + $button = 'Add this Help File'; + $code = 'donew'; + } + + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , $code ), + 2 => array( 'act' , 'help' ), + 3 => array( 'id' , $this->ipsclass->input['id'] ), + 4 => array( 'section', $this->ipsclass->section_code ), + ), "theAdminForm", "onclick='return ValidateForm()'", "postingform" ); + + + + $this->ipsclass->adskin->td_header[] = array( " " , "20%" ); + $this->ipsclass->adskin->td_header[] = array( " " , "80%" ); + + //$r['text'] = preg_replace( "/
    /i", "\n", stripslashes($r['text']) ); + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( $button ); + + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Help File Title", + $this->ipsclass->adskin->form_input('title' , $r['title'] ), + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Help File Description", + $this->ipsclass->adskin->form_textarea('description', $r['description'] ), + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Help File Text", + //$this->ipsclass->adskin->form_textarea('text', $r['text'], "60", "10" ), + $this->han_editor->show_editor( $r['text'], 'text' ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form($button); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + $this->ipsclass->admin->output(); + + } + + //===================================================== + + function remove() + { + if ($this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("You must pass a valid help file id, silly!"); + } + + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'faq', 'where' => "id=".intval($this->ipsclass->input['id']) ) ); + + $this->ipsclass->admin->save_log("Removed a help file"); + + $this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}"); + exit(); + + + } + + //===================================================== + + function doadd() + { + //----------------------------------------- + // Load and config the std/rte editors + //----------------------------------------- + + $this->ipsclass->load_skin(); + + require_once( ROOT_PATH."sources/handlers/han_editor.php" ); + $this->han_editor = new han_editor(); + $this->han_editor->ipsclass =& $this->ipsclass; + $this->han_editor->init(); + + //----------------------------------------- + // Load and config the post parser + //----------------------------------------- + + require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); + $this->parser = new parse_bbcode(); + $this->parser->ipsclass =& $this->ipsclass; + $this->parser->allow_update_caches = 1; + + $this->parser->bypass_badwords = 1; + + if ($this->ipsclass->input['title'] == "") + { + $this->ipsclass->admin->error("You must enter a title, silly!"); + } + + $text = $this->han_editor->process_raw_post( 'text' ); + $this->parser->parse_smilies = 1; + $this->parser->parse_html = 1; + $this->parser->parse_bbcode = 1; + $text = $this->parser->pre_display_parse( $this->parser->pre_db_parse( $text ) ); + + + //$text = preg_replace( "/\n/", "
    ", stripslashes($_POST['text'] ) ); + //$title = preg_replace( "/\n/", "
    ", stripslashes($_POST['title'] ) ); + //$desc = preg_replace( "/\n/", "
    ", stripslashes($_POST['description'] ) ); + + $text = preg_replace( "/\\\/", "\", $text ); + + $this->ipsclass->DB->do_insert( 'faq', array( 'title' => $this->ipsclass->input['title'], + 'text' => $text, + 'description' => $this->ipsclass->my_nl2br( $this->ipsclass->input['description'] ), + ) ); + + $this->ipsclass->admin->save_log("Added a help file"); + + $this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}"); + exit(); + + + } + + //===================================================== + + function list_files() + { + $this->ipsclass->admin->page_detail = "You may add/edit and remove help files below."; + $this->ipsclass->admin->page_title = "Help File Management"; + + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doreorder' ), + 2 => array( 'act' , 'help' ), + 5 => array( 'section' , 'tools' ), + ) ); + + //----------------------------------------- + + $this->ipsclass->adskin->td_header[] = array( "Title" , "45%" ); + $this->ipsclass->adskin->td_header[] = array( "Edit" , "30%" ); + $this->ipsclass->adskin->td_header[] = array( "Remove" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Position" , "5%" ); + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Current Help Files" ); + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'faq', 'order' => "position" ) ); + $this->ipsclass->DB->simple_exec(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + $count = $this->ipsclass->DB->get_num_rows(); + + $order_values = array(); + + for( $i=1; $i<=$count; $i++ ) + { + $order_values[] = array( $i, $i ); + } + + $last = 1; + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "".stripslashes($r['title'])."
    ".stripslashes($r['description']), + "
    Edit
    ", + "
    Remove
    ", + "
    ".$this->ipsclass->adskin->form_dropdown( 'order_'.$r['id'], $order_values, $r['order'] > 0 ? $r['order'] : $last )."
    ", + ) ); + $last++; + } + } + + $form_button = ""; + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    {$form_button}
    ", "center", "tablesubheader" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + //----------------------------------------- + + $this->ipsclass->html .= "
    Rebuild ACP Help Files
    "; + + $this->ipsclass->admin->output(); + + } + + +} + + ?> \ No newline at end of file diff --git a/upload/sources/action_admin/index.html b/upload/sources/action_admin/index.html index 250b1f72..b49fc27d 100644 --- a/upload/sources/action_admin/index.html +++ b/upload/sources/action_admin/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/sources/action_admin/ips.php b/upload/sources/action_admin/ips.php index 09d1207c..ce286066 100644 --- a/upload/sources/action_admin/ips.php +++ b/upload/sources/action_admin/ips.php @@ -1,133 +1,125 @@ - $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > IPS Remote Call thingy -| > Module written by Matt Mecham -| > Date started: 17th October 2002 -| -| > Module Version Number: 1.0.0 -| > DBA Checked: Tue 25th May 2004 -+-------------------------------------------------------------------------- -*/ - - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - - -class ad_ips { - - var $base_url; - - var $colours = array(); - - var $url = "http://www.invisionboard.com/acp/"; - - var $version = "1.1"; - - function auto_run() - { - //----------------------------------------- - - switch($this->ipsclass->input['code']) - { - - case 'news': - $this->news(); - break; - - case 'updates': - $this->updates(); - break; - - case 'docs': - $this->docs(); - break; - - case 'support': - $this->support(); - break; - - case 'host': - $this->host(); - break; - - case 'purchase': - $this->purchase(); - break; - - //----------------------------------------- - default: - exit(); - break; - } - - } - - - - - function news() - { - @header("Location: ".$this->url."?news"); - exit(); - } - - function updates() - { - //@header("Location: ".$this->url."?updates&version=".$this->version); - @header("Location: ".$this->url."?updates"); - exit(); - } - - function docs() - { - @header("Location: http://www.invisionpower.com/documentation/showdoc.php"); - exit(); - } - - function support() - { - @header("Location: ".$this->url."?support"); - exit(); - } - - function host() - { - @header("Location: ".$this->url."?host"); - exit(); - } - - function purchase() - { - @header("Location: ".$this->url."?purchase"); - exit(); - } -} + $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ +| > $Revision: 567 $ +| > $Author: matt $ ++--------------------------------------------------------------------------- +| +| > IPS Remote Call thingy +| > Module written by Matt Mecham +| > Date started: 17th October 2002 +| +| > Module Version Number: 1.0.0 +| > DBA Checked: Tue 25th May 2004 ++-------------------------------------------------------------------------- +*/ + + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class ad_ips { + + var $base_url; + + var $colours = array(); + + var $url = "http://anonym.to/http://www.invisionboard.com/acp/"; + + var $version = "1.1"; + + function auto_run() + { + //----------------------------------------- + + switch($this->ipsclass->input['code']) + { + + case 'news': + $this->news(); + break; + + case 'updates': + $this->updates(); + break; + + case 'docs': + $this->docs(); + break; + + case 'support': + $this->support(); + break; + + case 'host': + $this->host(); + break; + + case 'purchase': + $this->purchase(); + break; + + //----------------------------------------- + default: + exit(); + break; + } + + } + + + + + function news() + { + @header("Location: ".$this->url."?news"); + exit(); + } + + function updates() + { + //@header("Location: ".$this->url."?updates&version=".$this->version); + @header("Location: ".$this->url."?updates"); + exit(); + } + + function docs() + { + @header("Location: http://anonym.to/http://www.invisionpower.com/documentation/showdoc.php"); + exit(); + } + + function support() + { + @header("Location: ".$this->url."?support"); + exit(); + } + + function host() + { + @header("Location: ".$this->url."?host"); + exit(); + } + + function purchase() + { + @header("Location: ".$this->url."?purchase"); + exit(); + } +} ?> \ No newline at end of file diff --git a/upload/sources/action_admin/languages.php b/upload/sources/action_admin/languages.php index 10bc3b85..653dfe1e 100644 --- a/upload/sources/action_admin/languages.php +++ b/upload/sources/action_admin/languages.php @@ -2,25 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-10-30 17:01:56 -0600 (Mon, 30 Oct 2006) $ -| > $Revision: 685 $ +| > $Date: 2008-01-28 12:25:34 -0500 (Mon, 28 Jan 2008) $ +| > $Revision: 1180 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -35,7 +27,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Неверный вход

    У Вас нет доступа к директиве этого файла. Если вы проводили обновления, убедитесь, что не забыли обновить 'admin.php'."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -50,84 +42,84 @@ class ad_languages { * @var string */ var $perm_main = "lookandfeel"; - + /** * Section title name * * @var string */ var $perm_child = "lang"; - + function auto_run() { if ( TRIAL_VERSION ) { - print "Эта функция отключена в бесплатной версии."; + print "This feature is disabled in the trial version."; exit(); } - - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Управление языками' ); - + + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Manage Language Sets' ); + //----------------------------------------- switch($this->ipsclass->input['code']) { - + case 'add': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); $this->add_language(); break; - + case 'edit': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->do_form('edit'); break; - + case 'edit2': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->show_file(); break; - + case 'doadd': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); $this->save_wrapper('add'); break; - + case 'doedit': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->save_langfile(); break; - + case 'remove': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->remove(); break; - + case 'editinfo': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->edit_info(); break; - + case 'export': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':export' ); $this->export(); break; - + case 'import': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':import' ); $this->import(); break; - + case 'doimport': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':import' ); $this->doimport(); break; - + case 'makedefault': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->make_default(); break; - + case 'swap': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->member_swap(); @@ -139,18 +131,18 @@ class ad_languages { break; } } - + //----------------------------------------- // Swap members choice //----------------------------------------- - + function member_swap() { $new_dir = ""; $old_dir = ""; $this->ipsclass->input['new'] = intval($this->ipsclass->input['new']); $this->ipsclass->input['old'] = intval($this->ipsclass->input['old']); - + if ( $this->ipsclass->input['old'] and $this->ipsclass->input['new'] ) { if ( $this->ipsclass->input['old'] != 'none' ) @@ -163,20 +155,20 @@ class ad_languages { $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'languages', 'where' => "lid={$this->ipsclass->input['new']}" ) ); $this->ipsclass->DB->simple_exec(); } - + while ( $r = $this->ipsclass->DB->fetch_row() ) { if ( $r['lid'] == $this->ipsclass->input['old'] ) { $old_dir = $r['ldir']; } - + if ( $r['lid'] == $this->ipsclass->input['new'] ) { $new_dir = $r['ldir']; } } - + if ( $new_dir and $old_dir ) { $this->ipsclass->DB->do_update( 'members', array( 'language' => $new_dir ), "language='{$old_dir}'" ); @@ -186,87 +178,87 @@ class ad_languages { $this->ipsclass->DB->do_update( 'members', array( 'language' => $new_dir ), "language='' or language IS NULL" ); } } - - $this->ipsclass->main_msg = "У всех пользователей переустановлен язык"; + + $this->ipsclass->main_msg = "Member's language choice updated"; $this->list_current(); } - + //----------------------------------------- // Rebuild CACHE //----------------------------------------- - + function rebuild_cache() { $this->ipsclass->cache['languages'] = array(); - + $this->ipsclass->DB->simple_construct( array( 'select' => 'ldir,lname', 'from' => 'languages' ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $this->ipsclass->cache['languages'][] = $r; } - + $this->ipsclass->update_cache( array( 'name' => 'languages', 'array' => 1, 'deletefirst' => 1 ) ); } - + //----------------------------------------- - + function make_default() { $new_dir = stripslashes(urldecode(trim($_GET['id']))); - + if ($new_dir == "") { - $this->ipsclass->admin->error("Невозможно определить ID языка"); + $this->ipsclass->admin->error("Could not resolve the new ID for the default lang pack stuff thingy thanks"); } - - // Update conf file - + + // Update conf file + $this->ipsclass->admin->rebuild_config( array( 'default_language' => $new_dir ) ); - + // Bring it all back to yoooo! - + $this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}"); - + } - - + + /*-------------------------------------------------------------------------*/ // IMPORT - DO IT /*-------------------------------------------------------------------------*/ - + function doimport() { $messages = array(); - + //----------------------------------------- // Check //----------------------------------------- - + if ( ! $this->ipsclass->input['lang_name'] ) { - $this->ipsclass->admin->error("Вы должны ввести названия для импортируемого языка!"); + $this->ipsclass->admin->error("You must enter a name for this language import!"); } - + if ( $_FILES['FILE_UPLOAD']['name'] == "" or ! $_FILES['FILE_UPLOAD']['name'] or ($_FILES['FILE_UPLOAD']['name'] == "none") ) { //----------------------------------------- // check and load from server //----------------------------------------- - + if ( ! $this->ipsclass->input['lang_location'] ) { - $this->ipsclass->main_msg = "Импортируемый файл не найден."; + $this->ipsclass->main_msg = "No upload file was found and no filename was specified."; $this->import(); } - + if ( ! file_exists( ROOT_PATH . $this->ipsclass->input['lang_location'] ) ) { - $this->ipsclass->main_msg = "Невозможно найти файл: " . ROOT_PATH . $this->ipsclass->input['lang_location']; + $this->ipsclass->main_msg = "Could not find the file to open at: " . ROOT_PATH . $this->ipsclass->input['lang_location']; $this->import(); } - + if ( preg_match( "#\.gz$#", $this->ipsclass->input['lang_location'] ) ) { if ( $FH = @gzopen( ROOT_PATH.$this->ipsclass->input['lang_location'], 'rb' ) ) @@ -275,7 +267,7 @@ class ad_languages { { $content .= @gzread( $FH, 1024 ); } - + @gzclose( $FH ); } } @@ -293,270 +285,272 @@ class ad_languages { //----------------------------------------- // Get uploaded schtuff //----------------------------------------- - + $tmp_name = $_FILES['FILE_UPLOAD']['name']; $tmp_name = preg_replace( "#\.gz$#", "", $tmp_name ); - + $content = $this->ipsclass->admin->import_xml( $tmp_name ); - + if( !$content ) { $this->ipsclass->main_msg = "There was an error processing the file."; $this->import(); - } + } } - + //----------------------------------------- // Check dirs, etc //----------------------------------------- - + $safename = substr( str_replace( " ", "", strtolower( preg_replace( "[^a-zA-Z0-9]", "", $this->ipsclass->input['lang_name'] ) ) ), 0, 10 ); - + if ( @file_exists( CACHE_PATH.'cache/lang_cache/'.$safename ) ) { $safename = $safename . substr( time(), 5, 10 ); } - + if ( ! $content ) { - $this->ipsclass->main_msg = "XML-архив пуст, пожалуйста, проверьте архив и попробуйте еще раз"; + $this->ipsclass->main_msg = "The XML file appears to be empty - please check the form and try again"; $this->import(); } - + //----------------------------------------- // Get xml mah-do-dah //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); $xml = new class_xml(); - + $xml->doc_type = $this->ipsclass->vars['gb_char_set']; + //----------------------------------------- // Unpack the datafile //----------------------------------------- - - $xml->lite_parser = 1; + $xml->xml_parse_document( $content ); - + //----------------------------------------- // pArse //----------------------------------------- - + $lang_array = array(); - - foreach( $xml->xml_array['languageexport']['languagegroup']['langbit'] as $entry ) + + if( count($xml->xml_array['languageexport']['languagegroup']['langbit']) ) { - if( $entry['file']['VALUE'] == 'lang_javascript.js' ) + foreach( $xml->xml_array['languageexport']['languagegroup']['langbit'] as $entry ) { - $lang_array[ $entry['file']['VALUE'] ] = $entry['value']['VALUE']; + if( $entry['file']['VALUE'] == 'lang_javascript.js' ) + { + $lang_array[ $entry['file']['VALUE'] ] = $entry['value']['VALUE']; + } + else + { + $key = $entry['key']['VALUE']; + $value = $entry['value']['VALUE']; + $file = $entry['file']['VALUE']; + + $lang_array[ $file ][ $key ] = $value; + } } - else - { - $key = $entry['key']['VALUE']; - $value = $entry['value']['VALUE']; - $file = $entry['file']['VALUE']; - - $lang_array[ $file ][ $key ] = $value; } - } - - //----------------------------------------- - // Sort... - //----------------------------------------- - - ksort($lang_array); if ( ! count( $lang_array ) ) { - $this->ipsclass->main_msg = "XML-архив пуст, пожалуйста, проверьте архив и попробуйте еще раз"; + $this->ipsclass->main_msg = "The XML file appears to be empty - please check the form and try again"; $this->import(); } - + + //----------------------------------------- + // Sort... + //----------------------------------------- + + ksort($lang_array); + //----------------------------------------- // Attempt dir creation //----------------------------------------- - + if ( ! @mkdir( CACHE_PATH.'cache/lang_cache/'.$safename, 0777 ) ) { - $this->ipsclass->main_msg = "Невозможно создать директорию '$safename' в директории './lang' - проверьте права доступа (CHMOD) у директории 'lang' и попробуйте еще раз."; + $this->ipsclass->main_msg = "Cannot create the directory '$safename' in the './cache/lang_cache' directory - please check directory permissions on 'lang_cache' and try again."; $this->import(); } else { @chmod( CACHE_PATH.'cache/lang_cache/'.$safename, 0777 ); } - + //print "
    "; print_r( $new_file_array ); exit();
    -
    +		
     		//-----------------------------------------
     		// Loop, sort - compile and save
     		//-----------------------------------------
    -
    +		
     		foreach( $lang_array as $file => $data )
     		{
     			$new_file_array = array();
    -
    +			
     			$real_name      = $file;
     
     			if( $real_name == 'lang_javascript.js' )
     			{
     				$file_contents = base64_decode( $data );
    -
    +				
     				if ( $FH = @fopen( CACHE_PATH.'cache/lang_cache/'.$safename.'/'.$real_name, 'w' ) )
     				{
     					@fwrite( $FH, $file_contents );
     					@fclose( $FH );
    -
    -					$messages[] = "Файл '{$file}' импортирован!"; 
    +				
    +					$messages[] = "'{$file}' imported correctly!";
     				}
     				else
     				{
    -					$messages[] = "Невозможно создать файл '{$file}', файл пропущен...";
    +					$messages[] = "Cannot create '{$file}' - skipping...";
     				}
    -
    +				
     				continue;
    -			}
    -
    +			}				
    +			
     			if( is_array($lang_array[ $file ]) AND count($lang_array[ $file ]) )
     			{
    -			foreach( $lang_array[ $file ] as $k => $v )
    -			{
    -				$new_file_array[ $k ] = $v;
    +				foreach( $lang_array[ $file ] as $k => $v )
    +				{
    +					$new_file_array[ $k ] = $v;
    +				}
    +			
    +				ksort($new_file_array);
     			}
    -
    -			ksort($new_file_array);
    -			}
    -
    +			
     			if ( count( $new_file_array ) )
     			{
     				$file_contents = " $v)
     				{
     					$file_contents .= "\n'".$k."'  => \"".preg_replace( '/"/', '\\"', stripslashes($v) )."\",";
     				}
    -
    -				$file_contents .= "\n\n);\n\n?".">";
    -
    +				
    +				$file_contents .= "\n\n);\n\n?".">";				
    +				
     				if ( $FH = @fopen( CACHE_PATH.'cache/lang_cache/'.$safename.'/'.$real_name, 'w' ) )
     				{
     					@fwrite( $FH, $file_contents );
     					@fclose( $FH );
    -
    -					$messages[] = "Файл '{$file}' импортирован!";
    +				
    +					$messages[] = "'{$file}' imported correctly!";
     				}
     				else
     				{
    -					$messages[] = "Невозможно создать файл '{$file}', файл пропущен...";
    +					$messages[] = "Cannot create '{$file}' - skipping...";
     				}
    -
     			}
     			else
     			{
    -				$messages[] = "Файл '{$file}' пуст, файл пропущен...";
    +				$messages[] = "'{$file}' appears to be empty - skipping...";
     			}
    -
    +			
     			unset($new_file_array);
     			unset($file_contents);
     		}
    -
    +		
     		//-----------------------------------------
     		// Write to DB
     		//-----------------------------------------
    -
    +		
     		$this->ipsclass->DB->do_insert( 'languages', array(
     											'ldir'    => $safename,
     											'lname'   => $this->ipsclass->input['lang_name'],
     											'lauthor' => $xml->xml_array['languageexport']['ATTRIBUTES']['author'],
     											'lemail'  => $xml->xml_array['languageexport']['ATTRIBUTES']['email'],
     					  )                   );
    -
    +		
     		$this->rebuild_cache();
    -
    -		$this->ipsclass->main_msg = "Импортирование успешно завершено
    ".implode( "\n
    ", $messages ); + + $this->ipsclass->main_msg = "Import attempt completed
    ".implode( "\n
    ", $messages ); $this->import(); } - + /*-------------------------------------------------------------------------*/ // Import XML Archive (FORM) /*-------------------------------------------------------------------------*/ - + function import() { - $this->ipsclass->admin->page_detail = "Эта секция позволяет вам импортировать XML-файлы содержащие языковые настройки."; - $this->ipsclass->admin->page_title = "Импорт языка"; + $this->ipsclass->admin->page_detail = "This section will allow you to import an XML file containing all the language data."; + $this->ipsclass->admin->page_title = "Language Pack Import"; $this->ipsclass->admin->nav[] = array( '', 'Import Language Pack' ); - + //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doimport' ), 2 => array( 'act' , 'lang' ), 3 => array( 'MAX_FILE_SIZE' , '10000000000' ), 4 => array( 'section' , $this->ipsclass->section_code ), ) , "uploadform", " enctype='multipart/form-data'" ); - + //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "50%" ); $this->ipsclass->adskin->td_header[] = array( " " , "50%" ); //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Импортирование XML-файла" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Загрузка XML-архива с языковыми настройками
    Выберите файл для загрузки с вашего компьютера. Выбранный файл должен начинаться с 'ipb_language' и заканчиваться либо '.xml', либо '.xml.gz'.
    " , + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Import an XML language file" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Upload XML language file from your computer
    The file must begin with 'ipb_language' and end with either '.xml' or '.xml.gz'
    " , $this->ipsclass->adskin->form_upload( ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "ИЛИ введите название XML-архива
    Этот файл должен быть загружен в основную директорию форума.
    " , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "OR enter the filename of the XML language file
    The file must be uploaded into the forum's root folder
    " , $this->ipsclass->adskin->form_input( 'lang_location', 'ipb_language.xml.gz' ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Введите название для новых языковых настроек
    Например: Русский, RU, English, US...
    " , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Enter the name for this new language set
    For example: English, US, German, DE...
    " , $this->ipsclass->adskin->form_input( 'lang_name', '' ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Импортирование XML-файла"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Import XML Language Set"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); - - + + } - - + + /*-------------------------------------------------------------------------*/ // EXPORT: Export languages into XML download /*-------------------------------------------------------------------------*/ - + function export() { //----------------------------------------- // check //----------------------------------------- - + if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Невозможно определить ID языка"); + $this->ipsclass->admin->error("You must specify an existing language set ID, go back and try again"); } - + //----------------------------------------- // Get data from DB //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'languages', 'where' => "lid='".$this->ipsclass->input['id']."'" ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $row = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Невозможно найти язык по введенному ID"); + $this->ipsclass->admin->error("Could not query the information from the database"); } - + //----------------------------------------- // Get xml mah-do-dah //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); $xml = new class_xml(); @@ -566,18 +560,18 @@ class ad_languages { //----------------------------------------- $xml->doc_type = $this->ipsclass->vars['gb_char_set']; $xml->class_xml(); - + //----------------------------------------- // Set up.. //----------------------------------------- - + $lang_dir = ROOT_PATH."cache/lang_cache/".$row['ldir']; - + if ( ! is_dir($lang_dir) ) { - $this->ipsclass->admin->error("Невозможно найти директорию '$lang_dir', проверьте существует ли эта директория?"); + $this->ipsclass->admin->error("Could not locate $lang_dir, is the directory there?"); } - + $lang_files = array( 'lang_boards.php', 'lang_buddy.php', 'lang_calendar.php', 'lang_emails.php', 'lang_email_content.php', 'lang_error.php', 'lang_forum.php', 'lang_global.php', 'lang_help.php', 'lang_legends.php', 'lang_login.php', 'lang_mlist.php', 'lang_mod.php', 'lang_msg.php', 'lang_online.php', 'lang_portal.php', 'lang_post.php', 'lang_printpage.php', @@ -586,31 +580,31 @@ class ad_languages { 'acp_lang_acpperms.php', 'acp_lang_member.php', 'acp_lang_portal.php', 'lang_gallery.php', 'lang_gallery_location.php', 'lang_blog.php', 'lang_blog_emails.php', 'lang_blog_location.php', 'lang_blog_portal.php', 'lang_blog_ucp.php', 'lang_downloads.php' ); - + //----------------------------------------- // Start XML //----------------------------------------- - + $xml->xml_set_root( 'languageexport', array( 'exported' => time(), 'author' => $row['lauthor'], 'email' => $row['lemail'] ) ); - + $xml->xml_add_group( 'languagegroup' ); - + //----------------------------------------- // Get all the lang bits //----------------------------------------- - + foreach( $lang_files as $file ) { if ( @is_file( $lang_dir.'/'.$file ) ) { $lang = array(); - + if( $file == 'lang_javascript.js' ) { $content = array(); - + $js_contents = file_get_contents( $lang_dir.'/'.$file ); - + $content[] = $xml->xml_build_simple_tag( 'key' , 'blah' ); $content[] = $xml->xml_build_simple_tag( 'value' , base64_encode( $js_contents ) ); $content[] = $xml->xml_build_simple_tag( 'file' , $file ); @@ -619,65 +613,65 @@ class ad_languages { else { require( $lang_dir.'/'.$file ); - - foreach( $lang as $k => $v ) - { - $content = array(); - - $content[] = $xml->xml_build_simple_tag( 'key' , $k ); - $content[] = $xml->xml_build_simple_tag( 'value', $v ); - $content[] = $xml->xml_build_simple_tag( 'file' , $file ); - - $entry[] = $xml->xml_build_entry( 'langbit', $content ); + + foreach( $lang as $k => $v ) + { + $content = array(); + + $content[] = $xml->xml_build_simple_tag( 'key' , $k ); + $content[] = $xml->xml_build_simple_tag( 'value', $v ); + $content[] = $xml->xml_build_simple_tag( 'file' , $file ); + + $entry[] = $xml->xml_build_entry( 'langbit', $content ); + } } } } - } - + $xml->xml_add_entry_to_group( 'languagegroup', $entry ); - + $xml->xml_format_document(); - + //----------------------------------------- // Send to browser. //----------------------------------------- $this->ipsclass->admin->show_download( $xml->xml_document, 'ipb_language.xml' ); } - - - + + + function show_file() { if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Невозможно определить ID языка"); + $this->ipsclass->admin->error("You must specify an existing language set ID, go back and try again"); } - + //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'languages', 'where' => "lid='".$this->ipsclass->input['id']."'" ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $row = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Невозможно найти язык по введенному ID."); + $this->ipsclass->admin->error("Could not query the information from the database"); } - + //----------------------------------------- - + $lang_dir = CACHE_PATH."cache/lang_cache/".$row['ldir']; - + $form_array = array(); - + $lang_file = $lang_dir."/".$this->ipsclass->input['lang_file']; - - + + if ( ! is_writeable($lang_dir) ) { - $this->ipsclass->admin->error("Невозможно записать в директорию '$lang_dir', проверьте права доступа (CHMOD) и, если необходимо установить права доступа 0777. IPB не может сделать это за вас."); + $this->ipsclass->admin->error("Cannot write into '$lang_dir', please check the CHMOD value, and if needed, CHMOD to 0777 via FTP. IPB cannot do this for you."); } - + if (! file_exists($lang_file) ) { $this->ipsclass->admin->error("Cannot locate {$this->ipsclass->input['lang_file']} in '$lang_dir', please go back and check the input"); @@ -686,159 +680,159 @@ class ad_languages { { require $lang_file; } - + if ($this->ipsclass->input['lang_file'] == 'email_content.php') { $is_email = 1; } - + if ( ! is_writeable($lang_file) ) { - $this->ipsclass->admin->error("Невозможно записать в файл '$lang_file', проверьте права доступа (CHMOD) и, если необходимо установить права доступа 0777. IPB не может сделать это за вас."); + $this->ipsclass->admin->error("Cannot write to '$lang_file', please check the CHMOD value, and if needed, CHMOD to 0777 via FTP. IPB cannot do this for you."); } - - - $this->ipsclass->admin->page_detail = "Вы можете изменить любую фразу в формах ниже."; - $this->ipsclass->admin->page_title = "Изменение языкового модуля: ".$row['lname']; - $this->ipsclass->admin->nav[] = array( '', "Изменение языка «{$row['lname']}»" ); - + + + $this->ipsclass->admin->page_detail = "You may edit any of the language information below."; + $this->ipsclass->admin->page_title = "Edit Language set: ".$row['lname']; + $this->ipsclass->admin->nav[] = array( '', 'Editing Langage Set '.$row['lname'] ); + //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doedit' ), 2 => array( 'act' , 'lang' ), 3 => array( 'id' , $this->ipsclass->input['id'] ), 4 => array( 'lang_file' , $this->ipsclass->input['lang_file'] ), 5 => array( 'section', $this->ipsclass->section_code ), ) ); + + //----------------------------------------- + + $this->ipsclass->adskin->td_header[] = array( "Block Name" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Content" , "80%" ); //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( "Название языкового блока" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Содержимое языкового блока" , "80%" ); - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Языковой файл: ".$this->ipsclass->input['lang_file'] ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Language Text: ".$this->ipsclass->input['lang_file'] ); + foreach($lang as $k => $v) { //----------------------------------------- // Swop < and > into ascii entities // to prevent textarea breaking html //----------------------------------------- - + $v = stripslashes($v); - + $v = str_replace("&", "&", $v ); $v = str_replace("<", "<", $v ); $v = str_replace(">", ">", $v ); $v = str_replace("'", "'", $v ); - + $rows = 5; - + $cols = 70; - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<ibf.lang.".$k.">", $this->ipsclass->adskin->form_textarea('XX_'.$k, $v, $cols, $rows), ) ); } - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Изменить этот файл"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Edit this file"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- //------------------------------- - + $this->ipsclass->admin->output(); - - + + } - + //----------------------------------------- // Edit language pack information //----------------------------------------- - + function edit_info() { if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Невозможно определить ID языка"); + $this->ipsclass->admin->error("You must specify an existing language set ID, go back and try again"); } - + //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'languages', 'where' => "lid='".$this->ipsclass->input['id']."'" ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $row = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Невозможно найти язык по введенному ID"); + $this->ipsclass->admin->error("Could not query the information from the database"); } - + $final['lname'] = stripslashes($_POST['lname']); - + if (isset($_POST['lname'])) { $final['lauthor'] = stripslashes($_POST['lauthor']); $final['lemail'] = stripslashes($_POST['lemail']); } - + $this->ipsclass->DB->do_update( 'languages', $final, "lid='".$this->ipsclass->input['id']."'" ); - + $this->rebuild_cache(); - - $this->ipsclass->admin->done_screen("Языковой модуль обновлен", "Управление языками", "{$this->ipsclass->form_code}" ); - + + $this->ipsclass->admin->done_screen("Language pack information updated", "Manage language sets", "{$this->ipsclass->form_code}" ); + } - + //----------------------------------------- // Add language pack //----------------------------------------- - - + + function add_language() { if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Невозможно определить ID языка"); + $this->ipsclass->admin->error("You must specify an existing language set ID, go back and try again"); } - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'languages', 'where' => "lid='".$this->ipsclass->input['id']."'" ) ); $this->ipsclass->DB->simple_exec(); - + //----------------------------------------- - + if ( ! $row = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Невозможно найти язык по введенному ID"); + $this->ipsclass->admin->error("Could not query that language set from the DB, so there"); } - + //----------------------------------------- - + //----------------------------------------- - + if ( ! is_writeable(CACHE_PATH.'cache/lang_cache') ) { - $this->ipsclass->admin->error("Невозможно записать в директорию /cache/lang_cache/, проверьте права доступа (CHMOD) и, если необходимо установить права доступа 0777. IPB не может сделать это за вас"); + $this->ipsclass->admin->error("The directory 'lang_cache' is not writeable by this script. Please check the permissions on that directory. CHMOD to 0777 if in doubt and try again"); } - + //----------------------------------------- - + if ( ! is_dir(CACHE_PATH.'cache/lang_cache/'.$row['ldir']) ) { - $this->ipsclass->admin->error("Невозможно найти оригинальный язык для копирования, вернитесь назад и попробуйте еще раз"); + $this->ipsclass->admin->error("Could not locate the original language set to copy, please check and try again"); } - + //----------------------------------------- - + $row['lname'] = $row['lname'].".2"; - + // Insert a new row into the DB... - + $final = array(); - + foreach($row as $k => $v) { if ($k == 'lid') @@ -850,131 +844,131 @@ class ad_languages { $final[ $k ] = $v; } } - + $this->ipsclass->DB->do_insert( 'languages', $final ); - + $new_id = $this->ipsclass->DB->get_insert_id(); - + //----------------------------------------- - + if ( ! $this->ipsclass->admin->copy_dir( CACHE_PATH.'cache/lang_cache/'.$row['ldir'] , CACHE_PATH.'cache/lang_cache/'.$new_id ) ) { $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'languages', 'where' => "lid='$new_id'" ) ); - + $this->ipsclass->admin->error( $this->ipsclass->admin->errors ); } else { $this->ipsclass->DB->do_update( 'languages', array( 'ldir' => $new_id ), "lid='$new_id'" ); } - + //----------------------------------------- // Pass to edit / add form... //----------------------------------------- - + $this->rebuild_cache(); - + $this->do_form('add', $new_id); - + } - + //----------------------------------------- // REMOVE WRAPPERS //----------------------------------------- - + function remove() { //----------------------------------------- - + if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Невозможно определить ID языка"); + $this->ipsclass->admin->error("You must specify an existing image set ID, go back and try again"); } - + if ($this->ipsclass->input['id'] == 1) { - $this->ipsclass->admin->error("Вы не можете удалить этот язык."); + $this->ipsclass->admin->error("You cannot remove this language pack."); } - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'languages', 'where' => "lid='".$this->ipsclass->input['id']."'" ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $row = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Невозможно найти язык по введенному ID"); + $this->ipsclass->admin->error("Could not query the language information from the database"); } - + // Is it default??????????????? ok enuff - + if ($this->ipsclass->vars['default_language'] == "") { - $this->ipsclass->vars['default_language'] = 'ru'; + $this->ipsclass->vars['default_language'] = 'en'; } - + if ($row['ldir'] == $this->ipsclass->vars['default_language']) { - $this->ipsclass->admin->error("Вы не можете удалить этот язык, пока он установлен, как язык по умолчанию. Выберите другой язык и установите его по умолчанию, после этого попробуйте еще раз"); + $this->ipsclass->admin->error("You cannot remove this language pack while it is the default language directory. Please select another pack to be the default and try again"); } - + $this->ipsclass->DB->do_update( 'members', array( 'language' => $this->ipsclass->vars['default_language'] ), "language='{$row['ldir']}'" ); - + if ( $this->ipsclass->admin->rm_dir( CACHE_PATH.'cache/lang_cache/'.$row['ldir'] ) ) { $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'languages', 'where' => "lid='".$this->ipsclass->input['id']."'" ) ); - + $this->rebuild_cache(); - + $this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}"); exit(); } else { - $this->ipsclass->admin->error("Невозможно удалить языковые модули, проверьте права доступа (CHMOD) к файлам языка"); + $this->ipsclass->admin->error("Could not remove the language pack files, please check the CHMOD permissions to ensure that this script has the correct permissions to allow this"); } } - - - + + + //----------------------------------------- // ADD / EDIT IMAGE SETS //----------------------------------------- - + function save_langfile() { //----------------------------------------- - + if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Невозможно определить ID языка"); + $this->ipsclass->admin->error("You must specify an existing language set ID, go back and try again"); } - + if ($this->ipsclass->input['lang_file'] == "") { - $this->ipsclass->admin->error("Вы должны указать имя языкового модуля, вернитесь назад и попробуйте еще раз"); + $this->ipsclass->admin->error("You must specify an existing language filename, go back and try again"); } - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'languages', 'where' => "lid='".$this->ipsclass->input['id']."'" ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $row = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Невозможно найти язык по введенному ID"); + $this->ipsclass->admin->error("Could not query the language information from the database"); } - + $lang_file = CACHE_PATH."cache/lang_cache/".$row['ldir']."/".$this->ipsclass->input['lang_file']; - + if (! file_exists( $lang_file ) ) { - $this->ipsclass->admin->error("Невозможно найти файл '$lang_file', проверьте есть ли он."); + $this->ipsclass->admin->error("Could not locate $lang_file, is it there?"); } - + if (! is_writeable( $lang_file ) ) { - $this->ipsclass->admin->error("Невозможно записать в файл '$lang_file', проверьте права доступа (CHMOD) и, если необходимо установить права доступа 0777. IPB не может сделать это за вас"); + $this->ipsclass->admin->error("Cannot write to $lang_file, please chmod to 0666 or better and try again"); } - + $barney = array(); - + foreach ($this->ipsclass->input as $k => $v) { if ( preg_match( "/^XX_(\S+)$/", $k, $match ) ) @@ -986,27 +980,27 @@ class ad_languages { $v = str_replace(">", ">", $v ); $v = str_replace("&", "&", $v ); $v = str_replace("\r", "", $v ); - + $barney[ $match[1] ] = $v; } } } - + if ( count($barney) < 1 ) { - $this->ipsclass->admin->error("Что-то сделано не так, вернитесь назад и попробуйте еще раз"); + $this->ipsclass->admin->error("Oopsie, something has gone wrong - did you leave all the fields blank?"); } - + $start = " $text) { $text = preg_replace("/\n{1,}$/", "", $text); $start .= "\n'".$key."' => \"".str_replace( '"', '\"', $text)."\","; } - + $start .= "\n\n);\n\n?".">"; - + if ($fh = fopen( $lang_file, 'w') ) { fwrite($fh, $start ); @@ -1014,71 +1008,71 @@ class ad_languages { } else { - $this->ipsclass->admin->error("Нельзя сделать запись в $lang_file"); + $this->ipsclass->admin->error("Could not write back to $lang_file"); } - + if ( $this->ipsclass->input['id'] ) { - $this->ipsclass->admin->done_screen("Язык обновлен", "Управление языками", "{$this->ipsclass->form_code}&code=edit&id={$this->ipsclass->input['id']}", 'redirect' ); + $this->ipsclass->admin->done_screen("Set updated", "Manage Language Sets", "{$this->ipsclass->form_code}&code=edit&id={$this->ipsclass->input['id']}", 'redirect' ); } else { - $this->ipsclass->admin->done_screen("Язык обновлен", "Управление языками", "{$this->ipsclass->form_code}", 'redirect' ); + $this->ipsclass->admin->done_screen("Set updated", "Manage Language Sets", "{$this->ipsclass->form_code}", 'redirect' ); } } - + //----------------------------------------- // EDIT SPLASH //----------------------------------------- - + function do_form( $method='add', $id="" ) { $author = ""; - + //----------------------------------------- - + if ($id != "") { $this->ipsclass->input['id'] = $id; } - + //----------------------------------------- - + if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Невозможно определить ID языка"); + $this->ipsclass->admin->error("You must specify an existing language set ID, go back and try again"); } - + //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'languages', 'where' => "lid='".$this->ipsclass->input['id']."'" ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $row = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Невозможно найти язык по введенному ID"); + $this->ipsclass->admin->error("Could not query the information from the database"); } - + //----------------------------------------- - + $lang_dir = CACHE_PATH."cache/lang_cache/".$row['ldir']; - + $form_array = array(); - + if ($method != 'add') { if ( ! is_writeable($lang_dir) ) { - $this->ipsclass->admin->error("Невозможно записать в директорию '$lang_dir', проверьте права доступа (CHMOD) и, если необходимо установить права доступа 0777. IPB не может сделать это за вас."); + $this->ipsclass->admin->error("Cannot write into '$lang_dir', please check the CHMOD value, and if needed, CHMOD to 0777 via FTP. IPB cannot do this for you."); } } - + //----------------------------------------- - + if ( is_dir($lang_dir) ) { $handle = opendir($lang_dir); - + while (($filename = readdir($handle)) !== false) { if (($filename != ".") && ($filename != "..")) @@ -1087,285 +1081,285 @@ class ad_languages { { continue; } - + if (preg_match("/\.php$/", $filename)) { $form_array[] = array( $filename, preg_replace( "/\.php$/", "", $filename ) ); } } } - + closedir($handle); } - + if ($row['lauthor'] and $row['lemail']) { - $author = "

    Язык «{$row['lname']}» был создан «{$row['lauthor']}»."; + $author = " ('{$row['lname']}' was created by {$row['lauthor']})"; } else if ($row['lauthor']) { - $author = "

    Язык «{$row['lname']}» был создан «{$row['lauthor']}»."; + $author = " ('{$row['lname']}' was created by {$row['lauthor']})"; } - + //----------------------------------------- - - $this->ipsclass->admin->page_detail = "Эта секция позволяет вам изменять языковые модули выбранного языка.$author $url"; - $this->ipsclass->admin->page_title = "Изменение языковых модулей"; - $this->ipsclass->admin->nav[] = array( '', "Изменение языка «{$row['lname']}»" ); - + + $this->ipsclass->admin->page_detail = "Please choose which language section you wish to edit below.$author"; + $this->ipsclass->admin->page_title = "Edit Language set"; + $this->ipsclass->admin->nav[] = array( '', 'Editing Langage Set '.$row['lname'] ); + //----------------------------------------- - + //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'editinfo' ), 2 => array( 'act' , 'lang' ), 3 => array( 'id' , $this->ipsclass->input['id'] ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Изменение информации о языке" ); - - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "Название языка", + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Edit language set information{$author}" ); + + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( + "Language Set Name", $this->ipsclass->adskin->form_input('lname', $row['lname']), ) ); - + if ($method == 'add') { - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "Автор языка:", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( + "Language set author name:", $this->ipsclass->adskin->form_input('lauthor', $row['lauthor']), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "E-mail автора:", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( + "Language set author email:", $this->ipsclass->adskin->form_input('lemail', $row['lemail']), ) ); - + } - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Изменить установки языка"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Edit language set details"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- //------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'edit2' ), 2 => array( 'act' , 'lang' ), 3 => array( 'id' , $this->ipsclass->input['id'] ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Редактирование языковых модулей языка '".$row['lname']."'" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "Выберете языковой файл для редактирования", + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Edit language files in set '".$row['lname']."'" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( + "Please select a language file to edit", $this->ipsclass->adskin->form_dropdown('lang_file', $form_array), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Редактировать этот файл"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Edit this language file"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- //------------------------------- - + $this->ipsclass->admin->output(); - + } - + //----------------------------------------- // SHOW ALL LANGUAGE PACKS //----------------------------------------- - + function list_current() { if ($this->ipsclass->vars['default_language'] == "") { - $this->ipsclass->vars['default_language'] = 'ru'; + $this->ipsclass->vars['default_language'] = 'en'; } - + $form_array = array(); - - $this->ipsclass->admin->page_detail = "В этой секции вы можете изменять, удалять существующие языки и добавлять новые"; - $this->ipsclass->admin->page_title = "Управление языками"; - + + $this->ipsclass->admin->page_detail = "You can edit, remove and create new language packs from this section"; + $this->ipsclass->admin->page_title = "Manage Language Sets"; + //----------------------------------------- - + $this->ipsclass->DB->cache_add_query( 'languages_list_current', array() ); $this->ipsclass->DB->cache_exec_query(); - + $used_ids = array(); $show_array = array(); - + $this->ipsclass->html .= ""; // removed js check delete - + if ( $this->ipsclass->DB->get_num_rows() ) { - - $this->ipsclass->adskin->td_header[] = array( "Название" , "40%" ); - $this->ipsclass->adskin->td_header[] = array( "Пользователей используют" , "30%" ); - $this->ipsclass->adskin->td_header[] = array( "Экспорт" , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Изменение" , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Удаление" , "10%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Используемые языки" ); - + + $this->ipsclass->adskin->td_header[] = array( "Title" , "40%" ); + $this->ipsclass->adskin->td_header[] = array( "Members" , "30%" ); + $this->ipsclass->adskin->td_header[] = array( "Export" , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "Edit" , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "Remove" , "10%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Current Language Packs In Use" ); + while ( $r = $this->ipsclass->DB->fetch_row() ) { $show_array[ $r['lid'] ] = isset($show_array[ $r['lid'] ]) ? $show_array[ $r['lid'] ] : ''; - + if ($this->ipsclass->vars['default_language'] == $r['ldir']) { - $root = " (По умолчанию)"; + $root = " (Default Language)"; } else { - $root = " ( Сделать языком по умолчанию )"; + $root = " ( Make Default Language )"; } - - $show_array[ $r['lid'] ] .= stripslashes($r['lname'])."
    "; - + + $show_array[ $r['lid'] ] .= stripslashes($r['lname'])."
    "; + if ( in_array( $r['lid'], $used_ids ) ) { continue; } - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "".stripslashes($r['lname'])." $root", "
    {$r['mcount']}
    ", - "
    Экспортировать
    ", - "
    Изменить
    ", - "
    Удалить
    ", + "
    Export
    ", + "
    Edit
    ", + "
    Remove
    ", ) ); - + $used_ids[] = $r['lid']; - + $form_array[] = array( $r['lid'], $r['lname'] ); - + } - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); } - + if ( count($used_ids) < 1 ) { $used_ids[] = '0'; } - + $this->ipsclass->DB->simple_construct( array( 'select' => 'lid, ldir, lname', 'from' => 'languages', 'where' => "lid NOT IN(".implode(",",$used_ids).")" ) ); $this->ipsclass->DB->simple_exec(); - + if ( $this->ipsclass->DB->get_num_rows() ) { - - $this->ipsclass->adskin->td_header[] = array( "Название" , "40%" ); - $this->ipsclass->adskin->td_header[] = array( "Экспорт" , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Изменение" , "30%" ); - $this->ipsclass->adskin->td_header[] = array( "Удаление" , "20%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Текущие неиспользуемые языки" ); - - - + + $this->ipsclass->adskin->td_header[] = array( "Title" , "40%" ); + $this->ipsclass->adskin->td_header[] = array( "Export" , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "Edit" , "30%" ); + $this->ipsclass->adskin->td_header[] = array( "Remove" , "20%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Current Unallocated Language Packs" ); + + + while ( $r = $this->ipsclass->DB->fetch_row() ) { - + if ($this->ipsclass->vars['default_language'] == $r['ldir']) { - $root = " (используется по умолчанию)"; + $root = " (Default Language)"; } else { - $root = " ( Сделать языком по умолчанию )"; + $root = " ( Make Default Language )"; } - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "".stripslashes($r['lname'])." $root", - "
    Экспорт
    ", - "
    Изменить
    ", - "
    Удалить
    ", + "
    Export
    ", + "
    Edit
    ", + "
    Remove
    ", ) ); - + $form_array[] = array( $r['lid'], $r['lname'] ); - + } - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); } - + //----------------------------------------- // Create new set? //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'add' ), 2 => array( 'act' , 'lang' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Создание языка" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Создать новый язык, используя существующий..." , + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Create Language Set" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Base new language set on..." , $this->ipsclass->adskin->form_dropdown( "id", $form_array) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Создать новый язык"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Create new Language set"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // Create new set? //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'swap' ), 2 => array( 'act' , 'lang' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Переустановка языка у пользователей форума" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Пользователи использующие язык..." , - $this->ipsclass->adskin->form_dropdown( "old", array_merge( array( -1 => array( 'none', 'по умолчанию' ) ), $form_array ) ) + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Swap Member's Language Choice" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Member's that now use language set..." , + $this->ipsclass->adskin->form_dropdown( "old", array_merge( array( -1 => array( 'none', 'No preference stored - using default' ) ), $form_array ) ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Изменить язык на..." , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Update to use language set..." , $this->ipsclass->adskin->form_dropdown( "new", $form_array) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Переустановить"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Swap Member's Choice"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - + + //----------------------------------------- //------------------------------- - + $this->ipsclass->admin->output(); - + } - - + + } diff --git a/upload/sources/action_admin/login.php b/upload/sources/action_admin/login.php index 29e314b6..0c550203 100644 --- a/upload/sources/action_admin/login.php +++ b/upload/sources/action_admin/login.php @@ -1,367 +1,372 @@ - $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > Help Control functions -| > Module written by Matt Mecham -| > Date started: 2nd April 2002 -| -| > Module Version Number: 1.0.0 -| > DBA Checked: Mon 24th May 2004 -+-------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - - -class ad_login -{ - # Global - var $ipsclass; - - # HTML - var $html; - - function auto_run() - { - //----------------------------------------- - // What to do? - //----------------------------------------- - - switch($this->ipsclass->input['code']) - { - case 'login': - $this->login_form(); - break; - case 'login-out': - // Do we have a session? - $sess_cookie = $this->ipsclass->my_getcookie( "ipb_admin_session_id" ); - - if( $sess_cookie ) - { - $this->ipsclass->DB->do_delete( "admin_sessions", "session_id='{$sess_cookie}'" ); - } - - $this->ipsclass->my_setcookie("ipb_admin_session_id", "-1", -1); - $this->login_form(); - break; - - case 'login-complete': - $this->login_complete(); - break; - - default: - $this->login_form(); - break; - } - } - - /*-------------------------------------------------------------------------*/ - // Complete the log in - /*-------------------------------------------------------------------------*/ - - function login_complete() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $username = str_replace( '|', '|', $this->ipsclass->input['username'] ); - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( empty($this->ipsclass->input['username']) ) - { - $this->login_form("Вы должны ввести имя пользователя перед тем, как продолжить"); - } - - if ( empty($this->ipsclass->input['password']) ) - { - $this->login_form("Вы должны ввести пароль перед тем, как продолжить"); - } - - //----------------------------------------- - // Load handler... - //----------------------------------------- - - require_once( ROOT_PATH.'sources/handlers/han_login.php' ); - $this->han_login = new han_login(); - $this->han_login->ipsclass =& $this->ipsclass; - $this->han_login->is_admin_auth = 1; - $this->han_login->init(); - - //----------------------------------------- - // Check auth - //----------------------------------------- - - $this->han_login->login_authenticate( $username, $this->ipsclass->input['password'] ); - - //----------------------------------------- - // Check return code... - //----------------------------------------- - - $mem = $this->han_login->member; - - if ( ( ! $mem['id'] ) or ( $this->han_login->return_code == 'NO_USER' ) ) - { - $this->write_to_log( $this->ipsclass->input['username'], 'fail' ); - $this->login_form( "Имя пользователя или пароль не верны"); - } - - if ( $this->han_login->return_code != 'SUCCESS' ) - { - if ( $this->han_login->return_code == 'ACCOUNT_LOCKED' ) - { - $this->write_to_log( $this->ipsclass->input['username'], 'fail' ); - $this->login_form( "Ваша учетная запись заблокирована" ); - } - else - { - $this->write_to_log( $this->ipsclass->input['username'], 'fail' ); - $this->login_form( "Имя пользователя или пароль не верны" ); - } - } - - //----------------------------------------- - // Get perms - //----------------------------------------- - - $this->ipsclass->sess->member = $mem; - $this->ipsclass->sess->build_group_permissions(); - $mem = $this->ipsclass->sess->member; - - if ( $mem['g_access_cp'] != 1 ) - { - $this->write_to_log( $this->ipsclass->input['username'], 'fail' ); - $this->login_form("У вас нет прав доступа в АЦ"); - } - else - { - - //----------------------------------------- - // Fix up query string... - //----------------------------------------- - - $extra_query = ""; - - if ( $_POST['qstring'] ) - { - $extra_query = urldecode( $_POST['qstring'] ); - $extra_query = str_replace( "{$this->ipsclass->vars['board_url']}" , "" , $extra_query ); - $extra_query = preg_replace( "!/?admin\.{$this->ipsclass->vars['php_ext']}!i", "" , $extra_query ); - $extra_query = preg_replace( "!^\?!" , "" , $extra_query ); - $extra_query = preg_replace( "!adsess=(\w){32}!" , "" , $extra_query ); - $extra_query = preg_replace( "!s=(\w){32}!" , "" , $extra_query ); - $extra_query = preg_replace( "!act=login!" , "" , $extra_query ); - $extra_query = preg_replace( "!code=template-edit-bit!" , "" , $extra_query ); - $extra_query = preg_replace( "!code=template-bits-list!" , "" , $extra_query ); - $extra_query = preg_replace( "!bitname=(\w)!" , "" , $extra_query ); - $extra_query = $this->ipsclass->parse_clean_value( $extra_query ); - } - - //----------------------------------------- - // Delete old sessions.. - //----------------------------------------- - - $this->ipsclass->DB->do_delete( 'admin_sessions', 'session_member_id='.$mem['id'] ); - - //----------------------------------------- - // All is good, rejoice as we set a - // session for this user - //----------------------------------------- - - $sess_id = md5( uniqid( microtime() ) ); - - $this->ipsclass->DB->do_insert( 'admin_sessions', array ( - 'session_id' => $sess_id, - 'session_ip_address' => $this->ipsclass->ip_address, - 'session_member_name' => $mem['name'], - 'session_member_id' => $mem['id'], - 'session_member_login_key' => md5( $mem['joined'] . $mem['ip_address'] ), - 'session_location' => 'index', - 'session_log_in_time' => time(), - 'session_running_time' => time(), - ) ); - - $this->ipsclass->input['adsess'] = $sess_id; - - //----------------------------------------- - // Set a session ID cookie - //----------------------------------------- - - $this->ipsclass->my_setcookie("ipb_admin_session_id", $sess_id, 0); - - $this->write_to_log( $this->ipsclass->input['username'], 'ok' ); - - //----------------------------------------- - // Lets add some data in here for the access logs... - //----------------------------------------- - - $extra_query .= "&member_id=".$mem['id'].'&password=ok'; - - //----------------------------------------- - // Redirect... - //----------------------------------------- - - $this->ipsclass->admin->redirect( $this->ipsclass->vars['board_url'].'/'.IPB_ACP_DIRECTORY."/index.".$this->ipsclass->vars['php_ext']."?adsess=".$this->ipsclass->input['adsess']."&".$extra_query, 'Вход осуществлен' ); - - exit(); - } - } - - /*-------------------------------------------------------------------------*/ - // Write to the log in table - /*-------------------------------------------------------------------------*/ - - /** - * Write to the admin log in loggy ma log - * - * @param string Username - * @param string ok/fail flag - */ - function write_to_log( $username='', $flag='fail' ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $username = $username ? $username : $this->ipsclass->input['username']; - $flag = ( $flag == 'ok' ) ? 1 : 0; - $admin_post_details = array(); - - //----------------------------------------- - // Generate POST / GET details - //----------------------------------------- - - foreach( $_GET as $k => $v ) - { - $admin_post_details['get'][ htmlspecialchars( $k ) ] = htmlspecialchars( $v ); - } - - foreach( $_POST as $k => $v ) - { - if ( $k == 'password' ) - { - $v = str_repeat( '*', strlen( $v ) - 1 ) . substr( $v, -1, 1 ); - } - - $admin_post_details['post'][ htmlspecialchars( $k ) ] = htmlspecialchars( $v ); - } - - //----------------------------------------- - // Write to disk... - //----------------------------------------- - - $this->ipsclass->DB->do_insert( 'admin_login_logs', array( 'admin_ip_address' => $this->ipsclass->ip_address, - 'admin_username' => $username, - 'admin_time' => time(), - 'admin_success' => $flag, - 'admin_post_details' => serialize($admin_post_details) ) ); - } - - /*-------------------------------------------------------------------------*/ - // Show the log in form - /*-------------------------------------------------------------------------*/ - - function login_form($message='') - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $message = $message ? $message : (isset($this->ipsclass->admin_session['_session_message']) ? $this->ipsclass->admin_session['_session_message'] : ''); - - //------------------------------------------------------- - // Remove all out of date sessions, like a good boy. Woof. - //------------------------------------------------------- - - $cut_off_stamp = time() - 60*60*2; - - $this->ipsclass->DB->do_delete( 'admin_sessions', "session_log_in_time < {$cut_off_stamp}" ); - - //------------------------------------------------------ - // AUTO Log in ma-thingy? - //------------------------------------------------------ - - $name = ""; - $extra = ""; - - $mid = intval( $this->ipsclass->my_getcookie('member_id') ); - - if ( $mid > 0 ) - { - $this->ipsclass->DB->build_query( array( 'select' => 'm.id, m.name, m.mgroup, g.g_access_cp', - 'from' => array( 'members' => 'm' ), - 'where' => "m.id={$mid} AND g.g_access_cp=1", - 'add_join' => array( 1 => array( 'type' => 'left', - 'from' => array( 'groups' => 'g' ), - 'where' => 'g.g_id=m.mgroup' ) - ) - ) ); - $this->ipsclass->DB->exec_query(); - - if ( $r = $this->ipsclass->DB->fetch_row() ) - { - $name = $this->ipsclass->vars['ipbli_usertype'] == 'username' ? $r['name'] : $r['email']; - $extra = 'onload="document.theAdminForm.password.focus();"'; - } - } - - //------------------------------------------------------ - // SHW DA FRM (txt msg stylee) - //------------------------------------------------------ - - $qs = str_replace( '&' , '&', $this->ipsclass->parse_clean_value( urldecode( $this->ipsclass->my_getenv('QUERY_STRING') ) ) ); - $qs = str_replace( 'adsess=' , 'old_adsess=', $qs ); - $qs = str_replace( 'act=menu', '', $qs ); - $qs = str_replace( '<' , '', $qs ); - $qs = str_replace( '>' , '', $qs ); - $qs = str_replace( '(' , '', $qs ); - $qs = str_replace( ')' , '', $qs ); - - $this->ipsclass->html_title = "IPB: Админцентр: Вход"; - $this->ipsclass->html = str_replace( '<%CONTENT%>', $this->ipsclass->skin_acp_global->log_in_form( $qs, $message, $name ), $this->ipsclass->skin_acp_global->global_main_wrapper() ); - $this->ipsclass->html = str_replace( '<%TITLE%>' , $this->ipsclass->html_title, $this->ipsclass->html ); - $this->ipsclass->html = str_replace( "ipsclass->html ); - - @header("Content-type: text/html"); - print $this->ipsclass->html; - exit(); - } - - - - - -} - - + $Date: 2008-03-28 18:08:02 -0400 (Fri, 28 Mar 2008) $ +| > $Revision: 1232 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > Help Control functions +| > Module written by Matt Mecham +| > Date started: 2nd April 2002 +| +| > Module Version Number: 1.0.0 +| > DBA Checked: Mon 24th May 2004 ++-------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class ad_login +{ + # Global + var $ipsclass; + + # HTML + var $html; + + function auto_run() + { + //----------------------------------------- + // What to do? + //----------------------------------------- + + switch($this->ipsclass->input['code']) + { + case 'login': + $this->login_form(); + break; + case 'login-out': + // Do we have a session? + $sess_cookie = $this->ipsclass->my_getcookie( "ipb_admin_session_id" ); + + if( !$sess_cookie ) + { + $sess_cookie = $this->ipsclass->input['adsess']; + } + + if( $sess_cookie ) + { + $this->ipsclass->DB->do_delete( "admin_sessions", "session_id='{$sess_cookie}'" ); + } + + $this->ipsclass->my_setcookie("ipb_admin_session_id", "-1", -1); + $this->login_form(); + break; + + case 'login-complete': + $this->login_complete(); + break; + + default: + $this->login_form(); + break; + } + } + + /*-------------------------------------------------------------------------*/ + // Complete the log in + /*-------------------------------------------------------------------------*/ + + function login_complete() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $username = str_replace( '|', '|', $this->ipsclass->input['username'] ); + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( empty($this->ipsclass->input['username']) ) + { + $this->login_form("You must enter a username before proceeding"); + } + + if ( empty($this->ipsclass->input['password']) ) + { + $this->login_form("You must enter a password before proceeding"); + } + + //----------------------------------------- + // Load handler... + //----------------------------------------- + + require_once( ROOT_PATH.'sources/handlers/han_login.php' ); + $this->han_login = new han_login(); + $this->han_login->ipsclass =& $this->ipsclass; + $this->han_login->is_admin_auth = 1; + $this->han_login->init(); + + //----------------------------------------- + // Check auth + //----------------------------------------- + + $this->han_login->login_authenticate( $username, $this->ipsclass->input['password'] ); + + //----------------------------------------- + // Check return code... + //----------------------------------------- + + $mem = $this->han_login->member; + + $username_incorrect = "Username or password incorrect"; + + if( $this->ipsclass->vars['ipbli_usertype'] != 'username' ) + { + $username_incorrect = "Email address or password incorrect"; + } + + if ( ( ! $mem['id'] ) or ( $this->han_login->return_code == 'NO_USER' ) ) + { + $this->write_to_log( $this->ipsclass->input['username'], 'fail' ); + $this->login_form( $username_incorrect ); + } + + if ( $this->han_login->return_code != 'SUCCESS' ) + { + if ( $this->han_login->return_code == 'ACCOUNT_LOCKED' ) + { + $this->write_to_log( $this->ipsclass->input['username'], 'fail' ); + $this->login_form( "Your account has been locked due to the number of failed login attempts made" ); + } + else + { + $this->write_to_log( $this->ipsclass->input['username'], 'fail' ); + $this->login_form( $username_incorrect ); + } + } + + //----------------------------------------- + // Get perms + //----------------------------------------- + + $this->ipsclass->sess->member = $mem; + $this->ipsclass->sess->build_group_permissions(); + $mem = $this->ipsclass->sess->member; + + if ( $mem['g_access_cp'] != 1 ) + { + $this->write_to_log( $this->ipsclass->input['username'], 'fail' ); + $this->login_form("You do not have access to the administrative CP"); + } + else + { + + //----------------------------------------- + // Fix up query string... + //----------------------------------------- + + $extra_query = ""; + + if ( $_POST['qstring'] ) + { + $extra_query = urldecode( $_POST['qstring'] ); + $extra_query = str_replace( "{$this->ipsclass->vars['board_url']}" , "" , $extra_query ); + $extra_query = preg_replace( "!/?admin\.{$this->ipsclass->vars['php_ext']}!i", "" , $extra_query ); + $extra_query = preg_replace( "!^\?!" , "" , $extra_query ); + $extra_query = preg_replace( "!adsess=(\w){32}!" , "" , $extra_query ); + $extra_query = preg_replace( "!s=(\w){32}!" , "" , $extra_query ); + $extra_query = preg_replace( "!act=login!" , "" , $extra_query ); + $extra_query = preg_replace( "!code=template-edit-bit!" , "" , $extra_query ); + $extra_query = preg_replace( "!code=template-bits-list!" , "" , $extra_query ); + $extra_query = preg_replace( "!bitname=(\w)!" , "" , $extra_query ); + $extra_query = $this->ipsclass->parse_clean_value( $extra_query ); + } + + //----------------------------------------- + // Delete old sessions.. + //----------------------------------------- + + $this->ipsclass->DB->do_delete( 'admin_sessions', 'session_member_id='.$mem['id'] ); + + //----------------------------------------- + // All is good, rejoice as we set a + // session for this user + //----------------------------------------- + + $sess_id = md5( uniqid( microtime() ) ); + + $this->ipsclass->DB->do_insert( 'admin_sessions', array ( + 'session_id' => $sess_id, + 'session_ip_address' => $this->ipsclass->ip_address, + 'session_member_name' => $mem['name'], + 'session_member_id' => $mem['id'], + 'session_member_login_key' => md5( $mem['joined'] . $mem['ip_address'] ), + 'session_location' => 'index', + 'session_log_in_time' => time(), + 'session_running_time' => time(), + ) ); + + $this->ipsclass->input['adsess'] = $sess_id; + + //----------------------------------------- + // Set a session ID cookie + //----------------------------------------- + + // Don't want it used for XSS... + //$this->ipsclass->my_setcookie("ipb_admin_session_id", $sess_id, 0); + + $this->write_to_log( $this->ipsclass->input['username'], 'ok' ); + + //----------------------------------------- + // Lets add some data in here for the access logs... + //----------------------------------------- + + $extra_query .= "&member_id=".$mem['id'].'&password=ok'; + + //----------------------------------------- + // Redirect... + //----------------------------------------- + + $this->ipsclass->admin->redirect( $this->ipsclass->vars['board_url'].'/'.IPB_ACP_DIRECTORY."/index.".$this->ipsclass->vars['php_ext']."?adsess=".$this->ipsclass->input['adsess']."&".$extra_query, 'Log In Successful' ); + + exit(); + } + } + + /*-------------------------------------------------------------------------*/ + // Write to the log in table + /*-------------------------------------------------------------------------*/ + + /** + * Write to the admin log in loggy ma log + * + * @param string Username + * @param string ok/fail flag + */ + function write_to_log( $username='', $flag='fail' ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $username = $username ? $username : $this->ipsclass->input['username']; + $flag = ( $flag == 'ok' ) ? 1 : 0; + $admin_post_details = array(); + + //----------------------------------------- + // Generate POST / GET details + //----------------------------------------- + + foreach( $_GET as $k => $v ) + { + $admin_post_details['get'][ htmlspecialchars( $k ) ] = htmlspecialchars( $v ); + } + + foreach( $_POST as $k => $v ) + { + if ( $k == 'password' ) + { + $v = str_repeat( '*', strlen( $v ) - 1 ) . substr( $v, -1, 1 ); + } + + $admin_post_details['post'][ htmlspecialchars( $k ) ] = htmlspecialchars( $v ); + } + + //----------------------------------------- + // Write to disk... + //----------------------------------------- + + $this->ipsclass->DB->do_insert( 'admin_login_logs', array( 'admin_ip_address' => $this->ipsclass->ip_address, + 'admin_username' => $username, + 'admin_time' => time(), + 'admin_success' => $flag, + 'admin_post_details' => serialize($admin_post_details) ) ); + } + + /*-------------------------------------------------------------------------*/ + // Show the log in form + /*-------------------------------------------------------------------------*/ + + function login_form($message='') + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $message = $message ? $message : (isset($this->ipsclass->admin_session['_session_message']) ? $this->ipsclass->admin_session['_session_message'] : ''); + + //------------------------------------------------------- + // Remove all out of date sessions, like a good boy. Woof. + //------------------------------------------------------- + + $cut_off_stamp = time() - 60*60*2; + + $this->ipsclass->DB->do_delete( 'admin_sessions', "session_log_in_time < {$cut_off_stamp}" ); + + //------------------------------------------------------ + // AUTO Log in ma-thingy? + //------------------------------------------------------ + + $name = ""; + $extra = ""; + + $mid = intval( $this->ipsclass->my_getcookie('member_id') ); + + if ( $mid > 0 ) + { + $this->ipsclass->DB->build_query( array( 'select' => 'm.id, m.name, m.mgroup, g.g_access_cp, m.email', + 'from' => array( 'members' => 'm' ), + 'where' => "m.id={$mid} AND g.g_access_cp=1", + 'add_join' => array( 1 => array( 'type' => 'left', + 'from' => array( 'groups' => 'g' ), + 'where' => 'g.g_id=m.mgroup' ) + ) + ) ); + $this->ipsclass->DB->exec_query(); + + if ( $r = $this->ipsclass->DB->fetch_row() ) + { + $name = $this->ipsclass->vars['ipbli_usertype'] == 'username' ? $r['name'] : $r['email']; + $extra = 'onload="document.theAdminForm.password.focus();"'; + } + } + + //------------------------------------------------------ + // SHW DA FRM (txt msg stylee) + //------------------------------------------------------ + + $qs = str_replace( '&' , '&', $this->ipsclass->parse_clean_value( urldecode( $this->ipsclass->my_getenv('QUERY_STRING') ) ) ); + $qs = str_replace( 'adsess=' , 'old_adsess=', $qs ); + $qs = str_replace( 'act=menu', '', $qs ); + $qs = str_replace( '<' , '', $qs ); + $qs = str_replace( '>' , '', $qs ); + $qs = str_replace( '(' , '', $qs ); + $qs = str_replace( ')' , '', $qs ); + + $this->ipsclass->html_title = "IPB: ACP: Log in"; + $this->ipsclass->html = str_replace( '<%CONTENT%>', $this->ipsclass->skin_acp_global->log_in_form( $qs, $message, $name ), $this->ipsclass->skin_acp_global->global_main_wrapper() ); + $this->ipsclass->html = str_replace( '<%TITLE%>' , $this->ipsclass->html_title, $this->ipsclass->html ); + $this->ipsclass->html = str_replace( "ipsclass->html ); + + @header("Content-type: text/html"); + print $this->ipsclass->html; + exit(); + } + + + + + +} + + ?> \ No newline at end of file diff --git a/upload/sources/action_admin/login_auth.php b/upload/sources/action_admin/login_auth.php index 51eb9bfa..e87aa607 100644 --- a/upload/sources/action_admin/login_auth.php +++ b/upload/sources/action_admin/login_auth.php @@ -2,26 +2,18 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-12-15 04:58:55 -0500 (Fri, 15 Dec 2006) $ -| > $Revision: 794 $ -| > $Author: matt $ +| > $Date: 2007-07-13 13:51:38 -0400 (Fri, 13 Jul 2007) $ +| > $Revision: 1087 $ +| > $Author: bfarber $ +--------------------------------------------------------------------------- | | > Components Functions @@ -32,7 +24,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -40,26 +32,26 @@ class ad_login_auth { # Globals var $ipsclass; - + var $perm_main = 'tools'; var $perm_child = 'loginauth'; - + /*-------------------------------------------------------------------------*/ // Main handler /*-------------------------------------------------------------------------*/ - - function auto_run() + + function auto_run() { $this->html = $this->ipsclass->acp_load_template('cp_skin_tools'); - $this->ipsclass->admin->nav[] = array( "{$this->ipsclass->form_code}", "Управление авторизациями" ); - + $this->ipsclass->admin->nav[] = array( "{$this->ipsclass->form_code}", "Log In Manager" ); + switch($this->ipsclass->input['code']) { case 'manage': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->login_list(); break; - + case 'login_add': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); $this->login_form('add'); @@ -76,13 +68,13 @@ class ad_login_auth $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->login_save('edit'); break; - + case 'login_diagnostics': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':diagnostics' ); $this->login_diagnostics(); break; - - + + case 'components_export': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':export' ); $this->components_export('single'); @@ -91,66 +83,66 @@ class ad_login_auth $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':import' ); $this->components_import(); break; - + case 'component_move': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->components_move(); break; - + case 'master_xml_export': $this->master_xml_export(); break; - + default: $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->login_list(); break; } } - + /*-------------------------------------------------------------------------*/ // Export Master XML /*-------------------------------------------------------------------------*/ - + function master_xml_export() { //----------------------------------------- // INIT //----------------------------------------- - + $entry = array(); - + //----------------------------------------- // Get XML class //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); - + $xml = new class_xml(); - + $xml->doc_type = $this->ipsclass->vars['gb_char_set']; $xml->xml_set_root( 'export', array( 'exported' => time() ) ); - + //----------------------------------------- // Set group //----------------------------------------- - + $xml->xml_add_group( 'group' ); - + //----------------------------------------- // Get templates... //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'login_methods' ) ); - + $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $content = array(); - + if ( $r['login_folder_name'] == 'internal' ) { $r['login_enabled'] = 1; @@ -167,85 +159,85 @@ class ad_login_auth { $r['login_enabled'] = 0; } - + //----------------------------------------- // Sort the fields... //----------------------------------------- - + foreach( $r as $k => $v ) { $content[] = $xml->xml_build_simple_tag( $k, $v ); } - + $entry[] = $xml->xml_build_entry( 'row', $content ); } - + $xml->xml_add_entry_to_group( 'group', $entry ); - + $xml->xml_format_document(); - + $doc = $xml->xml_document; - + //----------------------------------------- // Print to browser //----------------------------------------- - + $this->ipsclass->admin->show_download( $doc, 'loginauth.xml', '', 0 ); } - + /*-------------------------------------------------------------------------*/ // Components Rebuild Cache /*-------------------------------------------------------------------------*/ - + function components_rebuildcache() { $this->ipsclass->cache['components'] = array(); - + $this->ipsclass->DB->simple_construct( array( 'select' => 'com_id,com_enabled,com_section,com_filename,com_url_uri,com_url_title,com_position', 'from' => 'components', 'order' => 'com_position ASC' ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $this->ipsclass->cache['components'][] = $r; } - + $this->ipsclass->update_cache( array( 'name' => 'components', 'array' => 1, 'deletefirst' => 1 ) ); } - + /*-------------------------------------------------------------------------*/ // Components Import /*-------------------------------------------------------------------------*/ - + function components_import() { //----------------------------------------- // INIT //----------------------------------------- - + $updated = 0; $inserted = 0; $cur_components = array(); - + if ( $_FILES['FILE_UPLOAD']['name'] == "" or ! $_FILES['FILE_UPLOAD']['name'] or ($_FILES['FILE_UPLOAD']['name'] == "none") ) { //----------------------------------------- // check and load from server //----------------------------------------- - + if ( ! $this->ipsclass->input['file_location'] ) { - $this->ipsclass->main_msg = "Загружаемый файл не найден!"; + $this->ipsclass->main_msg = "No upload file was found and no filename was specified."; $this->components_list(); return; } - + if ( ! file_exists( ROOT_PATH . $this->ipsclass->input['file_location'] ) ) { - $this->ipsclass->main_msg = "Нельзя найти файл для открытия: " . ROOT_PATH . $this->ipsclass->input['file_location']; + $this->ipsclass->main_msg = "Could not find the file to open at: " . ROOT_PATH . $this->ipsclass->input['file_location']; $this->components_list(); return; } - + if ( preg_match( "#\.gz$#", $this->ipsclass->input['file_location'] ) ) { if ( $FH = @gzopen( ROOT_PATH.$this->ipsclass->input['file_location'], 'rb' ) ) @@ -254,7 +246,7 @@ class ad_login_auth { $content .= @gzread( $FH, 1024 ); } - + @gzclose( $FH ); } } @@ -272,86 +264,80 @@ class ad_login_auth //----------------------------------------- // Get uploaded schtuff //----------------------------------------- - + $tmp_name = $_FILES['FILE_UPLOAD']['name']; $tmp_name = preg_replace( "#\.gz$#", "", $tmp_name ); - + $content = $this->ipsclass->admin->import_xml( $tmp_name ); } - + if( !$content ) { - $this->ipsclass->admin->error( "Импортирование не осуществлено, так как файл имеет неверный формат или в нем нет записей." ); + $this->ipsclass->admin->error( "Import file was not in the correct format or was corrupt" ); } - + //----------------------------------------- // Get current components. //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => 'com_id, com_section', 'from' => 'components', 'order' => 'com_id' ) ); - + $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $cur_components[ $r['com_section'] ] = $r['com_id']; } - + //----------------------------------------- // Get xml mah-do-dah //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); $xml = new class_xml(); - - $xml->lite_parser = 1; - + //----------------------------------------- // Unpack the datafile //----------------------------------------- - + $xml->xml_parse_document( $content ); - + //----------------------------------------- // pArse //----------------------------------------- - + $fields = array( 'com_title' , 'com_description', 'com_author' , 'com_url', 'com_version', 'com_menu_data', 'com_enabled' , 'com_safemode' , 'com_section', 'com_filename' ); - + if ( ! is_array( $xml->xml_array['componentexport']['componentgroup']['component'][0] ) ) { //----------------------------------------- // Ensure [0] is populated //----------------------------------------- - $tmp = $xml->xml_array['componentexport']['componentgroup']['component']; - - unset($xml->xml_array['componentexport']['componentgroup']['component']); - - $xml->xml_array['componentexport']['componentgroup']['component'][0] = $tmp; + $xml->xml_array['componentexport']['componentgroup']['component'] = array( 0 => $xml->xml_array['componentexport']['componentgroup']['component'] ); } - + foreach( $xml->xml_array['componentexport']['componentgroup']['component'] as $entry ) { $newrow = array(); - + foreach( $fields as $f ) { $newrow[$f] = $entry[ $f ]['VALUE']; } - + $this->ipsclass->DB->force_data_type = array( 'com_version' => 'string' ); - + if ( $cur_components[ $entry['com_section']['VALUE'] ] ) { //----------------------------------------- // Update //----------------------------------------- - + $this->ipsclass->DB->do_update( 'components', $newrow, 'com_id='.$cur_components[ $entry['com_section']['VALUE'] ] ); $updated++; } @@ -360,58 +346,58 @@ class ad_login_auth //----------------------------------------- // INSERT //----------------------------------------- - + $newrow['com_date_added'] = time(); - + $this->ipsclass->DB->do_insert( 'components', $newrow ); $inserted++; } } - + //----------------------------------------- // Done... //----------------------------------------- - + $this->components_rebuildcache(); - - $this->ipsclass->main_msg = "$updated компонентов обновлено и $inserted вставлено."; - + + $this->ipsclass->main_msg = "$updated components updated $inserted components inserted"; + $this->components_list(); } - + /*-------------------------------------------------------------------------*/ // Components Export /*-------------------------------------------------------------------------*/ - + function components_export($type='single') { //-------------------------------------------- // INIT //-------------------------------------------- - + $com_id = intval($this->ipsclass->input['com_id']); $rows = array(); - + //-------------------------------------------- // Checks... //-------------------------------------------- - + if ( $type == 'single' ) { if ( ! $com_id ) { - $this->ipsclass->main_msg = "Не один ID не выбран, повторите попытку заново "; + $this->ipsclass->main_msg = "No ID was passed, please try again"; $this->components_list(); return; } - + //-------------------------------------------- // Get DB row(s) //-------------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'components', 'where' => 'com_id='.$com_id ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $rows[] = $r; @@ -422,128 +408,128 @@ class ad_login_auth //-------------------------------------------- // Get DB row(s) //-------------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'components' ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $rows[] = $r; } } - + //------------------------------- // Get XML class //------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); - + $xml = new class_xml(); - + $xml->xml_set_root( 'componentexport', array( 'exported' => time() ) ); - + //------------------------------- // Add component //------------------------------- - + $xml->xml_add_group( 'componentgroup' ); - + $entry = array(); - + foreach( $rows as $r ) { $content = array(); - + foreach( $r as $k => $v ) { $content[] = $xml->xml_build_simple_tag( $k, $v ); } - + $entry[] = $xml->xml_build_entry( 'component', $content ); } - + $xml->xml_add_entry_to_group( 'componentgroup', $entry ); - + $xml->xml_format_document(); - + $doc = $xml->xml_document; //------------------------------- // Print to browser //------------------------------- - + $this->ipsclass->admin->show_download( $doc, 'ipd_components.xml', '', 0 ); } - - - + + + /*-------------------------------------------------------------------------*/ // Log in: Diagnostics /*-------------------------------------------------------------------------*/ - + function login_diagnostics() { //----------------------------------------- // Init Vars //----------------------------------------- - + $login_id = intval($this->ipsclass->input['login_id']); - + //----------------------------------------- // Check (please?) //----------------------------------------- - + $login = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_id='.$login_id ) ); - + if ( ! $login['login_id'] ) { - $this->ipsclass->main_msg = "Не один ID не выбран, повторите попытку заново."; + $this->ipsclass->main_msg = "No ID was passed, please try again."; $this->login_list(); return; } - + //----------------------------------------- // Generate file //----------------------------------------- - + $mypath = ROOT_PATH.'sources/loginauth/'.$login['login_folder_name']; - + //----------------------------------------- // Generate General Info //----------------------------------------- - + $login['_enabled_img'] = $login['login_enabled'] ? 'aff_tick.png' : 'aff_cross.png'; $login['_installed_img'] = $login['login_installed'] ? 'aff_tick.png' : 'aff_cross.png'; $login['_has_settings'] = $login['login_settings'] ? 'aff_tick.png' : 'aff_cross.png'; - + //----------------------------------------- // File based info //----------------------------------------- - + $login['_file_auth_exists'] = @file_exists( $mypath.'/auth.php' ) ? 'aff_tick.png' : 'aff_cross.png'; $login['_file_conf_exists'] = @file_exists( $mypath.'/conf.php' ) ? 'aff_tick.png' : 'aff_cross.png'; $login['_file_acp_exists'] = @file_exists( $mypath.'/acp.php' ) ? 'aff_tick.png' : 'aff_cross.png'; - + $login['_file_conf_write'] = @file_exists( $mypath.'/conf.php' ) ? 'aff_tick.png' : 'aff_cross.png'; - + $this->ipsclass->html .= $this->html->login_diagnostics( $login ); - - $this->ipsclass->html_help_title = "Управление авторизацией"; - $this->ipsclass->html_help_msg = "Эта секция позволит вам управлять идентификационными методами для входа."; - + + $this->ipsclass->html_help_title = "Log In Manager"; + $this->ipsclass->html_help_msg = "This section will allow you to manage your log in authentication methods."; + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // Components Save /*-------------------------------------------------------------------------*/ - + function login_save($type='add') { //-------------------------------------------- // INIT //-------------------------------------------- - + $login_id = intval($this->ipsclass->input['login_id']); $login_title = trim( $this->ipsclass->input['login_title'] ); $login_description = trim( $this->ipsclass->txt_stripslashes( $this->ipsclass->txt_UNhtmlspecialchars($_POST['login_description'])) ); @@ -560,42 +546,42 @@ class ad_login_auth $login_installed = intval($this->ipsclass->input['login_installed']); $login_safemode = intval($this->ipsclass->input['login_safemode']); $login_user_id = trim($this->ipsclass->input['login_user_id']); - - //-------------------------------------------- - // Checks... - //-------------------------------------------- - - if ( $type == 'edit' ) - { - if ( ! $login_id ) - { - $this->ipsclass->main_msg = "Не один ID не выбран, повторите попытку заново "; - $this->login_list(); - return; - } - - //-------------------------------------------- - // Enabled this one? - //-------------------------------------------- - - if ( $login_enabled ) - { - $this->ipsclass->DB->do_update( 'login_methods', array( 'login_enabled' => 0 ) ); - } - - } - + if ( ! $login_title OR ! $login_folder_name OR ! $login_folder_name ) { - $this->ipsclass->main_msg = "Вы должны заполнить все поля"; + $this->ipsclass->main_msg = "You must complete the entire form."; $this->login_form( $type ); return; } + //-------------------------------------------- + // Checks... + //-------------------------------------------- + + if ( $type == 'edit' ) + { + if ( ! $login_id ) + { + $this->ipsclass->main_msg = "No ID was passed, please try again"; + $this->login_list(); + return; + } + + //-------------------------------------------- + // Enabled this one? + //-------------------------------------------- + + if ( $login_enabled ) + { + $this->ipsclass->DB->do_update( 'login_methods', array( 'login_enabled' => 0 ) ); + } + + } + //-------------------------------------------- // Save... //-------------------------------------------- - + $array = array( 'login_title' => $login_title, 'login_description' => $login_description, 'login_folder_name' => $login_folder_name, @@ -611,101 +597,101 @@ class ad_login_auth 'login_allow_create' => 1, 'login_user_id' => $login_user_id, ); - + //-------------------------------------------- // In DEV? //-------------------------------------------- - + if ( IN_DEV ) { $array['login_installed'] = $login_installed; $array['login_safemode'] = $login_safemode; } - + //-------------------------------------------- // Nike.. do it //-------------------------------------------- - + if ( $type == 'add' ) { $array['login_date'] = time(); - + $this->ipsclass->DB->do_insert( 'login_methods', $array ); - $this->ipsclass->main_msg = 'Новый метод входа был добавлен'; + $this->ipsclass->main_msg = 'New Log In Method Added'; } else { - + $this->ipsclass->DB->do_update( 'login_methods', $array, 'login_id='.$login_id ); - $this->ipsclass->main_msg = 'Новый метод входа был изменен'; + $this->ipsclass->main_msg = 'Log In Method Edited'; } - + //----------------------------------------- // Rebuild cache //----------------------------------------- - + require_once( ROOT_PATH.'sources/action_admin/settings.php' ); $adsettings = new ad_settings(); $adsettings->ipsclass =& $this->ipsclass; - + $this->ipsclass->DB->do_update( 'conf_settings', array( 'conf_value' => $login_folder_name ), "conf_key='ipbli_key'" ); $this->ipsclass->DB->do_update( 'conf_settings', array( 'conf_value' => $login_user_id ), "conf_key='ipbli_usertype'" ); - + $adsettings->setting_rebuildcache(); - + //----------------------------------------- // Return, at once. //----------------------------------------- - + $this->login_list(); } - + /*-------------------------------------------------------------------------*/ // Log in: Form /*-------------------------------------------------------------------------*/ - + function login_form( $type='add' ) { //----------------------------------------- // Init Vars //----------------------------------------- - + $login_id = intval($this->ipsclass->input['login_id']); - $login_dd = array( 0 => array( 'passthrough', 'Удаленный' ), 1 => array( 'onfail', 'Совместный' ) ); - $login_unt = array( 0 => array( 'username', 'Имя пользователя' ), 1 => array( 'email', 'E-mail адрес' ) ); - + $login_dd = array( 0 => array( 'passthrough', 'Pass-Through' ), 1 => array( 'onfail', 'On-Fail' ) ); + $login_unt = array( 0 => array( 'username', 'User Name' ), 1 => array( 'email', 'Email Address' ) ); + //----------------------------------------- // Check (please?) //----------------------------------------- - + if ( $type == 'add' ) { $formcode = 'login_add_do'; - $title = "Создания нового метода входа"; - $button = "Создать"; + $title = "Register New Log In Method"; + $button = "Register New Log In Method"; } else { $login = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_id='.$login_id ) ); - + if ( ! $login['login_id'] ) { - $this->ipsclass->main_msg = "Не один ID не выбран, повторите попытку заново."; + $this->ipsclass->main_msg = "No ID was passed, please try again."; $this->login_list(); return; } - + $formcode = 'login_edit_do'; - $title = "Редактирование: ".$login['login_title']; - $button = "Сохранить изменения"; + $title = "Edit Log In Method ".$login['login_title']; + $button = "Save Changes"; } - + //------------------------------- // Form elements //------------------------------- - + $form = array(); - + $form['login_title'] = $this->ipsclass->adskin->form_input( 'login_title' , $_POST['login_title'] ? $_POST['login_title'] : $login['login_title'] ); $form['login_description'] = $this->ipsclass->adskin->form_input( 'login_description' , $this->ipsclass->txt_htmlspecialchars( $_POST['login_description'] ? $_POST['login_description'] : $login['login_description'] ) ); $form['login_folder_name'] = $this->ipsclass->adskin->form_input( 'login_folder_name' , $_POST['login_folder_name'] ? $_POST['login_folder_name'] : $login['login_folder_name'] ); @@ -719,63 +705,63 @@ class ad_login_auth $form['login_replace_form'] = $this->ipsclass->adskin->form_yes_no( 'login_replace_form' , $_POST['login_replace_form'] ? $_POST['login_replace_form'] : $login['login_replace_form'] ); $form['login_type'] = $this->ipsclass->adskin->form_dropdown( 'login_type' , $login_dd , $_POST['login_type'] ? $_POST['login_type'] : $login['login_type'] ); $form['login_user_id'] = $this->ipsclass->adskin->form_dropdown( 'login_user_id' , $login_unt, $_POST['login_user_id'] ? $_POST['login_user_id'] : $login['login_user_id'] ); - + if ( IN_DEV ) { $form['login_safemode'] = $this->ipsclass->adskin->form_yes_no( 'login_safemode' , $_POST['login_safemode'] ? $_POST['login_safemode'] : $login['login_safemode'] ); $form['login_installed'] = $this->ipsclass->adskin->form_yes_no( 'login_installed', $_POST['login_installed'] ? $_POST['login_installed']: $login['login_installed'] ); } - + $this->ipsclass->html .= $this->html->login_form( $form, $title, $formcode, $button, $login ); - - $this->ipsclass->html_help_title = "Управление авторизацией"; - $this->ipsclass->html_help_msg = "Эта секция позволит вам управлять идентификационными методами для авторизации."; - - $this->ipsclass->admin->nav[] = array( "", "Добавление/изменение метода авторизации" ); + + $this->ipsclass->html_help_title = "Log In Manager"; + $this->ipsclass->html_help_msg = "This section will allow you to manage your log in authentication methods."; + + $this->ipsclass->admin->nav[] = array( "", "Add/Edit Login Module" ); $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // List current log in types /*-------------------------------------------------------------------------*/ - + function login_list() { //------------------------------- // INIT //------------------------------- - + $content = ""; - + //------------------------------- // Get components //------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'login_methods', 'order' => 'login_title ASC' ) ); $this->ipsclass->DB->simple_exec(); - + while( $r = $this->ipsclass->DB->fetch_row() ) { //------------------------------- // Until IPB 3.0: hardcode some stuff //------------------------------- - + $r['login_installed'] = 1; - + //------------------------------- // (Alex) Cross //------------------------------- - + $r['_enabled_img'] = $r['login_enabled'] ? 'aff_tick.png' : 'aff_cross.png'; $r['_installed_img'] = $r['login_installed'] ? 'aff_tick.png' : 'aff_cross.png'; - + $content .= $this->html->login_row($r); } - + $this->ipsclass->html .= $this->html->login_overview( $content ); - - $this->ipsclass->admin->page_title = "Управление авторизациями"; - $this->ipsclass->admin->page_detail = "Эта секция позволит вам управлять способами авторизации."; + + $this->ipsclass->admin->page_title = "Log In Authentication Manager"; + $this->ipsclass->admin->page_detail = "This section will allow you to manage your log in methods."; $this->ipsclass->admin->output(); } diff --git a/upload/sources/action_admin/logs_login.php b/upload/sources/action_admin/logs_login.php index 30f6aa52..6fe0f793 100644 --- a/upload/sources/action_admin/logs_login.php +++ b/upload/sources/action_admin/logs_login.php @@ -1,188 +1,180 @@ - $Date: 2006-06-08 17:11:50 +0100 (Thu, 08 Jun 2006) $ -| > $Revision: 289 $ -| > $Author: bfarber $ -+--------------------------------------------------------------------------- -| -| > Admin Logs Stuff -| > Module written by Matt Mecham -| > Date started: 11nd September 2002 -| -| > Module Version Number: 1.0.0 -| > DBA Checked: Mon 24th May 2004 -+-------------------------------------------------------------------------- -*/ - - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - -class ad_logs_login -{ - - var $base_url; - - /** - * Section title name - * - * @var string - */ - var $perm_main = "admin"; - - /** - * Section title name - * - * @var string - */ - var $perm_child = "loginlog"; - - function auto_run() - { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Попытки авторизации в АЦ' ); - - //----------------------------------------- - // LOAD HTML - //----------------------------------------- - - $this->html = $this->ipsclass->acp_load_template('cp_skin_admin'); - - switch($this->ipsclass->input['code']) - { - default: - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->login_logs_view(); - break; - case 'view_detail': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->login_logs_view_detail(); - break; - } - } - - //*-------------------------------------------------------------------------*/ - // View detail - /*-------------------------------------------------------------------------*/ - - function login_logs_view_detail() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $admin_id = intval( $this->ipsclass->input['detail'] ); - - //----------------------------------------- - // Get data from the deebee - //----------------------------------------- - - $log = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', - 'from' => 'admin_login_logs', - 'where' => 'admin_id='.$admin_id ) ); - - if ( ! $log['admin_id'] ) - { - $this->ipsclass->main_msg = "По указанной записи деталей не найдено."; - $this->login_logs_view(); - return; - } - - //----------------------------------------- - // Display... - //----------------------------------------- - - $log['_admin_time'] = $this->ipsclass->get_date( $log['admin_time'], 'LONG' ); - $log['_admin_post_details'] = unserialize( $log['admin_post_details'] ); - $log['_admin_img'] = $log['admin_success'] ? 'aff_tick.png' : 'aff_cross.png'; - - //----------------------------------------- - // Show... - //----------------------------------------- - - $this->ipsclass->html .= $this->html->acp_last_logins_detail( $log ); - - $this->ipsclass->admin->print_popup(); - } - - //*-------------------------------------------------------------------------*/ - // View current log in logs - /*-------------------------------------------------------------------------*/ - - function login_logs_view() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $start = intval( $this->ipsclass->input['st'] ); - $perpage = 50; - - //----------------------------------------- - // Get log count - //----------------------------------------- - - $count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'count(*) as count', - 'from' => 'admin_login_logs' ) ); - - $links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => intval( $count['count'] ), - 'PER_PAGE' => $perpage, - 'CUR_ST_VAL' => $start, - 'L_SINGLE' => "", - 'L_MULTI' => "Страниц: ", - 'BASE_URL' => $this->ipsclass->base_url.$this->ipsclass->form_code ) ); - - //----------------------------------------- - // Get from DB - //----------------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => '*', - 'from' => 'admin_login_logs', - 'order' => 'admin_time DESC', - 'limit' => array( $start, $perpage ) ) ); - - $this->ipsclass->DB->exec_query(); - - while( $row = $this->ipsclass->DB->fetch_row() ) - { - $row['_admin_time'] = $this->ipsclass->admin->get_date( $row['admin_time'] ); - $row['_admin_img'] = $row['admin_success'] ? 'aff_tick.png' : 'aff_cross.png'; - - $logins .= $this->html->acp_last_logins_row( $row ); - } - - //----------------------------------------- - // Print... - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( "Попытки авторизации в АЦ", "На этой странице отображены все попытки авторизации в админцентр вашего форума.
    Красным индикатором отмечены неудачные попытки авторизации, в то время как зеленым — удачные." ) . "
    "; - - $this->ipsclass->html .= $this->html->acp_last_logins_wrapper( $logins, $links ); - - $this->ipsclass->admin->output(); - } -} - - + $Date: 2006-06-08 17:11:50 +0100 (Thu, 08 Jun 2006) $ +| > $Revision: 289 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > Admin Logs Stuff +| > Module written by Matt Mecham +| > Date started: 11nd September 2002 +| +| > Module Version Number: 1.0.0 +| > DBA Checked: Mon 24th May 2004 ++-------------------------------------------------------------------------- +*/ + + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class ad_logs_login +{ + + var $base_url; + + /** + * Section title name + * + * @var string + */ + var $perm_main = "admin"; + + /** + * Section title name + * + * @var string + */ + var $perm_child = "loginlog"; + + function auto_run() + { + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'ACP Log-in Logs' ); + + //----------------------------------------- + // LOAD HTML + //----------------------------------------- + + $this->html = $this->ipsclass->acp_load_template('cp_skin_admin'); + + switch($this->ipsclass->input['code']) + { + default: + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->login_logs_view(); + break; + case 'view_detail': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->login_logs_view_detail(); + break; + } + } + + //*-------------------------------------------------------------------------*/ + // View detail + /*-------------------------------------------------------------------------*/ + + function login_logs_view_detail() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $admin_id = intval( $this->ipsclass->input['detail'] ); + + //----------------------------------------- + // Get data from the deebee + //----------------------------------------- + + $log = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', + 'from' => 'admin_login_logs', + 'where' => 'admin_id='.$admin_id ) ); + + if ( ! $log['admin_id'] ) + { + $this->ipsclass->main_msg = "No log for that ID found"; + $this->login_logs_view(); + return; + } + + //----------------------------------------- + // Display... + //----------------------------------------- + + $log['_admin_time'] = $this->ipsclass->get_date( $log['admin_time'], 'LONG' ); + $log['_admin_post_details'] = unserialize( $log['admin_post_details'] ); + $log['_admin_img'] = $log['admin_success'] ? 'aff_tick.png' : 'aff_cross.png'; + + //----------------------------------------- + // Show... + //----------------------------------------- + + $this->ipsclass->html .= $this->html->acp_last_logins_detail( $log ); + + $this->ipsclass->admin->print_popup(); + } + + //*-------------------------------------------------------------------------*/ + // View current log in logs + /*-------------------------------------------------------------------------*/ + + function login_logs_view() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $start = intval( $this->ipsclass->input['st'] ); + $perpage = 50; + + //----------------------------------------- + // Get log count + //----------------------------------------- + + $count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'count(*) as count', + 'from' => 'admin_login_logs' ) ); + + $links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => intval( $count['count'] ), + 'PER_PAGE' => $perpage, + 'CUR_ST_VAL' => $start, + 'L_SINGLE' => "", + 'L_MULTI' => "Pages: ", + 'BASE_URL' => $this->ipsclass->base_url.'&'.$this->ipsclass->form_code ) ); + + //----------------------------------------- + // Get from DB + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => '*', + 'from' => 'admin_login_logs', + 'order' => 'admin_time DESC', + 'limit' => array( $start, $perpage ) ) ); + + $this->ipsclass->DB->exec_query(); + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + $row['_admin_time'] = $this->ipsclass->admin->get_date( $row['admin_time'] ); + $row['_admin_img'] = $row['admin_success'] ? 'aff_tick.png' : 'aff_cross.png'; + + $logins .= $this->html->acp_last_logins_row( $row ); + } + + //----------------------------------------- + // Print... + //----------------------------------------- + + //$this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( "ACP Log-in Attempts", "This page shows all the recorded ACP log in attempts.
    The red cross indicates an error when logging in and a green tick indicates a successful log in." ) . "
    "; + + $this->ipsclass->html .= $this->html->acp_last_logins_wrapper( $logins, $links ); + + $this->ipsclass->admin->output(); + } +} + + ?> \ No newline at end of file diff --git a/upload/sources/action_admin/member.php b/upload/sources/action_admin/member.php index da7b066d..41c65971 100644 --- a/upload/sources/action_admin/member.php +++ b/upload/sources/action_admin/member.php @@ -2,25 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-11-16 12:39:31 -0600 (Thu, 16 Nov 2006) $ -| > $Revision: 732 $ +| > $Date: 2008-04-23 16:14:05 -0400 (Wed, 23 Apr 2008) $ +| > $Revision: 1255 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -35,7 +27,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -44,15 +36,15 @@ class ad_member { # Global var $ipsclass; - + #Html var $html; var $edit_html; var $editor_loaded = 0; - + var $base_url; var $modules = ""; - + var $trash_forum = 0; /** @@ -61,46 +53,46 @@ class ad_member * @var string */ var $perm_main = "content"; - + /** * Section title name * * @var string */ var $perm_child = "mem"; - + function auto_run() { //----------------------------------------- // Get the sync module //----------------------------------------- - + if ( USE_MODULES == 1 ) { require ROOT_PATH."modules/ipb_member_sync.php"; - + $this->modules = new ipb_member_sync(); $this->modules->ipsclass =& $this->ipsclass; } - - $this->ipsclass->admin->nav[] = array( "{$this->ipsclass->form_code}&code=edit", 'Управление пользователями' ); - + + $this->ipsclass->admin->nav[] = array( "{$this->ipsclass->form_code}&code=edit", 'Member Management Home' ); + //----------------------------------------- // Load HTML //----------------------------------------- - + $this->html = $this->ipsclass->acp_load_template('cp_skin_member'); - + //----------------------------------------- // Load Language //----------------------------------------- - + $this->ipsclass->acp_load_language( 'acp_lang_member' ); - + //----------------------------------------- // What to do... //----------------------------------------- - + switch($this->ipsclass->input['code']) { case 'doform': @@ -157,7 +149,7 @@ class ad_member $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':title-remove' ); $this->titles_delete_rank(); break; - + //----------------------------------------- case 'changename': @@ -184,13 +176,13 @@ class ad_member $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->member_delete_posts_process(); break; - //----------------------------------------- - + //----------------------------------------- + case 'banmember': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':ban' ); $this->member_suspend_start(); break; - + case 'dobanmember': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':ban' ); $this->member_suspend_complete(); @@ -224,25 +216,25 @@ class ad_member $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->member_delete(); break; - + default: $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->search_form(); break; } - + } - + /*-------------------------------------------------------------------------*/ // Member Delete posts, PROCESS /*-------------------------------------------------------------------------*/ - + function member_delete_posts_process() { //----------------------------------------- // INIT //----------------------------------------- - + $member_id = intval( $this->ipsclass->input['mid'] ); $delete_posts = intval( $this->ipsclass->input['dposts'] ); $delete_topics = intval( $this->ipsclass->input['dtopics'] ); @@ -255,11 +247,11 @@ class ad_member $img = '- '; $posts_deleted = 0; $topics_deleted = 0; - + //-------------------------------------------- // NOT INIT YET? //-------------------------------------------- - + if ( ! $init ) { $url = $this->ipsclass->base_url.'&'.$this->ipsclass->form_code_js."&code=deleteposts_process&dpergo={$this->ipsclass->input['dpergo']}" @@ -269,27 +261,27 @@ class ad_member ."&dtopics={$delete_topics}" ."&use_trash_can=".intval($this->ipsclass->input['use_trash_can']) ."&mid={$member_id}"; - + $this->ipsclass->admin->output_multiple_redirect_init( $url ); } - + //-------------------------------------------- // Not loaded the func? //-------------------------------------------- - + if ( ! is_object( $this->func_mod ) ) { require_once( ROOT_PATH.'sources/lib/func_mod.php' ); $this->func_mod = new func_mod(); $this->func_mod->ipsclass =& $this->ipsclass; } - + //----------------------------------------- // Trash-can set up //----------------------------------------- - + $trash_append = ''; - + if ( $this->ipsclass->vars['forum_trash_can_enable'] and $this->ipsclass->vars['forum_trash_can_id'] ) { if ( $this->ipsclass->cache['forum_cache'][ $this->ipsclass->vars['forum_trash_can_id'] ]['sub_can_post'] ) @@ -301,40 +293,40 @@ class ad_member } } } - + //----------------------------------------- // Get member //----------------------------------------- - + $member = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'members', 'where' => 'id='.$member_id ) ); - + //----------------------------------------- // Non root admin attempting to edit root admin? //----------------------------------------- - + if ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) { if ( $member['mgroup'] == $this->ipsclass->vars['admin_group'] ) { - $this->ipsclass->admin->error("Вы не можете редактировать главных администраторов"); + $this->ipsclass->admin->error("You are not permitted to edit root administrators"); } } - + //----------------------------------------- // Avoid limit... //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'posts', 'where' => "author_id={$member_id}", 'order' => 'pid ASC', 'limit' => array( $start, $end ) ) ); $outer = $this->ipsclass->DB->simple_exec(); - + //----------------------------------------- // Process... //----------------------------------------- - + while( $r = $this->ipsclass->DB->fetch_row( $outer ) ) { $done++; @@ -342,79 +334,79 @@ class ad_member //----------------------------------------- // Get topic... //----------------------------------------- - + $topic = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid='.$r['topic_id'].$trash_append ) ); - + //----------------------------------------- // No longer a topic? //----------------------------------------- - + if ( ! $topic['tid'] ) { continue; } - + //----------------------------------------- // Get number of MID posters //----------------------------------------- - + $topic_i_posted = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as count', 'from' => 'posts', 'where' => 'author_id='.$member_id.' AND topic_id='.$r['topic_id'] ) ); - + //----------------------------------------- // Aready deleted this topic? //----------------------------------------- - + if ( ! $topic_i_posted['count']) { continue; } - + //----------------------------------------- // First check: Our topic and no other replies? //----------------------------------------- - + if ( $topic['starter_id'] == $member_id AND $topic_i_posted['count'] == ( $topic['posts'] + 1 ) ) { //----------------------------------------- // Ok, deleting topics or posts? //----------------------------------------- - + if ( ( $delete_posts OR $delete_topics ) AND ( $this->trash_forum and $this->trash_forum != $topic['forum_id'] ) ) { //----------------------------------------- // Move, don't delete //----------------------------------------- - + $this->func_mod->topic_move($r['topic_id'], $topic['forum_id'], $this->trash_forum); - + $forums_affected[ $topic['forum_id'] ] = $topic['forum_id']; $forums_affected[ $this->trash_forum ] = $this->trash_forum; - + $topics_deleted++; $posts_deleted += $topic_i_posted['count']; - } + } else if ( $delete_posts OR $delete_topics ) { $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'posts', 'where' => 'author_id='.$member_id.' AND topic_id='.$r['topic_id'] ) ); - + $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'topics', 'where' => 'tid='.$r['topic_id'] ) ); - + $forums_affected[ $topic['forum_id'] ] = $topic['forum_id']; $topics_deleted++; $posts_deleted += $topic_i_posted['count']; } } - + //----------------------------------------- // Is this a topic we started? //----------------------------------------- - + else if ( $topic['starter_id'] == $member_id AND $delete_topics ) { if ( $this->trash_forum and $this->trash_forum != $topic['forum_id'] ) @@ -422,34 +414,34 @@ class ad_member //----------------------------------------- // Move, don't delete //----------------------------------------- - + $this->func_mod->topic_move($r['topic_id'], $topic['forum_id'], $this->trash_forum); - + $forums_affected[ $topic['forum_id'] ] = $topic['forum_id']; $forums_affected[ $this->trash_forum ] = $this->trash_forum; - + $topics_deleted++; $posts_deleted += $topic_i_posted['count']; - } + } else - { + { $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'posts', 'where' => 'topic_id='.$r['topic_id'] ) ); - + $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'topics', 'where' => 'tid='.$r['topic_id'] ) ); - + $forums_affected[ $topic['forum_id'] ] = $topic['forum_id']; $topics_deleted++; $posts_deleted += $topic['posts'] + 1; } - + } - + //----------------------------------------- // Just delete the post, then //----------------------------------------- - + else if ( $delete_posts AND ! $r['new_topic'] ) { if ( $this->trash_forum and $this->trash_forum != $topic['forum_id'] ) @@ -457,35 +449,35 @@ class ad_member //----------------------------------------- // Set up and pass to split topic handler //----------------------------------------- - - $new_title = "АЦ - сообщения, удаленные из темы «".$topic['title']."»"; - $new_desc = "АЦ - сообщения, удаленные из темы с ID: ".$topic['tid']; - + + $new_title = "ACP - Posts Deleted From ".$topic['title']; + $new_desc = "ACP - Posts Deleted From TID: ".$topic['tid']; + //----------------------------------------- // Is first post queued? //----------------------------------------- - + $topic_approved = 1; - + $this->ipsclass->DB->build_query( array( 'select' => 'pid, queued', 'from' => 'posts', 'where' => "pid=".$r['pid'], ) ); - + $this->ipsclass->DB->exec_query(); - + $first_post = $this->ipsclass->DB->fetch_row(); - + if( $first_post['queued'] ) { $topic_approved = 0; $this->ipsclass->DB->do_update( 'posts', array( 'queued' => 0 ), 'pid='.$first_post['pid'] ); } - + //----------------------------------------- // Complete a new dummy topic //----------------------------------------- - + $this->ipsclass->DB->do_insert( 'topics', array( 'title' => $new_title, 'description' => $new_desc, @@ -506,41 +498,41 @@ class ad_member 'approved' => $topic_approved, 'pinned' => 0, ) ); - + $new_topic_id = $this->ipsclass->DB->get_insert_id(); - + //----------------------------------------- // Move the posts //----------------------------------------- - - $this->ipsclass->DB->do_update( 'posts', array( 'topic_id' => $new_topic_id, 'new_topic' => 0, 'queued' => 0 ), "pid={$r['pid']}" ); - + + $this->ipsclass->DB->do_update( 'posts', array( 'topic_id' => $new_topic_id, 'new_topic' => 0, 'queued' => 0 ), "pid={$r['pid']}" ); + $this->ipsclass->DB->do_update( 'posts', array( 'new_topic' => 0 ), "topic_id={$topic['tid']}" ); $forums_affected[ $topic['forum_id'] ] = $topic['forum_id']; $forums_affected[ $this->trash_forum ] = $this->trash_forum; $topics_affected[ $topic['tid'] ] = $topic['tid']; $topics_affected[ $new_topic_id ] = $new_topic_id; - + $posts_deleted++; } else { $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'posts', 'where' => 'pid='.$r['pid'] ) ); - + $forums_affected[ $topic['forum_id'] ] = $topic['forum_id']; $topics_affected[ $topic['tid'] ] = $topic['tid']; - + $posts_deleted++; } } } - + //----------------------------------------- // Rebuild topics and forums //----------------------------------------- - + if ( count( $topics_affected ) ) { foreach( $topics_affected as $tid ) @@ -548,7 +540,7 @@ class ad_member $this->func_mod->rebuild_topic( $tid, 0 ); } } - + if ( count( $forums_affected ) ) { foreach( $forums_affected as $fid ) @@ -556,25 +548,25 @@ class ad_member $this->func_mod->forum_recount( $fid ); } } - + //----------------------------------------- // Finish - or more?... //----------------------------------------- - + if ( ! $done ) { //----------------------------------------- // Recount stats.. //----------------------------------------- - + $this->func_mod->stats_recount(); - + //----------------------------------------- // Reset member's posts //----------------------------------------- - + $forums = array(); - + foreach( $this->ipsclass->cache['forum_cache'] as $data ) { if ( ! $data['inc_postcount'] ) @@ -582,7 +574,7 @@ class ad_member $forums[] = $data['id']; } } - + if ( ! count( $forums ) ) { @@ -599,14 +591,14 @@ class ad_member ) ) ) ); $this->ipsclass->DB->exec_query(); - + $count = $this->ipsclass->DB->fetch_row(); } - + $new_post_count = intval( $count['count'] ); - + $this->ipsclass->DB->do_update( 'members', array( 'posts' => $new_post_count ), 'id='.$member_id ); - + $this->ipsclass->admin->output_multiple_redirect_done( $this->ipsclass->acp_lang['mem_posts_process_done'] ); } else @@ -614,9 +606,9 @@ class ad_member //----------------------------------------- // More.. //----------------------------------------- - + $next = $start + $end; - + $url = $this->ipsclass->base_url.'&'.$this->ipsclass->form_code_js."&code=deleteposts_process&dpergo={$end}" ."&st={$next}" ."&init=1" @@ -624,112 +616,112 @@ class ad_member ."&dtopics={$delete_topics}" ."&use_trash_can=".intval($this->ipsclass->input['use_trash_can']) ."&mid={$member_id}"; - + $text = sprintf( $this->ipsclass->acp_lang['mem_posts_process_more'], $end, $posts_deleted, $topics_deleted ); - + $this->ipsclass->admin->output_multiple_redirect_hit( $url, $img.' '.$text ); } } - + /*-------------------------------------------------------------------------*/ // Member Delete posts, start /*-------------------------------------------------------------------------*/ - + function member_delete_posts_start() { //----------------------------------------- // Page set up //----------------------------------------- - + $this->ipsclass->admin->page_title = $this->ipsclass->acp_lang['mem_delete_title']; $this->ipsclass->admin->page_detail = $this->ipsclass->acp_lang['mem_delete_title_desc']; - $this->ipsclass->admin->nav[] = array( '', 'Удаление сообщений пользователя' ); - + $this->ipsclass->admin->nav[] = array( '', 'Delete Member Posts' ); + //----------------------------------------- // INIT //----------------------------------------- - + $member_id = intval($this->ipsclass->input['mid']); - + //----------------------------------------- // Get member //----------------------------------------- - + $member = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'members', 'where' => 'id='.$member_id ) ); - + //----------------------------------------- // Non root admin attempting to edit root admin? //----------------------------------------- - + if ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) { if ( $member['mgroup'] == $this->ipsclass->vars['admin_group'] ) { - $this->ipsclass->admin->error("Вы не можете редактировать главных администраторов."); + $this->ipsclass->admin->error("You are not permitted to edit root administrators"); } } - + //----------------------------------------- // Get number of topics member has started //----------------------------------------- - + $topics = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'count(*) as count', 'from' => 'topics', 'where' => 'starter_id='.$member_id ) ); - + $posts = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'count(*) as count', 'from' => 'posts', 'where' => 'author_id='.$member_id ) ); - + //----------------------------------------- // Got any posts? //----------------------------------------- - + if ( ! $posts['count'] ) { - $this->ipsclass->main_msg = "Нет сообщений для удаления."; + $this->ipsclass->main_msg = "There are no posts to delete!"; $this->search_results(); } - + //----------------------------------------- // Get number of topics member has started //----------------------------------------- - + $this->ipsclass->acp_lang['mem_delete_delete_posts'] = sprintf( $this->ipsclass->acp_lang['mem_delete_delete_posts'] , intval($posts['count']) ); $this->ipsclass->acp_lang['mem_delete_delete_topics'] = sprintf( $this->ipsclass->acp_lang['mem_delete_delete_topics'], intval($topics['count']) ); - + $this->ipsclass->html .= $this->html->member_delete_posts_start( $member, intval($topics['count']), intval($posts['count']) ); - + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // PASS: COMPLETE /*-------------------------------------------------------------------------*/ - + function member_password_complete() { //----------------------------------------- // Check //----------------------------------------- - + if ( ! $this->ipsclass->input['password'] ) { - $this->ipsclass->main_msg = "Вы должны ввести пароль."; + $this->ipsclass->main_msg = "You must enter a password!"; $this->member_password_start(); } - + //----------------------------------------- // Auth check... //----------------------------------------- - + $this->ipsclass->admin->security_auth_check(); - + //----------------------------------------- // Grab converge... //----------------------------------------- - if ( $this->ipsclass->vars['ipbli_key'] == 'converge' ) + if ( $this->ipsclass->vars['ipbli_key'] == 'ipconverge' ) { $converge = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'converge_local', @@ -747,45 +739,50 @@ class ad_member if ( ! $converge['converge_active'] ) { - $this->ipsclass->main_msg = "Действие не выполнено, поскольку невозможно найти сведений о API IP.Converge."; + $this->ipsclass->main_msg = "Action failed. Could not locate IP.Converge API details. Recommend that you re-peform a handshake request from the IP.Converge control panel"; $this->member_password_start(); } } - + //----------------------------------------- // Get member //----------------------------------------- - + $member = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'members', 'where' => 'id='.intval($this->ipsclass->input['id']) ) ); - + //----------------------------------------- // Non root admin attempting to edit root admin? //----------------------------------------- - + if ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) { if ( $member['mgroup'] == $this->ipsclass->vars['admin_group'] ) { - $this->ipsclass->admin->error("Вы не можете редактировать главных администраторов."); + $this->ipsclass->admin->error("You are not permitted to edit root administrators"); } } - + + if ( $this->ipsclass->txt_mb_strlen( $_POST['password'] ) > 32) + { + $this->ipsclass->admin->error("The new password is too long. The maximum length is 32 characters."); + } + $salt = $this->ipsclass->converge->generate_password_salt(5); $salt = str_replace( '\\', "\\\\", $salt ); - + $key = $this->ipsclass->converge->generate_auto_log_in_key(); - + $md5_once = md5( trim($this->ipsclass->input['password']) ); - + $converge_member = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'members_converge', 'where' => "converge_email='{$member['email']}'" ) ); if( !$converge_member ) { - $this->ipsclass->admin->error("Проблема с загрузкой пользовательского аккаунта"); + $this->ipsclass->admin->error("There was an error loading the user's account"); } - + $save_array = array(); - + if ( $this->ipsclass->input['newsalt'] ) { $save_array['converge_pass_salt'] = $salt; @@ -795,272 +792,272 @@ class ad_member { $save_array['converge_pass_hash'] = md5( md5( $converge_member['converge_pass_salt'] ) . $md5_once ); } - + //----------------------------------------- // Check Converge: Password //----------------------------------------- - if ( $this->ipsclass->vars['ipbli_key'] == 'converge' ) - { - $request = array( 'auth_key' => $converge['converge_api_code'], - 'product_id' => $converge['converge_product_id'], - 'email_address' => $member['email'], - 'md5_once_password' => $md5_once, - ); - - $url = $converge['converge_url'] . '/converge_master/converge_server.php'; - - //----------------------------------------- - // Send request - //----------------------------------------- - - $this->api_server->api_send_request( $url, 'convergeChangePassword', $request ); - - //----------------------------------------- - // Handle errors... - //----------------------------------------- - - if ( count( $this->api_server->errors ) OR $this->api_server->params['response'] != 'SUCCESS' ) - { - $this->ipsclass->main_msg = "Пароль не может быть изменен, так как IP.Converge возвращает ошибку."; - $this->member_password_start(); - return; - } - } - + //----------------------------------------- + // Load handler... + //----------------------------------------- + + require_once( ROOT_PATH.'sources/handlers/han_login.php' ); + $this->han_login = new han_login(); + $this->han_login->ipsclass =& $this->ipsclass; + $this->han_login->init(); + $this->han_login->change_pass( $member['email'], $md5_once ); + + if( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' ) + { + $this->ipsclass->main_msg = "The password could not be changed. IP.Converge returned an error."; + $this->member_password_start(); + return; + } + //----------------------------------------- // Local DB //----------------------------------------- - + $this->ipsclass->DB->do_update( 'members_converge', $save_array, "converge_email='{$member['email']}'" ); - + if ( $this->ipsclass->input['newkey'] ) { $this->ipsclass->DB->do_update( 'members', array( 'member_login_key' => $key ), 'id='.intval($this->ipsclass->input['id']) ); } - + + //----------------------------------------- + // Using modules + //----------------------------------------- + + if ( USE_MODULES == 1 ) + { + $this->modules->register_class($this); + + $this->modules->on_pass_change($this->ipsclass->input['mid'], $this->ipsclass->input['password']); + } + //----------------------------------------- // Redirect //----------------------------------------- - + $page_query = ""; - - foreach( array('name','email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','gotcount', 'fromdel') as $bit ) + + foreach( array('name','email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','dnamewhere','gotcount', 'fromdel') as $bit ) { $page_query .= '&'.$bit.'='.trim($this->ipsclass->input[ $bit ]); } - - $this->ipsclass->admin->save_log("Изменен пароль пользователя (ID: {$this->ipsclass->input['id']} )"); - - $this->ipsclass->admin->done_screen("Пароль изменен", "Поиск пользователей", "{$this->ipsclass->form_code}".$page_query, "redirect" ); + + $this->ipsclass->admin->save_log("Members Password Changed ( id: {$this->ipsclass->input['id']} )"); + + $this->ipsclass->admin->done_screen("Password Changed", "Member Search", "{$this->ipsclass->form_code}".$page_query, "redirect" ); } - + //----------------------------------------- // // PASS: START // //----------------------------------------- - + function member_password_start() { //----------------------------------------- // Redirect //----------------------------------------- - + $page_array = array( 1 => array( 'code' , 'dochangepassword' ), 2 => array( 'act' , 'mem' ), 3 => array( 'id' , $this->ipsclass->input['id'] ), 4 => array( 'section', $this->ipsclass->section_code ), ); - - foreach( array('name','email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','gotcount', 'fromdel') as $bit ) + + foreach( array('name','email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','dnamewhere','gotcount', 'fromdel') as $bit ) { $page_array[] = array( $bit, trim($this->ipsclass->input[ $bit ]) ); } - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( $page_array ); - + //----------------------------------------- // Get member //----------------------------------------- - + $member = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'members', 'where' => 'id='.intval($this->ipsclass->input['id']) ) ); - + //----------------------------------------- // Non root admin attempting to edit root admin? //----------------------------------------- - + if ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) { if ( $member['mgroup'] == $this->ipsclass->vars['admin_group'] ) { - $this->ipsclass->admin->error("Вы не можете редактировать главных администраторов"); + $this->ipsclass->admin->error("You are not permitted to edit root administrators"); } } - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Изменение пароля пользователя: {$member['members_display_name']}" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Введите новый пароль" , + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Change password for member: {$member['members_display_name']}" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Enter the new password" , $this->ipsclass->adskin->form_input('password' ), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Создать новый кеш пароля?
    При выборе «Да», будет создан новый кеш пароля.
    Помогает в тех случаях, когда пользователь имеет проблемы со входом в систему.
    " , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Create new password salt?
    If set to 'yes', a new password salt will be generated. Useful if a member is having trouble logging in.
    " , $this->ipsclass->adskin->form_yes_no( "newsalt", 1 ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Создать новый ключ доступа?
    При выборе «Да», будут созданы новые Cookie для этого пользователя.
    Помогает в тех случаях, когда пользователь имеет проблемы со входом в систему.
    Текущие Cookie пользователя работать не будут.
    " , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Create new log in key?
    If set to 'yes', a new cookie log in key will be generated. Useful if a member is having trouble logging in. Any current cookies will not work.
    " , $this->ipsclass->adskin->form_yes_no( "newkey", 1 ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Изменить"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Change Password"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - $this->ipsclass->admin->nav[] = array( '', 'Изменение пароля пользователя' ); - + + $this->ipsclass->admin->nav[] = array( '', 'Change Member Password' ); + $this->ipsclass->admin->output(); } - - - + + + /*-------------------------------------------------------------------------*/ // // TEMP BANNING // /*-------------------------------------------------------------------------*/ - + function member_suspend_start() { - $this->ipsclass->admin->page_title = "Блокировка пользователя"; - $this->ipsclass->admin->page_detail = "Временная блокировка пользователя. Просто укажите продолжительность блокировки и нажмите «Заблокировать»."; - $this->ipsclass->admin->nav[] = array( '', 'Временная блокировка пользователя' ); - - $contents = "{membername},\nАдминистратор форума {$this->ipsclass->vars['board_name']} временно заблокировал вашу учетную запись\n\nВаша учетная запись будет активна с {date_end} (в зависимости от вашего часового пояса). Это полностью автоматический процесс блокировки и от вас не требуется ничего делать для его ускорения или прекращения.\n\nФорум: {$this->ipsclass->vars['board_url']}/index.php"; - + $this->ipsclass->admin->page_title = "Account Suspension"; + $this->ipsclass->admin->page_detail = "Automated temporary member suspension. Simply choose the duration of the suspension and submit the form below"; + $this->ipsclass->admin->nav[] = array( '', 'Suspend Member' ); + + $contents = "{membername},\nYour member account at {$this->ipsclass->vars['board_name']} has been temporarily suspended.\n\nYour account will not be functional until {date_end} (depending on your timezone). This is an automated process and you do not need to do anything to expediate the unsuspension process.\n\nBoard Address: {$this->ipsclass->vars['board_url']}/index.php"; + if ($this->ipsclass->input['mid'] == "") { - $this->ipsclass->admin->error("Вы не указали ID пользователя."); + $this->ipsclass->admin->error("You must specify a valid member id, please go back and try again"); } - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'members', 'where' => "id=".intval($this->ipsclass->input['mid']) ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $member = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Вы должны ввести правильный ID пользователя, вернитесь и попробуйте еще раз"); + $this->ipsclass->admin->error("We could not match that ID in the members database"); } - + //----------------------------------------- // Non root admin attempting to edit root admin? //----------------------------------------- - + if ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) { if ( $member['mgroup'] == $this->ipsclass->vars['admin_group'] ) { - $this->ipsclass->admin->error("Вы не можете редактировать главных администраторов"); + $this->ipsclass->admin->error("You are not permitted to edit root administrators"); } } - + //----------------------------------------- // Redirect //----------------------------------------- - + $page_array = array( 1 => array( 'code' , 'dobanmember' ), 2 => array( 'act' , 'mem' ), 3 => array( 'mid' , $this->ipsclass->input['mid'] ), 4 => array( 'section', $this->ipsclass->section_code ), ) ; - - foreach( array('name','email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','gotcount', 'fromdel') as $bit ) + + foreach( array('name','email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','dnamewhere','gotcount', 'fromdel') as $bit ) { $page_array[] = array( $bit, trim($this->ipsclass->input[ $bit ]) ); } - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( $page_array ); - + $ban = $this->ipsclass->hdl_ban_line( $member['temp_ban'] ); - - $units = array( 0 => array( 'h', 'часов' ), 1 => array( 'd', 'дней' ) ); - + + $units = array( 0 => array( 'h', 'Hours' ), 1 => array( 'd', 'Days' ) ); + //----------------------------------------- // Start form //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Блокировка учетной записи пользователя", "Примечание: Если этот пользователь был уже заблокирован, то отсчет времени новой блокировки перекроет старую (отсчет времени начнется с текущего момента)." ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Заблокировать {$member['members_display_name']} на..." , + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Member Account Suspension", "Note: If this member is already suspended, any new setting will restart the ban" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Suspend {$member['members_display_name']} for..." , $this->ipsclass->adskin->form_input('timespan', $ban['timespan'], "text", "", '5' ) . ' ' . $this->ipsclass->adskin->form_dropdown('units', $units, $ban['units'] ), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Предупредить пользователя по e-mail?
    (Если что, то Вы можете отредактировать текст сообщения ниже)" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Email notification to this member?
    (If so, you may edit the email below)" , $this->ipsclass->adskin->form_yes_no( "send_email", 0 ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Содержимое письма
    (Доступные теги: {membername} = имя пользователя, {date_end} = дата и время окончания блокировки)" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Email contents
    (Tags: {membername} = member's name, {date_end} = ban end)" , $this->ipsclass->adskin->form_textarea( "email_contents", $contents ) ), "", 'top' ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Заблокировать"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Suspend This Account"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // // SUSPEND COMPLETE // /*-------------------------------------------------------------------------*/ - + function member_suspend_complete() { - $this->ipsclass->admin->page_title = "Блокировка учетной записи пользователя"; - - $this->ipsclass->admin->page_detail = "Автоматическая блокировка учетной записи пользователя. Дополнительная информация"; - + $this->ipsclass->admin->page_title = "Account Suspension"; + + $this->ipsclass->admin->page_detail = "Automated temporary member suspension. Confirmation and information"; + $this->ipsclass->input['mid'] = intval($this->ipsclass->input['mid']); - + if ($this->ipsclass->input['mid'] == "") { - $this->ipsclass->admin->error("Вы должны ввести правильный ID пользователя, вернитесь и попробуйте еще раз"); + $this->ipsclass->admin->error("You must specify a valid member id, please go back and try again"); } - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'members', 'where' => "id=".intval($this->ipsclass->input['mid']) ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $member = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Невозможно найти пользователя с таким ID"); + $this->ipsclass->admin->error("We could not match that ID in the members database"); } - + //----------------------------------------- // Non root admin attempting to edit root admin? //----------------------------------------- - + if ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) { if ( $member['mgroup'] == $this->ipsclass->vars['admin_group'] ) { - $this->ipsclass->admin->error("Вы не можете редактировать главных администраторов"); + $this->ipsclass->admin->error("You are not permitted to edit root administrators"); } } - + //----------------------------------------- // Work out end date //----------------------------------------- - + $this->ipsclass->input['timespan'] = intval($this->ipsclass->input['timespan']); - + if ( $this->ipsclass->input['timespan'] == "" ) { $new_ban = ""; @@ -1069,205 +1066,205 @@ class ad_member { $new_ban = $this->ipsclass->hdl_ban_line( array( 'timespan' => intval($this->ipsclass->input['timespan']), 'unit' => $this->ipsclass->input['units'] ) ); } - + $show_ban = $this->ipsclass->hdl_ban_line( $new_ban ); - + //----------------------------------------- // Update and show confirmation //----------------------------------------- - + $this->ipsclass->DB->do_update( 'members', array( 'temp_ban' => $new_ban ), "id=".$this->ipsclass->input['mid'] ); - + // I say, did we choose to email 'dis member? - + if ($this->ipsclass->input['send_email'] == 1) { // By golly, we did! - + require_once( ROOT_PATH . "sources/classes/class_email.php" ); - + $this->email = new emailer( ROOT_PATH ); $this->email->ipsclass =& $this->ipsclass; $this->email->email_init(); - + $msg = trim($this->ipsclass->txt_stripslashes($_POST['email_contents'])); - + $msg = str_replace( "{membername}", $member['members_display_name'] , $msg ); $msg = str_replace( "{date_end}" , $this->ipsclass->admin->get_date( $show_ban['date_end'], 'LONG') , $msg ); - + $this->email->message = $this->email->clean_message($msg); - $this->email->subject = "Уведомление о блокировке учетной записи"; + $this->email->subject = "Account Suspension Notification"; $this->email->to = $member['email']; $this->email->send_mail(); } - + //----------------------------------------- // Redirect //----------------------------------------- - + $page_query = ""; - - foreach( array('name','email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','gotcount', 'fromdel') as $bit ) + + foreach( array('name','email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','dnamewhere','gotcount', 'fromdel') as $bit ) { $page_query .= '&'.$bit.'='.trim($this->ipsclass->input[ $bit ]); } - - $this->ipsclass->admin->save_log("Заблокирован пользователь ( {$member['members_display_name']} )"); - - $this->ipsclass->admin->done_screen("Пользователь заблокирован", "Поиск пользователей", "{$this->ipsclass->form_code}".$page_query, "redirect" ); + + $this->ipsclass->admin->save_log("Suspended Member(s) ( {$member['members_display_name']} )"); + + $this->ipsclass->admin->done_screen("Suspended Member(s)", "Member Search", "{$this->ipsclass->form_code}".$page_query, "redirect" ); } - + /*-------------------------------------------------------------------------*/ // // Unsuspend // /*-------------------------------------------------------------------------*/ - + function member_unsuspend() { if ($this->ipsclass->input['mid'] == "") { - $this->ipsclass->admin->error("Вы должны ввести правильный ID пользователя, вернитесь и попробуйте еще раз"); + $this->ipsclass->admin->error("You must specify a valid member id, please go back and try again"); } - + if ($this->ipsclass->input['mid'] == 'all') { $this->ipsclass->DB->do_update( 'members', array( 'temp_ban' => $new_ban ), "" ); - - $this->ipsclass->admin->save_log("Все пользователи разблокированы"); - - $msg = "Все пользователи разблокированы"; + + $this->ipsclass->admin->save_log("Unsuspended all member accounts"); + + $msg = "All Accounts Unsuspended"; } else { $mid = intval($this->ipsclass->input['mid']); - + $this->ipsclass->DB->do_update( 'members', array( 'temp_ban' => $new_ban ), "id=$mid" ); - + $this->ipsclass->DB->simple_construct( array( 'select' => 'members_display_name', 'from' => 'members', 'where' => "id=$mid" ) ); $this->ipsclass->DB->simple_exec(); - + $member = $this->ipsclass->DB->fetch_row(); - - $this->ipsclass->admin->save_log("Пользователь {$member['members_display_name']} разблокирован"); - - $msg = "{$member['members_display_name']} разблокирован"; + + $this->ipsclass->admin->save_log("Unsuspended {$member['members_display_name']}"); + + $msg = "{$member['members_display_name']} Unsuspended"; } - + //----------------------------------------- // Redirect //----------------------------------------- - + $page_query = "&members_display_name=".$member['members_display_name']; - - $this->ipsclass->admin->done_screen($msg, "Поиск пользователей", "{$this->ipsclass->form_code}".$page_query, "redirect" ); + + $this->ipsclass->admin->done_screen($msg, "Member Search", "{$this->ipsclass->form_code}".$page_query, "redirect" ); } - - + + /*-------------------------------------------------------------------------*/ // CHANGE MEMBER DISPLAY NAME /*-------------------------------------------------------------------------*/ - + function member_change_display_name_do() { //----------------------------------------- // INIT //----------------------------------------- - + $mid = intval( $this->ipsclass->input['mid'] ); $display_name = $this->ipsclass->input['new_name']; - + //----------------------------------------- // Auth check... //----------------------------------------- - + $this->ipsclass->admin->security_auth_check(); - + //----------------------------------------- // Check //----------------------------------------- - + if ( ! $mid ) { - $this->ipsclass->admin->error("Вы должны ввести правильный ID пользователя, вернитесь и попробуйте еще раз"); + $this->ipsclass->admin->error("You must specify a valid member id, please go back and try again"); } - + if ($this->ipsclass->input['new_name'] == "") { - $this->member_change_name_start("Вы должны ввести новое имя для этого пользователя"); + $this->member_change_display_name( "You must enter a new name for this member" ); exit(); } - + //----------------------------------------- // Select //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'members', 'where' => "id=".$mid ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $member = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Невозможно найти пользователя с таким ID"); + $this->ipsclass->admin->error("We could not match that ID in the members database"); } - + //----------------------------------------- // Non root admin attempting to edit root admin? //----------------------------------------- - + if ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) { if ( $member['mgroup'] == $this->ipsclass->vars['admin_group'] ) { - $this->ipsclass->admin->error("Вы не можете редактировать главных администраторов "); + $this->ipsclass->admin->error("You are not permitted to edit root administrators"); } } - + //----------------------------------------- // Check //----------------------------------------- - + if ( $display_name == $member['members_display_name'] ) { - $this->member_change_display_name("Новое имя пользователя аналогично старому, вернитесь назад и введите другое"); + $this->member_change_display_name("The new name is the same as the old name, that is illogical captain"); exit(); } - + //----------------------------------------- // Load ban filters //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'banfilters' ) ); $this->ipsclass->DB->simple_exec(); - + while( $r = $this->ipsclass->DB->fetch_row() ) { $banfilters[ $r['ban_type'] ][] = $r['ban_content']; } - + //----------------------------------------- // Check for missing fields / chars. //----------------------------------------- - + if ( ! $display_name ) { - $this->member_change_display_name("Вы должны ввести имя"); + $this->member_change_display_name("You must enter a name to use"); exit(); } - + $unicode_dname = preg_replace_callback('/&#([0-9]+);/si', create_function( '$matches', 'return chr($matches[1]);' ), $display_name); $unicode_dname = str_replace( "'" , ''', $unicode_dname ); $unicode_dname = str_replace( "\\", '\', $unicode_dname ); if ( preg_match( "#[\[\];,\|]#", str_replace(''', "'", str_replace('&', '&', $unicode_dname) ) ) ) { - $this->member_change_display_name("В новом имени есть запрещенные символы"); + $this->member_change_display_name("The new name contains illegal characters"); exit(); } - + //----------------------------------------- // Are they banned [NAMES]? //----------------------------------------- - + if ( is_array( $banfilters['name'] ) and count( $banfilters['name'] ) ) { foreach ( $banfilters['name'] as $n ) @@ -1276,144 +1273,142 @@ class ad_member { continue; } - - if ( preg_match( "/^".preg_quote($n, '/' )."$/i", $display_name ) ) + + $n = str_replace( '\*', '.*' , preg_quote($n, "/") ); + + if ( preg_match( "/^{$n}$/i", $display_name ) ) { $found_name = 1; break; } } } - + //----------------------------------------- // Check for existing name. //----------------------------------------- - + $this->ipsclass->DB->build_query( array( 'select' => "members_display_name, id", 'from' => 'members', 'where' => "members_l_display_name='{$display_name}' AND id != ".$mid, 'limit' => array( 0,1 ) ) ); - + $this->ipsclass->DB->exec_query(); - + //----------------------------------------- // Got any results? //----------------------------------------- - + if ( $this->ipsclass->DB->get_num_rows() ) { $check = $this->ipsclass->DB->fetch_row(); - + if( $check['id'] != $member['id'] ) { $found_name = 1; } } - + //----------------------------------------- // Check for existing LOG IN name. //----------------------------------------- - + if ( $this->ipsclass->vars['auth_dnames_nologinname'] ) { $this->ipsclass->DB->build_query( array( 'select' => "members_display_name, id", 'from' => 'members', 'where' => "members_l_username='{$display_name}' AND id != ".$mid, 'limit' => array( 0,1 ) ) ); - + $this->ipsclass->DB->exec_query(); - + if ( $this->ipsclass->DB->get_num_rows() ) { $check = $this->ipsclass->DB->fetch_row(); - + if( $check['id'] != $member['id'] ) { $found_name = 1; } } } - + //----------------------------------------- // Got a name? //----------------------------------------- - + if ( $found_name ) { - $this->member_change_display_name("Это имя уже используется другим пользователем"); + $this->member_change_display_name("That name is already taken by another member"); exit(); } - + //----------------------------------------- // Insert into change log //----------------------------------------- - + $this->ipsclass->DB->force_data_type = array( 'dname_previous' => 'string', 'dname_current' => 'string' ); - + $this->ipsclass->DB->do_insert( 'dnames_change', array( 'dname_member_id' => $member['id'], 'dname_date' => time(), 'dname_ip_address' => $this->ipsclass->ip_address, 'dname_previous' => $member['members_display_name'], 'dname_current' => $display_name ) ); - + //----------------------------------------- // Still here? Change it then //----------------------------------------- - - $this->ipsclass->DB->force_data_type = array( 'members_display_name' => 'string' ); - $this->ipsclass->DB->do_update( 'members' , array( 'members_display_name' => $display_name ), "id=" .$member['id'] ); - - $this->ipsclass->DB->force_data_type = array( 'members_l_display_name' => 'string' ); - $this->ipsclass->DB->do_update( 'members' , array( 'members_l_display_name' => strtolower($display_name) ), "id=" .$member['id'] ); - + + $this->ipsclass->DB->force_data_type = array( 'members_display_name' => 'string', 'members_l_display_name' => 'string' ); + $this->ipsclass->DB->do_update( 'members' , array( 'members_display_name' => $display_name, 'members_l_display_name' => strtolower($display_name) ), "id=" .$member['id'] ); + $this->ipsclass->DB->force_data_type = array( 'contact_name' => 'string' ); $this->ipsclass->DB->do_update( 'contacts' , array( 'contact_name' => $display_name ), "contact_id=" .$member['id'] ); - + $this->ipsclass->DB->force_data_type = array( 'last_poster_name' => 'string' ); $this->ipsclass->DB->do_update( 'forums' , array( 'last_poster_name' => $display_name ), "last_poster_id=".$member['id'] ); - + $this->ipsclass->DB->force_data_type = array( 'member_name' => 'string' ); $this->ipsclass->DB->do_update( 'sessions' , array( 'member_name' => $display_name ), "member_id=" .$member['id'] ); - + $this->ipsclass->DB->force_data_type = array( 'starter_name' => 'string' ); $this->ipsclass->DB->do_update( 'topics' , array( 'starter_name' => $display_name ), "starter_id=" .$member['id'] ); - + $this->ipsclass->DB->force_data_type = array( 'last_poster_name' => 'string' ); $this->ipsclass->DB->do_update( 'topics' , array( 'last_poster_name' => $display_name ), "last_poster_id=".$member['id'] ); - + //----------------------------------------- // Recache moderators //----------------------------------------- - + require_once( ROOT_PATH .'sources/action_admin/moderator.php' ); $admod = new ad_moderator(); $admod->ipsclass =& $this->ipsclass; - + $admod->rebuild_moderator_cache(); - + //----------------------------------------- // Recache announcements //----------------------------------------- - + require_once( ROOT_PATH.'sources/action_public/announcements.php' ); $announcements = new announcements(); $announcements->ipsclass =& $this->ipsclass; $announcements->announce_recache(); - + //----------------------------------------- // Recache forums //----------------------------------------- - + $this->ipsclass->update_forum_cache(); - + //----------------------------------------- // Stats to Update? //----------------------------------------- - - $stats = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='stats'" ) ); - - $stats = unserialize($this->ipsclass->txt_stripslashes($stats['cs_value'])); + + $this->ipsclass->init_load_cache( array( 'stats' ) ); + $stats = $this->ipsclass->cache['stats']; $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, members_display_name', 'from' => 'members', @@ -1421,239 +1416,239 @@ class ad_member 'order' => "id DESC", 'limit' => array(0,1) ) ); $this->ipsclass->DB->simple_exec(); - + $r = $this->ipsclass->DB->fetch_row(); - $stats['last_mem_name'] = $r['members_display_name'] ? $r['members_display_name'] : $r['name']; + $stats['last_mem_name'] = $r['members_display_name']; $stats['last_mem_id'] = $r['id']; - + if ( count($stats) > 0 ) { $this->ipsclass->cache['stats'] =& $stats; $this->ipsclass->update_cache( array( 'name' => 'stats', 'array' => 1, 'deletefirst' => 1 ) ); - } - + } + //----------------------------------------- // LOG //----------------------------------------- - - $this->ipsclass->admin->save_log("Изменено имя пользователя: с '{$member['members_display_name']}' на '$display_name'"); - + + $this->ipsclass->admin->save_log("Changed Member's Display Name '{$member['members_display_name']}' to '$display_name'"); + //----------------------------------------- // Redirect //----------------------------------------- - $this->ipsclass->input['members_display_name'] = $display_name; - - $this->ipsclass->admin->done_screen("Имя пользователя изменено", "Поиск пользователей", "{$this->ipsclass->form_code}".$this->_generate_page_string_url(), "redirect" ); + $this->ipsclass->input['members_display_name'] = urlencode($display_name); + + $this->ipsclass->admin->done_screen("Member's Display Name Changed", "Member Search", "{$this->ipsclass->form_code}".$this->_generate_page_string_url(), "redirect" ); } - - - + + + /*-------------------------------------------------------------------------*/ // Change name (display name) /*-------------------------------------------------------------------------*/ - + function member_change_display_name($message="") { //----------------------------------------- // INIT //----------------------------------------- - + $mid = intval($this->ipsclass->input['mid']); - + //----------------------------------------- // Page titles //----------------------------------------- - - $this->ipsclass->admin->page_title = "Изменение отображаемого имени"; - $this->ipsclass->admin->page_detail = "В этой секции вы можете изменить текущее имя пользователя."; - $this->ipsclass->admin->nav[] = array( '', 'Изменение отображаемого имени' ); - + + $this->ipsclass->admin->page_title = "Change Member Name"; + $this->ipsclass->admin->page_detail = "You may enter a new name for this member."; + $this->ipsclass->admin->nav[] = array( '', 'Edit Member Display Name' ); + //----------------------------------------- // Check //----------------------------------------- - + if ( ! $mid ) { - $this->ipsclass->admin->error("Вы должны ввести правильный ID пользователя, вернитесь и попробуйте еще раз"); + $this->ipsclass->admin->error("You must specify a valid member id, please go back and try again"); } - + //----------------------------------------- // Get member //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'members', 'where' => "id=".$mid ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $member = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Невозможно найти пользователя с таким ID"); + $this->ipsclass->admin->error("We could not match that ID in the members database"); } - + //----------------------------------------- // Non root admin attempting to edit root admin? //----------------------------------------- - + if ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) { if ( $member['mgroup'] == $this->ipsclass->vars['admin_group'] ) { - $this->ipsclass->admin->error("Вы не можете редактировать главных администраторов"); + $this->ipsclass->admin->error("You are not permitted to edit root administrators"); } } - - $contents = "Уважаемый(ая) {old_name},\nАдминистратор форума {$this->ipsclass->vars['board_name']} изменил ваше имя пользователя.\n\nВаше новое имя пользователя: {new_name}\n\nПожалуйста, запомните его, при следующем входе в систему вам потребуется ввести именно это имя пользователя.\nФорум: {$this->ipsclass->vars['board_url']}/index.php"; - + + $contents = "{old_name},\nAn administrator has changed your member name on {$this->ipsclass->vars['board_name']}.\n\nYour new name is: {new_name}\n\nPlease remember this as you may need to use this new name when you log in next time.\nBoard Address: {$this->ipsclass->vars['board_url']}/index.php"; + //----------------------------------------- // FORM //----------------------------------------- - + $page_array = array( 1 => array( 'code' , 'change_display_name_do' ), 2 => array( 'act' , 'mem' ), 3 => array( 'mid' , $mid ), 4 => array( 'section', $this->ipsclass->section_code ), ); - + $page_array = array_merge( $page_array, $this->_generate_page_string() ); - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( $page_array ); - + //----------------------------------------- // start form //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Изменение имени пользователя" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Change Member's Display Name" ); + if ($message != "") { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Ошибка:" , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Error Message:" , "$message", ) ); } - - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Текущее имя пользователя" , + + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Current Member's Name" , $member['members_display_name'], ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Новое отображаемое имя
    Запрещенные символы: [ ] | ; $
    Максимальная длина: {$this->ipsclass->vars['max_user_name_length']} символов.
    " , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "New Member's Display Name
    Illegal characters: [ ] | ; $
    Max. Chars: {$this->ipsclass->vars['max_user_name_length']}
    " , $this->ipsclass->adskin->form_input( "new_name", $this->ipsclass->input['new_name'] ) ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Изменить имя пользователя"); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Change this member's display name"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); } - - + + /*-------------------------------------------------------------------------*/ // // CHANGE MEMBER NAME // /*-------------------------------------------------------------------------*/ - + function member_change_name_complete() { //----------------------------------------- // Auth check... //----------------------------------------- - + $this->ipsclass->admin->security_auth_check(); - + $this->ipsclass->input['new_name'] = str_replace( '|', '|', $this->ipsclass->input['new_name'] ); - + //----------------------------------------- // Check //----------------------------------------- - + if ($this->ipsclass->input['mid'] == "") { - $this->ipsclass->admin->error("Вы не выбрали пользователя"); + $this->ipsclass->admin->error("You must specify a valid member id, please go back and try again"); } - + if ($this->ipsclass->input['new_name'] == "") { - $this->member_change_name_start("Вы должны ввести имя для этого пользователя"); + $this->member_change_name_start("You must enter a new name for this member"); exit(); } - + if ( strlen( $this->ipsclass->input['new_name'] ) > $this->ipsclass->vars['max_user_name_length'] ) { $this->member_change_name_start("The new name must be shorter than " . $this->ipsclass->vars['max_user_name_length'] . " characters" ); exit(); } - + //----------------------------------------- // Select //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'members', 'where' => "id=".intval($this->ipsclass->input['mid']) ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $member = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Вы не выбрали пользователя"); + $this->ipsclass->admin->error("We could not match that ID in the members database"); } - + //----------------------------------------- // Non root admin attempting to edit root admin? //----------------------------------------- - + if ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) { if ( $member['mgroup'] == $this->ipsclass->vars['admin_group'] ) { - $this->ipsclass->admin->error("Вы не можете редактировать главных администраторов "); + $this->ipsclass->admin->error("You are not permitted to edit root administrators"); } } - + $mid = intval($this->ipsclass->input['mid']); // Save me poor ol' carpels - + if ($this->ipsclass->input['new_name'] == $member['name']) { - $this->member_change_name_start("Новое имя, точно такое же, как и старое, так не должно быть"); + $this->member_change_name_start("The new name is the same as the old name, that is illogical captain"); exit(); } - + //----------------------------------------- // Check to ensure that his member name hasn't already been taken. //----------------------------------------- - + $new_name = trim($this->ipsclass->input['new_name']); - + $this->ipsclass->DB->cache_add_query( 'login_getmember', array( 'username' => strtolower($new_name) ) ); $this->ipsclass->DB->cache_exec_query(); - + if ( $this->ipsclass->DB->get_num_rows() ) { $check = $this->ipsclass->DB->fetch_row(); - + if( $check['id'] != $member['id'] ) { - $this->member_change_name_start("Пользователь с именем '$new_name' уже существует, пожалуйста, выберите другое имя"); + $this->member_change_name_start("The name '$new_name' already exists, please choose another"); exit(); } } - + if ( $this->ipsclass->vars['auth_allow_dnames'] ) { if ( $this->ipsclass->vars['auth_dnames_nologinname'] ) { $this->ipsclass->DB->build_query( array( 'select' => "members_display_name, id", 'from' => 'members', - 'where' => "members_l_display_name='".strtolower($new_name)."'", + 'where' => "members_l_display_name='".strtolower($new_name)."' AND id<>{$member['id']}", 'limit' => array( 0,1 ) ) ); $this->ipsclass->DB->exec_query(); if ( $this->ipsclass->DB->get_num_rows() ) { - $this->member_change_name_start("Пользователь с отображаемым именем '$new_name' уже существует, пожалуйста, выберите другое отображаемое имя"); + $this->member_change_name_start("The name '$new_name' is already being used as someone's display name, please choose another"); exit(); } } @@ -1663,224 +1658,239 @@ class ad_member // If one gets here, one can assume that the new name is correct for one, er...one. // So, lets do the converteroo //----------------------------------------- - - $this->ipsclass->DB->do_update( 'members' , array( 'name' => $new_name ), "id=" .$mid ); - $this->ipsclass->DB->do_update( 'members' , array( 'members_l_username' => strtolower( $new_name ) ), "id=".$mid ); - + + $this->ipsclass->DB->force_data_type = array( 'name' => 'string', 'members_l_username' => 'string' ); + + $this->ipsclass->DB->do_update( 'members' , array( 'name' => $new_name, 'members_l_username' => strtolower( $new_name ) ), 'id=' . $mid ); + + $this->ipsclass->DB->force_data_type = array( 'member_name' => 'string' ); + $this->ipsclass->DB->do_update( 'moderators' , array( 'member_name' => $new_name ), "member_id=" .$mid ); + if ( ! $this->ipsclass->vars['auth_allow_dnames'] ) { //----------------------------------------- // Not using sep. display names? //----------------------------------------- - - $this->ipsclass->DB->do_update( 'members' , array( 'members_display_name' => $new_name ), "id=" .$mid ); - $this->ipsclass->DB->do_update( 'members' , array( 'members_l_display_name' => strtolower( $new_name ) ), "id=" .$mid ); - + + $this->ipsclass->DB->force_data_type = array( 'members_display_name' => 'string', 'members_l_display_name' => 'string' ); + + $this->ipsclass->DB->do_update( 'members' , array( 'members_display_name' => $new_name, 'members_l_display_name' => strtolower( $new_name ) ), 'id=' . $mid ); + # Not using Display names? Then update.... + + $this->ipsclass->DB->force_data_type = array( 'contact_name' => 'string' ); $this->ipsclass->DB->do_update( 'contacts' , array( 'contact_name' => $new_name ), "contact_id=" .$mid ); + + $this->ipsclass->DB->force_data_type = array( 'last_poster_name' => 'string' ); $this->ipsclass->DB->do_update( 'forums' , array( 'last_poster_name' => $new_name ), "last_poster_id=".$mid ); + + $this->ipsclass->DB->force_data_type = array( 'member_name' => 'string' ); $this->ipsclass->DB->do_update( 'sessions' , array( 'member_name' => $new_name ), "member_id=" .$mid ); + + $this->ipsclass->DB->force_data_type = array( 'starter_name' => 'string' ); $this->ipsclass->DB->do_update( 'topics' , array( 'starter_name' => $new_name ), "starter_id=" .$mid ); + + $this->ipsclass->DB->force_data_type = array( 'last_poster_name' => 'string' ); $this->ipsclass->DB->do_update( 'topics' , array( 'last_poster_name' => $new_name ), "last_poster_id=".$mid ); - + //----------------------------------------- // Recache moderators //----------------------------------------- - + require_once( ROOT_PATH .'sources/action_admin/moderator.php' ); $admod = new ad_moderator(); $admod->ipsclass =& $this->ipsclass; - + $admod->rebuild_moderator_cache(); - + //----------------------------------------- // Recache announcements //----------------------------------------- - + require_once( ROOT_PATH.'sources/action_public/announcements.php' ); $announcements = new announcements(); $announcements->ipsclass =& $this->ipsclass; $announcements->announce_recache(); } - + //----------------------------------------- // Stats to Update? //----------------------------------------- - - $stats = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='stats'" ) ); - - $stats = unserialize($this->ipsclass->txt_stripslashes($stats['cs_value'])); - + + $this->ipsclass->init_load_cache( array( 'stats' ) ); + + $stats = $this->ipsclass->cache['stats']; + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, members_display_name', 'from' => 'members', 'where' => "mgroup <> '".$this->ipsclass->vars['auth_group']."'", 'order' => "id DESC", 'limit' => array(0,1) ) ); $this->ipsclass->DB->simple_exec(); - + $r = $this->ipsclass->DB->fetch_row(); - $stats['last_mem_name'] = $r['members_display_name'] ? $r['members_display_name'] : $r['name']; + $stats['last_mem_name'] = $r['members_display_name']; $stats['last_mem_id'] = $r['id']; - + if ( count($stats) > 0 ) { $this->ipsclass->cache['stats'] =& $stats; $this->ipsclass->update_cache( array( 'name' => 'stats', 'array' => 1, 'deletefirst' => 1 ) ); - } - + } + //----------------------------------------- // I say, did we choose to email 'dis member? //----------------------------------------- - + if ($this->ipsclass->input['send_email'] == 1) { //----------------------------------------- // By golly, we did! //----------------------------------------- - + require_once( ROOT_PATH."sources/classes/class_email.php" ); - + $this->email = new emailer( ROOT_PATH ); $this->email->ipsclass =& $this->ipsclass; $this->email->email_init(); - + $msg = trim($_POST['email_contents']); - + $msg = str_replace( "{old_name}", $member['name'], $msg ); $msg = str_replace( "{new_name}", $new_name , $msg ); - + $this->email->message = stripslashes($this->email->clean_message($msg)); - $this->email->subject = "Уведомление пользователю о смене его имени"; + $this->email->subject = "Member Name Change Notification"; $this->email->to = $member['email']; $this->email->send_mail(); } - - $this->ipsclass->admin->save_log("Изменить имя: с '{$member['name']}' на '$new_name'"); - + + $this->ipsclass->admin->save_log("Changed Member Name '{$member['name']}' to '$new_name'"); + if ( USE_MODULES == 1 ) { $this->modules->register_class($this); $this->modules->on_name_change($mid, $new_name ); } - + //----------------------------------------- // Redirect //----------------------------------------- - + $page_query = ""; - - $this->ipsclass->input['name'] = $new_name; - - foreach( array('name','email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','gotcount', 'fromdel') as $bit ) + + $this->ipsclass->input['name'] = urlencode($new_name); + + foreach( array('name','email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','dnamewhere','gotcount', 'fromdel') as $bit ) { $page_query .= '&'.$bit.'='.trim($this->ipsclass->input[ $bit ]); } - - $this->ipsclass->admin->done_screen("Имя пользователя изменено", "Поиск пользователей", "{$this->ipsclass->form_code}".$page_query, "redirect" ); + + $this->ipsclass->admin->done_screen("Member's Name Changed", "Member Search", "{$this->ipsclass->form_code}".$page_query, "redirect" ); } - - - + + + /*-------------------------------------------------------------------------*/ // // Change name complete // /*-------------------------------------------------------------------------*/ - + function member_change_name_start($message="") { - $this->ipsclass->admin->page_title = "Изменение имени пользователя"; - $this->ipsclass->admin->page_detail = "Здесь вы можете изменить имя этому пользователю."; - $this->ipsclass->admin->nav[] = array( '', 'Изменение имени пользователя' ); - + $this->ipsclass->admin->page_title = "Change Member Name"; + $this->ipsclass->admin->page_detail = "You may enter a new name for this member."; + $this->ipsclass->admin->nav[] = array( '', 'Edit Member Name' ); + //----------------------------------------- // check //----------------------------------------- - + if ($this->ipsclass->input['mid'] == "") { - $this->ipsclass->admin->error("Вы должны ввести правильный ID пользователя, вернитесь и попробуйте еще раз"); + $this->ipsclass->admin->error("You must specify a valid member id, please go back and try again"); } - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'members', 'where' => "id=".intval($this->ipsclass->input['mid']) ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $member = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Невозможно найти пользователя с таким ID"); + $this->ipsclass->admin->error("We could not match that ID in the members database"); } - + //----------------------------------------- // Non root admin attempting to edit root admin? //----------------------------------------- - + if ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) { if ( $member['mgroup'] == $this->ipsclass->vars['admin_group'] ) { - $this->ipsclass->admin->error("Вы не можете редактировать главных администраторов"); + $this->ipsclass->admin->error("You are not permitted to edit root administrators"); } } - - $contents = "Уважаемый(ая) {old_name}.\nАдминистратор форума {$this->ipsclass->vars['board_name']} изменил ваше имя пользователя.\n\nВаше новое имя пользователя: {new_name}\n\nПожалуйста, запомните его, при следующем входе в систему вам потребуется ввести именно это имя пользователя.\nФорум: {$this->ipsclass->vars['board_url']}/index.php"; - + + $contents = "{old_name},\nAn administrator has changed your member name on {$this->ipsclass->vars['board_name']}.\n\nYour new name is: {new_name}\n\nPlease remember this as you may need to use this new name when you log in next time.\nBoard Address: {$this->ipsclass->vars['board_url']}/index.php"; + //----------------------------------------- // Redirect //----------------------------------------- - + $page_array = array( 1 => array( 'code' , 'dochangename' ), 2 => array( 'act' , 'mem' ), 3 => array( 'mid' , $this->ipsclass->input['mid'] ), 4 => array( 'section', $this->ipsclass->section_code ), ); - - foreach( array('name','email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','gotcount', 'fromdel') as $bit ) + + foreach( array('name','email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','dnamewhere','gotcount', 'fromdel') as $bit ) { $page_array[] = array( $bit, trim($this->ipsclass->input[ $bit ]) ); } - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( $page_array ); - + //----------------------------------------- // start form //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Изменение имени пользователя" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Change Member Name" ); + if ($message != "") { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Ошибка:" , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Error Message:" , "$message", ) ); } - - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Текущее имя пользователя" , + + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Current Member's Name" , $member['name'], ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Новое имя пользователя" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "New Members Name" , $this->ipsclass->adskin->form_input( "new_name", $this->ipsclass->input['new_name'] ) ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Предупредить пользователя по e-mail?
    (Если что, то Вы можете отредактировать текст сообщения ниже)" , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Email notification to this member?
    (If so, you may edit the email below)" , $this->ipsclass->adskin->form_yes_no( "send_email", 1 ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Содержимое письма
    (Доступные теги: {old_name} = текущее имя пользователя, {new_name} = новое имя пользователя)" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Email contents
    (Tags: {old_name} = current name, {new_name} = new name)" , $this->ipsclass->adskin->form_textarea( "email_contents", $contents ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Изменить имя пользователя"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Change this members name"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); } - + //----------------------------------------- @@ -1888,18 +1898,18 @@ class ad_member // MEMBER RANKS... // //----------------------------------------- - + function titles_recache() { $this->ipsclass->cache['ranks'] = array(); - + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, title, pips, posts', 'from' => 'titles', 'order' => "posts DESC", ) ); - + $this->ipsclass->DB->simple_exec(); - + while ($i = $this->ipsclass->DB->fetch_row()) { $this->ipsclass->cache['ranks'][ $i['id'] ] = array( @@ -1908,306 +1918,306 @@ class ad_member 'POSTS' => $i['posts'], ); } - + $this->ipsclass->update_cache( array( 'name' => 'ranks', 'array' => 1, 'deletefirst' => 1 ) ); } - - - + + + function titles_start() { - $this->ipsclass->admin->page_title = "Управление званиями"; - $this->ipsclass->admin->page_detail = "Эта секция позволяет вам изменять, удалять и добавлять новые звания.
    Если вы хотите, чтобы форум показывал звездочки под именем пользователя, введите их количество.
    Если вы хотите, чтобы форум показывал специальное изображение под именем пользователя, достаточно ввести ссылку с названием изображения.
    Примечание: эти изображения должны находиться в директории «style_images/{img_dir}/folder_team_icons»."; - $this->ipsclass->admin->nav[] = array( '', 'Звания пользователей' ); - + $this->ipsclass->admin->page_title = "Member Ranking Set Up"; + $this->ipsclass->admin->page_detail = "This section allows you to modify, delete or add extra ranks.
    If you wish to display pips below the members name, enter the number of pips. If you wish to use a custom image, simply enter the image name in the pips box. Note, these custom images must reside in the 'style_images/{img_dir}/folder_team_icons' directory of your installation"; + $this->ipsclass->admin->nav[] = array( '', 'Member Rank Set Up' ); + //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( "Название" , "30%" ); - $this->ipsclass->adskin->td_header[] = array( "Требуется сообщений" , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Звездочки" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Изменение" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Удаление" , "20%" ); - + + $this->ipsclass->adskin->td_header[] = array( "Title" , "30%" ); + $this->ipsclass->adskin->td_header[] = array( "Min Posts" , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "Pips" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( " " , "20%" ); + $this->ipsclass->adskin->td_header[] = array( " " , "20%" ); + //----------------------------------------- // Parse macro //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_sets', 'where' => "set_default=1" ) ); $this->ipsclass->DB->simple_exec(); - + $mid = $this->ipsclass->DB->fetch_row(); - + $this->ipsclass->DB->simple_construct( array( 'select' => 'macro_replace', 'from' => 'skin_macro', 'where' => "macro_set=1 AND macro_value='A_STAR'" ) ); $this->ipsclass->DB->simple_exec(); - + $row = $this->ipsclass->DB->fetch_row(); $row['A_STAR'] = str_replace( "<#IMG_DIR#>", $mid['set_image_dir'], $row['macro_replace'] ); $row['A_STAR'] = preg_replace( "#style_images#", $this->ipsclass->vars['board_url'].'/style_images', $row['A_STAR'] ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Звания пользователей" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Member Titles/Ranks" ); + //----------------------------------------- // Lets get on with it... //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'titles', 'order' => "posts" ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $img = ""; - + if ( preg_match( "/^\d+$/", $r['pips'] ) ) { for ($i = 1; $i <= $r['pips']; $i++) { $img .= $row['A_STAR']; - + } } else { $img = ""; } - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "".$r['title']."" , $r['posts'], $img, - "Изменить", - "Удалить", + "Edit", + "Delete", ) ); } - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'do_add_rank' ), 2 => array( 'act' , 'mem' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Добавление звания" ); - - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Звание" , + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Add a Member Rank" ); + + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Rank Title" , $this->ipsclass->adskin->form_input( "title" ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Минимальное количество сообщений для получения звания" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Minimum number of posts needed" , $this->ipsclass->adskin->form_input( "posts" ) ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Количество звездочек
    Или название - изображение должно быть загружено в директорию 'style_images/{img_dir}/folder_team_icons'
    " , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Number of pips
    Or pip image - image must be uploaded into 'style_images/{img_dir}/folder_team_icons'
    " , $this->ipsclass->adskin->form_input( "pips" ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Добавить"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Add this rank"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); } - + //----------------------------------------- - + function titles_add_rank() { //----------------------------------------- // check for input //----------------------------------------- - + foreach( array( 'posts', 'title', 'pips' ) as $field ) { if ($this->ipsclass->input[ $field ] == "") { - $this->ipsclass->admin->error("Вы должностью полностью заполнить форму"); + $this->ipsclass->admin->error("You must complete the form fully"); } } - + //----------------------------------------- // Add it to the DB //----------------------------------------- - + $this->ipsclass->DB->do_insert( 'titles', array( 'posts' => trim($this->ipsclass->input['posts']), 'title' => trim($this->ipsclass->input['title']), 'pips' => trim($this->ipsclass->input['pips']), ) ); - + $this->titles_recache(); - - $this->ipsclass->admin->done_screen("Звание добавлено", "Управление званиями", "{$this->ipsclass->form_code}&code=title", 'redirect' ); - - + + $this->ipsclass->admin->done_screen("Rank Added", "Member Ranking Control", "{$this->ipsclass->form_code}&code=title", 'redirect' ); + + } - + //----------------------------------------- - + function titles_delete_rank() { //----------------------------------------- // check for input //----------------------------------------- - + if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Невозможно найти звание с таким ID"); + $this->ipsclass->admin->error("We could not match that ID"); } - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'titles', 'where' => "id=".intval($this->ipsclass->input['id']) ) ); - + $this->titles_recache(); - - $this->ipsclass->admin->save_log("Удалено звание"); - - $this->ipsclass->admin->done_screen("Звание удалено", "Управление званиями", "{$this->ipsclass->form_code}&code=title", 'redirect' ); - + + $this->ipsclass->admin->save_log("Removed Rank Setting"); + + $this->ipsclass->admin->done_screen("Rank Removed", "Member Ranking Control", "{$this->ipsclass->form_code}&code=title", 'redirect' ); + } - + /*-------------------------------------------------------------------------*/ // Edit rank images / pips /*-------------------------------------------------------------------------*/ - + function titles_edit_rank() { //----------------------------------------- // check for input //----------------------------------------- - + if ( $this->ipsclass->input['id'] == "" ) { - $this->ipsclass->admin->error("Невозможно найти звание с таким ID"); + $this->ipsclass->admin->error("We could not match that ID"); } - + //----------------------------------------- // Maximum number of pips... //----------------------------------------- - + if ( intval( $this->ipsclass->input['pips'] ) == $this->ipsclass->input['pips'] ) { if ( $this->ipsclass->input['pips'] > 100 ) { - $this->ipsclass->admin->error( "Максимальное количество звездочек — 100." ); + $this->ipsclass->admin->error( "The maximum number of pips you can have is 100." ); } } - + //----------------------------------------- // Check pips and images //----------------------------------------- - + foreach( array( 'posts', 'title', 'pips' ) as $field ) { if ( $this->ipsclass->input[ $field ] == "" ) { - $this->ipsclass->admin->error("Вы должностью полностью заполнить форму"); + $this->ipsclass->admin->error( "You must complete the form fully" ); } } - + //----------------------------------------- // Add it to the DB //----------------------------------------- - + $this->ipsclass->DB->do_update( 'titles', array ( 'posts' => trim($this->ipsclass->input['posts']), 'title' => trim($this->ipsclass->input['title']), 'pips' => trim($this->ipsclass->input['pips']), ) , "id=" . intval( $this->ipsclass->input['id'] ) ); - + $this->titles_recache(); - - $this->ipsclass->admin->save_log("Изменено звание"); - - $this->ipsclass->admin->done_screen("Звание изменено", "Управление званиями", "{$this->ipsclass->form_code}&code=title", 'redirect' ); + + $this->ipsclass->admin->save_log("Edited Rank Setting"); + + $this->ipsclass->admin->done_screen("Rank Edited", "Member Ranking Control", "{$this->ipsclass->form_code}&code=title", 'redirect' ); } - + /*-------------------------------------------------------------------------*/ // Edit rank titles /*-------------------------------------------------------------------------*/ - + function titles_rank_setup($mode='edit') { - $this->ipsclass->admin->page_title = "Добавление/изменение звания"; - $this->ipsclass->admin->page_detail = "Если вы хотите, чтобы форум показывал звездочки под именем пользователя, введите их количество.
    Если вы хотите, чтобы форум показывал специальное изображение под именем пользователя, достаточно ввести ссылку с названием изображения.
    Примечание: эти изображения должны находиться в директории 'style_images/{img_dir}/folder_team_icons'."; - $this->ipsclass->admin->nav[] = array( '', 'Добавление/изменение звания' ); - + $this->ipsclass->admin->page_title = "Member Rank Set Up"; + $this->ipsclass->admin->page_detail = "If you wish to display pips below the members name, enter the number of pips. If you wish to use a custom image, simply enter the image name in the pips box. Note, these custom images must reside in the 'style_images/{img_dir}/folder_team_icons' directory of your installation"; + $this->ipsclass->admin->nav[] = array( '', 'Member Rank Set Up' ); + if ( $mode == 'edit' ) { $form_code = 'do_rank_edit'; - + if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Невозможно найти звание с таким ID"); + $this->ipsclass->admin->error("No rank ID was set, please try again"); } - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'titles', 'where' => "id=".intval($this->ipsclass->input['id']) ) ); $this->ipsclass->DB->simple_exec(); - + $rank = $this->ipsclass->DB->fetch_row(); - - $button = "Изменить"; + + $button = "Complete Edit"; } else { $form_code = 'do_add_rank'; $rank = array( 'posts' => "", 'title' => "", 'pips' => ""); - $button = "Добавить"; + $button = "Add this rank"; } - + //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , $form_code ), 2 => array( 'act' , 'mem' ), 3 => array( 'id' , $rank['id'] ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Звания пользователей" ); - - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Звание" , + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Member Ranks" ); + + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Rank Title" , $this->ipsclass->adskin->form_input( "title", $rank['title'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Минимальное количество сообщений для получения звания" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Minimum number of posts needed" , $this->ipsclass->adskin->form_input( "posts", $rank['posts'] ) ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Количество звездочек (максимум: 100)
    (Или изображение звания)" , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Number of pips (Max: 100)
    (Or pip image)" , $this->ipsclass->adskin->form_input( "pips", $rank['pips'] ) ) ); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_form($button); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); } - + //----------------------------------------- - + function member_prune_confirm($ids=array(), $query) { - $this->ipsclass->admin->nav[] = array( '', 'Удаление' ); - + $this->ipsclass->admin->nav[] = array( '', 'Prune Member(s)' ); + //----------------------------------------- // Got members? //----------------------------------------- - + if ( count($ids) < 101) { foreach( $ids as $n ) @@ -2215,78 +2225,79 @@ class ad_member $member_arr[] = "{$n[1]}"; } } - - $this->ipsclass->admin->page_title = "Удаление пользователей"; - - $this->ipsclass->admin->page_detail = "Пожалуйста, подтвердите ваше действие."; - + + $this->ipsclass->admin->page_title = "Member Pruning"; + + $this->ipsclass->admin->page_detail = "Please confirm your action."; + //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doprune' ), 2 => array( 'act' , 'mem' ), 3 => array( 'query' , str_replace( "'", ''', urlencode($query) ) ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Подтверждение удаления" ); - - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Количество удаляемых пользователей" , + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Member Prune Confirmation" ); + + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Number of members to prune" , count($ids) ) ); - + if ( count($member_arr) > 0 ) { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Имена пользователей" , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Members to prune" , implode( '
    ', $member_arr ) ) ); } - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Удалить этих пользователей"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Complete Member Pruning"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); - + } - - + + //----------------------------------------- // // COMPLETE PRUNE // //----------------------------------------- - + function member_doprune() { //----------------------------------------- // Make sure we have *something* //----------------------------------------- - + $query = trim(urldecode($this->ipsclass->txt_stripslashes($_POST['query']))); - + $query = str_replace( "<" , "<", $query ); $query = str_replace( ">" , ">", $query ); $query = str_replace( ''', "'", $query ); - + if ($query == "") { - $this->ipsclass->admin->error("Ошибка удаления"); + $this->ipsclass->admin->error("Prune query error, no query to use"); } - + //----------------------------------------- // Get the member ids... //----------------------------------------- - - $ids = array(); - + + $ids = array(); + $names = array(); + $this->ipsclass->DB->cache_add_query( 'member_search_form_two', array( 'rq' => $query ) ); $this->ipsclass->DB->cache_exec_query(); @@ -2302,70 +2313,74 @@ class ad_member { $ids[] = $i['id']; } + + $names[] = $i['members_display_name']; } } else { - $this->ipsclass->admin->error("Невозможно найти пользователей для удаления"); + $this->ipsclass->admin->error("Could not find any members that matched the prune criteria"); } - + $this->member_delete_do($ids); - - $this->ipsclass->admin->done_screen("Пользователи удалены", "Управление пользователями", "{$this->ipsclass->form_code}" ); - + #@here + $this->ipsclass->admin->save_log("Deleted Member(s) ( ".implode(",",$names)." )"); + + $this->ipsclass->admin->done_screen("Member Account(s) Deleted", "Member Control", "{$this->ipsclass->form_code}" ); + } - - - + + + /*-------------------------------------------------------------------------*/ // // DELETE MEMBER(S) // /*-------------------------------------------------------------------------*/ - + function member_delete_do($id) { //----------------------------------------- // INIT //----------------------------------------- - - $tmp_mids = array(); + + $tmp_mids = array(); $emails = array(); - + //----------------------------------------- // Auth check... //----------------------------------------- - + $this->ipsclass->admin->security_auth_check( $_GET['_admin_auth_key'] ); - + //----------------------------------------- // Sort out thingie //----------------------------------------- - + if ( is_array( $id ) ) { $id = $this->ipsclass->clean_int_array( $id ); - + $mids = ' IN ('.implode(",",$id).')'; } else { $mids = ' = '.intval($id); } - + //----------------------------------------- // Get accounts and check IDS //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, mgroup,email', 'from' => 'members', 'where' => 'id'.$mids ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { //----------------------------------------- // Non root admin attempting to edit root admin? //----------------------------------------- - + if ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) { if ( $r['mgroup'] == $this->ipsclass->vars['admin_group'] ) @@ -2373,118 +2388,118 @@ class ad_member continue; } } - + $tmp_mids[] = $r['id']; $emails[] = $r['email']; } - + if ( ! count( $tmp_mids ) ) { - $this->ipsclass->admin->error("Нет пользователей для удаления"); + $this->ipsclass->admin->error("No members to delete"); } - + $mids = ' IN ('.implode(",",$tmp_mids).')'; - + //----------------------------------------- // Get avatars / photo //----------------------------------------- - + $delete_files = array(); - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'member_extra', 'where' => 'id'.$mids ) ); $this->ipsclass->DB->simple_exec(); - + while( $r = $this->ipsclass->DB->fetch_row() ) { if ( $r['photo_type'] == 'upload' and $r['photo_location'] ) { $delete_files[] = $r['photo_location']; } - + if ( $r['avatar_type'] == 'upload' and $r['avatar_location'] ) { $delete_files[] = $r['avatar_location']; } } - + //----------------------------------------- // Convert their posts and topics // into guest postings.. //----------------------------------------- - + $this->ipsclass->DB->do_update( 'posts' , array( 'author_id' => 0 ), "author_id".$mids ); $this->ipsclass->DB->do_update( 'topics', array( 'starter_id' => 0 ), "starter_id".$mids ); - + //----------------------------------------- // Clean up profile/friends/comments/ratings... //----------------------------------------- - + $this->ipsclass->DB->do_update( 'profile_comments', array( 'comment_by_member_id' => 0 ), "comment_by_member_id".$mids ); $this->ipsclass->DB->do_update( 'profile_ratings', array( 'rating_by_member_id' => 0 ), "rating_by_member_id".$mids ); - + $this->ipsclass->DB->do_delete( 'profile_comments', "comment_for_member_id".$mids ); $this->ipsclass->DB->do_delete( 'profile_ratings', "rating_for_member_id".$mids ); - + $this->ipsclass->DB->do_delete( 'profile_portal', "pp_member_id".$mids ); $this->ipsclass->DB->do_delete( 'profile_friends', "friends_member_id".$mids ); $this->ipsclass->DB->do_delete( 'profile_friends', "friends_friend_id".$mids ); - + //----------------------------------------- // Delete member... //----------------------------------------- - + $this->ipsclass->DB->do_delete( 'pfields_content' , "member_id".$mids ); $this->ipsclass->DB->do_delete( 'member_extra' , "id".$mids ); - $this->ipsclass->DB->do_delete( 'members_converge', "converge_email IN('". implode( "'", $emails ) ."')" ); + $this->ipsclass->DB->do_delete( 'members_converge', "converge_email IN('". implode( "','", $emails ) ."')" ); //----------------------------------------- // Delete ACP Restrictions... //----------------------------------------- $this->ipsclass->DB->do_delete( 'admin_permission_rows', 'row_member_id'.$mids ); - + //----------------------------------------- // Delete member messages... //----------------------------------------- - + $this->ipsclass->DB->build_query( array( 'select' => 'mt_msg_id', 'from' => 'message_topics', 'where' => "mt_owner_id".$mids ) ); $this->ipsclass->DB->exec_query(); - + $messages = array(); while( $row = $this->ipsclass->DB->fetch_row() ) { $messages[] = $row['mt_msg_id']; } - + if( count($messages) > 0 ) { $msgids = " IN(".implode( ",", $messages ).")"; $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'message_text', 'where' => "msg_id".$msgids ) ); } - + $this->ipsclass->DB->do_delete( 'message_topics', "mt_owner_id".$mids ); $this->ipsclass->DB->do_delete( 'contacts' , "member_id".$mids." or contact_id".$mids ); - + //----------------------------------------- // Delete member subscriptions. //----------------------------------------- - + $this->ipsclass->DB->do_delete( 'tracker' , "member_id".$mids ); $this->ipsclass->DB->do_delete( 'forum_tracker', "member_id".$mids ); $this->ipsclass->DB->do_delete( 'warn_logs' , "wlog_mid" .$mids ); - + //----------------------------------------- // Delete from validating.. //----------------------------------------- - + $this->ipsclass->DB->do_delete( 'validating', "member_id".$mids ); $this->ipsclass->DB->do_delete( 'members' , "id".$mids ); - + //----------------------------------------- // Delete avatars / photos //----------------------------------------- - + if ( count($delete_files) ) { foreach( $delete_files as $file ) @@ -2492,67 +2507,61 @@ class ad_member @unlink( $this->ipsclass->vars['upload_dir']."/".$file ); } } - + //----------------------------------------- // Get current stats... //----------------------------------------- + + $this->ipsclass->init_load_cache( array( 'stats' ) ); + + $r = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'count(id) as members', 'from' => 'members', 'where' => "mgroup <> '".$this->ipsclass->vars['auth_group']."'" ) ); - $stats = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='stats'" ) ); - - $stats = unserialize($this->ipsclass->txt_stripslashes($stats['cs_value'])); - - //----------------------------------------- - // Rebuild stats - //----------------------------------------- - - $r = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as members', 'from' => 'members', 'where' => "mgroup <> ".$this->ipsclass->vars['auth_group'] ) ); - $stats['mem_count'] = intval( $r['members'] ); - + $this->ipsclass->cache['stats']['mem_count'] = intval($r['members']); + $r = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'id, members_display_name', 'from' => 'members', 'where' => "mgroup <> ".$this->ipsclass->vars['auth_group'], 'order' => 'id DESC', 'limit' => array( 0, 1 ) ) ); - - $stats['last_mem_name'] = $r['members_display_name']; - $stats['last_mem_id'] = $r['id']; - - if ( count($stats) > 0 ) + + $this->ipsclass->cache['stats']['last_mem_name'] = $r['members_display_name']; + $this->ipsclass->cache['stats']['last_mem_id'] = $r['id']; + + if ( count($this->ipsclass->cache['stats']) > 0 ) { - $this->ipsclass->cache['stats'] =& $stats; $this->ipsclass->update_cache( array( 'name' => 'stats', 'array' => 1, 'deletefirst' => 1 ) ); } - + if ( USE_MODULES == 1 ) { $this->modules->register_class($this); $this->modules->on_delete($id); } } - + /*-------------------------------------------------------------------------*/ // // Delete Members // /*-------------------------------------------------------------------------*/ - + function member_delete() { //----------------------------------------- // Check input //----------------------------------------- - + if ( ! $this->ipsclass->input['mid'] ) { - $this->ipsclass->main_msg = "Пользователь не найден"; + $this->ipsclass->main_msg = "No member found"; $this->search_form(); } - + //----------------------------------------- // Single or more? //----------------------------------------- - + if ( strstr( $this->ipsclass->input['mid'], ',' ) ) { $ids = explode( ',', $this->ipsclass->input['mid'] ); @@ -2561,24 +2570,24 @@ class ad_member { $ids = array( $this->ipsclass->input['mid'] ); } - + $ids = $this->ipsclass->clean_int_array( $ids ); - + //----------------------------------------- // Get accounts //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, mgroup', 'from' => 'members', 'where' => 'id IN ('.implode(",",$ids).')' ) ); $this->ipsclass->DB->simple_exec(); - + $names = array(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { //----------------------------------------- // Non root admin attempting to edit root admin? //----------------------------------------- - + if ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) { if ( $r['mgroup'] == $this->ipsclass->vars['admin_group'] ) @@ -2586,81 +2595,81 @@ class ad_member continue; } } - + $names[] = $r['name']; } - + //----------------------------------------- // Check //----------------------------------------- - + if ( ! count( $names ) ) { - $this->ipsclass->main_msg = "Пользователь не найден"; + $this->ipsclass->main_msg = "No member(s) found"; $this->search_form(); } - + //----------------------------------------- // Delete //----------------------------------------- - + $this->member_delete_do( $ids ); - + //----------------------------------------- // Redirect //----------------------------------------- - + $page_query = ""; - - foreach( array('name','email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','gotcount', 'fromdel') as $bit ) + + foreach( array('name','email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','dnamewhere','gotcount', 'fromdel') as $bit ) { $page_query .= '&'.$bit.'='.trim($this->ipsclass->input[ $bit ]); } - - $this->ipsclass->admin->save_log("Удален пользователь ( ".implode(",",$names)." )"); - - $this->ipsclass->admin->done_screen("Пользователь удален", "Поиск пользователей", "{$this->ipsclass->form_code}".$page_query, "redirect" ); - + + $this->ipsclass->admin->save_log("Deleted Member(s) ( ".implode(",",$names)." )"); + + $this->ipsclass->admin->done_screen("Member(s) Deleted", "Member Search", "{$this->ipsclass->form_code}".$page_query, "redirect" ); + } - - + + //----------------------------------------- // // ADD MEMBER FORM // //----------------------------------------- - + function member_add_form() { //----------------------------------------- // Page details //----------------------------------------- - - $this->ipsclass->admin->page_title = "Регистрация пользователя"; - $this->ipsclass->admin->page_detail = "Вы можете зарегистрировать пользователя, пользуясь формой ниже."; - $this->ipsclass->admin->nav[] = array( '', 'Создание пользователя' ); - + + $this->ipsclass->admin->page_title = "Pre Register a member"; + $this->ipsclass->admin->page_detail = "You may pre-register members using this form."; + $this->ipsclass->admin->nav[] = array( '', 'Add Member' ); + //----------------------------------------- // Got admin restrictions? //----------------------------------------- - + if ( $this->ipsclass->member['row_perm_cache'] ) { - $this->ipsclass->html .= "
    Помните: Вы имеете ограниченный доступ в АЦ.
    Любой пользователь, которого вы - создадите с доступом в админцентр, унаследует ваши ограничения.

    "; + $this->ipsclass->html .= "
    Note: You have ACP Permission Restrictions.
    Any member you create with a group that + that has access to the ACP will inherit your permission restrictions automatically.

    "; } - + //----------------------------------------- // Groups //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => 'g_id, g_title', 'from' => 'groups', 'order' => "g_title" ) ); $this->ipsclass->DB->simple_exec(); - + //----------------------------------------- // If non-root: Remove root group //----------------------------------------- - + while ( $r = $this->ipsclass->DB->fetch_row() ) { if ( $this->ipsclass->vars['admin_group'] == $r['g_id'] ) @@ -2670,39 +2679,39 @@ class ad_member continue; } } - + $mem_group[] = array( $r['g_id'] , $r['g_title'] ); } - + //----------------------------------------- // Start table //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - + //----------------------------------------- // Custom profile fields stuff //----------------------------------------- - + $required_output = ""; $optional_output = ""; $custom_output = ""; - + require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); $fields = new custom_fields( $this->ipsclass->DB ); - + $this->ipsclass->init_load_cache( array( 'profilefields' ) ); - + $fields->cache_data = $this->ipsclass->cache['profilefields']; - + $fields->init_data(); $fields->parse_to_register(); - + if ( count( $fields->out_fields ) ) { - $custom_out .= $this->ipsclass->adskin->add_td_basic( "Дополнительные поля в профиле", "left", "tablesubheader", 2 ); - + $custom_out = $this->ipsclass->adskin->add_td_basic( "Custom Profile Fields", "left", "tablesubheader", 2 ); + foreach( $fields->out_fields as $id => $data ) { if ( $fields->cache_data[ $id ]['pf_type'] == 'drop' ) @@ -2717,222 +2726,196 @@ class ad_member { $form_element = $this->ipsclass->adskin->form_input( 'field_'.$id, $data ); } - + $custom_out .= $this->ipsclass->adskin->add_td_row( array( "{$fields->field_names[ $id ]}
    {$fields->field_desc[ $id ]}
    " , $form_element ) ); } } - + //----------------------------------------- // Start form //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doadd' ), 2 => array( 'act' , 'mem' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Создание пользователя" ); - - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Имя пользователя" , + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Member Registration" ); + + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Member Name" , $this->ipsclass->adskin->form_input( "name", isset($_POST['name']) ? $this->ipsclass->txt_stripslashes($_POST['name']) : '' ) ) ); - + if( $this->ipsclass->vars['auth_allow_dnames'] ) { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Отображаемое имя" , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Member Display Name" , $this->ipsclass->adskin->form_input( "members_display_name", isset($_POST['members_display_name']) ? $this->ipsclass->txt_stripslashes($_POST['members_display_name']) : '' ) ) ); } - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Пароль" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Password" , $this->ipsclass->adskin->form_input( "password", isset($_POST['password']) ? $_POST['password'] : '', 'password' ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Адрес e-mail" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Email Address" , $this->ipsclass->adskin->form_input( "email", isset($_POST['email']) ? $_POST['email'] : '' ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Группа" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Member Group" , $this->ipsclass->adskin->form_dropdown( "mgroup", $mem_group, isset($_POST['mgroup']) ? $_POST['mgroup'] : $this->ipsclass->vars['member_group'] ) ) ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "COPPA User?" , + $this->ipsclass->adskin->form_yes_no( "coppa", isset($_POST['coppa']) ? $_POST['coppa'] : '' ) . + '   ' . $this->ipsclass->adskin->form_checkbox( "sendemail", isset($_POST['sendemail']) ? $_POST['sendemail'] : 1 ) . "Send Confirmation Email?" + ) ); + if ($custom_out != "") { $this->ipsclass->html .= $custom_out; } - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Создать"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Register Member"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); } - + //----------------------------------------- // // Add member // //----------------------------------------- - + function member_do_add() { //----------------------------------------- // INIT //----------------------------------------- - + $in_username = str_replace( '|', '|' , trim($this->ipsclass->input['name']) ); $in_username = trim( preg_replace( "/\s{2,}/", " ", $in_username ) ); $in_password = trim($this->ipsclass->input['password']); $in_email = trim(strtolower($this->ipsclass->input['email'])); - + $members_display_name = trim($this->ipsclass->input['members_display_name'] ); - + //----------------------------------------- // Check form //----------------------------------------- - + foreach( array('name', 'password', 'email', 'mgroup') as $field ) { if ( ! $_POST[ $field ] ) { - $this->ipsclass->admin->error("Вы должны заполнить форму полностью!"); + $this->ipsclass->admin->error("You must complete the form fully!"); } } - + //----------------------------------------- // Check //----------------------------------------- - + if ( $this->ipsclass->vars['admin_group'] == $this->ipsclass->input['mgroup'] ) { if ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group']) { - $this->ipsclass->admin->error("Только главные администраторы могут создать пользователя с такой группой"); + $this->ipsclass->admin->error("Non root admins cannot create a member in the root admin group"); } } - + if( preg_match( "#[\;\#\n\r\*\'\"<>&\%\!\(\)\{\}\[\]\?\\/\s]#", $in_email) ) { - $this->ipsclass->main_msg = "E-mail адрес не может содержать следующие символы: [ ] ; # & ! * ' " < > % ( ) { } ? \"; + $this->ipsclass->main_msg = "Email address cannot contain these characters: [ ] ; # & ! * ' " < > % ( ) { } ? \"; $this->member_add_form(); return; } else { $in_email = $this->ipsclass->clean_email($in_email); - + if( !$in_email OR strlen($in_email) < 6 ) { - $this->ipsclass->main_msg = "Вы ввели некорректный e-mail адрес."; + $this->ipsclass->main_msg = "An invalid email address was entered. Please choose another one."; $this->member_add_form(); return; } } - + if ( $this->ipsclass->vars['strip_space_chr'] ) { // use hexdec to convert between '0xAD' and chr $in_username = str_replace( chr(160), ' ', $in_username ); $in_username = str_replace( chr(173), ' ', $in_username ); + $in_username = str_replace( chr(240), ' ', $in_username ); $members_display_name = str_replace( chr(160), ' ', $members_display_name ); $members_display_name = str_replace( chr(173), ' ', $members_display_name ); - - if ( $this->ipsclass->vars['gb_char_set'] == 'iso-8859-1' ) { - $in_username = str_replace( chr(240), ' ', $in_username ); - $members_display_name = str_replace( chr(240), ' ', $members_display_name ); - } + $members_display_name = str_replace( chr(240), ' ', $members_display_name ); } - + if ( preg_match( "#[\[\];,\|]#", str_replace(''', "'", str_replace('&', '&', $members_display_name) ) ) ) { - $this->ipsclass->main_msg = "Отображаемое имя пользователя не может состоять из следующих символов: [ ] ; , |"; + $this->ipsclass->main_msg = "Display name cannot contain these characters: [ ] ; , |"; $this->member_add_form(); return; - } - - if( $this->ipsclass->vars['username_characters'] ) + } + + /*if( $this->ipsclass->vars['username_characters'] ) { $check_against = preg_quote( $this->ipsclass->vars['username_characters'], "/" ); - + if( !preg_match( "/^[".$check_against."]+$/i", $_POST['name'] ) && $this->ipsclass->vars['ipbli_usertype'] == 'username' ) { - $this->ipsclass->main_msg = 'Имя пользователя может содержать только следующие символы:' . ' ' . $this->ipsclass->vars['username_characters']; + $this->ipsclass->main_msg = 'Usernames can only contain these characters:' . ' ' . $this->ipsclass->vars['username_characters']; $this->member_add_form(); return; } - + if( !preg_match( "/^[".$check_against."]+$/i", $_POST['members_display_name'] ) && $this->ipsclass->vars['auth_allow_dnames'] ) { - $this->ipsclass->main_msg = 'Отображаемое имя может содержать только следующие символы:' . ' ' . $this->ipsclass->vars['username_characters']; + $this->ipsclass->main_msg = 'Display names can only contain these characters:' . ' ' . $this->ipsclass->vars['username_characters']; $this->member_add_form(); return; } - } - - //----------------------------------------- - // Grab converge... - //----------------------------------------- - - if ( $this->ipsclass->vars['ipbli_key'] == 'converge' ) - { - $converge = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', - 'from' => 'converge_local', - 'where' => 'converge_active=1' ) ); - - //----------------------------------------- - // Grab API class... - //----------------------------------------- - - if ( ! is_object( $this->api_server ) ) - { - require_once( KERNEL_PATH . 'class_api_server.php' ); - $this->api_server = new class_api_server(); - } - - $request = array( 'auth_key' => $converge['converge_api_code'], - 'product_id' => $converge['converge_product_id'], - 'email_address' => $in_email, - ); - - $url = $converge['converge_url'] . '/converge_master/converge_server.php'; - - //----------------------------------------- - // Send request - //----------------------------------------- - - $this->api_server->api_send_request( $url, 'convergeCheckEmail', $request ); - - //----------------------------------------- - // Handle errors... - //----------------------------------------- - - if ( count( $this->api_server->errors ) OR $this->api_server->params['response'] != 'EMAIL_NOT_IN_USE' ) - { - $this->ipsclass->main_msg = "Введеный e-mail адрес уже используется."; - $this->member_add_form(); - return; - } - } - + }*/ + + //----------------------------------------- + // Load handler... + //----------------------------------------- + + require_once( ROOT_PATH.'sources/handlers/han_login.php' ); + $this->han_login = new han_login(); + $this->han_login->ipsclass =& $this->ipsclass; + $this->han_login->init(); + $this->han_login->email_exists_check( $email_one ); + + if( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'EMAIL_NOT_IN_USE' ) + { + $this->ipsclass->main_msg = "The selected email address is already in use."; + $this->member_add_form(); + return; + } + //----------------------------------------- // Do we already have such a member? //----------------------------------------- - + $this->ipsclass->DB->cache_add_query( 'login_getmember', array( 'username' => strtolower($this->ipsclass->input['name']) ) ); $this->ipsclass->DB->cache_exec_query(); - + if ( $this->ipsclass->DB->get_num_rows() ) { - $this->ipsclass->main_msg = "Уже есть пользователь с таким именем, введите другое имя пользователя"; + $this->ipsclass->main_msg = "We already have a member by that name, please select another"; $this->member_add_form(); return; } - - if( $members_display_name ) + + if ( $members_display_name ) { if ( $this->ipsclass->vars['auth_dnames_nologinname'] ) { @@ -2945,7 +2928,7 @@ class ad_member if ( $this->ipsclass->DB->get_num_rows() ) { - $this->ipsclass->main_msg = "Мы уже имеем пользователя, который использует это имя, как отображаемое имя, пожалуйста выберите другое"; + $this->ipsclass->main_msg = "We already have a member using this user name as their display name, please select another"; $this->member_add_form(); return; } @@ -2956,32 +2939,32 @@ class ad_member { $this->ipsclass->DB->cache_add_query( 'general_get_by_display_name', array( 'members_l_display_name' => strtolower($members_display_name) ) ); $this->ipsclass->DB->cache_exec_query(); - + $name_check = $this->ipsclass->DB->fetch_row(); - + if ( $name_check['id'] ) { - $this->ipsclass->main_msg = "Мы уже имеем пользователя, который использует это имя, как отображаемое имя, пожалуйста выберите другое"; - $this->member_add_form(); - return; + $this->ipsclass->main_msg = "We already have a member using this name as their display name, please select another"; + $this->member_add_form(); + return; } - + //----------------------------------------- // DNAME: Check for existing LOG IN name. //----------------------------------------- - + if ( $this->ipsclass->vars['auth_dnames_nologinname'] ) { $this->ipsclass->DB->build_query( array( 'select' => "members_display_name, id", 'from' => 'members', 'where' => "members_l_username='".strtolower($members_display_name)."'", 'limit' => array( 0,1 ) ) ); - + $this->ipsclass->DB->exec_query(); - + if ( $this->ipsclass->DB->get_num_rows() ) { - $this->ipsclass->main_msg = "В базе данных уже есть пользователь, использующий это имя как отображаемое."; + $this->ipsclass->main_msg = "We already have a member using this name as their display name, please select another"; $this->member_add_form(); return; } @@ -2991,26 +2974,26 @@ class ad_member //----------------------------------------- // Is this email addy taken? CONVERGE THIS?? //----------------------------------------- - + if ( $this->ipsclass->txt_mb_strlen( $in_username ) > 32 ) { - $this->ipsclass->main_msg = "Имя пользователя не может быть больше 32 символов."; + $this->ipsclass->main_msg = "The username cannot be longer than 32 characters!"; $this->member_add_form(); return; - } - + } + $this->ipsclass->DB->simple_construct( array( 'select' => 'id', 'from' => 'members', 'where' => "email='".$in_email."'" ) ); $this->ipsclass->DB->simple_exec(); - + $email_check = $this->ipsclass->DB->fetch_row(); - + if ($email_check['id']) { - $this->ipsclass->main_msg = "Уже есть пользователь с таким e-mail адресом, введите другой e-mail"; + $this->ipsclass->main_msg = "We already have a member with that email address, please choose another email address"; $this->member_add_form(); return; } - + $member = array( 'name' => $in_username, 'members_l_username' => strtolower( $in_username ), @@ -3024,6 +3007,7 @@ class ad_member 'ip_address' => $this->ipsclass->ip_address, 'time_offset' => $this->ipsclass->vars['time_offset'], 'view_sigs' => 1, + 'coppa_user' => intval($this->ipsclass->input['coppa']), 'email_pm' => 1, 'view_img' => 1, 'view_avs' => 1, @@ -3031,116 +3015,116 @@ class ad_member 'view_pop' => 1, 'msg_total' => 0, 'new_msg' => 0, - 'coppa_user' => 0, 'members_editor_choice' => $this->ipsclass->vars['ips_default_editor'], 'language' => $this->ipsclass->vars['default_language'], ); - + $salt = $this->ipsclass->converge->generate_password_salt(5); $passhash = $this->ipsclass->converge->generate_compiled_passhash( $salt, md5($in_password) ); - + $converge_array = array( 'converge_email' => $in_email, 'converge_joined' => time(), 'converge_pass_hash' => $passhash, 'converge_pass_salt' => str_replace( '\\', "\\\\", $salt ) ); + + //----------------------------------------- + // Load handler... + //----------------------------------------- + + require_once( ROOT_PATH.'sources/handlers/han_login.php' ); + $this->han_login = new han_login(); + $this->han_login->ipsclass =& $this->ipsclass; + $this->han_login->init(); //----------------------------------------- // Add Converge: Member //----------------------------------------- - if ( $this->ipsclass->vars['ipbli_key'] == 'converge' ) + $this->han_login->create_account( array( 'email' => $in_email, + 'joined' => $member['joined'], + 'password' => $in_password, + 'ip_address' => $member['ip_address'] + ) ); + + if( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' ) { - $request = array( 'auth_key' => $converge['converge_api_code'], - 'product_id' => $converge['converge_product_id'], - 'email_address' => $in_email, - 'md5_once_password' => md5( $in_password ), - 'ip_address' => $member['ip_address'], - 'unix_join_date' => $member['joined'] - ); - - $url = $converge['converge_url'] . '/converge_master/converge_server.php'; - - //----------------------------------------- - // Send request - //----------------------------------------- - - $this->api_server->api_send_request( $url, 'convergeAddMember', $request ); - - //----------------------------------------- - // Handle errors... - //----------------------------------------- - - if ( count( $this->api_server->errors ) OR $this->api_server->params['response'] != 'SUCCESS' ) - { - $this->ipsclass->main_msg = "Пользователь не добавлен.
    " . implode( "
    ", $this->api_server->errors ); - $this->member_add_form(); - return; - } + $this->ipsclass->main_msg = "The member could not be added ({$this->han_login->return_code}).
    " . $this->han_login->return_details; + $this->member_add_form(); + return; } - + //----------------------------------------- // Insert: CONVERGE //----------------------------------------- - + $this->ipsclass->DB->do_insert( 'members_converge', $converge_array ); - + //----------------------------------------- // Get converges auto_increment user_id //----------------------------------------- - + $member_id = $this->ipsclass->DB->get_insert_id(); $member['id'] = $member_id; - + //----------------------------------------- // Insert: MEMBERS //----------------------------------------- - - $this->ipsclass->DB->force_data_type = array( 'name' => 'string' ); - + + $this->ipsclass->DB->force_data_type = array( 'name' => 'string', 'members_l_username' => 'string', 'members_display_name' => 'string', 'members_l_display_name' => 'string' ); + $this->ipsclass->DB->do_insert( 'members', $member ); - + //----------------------------------------- // Insert: MEMBER EXTRA //----------------------------------------- - + + $this->ipsclass->load_language( 'lang_global' ); + $this->ipsclass->DB->do_insert( 'member_extra', array( 'id' => $member_id, - 'vdirs' => 'in:Входящие|sent:Отправленные', + 'vdirs' => "in:{$this->ipsclass->lang['account_inbox']}|sent:{$this->ipsclass->lang['account_sent']}", 'interests' => '', 'signature' => '' ) ); - + //----------------------------------------- // Insert into the custom profile fields DB //----------------------------------------- - + require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); $fields = new custom_fields( $this->ipsclass->DB ); - + $fields->member_id = $this->ipsclass->member['id']; $this->ipsclass->init_load_cache( array( 'profilefields' ) ); - + $fields->cache_data = $this->ipsclass->cache['profilefields']; $fields->admin = intval($this->ipsclass->member['g_access_cp']); $fields->supmod = intval($this->ipsclass->member['g_is_supmod']); - + $fields->init_data(); $fields->parse_to_save(1); - + //----------------------------------------- // Custom profile field stuff //----------------------------------------- - + + $this->ipsclass->DB->force_data_type = array(); + + foreach( $fields->out_fields as $_field => $_data ) + { + $this->ipsclass->DB->force_data_type[ $_field ] = 'string'; + } + $fields->out_fields['member_id'] = $member['id']; - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'pfields_content', 'where' => 'member_id='.$member['id'] ) ); - + $this->ipsclass->DB->do_insert( 'pfields_content', $fields->out_fields ); - + //----------------------------------------- // Restriction permissions stuff //----------------------------------------- - + if ( $this->ipsclass->member['row_perm_cache'] ) { if ( $this->ipsclass->cache['group_cache'][ intval($this->ipsclass->input['mgroup']) ]['g_access_cp'] ) @@ -3148,223 +3132,248 @@ class ad_member //----------------------------------------- // Copy restrictions... //----------------------------------------- - + $this->ipsclass->DB->do_insert( 'admin_permission_rows', array( 'row_member_id' => $member['id'], 'row_perm_cache' => $this->ipsclass->member['row_perm_cache'], 'row_updated' => time() ) ); } } - + + if( $this->ipsclass->input['sendemail'] ) + { + require ROOT_PATH."sources/classes/class_email.php"; + + $email = new emailer( ROOT_PATH ); + $email->ipsclass =& $this->ipsclass; + $email->email_init(); + + $email->get_template("account_created"); + + $email->build_message( array( + 'NAME' => $member['name'], + 'EMAIL' => $member['email'], + 'PASSWORD' => $in_password + ) + ); + + $email->to = $member['email']; + + $email->send_mail(); + } + //----------------------------------------- // Stats //----------------------------------------- + + $this->ipsclass->init_load_cache( array( 'stats' ) ); + + $this->ipsclass->cache['stats']['last_mem_name'] = $members_display_name ? $members_display_name : $in_username; + $this->ipsclass->cache['stats']['last_mem_id'] = $member['id']; + + $r = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'count(id) as members', 'from' => 'members', 'where' => "mgroup <> '".$this->ipsclass->vars['auth_group']."'" ) ); - $stats = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='stats'" ) ); - - $stats = unserialize($this->ipsclass->txt_stripslashes($stats['cs_value'])); - - $stats['last_mem_name'] = $in_username; - $stats['last_mem_id'] = $member['id']; - - $this->ipsclass->DB->simple_construct( array( 'select' => 'count(id) as members', 'from' => 'members', 'where' => "mgroup <> '".$this->ipsclass->vars['auth_group']."'" ) ); - $this->ipsclass->DB->simple_exec(); - - $r = $this->ipsclass->DB->fetch_row(); - $stats['mem_count'] = intval($r['members']); - - if ( count($stats) > 0 ) + $this->ipsclass->cache['stats']['mem_count'] = intval($r['members']); + + if ( count($this->ipsclass->cache['stats']) > 0 ) { - $this->ipsclass->cache['stats'] = $stats; $this->ipsclass->update_cache( array( 'name' => 'stats', 'array' => 1, 'deletefirst' => 1 ) ); } - - - - - + + //----------------------------------------- + // SYNC modules + //----------------------------------------- + + if ( USE_MODULES == 1 ) + { + $this->modules->register_class($this); + + $this->modules->on_create_account( $member ); + } + + //----------------------------------------- // Log and bog? //----------------------------------------- - - $this->ipsclass->admin->save_log("Добавлен новый пользователь '{$this->ipsclass->input['name']}'"); - + + $this->ipsclass->admin->save_log("Created new member account for '{$this->ipsclass->input['name']}'"); + $this->ipsclass->input['searchtype'] = 'normal'; $this->ipsclass->input['gotcount'] = 1; - - $this->search_results(); + + $this->search_results(); } - - + + /*-------------------------------------------------------------------------*/ // // SEARCH FORM, SEARCH FOR MEMBER // /*-------------------------------------------------------------------------*/ - + function search_form() { //----------------------------------------- // INIT //----------------------------------------- - - $mem_group = array( 0 => array( 'all', 'Любая группа') ); - - $this->ipsclass->admin->page_title = "Поиск пользователей"; - $this->ipsclass->admin->page_detail = "Воспользуйтесь формой ниже, чтобы найти пользователя или пользователей с конкретными параметрами.
    Если вы не заполните ни одно поле, то результатом поиска будет вывод всех пользователей вашего форума."; - + + $mem_group = array( 0 => array( 'all', 'Any Group') ); + + $this->ipsclass->admin->page_title = "Edit a member"; + $this->ipsclass->admin->page_detail = "Search for a member."; + //----------------------------------------- // Saved results? //----------------------------------------- - + $this->ipsclass->input['gotcount'] = isset($this->ipsclass->input['gotcount']) ? intval($this->ipsclass->input['gotcount']) : 0; $this->ipsclass->input['fromdel'] = isset($this->ipsclass->input['fromdel']) ? intval($this->ipsclass->input['fromdel']) : 0; - + if ( ( $this->ipsclass->input['gotcount'] > 1 and $this->ipsclass->input['fromdel'] ) or ( $this->ipsclass->input['gotcount'] and ! $this->ipsclass->input['fromdel'] ) ) { $this->ipsclass->input['searchtype'] = 'normal'; $this->search_results(); } - + $this->ipsclass->DB->simple_construct( array( 'select' => 'g_id, g_title', 'from' => 'groups', 'order' => "g_title" ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $mem_group[] = array( $r['g_id'] , $r['g_title'] ); } - + //----------------------------------------- // Start form //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'searchresults' ), 2 => array( 'act' , 'mem' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - + //----------------------------------------- - // Printy poos + // Printy poos //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Поиск пользователей" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Имя пользователя
    Вы можете оставить это поле пустым, если используете опции, представленные ниже.
    ", - $this->ipsclass->adskin->form_dropdown( 'namewhere', array( 0 => array( 'begin' , 'Начинается с' ), - 1 => array( 'is' , 'Совпадает с' ), - 2 => array( 'contains', 'Содержит' ), - 3 => array( 'ends' , 'Заканчивается на' ) + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Member Search" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Member's Log In User Name
    This can be left blank if you're using more options below
    ", + $this->ipsclass->adskin->form_dropdown( 'namewhere', array( 0 => array( 'begin' , 'Begins with' ), + 1 => array( 'is' , 'Is' ), + 2 => array( 'contains', 'Contains' ), + 3 => array( 'ends' , 'Ends with' ) ), isset($_POST['namewhere']) ? $_POST['namewhere'] : '' ) .' '. $this->ipsclass->adskin->form_input( "name", isset($_POST['name']) ? $_POST['name'] : '' ) ) ); - + if ( $this->ipsclass->vars['auth_allow_dnames'] ) { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "ИЛИ Отображаемое имя
    Вы можете оставить это поле пустым, если используете опции, представленные ниже
    ", - $this->ipsclass->adskin->form_dropdown( 'dnamewhere', array( 0 => array( 'begin' , 'Начинается с' ), - 1 => array( 'is' , 'Совпадает с' ), - 2 => array( 'contains', 'Содержит' ), - 3 => array( 'ends' , 'Заканчивается на' ) - ), isset($_POST['dnamewhere']) ? $_POST['dnamewhere'] : '' + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "OR Member's Display Name
    This can be left blank if you're using more options below
    ", + $this->ipsclass->adskin->form_dropdown( 'dnamewhere', array( 0 => array( 'begin' , 'Begins with' ), + 1 => array( 'is' , 'Is' ), + 2 => array( 'contains', 'Contains' ), + 3 => array( 'ends' , 'Ends with' ) + ), isset($_POST['dnamewhere']) ? $_POST['dnamewhere'] : '' ) .' '. $this->ipsclass->adskin->form_input( "members_display_name", isset($_POST['members_display_name']) ? $_POST['members_display_name'] : '' ) ) ); } - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "ИЛИ ID пользователя" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "OR Member's ID is..." , $this->ipsclass->adskin->form_input( "memberid", isset($_POST['mid']) ? $_POST['mid'] : '' ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Тип поиска:" , - $this->ipsclass->adskin->form_dropdown( "searchtype", array( 0 => array( 'normal', 'Найти пользователей для изменения или удаления' ), - 1 => array( 'prune' , 'Поиск пользователей для массового удаления' ) + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Type of Search" , + $this->ipsclass->adskin->form_dropdown( "searchtype", array( 0 => array( 'normal', 'Find Members to Edit or Delete' ), + 1 => array( 'prune' , 'Find Members to Prune (Mass Delete)' ) ), isset($_POST['searchtype']) ? $_POST['searchtype'] : '' ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "Дополнительные опции для поиска", "left", "tablesubheader" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Адрес e-mail содержит" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "Optional Search Parameters", "left", "tablesubheader" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Email Address contains..." , $this->ipsclass->adskin->form_input( "email", isset($_POST['email']) ? $_POST['email'] : '' ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Пользователь заблокирован?" , - $this->ipsclass->adskin->form_dropdown( "suspended", array( 0=>array('0','Не важно'),1=>array('yes', 'Да'),2=>array('no', 'Нет') ), isset($_POST['suspended']) ? $_POST['suspended'] : '' ) + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Member Suspended" , + $this->ipsclass->adskin->form_dropdown( "suspended", array( 0=>array('0','Either'),1=>array('yes', 'Yes'),2=>array('no', 'No') ), isset($_POST['suspended']) ? $_POST['suspended'] : '' ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "IP-адрес содержит" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "IP Address contains..." , $this->ipsclass->adskin->form_input( "ip_address", isset($_POST['ip_address']) ? $_POST['ip_address'] : '' ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Идентификатор AIM содержит" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "AIM name contains..." , $this->ipsclass->adskin->form_input( "aim_name", isset($_POST['aim_name']) ? $_POST['aim_name'] : '' ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Номер ICQ содержит" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "ICQ Number contains..." , $this->ipsclass->adskin->form_input( "icq_number", isset($_POST['icq_number']) ? $_POST['icq_number'] : '' ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Идентификатор Yahoo! содержит" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Yahoo! Identity contains..." , $this->ipsclass->adskin->form_input( "yahoo", isset($_POST['yahoo']) ? $_POST['yahoo'] : '' ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Подпись содержит" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Signature contains..." , $this->ipsclass->adskin->form_input( "signature", isset($_POST['signature']) ? $_POST['signature'] : '' ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Количество сообщений меньше, чем:" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Less than n posts" , $this->ipsclass->adskin->form_input( "posts", isset($_POST['posts']) ? $_POST['posts'] : '' ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Зарегистрирован между
    Формат дат: ДД.ММ.ГГГГ
    Пример: 31.12.1983 (31 декабря 1983 г.)
    Оставьте первое поле пустым для поиска с самой ранней регистрации, или последнее - до самой последней регистрации.
    ", - $this->ipsclass->adskin->form_simple_input( "registered_first", isset($_POST['registered_first']) ? $_POST['registered_first'] : '', 10 ). ' до ' .$this->ipsclass->adskin->form_simple_input( "registered_last", isset($_POST['registered_last']) ? $_POST['registered_last'] : '', 10 ) + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Registered Between (MM-DD-YYYY)
    Leave the first box blank to range from the earliest record and leave the last box blank to range to the current time now
    ", + $this->ipsclass->adskin->form_simple_input( "registered_first", isset($_POST['registered_first']) ? $_POST['registered_first'] : '', 10 ). ' to ' .$this->ipsclass->adskin->form_simple_input( "registered_last", isset($_POST['registered_last']) ? $_POST['registered_last'] : '', 10 ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Последнее сообщение между
    Формат дат: ДД.ММ.ГГГГ
    Пример: 31.12.1983 (31 декабря 1983 г.)
    Оставьте первое поле пустым для поиска с самого первого сообщения, или последнее - до самого последнего сообщения.
    " , - $this->ipsclass->adskin->form_simple_input( "last_post_first", isset($_POST['last_post_first']) ? $_POST['last_post_first'] : '', 10 ). ' до ' . $this->ipsclass->adskin->form_simple_input( "last_post_last", isset($_POST['last_post_last']) ? $_POST['last_post_last'] : '', 10 ) + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Last Post Between (MM-DD-YYYY)
    Leave the first box blank to range from the earliest record and leave the last box blank to range to the current time now
    " , + $this->ipsclass->adskin->form_simple_input( "last_post_first", isset($_POST['last_post_first']) ? $_POST['last_post_first'] : '', 10 ). ' to ' . $this->ipsclass->adskin->form_simple_input( "last_post_last", isset($_POST['last_post_last']) ? $_POST['last_post_last'] : '', 10 ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Последнее посещение между
    Формат дат: ДД.ММ.ГГГГ
    Пример: 31.12.1983 (31 декабря 1983 г.)
    Оставьте первое поле пустым для поиска с самого раннего посещения, или последнее - до самого последнего.
    " , - $this->ipsclass->adskin->form_simple_input( "last_activity_first", isset($_POST['last_activity_first']) ? $_POST['last_activity_first'] : '', 10 ). ' до ' . $this->ipsclass->adskin->form_simple_input( "last_activity_last", isset($_POST['last_activity_last']) ? $_POST['last_activity_last'] : '', 10 ) + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Last Active Between (MM-DD-YYYY)
    Leave the first box blank to range from the earliest record and leave the last box blank to range to the current time now
    " , + $this->ipsclass->adskin->form_simple_input( "last_activity_first", isset($_POST['last_activity_first']) ? $_POST['last_activity_first'] : '', 10 ). ' to ' . $this->ipsclass->adskin->form_simple_input( "last_activity_last", isset($_POST['last_activity_last']) ? $_POST['last_activity_last'] : '', 10 ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Основная группа" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Is in group..." , $this->ipsclass->adskin->form_dropdown( "mgroup", $mem_group, isset($_POST['mgroup']) ? $_POST['mgroup'] : '' ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Вторичная группа" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Is in secondary group..." , $this->ipsclass->adskin->form_dropdown( "mgroup_others", $mem_group, isset($_POST['mgroup_others']) ? $_POST['mgroup_others'] : '' ) - ) ); - + ) ); + //----------------------------------------- // Get custom profile information //----------------------------------------- - + require ( ROOT_PATH.'sources/classes/class_custom_fields.php' ); $fields = new custom_fields( $this->ipsclass->DB ); - + $fields->member_id = $this->ipsclass->member['id']; $fields->admin = intval($this->ipsclass->member['g_access_cp']); $fields->supmod = intval($this->ipsclass->member['g_is_supmod']); - + $this->ipsclass->init_load_cache( array( 'profilefields' ) ); - + $fields->cache_data = $this->ipsclass->cache['profilefields']; $fields->init_data(); $fields->parse_to_edit(); - + if ( count( $fields->out_fields ) ) { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "Дополнительные поля", "left", "tablesubheader" ); - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "Custom Profile Fields", "left", "tablesubheader" ); + foreach( $fields->out_fields as $id => $data ) { if ( $fields->cache_data[ $id ]['pf_type'] == 'drop' ) { $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "".$fields->field_names[ $id ]."" , - "" + "" ) ); } else @@ -3375,75 +3384,75 @@ class ad_member } } } - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Найти"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Find Member"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); - - + + } - + /*-------------------------------------------------------------------------*/ // // SEARCH RESULTS // /*-------------------------------------------------------------------------*/ - + function search_results() { - $this->ipsclass->admin->nav[] = array( '', 'Результаты поиска' ); - + $this->ipsclass->admin->nav[] = array( '', 'Search Results' ); + $page_query = ""; $un_all = ""; - + $query = array(); - + //----------------------------------------- // Member extra? //----------------------------------------- - + $member_extra = array( 'aim_name', 'icq_number', 'yahoo', 'signature' ); $date_keys = array( 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last' ); - + //----------------------------------------- // Loopy loo //----------------------------------------- - + foreach( array('name', 'members_display_name', 'memberid', 'email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','mgroup_others') as $bit ) { $this->ipsclass->input[ $bit ] = isset($this->ipsclass->input[ $bit ]) ? urldecode(trim($this->ipsclass->input[ $bit ])) : ''; - + $page_query .= '&'.$bit.'='.urlencode($this->ipsclass->input[ $bit ]); - + //----------------------------------------- // Table? //----------------------------------------- - + $table_prefix = in_array( $bit, $member_extra ) ? 'me.' : 'm.'; - + if ( $this->ipsclass->input[ $bit ] ) - { + { //----------------------------------------- // Time / Date //----------------------------------------- - + if ( in_array( $bit, $date_keys ) ) { - list( $day, $month, $year ) = explode( '.', $this->ipsclass->input[ $bit ] ); - - if ( ! checkdate( $month, $day, $year ) ) + list( $month, $day, $year ) = explode( '-', $this->ipsclass->input[ $bit ] ); + + if ( ! @checkdate( $month, $day, $year ) ) { - $this->ipsclass->main_msg = "Неверная дата (День: $day, Месяц: $month, Год: $year). Формат даты должен иметь вид: ДД.ММ.ГГГГ. Например: 31.12.1983 (31 декабря 1983 г.)"; + $this->ipsclass->main_msg = "Date out of range (Month: $month, Day: $day, Year: $year). Dates should be in MM-DD-YYYY"; $this->search_form(); } - + $time_int = mktime( 0, 0 ,0,$month, $day, $year ); $tmp_bit = str_replace( '_first' , '', $bit ); $tmp_bit = str_replace( '_last' , '', $tmp_bit ); $tmp_bit = str_replace( 'registered', 'joined', $tmp_bit ); - + if ( strstr( $bit, '_first' ) ) { $query[] = $table_prefix.$tmp_bit.' > '.$time_int; @@ -3469,7 +3478,7 @@ class ad_member $table_prefix."mgroup_others LIKE '%,".$this->ipsclass->input['mgroup_others']."' OR " . $table_prefix."mgroup_others='".$this->ipsclass->input['mgroup_others']."'"; } - } + } else if ($bit == 'posts') { $query[] = $table_prefix."posts <".$this->ipsclass->input[$bit]; @@ -3489,7 +3498,7 @@ class ad_member { $start_bit = '%'; $end_bit = '%'; - + $this->ipsclass->input['namewhere'] = isset($this->ipsclass->input['namewhere']) ? $this->ipsclass->input['namewhere'] : ''; if ( $this->ipsclass->input['namewhere'] == 'begin' ) { @@ -3504,16 +3513,16 @@ class ad_member $end_bit = ''; $start_bit = ''; } - + $query[] = $table_prefix."members_l_username LIKE '".$start_bit.strtolower($this->ipsclass->input[$bit]).$end_bit."'"; } else if ($bit == 'members_display_name') { $start_bit = '%'; $end_bit = '%'; - + $this->ipsclass->input['dnamewhere'] = isset($this->ipsclass->input['dnamewhere']) ? $this->ipsclass->input['dnamewhere'] : ''; - + if ( $this->ipsclass->input['dnamewhere'] == 'begin' ) { $start_bit = ''; @@ -3527,7 +3536,7 @@ class ad_member $end_bit = ''; $start_bit = ''; } - + $query[] = $table_prefix."members_l_display_name LIKE '".$start_bit.strtolower($this->ipsclass->input[$bit]).$end_bit."'"; } else if ($bit == 'memberid') @@ -3537,18 +3546,18 @@ class ad_member else if ($bit == 'email') { $query[] = $table_prefix.$bit." LIKE '%".strtolower($this->ipsclass->input[$bit])."%'"; - } + } else { $query[] = $table_prefix.$bit." LIKE '%".$this->ipsclass->input[$bit]."%'"; } } } - + //----------------------------------------- // Custom fields... //----------------------------------------- - + foreach ($this->ipsclass->input as $key => $value) { if ( preg_match( "/^cm_field_(\d+)$/", $key, $match ) ) @@ -3560,112 +3569,112 @@ class ad_member } } } - + //----------------------------------------- // get 'owt? //----------------------------------------- - + $rq = count($query) ? ' WHERE '.implode( " AND ", $query ) : ''; - + //----------------------------------------- // On with the show //----------------------------------------- - + $st = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; - + //----------------------------------------- // Get the number of results //----------------------------------------- - + $this->ipsclass->DB->cache_add_query( 'member_search_form_count', array( 'rq' => $rq ) ); $this->ipsclass->DB->cache_exec_query(); - + $count = $this->ipsclass->DB->fetch_row(); - + if ($count['count'] < 1) { - $this->ipsclass->main_msg = "Не найдено ни одной записи, соответствующей вашему запросу."; + $this->ipsclass->main_msg = "Your search query did not return any matches from the member database."; $this->search_form(); } - + //----------------------------------------- // Prune you fookers? //----------------------------------------- - + if ( $this->ipsclass->input['searchtype'] != 'normal' ) { $ids = array(); - + $this->ipsclass->DB->cache_add_query( 'member_search_form_two', array( 'rq' => $rq ) ); $this->ipsclass->DB->cache_exec_query(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $ids[ $r['id'] ] = array( $r['id'], $r['name'] ); } - + $this->member_prune_confirm($ids, $rq ); exit(); } - + $this->ipsclass->input['namewhere'] = isset($this->ipsclass->input['namewhere']) ? $this->ipsclass->input['namewhere'] : ''; - + $page_query .= '&searchtype=normal&namewhere='.$this->ipsclass->input['namewhere'].'&gotcount='.$count['count']; - - $this->ipsclass->admin->page_title = "Управление пользователями"; - - $this->ipsclass->admin->page_detail = "Результаты поиска с заданным запросом."; - + + $this->ipsclass->admin->page_title = "Your Member Search Results"; + + $this->ipsclass->admin->page_detail = "Your search results."; + //----------------------------------------- - + $this->ipsclass->input['showsusp'] = isset($this->ipsclass->input['showsusp']) ? $this->ipsclass->input['showsusp'] : ''; - + $pages = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $count['count'], 'PER_PAGE' => 25, 'CUR_ST_VAL' => $this->ipsclass->input['st'], - 'L_SINGLE' => $un_all."Одна страница", - 'L_MULTI' => $un_all."Множество страниц", + 'L_SINGLE' => $un_all."Single Page", + 'L_MULTI' => $un_all."Multi Page", 'BASE_URL' => $this->ipsclass->base_url."&{$this->ipsclass->form_code}&showsusp={$this->ipsclass->input['showsusp']}&code={$this->ipsclass->input['code']}".$page_query, ) ); - + //----------------------------------------- // Run the query //----------------------------------------- - + $this->ipsclass->html .= "
    -
    Результаты поиска — пользователей найдено: {$count['count']}
    +
    Member Search Results: {$count['count']} result(s) found
    "; - + $per_row = 2; $td_width = 100 / $per_row; $count = 0; $people = "\n"; - + $this->ipsclass->DB->cache_add_query( 'member_search_form_one', array( 'rq' => $rq, 'st' => $st ) ); $this->ipsclass->DB->cache_exec_query(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $count++; - + $r['id'] = $r['memid']; - + if ( ! $r['temp_ban'] ) { - $suspend_html = "Временная блокировка"; + $suspend_html = " Suspend Member..."; } else { $s_ban = $this->ipsclass->hdl_ban_line( $r['temp_ban'] ); - $suspend_html = "Разблокировать пользователя (".$this->ipsclass->admin->get_date( $s_ban['date_end'], 'LONG') .$sus_link.")..."; + $suspend_html = " Unsuspend Member (".$this->ipsclass->admin->get_date( $s_ban['date_end'], 'LONG') .$sus_link.")..."; } - + //----------------------------------------- // Mini photo? //----------------------------------------- - + if ( ! $r['pp_thumb_photo'] ) { $r['pp_thumb_photo'] = $this->ipsclass->skin_acp_url.'/images/memsearch_head.gif'; @@ -3674,9 +3683,9 @@ class ad_member { $r['pp_thumb_photo'] = $this->ipsclass->vars['upload_url'] . '/' . $r['pp_thumb_photo']; } - + $joined = $this->ipsclass->get_date( $r['joined'], 'JOINED' ); - + $people .= <<
    @@ -3686,14 +3695,14 @@ class ad_member
    - ipsclass->vars['php_ext']}?showuser={$r['id']}' target='blank'>{$r['members_display_name']} + ipsclass->vars['php_ext']}?showuser={$r['id']}' target='blank'>{$r['members_display_name']}  ({$r['ip_address']}) Options
    - +
    @@ -3702,11 +3711,11 @@ class ad_member + +
    - {$this->ipsclass->cache['group_cache'][$r['mgroup']]['g_title']} (сообщений: {$r['posts']}){$this->ipsclass->cache['group_cache'][$r['mgroup']]['g_title']} ({$r['posts']} Posts)
    - Зарегистрировался: {$joined}Joined: {$joined}
    @@ -3717,166 +3726,166 @@ class ad_member EOF; if ( ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) AND ( $r['mgroup'] == $this->ipsclass->vars['admin_group'] ) ) { - $people .= "new Array( 'Вы не можете редактировать администраторов' ) );"; + $people .= "new Array( 'You are unable to edit a root administrator' ) );"; } else { $people .= <<Профиль", - img_edit + " Имя пользователя", + new Array( img_edit + " Edit Member's Profile...", + img_edit + " Edit Member's Log In User Name...", EOF; if ( $this->ipsclass->vars['auth_allow_dnames'] ) { $people .= <<Отображаемое имя", + img_edit + " Edit Member's Display Name...", EOF; } - + $people .= <<Пароль", - img_action + " Удалить все сообщения и темы", + img_password + " Change/Reset Password...", + img_action + " Delete ALL Member's Posts/Topics...", img_action + "$suspend_html", - img_delete + " Удалить" + img_delete + " Delete Member..." ) ); EOF; } - + if ($count == $per_row ) { $people .= "\n\n"; $count = 0; } } - + if ( $count > 0 and $count != $per_row ) { for ($i = $count ; $i < $per_row ; ++$i) { $people .= " \n"; } - + $people .= ""; } - - + + $this->ipsclass->html .= $people; - + $this->ipsclass->html .= "
    {$pages}
    "; - + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // Edit Form /*-------------------------------------------------------------------------*/ - + function member_do_edit_form() { //----------------------------------------- // INIT //----------------------------------------- - + $mem = array(); $form = array(); $mem_group = array(); $show_fixed = FALSE; - $units = array( 0 => array( 'h', 'Часов' ), 1 => array( 'd', 'Дней' ) ); + $units = array( 0 => array( 'h', 'Hours' ), 1 => array( 'd', 'Days' ) ); $lang_array = array(); $perm_masks = array(); $mod_arr = array( 'timespan' => '', 'units' => '' ); $post_arr = array( 'timespan' => '', 'units' => '' ); - + //----------------------------------------- - // Fix up langs + // Fix up langs //----------------------------------------- - - $this->ipsclass->vars['default_language'] = ( ! $this->ipsclass->vars['default_language'] ) ? 'ru' : $this->ipsclass->vars['default_language']; - + + $this->ipsclass->vars['default_language'] = ( ! $this->ipsclass->vars['default_language'] ) ? 'en' : $this->ipsclass->vars['default_language']; + //----------------------------------------- // Check //----------------------------------------- - + if ($this->ipsclass->input['mid'] == "") { - $this->ipsclass->admin->error("Вы не указали ID пользователя."); + $this->ipsclass->admin->error("Could not resolve member id"); } - + //----------------------------------------- // Get member info //----------------------------------------- - + $this->ipsclass->DB->cache_add_query( 'member_search_do_edit_form', array( 'mid' => intval($this->ipsclass->input['mid']) ) ); $this->ipsclass->DB->cache_exec_query(); - + $mem = $this->ipsclass->DB->fetch_row(); - + $mem['id'] = $mem['memid']; //----------------------------------------- - // Check + // Check //----------------------------------------- - + if ( ! $mem['id'] ) - { - $this->ipsclass->admin->error("Невозможно найти пользователя с указанным ID."); + { + $this->ipsclass->admin->error("Could not resolve member id"); } - + //----------------------------------------- // Load profile lib //----------------------------------------- - + require_once( ROOT_PATH . 'sources/action_public/profile.php' ); $lib_profile = new profile(); $lib_profile->ipsclass =& $this->ipsclass; - + //----------------------------------------- // Get all info //----------------------------------------- - + $mem = $lib_profile->personal_portal_set_information( $mem ); - + //----------------------------------------- // Nav //----------------------------------------- - - $this->ipsclass->admin->nav[] = array( '', 'Изменение пользователя' ); - + + $this->ipsclass->admin->nav[] = array( '', 'Edit Member' ); + //----------------------------------------- // Load and config the post parser //----------------------------------------- - + require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); $this->parser = new parse_bbcode(); $this->parser->ipsclass = $this->ipsclass; $this->parser->allow_update_caches = 1; - + $this->parser->bypass_badwords = intval($this->ipsclass->member['g_bypass_badwords']); //----------------------------------------- // Non root admin attempting to edit root admin? //----------------------------------------- - + if ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) { if ( $mem['mgroup'] == $this->ipsclass->vars['admin_group'] ) { - $this->ipsclass->admin->error("Вы не можете редактировать главных администраторов"); + $this->ipsclass->admin->error("You are not permitted to edit root administrators"); } - + if ( $mem['mgroup_others'] ) { $tmp_mgroup_others = explode( ",", $this->ipsclass->clean_perm_string( $mem['mgroup_others'] ) ); - + if( count( $tmp_mgroup_others ) ) { foreach( $tmp_mgroup_others as $other_mgroup ) { if( $other_mgroup == $this->ipsclass->vars['admin_group'] ) { - $this->ipsclass->admin->error("Вы не можете редактировать главных администраторов"); + $this->ipsclass->admin->error("You are not permitted to edit root administrators"); } } } @@ -3886,17 +3895,17 @@ EOF; //----------------------------------------- // Get groups (USE CACHE FOR CRAPS SAKE) //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => 'g_id, g_title, g_access_cp', 'from' => 'groups', 'order' => "g_title" ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { //----------------------------------------- // Ensure only root admins can promote to root admin grou... // oh screw it, I can't be bothered explaining stuff tonight //----------------------------------------- - + if ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group']) { if ( $this->ipsclass->vars['admin_group'] == $r['g_id'] ) @@ -3908,14 +3917,14 @@ EOF; continue; } } - + $mem_group[] = array( $r['g_id'] , $r['g_title'] ); } - + //----------------------------------------- // is this a non root editing a root? //----------------------------------------- - + if ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) { if ( $mem['mgroup'] == $this->ipsclass->vars['admin_group'] ) @@ -3927,46 +3936,46 @@ EOF; $show_fixed = TRUE; } } - + //----------------------------------------- // Get langs (USE CACHE DICKHEAD) //----------------------------------------- $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'languages' ) ); $this->ipsclass->DB->simple_exec(); - + while ( $l = $this->ipsclass->DB->fetch_row() ) { $lang_array[] = array( $l['ldir'], $l['lname'] ); } - + //----------------------------------------- // Get Skins (CACHE) //----------------------------------------- - + require ( ROOT_PATH.'sources/classes/class_display.php' ); $print = new display(); $print->ipsclass =& $this->ipsclass; - + $this->ipsclass->skin['_setid'] = $mem['skin']; - + $form['_skin_list'] = $print->_build_skin_list(); - + //----------------------------------------- // Get custom profile information //----------------------------------------- - + require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); $fields = new custom_fields( $this->ipsclass->DB ); - + $fields->member_id = $this->ipsclass->member['id']; $fields->member_data = $mem; $fields->admin = intval($this->ipsclass->member['g_access_cp']); $fields->supmod = intval($this->ipsclass->member['g_is_supmod']); - + $fields->init_data(); $fields->parse_to_edit(); - + if ( count( $fields->out_fields ) ) { foreach( $fields->out_fields as $id => $data ) @@ -3983,54 +3992,54 @@ EOF; { $form_element = $this->ipsclass->adskin->form_input( 'field_'.$id, $data ); } - + $form['_custom_fields'] .= $this->ipsclass->adskin->add_td_row( array( "{$fields->field_names[ $id ]}
    {$fields->field_desc[ $id ]}
    " , $form_element ) ); } } else { - $form['_custom_fields'] = $this->ipsclass->adskin->add_td_row( array( array( "Дополнительные поля не найдены.", 2 ) ) ); + $form['_custom_fields'] = $this->ipsclass->adskin->add_td_row( array( array( "No Custom Profile Fields Found", 2 ) ) ); } - - + + //----------------------------------------- // Perms masks section //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms' ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $perm_masks[] = array( $r['perm_id'], $r['perm_name'] ); } - + //----------------------------------------- // Signature //----------------------------------------- - + if ( ! $this->editor_loaded ) { //----------------------------------------- // Load and config the std/rte editors //----------------------------------------- - + require_once( ROOT_PATH."sources/handlers/han_editor.php" ); $this->han_editor = new han_editor(); $this->han_editor->ipsclass =& $this->ipsclass; - $this->han_editor->init(); $this->han_editor->from_acp = 1; $this->han_editor->ed_width = "550px"; $this->han_editor->ed_height = "200px"; $this->ipsclass->vars['rte_width'] = "500px"; $this->ipsclass->vars['rte_height'] = "200px"; + $this->han_editor->init(); $this->editor_loaded = 1; } if ( $this->han_editor->method == 'rte' ) { - $mem['signature'] = $this->parser->pre_display_parse( $this->parser->pre_db_parse( $mem['signature'] ) ); - $mem['signature'] = $this->parser->convert_ipb_html_to_html( $mem['signature'] ); + $mem['signature'] = $this->parser->convert_ipb_html_to_html( $mem['signature'] ); + $mem['pp_about_me'] = $this->parser->convert_ipb_html_to_html( $mem['pp_about_me'] ); } else { @@ -4038,27 +4047,34 @@ EOF; $this->parser->parse_nl2br = 1; $this->parser->parse_smilies = 0; $this->parser->parse_bbcode = $this->ipsclass->vars['sig_allow_ibc']; - + $mem['signature'] = $this->parser->pre_edit_parse( $mem['signature'] ); + + $this->parser->parse_html = 0; + $this->parser->parse_nl2br = 1; + $this->parser->parse_smilies = 0; + $this->parser->parse_bbcode = 1; + + $mem['pp_about_me'] = $this->parser->pre_edit_parse( $mem['pp_about_me'] ); } - + //----------------------------------------- // Start form //----------------------------------------- - - $this->ipsclass->admin->page_title = "Изменение пользователя «".$mem['members_display_name']."» (ID: ".$mem['id'].")"; - - $this->ipsclass->admin->page_detail = "Здесь вы сможете изменить основную информацию и настройки пользователя."; - + + $this->ipsclass->admin->page_title = "Edit member: ".$mem['members_display_name']." (ID: ".$mem['id'].")"; + + $this->ipsclass->admin->page_detail = "You may alter the members settings from here."; + //----------------------------------------- // Mod posts bit //----------------------------------------- - + $form['_mod_tick'] = ''; $form['_mod_extra'] = ""; $form['_post_tick'] = ''; $form['_post_extra'] = ""; - + if ( $mem['mod_posts'] == 1 ) { $form['_mod_tick'] = 'checked'; @@ -4066,9 +4082,9 @@ EOF; elseif ($mem['mod_posts'] > 0) { $mod_arr = $this->ipsclass->hdl_ban_line( $mem['mod_posts'] ); - + $hours = ceil( ( $mod_arr['date_end'] - time() ) / 3600 ); - + if ( $hours > 24 and ( ($hours / 24) == ceil($hours / 24) ) ) { $mod_arr['units'] = 'd'; @@ -4079,14 +4095,14 @@ EOF; $mod_arr['units'] = 'h'; $mod_arr['timespan'] = $hours; } - - $form['_mod_extra'] = "
    Используется ограничение — оставшееся время было пересчитано"; + + $form['_mod_extra'] = "
    Restriction in progress - remaining time has been recalculated"; } - + //----------------------------------------- // Posting restriction //----------------------------------------- - + if ( $mem['restrict_post'] == 1 ) { $form['_post_tick'] = 'checked'; @@ -4094,9 +4110,9 @@ EOF; else if( $mem['restrict_post'] > 0 ) { $post_arr = $this->ipsclass->hdl_ban_line( $mem['restrict_post'] ); - + $hours = ceil( ( $post_arr['date_end'] - time() ) / 3600 ); - + if ( $hours > 24 and ( ($hours / 24) == ceil($hours / 24) ) ) { $post_arr['units'] = 'd'; @@ -4107,48 +4123,48 @@ EOF; $post_arr['units'] = 'h'; $post_arr['timespan'] = $hours; } - - $form['_post_extra'] = "
    Используется ограничение — оставшееся время было пересчитано"; + + $form['_post_extra'] = "
    Restriction in progress - remaining time has been recalculated"; } - + //----------------------------------------- // Perm masks //----------------------------------------- - + foreach ($perm_masks as $d) { $form['_perm_masks_js'] .= " perms_$d[0] = '$d[1]';\n"; } - + //----------------------------------------- // Form data.. //----------------------------------------- - + # General $form['remove_photo'] = $this->ipsclass->adskin->form_checkbox( "remove_photo", 0 ); $form['remove_avatar'] = $this->ipsclass->adskin->form_checkbox( "remove_avatar", 0 ); $form['warn_level'] = $this->ipsclass->adskin->form_input( "warn_level", $mem['warn_level'], 'text', '', '5' ); $form['member_title'] = $this->ipsclass->adskin->form_input( "title" , $mem['title']); $form['email'] = $this->ipsclass->adskin->form_input( "email" , $mem['email'] ); - $form['pp_gender'] = $this->ipsclass->adskin->form_dropdown( "pp_gender", array( 0 => array('none', 'Не указан'), 1 => array( 'female', 'Женщина'), 2 => array( 'male', 'Мужчина' ) ), $mem['pp_gender'] ); + $form['pp_gender'] = $this->ipsclass->adskin->form_dropdown( "pp_gender", array( 0 => array('none', 'Not Telling'), 1 => array( 'female', 'Female'), 2 => array( 'male', 'Male' ) ), $mem['pp_gender'] ); $form['pp_bio_content'] = $this->ipsclass->adskin->form_textarea( "pp_bio_content", str_replace( '
    ', "\n",$mem['pp_bio_content'] ) ); - + $form['_show_fixed'] = $show_fixed; $form['mgroup'] = $this->ipsclass->adskin->form_dropdown( "mgroup", $mem_group, $mem['mgroup'] ); $form['_mgroup'] = $this->ipsclass->adskin->form_hidden( array( 1 => array( 'mgroup' , $mem['mgroup'] ) ) ); $form['mgroup_others'] = $this->ipsclass->adskin->form_multiselect( "mgroup_others[]", $mem_group, explode( ",", $mem['mgroup_others'] ), 5 ); $form['posts'] = $this->ipsclass->adskin->form_input( "posts", $mem['posts'] ); - + $form['_permid_tick'] = ( $mem['org_perm_id'] ) ? 'checked="checked"' : ''; $form['permid'] = $this->ipsclass->adskin->form_multiselect( "permid[]", $perm_masks, explode( ",",$mem['org_perm_id'] ), 5, 'onfocus="saveit(this)" onchange="saveit(this)"' ); - + # Restrictions $form['mod_timespan'] = $this->ipsclass->adskin->form_input('mod_timespan', $mod_arr['timespan'], "text", "", '5' ); $form['mod_units'] = $this->ipsclass->adskin->form_dropdown('mod_units', $units, $mod_arr['units'] ); $form['post_timespan'] = $this->ipsclass->adskin->form_input('post_timespan', $post_arr['timespan'], "text", "", '5' ); $form['post_units'] = $this->ipsclass->adskin->form_dropdown('post_units', $units, $post_arr['units'] ); - - + + # Settings $form['language'] = $this->ipsclass->adskin->form_dropdown( "language", $lang_array, $mem['language'] != "" ? $mem['language'] : $this->ipsclass->vars['default_language'] ); $form['hide_email'] = $this->ipsclass->adskin->form_yes_no("hide_email", $mem['hide_email'] ); @@ -4157,33 +4173,69 @@ EOF; 1 => array( '1' , $this->ipsclass->acp_lang['mem_edit_pm_yes'] ), 2 => array( '2' , $this->ipsclass->acp_lang['mem_edit_pm_yes_really'] ), ), $mem['members_disable_pm'] ); - + # Contact Information $form['aim_name'] = $this->ipsclass->adskin->form_input( "aim_name" , $mem['aim_name'] ); $form['icq_number'] = $this->ipsclass->adskin->form_input( "icq_number", $mem['icq_number'] ); $form['yahoo'] = $this->ipsclass->adskin->form_input( "yahoo" , $mem['yahoo'] ); $form['msnname'] = $this->ipsclass->adskin->form_input( "msnname" , $mem['msnname'] ); $form['website'] = $this->ipsclass->adskin->form_input( "website" , $mem['website'] ); - + # Signature $form['signature'] = $this->han_editor->show_editor( $mem['signature'], 'signature' ); - + + # About Me + $form['aboutme'] = $this->han_editor->show_editor( $mem['pp_about_me'], 'aboutme' ); + # Profile Information $form['avatar'] = $this->ipsclass->adskin->form_input( "avatar", $mem['avatar_location'] ); - $form['avatar_type'] = $this->ipsclass->adskin->form_dropdown("avatar_type", array( 0 => array( 'local' , 'из галереи' ), - 1 => array( 'url' , 'внешняя ссылка' ), - 2 => array( 'upload' , 'загружен на сервер' ), + $form['avatar_type'] = $this->ipsclass->adskin->form_dropdown("avatar_type", array( 0 => array( 'local' , 'Avatar Gallery' ), + 1 => array( 'url' , 'URL Avatar' ), + 2 => array( 'upload' , 'Uploaded Avatar' ), ), $mem['avatar_type'] ); $form['avatar_size'] = $this->ipsclass->adskin->form_input( "avatar_size", $mem['avatar_size'] ); $form['location'] = $this->ipsclass->adskin->form_input( "location", $mem['location'] ); $form['interests'] = $this->ipsclass->adskin->form_textarea( "interests", str_replace( '
    ', "\n",$mem['interests'] ) ); + $bday_days = array( array( 0, 'Not Set' ) ); + $bday_year = array( array( 0, 'Not Set' ) ); + + $bday_mons = array( array( 0, 'Not Set' ), + array( 1, 'Jan' ), + array( 2, 'Feb' ), + array( 3, 'Mar' ), + array( 4, 'Apr' ), + array( 5, 'May' ), + array( 6, 'Jun' ), + array( 7, 'Jul' ), + array( 8, 'Aug' ), + array( 9, 'Sep' ), + array( 10, 'Oct' ), + array( 11, 'Nov' ), + array( 12, 'Dec' ), + ); + + for( $i=1; $i<=31; $i++ ) + { + $bday_days[] = array( $i, $i ); + } + + for( $j=intval(date('Y')),$i=$j-80; $i<=$j; $j-- ) + { + $bday_year[] = array( $j, $j ); + } + + $form['birthday'] = $this->ipsclass->adskin->form_dropdown("bday_month" , $bday_mons, $mem['bday_month']) .' '. + $this->ipsclass->adskin->form_dropdown("bday_day" , $bday_days, $mem['bday_day']) .' '. + $this->ipsclass->adskin->form_dropdown("bday_year" , $bday_year, $mem['bday_year']); + + //----------------------------------------- // Print //----------------------------------------- - + $this->ipsclass->html .= $this->html->member_form($mem, $form); - + $this->ipsclass->admin->output(); } @@ -4191,63 +4243,65 @@ EOF; /*-------------------------------------------------------------------------*/ // Complete edit /*-------------------------------------------------------------------------*/ - + function member_do_edit() { //----------------------------------------- // INIT //----------------------------------------- - + $this->ipsclass->input['mid'] = intval($this->ipsclass->input['mid']); $remove_avatar = intval( $this->ipsclass->input['remove_avatar'] ); $remove_photo = intval( $this->ipsclass->input['remove_photo'] ); $avatar_type = $this->ipsclass->input['avatar_type']; $pp_gender = ( $this->ipsclass->input['pp_gender'] == 'male' ) ? 'male' : ( $this->ipsclass->input['pp_gender'] == 'female' ? 'female' : '' ); $pp_bio_content = $this->ipsclass->txt_mbsubstr( $this->ipsclass->my_nl2br( $this->ipsclass->input['pp_bio_content'] ), 0, 300 ); - + //----------------------------------------- // Auth check... //----------------------------------------- - + $this->ipsclass->admin->security_auth_check(); - + //----------------------------------------- // Got an email? //----------------------------------------- - + if ( ! $this->ipsclass->input['email'] ) { - $this->ipsclass->main_msg = "Вы должны ввести настоящий e-mail адрес."; + $this->ipsclass->main_msg = "You must enter a valid email address for this user."; $this->member_do_edit_form(); } - + //----------------------------------------- // Load parser //----------------------------------------- - + require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); $this->parser = new parse_bbcode(); $this->parser->ipsclass =& $this->ipsclass; $this->parser->allow_update_caches = 0; - + //----------------------------------------- // Load and config the std/rte editors //----------------------------------------- - - $this->ipsclass->load_skin(); - + + //$this->ipsclass->load_skin(); + require_once( ROOT_PATH."sources/handlers/han_editor.php" ); $this->han_editor = new han_editor(); $this->han_editor->ipsclass =& $this->ipsclass; + $this->han_editor->from_acp = 1; + $this->han_editor->init(); - - $this->parser->bypass_badwords = 1; - + + $this->parser->bypass_badwords = 1; + //----------------------------------------- // Grab converge... //----------------------------------------- - if ( $this->ipsclass->vars['ipbli_key'] == 'converge' ) + if ( $this->ipsclass->vars['ipbli_key'] == 'ipconverge' ) { $converge = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'converge_local', @@ -4262,65 +4316,78 @@ EOF; require_once( KERNEL_PATH . 'class_api_server.php' ); $this->api_server = new class_api_server(); } - + if ( ! $converge['converge_active'] ) { - $this->ipsclass->main_msg = "Действие не выполнено, поскольку невозможно найти сведений о API IP.Convege."; + $this->ipsclass->main_msg = "Action failed. Could not locate IP.Converge API details. Recommend that you re-peform a handshake request from the IP.Converge control panel"; $this->member_do_edit_form(); } } - + //----------------------------------------- // Get member //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'members', 'where' => "id=".$this->ipsclass->input['mid'] ) ); $this->ipsclass->DB->simple_exec(); - + $memb = $this->ipsclass->DB->fetch_row(); - + //----------------------------------------- // Non root admin attempting to edit root admin? //----------------------------------------- - + if ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) { if ( $memb['mgroup'] == $this->ipsclass->vars['admin_group'] ) { - $this->ipsclass->admin->error("Вы не можете редактировать главных администраторов."); + $this->ipsclass->admin->error("You are not permitted to edit root administrators"); } - - if( $mem['mgroup_others'] ) + + if( $memb['mgroup_others'] ) { - $tmp_mgroup_others = explode( ",", $this->ipsclass->clean_perm_string( $mem['mgroup_others'] ) ); - + $tmp_mgroup_others = explode( ",", $this->ipsclass->clean_perm_string( $memb['mgroup_others'] ) ); + if( count( $tmp_mgroup_others ) ) { foreach( $tmp_mgroup_others as $other_mgroup ) { if( $other_mgroup == $this->ipsclass->vars['admin_group'] ) { - $this->ipsclass->admin->error("Вы не можете редактировать главных администраторов."); + $this->ipsclass->admin->error("You are not permitted to edit root administrators"); } } } - } + } } - + //----------------------------------------- // Convert sig //----------------------------------------- $signature = $this->han_editor->process_raw_post( 'signature' ); - $this->parser->parse_smilies = 0; - $this->parser->parse_bbcode = $this->ipsclass->vars['sig_allow_ibc']; - + $this->parser->parse_smilies = 0; + $this->parser->parse_bbcode = $this->ipsclass->vars['sig_allow_ibc']; + $this->parser->parse_html = $this->ipsclass->vars['sig_allow_html']; + $this->parser->parsing_signature = 1; + $this->parser->parse_nl2br = 1; + $signature = $this->parser->pre_db_parse( $signature ); + $signature = $this->parser->pre_display_parse( $signature ); + + $aboutme = $this->han_editor->process_raw_post( 'aboutme' ); + $this->parser->parse_smilies = $this->ipsclass->vars['aboutme_emoticons']; + $this->parser->parse_bbcode = $this->ipsclass->vars['aboutme_bbcode']; + $this->parser->parse_html = $this->ipsclass->vars['aboutme_html']; + $this->parser->parse_nl2br = 1; + + $aboutme = $this->parser->pre_db_parse( $aboutme ); + $aboutme = $this->parser->pre_display_parse( $aboutme ); //----------------------------------------- // Perms //----------------------------------------- - + if ( isset($this->ipsclass->input['override']) AND $this->ipsclass->input['override'] == 1 AND is_array($_POST['permid']) AND count($_POST['permid']) ) { $permid = ','.implode( ",", $_POST['permid'] ).','; @@ -4329,14 +4396,14 @@ EOF; { $permid = ""; } - + $restrict_post = 0; $mod_queue = 0; - + //----------------------------------------- // Q //----------------------------------------- - + if ( isset($this->ipsclass->input['mod_indef']) AND $this->ipsclass->input['mod_indef'] == 1 ) { $mod_queue = 1; @@ -4345,11 +4412,11 @@ EOF; { $mod_queue = $this->ipsclass->hdl_ban_line( array( 'timespan' => intval($this->ipsclass->input['mod_timespan']), 'unit' => $this->ipsclass->input['mod_units'] ) ); } - + //----------------------------------------- // Post ban //----------------------------------------- - + if ( isset($this->ipsclass->input['post_indef']) AND $this->ipsclass->input['post_indef'] == 1 ) { $restrict_post = 1; @@ -4358,7 +4425,7 @@ EOF; { $restrict_post = $this->ipsclass->hdl_ban_line( array( 'timespan' => intval($this->ipsclass->input['post_timespan']), 'unit' => $this->ipsclass->input['post_units'] ) ); } - + if ( strstr( $this->ipsclass->input['avatar'], 'http://' ) ) { $avatar_type = 'url'; @@ -4367,7 +4434,7 @@ EOF; //----------------------------------------- // Throw to the DB //----------------------------------------- - + $this->ipsclass->DB->do_update( 'members', array ( 'restrict_post' => $restrict_post, 'mgroup' => $this->ipsclass->input['mgroup'], @@ -4377,13 +4444,16 @@ EOF; 'hide_email' => $this->ipsclass->input['hide_email'], 'email_pm' => $this->ipsclass->input['email_pm'], 'posts' => $this->ipsclass->input['posts'], + 'bday_day' => intval($this->ipsclass->input['bday_day']), + 'bday_month' => intval($this->ipsclass->input['bday_month']), + 'bday_year' => intval($this->ipsclass->input['bday_year']), 'mod_posts' => $mod_queue, 'org_perm_id' => $permid, 'warn_level' => intval( $this->ipsclass->input['warn_level'] ), 'members_disable_pm' => intval( $this->ipsclass->input['members_disable_pm'] ), 'mgroup_others' => $_POST['mgroup_others'] ? ','.implode( ",", $_POST['mgroup_others'] ).',' : '', ) , 'id='.$this->ipsclass->input['mid'] ); - + $this->ipsclass->DB->do_update( 'member_extra', array ( 'aim_name' => $this->ipsclass->input['aim_name'], 'icq_number' => intval($this->ipsclass->input['icq_number']), @@ -4397,29 +4467,47 @@ EOF; 'interests' => $this->ipsclass->input['interests'], 'signature' => $signature, ), 'id='.$this->ipsclass->input['mid'] ); - + //----------------------------------------- // Restriction permissions stuff //----------------------------------------- if ( $this->ipsclass->member['row_perm_cache'] ) { - if ( $this->ipsclass->cache['group_cache'][ intval($this->ipsclass->input['mgroup']) ]['g_access_cp'] ) + $is_admin = $this->ipsclass->cache['group_cache'][ intval($this->ipsclass->input['mgroup']) ]['g_access_cp'] ? 1 : 0; + + if( $is_admin == 0 ) + { + if( is_array( $_POST['mgroup_others'] ) AND count( $_POST['mgroup_others'] ) ) + { + foreach( $_POST['mgroup_others'] as $omg ) + { + if( $this->ipsclass->cache['group_cache'][ intval($omg) ]['g_access_cp'] ) + { + $is_admin = 1; + break; + } + } + } + } + + if ( $is_admin ) { //----------------------------------------- // Copy restrictions... //----------------------------------------- - $this->ipsclass->DB->do_insert( 'admin_permission_rows', array( 'row_member_id' => $this->ipsclass->input['mid'], + $this->ipsclass->DB->do_replace_into( 'admin_permission_rows', array( 'row_member_id' => $this->ipsclass->input['mid'], 'row_perm_cache' => $this->ipsclass->member['row_perm_cache'], - 'row_updated' => time() ) ); + 'row_updated' => time() ), "row_member_id={$this->ipsclass->input['mid']}" + ); } } //----------------------------------------- // Gender... //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => 'pp_member_id', 'from' => 'profile_portal', 'where' => "pp_member_id=".$this->ipsclass->input['mid'] ) ); @@ -4428,19 +4516,21 @@ EOF; if ( $this->ipsclass->DB->get_num_rows() ) { $this->ipsclass->DB->do_update( 'profile_portal', array( 'pp_gender' => $pp_gender, - 'pp_bio_content' => $pp_bio_content ), 'pp_member_id='.$this->ipsclass->input['mid'] ); + 'pp_bio_content' => $pp_bio_content, + 'pp_about_me' => $aboutme ), 'pp_member_id='.$this->ipsclass->input['mid'] ); } else { $this->ipsclass->DB->do_insert( 'profile_portal', array( 'pp_gender' => $pp_gender, 'pp_bio_content' => $pp_bio_content, - 'pp_member_id' => $this->ipsclass->input['mid'] ) ); + 'pp_member_id' => $this->ipsclass->input['mid'], + 'pp_about_me' => $aboutme ) ); } - + //----------------------------------------- // Moved from validating group? //----------------------------------------- - + if ( $this->ipsclass->input['curgroup'] == $this->ipsclass->vars['auth_group'] ) { if ( $this->ipsclass->input['mgroup'] != $this->ipsclass->input['curgroup'] ) @@ -4448,143 +4538,100 @@ EOF; //----------------------------------------- // Yes... //----------------------------------------- - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'validating', 'where' => "member_id={$this->ipsclass->input['mid']} AND new_reg=1" ) ); } } - + //----------------------------------------- // Diff email? //----------------------------------------- - + if ( $this->ipsclass->input['email'] != $this->ipsclass->input['curemail'] ) { //----------------------------------------- // Is this email addy taken? CONVERGE THIS?? //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'members', 'where' => "email='".strtolower($this->ipsclass->input['email'])."' and id <> {$this->ipsclass->input['mid']}" ) ); $this->ipsclass->DB->simple_exec(); - + $email_check = $this->ipsclass->DB->fetch_row(); - + if ($email_check['id']) { - $this->ipsclass->main_msg = "Уже есть пользователь с таким E-mail, введите другой E-mail"; + $this->ipsclass->main_msg = "Cannot use this email address, another account is already using it"; $this->member_do_edit_form(); } - - //----------------------------------------- - // Check Converge: Email - //----------------------------------------- - - if ( $this->ipsclass->vars['ipbli_key'] == 'converge' ) - { - $request = array( 'auth_key' => $converge['converge_api_code'], - 'product_id' => $converge['converge_product_id'], - 'email_address' => trim(strtolower($this->ipsclass->input['email'])), - ); - - $url = $converge['converge_url'] . '/converge_master/converge_server.php'; - - //----------------------------------------- - // Send request - //----------------------------------------- - - $this->api_server->api_send_request( $url, 'convergeCheckEmail', $request ); - - //----------------------------------------- - // Handle errors... - //----------------------------------------- - - if ( count( $this->api_server->errors ) OR $this->api_server->params['response'] != 'EMAIL_NOT_IN_USE' ) - { - $this->ipsclass->main_msg = "Указанный e-mail адрес уже используется."; - $this->member_do_edit_form(); - return; - } - - //----------------------------------------- - // Change email - //----------------------------------------- - - $request = array( 'auth_key' => $converge['converge_api_code'], - 'product_id' => $converge['converge_product_id'], - 'old_email_address' => trim(strtolower($this->ipsclass->input['curemail'])), - 'new_email_address' => trim(strtolower($this->ipsclass->input['email'])), - ); - - $url = $converge['converge_url'] . '/converge_master/converge_server.php'; - - //----------------------------------------- - // Send request - //----------------------------------------- - - $this->api_server->api_send_request( $url, 'convergeChangeEmail', $request ); - - //----------------------------------------- - // Handle errors... - //----------------------------------------- - - if ( count( $this->api_server->errors ) OR $this->api_server->params['response'] != 'SUCCESS' ) - { - $this->ipsclass->main_msg = "Указанный e-mail адрес уже используется."; - $this->member_do_edit_form(); - return; - } - } - + + //----------------------------------------- + // Load handler... + //----------------------------------------- + + require_once( ROOT_PATH.'sources/handlers/han_login.php' ); + $this->han_login = new han_login(); + $this->han_login->ipsclass =& $this->ipsclass; + $this->han_login->init(); + $this->han_login->change_email( trim(strtolower($this->ipsclass->input['curemail'])), trim(strtolower($this->ipsclass->input['email'])) ); + + if( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' ) + { + $this->ipsclass->main_msg = "The selected email address is already in use."; + $this->member_add_form(); + return; + } + //----------------------------------------- // Update converge... //----------------------------------------- - + $this->ipsclass->converge->converge_update_member( $this->ipsclass->input['curemail'], strtolower($this->ipsclass->input['email']) ); - + //----------------------------------------- // Update member //----------------------------------------- - + $this->ipsclass->DB->do_update( 'members', array ( 'email' => strtolower($this->ipsclass->input['email']) ), 'id='.$this->ipsclass->input['mid'] ); - + //----------------------------------------- // Update dupemail //----------------------------------------- - + if ( $memb['bio'] == 'dupemail' ) { $this->ipsclass->DB->do_update( 'member_extra', array( 'bio' => '' ), 'id='.$this->ipsclass->input['mid'] ); } } - + //----------------------------------------- // Remove photo? //----------------------------------------- - + if ( $remove_photo ) { $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'profile_portal', 'where' => "pp_member_id=".intval($this->ipsclass->input['mid']) ) ); $this->ipsclass->DB->simple_exec(); - + if ( $this->ipsclass->DB->get_num_rows() ) { $this->ipsclass->DB->do_update( 'profile_portal', array( 'pp_main_photo' => '', - 'pp_main_width' => '', - 'pp_main_height' => '', + 'pp_main_width' => 0, + 'pp_main_height' => 0, 'pp_thumb_photo' => '', - 'pp_thumb_width' => '', - 'pp_thumb_height' => '' ), 'pp_member_id='.$this->ipsclass->input['mid'] ); + 'pp_thumb_width' => 0, + 'pp_thumb_height' => 0 ), 'pp_member_id='.$this->ipsclass->input['mid'] ); } else { $this->ipsclass->DB->do_insert( 'profile_portal', array( 'pp_main_photo' => '', - 'pp_main_width' => '', - 'pp_main_height' => '', + 'pp_main_width' => 0, + 'pp_main_height' => 0, 'pp_thumb_photo' => '', - 'pp_thumb_width' => '', - 'pp_thumb_height' => '', + 'pp_thumb_width' => 0, + 'pp_thumb_height' => 0, 'pp_member_id' => $this->ipsclass->input['mid'] ) ); } - + foreach( array( 'swf', 'jpg', 'jpeg', 'gif', 'png' ) as $ext ) { if ( @file_exists( $this->ipsclass->vars['upload_dir']."/photo-".$this->ipsclass->input['mid'].".".$ext ) ) @@ -4593,16 +4640,16 @@ EOF; } } } - + //----------------------------------------- // Remove avatar //----------------------------------------- - + if ( $remove_avatar ) { $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'member_extra', 'where' => "id=".intval($this->ipsclass->input['mid']) ) ); $this->ipsclass->DB->simple_exec(); - + if ( $this->ipsclass->DB->get_num_rows() ) { $this->ipsclass->DB->do_update( 'member_extra', array( 'avatar_location' => '', @@ -4616,7 +4663,7 @@ EOF; 'avatar_type' => '', 'id' => $this->ipsclass->input['mid'] ) ); } - + foreach( array( 'swf', 'jpg', 'jpeg', 'gif', 'png' ) as $ext ) { if ( @file_exists( $this->ipsclass->vars['upload_dir']."/av-".$id.".".$ext ) ) @@ -4625,77 +4672,91 @@ EOF; } } } - + //----------------------------------------- // Custom profile field stuff //----------------------------------------- - + $this->ipsclass->init_load_cache( array('profilefields') ); - + require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); $fields = new custom_fields( $this->ipsclass->DB ); - + $fields->member_id = $this->ipsclass->member['id']; $fields->cache_data = $this->ipsclass->cache['profilefields']; $fields->admin = intval($this->ipsclass->member['g_access_cp']); $fields->supmod = intval($this->ipsclass->member['g_is_supmod']); - + $fields->init_data(); $fields->parse_to_save(); - + //----------------------------------------- // Custom profile field stuff //----------------------------------------- - + if ( count( $fields->out_fields ) ) { //----------------------------------------- // Do we already have an entry in // the content table? //----------------------------------------- - + $test = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'member_id', 'from' => 'pfields_content', 'where' => 'member_id='.$this->ipsclass->input['mid'] ) ); - + if ( $test['member_id'] ) { //----------------------------------------- // We have it, so simply update //----------------------------------------- - + + $this->ipsclass->DB->force_data_type = array(); + + foreach( $fields->out_fields as $_field => $_data ) + { + $this->ipsclass->DB->force_data_type[ $_field ] = 'string'; + } + $this->ipsclass->DB->do_update( 'pfields_content', $fields->out_fields, 'member_id='.$this->ipsclass->input['mid'] ); } else { + $this->ipsclass->DB->force_data_type = array(); + + foreach( $fields->out_fields as $_field => $_data ) + { + $this->ipsclass->DB->force_data_type[ $_field ] = 'string'; + } + $fields->out_fields['member_id'] = $this->ipsclass->input['mid']; - + $this->ipsclass->DB->do_insert( 'pfields_content', $fields->out_fields ); } } - + //----------------------------------------- // SYNC modules //----------------------------------------- - + if ( USE_MODULES == 1 ) { $this->modules->register_class($this); - + if ( $memb['mgroup'] != $this->ipsclass->input['mgroup'] ) { $this->modules->on_group_change($this->ipsclass->input['mid'], $this->ipsclass->input['mgroup']); } - + if ( $memb['email'] != strtolower($this->ipsclass->input['email']) ) { $this->modules->on_email_change($this->ipsclass->input['mid'], strtolower($this->ipsclass->input['email'])); } - + if ( $memb['signature'] != $this->ipsclass->input['signature'] ) { $this->modules->on_signature_update($memb, $this->ipsclass->input['signature']); } - + $mem_array = array( 'title' => $this->ipsclass->input['title'], 'aim_name' => $this->ipsclass->input['aim_name'], @@ -4707,92 +4768,92 @@ EOF; 'interests' => $this->ipsclass->input['interests'], 'id' => $this->ipsclass->input['mid'] ); - + $this->modules->on_profile_update($mem_array, $custom_fields); } - + //----------------------------------------- // Redirect //----------------------------------------- - - $this->ipsclass->admin->save_log("Изменение учетной записи пользователя «{$memb['members_display_name']}»"); - - $this->ipsclass->main_msg = "Пользователь изменен"; - + + $this->ipsclass->admin->save_log("Edited Member '{$memb['members_display_name']}' account"); + + $this->ipsclass->main_msg = "Member Edited"; + $this->ipsclass->admin->redirect_noscreen( $this->ipsclass->base_url . '§ion=content&act=mem&code=searchresults&searchtype=normal&memberid='.$this->ipsclass->input['mid'] ); } - + /*-------------------------------------------------------------------------*/ // Generate page string /*-------------------------------------------------------------------------*/ - + function _generate_page_string() { //----------------------------------------- // INIT //----------------------------------------- - + $page_array = array(); - + //----------------------------------------- // Get 'em //----------------------------------------- - - foreach( array('name', 'members_display_name', 'email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','gotcount', 'fromdel') as $bit ) + + foreach( array('name', 'members_display_name', 'email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','dnamewhere','gotcount', 'fromdel') as $bit ) { $page_array[] = array( $bit, trim($this->ipsclass->input[ $bit ]) ); } - + return $page_array; } - + /*-------------------------------------------------------------------------*/ // Generate page string url /*-------------------------------------------------------------------------*/ - + function _generate_page_string_url() { //----------------------------------------- // INIT //----------------------------------------- - + $page_array = ""; - + //----------------------------------------- // Get 'em //----------------------------------------- - - foreach( array('name', 'members_display_name', 'email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','gotcount', 'fromdel') as $bit ) + + foreach( array('name', 'members_display_name', 'email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','dnamewhere','gotcount', 'fromdel') as $bit ) { $page_array .= '&'.$bit.'='.trim($this->ipsclass->input[ $bit ]); } - + return $page_array; } - + //----------------------------------------- // Do banline (internal //----------------------------------------- - + function _do_banline($raw) { $ban = trim($this->ipsclass->txt_stripslashes($raw)); - + $ban = str_replace('|', "|", $ban); - + $ban = preg_replace( "/\n/", '|', str_replace( "\n\n", "\n", str_replace( "\r", "\n", $ban ) ) ); - + $ban = preg_replace( "/\|{1,}\s{1,}?/s", "|", $ban ); - + $ban = preg_replace( "/^\|/", "", $ban ); - + $ban = preg_replace( "/\|$/", "", $ban ); - + $ban = str_replace( "'", ''', $ban ); - + return $ban; } - + } diff --git a/upload/sources/action_admin/member_tools.php b/upload/sources/action_admin/member_tools.php index 8ca64a10..9574c0b3 100644 --- a/upload/sources/action_admin/member_tools.php +++ b/upload/sources/action_admin/member_tools.php @@ -2,25 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-11-27 17:07:12 -0600 (Mon, 27 Nov 2006) $ -| > $Revision: 741 $ +| > $Date: 2008-01-18 14:58:55 -0500 (Fri, 18 Jan 2008) $ +| > $Revision: 1168 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -35,7 +27,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -47,47 +39,47 @@ class ad_member_tools var $base_url; var $modules = ""; var $html; - + /** * Section title name * * @var string */ var $perm_main = "content"; - + /** * Section title name * * @var string */ var $perm_child = "mtools"; - + function auto_run() { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Инструменты' ); - + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Member Tools Home' ); + //----------------------------------------- // Load HTML //----------------------------------------- - + $this->html = $this->ipsclass->acp_load_template('cp_skin_member'); - + //----------------------------------------- // Get the sync module //----------------------------------------- - + if ( USE_MODULES == 1 ) { require ROOT_PATH."modules/ipb_member_sync.php"; - + $this->modules = new ipb_member_sync(); $this->modules->ipsclass =& $this->ipsclass; - } - + } + //----------------------------------------- - - $this->ipsclass->admin->page_title = "Инструменты IP"; - $this->ipsclass->admin->page_detail = 'Эта секция позволяет вам быстро и просто оперировать с IP-адресами пользователей.'; + + $this->ipsclass->admin->page_title = "Member Tool Box"; + $this->ipsclass->admin->page_detail = 'You can use the tools below to search for IP address.'; switch($this->ipsclass->input['code']) { @@ -95,12 +87,12 @@ class ad_member_tools $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' ); $this->show_ips(); break; - + case 'learnip': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' ); $this->learn_ip(); break; - + //----------------------------------------- case 'mod': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':mod' ); @@ -117,53 +109,53 @@ class ad_member_tools case 'lock': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':mod' ); $this->member_view_locked_queue(); - break; + break; case 'unlock': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':mod' ); $this->member_do_unlock(); - break; - - + break; + + //----------------------------------------- default: $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' ); $this->show_index(); break; } - + } - - + + //----------------------------------------- // // LEARN ABOUT THE IP. It's very good. // //----------------------------------------- - - + + function learn_ip() { if ( $this->ipsclass->input['ip'] == "" ) { - $this->show_index("Вы должны ввести IP-адрес для поиска"); + $this->show_index("You did not enter an IP address to search by"); } - + $ip = trim($this->ipsclass->input['ip']); - - $resolved = 'Недоступно (частичный IP-адрес)'; + + $resolved = 'N/A - Partial IP Address'; $exact = 0; - + if ( substr_count( $ip, '.' ) == 3 ) { $exact = 1; } - + if ( strstr( $ip, '*' ) ) { $exact = 0; $ip = str_replace( "*", "", $ip ); } - + if ( $exact != 0 ) { $resolved = @gethostbyaddr($ip); @@ -173,50 +165,50 @@ class ad_member_tools { $query = " LIKE '".$ip."%'"; } - + //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Хост {$this->ipsclass->input['ip']}" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "IP-адрес определяется как" , + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Host Address for {$this->ipsclass->input['ip']}" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "IP address resolves to" , $resolved ) ); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // Find registered members //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( "Пользователь" , "30%" ); - $this->ipsclass->adskin->td_header[] = array( "E-mail" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Сообщений" , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "IP-адрес" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Зарегистрирован" , "20%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Пользователи, использовавшие этот IP при РЕГИСТРАЦИИ" ); - + + $this->ipsclass->adskin->td_header[] = array( "Name" , "30%" ); + $this->ipsclass->adskin->td_header[] = array( "Email" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Posts" , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "IP" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Registered" , "20%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Members using that IP when REGISTERING" ); + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, members_display_name, email, posts, ip_address, joined', 'from' => 'members', 'where' => "ip_address{$query}", 'order' => 'joined DESC', 'limit' => array( 0,250) ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $this->ipsclass->DB->get_num_rows() ) { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "Записей не найдено", "center"); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "No Matches Found", "center"); } else { while ( $m = $this->ipsclass->DB->fetch_row() ) { - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $m['members_display_name'] , $m['email'], $m['posts'], @@ -225,64 +217,64 @@ class ad_member_tools ) ); } } - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // Find Names posted under //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( "Пользователь" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "E-mail" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "IP-адрес" , "15%" ); - $this->ipsclass->adskin->td_header[] = array( "Впервые использован" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Сообщение" , "15%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Пользователи использовавшие этот IP при НАПИСАНИИ СООБЩЕНИЯ" ); - + + $this->ipsclass->adskin->td_header[] = array( "Name" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Email" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "IP" , "15%" ); + $this->ipsclass->adskin->td_header[] = array( "First Used" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "View Post" , "15%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Members using that IP when POSTING" ); + $this->ipsclass->DB->cache_add_query( 'member_tools_learn_ip_one', array( 'query' => $query) ); $this->ipsclass->DB->cache_exec_query(); - + if ( ! $this->ipsclass->DB->get_num_rows() ) { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "Записей не найдено", "center"); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "No Matches Found", "center"); } else { while ( $m = $this->ipsclass->DB->fetch_row() ) { - $m['name'] = $m['name'] ? $m['name'] : "Гость"; - $m['email'] = $m['email'] ? $m['email'] : "Недоступно"; - + $m['name'] = $m['name'] ? $m['name'] : "Guest"; + $m['email'] = $m['email'] ? $m['email'] : "Not Available"; + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $m['name'] , $m['email'], $m['ip_address'], $this->ipsclass->get_date( $m['post_date'], 'SHORT' ), - "
    Просмотр сообщений
    ", + "
    View Post
    ", ) ); } } - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // Find Names VOTED under //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( "Пользователь" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "E-mail" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "IP-адрес" , "15%" ); - $this->ipsclass->adskin->td_header[] = array( "Впервые использован" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Голосование" , "15%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Пользователи использовавшие этот IP при ГОЛОСОВАНИИ" ); - + + $this->ipsclass->adskin->td_header[] = array( "Name" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Email" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "IP" , "15%" ); + $this->ipsclass->adskin->td_header[] = array( "First Used" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "View Poll" , "15%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Members using that IP when VOTING" ); + $this->ipsclass->DB->cache_add_query( 'member_tools_learn_ip_two', array( 'query' => $query) ); $this->ipsclass->DB->cache_exec_query(); - + if ( ! $this->ipsclass->DB->get_num_rows() ) { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "Записей не найдено", "center"); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "No Matches Found", "center"); } else { @@ -292,30 +284,30 @@ class ad_member_tools $m['email'], $m['ip_address'], $this->ipsclass->get_date( $m['vote_date'], 'SHORT' ), - "
    Просмотр опросов
    ", + "
    View Poll
    ", ) ); } } - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // Find Names EMAILING under //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( "Пользователь" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "E-mail" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "IP-адрес" , "15%" ); - $this->ipsclass->adskin->td_header[] = array( "Впервые использован" , "20%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Пользователи использовавшие этот IP при ОТПРАВКЕ EMAIL" ); - + + $this->ipsclass->adskin->td_header[] = array( "Name" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Email" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "IP" , "15%" ); + $this->ipsclass->adskin->td_header[] = array( "First Used" , "20%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Members using that IP when EMAILING other members" ); + $this->ipsclass->DB->cache_add_query( 'member_tools_learn_ip_three', array( 'query' => $query) ); $this->ipsclass->DB->cache_exec_query(); - + if ( ! $this->ipsclass->DB->get_num_rows() ) { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "Записей не найдено", "center"); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "No Matches Found", "center"); } else { @@ -328,27 +320,27 @@ class ad_member_tools ) ); } } - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - + + //----------------------------------------- // Find Names VALIDATING under //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( "Пользователь" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "E-mail" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "IP-адрес" , "15%" ); - $this->ipsclass->adskin->td_header[] = array( "Впервые использован" , "20%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Пользователи использовавшие этот IP при АКТИВАЦИИ УЧЕТНОЙ ЗАПИСИ" ); - + + $this->ipsclass->adskin->td_header[] = array( "Name" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Email" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "IP" , "15%" ); + $this->ipsclass->adskin->td_header[] = array( "First Used" , "20%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Members using that IP while VALIDATING their accounts" ); + $this->ipsclass->DB->cache_add_query( 'member_tools_learn_ip_four', array( 'query' => $query) ); $this->ipsclass->DB->cache_exec_query(); - + if ( ! $this->ipsclass->DB->get_num_rows() ) { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "Записей не найдено", "center"); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "No Matches Found", "center"); } else { @@ -361,162 +353,162 @@ class ad_member_tools ) ); } } - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); } - + //----------------------------------------- // // SHOW ALL IPs // //----------------------------------------- - - + + function show_ips() { if ( $this->ipsclass->input['name'] == "" and $this->ipsclass->input['member_id'] == "" ) { - $this->show_index("Вы должны ввести имя пользователя для поиска"); + $this->show_index("You did not enter a name to search by"); } - + if ( isset($this->ipsclass->input['member_id']) AND $this->ipsclass->input['member_id'] ) { $id = intval($this->ipsclass->input['member_id']); - + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, email, ip_address', 'from' => 'members', 'where' => "id=$id" ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $member = $this->ipsclass->DB->fetch_row() ) { - $this->show_index("Невозможно найти пользователя с ID «{$id}»."); + $this->show_index("Could not locate a member with the id of '$id'"); } } else { $name = addslashes($this->ipsclass->input['name']); - + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, members_display_name as name, email, ip_address', 'from' => 'members', 'where' => "name='{$name}' OR members_display_name='{$name}'" ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $member = $this->ipsclass->DB->fetch_row() ) { - $this->show_index( "Невозможно найти пользователя с таким именем, для дополнительных возможностей используйте форму ниже", $name ); + $this->show_index( "We could not find an exact match for that member name, some choices will be shown below", $name ); } } - + $this->ipsclass->DB->simple_construct( array( 'select' => 'count(distinct(ip_address)) as cnt', 'from' => 'posts', 'where' => "author_id={$member['id']}" ) ); $this->ipsclass->DB->simple_exec(); - + $count = $this->ipsclass->DB->fetch_row(); - + $st = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; $end = 50; - + $links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $count['cnt'], 'PER_PAGE' => $end, 'CUR_ST_VAL' => $st, - 'L_SINGLE' => "Одна страница", - 'L_MULTI' => "Несколько страниц", + 'L_SINGLE' => "Single Page", + 'L_MULTI' => "Multiple Pages", 'BASE_URL' => $this->ipsclass->base_url."&".$this->ipsclass->form_code."&code=showallips&member_id={$member['id']}", ) ); - + $master = array(); $ips = array(); - + $this->ipsclass->DB->cache_add_query( 'member_tools_show_ips', array( 'mid' => $member['id'], 'st' => $st, 'end' => $end ) ); $this->ipsclass->DB->cache_exec_query(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $master[] = $r; $ips[] = "'".$r['ip_address']."'"; } - + $reg = array(); - + if ( count($ips) > 0 ) { $this->ipsclass->DB->simple_construct( array( 'select' => 'id, members_display_name as name, ip_address', 'from' => 'members', 'where' => "ip_address IN (".implode(",",$ips).") AND id != {$member['id']}" ) ); $this->ipsclass->DB->simple_exec(); - + while ( $i = $this->ipsclass->DB->fetch_row() ) { $reg[ $i['ip_address'] ][] = $i; } } - + //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( "IP-адрес" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Входов с этого IP" , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Дата использования" , "25%" ); - $this->ipsclass->adskin->td_header[] = array( "Использовано при других регистрациях" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Инструмент IP" , "25%" ); - + + $this->ipsclass->adskin->td_header[] = array( "IP Address" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Times Used" , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "Date Used" , "25%" ); + $this->ipsclass->adskin->td_header[] = array( "Used for other Reg." , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "IP Tool" , "25%" ); + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "У пользователя {$member['name']} найдено ({$count['cnt']}) уникальных IP-адресов" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "{$member['name']}'s IP addresses ({$count['cnt']}) matches" ); + foreach( $master as $r ) { $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $r['ip_address'] , $r['ip'] , $this->ipsclass->get_date( $r['post_date'], 'SHORT' ), "
    ". intval( count($reg[ $r['ip_address'] ]) ). "
    ", - "
    Информация о IP-адресе
    " + "
    Learn about this IP
    " ) ); } - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "$links", "center" ); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); } - + //----------------------------------------- // // Default Screen // //----------------------------------------- - - + + function show_index($msg="", $membername="") { if ($msg != "") { $this->ipsclass->adskin->td_header[] = array( " " , "100%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Сообщение" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Message" ); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $msg ) ); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); } - + $this->ipsclass->html .= " "; - - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'showallips' ), 2 => array( 'act' , 'mtools' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Показать все IP-адреса, которые были у этого пользователя в момент добавления сообщений" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Show all IP Addresses a member has posted with" ); + if ( $membername == "" ) { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Введите имя пользователя:" , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Enter the member's name" , $this->ipsclass->adskin->form_input( "name", isset($_POST['name']) ? $this->ipsclass->txt_stripslashes($_POST['name']) : '', 'text', "id='name'" ) ) ); } @@ -524,76 +516,76 @@ class ad_member_tools { $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name', 'from' => 'members', 'where' => "members_l_username LIKE '{$membername}%'" ) ); $this->ipsclass->DB->simple_exec(); - + if ( ! $this->ipsclass->DB->get_num_rows() ) { - $this->show_index("Не найдено пользователей, у которых имя начинается с '$membername'."); + $this->show_index("There are no members with names that start with '$membername'"); } - + $mem_array = array(); - + while ( $m = $this->ipsclass->DB->fetch_row() ) { $mem_array[] = array( $m['id'], $m['name'] ); } - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Выберите пользователя:" , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Choose the member from the selection" , $this->ipsclass->adskin->form_dropdown( "member_id", $mem_array ) ) ); } - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Найти IP-адреса этого пользователя"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Get IP Addresses"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->html .= ""; - + //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'learnip' ), 2 => array( 'act' , 'mtools' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Информация об IP-адресе" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Вывести всю информацию об IP:" , + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "IP Multi-Tool" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Show me everything you know about this IP..." , $this->ipsclass->adskin->form_input( "ip", isset($_POST['ip']) ? $this->ipsclass->txt_stripslashes($_POST['ip']) : '' ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Вывести!"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Show me!"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // Process Moderation queue /*-------------------------------------------------------------------------*/ - + function member_do_moderation_queue() { //----------------------------------------- // INIT //----------------------------------------- - + $ids = array(); - + //----------------------------------------- // GET checkboxes //----------------------------------------- - + foreach ($this->ipsclass->input as $k => $v) { if ( preg_match( "/^mid_(\d+)$/", $k, $match ) ) @@ -604,47 +596,45 @@ class ad_member_tools } } } - + $ids = $this->ipsclass->clean_int_array( $ids ); - + //----------------------------------------- // Check //----------------------------------------- - + if ( count($ids) < 1 ) - { - $this->ipsclass->admin->error("Вы не выбрали пользователей для активации, удаления или повторной отправки письма."); + { + $this->ipsclass->admin->error("You did not select any members to approve, delete, or resend the validation email to"); } - + //----------------------------------------- // APPROVE //----------------------------------------- - + if ($this->ipsclass->input['type'] == 'approve') { //----------------------------------------- // Get email class //----------------------------------------- - + require ROOT_PATH."sources/classes/class_email.php"; - + $email = new emailer( ROOT_PATH ); $email->ipsclass =& $this->ipsclass; $email->email_init(); - + $email->get_template("complete_reg"); - - $email->build_message( "" ); - + $approved = array(); - + //----------------------------------------- // Get members //----------------------------------------- - + $this->ipsclass->DB->cache_add_query( 'member_domod', array( 'ids' => $ids ) ); $main = $this->ipsclass->DB->cache_exec_query(); - + while( $row = $this->ipsclass->DB->fetch_row( $main ) ) { $approved[] = $row['name']; @@ -653,41 +643,43 @@ class ad_member_tools { continue; } - + if ($row['real_group'] == "") { - $row['real_group'] = $this->ipsclass->vars['member_group']; + //$row['real_group'] = $this->ipsclass->vars['member_group']; + continue; } - + $this->ipsclass->DB->do_update( 'members', array( 'mgroup' => $row['real_group'] ), "id=".$row['id'] ); - - $email->subject = "Активация учетной записи «{$row['name']}» на «{$this->ipsclass->vars['board_name']}»"; + + $email->build_message( "" ); + $email->subject = "Account: {$row['name']}, validated at ".$this->ipsclass->vars['board_name']; $email->to = $row['email']; - + $email->send_mail(); - + if ( USE_MODULES == 1 ) { $this->modules->register_class($this); $this->modules->on_group_change($row['id'], $row['real_group']); } } - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'validating', 'where' => "member_id IN(".implode( ",",$ids ).")" ) ); - - $this->ipsclass->admin->save_log( count($ids)." учетных записей активировано: ".implode( ", ", $approved ) ); - + + $this->ipsclass->admin->save_log( count($ids)." Member Registrations Approved: ".implode( ", ", $approved ) ); + //----------------------------------------- // Stats to Update? //----------------------------------------- - + $stats = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='stats'" ) ); - + $stats = unserialize($this->ipsclass->txt_stripslashes($stats['cs_value'])); - + $this->ipsclass->DB->simple_construct( array( 'select' => 'count(id) as members', 'from' => 'members', 'where' => "mgroup <> '".$this->ipsclass->vars['auth_group']."'" ) ); $this->ipsclass->DB->simple_exec(); - + $r = $this->ipsclass->DB->fetch_row(); $stats['mem_count'] = intval($r['members']); @@ -697,59 +689,59 @@ class ad_member_tools 'order' => "id DESC", 'limit' => array(0,1) ) ); $this->ipsclass->DB->simple_exec(); - + $r = $this->ipsclass->DB->fetch_row(); $stats['last_mem_name'] = $r['members_display_name'] ? $r['members_display_name'] : $r['name']; $stats['last_mem_id'] = $r['id']; - + if ( count($stats) > 0 ) { $this->ipsclass->cache['stats'] =& $stats; $this->ipsclass->update_cache( array( 'name' => 'stats', 'array' => 1, 'deletefirst' => 1 ) ); - } - - $this->ipsclass->main_msg = count($ids)." учетных записей активировано."; + } + + $this->ipsclass->main_msg = count($ids)." Member Registrations Approved"; $this->member_view_moderation_queue(); } - + //----------------------------------------- // Resend validation email //----------------------------------------- - + else if ($this->ipsclass->input['type'] == 'resend') { //----------------------------------------- // Get email class //----------------------------------------- - + require ROOT_PATH."sources/classes/class_email.php"; - + $email = new emailer( ROOT_PATH ); $email->ipsclass =& $this->ipsclass; $email->email_init(); - + $reset = array(); $cant = array(); $main_msgs = array(); - + //----------------------------------------- // Get members //----------------------------------------- - + $this->ipsclass->DB->cache_add_query( 'member_domod', array( 'ids' => $ids ) ); $main = $this->ipsclass->DB->cache_exec_query(); - + while( $row = $this->ipsclass->DB->fetch_row( $main ) ) { if ($row['mgroup'] != $this->ipsclass->vars['auth_group']) { continue; } - + if ( $row['lost_pass'] == 1 ) { $email->get_template("lost_pass"); - + $email->build_message( array( 'NAME' => $row['members_display_name'], 'THE_LINK' => $this->ipsclass->vars['board_url']."/index.php?act=Reg&CODE=lostpassform&uid=".$row['id']."&aid=".$val['vid'], @@ -760,10 +752,10 @@ class ad_member_tools 'IP_ADDRESS' => $row['ip_address'], ) ); - - $email->subject = "Информация о восстановление пароля на «{$this->ipsclass->vars['board_name']}»"; + + $email->subject = "Password recovery information from ".$this->ipsclass->vars['board_name']; $email->to = $row['email']; - + $email->send_mail(); } else if ( $row['new_reg'] == 1 ) @@ -773,9 +765,9 @@ class ad_member_tools $cant[] = $row['members_display_name']; continue; } - + $email->get_template("reg_validate"); - + $email->build_message( array( 'THE_LINK' => $this->ipsclass->vars['board_url']."/index.php?act=Reg&CODE=03&uid=".$row['id']."&aid=".$row['vid'], 'NAME' => $row['members_display_name'], @@ -785,16 +777,16 @@ class ad_member_tools 'CODE' => $row['vid'], ) ); - - $email->subject = "Регистрация на ".$this->ipsclass->vars['board_name']; + + $email->subject = "Registration at ".$this->ipsclass->vars['board_name']; $email->to = $row['email']; - + $email->send_mail(); } else if ( $row['email_chg'] == 1 ) { $email->get_template("newemail"); - + $email->build_message( array( 'NAME' => $row['members_display_name'], 'THE_LINK' => $this->ipsclass->vars['board_url']."/index.php?act=Reg&CODE=03&type=newemail&uid=".$row['id']."&aid=".$row['vid'], @@ -803,48 +795,48 @@ class ad_member_tools 'CODE' => $row['vid'], ) ); - - $email->subject = "Запрос на изменение E-mail на ".$this->ipsclass->vars['board_name']; + + $email->subject = "Email change request at ".$this->ipsclass->vars['board_name']; $email->to = $row['email']; - + $email->send_mail(); } - + $resent[] = $row['members_display_name']; } - + if( count($resent) ) { - $this->ipsclass->admin->save_log( count($ids)." писем активации отправлено: ".implode( ", ", $resent) ); - $main_msgs[] = count($ids)." писем активации отправлено: ".implode( ", ", $resent); + $this->ipsclass->admin->save_log( count($resent)." Validation Emails Resent: ".implode( ", ", $resent) ); + $main_msgs[] = count($resent)." Validation Emails Resent: ".implode( ", ", $resent); } - + if( count($cant) ) { - $main_msgs[] = "Невозможно отправить письмо активации пользователям, которые ожидают активацию администратором: ".implode( ", ", $cant); + $main_msgs[] = "Cannot resend validation emails to the following members who are awaiting admin validation: ".implode( ", ", $cant); } - + $this->ipsclass->main_msg = count($main_msgs) ? implode( "
    ", $main_msgs ) : ''; - + $this->member_view_moderation_queue(); } - + //----------------------------------------- // DELETE //----------------------------------------- - + else { $denied = array(); - + $this->ipsclass->DB->build_query( array( 'select' => 'name', 'from' => 'members', 'where' => "id IN(".implode( ",",$ids ).")" ) ); $this->ipsclass->DB->exec_query(); - + while( $r = $this->ipsclass->DB->fetch_row() ) { $denied[] = $r['name']; } - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'members' , 'where' => "id IN(".implode( ",",$ids ).")" ) ); $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'member_extra' , 'where' => "id IN(".implode( ",",$ids ).")" ) ); $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'message_text' , 'where' => "msg_author_id IN(".implode( ",",$ids ).")" ) ); @@ -854,55 +846,65 @@ class ad_member_tools $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'pfields_content' , 'where' => "member_id IN(".implode( ",",$ids ).")" ) ); $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'warn_logs' , 'where' => "wlog_mid IN(".implode( ",",$ids ).")" ) ); $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'members_converge', 'where' => "converge_id IN(".implode( ",",$ids ).")" ) ); - + + $this->ipsclass->DB->do_update( 'profile_comments', array( 'comment_by_member_id' => 0 ), "comment_by_member_id IN(".implode( ",",$ids ).")" ); + $this->ipsclass->DB->do_update( 'profile_ratings', array( 'rating_by_member_id' => 0 ), "rating_by_member_id IN(".implode( ",",$ids ).")" ); + + $this->ipsclass->DB->do_delete( 'profile_comments', "comment_for_member_id IN(".implode( ",",$ids ).")" ); + $this->ipsclass->DB->do_delete( 'profile_ratings', "rating_for_member_id IN(".implode( ",",$ids ).")" ); + + $this->ipsclass->DB->do_delete( 'profile_portal', "pp_member_id IN(".implode( ",",$ids ).")" ); + $this->ipsclass->DB->do_delete( 'profile_friends', "friends_member_id IN(".implode( ",",$ids ).")" ); + $this->ipsclass->DB->do_delete( 'profile_friends', "friends_friend_id IN(".implode( ",",$ids ).")" ); + $this->ipsclass->DB->do_update( 'posts' , array( 'author_id' => 0 ), "author_id IN(".implode( ",",$ids ).")" ); $this->ipsclass->DB->do_update( 'topics', array( 'starter_id' => 0 ), "starter_id IN(".implode( ",",$ids ).")" ); - + if ( USE_MODULES == 1 ) { $this->modules->register_class($this); $this->modules->on_delete($ids); } - - $this->ipsclass->admin->save_log( count($ids)." регистраций пользователей не было одобрено: ".implode( ", ", $denied) ); - - $this->ipsclass->main_msg = count($ids)." пользователей удалено."; + + $this->ipsclass->admin->save_log( count($ids)." Member Registrations Denied: ".implode( ", ", $denied) ); + + $this->ipsclass->main_msg = count($ids)." Members Removed"; $this->member_view_moderation_queue(); } } - - + + function member_do_email_unapprove() { //----------------------------------------- // GET member //----------------------------------------- - + if( !isset($this->ipsclass->input['mid']) ) { - $this->ipsclass->admin->error("Вы не указали ID пользователя."); + $this->ipsclass->admin->error("You did not select any members to unapprove"); } - + $id = intval($this->ipsclass->input['mid']); - + $member = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'validating', 'where' => 'member_id='.$id ) ); - + if( !isset($member['vid']) OR !$member['vid'] ) { - $this->ipsclass->admin->error("Невозможно найти пользователя с указанным ID в неактивированных пользователях."); + $this->ipsclass->admin->error("We did not find any validations pending for this member"); } - + if( !$member['email_chg'] ) { $this->ipsclass->admin->error("You can only unapprove email change requests"); } - + $this->ipsclass->DB->do_update( "members", array( 'email' => $member['prev_email'], 'mgroup' => $member['real_group'] ), "id=".$id ); - + $this->ipsclass->DB->do_update( "members_converge", array( 'converge_email' => $member['prev_email'] ), "converge_id=".$id ); - + $this->ipsclass->DB->do_delete( "validating", "vid='{$member['vid']}'" ); - + if ( USE_MODULES == 1 ) { @@ -910,54 +912,54 @@ class ad_member_tools $this->modules->on_group_change($member['member_id'], $member['real_group']); } - $this->ipsclass->admin->save_log( "Изменение e-mail адреса пользователем {$id} не одобрено."); + $this->ipsclass->admin->save_log( "Member {$id} email change request un-approved"); + - - $this->ipsclass->main_msg = "Изменение e-mail адреса пользователем {$id} не одобрено."; + $this->ipsclass->main_msg = "Member {$id} email change request un-approved"; $this->member_view_moderation_queue(); } - + /*-------------------------------------------------------------------------*/ // View locked user accounts due to failed login /*-------------------------------------------------------------------------*/ - + function member_view_locked_queue() { //----------------------------------------- // INIT //----------------------------------------- - + $st = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; $content = ""; - + //----------------------------------------- // SET PAGE TITLE //----------------------------------------- - - $this->ipsclass->admin->page_title = "Управление заблокированными учетными записями"; - $this->ipsclass->admin->page_detail = "В этой секции вы можете разблокировать пользователей, которые исчерпали количество допустимых попыток авторизации на форуме.
    Если необходимо, вы так же можете окончательно заблокировать учетные записи пользователей, выбрав соответсвующую опцию в выпадающем меню."; - $this->ipsclass->admin->nav[] = array( '', 'Заблокированные учетные записи' ); - + + $this->ipsclass->admin->page_title = "Manage Locked User Account Queue"; + $this->ipsclass->admin->page_detail = "This section allows you to unlock locked user accounts. A user account is locked when they submit the wrong password to login based on your configurations in the ACP Security Settings."; + $this->ipsclass->admin->nav[] = array( '', 'Locked Accounts' ); + //----------------------------------------- // Get count //----------------------------------------- - + if( $this->ipsclass->vars['ipb_bruteforce_attempts'] == 0 ) { - $content = $this->html->member_locked_no_rows( "У вас выключена защита от автоматического перебора паролей." ); + $content = $this->html->member_locked_no_rows( "You have not enabled account locking brute force protection" ); } else { $this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(*) as mcount', 'from' => 'members', 'where' => "failed_login_count>=".$this->ipsclass->vars['ipb_bruteforce_attempts'] ) ); $this->ipsclass->DB->simple_exec(); - + $row = $this->ipsclass->DB->fetch_row(); $cnt = intval($row['mcount']); - + //----------------------------------------- // Pages... //----------------------------------------- - + $links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $cnt, 'PER_PAGE' => 75, 'CUR_ST_VAL' => $st, @@ -965,11 +967,11 @@ class ad_member_tools 'L_MULTI' => "", 'BASE_URL' => $this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=lock", ) ); - + //----------------------------------------- // Print... //----------------------------------------- - + if ($cnt > 0) { $this->ipsclass->DB->build_query( array( 'select' => 'name, mgroup, members_display_name, ip_address, id, email, posts, joined, failed_logins, failed_login_count', @@ -980,90 +982,90 @@ class ad_member_tools ) ); $this->ipsclass->DB->exec_query(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $used_ips = array(); $this_attempt = array(); $oldest = 0; $newest = 0; - + if( $r['failed_logins'] ) { $failed_logins = explode( ",", $this->ipsclass->clean_perm_string( $r['failed_logins'] ) ); - + if( is_array($failed_logins) AND count($failed_logins) ) { sort($failed_logins); - + foreach( $failed_logins as $attempt ) { $this_attempt = explode( "-", $attempt ); $used_ips[] = $this_attempt[1]; } - + $oldest = array_shift($failed_logins); $newest = array_pop($failed_logins); } } - + $newest = explode( "-", $newest ); $oldest = explode( "-", $oldest ); - + $r['group_title'] = $this->ipsclass->cache['group_cache'][ $r['mgroup'] ]['g_title']; - + $r['oldest_fail'] = $this->ipsclass->get_date( $oldest[0], 'SHORT' ); $r['newest_fail'] = $this->ipsclass->get_date( $newest[0], 'SHORT' ); $r['_joined'] = $this->ipsclass->get_date( $r['joined'] , 'TINY' ); - + $r['ip_addresses'] = ""; - + $used_ips = array_unique($used_ips); - + foreach( $used_ips as $ip_address ) { $r['ip_addresses'] .= "IP: {$ip_address}
    "; } - + if ( !isset($r['name']) OR $r['name'] == "" ) { - $r['name'] = "Пользователь удален"; + $r['name'] = "Deleted Member"; } - + //----------------------------------------- // Print row //----------------------------------------- - + $content .= $this->html->member_locked_row( $r ); } } else { - $content = $this->html->member_locked_no_rows( "Заблокированных учетных записей не найдено." ); + $content = $this->html->member_locked_no_rows( "No locked accounts were found" ); } } - + $this->ipsclass->html .= $this->html->member_locked_wrapper($content, $st, $links); - + $this->ipsclass->admin->output(); - } - + } + /*-------------------------------------------------------------------------*/ // Process locked member queue /*-------------------------------------------------------------------------*/ - + function member_do_unlock() { //----------------------------------------- // INIT //----------------------------------------- - + $ids = array(); - + //----------------------------------------- // GET checkboxes //----------------------------------------- - + foreach ($this->ipsclass->input as $k => $v) { if ( preg_match( "/^mid_(\d+)$/", $k, $match ) ) @@ -1074,60 +1076,60 @@ class ad_member_tools } } } - + $ids = $this->ipsclass->clean_int_array( $ids ); - + //----------------------------------------- // Check //----------------------------------------- - + if ( count($ids) < 1 ) - { - $this->ipsclass->admin->error("Вы не указали ID пользователя для разблокировки или блокироки."); + { + $this->ipsclass->admin->error("You did not select any members to unlock or ban"); } - + //----------------------------------------- // Unlock //----------------------------------------- - + if ($this->ipsclass->input['type'] == 'unlock') { $this->ipsclass->DB->do_update( "members", array( 'failed_logins' => '', 'failed_login_count' => 0 ), "id IN(".implode( ',', $ids ).')' ); - - $this->ipsclass->admin->save_log( count($ids)." пользователей разблокировано"); - - $this->ipsclass->main_msg = count($ids)." пользователей разблокировано"; + + $this->ipsclass->admin->save_log( count($ids)." Member(s) Unlocked"); + + $this->ipsclass->main_msg = count($ids)." Member(s) Unlocked"; $this->member_view_locked_queue(); } - + //----------------------------------------- // Ban //----------------------------------------- - + else if ($this->ipsclass->input['type'] == 'ban') { if( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) { // This isn't a root admin - make sure they can't ban a root admin - + $this->ipsclass->DB->build_query( array( 'select' => 'mgroup', 'from' => 'members', 'where' => "id IN(".implode( ',', $ids ).')' ) ); $this->ipsclass->DB->exec_query(); - + while( $mem = $this->ipsclass->DB->fetch_row() ) { if( $mem['mgroup'] == $this->ipsclass->vars['admin_group'] ) { - $this->ipsclass->admin->error( "Вы не можете блокировать главных администраторов." ); + $this->ipsclass->admin->error( "You cannot ban a root administrator" ); } } } - + $five_is_present = 0; $banned_gid = isset( $this->ipsclass->vars['banned_group'] ) AND $this->ipsclass->vars['banned_group'] ? $this->ipsclass->vars['banned_group'] : 0; - + $this->ipsclass->DB->build_query( array( 'select' => 'g_view_board,g_id', 'from' => 'groups', 'where' => 'g_view_board=0' ) ); $this->ipsclass->DB->exec_query(); - + if ( ! $banned_gid ) { while( $r = $this->ipsclass->DB->fetch_row() ) @@ -1137,40 +1139,40 @@ class ad_member_tools { $five_is_present = 1; } - + $banned_gid = $r['g_id']; } - + if ( $five_is_present ) { $banned_gid = 5; } } - + if ( ! $banned_gid ) { - $this->ipsclass->admin->error( "У вас нет группы пользователей, которая не может просматривать форум — не удалось найти группу «Заблокированные»." ); + $this->ipsclass->admin->error( "You do not have any groups configured who cannot view the board - we could not find a 'Banned' group to place the members in" ); } - + $this->ipsclass->DB->do_update( "members", array( 'failed_logins' => '', 'failed_login_count' => 0, 'mgroup' => $banned_gid ), "id IN(".implode( ',', $ids ).')' ); - - $this->ipsclass->admin->save_log( count($ids)." пользователей заблокировано"); - - $this->ipsclass->main_msg = count($ids)." пользователей заблокировано"; + + $this->ipsclass->admin->save_log( count($ids)." Member(s) Banned"); + + $this->ipsclass->main_msg = count($ids)." Member(s) Banned"; $this->member_view_locked_queue(); } - } - + } + /*-------------------------------------------------------------------------*/ // View member moderation queue /*-------------------------------------------------------------------------*/ - + function member_view_moderation_queue() { //----------------------------------------- // INIT //----------------------------------------- - + $this->ipsclass->input['ord'] = isset($this->ipsclass->input['ord']) ? $this->ipsclass->input['ord'] : ''; $st = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; $ord = $this->ipsclass->input['ord'] == 'asc' ? 'asc' : 'desc'; @@ -1178,19 +1180,19 @@ class ad_member_tools $filter = isset($this->ipsclass->input['filter']) ? $this->ipsclass->input['filter'] : ''; $q_extra = ""; $content = ""; - + //----------------------------------------- // SET PAGE TITLE //----------------------------------------- - - $this->ipsclass->admin->page_title = "Управление неактивированными или изменившими e-mail пользователями"; - $this->ipsclass->admin->page_detail = "В этой секции вы сможете просмотреть список всех пользователей, которые ещё не активировали свою учетную запись после регистрации или изменения e-mail адреса.
    Ниже вы сможете выбрать учетные записи для активации или удаления, а так же повторной отправки письма с инструкциями."; - $this->ipsclass->admin->nav[] = array( '', 'Неактивированные пользователи' ); - + + $this->ipsclass->admin->page_title = "Manage User Registration/Email Change Queues"; + $this->ipsclass->admin->page_detail = "This section allows you to approve or deny registrations where you have requested that an administrator previews new accounts before allowing full membership. It will also allow you to complete or deny new email address changes, and resend validation emails.

    This form will also allow you to complete the registrations for those who did not receive an email."; + $this->ipsclass->admin->nav[] = array( '', 'Validating Members' ); + //----------------------------------------- // Add extra query //----------------------------------------- - + switch( $filter ) { case 'reg_user_validate': @@ -1210,14 +1212,18 @@ class ad_member_tools } break; case 'email_chg': - $q_extra = " AND v.email_chg=1"; + $q_extra = " AND v.email_chg=1"; + break; + + case 'coppa': + $q_extra = " AND v.coppa_user=1"; break; } - + //----------------------------------------- // Get count //----------------------------------------- - + $this->ipsclass->DB->build_query( array( 'select' => 'COUNT(*) as mcount', 'from' => array( 'validating' => 'v' ), 'where' => "v.lost_pass=0 AND m.mgroup={$this->ipsclass->vars['auth_group']}".$q_extra, @@ -1231,14 +1237,14 @@ class ad_member_tools ), ) ); $this->ipsclass->DB->exec_query(); - + $row = $this->ipsclass->DB->fetch_row(); $cnt = intval($row['mcount']); - + //----------------------------------------- // Sorted? //----------------------------------------- - + switch ($this->ipsclass->input['sort']) { case 'mem': @@ -1259,12 +1265,12 @@ class ad_member_tools default: $col = 'v.entry_date'; break; - } - + } + //----------------------------------------- // Pages... //----------------------------------------- - + $links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $cnt, 'PER_PAGE' => 75, 'CUR_ST_VAL' => $st, @@ -1272,11 +1278,11 @@ class ad_member_tools 'L_MULTI' => "", 'BASE_URL' => $this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=mod&ord={$ord}&filter={$filter}", ) ); - + //----------------------------------------- // Print... //----------------------------------------- - + if ($cnt > 0) { $this->ipsclass->DB->build_query( array( 'select' => 'v.*', @@ -1295,7 +1301,7 @@ class ad_member_tools ) ); //$this->ipsclass->DB->cache_add_query( 'member_view_mod', array( 'col' => $col, 'ord' => $ord, 'st' => $st, 'extra' => $q_extra ) ); $this->ipsclass->DB->exec_query(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { if ($r['coppa_user'] == 1) @@ -1306,52 +1312,52 @@ class ad_member_tools { $r['_coppa'] = ""; } - - $r['_where'] = ( $r['lost_pass'] ? 'Восстановление пароля' : ( $r['new_reg'] ? "Регистрация (активация пользователем)" : ( $r['email_chg'] ? "Изменение e-mail" : 'Неизвестно' ) ) ); - + + $r['_where'] = ( $r['lost_pass'] ? 'Lost Password' : ( $r['new_reg'] ? "Registering (User validation)" : ( $r['email_chg'] ? "Email Change" : 'N/A' ) ) ); + if( isset($r['email_chg']) AND $r['email_chg'] ) { $r['_where'] .= " (Unapprove?)"; } - + //----------------------------------------- // Update user_admin validation //----------------------------------------- - + if ( $r['new_reg'] AND ( $r['user_verified'] == 1 OR $this->ipsclass->vars['reg_auth_type'] == 'admin' ) ) { - $r['_where'] = "Регистрация: (активация администратором)"; + $r['_where'] = "Registering: (Admin Validation)"; } - + $r['_hours'] = floor( ( time() - $r['entry_date'] ) / 3600 ); $r['_days'] = intval( $r['_hours'] / 24 ); $r['_rhours'] = intval( $r['_hours'] - ($r['_days'] * 24) ); $r['_joined'] = $this->ipsclass->get_date( $r['joined'] , 'TINY' ); $r['_entry'] = $this->ipsclass->get_date( $r['entry_date'], 'TINY' ); - + if ( !isset($r['name']) OR $r['name'] == "" ) { - $r['name'] = "Удаленный пользователь"; + $r['name'] = "Deleted Member"; } - + //----------------------------------------- // Print row //----------------------------------------- - + $content .= $this->html->member_validating_row( $r ); } } else { - $content = $this->html->member_locked_no_rows( "Нет неактивированных пользователей." ); + $content = $this->html->member_locked_no_rows( "No members awaiting validation" ); } - + $this->ipsclass->html .= $this->html->member_validating_wrapper($content, $st, $new_ord, $links); - + $this->ipsclass->admin->output(); } - - + + } ?> \ No newline at end of file diff --git a/upload/sources/action_admin/moderator.php b/upload/sources/action_admin/moderator.php index 063580ab..aab8503b 100644 --- a/upload/sources/action_admin/moderator.php +++ b/upload/sources/action_admin/moderator.php @@ -1,765 +1,756 @@ - $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > Admin Category functions -| > Module written by Matt Mecham -| > Date started: 1st march 2002 -| -| > Module Version Number: 1.0.0 -| > DBA Checked: Tue 25th May 2004 -+-------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - -class ad_moderator { - - var $base_url; - - /** - * Section title name - * - * @var string - */ - var $perm_main = "content"; - - /** - * Section title name - * - * @var string - */ - var $perm_child = "mod"; - - function auto_run() - { - $this->ipsclass->forums->forums_init(); - - require ROOT_PATH.'sources/lib/admin_forum_functions.php'; - - $this->forumfunc = new admin_forum_functions(); - $this->forumfunc->ipsclass =& $this->ipsclass; - - //----------------------------------------- - - switch($this->ipsclass->input['code']) - { - case 'add': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); - $this->moderator_add_preform(); - break; - - case 'add_final': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); - $this->mod_form('add'); - break; - case 'doadd': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); - $this->add_mod(); - break; - - case 'edit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->mod_form('edit'); - break; - - case 'doedit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->do_edit(); - break; - - case 'remove': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); - $this->do_delete(); - break; - - default: - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->show_list(); - break; - } - - } - - //----------------------------------------- - // - // DELETE MODERATOR - // - //----------------------------------------- - - function do_delete() - { - if ($this->ipsclass->input['mid'] == "") - { - $this->ipsclass->admin->error("Вы должны ввести ID модератора"); - } - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'moderators', 'where' => "mid=".intval($this->ipsclass->input['mid']) ) ); - $this->ipsclass->DB->simple_exec(); - - $mod = $this->ipsclass->DB->fetch_row(); - - if ( $mod['is_group'] ) - { - $name = 'Группа: '.$mod['group_name']; - } - else - { - $name = $mod['member_name']; - } - - $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'moderators', 'where' => "mid=".intval($this->ipsclass->input['mid']) ) ); - - $this->rebuild_moderator_cache(); - - $this->ipsclass->admin->save_log("Удален модератор '{$name}'"); - - $this->ipsclass->main_msg = "Модератор удален"; - $this->ipsclass->admin->redirect_noscreen( $this->ipsclass->base_url.'§ion=content&act=forum' ); - } - - - //----------------------------------------- - // - // EDIT MODERATOR - // - //----------------------------------------- - - function do_edit() - { - if ($this->ipsclass->input['mid'] == "") - { - $this->ipsclass->admin->error("Вы должны ввести ID модератора"); - } - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'moderators', 'where' => "mid=".intval($this->ipsclass->input['mid']) ) ); - $this->ipsclass->DB->simple_exec(); - - $mod = $this->ipsclass->DB->fetch_row(); - - //----------------------------------------- - // Build Mr Hash - //----------------------------------------- - - $this->ipsclass->DB->do_update( 'moderators', array( - 'forum_id' => intval($this->ipsclass->input['forum_id']), - 'edit_post' => intval($this->ipsclass->input['edit_post']), - 'edit_topic' => intval($this->ipsclass->input['edit_topic']), - 'delete_post' => intval($this->ipsclass->input['delete_post']), - 'delete_topic' => intval($this->ipsclass->input['delete_topic']), - 'view_ip' => intval($this->ipsclass->input['view_ip']), - 'open_topic' => intval($this->ipsclass->input['open_topic']), - 'close_topic' => intval($this->ipsclass->input['close_topic']), - 'mass_move' => intval($this->ipsclass->input['mass_move']), - 'mass_prune' => intval($this->ipsclass->input['mass_prune']), - 'move_topic' => intval($this->ipsclass->input['move_topic']), - 'pin_topic' => intval($this->ipsclass->input['pin_topic']), - 'unpin_topic' => intval($this->ipsclass->input['unpin_topic']), - 'post_q' => intval($this->ipsclass->input['post_q']), - 'topic_q' => intval($this->ipsclass->input['topic_q']), - 'allow_warn' => intval($this->ipsclass->input['allow_warn']), - 'split_merge' => intval($this->ipsclass->input['split_merge']), - 'edit_user' => intval($this->ipsclass->input['edit_user']), - 'can_mm' => intval($this->ipsclass->input['can_mm']), - 'mod_can_set_open_time' => intval($this->ipsclass->input['mod_can_set_open_time']), - 'mod_can_set_close_time' => intval($this->ipsclass->input['mod_can_set_close_time']), - ) , 'mid='.intval($this->ipsclass->input['mid']) ); - - $this->rebuild_moderator_cache(); - - $this->ipsclass->admin->save_log("Изменен модератор '{$mod['member_name']}'"); - - $this->ipsclass->main_msg = "Модератор изменен"; - $this->ipsclass->admin->redirect_noscreen( $this->ipsclass->base_url.'§ion=content&act=forum' ); - } - - //----------------------------------------- - // - // ADD MODERATOR - // - //----------------------------------------- - - function add_mod() - { - if ($this->ipsclass->input['fid'] == "") - { - $this->ipsclass->admin->error("Вы должны ввести ID форума для добавления модератора."); - } - - //----------------------------------------- - // Build Mr Hash - //----------------------------------------- - - $mr_hash = array( - 'edit_post' => intval($this->ipsclass->input['edit_post']), - 'edit_topic' => intval($this->ipsclass->input['edit_topic']), - 'delete_post' => intval($this->ipsclass->input['delete_post']), - 'delete_topic' => intval($this->ipsclass->input['delete_topic']), - 'view_ip' => intval($this->ipsclass->input['view_ip']), - 'open_topic' => intval($this->ipsclass->input['open_topic']), - 'close_topic' => intval($this->ipsclass->input['close_topic']), - 'mass_move' => intval($this->ipsclass->input['mass_move']), - 'mass_prune' => intval($this->ipsclass->input['mass_prune']), - 'move_topic' => intval($this->ipsclass->input['move_topic']), - 'pin_topic' => intval($this->ipsclass->input['pin_topic']), - 'unpin_topic' => intval($this->ipsclass->input['unpin_topic']), - 'post_q' => intval($this->ipsclass->input['post_q']), - 'topic_q' => intval($this->ipsclass->input['topic_q']), - 'allow_warn' => intval($this->ipsclass->input['allow_warn']), - 'split_merge' => intval($this->ipsclass->input['split_merge']), - 'edit_user' => intval($this->ipsclass->input['edit_user']), - 'can_mm' => intval($this->ipsclass->input['can_mm']), - 'mod_can_set_open_time' => intval($this->ipsclass->input['mod_can_set_open_time']), - 'mod_can_set_close_time' => intval($this->ipsclass->input['mod_can_set_close_time']), - ); - - $forum_ids = array(); - - $this->ipsclass->DB->simple_construct( array( 'select' => 'id', 'from' => 'forums', 'where' => "id IN(".$this->ipsclass->input['fid'].")" ) ); - $this->ipsclass->DB->simple_exec(); - - while( $i = $this->ipsclass->DB->fetch_row() ) - { - $forum_ids[ $i['id'] ] = $i['id']; - } - - //----------------------------------------- - - if ($this->ipsclass->input['mod_type'] == 'group') - { - - if ($this->ipsclass->input['gid'] == "") - { - $this->ipsclass->admin->error("Невозможно найти группу с таким ID"); - } - - $this->ipsclass->DB->simple_construct( array( 'select' => 'g_id, g_title', 'from' => 'groups', 'where' => "g_id=".intval($this->ipsclass->input['gid']) ) ); - $this->ipsclass->DB->simple_exec(); - - if ( ! $group = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->admin->error("Невозможно найти группу с таким ID"); - } - - //----------------------------------------- - // Already using this group on this forum? - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'moderators', 'where' => "forum_id IN(".$this->ipsclass->input['fid'].") and group_id=".intval($this->ipsclass->input['gid']) ) ); - $this->ipsclass->DB->simple_exec(); - - while( $f = $this->ipsclass->DB->fetch_row() ) - { - unset($forum_ids[ $f['forum_id'] ]); - } - - $mr_hash['member_name'] = '-1'; - $mr_hash['member_id'] = '-1'; - $mr_hash['group_id'] = $group['g_id']; - $mr_hash['group_name'] = $group['g_title']; - $mr_hash['is_group'] = 1; - - $ad_log = "Добавлена группа модераторов '{$group['g_title']}'"; - - } - else - { - - if ($this->ipsclass->input['mem'] == "") - { - $this->ipsclass->admin->error("Вы не выбрали пользователя которому хотите дать модераторские права"); - } - - $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name', 'from' => 'members', 'where' => "id=".intval($this->ipsclass->input['mem']) ) ); - $this->ipsclass->DB->simple_exec(); - - if ( ! $mem = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->admin->error("Вы не выбрали пользователя которому хотите дать модераторские права."); - } - - //----------------------------------------- - // Already using this member on this forum? - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'moderators', 'where' => "forum_id IN(".$this->ipsclass->input['fid'].") and member_id=".intval($this->ipsclass->input['mem']) ) ); - $this->ipsclass->DB->simple_exec(); - - while( $f = $this->ipsclass->DB->fetch_row() ) - { - unset($forum_ids[ $f['forum_id'] ]); - } - - $mr_hash['member_name'] = $mem['name']; - $mr_hash['member_id'] = $mem['id']; - $mr_hash['is_group'] = 0; - - $ad_log = "Добавлен модератор '{$mem['name']}'"; - - } - - //----------------------------------------- - // Check for legal forums - //----------------------------------------- - - if ( count($forum_ids) == 0) - { - $this->ipsclass->admin->error("Вы не выбрали ни одного форума для которых хотите добавить модераторов."); - } - - //----------------------------------------- - // Loopy loopy - //----------------------------------------- - - foreach ($forum_ids as $cartman) - { - $mr_hash['forum_id'] = $cartman; - - $this->ipsclass->DB->force_data_type = array( 'member_name' => 'string' ); - - $this->ipsclass->DB->do_insert( 'moderators', $mr_hash ); - } - - $this->ipsclass->admin->save_log($ad_log); - - $this->rebuild_moderator_cache(); - - $this->ipsclass->main_msg = "Модераторы добавлены"; - $this->ipsclass->admin->redirect_noscreen( $this->ipsclass->base_url.'§ion=content&act=forum' ); - } - - //----------------------------------------- - // - // Rebuild moderator cache - // - //----------------------------------------- - - function rebuild_moderator_cache() - { - $this->ipsclass->cache['moderators'] = array(); - - //----------------------------------------- - // Get dem moderators - //----------------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => 'moderator.*', - 'from' => array( 'moderators' => 'moderator' ), - 'add_join' => array( 0 => array( 'select' => 'm.members_display_name', - 'from' => array( 'members' => 'm' ), - 'where' => "m.id=moderator.member_id", - 'type' => 'left' ) ) ) ); - - $this->ipsclass->DB->exec_query(); - - while ( $i = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->cache['moderators'][ $i['mid'] ] = $i; - } - - $this->ipsclass->update_cache( array( 'name' => 'moderators', 'array' => 1, 'deletefirst' => 1 ) ); - } - - //----------------------------------------- - // - // ADD FINAL, display the add / edit form - // - //----------------------------------------- - - function mod_form( $type='add' ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $group = array(); - - if ($type == 'add') - { - if ( $this->ipsclass->input['fid'] == "" ) - { - $this->ipsclass->admin->error("Вы должны ввести ID форума для добавления модератора"); - } - - $mod = array(); - $names = array(); - - //----------------------------------------- - // Get forums - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => 'name', 'from' => 'forums', 'where' => "id IN(".$this->ipsclass->input['fid'].")" ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $names[] = $r['name']; - } - - $thenames = implode( ", ", $names ); - - //----------------------------------------- - // Start proper - //----------------------------------------- - - $button = "Добавить этого модератора"; - - $form_code = 'doadd'; - - if ( $this->ipsclass->input['group'] ) - { - $this->ipsclass->DB->simple_construct( array( 'select' => 'g_id, g_title', 'from' => 'groups', 'where' => "g_id=".intval($this->ipsclass->input['group']) ) ); - $this->ipsclass->DB->simple_exec(); - - if (! $group = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->admin->error("Невозможно найти выбранную группу пользователей"); - } - - $this->ipsclass->admin->page_detail = "Добавление группы: {$group['g_title']} в качестве модератора для: $thenames"; - $this->ipsclass->admin->page_title = "Добавление группы модераторов"; - } - else - { - if ( ! $this->ipsclass->input['member_id'] ) - { - $this->ipsclass->admin->error("Вы должны указать ID пользователя"); - } - else - { - $this->ipsclass->DB->simple_construct( array( 'select' => 'name, id', 'from' => 'members', 'where' => "id=".intval($this->ipsclass->input['member_id']) ) ); - $this->ipsclass->DB->simple_exec(); - - if ( ! $mem = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->admin->error("Пользователь с таким ID не существует"); - } - - $member_id = $mem['id']; - $member_name = $mem['name']; - } - - $this->ipsclass->admin->page_detail = "Добавление пользователя $member_name в качестве модератора для: $thenames"; - $this->ipsclass->admin->page_title = "Добавление модератора"; - - } - - } - else - { - if ($this->ipsclass->input['mid'] == "") - { - $this->ipsclass->admin->error("Вы должны указать ID существующего модератора."); - } - - $button = "Изменить этого модератора"; - - $form_code = "doedit"; - - $this->ipsclass->admin->page_title = "Измение модераторских прав"; - $this->ipsclass->admin->page_detail = "Пожалуйста, перед тем, как подтвердить форму, проверьте все поля очень внимательно"; - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'moderators', 'where' => "mid=".intval($this->ipsclass->input['mid']) ) ); - $this->ipsclass->DB->simple_exec(); - - if ( ! $mod = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->admin->error("Невозможно найти запись с этим модератором"); - } - - $member_id = $mod['member_id']; - $member_name = $mod['member_name']; - } - - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , $form_code ), - 2 => array( 'act' , 'mod' ), - 3 => array( 'mid' , $mod['mid']), - 4 => array( 'fid' , $this->ipsclass->input['fid'] ), - 5 => array( 'mem' , $member_id ), - 6 => array( 'mod_type' , $this->ipsclass->input['group'] ? 'group' : 'name' ), - 7 => array( 'gid' , $group['g_id'] ), - 8 => array( 'gname' , $group['g_name'] ), - 9 => array( 'section' , $this->ipsclass->section_code ), - ) ); - - //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Основные настройки" ); - - //----------------------------------------- - - if ($type == 'edit') - { - $forums = array(); - - $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name', 'from' => 'forums', 'order' => "position" ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $forums[] = array( $r['id'], $r['name'] ); - } - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Какой форум модерирует?" , - $this->ipsclass->adskin->form_dropdown( "forum_id", $forums, $mod['forum_id'] ) - ) ); - } - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Может изменять чужие темы/голосования?" , - $this->ipsclass->adskin->form_yes_no("edit_post", $mod['edit_post'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Может изменять название чужих тем?" , - $this->ipsclass->adskin->form_yes_no("edit_topic", $mod['edit_topic'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Может удалять чужие сообщения?" , - $this->ipsclass->adskin->form_yes_no("delete_post", $mod['delete_post'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Может удалять чужие темы/голосования?" , - $this->ipsclass->adskin->form_yes_no("delete_topic", $mod['delete_topic'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Может видеть IP-адреса пользователей?" , - $this->ipsclass->adskin->form_yes_no("view_ip", $mod['view_ip'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Может открывать темы?" , - $this->ipsclass->adskin->form_yes_no("open_topic", $mod['open_topic'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Может закрывать темы?" , - $this->ipsclass->adskin->form_yes_no("close_topic", $mod['close_topic'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Может перемещать темы?" , - $this->ipsclass->adskin->form_yes_no("move_topic", $mod['move_topic'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Может закреплять темы?" , - $this->ipsclass->adskin->form_yes_no("pin_topic", $mod['pin_topic'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Может опускать темы?" , - $this->ipsclass->adskin->form_yes_no("unpin_topic", $mod['unpin_topic'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Может соединять/разъединять темы?" , - $this->ipsclass->adskin->form_yes_no("split_merge", $mod['split_merge'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Может устанавливать время открытия темы?" , - $this->ipsclass->adskin->form_yes_no("mod_can_set_open_time", $mod['mod_can_set_open_time'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Может устанавливать время закрытия темы?" , - $this->ipsclass->adskin->form_yes_no("mod_can_set_close_time", $mod['mod_can_set_close_time'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Настройки модераторской панели управления" ); - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Может перемещать сразу несколько тем?" , - $this->ipsclass->adskin->form_yes_no("mass_move", $mod['mass_move'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Может удалять сразу несколько тем?" , - $this->ipsclass->adskin->form_yes_no("mass_prune", $mod['mass_prune'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Может переключать 'видимость' тем?" , - $this->ipsclass->adskin->form_yes_no("topic_q", $mod['topic_q'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Может переключать 'видимость' сообщений?" , - $this->ipsclass->adskin->form_yes_no("post_q", $mod['post_q'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Дополнительные настройки" ); - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Может предупреждать других пользователей?
    При включении этой опции модератор сможет придупреждать любого пользователя на всех форумах
    " , - $this->ipsclass->adskin->form_yes_no("allow_warn", $mod['allow_warn'] ) - ) ); - - //$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can edit user avatars and signatures?" , - // $this->ipsclass->adskin->form_yes_no("edit_user", $mod['edit_user'] ) - // ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Может использовать мульти-модерацию?
    ".$this->ipsclass->adskin->js_help_link('mod_mmod', 'Важная информация' ) , - $this->ipsclass->adskin->form_yes_no("can_mm", $mod['can_mm'] ) - ) ); - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form($button); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - $this->ipsclass->admin->output(); - } - - - - /*-------------------------------------------------------------------------*/ - // REFINE MEMBER SEARCH - /*-------------------------------------------------------------------------*/ - - function moderator_add_preform() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $type = $this->ipsclass->input['name'] ? 'name' : 'group'; - $this->ipsclass->input['fid'] = preg_replace( "#^,#", "", $this->ipsclass->input['modforumids'] ); - - //----------------------------------------- - // Are we adding a group as a mod? - //----------------------------------------- - - if ( $type == 'group' ) - { - $this->mod_form(); - exit(); - } - - //----------------------------------------- - // Got forums? - //----------------------------------------- - - if ( ! $this->ipsclass->input['fid'] ) - { - $this->ipsclass->main_msg = "Вы должны выбрать форум (несколько форумов) для добавления модератора!"; - $this->ipsclass->admin->redirect_noscreen( $this->ipsclass->base_url.'§ion=content&act=forum' ); - } - - //----------------------------------------- - // Else continue as normal. - //----------------------------------------- - - if ( $this->ipsclass->input['name'] == "" ) - { - $this->ipsclass->main_msg = "Вы должны ввести имя"; - $this->ipsclass->admin->redirect_noscreen( $this->ipsclass->base_url.'§ion=content&act=forum' ); - } - - $this->ipsclass->DB->simple_construct( array( 'select' => 'id, members_display_name as name', 'from' => 'members', 'where' => "name LIKE '".$this->ipsclass->input['name']."%' OR members_display_name LIKE '".$this->ipsclass->input['name']."%'" ) ); - $this->ipsclass->DB->simple_exec(); - - if (! $this->ipsclass->DB->get_num_rows() ) - { - $this->ipsclass->main_msg = "Нет пользователей подходящих вашему запросу."; - $this->ipsclass->admin->redirect_noscreen( $this->ipsclass->base_url.'§ion=content&act=forum' ); - } - - //----------------------------------------- - // Show possible matches - //----------------------------------------- - - $form_array = array(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $form_array[] = array( $r['id'] , $r['name'] ); - } - - $this->ipsclass->admin->page_title = "Добавление модератора"; - - $this->ipsclass->admin->page_detail = "Пожалуйста, найдите пользователя (или группу пользователей) для модерирования выбранных форумов."; - - //----------------------------------------- - // Show form - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'add_final' ), - 2 => array( 'act' , 'mod' ), - 3 => array( 'fid' , $this->ipsclass->input['fid']), - 4 => array( 'section', $this->ipsclass->section_code ), - ) ); - - //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Поиск пользователя" ); - - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Введите начало имени или все имя пользователя:" , - $this->ipsclass->adskin->form_dropdown( "member_id", $form_array ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Найти пользователя"); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - $this->ipsclass->admin->output(); - - } - - - - -} - - -?> + $Date: 2008-03-28 18:08:02 -0400 (Fri, 28 Mar 2008) $ +| > $Revision: 1232 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > Admin Category functions +| > Module written by Matt Mecham +| > Date started: 1st march 2002 +| +| > Module Version Number: 1.0.0 +| > DBA Checked: Tue 25th May 2004 ++-------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class ad_moderator { + + var $base_url; + + /** + * Section title name + * + * @var string + */ + var $perm_main = "content"; + + /** + * Section title name + * + * @var string + */ + var $perm_child = "mod"; + + function auto_run() + { + $this->ipsclass->forums->forums_init(); + + require ROOT_PATH.'sources/lib/admin_forum_functions.php'; + + $this->forumfunc = new admin_forum_functions(); + $this->forumfunc->ipsclass =& $this->ipsclass; + + //----------------------------------------- + + switch($this->ipsclass->input['code']) + { + case 'add': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); + $this->moderator_add_preform(); + break; + + case 'add_final': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); + $this->mod_form('add'); + break; + case 'doadd': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); + $this->add_mod(); + break; + + case 'edit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->mod_form('edit'); + break; + + case 'doedit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->do_edit(); + break; + + case 'remove': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); + $this->do_delete(); + break; + + default: + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->show_list(); + break; + } + + } + + //----------------------------------------- + // + // DELETE MODERATOR + // + //----------------------------------------- + + function do_delete() + { + if ($this->ipsclass->input['mid'] == "") + { + $this->ipsclass->admin->error("You did not choose a valid moderator ID"); + } + + $mod = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'moderators', 'where' => "mid=".intval($this->ipsclass->input['mid']) ) ); + + if ( $mod['is_group'] ) + { + $name = 'Group: '.$mod['group_name']; + } + else + { + $getname = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'members_display_name', 'from' => 'members', 'where' => 'id=' . $mod['member_id'] ) ); + + $name = $getname['members_display_name']; + } + + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'moderators', 'where' => "mid=".intval($this->ipsclass->input['mid']) ) ); + + $this->rebuild_moderator_cache(); + + $this->ipsclass->admin->save_log("Removed Moderator '{$name}'"); + + $this->ipsclass->main_msg = "Moderator(s) removed"; + $this->ipsclass->admin->redirect_noscreen( $this->ipsclass->base_url.'§ion=content&act=forum' ); + } + + + //----------------------------------------- + // + // EDIT MODERATOR + // + //----------------------------------------- + + function do_edit() + { + if ($this->ipsclass->input['mid'] == "") + { + $this->ipsclass->admin->error("You did not choose a valid moderator ID"); + } + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'moderators', 'where' => "mid=".intval($this->ipsclass->input['mid']) ) ); + $this->ipsclass->DB->simple_exec(); + + $mod = $this->ipsclass->DB->fetch_row(); + + //----------------------------------------- + // Build Mr Hash + //----------------------------------------- + + $this->ipsclass->DB->do_update( 'moderators', array( + 'forum_id' => intval($this->ipsclass->input['forum_id']), + 'edit_post' => intval($this->ipsclass->input['edit_post']), + 'edit_topic' => intval($this->ipsclass->input['edit_topic']), + 'delete_post' => intval($this->ipsclass->input['delete_post']), + 'delete_topic' => intval($this->ipsclass->input['delete_topic']), + 'view_ip' => intval($this->ipsclass->input['view_ip']), + 'open_topic' => intval($this->ipsclass->input['open_topic']), + 'close_topic' => intval($this->ipsclass->input['close_topic']), + 'mass_move' => intval($this->ipsclass->input['mass_move']), + 'mass_prune' => intval($this->ipsclass->input['mass_prune']), + 'move_topic' => intval($this->ipsclass->input['move_topic']), + 'pin_topic' => intval($this->ipsclass->input['pin_topic']), + 'unpin_topic' => intval($this->ipsclass->input['unpin_topic']), + 'post_q' => intval($this->ipsclass->input['post_q']), + 'topic_q' => intval($this->ipsclass->input['topic_q']), + 'allow_warn' => intval($this->ipsclass->input['allow_warn']), + 'split_merge' => intval($this->ipsclass->input['split_merge']), + 'edit_user' => intval($this->ipsclass->input['edit_user']), + 'can_mm' => intval($this->ipsclass->input['can_mm']), + 'mod_can_set_open_time' => intval($this->ipsclass->input['mod_can_set_open_time']), + 'mod_can_set_close_time' => intval($this->ipsclass->input['mod_can_set_close_time']), + ) , 'mid='.intval($this->ipsclass->input['mid']) ); + + $this->rebuild_moderator_cache(); + + $this->ipsclass->admin->save_log("Edited Moderator '{$mod['member_name']}'"); + + $this->ipsclass->main_msg = "Moderator(s) edited"; + $this->ipsclass->admin->redirect_noscreen( $this->ipsclass->base_url.'§ion=content&act=forum' ); + } + + //----------------------------------------- + // + // ADD MODERATOR + // + //----------------------------------------- + + function add_mod() + { + if ($this->ipsclass->input['fid'] == "") + { + $this->ipsclass->admin->error("You did not choose any forums to add this member to"); + } + + //----------------------------------------- + // Build Mr Hash + //----------------------------------------- + + $mr_hash = array( + 'edit_post' => intval($this->ipsclass->input['edit_post']), + 'edit_topic' => intval($this->ipsclass->input['edit_topic']), + 'delete_post' => intval($this->ipsclass->input['delete_post']), + 'delete_topic' => intval($this->ipsclass->input['delete_topic']), + 'view_ip' => intval($this->ipsclass->input['view_ip']), + 'open_topic' => intval($this->ipsclass->input['open_topic']), + 'close_topic' => intval($this->ipsclass->input['close_topic']), + 'mass_move' => intval($this->ipsclass->input['mass_move']), + 'mass_prune' => intval($this->ipsclass->input['mass_prune']), + 'move_topic' => intval($this->ipsclass->input['move_topic']), + 'pin_topic' => intval($this->ipsclass->input['pin_topic']), + 'unpin_topic' => intval($this->ipsclass->input['unpin_topic']), + 'post_q' => intval($this->ipsclass->input['post_q']), + 'topic_q' => intval($this->ipsclass->input['topic_q']), + 'allow_warn' => intval($this->ipsclass->input['allow_warn']), + 'split_merge' => intval($this->ipsclass->input['split_merge']), + 'edit_user' => intval($this->ipsclass->input['edit_user']), + 'can_mm' => intval($this->ipsclass->input['can_mm']), + 'mod_can_set_open_time' => intval($this->ipsclass->input['mod_can_set_open_time']), + 'mod_can_set_close_time' => intval($this->ipsclass->input['mod_can_set_close_time']), + ); + + $forum_ids = array(); + + $this->ipsclass->DB->simple_construct( array( 'select' => 'id', 'from' => 'forums', 'where' => "id IN(".$this->ipsclass->input['fid'].")" ) ); + $this->ipsclass->DB->simple_exec(); + + while( $i = $this->ipsclass->DB->fetch_row() ) + { + $forum_ids[ $i['id'] ] = $i['id']; + } + + //----------------------------------------- + + if ($this->ipsclass->input['mod_type'] == 'group') + { + + if ($this->ipsclass->input['gid'] == "") + { + $this->ipsclass->admin->error("We could not match that group ID"); + } + + $this->ipsclass->DB->simple_construct( array( 'select' => 'g_id, g_title', 'from' => 'groups', 'where' => "g_id=".intval($this->ipsclass->input['gid']) ) ); + $this->ipsclass->DB->simple_exec(); + + if ( ! $group = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->admin->error("We could not match that group ID"); + } + + //----------------------------------------- + // Already using this group on this forum? + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'moderators', 'where' => "forum_id IN(".$this->ipsclass->input['fid'].") and group_id=".intval($this->ipsclass->input['gid']) ) ); + $this->ipsclass->DB->simple_exec(); + + while( $f = $this->ipsclass->DB->fetch_row() ) + { + unset($forum_ids[ $f['forum_id'] ]); + } + + $mr_hash['member_name'] = '-1'; + $mr_hash['member_id'] = '-1'; + $mr_hash['group_id'] = $group['g_id']; + $mr_hash['group_name'] = $group['g_title']; + $mr_hash['is_group'] = 1; + + $ad_log = "Added Group '{$group['g_title']}' as a moderator"; + + } + else + { + + if ($this->ipsclass->input['mem'] == "") + { + $this->ipsclass->admin->error("You did not choose a member to add as a moderator"); + } + + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, members_display_name, name', 'from' => 'members', 'where' => "id=".intval($this->ipsclass->input['mem']) ) ); + $this->ipsclass->DB->simple_exec(); + + if ( ! $mem = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->admin->error("Could not match that member name so there."); + } + + //----------------------------------------- + // Already using this member on this forum? + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'moderators', 'where' => "forum_id IN(".$this->ipsclass->input['fid'].") and member_id=".intval($this->ipsclass->input['mem']) ) ); + $this->ipsclass->DB->simple_exec(); + + while( $f = $this->ipsclass->DB->fetch_row() ) + { + unset($forum_ids[ $f['forum_id'] ]); + } + + $mr_hash['member_name'] = $mem['name']; + $mr_hash['member_id'] = $mem['id']; + $mr_hash['is_group'] = 0; + + $ad_log = "Added Member '{$mem['members_display_name']}' as a moderator"; + + } + + //----------------------------------------- + // Check for legal forums + //----------------------------------------- + + if ( count($forum_ids) == 0) + { + $this->ipsclass->admin->error("You did not select any forums that do not have this group or member already moderating."); + } + + //----------------------------------------- + // Loopy loopy + //----------------------------------------- + + foreach ($forum_ids as $cartman) + { + $mr_hash['forum_id'] = $cartman; + + $this->ipsclass->DB->force_data_type = array( 'member_name' => 'string' ); + + $this->ipsclass->DB->do_insert( 'moderators', $mr_hash ); + } + + $this->ipsclass->admin->save_log($ad_log); + + $this->rebuild_moderator_cache(); + + $this->ipsclass->main_msg = "Moderator(s) added"; + $this->ipsclass->admin->redirect_noscreen( $this->ipsclass->base_url.'§ion=content&act=forum' ); + } + + //----------------------------------------- + // + // Rebuild moderator cache + // + //----------------------------------------- + + function rebuild_moderator_cache() + { + $this->ipsclass->cache['moderators'] = array(); + + //----------------------------------------- + // Get dem moderators + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => 'moderator.*', + 'from' => array( 'moderators' => 'moderator' ), + 'add_join' => array( 0 => array( 'select' => 'm.members_display_name', + 'from' => array( 'members' => 'm' ), + 'where' => "m.id=moderator.member_id", + 'type' => 'left' ) ) ) ); + + $this->ipsclass->DB->exec_query(); + + while ( $i = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->cache['moderators'][ $i['mid'] ] = $i; + } + + $this->ipsclass->update_cache( array( 'name' => 'moderators', 'array' => 1, 'deletefirst' => 1 ) ); + } + + //----------------------------------------- + // + // ADD FINAL, display the add / edit form + // + //----------------------------------------- + + function mod_form( $type='add' ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $group = array(); + + if ($type == 'add') + { + if ( $this->ipsclass->input['fid'] == "" ) + { + $this->ipsclass->admin->error("You did not choose any forums to add this member to"); + } + + $mod = array(); + $names = array(); + + //----------------------------------------- + // Get forums + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 'name', 'from' => 'forums', 'where' => "id IN(".$this->ipsclass->input['fid'].")" ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $names[] = $r['name']; + } + + $thenames = implode( ", ", $names ); + + //----------------------------------------- + // Start proper + //----------------------------------------- + + $button = "Add this moderator"; + + $form_code = 'doadd'; + + if ( $this->ipsclass->input['group'] ) + { + $this->ipsclass->DB->simple_construct( array( 'select' => 'g_id, g_title', 'from' => 'groups', 'where' => "g_id=".intval($this->ipsclass->input['group']) ) ); + $this->ipsclass->DB->simple_exec(); + + if (! $group = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->admin->error("Could not find that group to add as a moderator"); + } + + $this->ipsclass->admin->page_detail = "Adding group: {$group['g_title']} as a moderator to: $thenames"; + $this->ipsclass->admin->page_title = "Add a moderator group"; + } + else + { + if ( ! $this->ipsclass->input['member_id'] ) + { + $this->ipsclass->admin->error("Could not resolve the member id bucko"); + } + else + { + $this->ipsclass->DB->simple_construct( array( 'select' => 'name, id', 'from' => 'members', 'where' => "id=".intval($this->ipsclass->input['member_id']) ) ); + $this->ipsclass->DB->simple_exec(); + + if ( ! $mem = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->admin->error("That member ID does not resolve"); + } + + $member_id = $mem['id']; + $member_name = $mem['name']; + } + + $this->ipsclass->admin->page_detail = "Adding a $member_name as a moderator to: $thenames"; + $this->ipsclass->admin->page_title = "Add a moderator"; + + } + + } + else + { + if ($this->ipsclass->input['mid'] == "") + { + $this->ipsclass->admin->error("You must choose a valid moderator to edit."); + } + + $button = "Edit this moderator"; + + $form_code = "doedit"; + + $this->ipsclass->admin->page_title = "Editing a moderator"; + $this->ipsclass->admin->page_detail = "Please check the information carefully before submitting the form"; + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'moderators', 'where' => "mid=".intval($this->ipsclass->input['mid']) ) ); + $this->ipsclass->DB->simple_exec(); + + if ( ! $mod = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->admin->error("Could not retrieve that moderators record"); + } + + $member_id = $mod['member_id']; + $member_name = $mod['member_name']; + } + + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , $form_code ), + 2 => array( 'act' , 'mod' ), + 3 => array( 'mid' , $mod['mid']), + 4 => array( 'fid' , $this->ipsclass->input['fid'] ), + 5 => array( 'mem' , $member_id ), + 6 => array( 'mod_type' , $this->ipsclass->input['group'] ? 'group' : 'name' ), + 7 => array( 'gid' , $group['g_id'] ), + 8 => array( 'gname' , $group['g_name'] ), + 9 => array( 'section' , $this->ipsclass->section_code ), + ) ); + + //----------------------------------------- + + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "General Settings" ); + + //----------------------------------------- + + if ($type == 'edit') + { + $forums = array(); + + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name', 'from' => 'forums', 'order' => "position" ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $forums[] = array( $r['id'], $r['name'] ); + } + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Moderates forum..." , + $this->ipsclass->adskin->form_dropdown( "forum_id", $forums, $mod['forum_id'] ) + ) ); + } + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can edit others posts/polls?" , + $this->ipsclass->adskin->form_yes_no("edit_post", $mod['edit_post'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can edit others topic titles?" , + $this->ipsclass->adskin->form_yes_no("edit_topic", $mod['edit_topic'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can delete others posts?" , + $this->ipsclass->adskin->form_yes_no("delete_post", $mod['delete_post'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can delete others topics/polls?" , + $this->ipsclass->adskin->form_yes_no("delete_topic", $mod['delete_topic'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can view posters IP addresses?" , + $this->ipsclass->adskin->form_yes_no("view_ip", $mod['view_ip'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can open locked topics?" , + $this->ipsclass->adskin->form_yes_no("open_topic", $mod['open_topic'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can close open topics?" , + $this->ipsclass->adskin->form_yes_no("close_topic", $mod['close_topic'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can move topics?" , + $this->ipsclass->adskin->form_yes_no("move_topic", $mod['move_topic'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can pin topics?" , + $this->ipsclass->adskin->form_yes_no("pin_topic", $mod['pin_topic'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can unpin topics?" , + $this->ipsclass->adskin->form_yes_no("unpin_topic", $mod['unpin_topic'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can split / merge topics?" , + $this->ipsclass->adskin->form_yes_no("split_merge", $mod['split_merge'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can set topic open time?" , + $this->ipsclass->adskin->form_yes_no("mod_can_set_open_time", $mod['mod_can_set_open_time'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can set topic close time?" , + $this->ipsclass->adskin->form_yes_no("mod_can_set_close_time", $mod['mod_can_set_close_time'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + //----------------------------------------- + + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Moderator Control Panel Settings" ); + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can mass move topics?" , + $this->ipsclass->adskin->form_yes_no("mass_move", $mod['mass_move'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can mass prune topics?" , + $this->ipsclass->adskin->form_yes_no("mass_prune", $mod['mass_prune'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can set topics as visible and invisible?" , + $this->ipsclass->adskin->form_yes_no("topic_q", $mod['topic_q'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can set posts as visible and invisible?" , + $this->ipsclass->adskin->form_yes_no("post_q", $mod['post_q'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + //----------------------------------------- + + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Advanced Settings" ); + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can warn other users?
    Note, if you enable this moderators will have warn permissions on any users, regardless of forum
    " , + $this->ipsclass->adskin->form_yes_no("allow_warn", $mod['allow_warn'] ) + ) ); + + //$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can edit user avatars and signatures?" , + // $this->ipsclass->adskin->form_yes_no("edit_user", $mod['edit_user'] ) + // ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Can use topic multi-moderation?
    ".$this->ipsclass->adskin->js_help_link('mod_mmod', 'Important Information' ) , + $this->ipsclass->adskin->form_yes_no("can_mm", $mod['can_mm'] ) + ) ); + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form($button); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + $this->ipsclass->admin->output(); + } + + + + /*-------------------------------------------------------------------------*/ + // REFINE MEMBER SEARCH + /*-------------------------------------------------------------------------*/ + + function moderator_add_preform() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $type = $this->ipsclass->input['name'] ? 'name' : 'group'; + $this->ipsclass->input['fid'] = preg_replace( "#^,#", "", $this->ipsclass->input['modforumids'] ); + + //----------------------------------------- + // Got forums? + //----------------------------------------- + + if ( ! $this->ipsclass->input['fid'] ) + { + $this->ipsclass->main_msg = "You must select some forums first!"; + $this->ipsclass->admin->redirect_noscreen( $this->ipsclass->base_url.'§ion=content&act=forum' ); + } + + //----------------------------------------- + // Are we adding a group as a mod? + //----------------------------------------- + + if ( $type == 'group' ) + { + $this->mod_form(); + exit(); + } + + //----------------------------------------- + // Else continue as normal. + //----------------------------------------- + + if ( $this->ipsclass->input['name'] == "" ) + { + $this->ipsclass->main_msg = "You must enter a name"; + $this->ipsclass->admin->redirect_noscreen( $this->ipsclass->base_url.'§ion=content&act=forum' ); + } + + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, members_display_name as name', 'from' => 'members', 'where' => "name LIKE '".$this->ipsclass->input['name']."%' OR members_display_name LIKE '".$this->ipsclass->input['name']."%'" ) ); + $this->ipsclass->DB->simple_exec(); + + if (! $this->ipsclass->DB->get_num_rows() ) + { + $this->ipsclass->main_msg = "Sorry, we could not find any members that matched the search string you entered"; + $this->ipsclass->admin->redirect_noscreen( $this->ipsclass->base_url.'§ion=content&act=forum' ); + } + + //----------------------------------------- + // Show possible matches + //----------------------------------------- + + $form_array = array(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $form_array[] = array( $r['id'] , $r['name'] ); + } + + $this->ipsclass->admin->page_title = "Add a moderator"; + + $this->ipsclass->admin->page_detail = "Please select the correct member name from the selection below to add as a moderator to the previously selected forums."; + + //----------------------------------------- + // Show form + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'add_final' ), + 2 => array( 'act' , 'mod' ), + 3 => array( 'fid' , $this->ipsclass->input['fid']), + 4 => array( 'section', $this->ipsclass->section_code ), + ) ); + + //----------------------------------------- + + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Search for a member" ); + + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Choose from the matches..." , + $this->ipsclass->adskin->form_dropdown( "member_id", $form_array ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Choose Member"); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + $this->ipsclass->admin->output(); + + } + + + + +} + + +?> \ No newline at end of file diff --git a/upload/sources/action_admin/modlogs.php b/upload/sources/action_admin/modlogs.php index 00d41094..f3d69cbb 100644 --- a/upload/sources/action_admin/modlogs.php +++ b/upload/sources/action_admin/modlogs.php @@ -2,26 +2,18 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ +| > $Date: 2008-03-28 18:08:02 -0400 (Fri, 28 Mar 2008) $ +| > $Revision: 1232 $ +| > $Author: bfarber $ +--------------------------------------------------------------------------- | | > Import functions @@ -36,7 +28,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -48,7 +40,7 @@ class ad_modlogs { * @var string */ var $perm_main = "admin"; - + /** * Section title name * @@ -58,44 +50,44 @@ class ad_modlogs { function auto_run() { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Журнал модерирования' ); - + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Moderator Logs' ); + //----------------------------------------- switch($this->ipsclass->input['code']) { - + case 'view': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->view(); break; - + case 'remove': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->remove(); break; - - + + //----------------------------------------- default: $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->list_current(); break; } - + } - + //----------------------------------------- // Remove archived files //----------------------------------------- - + function view() { $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; - - $this->ipsclass->admin->page_detail = "Просмотр действий модерирования форума"; - $this->ipsclass->admin->page_title = "Журнал модерирования"; - + + $this->ipsclass->admin->page_detail = "Viewing all actions by a moderator"; + $this->ipsclass->admin->page_title = "Moderator Logs Manager"; + if ( !isset($this->ipsclass->input['search_string']) OR $this->ipsclass->input['search_string'] == "") { if (! $this->ipsclass->input['mid'] ) @@ -103,27 +95,27 @@ class ad_modlogs { // Empty search form...sneaky... $this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(id) as count', 'from' => 'moderator_logs' ) ); $this->ipsclass->DB->simple_exec(); - + $row = $this->ipsclass->DB->fetch_row(); - + $row_count = $row['count']; - - $query = "&act=modlog&code=view"; - + + $query = "&{$this->ipsclass->form_code}&code=view"; + $this->ipsclass->DB->cache_add_query( 'modlogs_view_three', array( 'start' => $start ) ); - $this->ipsclass->DB->cache_exec_query(); + $this->ipsclass->DB->cache_exec_query(); } else { $this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(id) as count', 'from' => 'moderator_logs', 'where' => "member_id=".intval($this->ipsclass->input['mid']) ) ); $this->ipsclass->DB->simple_exec(); - + $row = $this->ipsclass->DB->fetch_row(); - + $row_count = $row['count']; - - $query = "&act=modlog&mid={$this->ipsclass->input['mid']}&code=view"; - + + $query = "&{$this->ipsclass->form_code}&mid={$this->ipsclass->input['mid']}&code=view"; + $this->ipsclass->DB->cache_add_query( 'modlogs_view_one', array( 'mid' => intval($this->ipsclass->input['mid']), 'start' => $start ) ); $this->ipsclass->DB->cache_exec_query(); } @@ -131,7 +123,7 @@ class ad_modlogs { else { $this->ipsclass->input['search_string'] = urldecode($this->ipsclass->input['search_string']); - + if ( ($this->ipsclass->input['search_type'] == 'topic_id') or ($this->ipsclass->input['search_type'] == 'forum_id') ) { $dbq = "m.".$this->ipsclass->input['search_type']."='".$this->ipsclass->input['search_string']."'"; @@ -140,62 +132,62 @@ class ad_modlogs { { $dbq = "m.".$this->ipsclass->input['search_type']." LIKE '%".$this->ipsclass->input['search_string']."%'"; } - + $this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(m.id) as count', 'from' => 'moderator_logs m', 'where' => $dbq ) ); $this->ipsclass->DB->simple_exec(); - + $row = $this->ipsclass->DB->fetch_row(); - + $row_count = $row['count']; - + $query = "&act=modlog&code=view&search_type={$this->ipsclass->input['search_type']}&search_string=".urlencode($this->ipsclass->input['search_string']); - + $this->ipsclass->DB->cache_add_query( 'modlogs_view_two', array( 'dbq' => $dbq, 'start' => $start ) ); $this->ipsclass->DB->cache_exec_query(); } - + $links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $row_count, 'PER_PAGE' => 20, 'CUR_ST_VAL' => $start, - 'L_SINGLE' => "Страница", - 'L_MULTI' => "Страницы: ", - 'BASE_URL' => $this->ipsclass->base_url.$query, + 'L_SINGLE' => "Single Page", + 'L_MULTI' => "Pages: ", + 'BASE_URL' => $this->ipsclass->base_url.'&'.$this->ipsclass->form_code.$query, ) ); - - $this->ipsclass->admin->page_detail = "В этой секции вы можете просматривать и управлять журналом модерирования форумов"; - $this->ipsclass->admin->page_title = "Журнал модерирования"; - + + $this->ipsclass->admin->page_detail = "You may view and remove actions performed by your moderators"; + $this->ipsclass->admin->page_title = "Moderator Logs Manager"; + //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( "Модератор" , "15%" ); - $this->ipsclass->adskin->td_header[] = array( "Действие" , "15%" ); - $this->ipsclass->adskin->td_header[] = array( "Форум" , "15%" ); - $this->ipsclass->adskin->td_header[] = array( "Тема" , "25%" ); - $this->ipsclass->adskin->td_header[] = array( "Время" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "IP-адрес" , "10%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Журнал действий" ); + + $this->ipsclass->adskin->td_header[] = array( "Member Name" , "15%" ); + $this->ipsclass->adskin->td_header[] = array( "Action Performed" , "15%" ); + $this->ipsclass->adskin->td_header[] = array( "Forum" , "15%" ); + $this->ipsclass->adskin->td_header[] = array( "Topic Title" , "25%" ); + $this->ipsclass->adskin->td_header[] = array( "Time of action" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "IP address" , "10%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Moderator Logs" ); $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader'); - + if ( $this->ipsclass->DB->get_num_rows() ) { while ( $row = $this->ipsclass->DB->fetch_row() ) { $row['ctime'] = $this->ipsclass->admin->get_date( $row['ctime'], 'LONG' ); - + if ( $row['topic_id'] ) { - $topicid = "
    ID темы: ".$row['topic_id']; + $topicid = "
    Topic ID: ".$row['topic_id']; } else { $topicid = " "; } - + $sess_id = preg_replace( "/^.+?s=(\w{32}).+?$/" , "\\1", $row['http_referer'] ); $row['http_referer'] = preg_replace( "/s=(\w){32}/" , "" , $row['http_referer'] ); - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "{$row['members_display_name']}", "{$row['action']}", "{$row['name']}", @@ -207,91 +199,91 @@ class ad_modlogs { } else { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    Нет записей
    "); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    No results
    "); } - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader'); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - + + //----------------------------------------- //------------------------------- - + $this->ipsclass->admin->output(); - + } - + //----------------------------------------- // Remove archived files //----------------------------------------- - + function remove() { if ($this->ipsclass->input['mid'] == "") { - $this->ipsclass->admin->error("Вы должны выбрать ID модератора!"); + $this->ipsclass->admin->error("You did not select a member ID to remove by!"); } - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'moderator_logs', 'where' => "member_id=".intval($this->ipsclass->input['mid']) ) ); - - $this->ipsclass->admin->save_log("Удалены записи из журнала модерирования"); - - $this->ipsclass->boink_it($this->ipsclass->base_url."&act=modlog"); + + $this->ipsclass->admin->save_log("Removed Moderator Logs"); + + $this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}&act=modlog"); exit(); - - + + } + + - - - - + + //----------------------------------------- // SHOW ALL LANGUAGE PACKS //----------------------------------------- - + function list_current() { $form_array = array(); + + $this->ipsclass->admin->page_detail = "You may view and remove actions performed by your moderators"; + $this->ipsclass->admin->page_title = "Moderator Logs Manager"; - $this->ipsclass->admin->page_detail = "В этой секции вы можете просматривать и управлять журналом модерирования форумов"; - $this->ipsclass->admin->page_title = "Журнал модерирования"; - - + //----------------------------------------- // VIEW LAST 5 //----------------------------------------- - + $this->ipsclass->DB->cache_add_query( 'modlogs_list_current_last_five', array() ); $this->ipsclass->DB->cache_exec_query(); - - $this->ipsclass->adskin->td_header[] = array( "Модератор" , "15%" ); - $this->ipsclass->adskin->td_header[] = array( "Действие" , "15%" ); - $this->ipsclass->adskin->td_header[] = array( "Форум" , "15%" ); - $this->ipsclass->adskin->td_header[] = array( "Тема" , "25%" ); - $this->ipsclass->adskin->td_header[] = array( "Время" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "IP-адрес" , "10%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Последние 5 действий" ); + + $this->ipsclass->adskin->td_header[] = array( "Member Name" , "15%" ); + $this->ipsclass->adskin->td_header[] = array( "Action Performed" , "15%" ); + $this->ipsclass->adskin->td_header[] = array( "Forum" , "15%" ); + $this->ipsclass->adskin->td_header[] = array( "Topic Title" , "25%" ); + $this->ipsclass->adskin->td_header[] = array( "Time of action" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "IP address" , "10%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Last 5 Moderation Actions" ); if ( $this->ipsclass->DB->get_num_rows() ) { while ( $row = $this->ipsclass->DB->fetch_row() ) { - + $row['ctime'] = $this->ipsclass->admin->get_date( $row['ctime'], 'LONG' ); - + $topicid = ""; - + if ( $row['topic_id'] ) { - $topicid = "
    ID темы: ".$row['topic_id']; + $topicid = "
    Topic ID: ".$row['topic_id']; } - + $sess_id = preg_replace( "/^.+?s=(\w{32}).+?$/" , "\\1", $row['http_referer'] ); $row['http_referer'] = preg_replace( "/s=(\w){32}/" , "" , $row['http_referer'] ); - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "{$row['members_display_name']}", "{$row['action']}", "{$row['name']}", @@ -303,81 +295,81 @@ class ad_modlogs { } else { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    Нет записей
    "); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    No results
    "); } - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( "Модератор" , "30%" ); - $this->ipsclass->adskin->td_header[] = array( "Действий совершено" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Просмотр всех действий" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Удаление всех действий" , "30%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Журнал модерирования" ); - + + $this->ipsclass->adskin->td_header[] = array( "Member Name" , "30%" ); + $this->ipsclass->adskin->td_header[] = array( "Actions Performed" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "View all by member" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Remove all by member" , "30%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Moderator Logs" ); + $this->ipsclass->DB->cache_add_query( 'modlogs_list_current_show_all', array() ); $this->ipsclass->DB->cache_exec_query(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "{$r['members_display_name']}", "
    {$r['act_count']}
    ", - "
    Просмотр
    ", - "
    Удаление
    ", + "
    View
    ", + "
    Remove
    ", ) ); } - - - + + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - + + //----------------------------------------- //------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'view' ), 2 => array( 'act' , 'modlog' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Поиск действий в журнале" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Search Moderator Logs" ); + $form_array = array( - 0 => array( 'topic_title', 'Название темы' ), - 1 => array( 'ip_address', 'IP-адрес' ), - 2 => array( 'member_name', 'Модератор' ), - 3 => array( 'topic_id' , 'ID темы' ), - 4 => array( 'forum_id' , 'ID форума' ) + 0 => array( 'topic_title', 'Topic Title' ), + 1 => array( 'ip_address', 'IP Address' ), + 2 => array( 'member_name', 'Member Name' ), + 3 => array( 'topic_id' , 'Topic ID' ), + 4 => array( 'forum_id' , 'Forum ID' ) ); - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Искать " , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Search for..." , $this->ipsclass->adskin->form_input( "search_string") ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Искать в " , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Search in..." , $this->ipsclass->adskin->form_dropdown( "search_type", $form_array) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Искать"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Search"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- //------------------------------- - + $this->ipsclass->admin->output(); - + } - - - + + + } diff --git a/upload/sources/action_admin/multi_moderate.php b/upload/sources/action_admin/multi_moderate.php index a9b08548..a674f85d 100644 --- a/upload/sources/action_admin/multi_moderate.php +++ b/upload/sources/action_admin/multi_moderate.php @@ -1,553 +1,545 @@ - $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > Topic Multi-Moderation -| > Module written by Matt Mecham -| > Date started: 14th May 2003 -| -| > Module Version Number: 1.0.0 -| > DBA Checked: Tue 25th May 2004 -+-------------------------------------------------------------------------- -*/ - - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - -class ad_multi_moderate -{ - - var $base_url; - var $forumfunc = ""; - - /** - * Section title name - * - * @var string - */ - var $perm_main = "content"; - - /** - * Section title name - * - * @var string - */ - var $perm_child = "multimod"; - - function auto_run() - { - $this->ipsclass->forums->forums_init(); - - require ROOT_PATH.'sources/lib/admin_forum_functions.php'; - - $this->forumfunc = new admin_forum_functions(); - $this->forumfunc->ipsclass =& $this->ipsclass; - - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Мульти-модерация тем' ); - - switch($this->ipsclass->input['code']) - { - - case 'list': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->list_current(); - break; - - case 'new': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); - $this->do_form('new'); - break; - - case 'edit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->do_form('edit'); - break; - - case 'donew': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); - $this->do_save('new'); - break; - - case 'doedit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->do_save('edit'); - break; - - case 'delete': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); - $this->do_delete(); - break; - - //----------------------------------------- - - default: - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->list_current(); - break; - } - - } - - //----------------------------------------- - // Rebuild Cache - //----------------------------------------- - - function rebuild_cache() - { - $this->ipsclass->cache['multimod'] = array(); - - $this->ipsclass->DB->simple_construct( array( - 'select' => '*', - 'from' => 'topic_mmod', - 'order' => 'mm_title' - ) ); - - $this->ipsclass->DB->simple_exec(); - - while ($i = $this->ipsclass->DB->fetch_row()) - { - $this->ipsclass->cache['multimod'][ $i['mm_id'] ] = $i; - } - - $this->ipsclass->update_cache( array( 'name' => 'multimod', 'array' => 1, 'deletefirst' => 1 ) ); - } - - //----------------------------------------- - // DELETE! - //----------------------------------------- - - function do_delete() - { - if ($this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Вы должны ввести ID мульти-модерации"); - } - - $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'topic_mmod', 'where' => "mm_id=".intval($this->ipsclass->input['id']) ) ); - - $this->rebuild_cache(); - - $this->ipsclass->admin->save_log("мульти-модерация тем удалена"); - - $this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}"); - - } - - //----------------------------------------- - // SAVE! - //----------------------------------------- - - function do_save($type='new') - { - $forums = array(); - - $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); - - if ( $type == 'edit' ) - { - if ( $this->ipsclass->input['id'] < 1 ) - { - $this->ipsclass->admin->error("Неверный ID"); - } - } - - if ( $this->ipsclass->input['mm_title'] == "" ) - { - $this->ipsclass->admin->error("Вы должны ввести название для мульти-модерации"); - } - - //----------------------------------------- - // Check for forums... - //----------------------------------------- - - $forums = $this->get_activein_forums(); - - if ( ! $forums ) - { - $this->ipsclass->admin->error("Вы должны выбрать хотя бы один форум, чтобы использовать эту мульти-модерацию"); - } - - if ( $this->ipsclass->input['topic_move'] == 'n' ) - { - $this->ipsclass->admin->error("Выбран неверный форум для переноса тем. Пожалуйста, помните, что вы не можете переносить темы в категории"); - } - - $save = array( - 'mm_title' => $this->ipsclass->input['mm_title'], - 'mm_enabled' => 1, - 'topic_state' => $this->ipsclass->input['topic_state'], - 'topic_pin' => $this->ipsclass->input['topic_pin'], - 'topic_move' => $this->ipsclass->input['topic_move'], - 'topic_move_link' => $this->ipsclass->input['topic_move_link'], - 'topic_title_st' => $this->ipsclass->admin->make_safe($_POST['topic_title_st']), - 'topic_title_end' => $this->ipsclass->admin->make_safe($_POST['topic_title_end']), - 'topic_reply' => $this->ipsclass->input['topic_reply'], - 'topic_reply_content' => $this->ipsclass->admin->make_safe($_POST['topic_reply_content']), - 'topic_reply_postcount' => $this->ipsclass->input['topic_reply_postcount'], - 'mm_forums' => $forums, - 'topic_approve' => $this->ipsclass->input['topic_approve'], - ); - - if ( $type == 'edit' ) - { - $mm_id = $this->ipsclass->input['id']; - - $this->ipsclass->DB->do_update( 'topic_mmod', $save, 'mm_id='.$mm_id ); - } - else - { - $this->ipsclass->DB->do_insert( 'topic_mmod', $save ); - - $mm_id = $this->ipsclass->DB->get_insert_id(); - } - - $this->ipsclass->admin->save_log("Добавлена мульти-модерация ($type)"); - - $this->rebuild_cache(); - - $this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}"); - - - } - - //----------------------------------------- - // SHOW MM FORM - //----------------------------------------- - - function do_form($type='new') - { - $this->ipsclass->admin->page_detail = "Мульти-модерации тем позволяют вам создавать целые программы действий, включащих в себя несколько стандартных модераций."; - $this->ipsclass->admin->page_title = "Мульти-модерация тем"; - - $form_code = 'donew'; - $description = 'Добавить новую мульти-модерацию'; - $button = "Добавление мульти-модерации тем"; - $id = 0; - $topic_mm = array( 'mm_forums' => '', 'mm_title' => '', 'topic_title_st' => '', - 'topic_title_end' => '', 'topic_state' => '', 'topic_pin' => '', - 'topic_approve' => '', 'topic_move' => '', 'topic_move_link' => '', - 'topic_reply' => '', 'topic_reply_content' => '', 'topic_reply_postcount' => '' ); - - if ( $type == 'edit' ) - { - $id = intval($this->ipsclass->input['id']); - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'topic_mmod', 'where' => "mm_id=$id" ) ); - $this->ipsclass->DB->simple_exec(); - - if ( ! $topic_mm = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->admin->error("Невозможно получить информиацию ($id)"); - } - - $form_code = 'doedit'; - $description = 'Изменение мульти-модерации тем'; - $button = "Изменить мульти-модерацию"; - } - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , $form_code ), - 2 => array( 'act' , 'multimod' ), - 3 => array( 'id' , $id ), - 4 => array( 'section', $this->ipsclass->section_code ), - ) ); - - //----------------------------------------- - - $state_dd = array( - 0 => array( 'leave', 'Не трогать' ), - 1 => array( 'close', 'Закрыть' ), - 2 => array( 'open' , 'Открыть' ), - ); - - $pin_dd = array( - 0 => array( 'leave', 'Не трогать' ), - 1 => array( 'pin' , 'Закрепить' ), - 2 => array( 'unpin', 'Открепить' ), - ); - - $app_dd = array( - 0 => array( '0', 'Не трогать' ), - 1 => array( '1', 'Сделать видимым' ), - 2 => array( '2', 'Сделать невидимым' ), - ); - - //----------------------------------------- - - - - $forum_html = ""; - - //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Основные настройки", $description ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Название мульти-модерации:" , - $this->ipsclass->adskin->form_input("mm_title", $topic_mm['mm_title'] ) - ) ); - - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Действует в форумах...
    Вы можете выбрать несколько форумов" , - $forum_html - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( 'Действия (модерации)', 'left', 'tablesubheader' ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Добавить в НАЧАЛО названия темы:
    Оставьте поле пустым, если вы не хотите использовать это действие.
    " , - $this->ipsclass->adskin->form_input("topic_title_st", $topic_mm['topic_title_st'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Добавить в КОНЕЦ названия темы:
    Оставьте поле пустым, если вы не хотите использовать это действие.
    " , - $this->ipsclass->adskin->form_input("topic_title_end", $topic_mm['topic_title_end'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Изменить состояние темы?" , - $this->ipsclass->adskin->form_dropdown("topic_state", $state_dd, $topic_mm['topic_state'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Изменить фиксацию темы?" , - $this->ipsclass->adskin->form_dropdown("topic_pin", $pin_dd, $topic_mm['topic_pin'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Изменить видимость темы?" , - $this->ipsclass->adskin->form_dropdown("topic_approve", $app_dd, $topic_mm['topic_approve'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Переместить тему?
    Выберите форум куда переместить тему при мульти-модерации.
    " , - $this->ipsclass->adskin->form_dropdown("topic_move", array_merge( array( 0 => array('-1', 'Не перемещать' ) ), $fporum_jump ), $topic_mm['topic_move'] ) - ."
    ".$this->ipsclass->adskin->form_checkbox('topic_move_link', $topic_mm['topic_move_link'] )."Оставить ссылку на тему в старом форуме?" - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( 'Опции сообщения', 'left', 'tablesubheader' ); - - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Добавить сообщение в эту тему?

    Вы можете использовать HTML-коды в этом сообщении.
    " , - "Включить это сообщение?  ".$this->ipsclass->adskin->form_yes_no('topic_reply', $topic_mm['topic_reply'] ) - ."
    " - . $this->ipsclass->adskin->form_textarea("topic_reply_content", $topic_mm['topic_reply_content'] ) - ."
    ".$this->ipsclass->adskin->form_checkbox('topic_reply_postcount', $topic_mm['topic_reply_postcount'] )."Увеличивать счетчик сообщений после добавления сообщения?" - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form($button); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - - - $this->ipsclass->admin->output(); - - } - - - //----------------------------------------- - // SHOW ALL AVAILABLE MM's - //----------------------------------------- - - function list_current() - { - $this->ipsclass->admin->page_detail = "Мульти-модерации тем позволяют вам создавать целые программы действий, включащих в себя несколько стандартных модераций."; - $this->ipsclass->admin->page_title = "Мульти-модерация тем"; - - - $this->ipsclass->adskin->td_header[] = array( "Название" , "50%" ); - $this->ipsclass->adskin->td_header[] = array( "Изменение" , "25%" ); - $this->ipsclass->adskin->td_header[] = array( "Удаление" , "25%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Текущие мульти-модерации тем" ); - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'topic_mmod', 'order' => "mm_title" ) ); - $this->ipsclass->DB->simple_exec(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - while ( $row = $this->ipsclass->DB->fetch_row() ) - { - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "{$row['mm_title']}", - "
    Изменить
    ", - "
    Удалить
    ", - ) ); - } - } - else - { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    Нет существующих
    "); - } - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("", 'center', 'tablefooter' ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - $this->ipsclass->admin->output(); - - } - - - //----------------------------------------- - // Get the active in forums - //----------------------------------------- - - function get_activein_forums() - { - $forumids = array(); - - //----------------------------------------- - // Check for an array - //----------------------------------------- - - if ( is_array( $_POST['forums'] ) ) - { - - if ( in_array( 'all', $_POST['forums'] ) ) - { - //----------------------------------------- - // Searching all forums.. - //----------------------------------------- - - return '*'; - } - else - { - //----------------------------------------- - // Go loopy loo - //----------------------------------------- - - foreach( $_POST['forums'] as $l ) - { - if ( $this->ipsclass->forums->forum_by_id[ $l ] ) - { - $forumids[] = intval($l); - } - } - - //----------------------------------------- - // Do we have cats? Give 'em to Charles! - //----------------------------------------- - - if ( count( $forumids ) ) - { - foreach( $forumids as $f ) - { - $children = $this->ipsclass->forums->forums_get_children( $f ); - - if ( is_array($children) and count($children) ) - { - $forumids = array_merge( $forumids , $children ); - } - } - } - else - { - //----------------------------------------- - // No forums selected / we have available - //----------------------------------------- - - return; - } - } - } - else - { - //----------------------------------------- - // Not an array... - //----------------------------------------- - - if ( $this->ipsclass->input['forums'] == 'all' ) - { - return '*'; - } - else - { - if ( $this->ipsclass->input['forums'] != "" ) - { - $l = intval($this->ipsclass->input['forums']); - - //----------------------------------------- - // Single forum - //----------------------------------------- - - if ( $this->ipsclass->forums->forum_by_id[ $l ] ) - { - $forumids[] = intval($l); - } - - if ( $this->ipsclass->input['searchsubs'] == 1 ) - { - $children = $this->ipsclass->forums->forums_get_children( $f ); - - if ( is_array($children) and count($children) ) - { - $forumids = array_merge( $forumids , $children ); - } - } - } - } - } - - return implode( ",", $forumids ); - } -} - - + $Date: 2007-12-17 18:07:20 -0500 (Mon, 17 Dec 2007) $ +| > $Revision: 1149 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > Topic Multi-Moderation +| > Module written by Matt Mecham +| > Date started: 14th May 2003 +| +| > Module Version Number: 1.0.0 +| > DBA Checked: Tue 25th May 2004 ++-------------------------------------------------------------------------- +*/ + + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class ad_multi_moderate +{ + + var $base_url; + var $forumfunc = ""; + + /** + * Section title name + * + * @var string + */ + var $perm_main = "content"; + + /** + * Section title name + * + * @var string + */ + var $perm_child = "multimod"; + + function auto_run() + { + $this->ipsclass->forums->forums_init(); + + require ROOT_PATH.'sources/lib/admin_forum_functions.php'; + + $this->forumfunc = new admin_forum_functions(); + $this->forumfunc->ipsclass =& $this->ipsclass; + + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Topic multi-moderation home' ); + + switch($this->ipsclass->input['code']) + { + + case 'list': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->list_current(); + break; + + case 'new': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); + $this->do_form('new'); + break; + + case 'edit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->do_form('edit'); + break; + + case 'donew': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); + $this->do_save('new'); + break; + + case 'doedit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->do_save('edit'); + break; + + case 'delete': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); + $this->do_delete(); + break; + + //----------------------------------------- + + default: + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->list_current(); + break; + } + + } + + //----------------------------------------- + // Rebuild Cache + //----------------------------------------- + + function rebuild_cache() + { + $this->ipsclass->cache['multimod'] = array(); + + $this->ipsclass->DB->simple_construct( array( + 'select' => '*', + 'from' => 'topic_mmod', + 'order' => 'mm_title' + ) ); + + $this->ipsclass->DB->simple_exec(); + + while ($i = $this->ipsclass->DB->fetch_row()) + { + $this->ipsclass->cache['multimod'][ $i['mm_id'] ] = $i; + } + + $this->ipsclass->update_cache( array( 'name' => 'multimod', 'array' => 1, 'deletefirst' => 1 ) ); + } + + //----------------------------------------- + // DELETE! + //----------------------------------------- + + function do_delete() + { + if ($this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("Could not resolve the MMOD ID, please try again"); + } + + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'topic_mmod', 'where' => "mm_id=".intval($this->ipsclass->input['id']) ) ); + + $this->rebuild_cache(); + + $this->ipsclass->admin->save_log("Topic Multi-Mod removed"); + + $this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}"); + + } + + //----------------------------------------- + // SAVE! + //----------------------------------------- + + function do_save($type='new') + { + $forums = array(); + + $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); + + if ( $type == 'edit' ) + { + if ( $this->ipsclass->input['id'] < 1 ) + { + $this->ipsclass->admin->error("You must use a valid id"); + } + } + + if ( $this->ipsclass->input['mm_title'] == "" ) + { + $this->ipsclass->admin->error("You must enter a valid title"); + } + + //----------------------------------------- + // Check for forums... + //----------------------------------------- + + $forums = $this->get_activein_forums(); + + if ( ! $forums ) + { + $this->ipsclass->admin->error("You must select some forums to activate with this multi-moderation suite"); + } + + if ( $this->ipsclass->input['topic_move'] == 'n' ) + { + $this->ipsclass->admin->error("Incorrect forum chosen in the 'move to' section of the topic multi-moderation. Please note that you cannot choose to move the topic to a category"); + } + + $save = array( + 'mm_title' => $this->ipsclass->input['mm_title'], + 'mm_enabled' => 1, + 'topic_state' => $this->ipsclass->input['topic_state'], + 'topic_pin' => $this->ipsclass->input['topic_pin'], + 'topic_move' => intval($this->ipsclass->input['topic_move']), + 'topic_move_link' => intval($this->ipsclass->input['topic_move_link']), + 'topic_title_st' => $this->ipsclass->admin->make_safe($_POST['topic_title_st']), + 'topic_title_end' => $this->ipsclass->admin->make_safe($_POST['topic_title_end']), + 'topic_reply' => intval($this->ipsclass->input['topic_reply']), + 'topic_reply_content' => $this->ipsclass->admin->make_safe($_POST['topic_reply_content']), + 'topic_reply_postcount' => intval($this->ipsclass->input['topic_reply_postcount']), + 'mm_forums' => $forums, + 'topic_approve' => intval($this->ipsclass->input['topic_approve']), + ); + + if ( $type == 'edit' ) + { + $mm_id = $this->ipsclass->input['id']; + + $this->ipsclass->DB->do_update( 'topic_mmod', $save, 'mm_id='.$mm_id ); + } + else + { + $this->ipsclass->DB->do_insert( 'topic_mmod', $save ); + + $mm_id = $this->ipsclass->DB->get_insert_id(); + } + + $this->ipsclass->admin->save_log("Update topic multi-moderation entries ($type)"); + + $this->rebuild_cache(); + + $this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}"); + + + } + + //----------------------------------------- + // SHOW MM FORM + //----------------------------------------- + + function do_form($type='new') + { + $this->ipsclass->admin->page_detail = "Multi moderation allows you to combine moderation actions to create easy to use shortcuts to several moderation options."; + $this->ipsclass->admin->page_title = "Topic Multi-Moderation"; + + $form_code = 'donew'; + $description = 'Add a new topic multi-moderation'; + $button = "Add New Multi-Moderation"; + $id = 0; + $topic_mm = array( 'mm_forums' => '', 'mm_title' => '', 'topic_title_st' => '', + 'topic_title_end' => '', 'topic_state' => '', 'topic_pin' => '', + 'topic_approve' => '', 'topic_move' => '', 'topic_move_link' => '', + 'topic_reply' => '', 'topic_reply_content' => '', 'topic_reply_postcount' => '' ); + + if ( $type == 'edit' ) + { + $id = intval($this->ipsclass->input['id']); + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'topic_mmod', 'where' => "mm_id=$id" ) ); + $this->ipsclass->DB->simple_exec(); + + if ( ! $topic_mm = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->admin->error("Could not retrieve the information ($id)"); + } + + $form_code = 'doedit'; + $description = 'Edit the topic multi-moderation'; + $button = "Edit Multi-Moderation"; + } + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , $form_code ), + 2 => array( 'act' , 'multimod' ), + 3 => array( 'id' , $id ), + 4 => array( 'section', $this->ipsclass->section_code ), + ) ); + + //----------------------------------------- + + $state_dd = array( + 0 => array( 'leave', 'Leave' ), + 1 => array( 'close', 'Close' ), + 2 => array( 'open' , 'Open' ), + ); + + $pin_dd = array( + 0 => array( 'leave', 'Leave' ), + 1 => array( 'pin' , 'Pin' ), + 2 => array( 'unpin', 'Unpin' ), + ); + + $app_dd = array( + 0 => array( '0', 'Leave' ), + 1 => array( '1', 'Approve (Set Visible)' ), + 2 => array( '2', 'Unapprove (Set Invisibe)' ), + ); + + //----------------------------------------- + + + + $forum_html = ""; + + //----------------------------------------- + + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Topic Multi-Moderation", $description ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Title for this Multi-Moderation Suite?" , + $this->ipsclass->adskin->form_input("mm_title", $topic_mm['mm_title'] ) + ) ); + + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Active in Forums...
    You may choose more than one" , + $forum_html + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( 'Moderation Options', 'left', 'tablesubheader' ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Add to START of topic title?" , + $this->ipsclass->adskin->form_input("topic_title_st", $topic_mm['topic_title_st'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Add to END of topic title?" , + $this->ipsclass->adskin->form_input("topic_title_end", $topic_mm['topic_title_end'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Alter topic state?" , + $this->ipsclass->adskin->form_dropdown("topic_state", $state_dd, $topic_mm['topic_state'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Alter pinned state?" , + $this->ipsclass->adskin->form_dropdown("topic_pin", $pin_dd, $topic_mm['topic_pin'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Alter approved state?" , + $this->ipsclass->adskin->form_dropdown("topic_approve", $app_dd, $topic_mm['topic_approve'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Move topic?" , + $this->ipsclass->adskin->form_dropdown("topic_move", array_merge( array( 0 => array('-1', 'Don\'t Move' ) ), $fporum_jump ), $topic_mm['topic_move'] ) + ."
    ".$this->ipsclass->adskin->form_checkbox('topic_move_link', $topic_mm['topic_move_link'] )."Leave a link to the source topic?" + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( 'Post Options', 'left', 'tablesubheader' ); + + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Add a reply to the topic?
    HTML enabled" , + "Enable this reply?  ".$this->ipsclass->adskin->form_yes_no('topic_reply', $topic_mm['topic_reply'] ) + ."
    " + . $this->ipsclass->adskin->form_textarea("topic_reply_content", $topic_mm['topic_reply_content'] ) + ."
    ".$this->ipsclass->adskin->form_checkbox('topic_reply_postcount', $topic_mm['topic_reply_postcount'] )."Increment poster's post count?" + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form($button); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + + + $this->ipsclass->admin->output(); + + } + + + //----------------------------------------- + // SHOW ALL AVAILABLE MM's + //----------------------------------------- + + function list_current() + { + $this->ipsclass->admin->page_detail = "Multi moderation allows you to combine moderation actions to create easy to use shortcuts to several moderation options."; + $this->ipsclass->admin->page_title = "Topic Multi-Moderation"; + + + $this->ipsclass->adskin->td_header[] = array( "Title" , "50%" ); + $this->ipsclass->adskin->td_header[] = array( "Edit" , "25%" ); + $this->ipsclass->adskin->td_header[] = array( "Remove" , "25%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Current Topic Multi-Moderation" ); + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'topic_mmod', 'order' => "mm_title" ) ); + $this->ipsclass->DB->simple_exec(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + while ( $row = $this->ipsclass->DB->fetch_row() ) + { + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( + "{$row['mm_title']}", + "
    Edit
    ", + "
    Remove
    ", + ) ); + } + } + else + { + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    None set up
    "); + } + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("", 'center', 'tablefooter' ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + $this->ipsclass->admin->output(); + + } + + + //----------------------------------------- + // Get the active in forums + //----------------------------------------- + + function get_activein_forums() + { + $forumids = array(); + + //----------------------------------------- + // Check for an array + //----------------------------------------- + + if ( is_array( $_POST['forums'] ) ) + { + + if ( in_array( 'all', $_POST['forums'] ) ) + { + //----------------------------------------- + // Searching all forums.. + //----------------------------------------- + + return '*'; + } + else + { + //----------------------------------------- + // Go loopy loo + //----------------------------------------- + + foreach( $_POST['forums'] as $l ) + { + if ( $this->ipsclass->forums->forum_by_id[ $l ] ) + { + $forumids[] = intval($l); + } + } + + //----------------------------------------- + // Do we have cats? Give 'em to Charles! + //----------------------------------------- + + if ( count( $forumids ) ) + { + foreach( $forumids as $f ) + { + $children = $this->ipsclass->forums->forums_get_children( $f ); + + if ( is_array($children) and count($children) ) + { + $forumids = array_merge( $forumids , $children ); + } + } + } + else + { + //----------------------------------------- + // No forums selected / we have available + //----------------------------------------- + + return; + } + } + } + else + { + //----------------------------------------- + // Not an array... + //----------------------------------------- + + if ( $this->ipsclass->input['forums'] == 'all' ) + { + return '*'; + } + else + { + if ( $this->ipsclass->input['forums'] != "" ) + { + $l = intval($this->ipsclass->input['forums']); + + //----------------------------------------- + // Single forum + //----------------------------------------- + + if ( $this->ipsclass->forums->forum_by_id[ $l ] ) + { + $forumids[] = intval($l); + } + + if ( $this->ipsclass->input['searchsubs'] == 1 ) + { + $children = $this->ipsclass->forums->forums_get_children( $f ); + + if ( is_array($children) and count($children) ) + { + $forumids = array_merge( $forumids , $children ); + } + } + } + } + } + + return implode( ",", $forumids ); + } +} + + ?> \ No newline at end of file diff --git a/upload/sources/action_admin/paysubscriptions.php b/upload/sources/action_admin/paysubscriptions.php index afa30141..02af1302 100644 --- a/upload/sources/action_admin/paysubscriptions.php +++ b/upload/sources/action_admin/paysubscriptions.php @@ -2,25 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-10-11 13:01:38 -0500 (Wed, 11 Oct 2006) $ -| > $Revision: 628 $ +| > $Date: 2007-10-17 16:30:00 -0400 (Wed, 17 Oct 2007) $ +| > $Revision: 1133 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -333,8 +325,8 @@ class ad_paysubscriptions $this->ipsclass->DB->do_insert( 'subscription_methods', array( 'submethod_title' => $this->gateway->db_info['human_title'], 'submethod_desc' => $this->gateway->db_info['human_desc'], 'submethod_name' => $this->gateway->db_info['module_name'], - 'submethod_is_cc' => $this->gateway->db_info['allow_creditcards'], - 'submethod_is_auto' => $this->gateway->db_info['allow_auto_validate'], + 'submethod_is_cc' => intval($this->gateway->db_info['allow_creditcards']), + 'submethod_is_auto' => intval($this->gateway->db_info['allow_auto_validate']), 'submethod_use_currency' => $this->gateway->db_info['default_currency'] ) ); } @@ -407,7 +399,7 @@ class ad_paysubscriptions // Already installed? //------------------------------------------- - if ( $methods[ $gateway ] ) + if ( isset($methods[ $gateway ]) AND $methods[ $gateway ] ) { $installed = 1; } @@ -1345,10 +1337,10 @@ class ad_paysubscriptions 'submethod_title' => $this->ipsclass->input['submethod_title'], 'submethod_desc' => $this->ipsclass->txt_safeslashes( $_POST['submethod_desc'] ), 'submethod_email' => $this->ipsclass->input['submethod_email'], - 'submethod_active' => $this->ipsclass->input['submethod_active'], + 'submethod_active' => intval($this->ipsclass->input['submethod_active']), 'submethod_sid' => $this->ipsclass->input['submethod_sid'], - 'submethod_is_cc' => $this->ipsclass->input['submethod_is_css'], - 'submethod_is_auto' => $this->ipsclass->input['submethod_is_auto'], + 'submethod_is_cc' => intval($this->ipsclass->input['submethod_is_css']), + 'submethod_is_auto' => intval($this->ipsclass->input['submethod_is_auto']), 'submethod_use_currency' => $this->ipsclass->input['submethod_use_currency'], ); @@ -1493,7 +1485,7 @@ class ad_paysubscriptions $this->ipsclass->html .= implode( "\n", $custom ); } - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Activate this Gateway?
    This will allow your members to use this option." , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Activate this Gateway?
    This will allow your members to use this option." , $this->ipsclass->adskin->form_yes_no("submethod_active", $row['submethod_active'] ) ) ); @@ -1951,6 +1943,11 @@ class ad_paysubscriptions $end_date = $row['sub_unit'] == 'x' ? 'Lifetime' : $this->ipsclass->get_date( $row['subtrans_end_date'], 'JOINED', 1 ); + if( !$row['sub_unit'] ) + { + $end_date = 'N/A'; + } + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "
    " , "{$row['name']}
    [ Edit Transaction ]", "{$row['email']}", @@ -2223,11 +2220,24 @@ class ad_paysubscriptions $new_expiry = 9999999999; } + $groups = array(); + + foreach( $this->ipsclass->cache['group_cache'] as $id => $data ) + { + if( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] + AND $id == $this->ipsclass->vars['admin_group'] ) + { + continue; + } + + $groups[] = $id; + } + $save['subtrans_method'] = $this->ipsclass->input['subtrans_method']; $save['subtrans_end_date'] = $new_expiry; $save['subtrans_sub_id'] = $this->ipsclass->input['subtrans_sub_id']; $save['subtrans_state'] = $this->ipsclass->input['subtrans_state']; - $save['subtrans_old_group'] = $this->ipsclass->input['subtrans_old_group']; + $save['subtrans_old_group'] = in_array( $this->ipsclass->input['subtrans_old_group'], $groups ) ? $this->ipsclass->input['subtrans_old_group']: 0; $save['subtrans_paid'] = $this->ipsclass->input['subtrans_paid']; $save['subtrans_cumulative'] = $this->ipsclass->input['subtrans_paid']; @@ -2340,11 +2350,14 @@ class ad_paysubscriptions $groups = array( 0 => array( 0, "--Don't Change Group--" ) ); - $this->ipsclass->DB->build_query( array( 'select' => 'g_id,g_title', 'from' => 'groups', 'order' => 'g_title' ) ); - $this->ipsclass->DB->exec_query(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) + foreach( $this->ipsclass->cache['group_cache'] as $id => $r ) { + if( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] + AND $r['g_id'] == $this->ipsclass->vars['admin_group'] ) + { + continue; + } + $groups[] = array( $r['g_id'], $r['g_title'] ); } @@ -2799,7 +2812,7 @@ class ad_paysubscriptions { if ( $mark == 'paid' ) { - $change_date = time() + ( $row['sub_length'] * $day_to_seconds[ $row['sub_unit'] ] ); + $change_date = $row['sub_length'] ? time() + ( $row['sub_length'] * $day_to_seconds[ $row['sub_unit'] ] ) : 0; } else { @@ -2893,7 +2906,7 @@ class ad_paysubscriptions $this->email->get_template("new_subscription"); $this->email->build_message( array( 'PACKAGE' => $row['sub_title'], - 'EXPIRES' => $this->ipsclass->get_date( $row['subtrans_end_date'], 'DATE' ), + 'EXPIRES' => $this->ipsclass->get_date( $row['subtrans_end_date'], 'DATE', 1 ), 'LINK' => $this->ipsclass->vars['board_url'].'/index.'.$this->ipsclass->vars['php_ext'].'?act=paysubs&CODE=index', ) ); diff --git a/upload/sources/action_admin/portal.php b/upload/sources/action_admin/portal.php index 14ca3f54..d400a798 100644 --- a/upload/sources/action_admin/portal.php +++ b/upload/sources/action_admin/portal.php @@ -1,394 +1,386 @@ - $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > PORTAL FUNCTIONS -| > Module written by Matt Mecham -| > Date started: Tuesday 2nd August 2005 (10:32) -+-------------------------------------------------------------------------- -*/ - -/** -* ACP MODULE: Portal Plug-ins -* -* Manage portal plug-ins -* -* @package InvisionPowerBoard -* @subpackage ActionAdmin -* @author Matt Mecham -* @version 2.1 -* @since 2.1.0.2005-08-02 -*/ - -/** -* -*/ -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - -/** -* ACP MODULE: Portal Plug-ins -* -* Manage portal plug-ins -* -* @package InvisionPowerBoard -* @subpackage ActionAdmin -* @author Matt Mecham -* @version 2.1 -* @since 2.1.0.2005-08-02 -*/ -class ad_portal -{ - /** - * IPB object - * - * @var object - */ - var $ipsclass; - - /** - * Perm main - * - * @var string - */ - var $perm_main = 'tools'; - - /** - * Perm child - * - * @var string - */ - var $perm_child = 'portal'; - - /** - * Portal objects - * - * @var array - */ - var $portal_objects = array(); - - /*-------------------------------------------------------------------------*/ - // Main handler - /*-------------------------------------------------------------------------*/ - - function auto_run() - { - //----------------------------------------- - // Load HTML - //----------------------------------------- - - $this->html = $this->ipsclass->acp_load_template('cp_skin_tools'); - - //----------------------------------------- - // Load Language - //----------------------------------------- - - $this->ipsclass->acp_load_language( 'acp_lang_portal' ); - - //----------------------------------------- - // What to do? - //----------------------------------------- - - switch($this->ipsclass->input['code']) - { - case 'manage': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->portal_list(); - break; - - case 'portal_settings': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->portal_settings(); - break; - - case 'portal_viewtags': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->portal_viewtags(); - break; - - default: - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->portal_list(); - break; - } - } - - /*-------------------------------------------------------------------------*/ - /** - * Rebuild Portal Cache - * - * @return void - * @since 2.1.0.2005.08.02 - */ - function portal_rebuildcache() - { - $this->ipsclass->cache['portal'] = array(); - - if ( ! is_array( $this->portal_objects ) or ! count( $this->portal_objects ) ) - { - $this->get_portal_objects(); - } - - $this->ipsclass->cache['portal'] = $this->portal_objects; - - $this->ipsclass->update_cache( array( 'name' => 'portal', 'array' => 1, 'deletefirst' => 1 ) ); - } - - /*-------------------------------------------------------------------------*/ - // Show portal settings - /*-------------------------------------------------------------------------*/ - /** - * Show portal settings - * - * @return void - * @since 2.1.0.2005.08.02 - */ - function portal_viewtags() - { - //------------------------------- - // INIT - //------------------------------- - - $pc_key = $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['pc_key'] ); - $file = ROOT_PATH . 'sources/portal_plugins/'.$pc_key.'-cfg.php'; - $content = ""; - - //------------------------------- - // Check - //------------------------------- - - if ( ! $pc_key OR ! file_exists( $file ) ) - { - $this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_key']; - $this->portal_list(); - } - - //------------------------------- - // Grab config file - //------------------------------- - - require_once( $file ); - - if ( is_array( $PORTAL_CONFIG['pc_exportable_tags'] ) AND count( $PORTAL_CONFIG['pc_exportable_tags'] ) ) - { - foreach( $PORTAL_CONFIG['pc_exportable_tags'] as $tag => $tag_data ) - { - $content .= $this->html->portal_pop_row( $tag, $tag_data[1] ); - } - } - - $this->ipsclass->html .= $this->html->portal_pop_overview( $PORTAL_CONFIG['pc_title'], $content ); - - //------------------------------- - // Print - //------------------------------- - - $this->ipsclass->admin->print_popup(); - } - - /*-------------------------------------------------------------------------*/ - // Show portal settings - /*-------------------------------------------------------------------------*/ - /** - * Show portal settings - * - * @return void - * @since 2.1.0.2005.08.02 - */ - function portal_settings() - { - //------------------------------- - // Page Data - //------------------------------- - - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, $this->ipsclass->acp_lang['main_nav'] ); - $this->ipsclass->admin->page_title = $this->ipsclass->acp_lang['main_title']; - $this->ipsclass->admin->page_detail = $this->ipsclass->acp_lang['main_help']; - - //------------------------------- - // INIT - //------------------------------- - - $pc_key = $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['pc_key'] ); - $file = ROOT_PATH . 'sources/portal_plugins/'.$pc_key.'-cfg.php'; - - //------------------------------- - // Check - //------------------------------- - - if ( ! $pc_key OR ! file_exists( $file ) ) - { - $this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_key']; - $this->portal_list(); - } - - //------------------------------- - // Grab config file - //------------------------------- - - require_once( $file ); - - if ( ! $PORTAL_CONFIG['pc_settings_keyword'] ) - { - $this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_settings']; - $this->portal_list(); - } - - //------------------------------- - // Grab, init and load settings - //------------------------------- - - require_once( ROOT_PATH.'sources/action_admin/settings.php' ); - $settings = new ad_settings(); - $settings->ipsclass =& $this->ipsclass; - - $settings->get_by_key = $PORTAL_CONFIG['pc_settings_keyword']; - $settings->return_after_save = $this->ipsclass->form_code.'&code=portal_settings&pc_key='.$pc_key; - - $settings->setting_view(); - } - - /*-------------------------------------------------------------------------*/ - // List portal objects - /*-------------------------------------------------------------------------*/ - /** - * List portal objects - * - * @return void - * @since 2.1.0.2005.08.02 - */ - function portal_list() - { - //------------------------------- - // Page Data - //------------------------------- - - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, $this->ipsclass->acp_lang['main_nav'] ); - $this->ipsclass->admin->page_title = $this->ipsclass->acp_lang['main_title']; - $this->ipsclass->admin->page_detail = $this->ipsclass->acp_lang['main_help']; - - //------------------------------- - // INIT - //------------------------------- - - $content = ""; - - //------------------------------- - // Get portal objects - //------------------------------- - - $this->get_portal_objects(); - - foreach( $this->portal_objects as $portal_data ) - { - //------------------------------- - // (Alex) Cross - //------------------------------- - - $content .= $this->html->portal_row( $portal_data ); - } - - $this->ipsclass->html .= $this->html->portal_overview( $content ); - - //------------------------------- - // Update cache - //------------------------------- - - $this->portal_rebuildcache(); - - //------------------------------- - // Print - //------------------------------- - - $this->ipsclass->admin->output(); - } - - /*-------------------------------------------------------------------------*/ - // Return portal objects - /*-------------------------------------------------------------------------*/ - /** - * Return portal objects - * - * Picks through the portal objects directory - * - * @return void - * @since 2.1.0.2005.08.02 - */ - function get_portal_objects() - { - //------------------------------- - // Got a directory? - //------------------------------- - - if ( ! file_exists( ROOT_PATH.'sources/portal_plugins' ) ) - { - $this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_dir']; - $this->portal_objects = array(); - return; - } - - //------------------------------- - // Go loopy - //------------------------------- - - $handle = opendir( ROOT_PATH.'sources/portal_plugins' ); - - while ( ($file = readdir($handle) ) !== FALSE ) - { - if ( ($file != ".") && ($file != "..") ) - { - preg_match( "#^(.*)-cfg\.php$#", $file, $matches ); - - if ( $matches[0] AND $matches[1] ) - { - //------------------------------- - // Include file... - //------------------------------- - - $PORTAL_CONFIG = array(); - - require_once( ROOT_PATH . 'sources/portal_plugins/' . $matches[0] ); - - if ( is_array( $PORTAL_CONFIG ) AND count( $PORTAL_CONFIG ) ) - { - $PORTAL_CONFIG['pc_key'] = $matches[1]; - - $this->portal_objects[ $matches[1] ] = $PORTAL_CONFIG; - } - } - } - } - - closedir($handle); - } - - -} - - + $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ +| > $Revision: 567 $ +| > $Author: matt $ ++--------------------------------------------------------------------------- +| +| > PORTAL FUNCTIONS +| > Module written by Matt Mecham +| > Date started: Tuesday 2nd August 2005 (10:32) ++-------------------------------------------------------------------------- +*/ + +/** +* ACP MODULE: Portal Plug-ins +* +* Manage portal plug-ins +* +* @package InvisionPowerBoard +* @subpackage ActionAdmin +* @author Matt Mecham +* @version 2.1 +* @since 2.1.0.2005-08-02 +*/ + +/** +* +*/ +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +/** +* ACP MODULE: Portal Plug-ins +* +* Manage portal plug-ins +* +* @package InvisionPowerBoard +* @subpackage ActionAdmin +* @author Matt Mecham +* @version 2.1 +* @since 2.1.0.2005-08-02 +*/ +class ad_portal +{ + /** + * IPB object + * + * @var object + */ + var $ipsclass; + + /** + * Perm main + * + * @var string + */ + var $perm_main = 'tools'; + + /** + * Perm child + * + * @var string + */ + var $perm_child = 'portal'; + + /** + * Portal objects + * + * @var array + */ + var $portal_objects = array(); + + /*-------------------------------------------------------------------------*/ + // Main handler + /*-------------------------------------------------------------------------*/ + + function auto_run() + { + //----------------------------------------- + // Load HTML + //----------------------------------------- + + $this->html = $this->ipsclass->acp_load_template('cp_skin_tools'); + + //----------------------------------------- + // Load Language + //----------------------------------------- + + $this->ipsclass->acp_load_language( 'acp_lang_portal' ); + + //----------------------------------------- + // What to do? + //----------------------------------------- + + switch($this->ipsclass->input['code']) + { + case 'manage': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->portal_list(); + break; + + case 'portal_settings': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->portal_settings(); + break; + + case 'portal_viewtags': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->portal_viewtags(); + break; + + default: + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->portal_list(); + break; + } + } + + /*-------------------------------------------------------------------------*/ + /** + * Rebuild Portal Cache + * + * @return void + * @since 2.1.0.2005.08.02 + */ + function portal_rebuildcache() + { + $this->ipsclass->cache['portal'] = array(); + + if ( ! is_array( $this->portal_objects ) or ! count( $this->portal_objects ) ) + { + $this->get_portal_objects(); + } + + $this->ipsclass->cache['portal'] = $this->portal_objects; + + $this->ipsclass->update_cache( array( 'name' => 'portal', 'array' => 1, 'deletefirst' => 1 ) ); + } + + /*-------------------------------------------------------------------------*/ + // Show portal settings + /*-------------------------------------------------------------------------*/ + /** + * Show portal settings + * + * @return void + * @since 2.1.0.2005.08.02 + */ + function portal_viewtags() + { + //------------------------------- + // INIT + //------------------------------- + + $pc_key = $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['pc_key'] ); + $file = ROOT_PATH . 'sources/portal_plugins/'.$pc_key.'-cfg.php'; + $content = ""; + + //------------------------------- + // Check + //------------------------------- + + if ( ! $pc_key OR ! file_exists( $file ) ) + { + $this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_key']; + $this->portal_list(); + } + + //------------------------------- + // Grab config file + //------------------------------- + + require_once( $file ); + + if ( is_array( $PORTAL_CONFIG['pc_exportable_tags'] ) AND count( $PORTAL_CONFIG['pc_exportable_tags'] ) ) + { + foreach( $PORTAL_CONFIG['pc_exportable_tags'] as $tag => $tag_data ) + { + $content .= $this->html->portal_pop_row( $tag, $tag_data[1] ); + } + } + + $this->ipsclass->html .= $this->html->portal_pop_overview( $PORTAL_CONFIG['pc_title'], $content ); + + //------------------------------- + // Print + //------------------------------- + + $this->ipsclass->admin->print_popup(); + } + + /*-------------------------------------------------------------------------*/ + // Show portal settings + /*-------------------------------------------------------------------------*/ + /** + * Show portal settings + * + * @return void + * @since 2.1.0.2005.08.02 + */ + function portal_settings() + { + //------------------------------- + // Page Data + //------------------------------- + + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, $this->ipsclass->acp_lang['main_nav'] ); + $this->ipsclass->admin->page_title = $this->ipsclass->acp_lang['main_title']; + $this->ipsclass->admin->page_detail = $this->ipsclass->acp_lang['main_help']; + + //------------------------------- + // INIT + //------------------------------- + + $pc_key = $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['pc_key'] ); + $file = ROOT_PATH . 'sources/portal_plugins/'.$pc_key.'-cfg.php'; + + //------------------------------- + // Check + //------------------------------- + + if ( ! $pc_key OR ! file_exists( $file ) ) + { + $this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_key']; + $this->portal_list(); + } + + //------------------------------- + // Grab config file + //------------------------------- + + require_once( $file ); + + if ( ! $PORTAL_CONFIG['pc_settings_keyword'] ) + { + $this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_settings']; + $this->portal_list(); + } + + //------------------------------- + // Grab, init and load settings + //------------------------------- + + require_once( ROOT_PATH.'sources/action_admin/settings.php' ); + $settings = new ad_settings(); + $settings->ipsclass =& $this->ipsclass; + + $settings->get_by_key = $PORTAL_CONFIG['pc_settings_keyword']; + $settings->return_after_save = $this->ipsclass->form_code.'&code=portal_settings&pc_key='.$pc_key; + + $settings->setting_view(); + } + + /*-------------------------------------------------------------------------*/ + // List portal objects + /*-------------------------------------------------------------------------*/ + /** + * List portal objects + * + * @return void + * @since 2.1.0.2005.08.02 + */ + function portal_list() + { + //------------------------------- + // Page Data + //------------------------------- + + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, $this->ipsclass->acp_lang['main_nav'] ); + $this->ipsclass->admin->page_title = $this->ipsclass->acp_lang['main_title']; + $this->ipsclass->admin->page_detail = $this->ipsclass->acp_lang['main_help']; + + //------------------------------- + // INIT + //------------------------------- + + $content = ""; + + //------------------------------- + // Get portal objects + //------------------------------- + + $this->get_portal_objects(); + + foreach( $this->portal_objects as $portal_data ) + { + //------------------------------- + // (Alex) Cross + //------------------------------- + + $content .= $this->html->portal_row( $portal_data ); + } + + $this->ipsclass->html .= $this->html->portal_overview( $content ); + + //------------------------------- + // Update cache + //------------------------------- + + $this->portal_rebuildcache(); + + //------------------------------- + // Print + //------------------------------- + + $this->ipsclass->admin->output(); + } + + /*-------------------------------------------------------------------------*/ + // Return portal objects + /*-------------------------------------------------------------------------*/ + /** + * Return portal objects + * + * Picks through the portal objects directory + * + * @return void + * @since 2.1.0.2005.08.02 + */ + function get_portal_objects() + { + //------------------------------- + // Got a directory? + //------------------------------- + + if ( ! file_exists( ROOT_PATH.'sources/portal_plugins' ) ) + { + $this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_dir']; + $this->portal_objects = array(); + return; + } + + //------------------------------- + // Go loopy + //------------------------------- + + $handle = opendir( ROOT_PATH.'sources/portal_plugins' ); + + while ( ($file = readdir($handle) ) !== FALSE ) + { + if ( ($file != ".") && ($file != "..") ) + { + preg_match( "#^(.*)-cfg\.php$#", $file, $matches ); + + if ( $matches[0] AND $matches[1] ) + { + //------------------------------- + // Include file... + //------------------------------- + + $PORTAL_CONFIG = array(); + + require_once( ROOT_PATH . 'sources/portal_plugins/' . $matches[0] ); + + if ( is_array( $PORTAL_CONFIG ) AND count( $PORTAL_CONFIG ) ) + { + $PORTAL_CONFIG['pc_key'] = $matches[1]; + + $this->portal_objects[ $matches[1] ] = $PORTAL_CONFIG; + } + } + } + } + + closedir($handle); + } + + +} + + ?> \ No newline at end of file diff --git a/upload/sources/action_admin/postoffice.php b/upload/sources/action_admin/postoffice.php index 67df3127..9cf33e58 100644 --- a/upload/sources/action_admin/postoffice.php +++ b/upload/sources/action_admin/postoffice.php @@ -1,1078 +1,1068 @@ - $Date: 2006-12-11 18:00:41 -0500 (Mon, 11 Dec 2006) $ -| > $Revision: 784 $ -| > $Author: bfarber $ -+--------------------------------------------------------------------------- -| -| > POST OFFICE Stuff -| > Module written by Matt Mecham -| > Date started: 1st April 2004 (April Fools!) -| -| > Module Version Number: 1.0.0 -| > DBA Checked: Tue 25th May 2004 -+-------------------------------------------------------------------------- -*/ - - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - - -class ad_postoffice -{ - var $base_url; - var $colours = array(); - var $root_path = './'; - - /** - * Section title name - * - * @var string - */ - var $perm_main = "tools"; - - /** - * Section title name - * - * @var string - */ - var $perm_child = "postoffice"; - - function auto_run() - { - if ( TRIAL_VERSION ) - { - print "Эта функция отключена в бесплатной версии."; - exit(); - } - - $this->root_path = ROOT_PATH ? ROOT_PATH : './'; - - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Работа с e-mail' ); - - $this->ipsclass->admin->page_detail = "В этой секции вы можете управлять как уже созданными рассылками, так и добавлять новые."; - $this->ipsclass->admin->page_title = "Работа с e-mail"; - - switch($this->ipsclass->input['code']) - { - case 'mail_new': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); - $this->mail_form('add'); - break; - case 'mail_edit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->mail_form('edit'); - break; - case 'mail_save': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); - $this->mail_save(); - break; - case 'mail_preview': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->mail_preview_start(); - break; - case 'mail_preview_do': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->mail_preview_complete(); - break; - case 'mail_send_start': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':send' ); - $this->mail_send_start(); - break; - case 'mail_send_complete': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':send' ); - $this->mail_send_complete(); - break; - case 'mail_send_cancel': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':send' ); - $this->mail_send_cancel(); - break; - case 'mail_delete': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); - $this->mail_delete(); - break; - //----------------------------------------- - // Default - //----------------------------------------- - - default: - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->mail_start(); - break; - } - } - - //----------------------------------------- - // DELETE MAIL - WOT IS SAYZ ON TEH TIN - //----------------------------------------- - - function mail_delete() - { - $id = intval( $this->ipsclass->input['id'] ); - - $active = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'mail_id', 'from' => 'bulk_mail', 'where' => 'mail_active=1 AND mail_id <>'.$id ) ); - - if( !$active['mail_id'] ) - { - $this->ipsclass->DB->do_update( 'task_manager', array( 'task_enabled' => 0 ), "task_key='bulkmail'" ); - } - - $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'bulk_mail', 'where' => 'mail_id='.$id ) ); - - $this->ipsclass->main_msg = "Рассылка успешно удалена."; - $this->mail_start(); - } - - //----------------------------------------- - // SEND MAIL: Cancel sending in progress - //----------------------------------------- - - function mail_send_cancel() - { - $this->ipsclass->DB->do_update( 'bulk_mail', array( 'mail_active' => 0, - 'mail_updated' => time(), - ), "mail_active=1" ); - - $this->ipsclass->DB->do_update( 'task_manager', array( 'task_enabled' => 0 ), "task_key='bulkmail'" ); - - $this->ipsclass->main_msg = "Рассылка отменена."; - $this->mail_start(); - } - - //----------------------------------------- - // SEND MAIL: Send the mail mah-boy - //----------------------------------------- - - function mail_send_process( $root_path="" ) - { - //----------------------------------------- - // Set up - //----------------------------------------- - - if ( $root_path ) - { - $this->root_path = $root_path; - } - else if ( ROOT_PATH ) - { - $this->root_path = ROOT_PATH; - } - - require_once( $this->root_path."sources/classes/class_email.php"); - - $this->email = new emailer( $this->root_path ); - $this->email->ipsclass =& $this->ipsclass; - $this->email->email_init(); - - $done = 0; - $sent = 0; - - //----------------------------------------- - // Get it from the db - //----------------------------------------- - - $mail = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'bulk_mail', 'where' => 'mail_active=1' ) ); - - if ( ! $mail['mail_subject'] and ! $mail['mail_content'] ) - { - $done = 1; - } - - //----------------------------------------- - // Per go... - //----------------------------------------- - - $pergo = intval($mail['mail_pergo']); - - if ( ! $pergo or $pergo > 1000 ) - { - $pergo = 50; - } - - //----------------------------------------- - // So far... - //----------------------------------------- - - $sofar = intval($mail['mail_sentto']); - - $mail['mail_content'] = $this->ipsclass->txt_stripslashes( $mail['mail_content'] ); - $mail['mail_subject'] = $this->ipsclass->txt_stripslashes( $mail['mail_subject'] ); - - //----------------------------------------- - // Unconvert options - //----------------------------------------- - - $opts = unserialize(stripslashes( $mail['mail_opts'] ) ); - - foreach( $opts as $k => $v ) - { - $mail[ $k ] = $v; - } - - //----------------------------------------- - // Format the query - //----------------------------------------- - - $query = $this->_build_members_query( $mail ); - - //----------------------------------------- - // Now get members.... - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'members', - 'where' => $query, - 'order' => 'id', - 'limit' => array( $sofar, $pergo ) ) ); - - $o = $this->ipsclass->DB->simple_exec(); - - if ( $mail['mail_html_on'] ) - { - $this->email->html_email = 1; - } - - while ( $r = $this->ipsclass->DB->fetch_row( $o ) ) - { - $sent++; - - $contents = $this->_convert_quick_tags( $mail['mail_content'], $r ); - - $this->email->from = $this->ipsclass->vars['email_out']; - $this->email->to = $r['email']; - $this->email->message = str_replace( "\r\n", "\n", $contents); - $this->email->subject = $mail['mail_subject']; - - $this->email->send_mail(); - } - - //----------------------------------------- - // Did we send any? - //----------------------------------------- - - if ( ! $sent ) - { - $done = 1; - } - - //----------------------------------------- - // Save out.. - //----------------------------------------- - - if ( $done ) - { - $this->ipsclass->DB->do_update( 'bulk_mail', array( 'mail_active' => 0, - 'mail_updated' => time(), - 'mail_sentto' => $sofar + $sent ), 'mail_id='.$mail['mail_id'] ); - - $this->ipsclass->DB->do_update( 'task_manager', array( 'task_enabled' => 0 ), "task_key='bulkmail'" ); - } - else - { - $this->ipsclass->DB->do_update( 'bulk_mail', array( 'mail_updated' => time(), - 'mail_sentto' => $sofar + $sent ), 'mail_id='.$mail['mail_id'] ); - } - } - - //----------------------------------------- - // SEND MAIL: Complete - //----------------------------------------- - - function mail_send_complete() - { - $pergo = intval($this->ipsclass->input['pergo']); - $id = intval($this->ipsclass->input['id']); - - if ( ! $id ) - { - $this->ipsclass->main_msg = "Вы не указали ID..."; - $this->mail_start(); - } - - //----------------------------------------- - // Get it from the db - //----------------------------------------- - - $mail = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'bulk_mail', 'where' => 'mail_id='.$id ) ); - - if ( ! $mail['mail_subject'] and ! $mail['mail_content'] ) - { - $this->ipsclass->main_msg = "Расслыка невозможна, поскольку письмо не имеет темы или содержимого."; - $this->mail_start(); - } - - //----------------------------------------- - // Update mail - //----------------------------------------- - - if ( ! $pergo or $pergo > 1000 ) - { - $pergo = 50; - } - - $this->ipsclass->DB->do_update( 'bulk_mail', array( 'mail_active' => 1, 'mail_pergo' => $pergo, 'mail_sentto' => 0, 'mail_start' => time() ), 'mail_id='.$id ); - $this->ipsclass->DB->do_update( 'bulk_mail', array( 'mail_active' => 0 ) , 'mail_id != '.$id ); - - //----------------------------------------- - // Wake up task manager - //----------------------------------------- - - require_once( ROOT_PATH.'sources/lib/func_taskmanager.php' ); - $task = new func_taskmanager(); - $task->ipsclass =& $this->ipsclass; - - $this->ipsclass->DB->do_update( 'task_manager', array( 'task_enabled' => 1 ), "task_key='bulkmail'" ); - - $this_task = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'task_manager', 'where' => "task_key='bulkmail'" ) ); - $newdate = $task->generate_next_run($this_task); - - $this->ipsclass->DB->do_update( 'task_manager', array( 'task_next_run' => $newdate ), "task_id=".$this_task['task_id'] ); - - $task->save_next_run_stamp(); - - //----------------------------------------- - // Sit back and watch the show - //----------------------------------------- - - $this->ipsclass->main_msg = "Отправка рассылки начата"; - - $this->mail_start(); - } - - - //----------------------------------------- - // SEND MAIL: Start - //----------------------------------------- - - function mail_send_start() - { - $id = intval($this->ipsclass->input['id']); - - if ( ! $id ) - { - $this->ipsclass->main_msg = "Вы не указали ID..."; - $this->mail_start(); - } - - //----------------------------------------- - // Get it from the db - //----------------------------------------- - - $mail = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'bulk_mail', 'where' => 'mail_id='.$id ) ); - - if ( ! $mail['mail_subject'] and ! $mail['mail_content'] ) - { - $this->ipsclass->main_msg = "Расслыка невозможна, поскольку письмо не имеет темы или содержимого."; - $this->mail_start(); - } - - //----------------------------------------- - // Unconvert options - //----------------------------------------- - - $opts = unserialize(stripslashes( $mail['mail_opts'] ) ); - - foreach( $opts as $k => $v ) - { - $mail[ $k ] = $v; - } - - //----------------------------------------- - // Format the query - //----------------------------------------- - - $query = $this->_build_members_query( $mail ); - - //----------------------------------------- - // Count how many matches - //----------------------------------------- - - $count = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as cnt', 'from' => 'members', 'where' => $query ) ); - - $the_count = intval( $count['cnt'] ); - - //----------------------------------------- - // Print 'continue' screen - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'mail_send_complete' ), - 2 => array( 'act' , 'postoffice' ), - 3 => array( 'id' , $this->ipsclass->input['id'] ), - 4 => array( 'section', $this->ipsclass->section_code ), - ) ); - - $this->ipsclass->html .= "
    Шаг 2: Отправка рассылки {$the_count} пользователям
    "; - $this->ipsclass->html .= "
    -
    - Письмо - Тема: {$mail['mail_subject']} -
    -
    -
    -
    - -
    - Отправка {$the_count} пользователям. -
    -
    -
    - Отправка письма - Нажатие на кнопку «Отправить» добавит эту рассылку в задачи форума. Задача останется текущей до тех пор, пока все письма не будут отправлены. -
    - За процессом отправки писем вы можете следить в окне администрирования «Список рассылок», там же можно отменить отправку рассылки. -
    - Настоятельно рекомендуется не рассылать больше 50 писем за один раз, так как это может существенно замедлить работу вашего сервера в момент рассылки писем. -
    -
    - Поскольку раз в минуту отправляется по n писем, этот процесс может занять длительное время. -
    -
    -
    Писем за раз  
    -
    -
    -
    "; - - $this->ipsclass->admin->output(); - } - - //----------------------------------------- - // PREVIEW MAIL: Show it - yo! - //----------------------------------------- - - function mail_preview_complete() - { - - $id = intval($this->ipsclass->input['id']); - - $content = ""; - - if( $id ) - { - //----------------------------------------- - // Get it from the db - //----------------------------------------- - - $mail = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'bulk_mail', 'where' => 'mail_id='.$id ) ); - - $content = $this->_convert_quick_tags( $this->ipsclass->txt_stripslashes($mail['mail_content']), $this->ipsclass->member ); - - $mailopts = unserialize( $mail['mail_opts'] ); - - if( $mailopts['mail_html_on'] == 0 ) - { - $content = nl2br( htmlspecialchars( $content, ENT_QUOTES ) ); - } - } - else - { - if( $_POST['html'] ) - { - $content = $this->_convert_quick_tags( $this->ipsclass->txt_stripslashes($_POST['text']), $this->ipsclass->member ); - } - else - { - $content = nl2br( htmlspecialchars( $this->_convert_quick_tags( $this->ipsclass->txt_stripslashes($_POST['text']), $this->ipsclass->member ), ENT_QUOTES) ); - } - } - - header("HTTP/1.0 200 OK"); - header("HTTP/1.1 200 OK"); - - ob_end_clean(); - - header("Content-type: text/html; charset={$this->ipsclass->vars['gb_char_set']}"); - header("Content-Disposition: inline"); - - print " - -
    - {$content} - - "; - - exit(); - } - - //----------------------------------------- - // PREVIEW MAIL: JS BOUNCE - //----------------------------------------- - - function mail_preview_start() - { - header("HTTP/1.0 200 OK"); - header("HTTP/1.1 200 OK"); - header("Content-type: text/html"); - - print " -
    - - -
    - - "; - } - - //----------------------------------------- - // SAVE MAIL - //----------------------------------------- - - function mail_save() - { - //----------------------------------------- - // Set up - //----------------------------------------- - - $ids = array(); - $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); - - //----------------------------------------- - // Start - //----------------------------------------- - - $type = $this->ipsclass->input['type']; - - if ( ! $this->ipsclass->input['mail_subject'] or ! $this->ipsclass->input['mail_content'] ) - { - $this->ipsclass->main_msg = "Необходимо ввести тему и текст письма."; - $this->mail_form( $type ); - } - - //----------------------------------------- - // Groups... - //----------------------------------------- - - foreach ($this->ipsclass->input as $key => $value) - { - if ( preg_match( "/^sg_(\d+)$/", $key, $match ) ) - { - if ($this->ipsclass->input[ $match[0] ]) - { - $ids[] = $match[1]; - } - } - } - - $ids = $this->ipsclass->clean_int_array( $ids ); - - if ( ! count( $ids ) ) - { - $this->ipsclass->main_msg = "Вы должны выбрать хотя бы одну группу-адресата."; - $this->mail_form( $type ); - } - - $this->ipsclass->input['mail_groups'] = implode( ",", $ids ); - - //----------------------------------------- - // Format the query - //----------------------------------------- - - $query = $this->_build_members_query( array( 'mail_post_ltmt' => $this->ipsclass->input['mail_post_ltmt'], - 'mail_filter_post' => intval($this->ipsclass->input['mail_filter_post']), - 'mail_visit_ltmt' => $this->ipsclass->input['mail_visit_ltmt'], - 'mail_filter_visit' => intval($this->ipsclass->input['mail_filter_visit']), - 'mail_joined_ltmt' => $this->ipsclass->input['mail_joined_ltmt'], - 'mail_filter_joined' => intval($this->ipsclass->input['mail_filter_joined']), - 'mail_honor' => intval($this->ipsclass->input['mail_honor']), - 'mail_groups' => $this->ipsclass->input['mail_groups'], - ) ); - - //----------------------------------------- - // Count how many matches - //----------------------------------------- - - $count = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as cnt', 'from' => 'members', 'where' => $query ) ); - - if ( ! $count['cnt'] ) - { - $this->ipsclass->main_msg = "По вашему запросу не найдено ни одного адреса, попробуйте расширить запрос (например, выбрать большее количество групп)"; - $this->mail_form( $type ); - } - - //----------------------------------------- - // Save - //----------------------------------------- - - $save_array = array( - 'mail_subject' => str_replace( "'", "'", $this->ipsclass->txt_stripslashes( $_POST['mail_subject'] ) ), - 'mail_content' => $this->ipsclass->txt_stripslashes( $_POST['mail_content'] ), - 'mail_groups' => implode( ",", $ids ), - 'mail_honor' => intval($this->ipsclass->input['mail_honor']), - 'mail_start' => time(), - 'mail_updated' => time(), - 'mail_sentto' => 0, - 'mail_opts' => serialize( array( 'mail_post_ltmt' => $_POST['mail_post_ltmt'], - 'mail_filter_post' => $_POST['mail_filter_post'], - 'mail_visit_ltmt' => $_POST['mail_visit_ltmt'], - 'mail_filter_visit' => $_POST['mail_filter_visit'], - 'mail_joined_ltmt' => $_POST['mail_joined_ltmt'], - 'mail_filter_joined' => $_POST['mail_filter_joined'], - 'mail_html_on' => $_POST['mail_html_on'], - ) ) - ); - - if ( $type == 'add' ) - { - //----------------------------------------- - // Save to DB - //----------------------------------------- - - $this->ipsclass->DB->do_insert( 'bulk_mail', $save_array ); - - $this->ipsclass->input['id'] = $this->ipsclass->DB->get_insert_id(); - - $this->ipsclass->admin->save_log("Добавлена рассылка ({$this->ipsclass->input['mail_subject']})"); - $this->mail_send_start(); - } - else - { - if ( ! $this->ipsclass->input['id'] ) - { - $this->ipsclass->main_msg = "Невозможно сохранить, ID рассылки не найден"; - $this->mail_form($type); - } - - $this->ipsclass->DB->do_update( 'bulk_mail', $save_array, 'mail_id='.$this->ipsclass->input['id'] ); - - $this->ipsclass->admin->save_log("Изменена рассылка ({$this->ipsclass->input['mail_subject']})"); - - $this->ipsclass->main_msg = "Рассылка изменена"; - $this->mail_start(); - } - } - - //----------------------------------------- - // SHOW MAIN MAIL SCREENIE-POOS - //----------------------------------------- - - function mail_form($type='add') - { - $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); - - $dd_ltmt = array( - 0 => array( 'lt' , "меньше чем" ), - 1 => array( 'mt' , "больше чем" ) - ); - - if ( $type == 'add' ) - { - $mail = array(); - $title = "Шаг 1: Создание новой рассылки"; - $button = "Продолжить..."; - $honour_checked = 'checked="checked"'; - $html_checked = ''; - } - else - { - $mail = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'bulk_mail', 'where' => 'mail_id='.$this->ipsclass->input['id'] ) ); - $title = "Изменение рассылки"; - $button = "Изменить эту рассылку"; - - //----------------------------------------- - // Unpack more.. - //----------------------------------------- - - $tmp = unserialize( stripslashes( $mail['mail_opts'] ) ); - - if ( is_array( $tmp ) and count ( $tmp ) ) - { - foreach( $tmp as $k => $v ) - { - if ( ! $mail[ $k ] ) - { - $mail[ $k ] = $v; - } - } - } - - $honour_checked = $mail['mail_honor'] == 1 ? 'checked="checked"' : ''; - $html_checked = $mail['mail_html_on'] == 1 ? 'checked="checked"' : ''; - - } - - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'mail_save' ), - 2 => array( 'act' , 'postoffice' ), - 3 => array( 'type' , $type ), - 4 => array( 'id' , $this->ipsclass->input['id'] ), - 5 => array( 'section', $this->ipsclass->section_code ), - ) ); - - $mail_subject = $_POST['mail_subject'] ? $this->ipsclass->txt_stripslashes($_POST['mail_subject']) : $mail['mail_subject']; - $mail_content = $_POST['mail_content'] ? $this->ipsclass->txt_stripslashes($_POST['mail_content']) : $mail['mail_content']; - $mail_subject = str_replace( "'", "'", $mail_subject ); - - $mail_content = preg_replace( "[^\r]\n", "\r\n", $mail_content ); - - if ( ! $mail_content and $type == 'add' ) - { - $mail_content = $this->_get_default_mail_contents(); - } - - if ( $this->ipsclass->input['mail_groups'] ) - { - $mail['mail_groups'] = $this->ipsclass->input['mail_groups']; - } - - $this->ipsclass->html .= " - "; - - $this->ipsclass->html .= "
    {$title}
    "; - $this->ipsclass->html .= "
    -
    - Тема письма - -
    -
    -
    - Текст письма - -
    -
    - Настройки письма -   Отправить письмо только тем пользователям, которые разрешили в своем профиле получать письма от администрации? -
    -   Отправить письмо в формате HTML (разрешено форматирование текста и HTML-теги)? -
    -
    "; - - $this->ipsclass->html .= "

    "; - - $this->ipsclass->html .= "
    Фильтры
    "; - $this->ipsclass->html .= "
    - - - - - -
    -
    - Группы адресатов:"; - - foreach( $this->ipsclass->cache['group_cache'] as $g ) - { - if ( $g['g_id'] == $this->ipsclass->vars['guest_group'] ) - { - continue; - } - - $checked = ""; - - if ( $mail['mail_groups'] ) - { - if ( strstr( ','.$mail['mail_groups'].',', ','.$g['g_id'].',' ) ) - { - $checked = 'checked="checked"'; - } - } - - $this->ipsclass->html .= "  {$g['g_title']}
    "; - } - - $this->ipsclass->html .= "
    -
    -
    - Дополнительные фильтры - - - - - - - - - - - - - -
    Отправить пользователям с количеством сообщений". $this->ipsclass->adskin->form_dropdown('mail_post_ltmt', $dd_ltmt, $_POST['mail_post_ltml'] ? $_POST['mail_post_ltml'] : $mail['mail_post_ltmt'] ).' '. - $this->ipsclass->adskin->form_simple_input( "mail_filter_post", $_POST['mail_filter_post'] ? $_POST['mail_filter_post'] : $mail['mail_filter_post'], 7 )."
    Отправить пользователям, чей последний визит был". $this->ipsclass->adskin->form_dropdown('mail_visit_ltmt', $dd_ltmt, $_POST['mail_visit_ltml'] ? $_POST['mail_visit_ltml'] : $mail['mail_visit_ltmt'] ).' '. - $this->ipsclass->adskin->form_simple_input( "mail_filter_visit", $_POST['mail_filter_visit'] ? $_POST['mail_filter_visit'] : $mail['mail_filter_visit'], 7 )." дней назад
    Отправить пользователям, которые зарегистрировались". $this->ipsclass->adskin->form_dropdown('mail_joined_ltmt', $dd_ltmt, $_POST['mail_joined_ltml'] ? $_POST['mail_joined_ltml'] : $mail['mail_joined_ltmt'] ).' '. - $this->ipsclass->adskin->form_simple_input( "mail_filter_joined", $_POST['mail_filter_joined'] ? $_POST['mail_filter_joined'] : $mail['mail_filter_joined'], 7 )." дней назад
    -
    Чтобы не использовать любой из фильтров, просто оставьте поле пустым.
    -
    -
    -
    -
       
    -
    "; - - $this->ipsclass->html .= "
    -
    -
    Доступные теги
    -
    В вашей рассылке вы можете использовать следующие теги, которые будут заменены при отправке рассылки.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {board_name}Название форума{board_url}Адрес форума
    {reg_total}Общее количество зарегистрированных пользователей{total_posts}Общее количество сообщений на форуме
    {busy_count}Максимальное количество пользователей в онлайне{busy_time}Дата рекода посещаемости форума
    {member_id}ID пользователя — получателя письма{member_name}Имя пользователя — получателя письма
    {member_joined}Дата регистрациии пользователя — получателя письма{member_posts}Количество сообщений пользователя — получателя письма
    -
    "; - - $this->ipsclass->admin->output(); - } - - //----------------------------------------- - // SHOW MAIN MAIL SCREENIE-POOS - //----------------------------------------- - - function mail_start() - { - $this->ipsclass->adskin->td_header[] = array( " " , "1%" ); - $this->ipsclass->adskin->td_header[] = array( "Тема" , "30%" ); - $this->ipsclass->adskin->td_header[] = array( "Дата отправки" , "15%" ); - $this->ipsclass->adskin->td_header[] = array( "Получателей" , "15%" ); - $this->ipsclass->adskin->td_header[] = array( "Времени заняло (ушло)" , "15%" ); - $this->ipsclass->adskin->td_header[] = array( " " , "1%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Сохраненные рассылки" ); - - //----------------------------------------- - // Get mail from DB - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'bulk_mail', 'order' => 'mail_start DESC' ) ); - $this->ipsclass->DB->simple_exec(); - - while( $r = $this->ipsclass->DB->fetch_row() ) - { - - $inprogress = ""; - - if ( $r['mail_updated'] == $r['mail_start'] ) - { - $time_taken = 'Не отправлено'; - } - else - { - $time_taken = intval($r['mail_updated'] - $r['mail_start']); - - if ( $time_taken < 0 ) - { - $time_taken = 0; - } - - if ( $time_taken ) - { - $time_taken = ceil( $time_taken / 60 ); - } - - $time_taken .= ' минут'; - } - - if ( $r['mail_active'] ) - { - $inprogress = " ( Происходит отправка - ipsclass->base_url}&{$this->ipsclass->form_code_js}&code=mail_send_cancel', 'OK to cancel bulk mail?'); return false;\">Отменить отправку этой рассылки )"; - } - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "", - "{$r['mail_subject']} $inprogress", - $this->ipsclass->get_date( $r['mail_start'], 'SHORT' ), - $this->ipsclass->do_number_format( $r['mail_sentto'] ).' пользователей', - $time_taken, - "
    Изменить рассылку
    " - ) ); - - $this->ipsclass->html .= << - menu_build_menu( - "mid-{$r['mail_id']}", - new Array( - img_item + " Перезапуск рассылки", - img_item + " Изменить рассылку", - img_item + " ipsclass->base_url}&{$this->ipsclass->form_code}&code=mail_delete&id={$r['mail_id']}');return false;\">Удалить рассылку" - ) ); - -EOF; - } - - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - $this->ipsclass->admin->output(); - - } - - //----------------------------------------- - // INTERNAL: build members query - //----------------------------------------- - - function _build_members_query( $args = array() ) - { - $this->ipsclass->DB->load_cache_file( $this->root_path.'sources/sql/'.SQL_DRIVER.'_extra_queries.php', 'sql_extra_queries' ); - - $query = array(); - - if ( $args['mail_filter_post'] ) - { - $ltmt = $args['mail_post_ltmt'] == 'lt' ? '<' : '>'; - $query[] = "posts ".$ltmt." ".$args['mail_filter_post']; - } - - if ( $args['mail_filter_visit'] ) - { - $ltmt = $args['mail_visit_ltmt'] == 'lt' ? '>' : '<'; - $time = time() - ( $args['mail_filter_visit'] * 86400 ); - $query[] = "last_visit ".$ltmt." ". $time; - } - - if ( $args['mail_filter_joined'] ) - { - $ltmt = $args['mail_joined_ltmt'] == 'lt' ? '>' : '<'; - $time = time() - ( $args['mail_filter_joined'] * 86400 ); - $query[] = "joined ".$ltmt." ". $time; - } - - if ( $args['mail_honor'] ) - { - $query[] = "allow_admin_mails=1"; - } - - if ( $args['mail_groups'] ) - { - $tmp_q = '(mgroup IN ('. $args['mail_groups'] .')'; - - $temp = explode( ',', $args['mail_groups'] ); - - if ( is_array( $temp ) and count( $temp ) ) - { - $tmp = array(); - - foreach( $temp as $id ) - { - $this->ipsclass->DB->cache_add_query( 'acp_postoffice_concat_bit', array( 'gid' => $id ), 'sql_extra_queries' ); - $tmp[] = $this->ipsclass->DB->cur_query; - $this->ipsclass->DB->cur_query = ""; - } - - $tmp_q .= " OR ( ".implode( ' OR ', $tmp ). " ) )"; - } - else - { - $tmp_q .= ")"; - } - - $query[] = $tmp_q; - } - - return implode( ' AND ', $query ); - } - - //----------------------------------------- - // INTERNAL: convert quick tags - //----------------------------------------- - - function _convert_quick_tags( $contents="", $member=array() ) - { - $contents = str_replace( "{board_name}" , str_replace( "'", "'", $this->ipsclass->vars['board_name'] ) , $contents ); - $contents = str_replace( "{board_url}" , $this->ipsclass->vars['board_url']."/index.".$this->ipsclass->vars['php_ext'] , $contents ); - $contents = str_replace( "{reg_total}" , $this->ipsclass->cache['stats']['mem_count'] , $contents ); - $contents = str_replace( "{total_posts}" , $this->ipsclass->cache['stats']['total_topics'] + $this->ipsclass->cache['stats']['total_replies'] , $contents ); - $contents = str_replace( "{busy_count}" , $this->ipsclass->cache['stats']['most_count'] , $contents ); - $contents = str_replace( "{busy_time}" , $this->ipsclass->get_date( $this->ipsclass->cache['stats']['most_date'], 'SHORT' ), $contents ); - $contents = str_replace( "{member_id}" , $member['id'], $contents ); - $contents = str_replace( "{member_name}" , $member['name'], $contents ); - $contents = str_replace( "{member_joined}", date( 'j-F y', $member['joined'] ), $contents ); - $contents = str_replace( "{member_posts}" , $member['posts'], $contents ); - - return $contents; - } - - //----------------------------------------- - // INTERNAL: get default mail - //----------------------------------------- - - function _get_default_mail_contents() - { - $mail = "Уважаемый(ая) {member_name}.\n\n\n-------------------------------------\nСтатистика форума «{board_name}»:\n" - ."-------------------------------------\nВсего пользователей зарегистрировано: {reg_total}\nВсего оставлено сообщений: {total_posts}\n" - ."Рекорд посещаемости: {busy_count} пользователей было {busy_time}\n\n" - ."-------------------------------------\nПолезные ссылки\n" - ."-------------------------------------\nАдрес форума: {board_url}\nВойти на форум: {board_url}?act=Login&CODE=00\n" - ."Восстановление утерянного пароля: {board_url}?act=Reg&CODE=10\n\n" - ."-------------------------------------\nКак отписаться от рассылок?\n" - ."-------------------------------------\nПожалуйста, измените в вашем профиле ({board_url}?act=UserCP&CODE=02) настройки e-mail " - ."и уберите галочку «Сообщать мне обо всех изменениях, проводимых администрацией форума»."; - - return $mail; - - } - - -} - - + $Date: 2007-09-17 18:06:06 -0400 (Mon, 17 Sep 2007) $ +| > $Revision: 1106 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > POST OFFICE Stuff +| > Module written by Matt Mecham +| > Date started: 1st April 2004 (April Fools!) +| +| > Module Version Number: 1.0.0 +| > DBA Checked: Tue 25th May 2004 ++-------------------------------------------------------------------------- +*/ + + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class ad_postoffice +{ + var $base_url; + var $colours = array(); + var $root_path = './'; + + /** + * Section title name + * + * @var string + */ + var $perm_main = "tools"; + + /** + * Section title name + * + * @var string + */ + var $perm_child = "postoffice"; + + function auto_run() + { + if ( TRIAL_VERSION ) + { + print "This feature is disabled in the trial version."; + exit(); + } + + $this->root_path = ROOT_PATH ? ROOT_PATH : './'; + + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'IPB Post Office' ); + + $this->ipsclass->admin->page_detail = "You may manage previous bulk emails and create new bulk emails in this section."; + $this->ipsclass->admin->page_title = "IPB Post Office"; + + switch($this->ipsclass->input['code']) + { + case 'mail_new': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); + $this->mail_form('add'); + break; + case 'mail_edit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->mail_form('edit'); + break; + case 'mail_save': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); + $this->mail_save(); + break; + case 'mail_preview': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->mail_preview_start(); + break; + case 'mail_preview_do': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->mail_preview_complete(); + break; + case 'mail_send_start': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':send' ); + $this->mail_send_start(); + break; + case 'mail_send_complete': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':send' ); + $this->mail_send_complete(); + break; + case 'mail_send_cancel': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':send' ); + $this->mail_send_cancel(); + break; + case 'mail_delete': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); + $this->mail_delete(); + break; + //----------------------------------------- + // Default + //----------------------------------------- + + default: + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->mail_start(); + break; + } + } + + //----------------------------------------- + // DELETE MAIL - WOT IS SAYZ ON TEH TIN + //----------------------------------------- + + function mail_delete() + { + $id = intval( $this->ipsclass->input['id'] ); + + $active = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'mail_id', 'from' => 'bulk_mail', 'where' => 'mail_active=1 AND mail_id <>'.$id ) ); + + if( !$active['mail_id'] ) + { + $this->ipsclass->DB->do_update( 'task_manager', array( 'task_enabled' => 0 ), "task_key='bulkmail'" ); + } + + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'bulk_mail', 'where' => 'mail_id='.$id ) ); + + $this->ipsclass->main_msg = "Bulk email deleted"; + $this->mail_start(); + } + + //----------------------------------------- + // SEND MAIL: Cancel sending in progress + //----------------------------------------- + + function mail_send_cancel() + { + $this->ipsclass->DB->do_update( 'bulk_mail', array( 'mail_active' => 0, + 'mail_updated' => time(), + ), "mail_active=1" ); + + $this->ipsclass->DB->do_update( 'task_manager', array( 'task_enabled' => 0 ), "task_key='bulkmail'" ); + + $this->ipsclass->main_msg = "Bulk email cancelled"; + $this->mail_start(); + } + + //----------------------------------------- + // SEND MAIL: Send the mail mah-boy + //----------------------------------------- + + function mail_send_process( $root_path="" ) + { + //----------------------------------------- + // Set up + //----------------------------------------- + + if ( $root_path ) + { + $this->root_path = $root_path; + } + else if ( ROOT_PATH ) + { + $this->root_path = ROOT_PATH; + } + + require_once( $this->root_path."sources/classes/class_email.php"); + + $this->email = new emailer( $this->root_path ); + $this->email->ipsclass =& $this->ipsclass; + $this->email->email_init(); + + $done = 0; + $sent = 0; + + //----------------------------------------- + // Get it from the db + //----------------------------------------- + + $mail = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'bulk_mail', 'where' => 'mail_active=1' ) ); + + if ( ! $mail['mail_subject'] and ! $mail['mail_content'] ) + { + $done = 1; + } + + //----------------------------------------- + // Per go... + //----------------------------------------- + + $pergo = intval($mail['mail_pergo']); + + if ( ! $pergo or $pergo > 1000 ) + { + $pergo = 50; + } + + //----------------------------------------- + // So far... + //----------------------------------------- + + $sofar = intval($mail['mail_sentto']); + + $mail['mail_content'] = $this->ipsclass->txt_stripslashes( $mail['mail_content'] ); + $mail['mail_subject'] = $this->ipsclass->txt_stripslashes( $mail['mail_subject'] ); + + //----------------------------------------- + // Unconvert options + //----------------------------------------- + + $opts = unserialize(stripslashes( $mail['mail_opts'] ) ); + + foreach( $opts as $k => $v ) + { + $mail[ $k ] = $v; + } + + //----------------------------------------- + // Format the query + //----------------------------------------- + + $query = $this->_build_members_query( $mail ); + + //----------------------------------------- + // Now get members.... + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', + 'from' => 'members', + 'where' => $query, + 'order' => 'id', + 'limit' => array( $sofar, $pergo ) ) ); + + $o = $this->ipsclass->DB->simple_exec(); + + if ( $mail['mail_html_on'] ) + { + $this->email->html_email = 1; + } + + while ( $r = $this->ipsclass->DB->fetch_row( $o ) ) + { + $sent++; + + $contents = $this->_convert_quick_tags( $mail['mail_content'], $r ); + + $this->email->from = $this->ipsclass->vars['email_out']; + $this->email->to = $r['email']; + $this->email->message = str_replace( "\r\n", "\n", $contents); + $this->email->subject = $mail['mail_subject']; + + $this->email->send_mail(); + } + + //----------------------------------------- + // Did we send any? + //----------------------------------------- + + if ( ! $sent ) + { + $done = 1; + } + + //----------------------------------------- + // Save out.. + //----------------------------------------- + + if ( $done ) + { + $this->ipsclass->DB->do_update( 'bulk_mail', array( 'mail_active' => 0, + 'mail_updated' => time(), + 'mail_sentto' => $sofar + $sent ), 'mail_id='.$mail['mail_id'] ); + + $this->ipsclass->DB->do_update( 'task_manager', array( 'task_enabled' => 0 ), "task_key='bulkmail'" ); + } + else + { + $this->ipsclass->DB->do_update( 'bulk_mail', array( 'mail_updated' => time(), + 'mail_sentto' => $sofar + $sent ), 'mail_id='.$mail['mail_id'] ); + } + } + + //----------------------------------------- + // SEND MAIL: Complete + //----------------------------------------- + + function mail_send_complete() + { + $pergo = intval($this->ipsclass->input['pergo']); + $id = intval($this->ipsclass->input['id']); + + if ( ! $id ) + { + $this->ipsclass->main_msg = "There was no ID passed to this function"; + $this->mail_start(); + } + + //----------------------------------------- + // Get it from the db + //----------------------------------------- + + $mail = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'bulk_mail', 'where' => 'mail_id='.$id ) ); + + if ( ! $mail['mail_subject'] and ! $mail['mail_content'] ) + { + $this->ipsclass->main_msg = "Cannot send - the email doesn't have a subject and content"; + $this->mail_start(); + } + + //----------------------------------------- + // Update mail + //----------------------------------------- + + if ( ! $pergo or $pergo > 1000 ) + { + $pergo = 50; + } + + $this->ipsclass->DB->do_update( 'bulk_mail', array( 'mail_active' => 1, 'mail_pergo' => $pergo, 'mail_sentto' => 0, 'mail_start' => time() ), 'mail_id='.$id ); + $this->ipsclass->DB->do_update( 'bulk_mail', array( 'mail_active' => 0 ) , 'mail_id != '.$id ); + + //----------------------------------------- + // Wake up task manager + //----------------------------------------- + + require_once( ROOT_PATH.'sources/lib/func_taskmanager.php' ); + $task = new func_taskmanager(); + $task->ipsclass =& $this->ipsclass; + + $this->ipsclass->DB->do_update( 'task_manager', array( 'task_enabled' => 1 ), "task_key='bulkmail'" ); + + $this_task = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'task_manager', 'where' => "task_key='bulkmail'" ) ); + $newdate = $task->generate_next_run($this_task); + + $this->ipsclass->DB->do_update( 'task_manager', array( 'task_next_run' => $newdate ), "task_id=".$this_task['task_id'] ); + + $task->save_next_run_stamp(); + + //----------------------------------------- + // Sit back and watch the show + //----------------------------------------- + + $this->ipsclass->main_msg = "Bulk Mail Initiated"; + + $this->mail_start(); + } + + + //----------------------------------------- + // SEND MAIL: Start + //----------------------------------------- + + function mail_send_start() + { + $id = intval($this->ipsclass->input['id']); + + if ( ! $id ) + { + $this->ipsclass->main_msg = "There was no ID passed to this function"; + $this->mail_start(); + } + + //----------------------------------------- + // Get it from the db + //----------------------------------------- + + $mail = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'bulk_mail', 'where' => 'mail_id='.$id ) ); + + if ( ! $mail['mail_subject'] and ! $mail['mail_content'] ) + { + $this->ipsclass->main_msg = "Cannot send - the email doesn't have a subject and content"; + $this->mail_start(); + } + + //----------------------------------------- + // Unconvert options + //----------------------------------------- + + $opts = unserialize(stripslashes( $mail['mail_opts'] ) ); + + foreach( $opts as $k => $v ) + { + $mail[ $k ] = $v; + } + + //----------------------------------------- + // Format the query + //----------------------------------------- + + $query = $this->_build_members_query( $mail ); + + //----------------------------------------- + // Count how many matches + //----------------------------------------- + + $count = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as cnt', 'from' => 'members', 'where' => $query ) ); + + $the_count = intval( $count['cnt'] ); + + //----------------------------------------- + // Print 'continue' screen + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'mail_send_complete' ), + 2 => array( 'act' , 'postoffice' ), + 3 => array( 'id' , $this->ipsclass->input['id'] ), + 4 => array( 'section', $this->ipsclass->section_code ), + ) ); + + $this->ipsclass->html .= "
    Sending the bulk mail to {$the_count} members
    "; + $this->ipsclass->html .= "
    +
    + Email Details + Subject: {$mail['mail_subject']} +
    +
    +
    +
    + +
    + Sending to {$the_count}  members. +
    +
    +
    + Sending the Email + Clicking the 'Start Sending The Emails' button below will activate the task manager's send bulk email function which will send the email in batches until the all the mail + has been sent. You can watch the progress from the main Post Office screen and cancel the email from being sent. +
    + We strongly recommend that you opt to send 50 emails per cycle as a maximum. Any more per cycle could severly affect performance of your server while the mail is being sent out. +
    +
    + As the mail is sent out in cycles of n  per minute, it can take a while to process all the mail. +
    +
    +
    Emails sent per cycle  
    +
    +
    +
    "; + + $this->ipsclass->admin->output(); + } + + //----------------------------------------- + // PREVIEW MAIL: Show it - yo! + //----------------------------------------- + + function mail_preview_complete() + { + + $id = intval($this->ipsclass->input['id']); + + $content = ""; + + if( $id ) + { + //----------------------------------------- + // Get it from the db + //----------------------------------------- + + $mail = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'bulk_mail', 'where' => 'mail_id='.$id ) ); + + $content = $this->_convert_quick_tags( $this->ipsclass->txt_stripslashes($mail['mail_content']), $this->ipsclass->member ); + + $mailopts = unserialize( $mail['mail_opts'] ); + + if( $mailopts['mail_html_on'] == 0 ) + { + $content = nl2br( htmlspecialchars( $content, ENT_QUOTES ) ); + } + } + else + { + if( $_POST['html'] ) + { + $content = $this->_convert_quick_tags( $this->ipsclass->txt_stripslashes($_POST['text']), $this->ipsclass->member ); + } + else + { + $content = nl2br( htmlspecialchars( $this->_convert_quick_tags( $this->ipsclass->txt_stripslashes($_POST['text']), $this->ipsclass->member ), ENT_QUOTES) ); + } + } + + header("HTTP/1.0 200 OK"); + header("HTTP/1.1 200 OK"); + + ob_end_clean(); + + header("Content-type: text/html; charset={$this->ipsclass->vars['gb_char_set']}"); + header("Content-Disposition: inline"); + + print " + +
    + {$content} + + "; + + exit(); + } + + //----------------------------------------- + // PREVIEW MAIL: JS BOUNCE + //----------------------------------------- + + function mail_preview_start() + { + header("HTTP/1.0 200 OK"); + header("HTTP/1.1 200 OK"); + header("Content-type: text/html"); + + print " +
    + + +
    + + "; + } + + //----------------------------------------- + // SAVE MAIL + //----------------------------------------- + + function mail_save() + { + //----------------------------------------- + // Set up + //----------------------------------------- + + $ids = array(); + $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); + + //----------------------------------------- + // Start + //----------------------------------------- + + $type = $this->ipsclass->input['type']; + + if ( ! $this->ipsclass->input['mail_subject'] or ! $this->ipsclass->input['mail_content'] ) + { + $this->ipsclass->main_msg = "You must enter an email subject and email content before submitting."; + $this->mail_form( $type ); + } + + //----------------------------------------- + // Groups... + //----------------------------------------- + + foreach ($this->ipsclass->input as $key => $value) + { + if ( preg_match( "/^sg_(\d+)$/", $key, $match ) ) + { + if ($this->ipsclass->input[ $match[0] ]) + { + $ids[] = $match[1]; + } + } + } + + $ids = $this->ipsclass->clean_int_array( $ids ); + + if ( ! count( $ids ) ) + { + $this->ipsclass->main_msg = "You must select at least one group to send this email message to."; + $this->mail_form( $type ); + } + + $this->ipsclass->input['mail_groups'] = implode( ",", $ids ); + + //----------------------------------------- + // Format the query + //----------------------------------------- + + $query = $this->_build_members_query( array( 'mail_post_ltmt' => $this->ipsclass->input['mail_post_ltmt'], + 'mail_filter_post' => $this->ipsclass->input['mail_filter_post'], + 'mail_visit_ltmt' => $this->ipsclass->input['mail_visit_ltmt'], + 'mail_filter_visit' => intval($this->ipsclass->input['mail_filter_visit']), + 'mail_joined_ltmt' => $this->ipsclass->input['mail_joined_ltmt'], + 'mail_filter_joined' => intval($this->ipsclass->input['mail_filter_joined']), + 'mail_honor' => intval($this->ipsclass->input['mail_honor']), + 'mail_groups' => $this->ipsclass->input['mail_groups'], + ) ); + + //----------------------------------------- + // Count how many matches + //----------------------------------------- + + $count = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as cnt', 'from' => 'members', 'where' => $query ) ); + + if ( ! $count['cnt'] ) + { + $this->ipsclass->main_msg = "Your criteria didn't match any members - please adjust your current criteria"; + $this->mail_form( $type ); + } + + //----------------------------------------- + // Save + //----------------------------------------- + + $save_array = array( + 'mail_subject' => str_replace( "'", "'", $this->ipsclass->txt_stripslashes( $_POST['mail_subject'] ) ), + 'mail_content' => $this->ipsclass->txt_stripslashes( $_POST['mail_content'] ), + 'mail_groups' => implode( ",", $ids ), + 'mail_honor' => intval($this->ipsclass->input['mail_honor']), + 'mail_start' => time(), + 'mail_updated' => time(), + 'mail_sentto' => 0, + 'mail_opts' => serialize( array( 'mail_post_ltmt' => $_POST['mail_post_ltmt'], + 'mail_filter_post' => $_POST['mail_filter_post'], + 'mail_visit_ltmt' => $_POST['mail_visit_ltmt'], + 'mail_filter_visit' => $_POST['mail_filter_visit'], + 'mail_joined_ltmt' => $_POST['mail_joined_ltmt'], + 'mail_filter_joined' => $_POST['mail_filter_joined'], + 'mail_html_on' => $_POST['mail_html_on'], + ) ) + ); + + if ( $type == 'add' ) + { + //----------------------------------------- + // Save to DB + //----------------------------------------- + + $this->ipsclass->DB->do_insert( 'bulk_mail', $save_array ); + + $this->ipsclass->input['id'] = $this->ipsclass->DB->get_insert_id(); + + $this->ipsclass->admin->save_log("Bulk mail ({$this->ipsclass->input['mail_subject']}) added"); + $this->mail_send_start(); + } + else + { + if ( ! $this->ipsclass->input['id'] ) + { + $this->ipsclass->main_msg = "Cannot save, no ID returned"; + $this->mail_form($type); + } + + $this->ipsclass->DB->do_update( 'bulk_mail', $save_array, 'mail_id='.$this->ipsclass->input['id'] ); + + $this->ipsclass->admin->save_log("Bulk mail ({$this->ipsclass->input['mail_subject']}) edited"); + + $this->ipsclass->main_msg = "Bulk mail edited"; + $this->mail_start(); + } + } + + //----------------------------------------- + // SHOW MAIN MAIL SCREENIE-POOS + //----------------------------------------- + + function mail_form($type='add') + { + $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); + + $dd_ltmt = array( + 0 => array( 'lt' , "less than" ), + 1 => array( 'mt' , "more than" ) + ); + + if ( $type == 'add' ) + { + $mail = array(); + $title = "Step 1: Start New Bulk Email"; + $button = "Proceed..."; + $honour_checked = 'checked="checked"'; + $html_checked = ''; + } + else + { + $mail = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'bulk_mail', 'where' => 'mail_id='.$this->ipsclass->input['id'] ) ); + $title = "Editing Stored Mail"; + $button = "Edit Mail"; + + //----------------------------------------- + // Unpack more.. + //----------------------------------------- + + $tmp = unserialize( stripslashes( $mail['mail_opts'] ) ); + + if ( is_array( $tmp ) and count ( $tmp ) ) + { + foreach( $tmp as $k => $v ) + { + if ( ! $mail[ $k ] ) + { + $mail[ $k ] = $v; + } + } + } + + $honour_checked = $mail['mail_honor'] == 1 ? 'checked="checked"' : ''; + $html_checked = $mail['mail_html_on'] == 1 ? 'checked="checked"' : ''; + + } + + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'mail_save' ), + 2 => array( 'act' , 'postoffice' ), + 3 => array( 'type' , $type ), + 4 => array( 'id' , $this->ipsclass->input['id'] ), + 5 => array( 'section', $this->ipsclass->section_code ), + ) ); + + $mail_subject = $_POST['mail_subject'] ? $this->ipsclass->txt_stripslashes($_POST['mail_subject']) : $mail['mail_subject']; + $mail_content = $_POST['mail_content'] ? $this->ipsclass->txt_stripslashes($_POST['mail_content']) : $mail['mail_content']; + $mail_subject = str_replace( "'", "'", $mail_subject ); + + $mail_content = preg_replace( "[^\r]\n", "\r\n", $mail_content ); + + if ( ! $mail_content and $type == 'add' ) + { + $mail_content = $this->_get_default_mail_contents(); + } + + if ( $this->ipsclass->input['mail_groups'] ) + { + $mail['mail_groups'] = $this->ipsclass->input['mail_groups']; + } + + $this->ipsclass->html .= " + "; + + $this->ipsclass->html .= "
    {$title}
    "; + $this->ipsclass->html .= "
    +
    + Email Subject + +
    +
    +
    + Email Content + +
    +
    + Mail Sending Options +   Honor 'Allow admin to email me' member setting to only email those who have opted in? +
    +   Send email in HTML format (full HTML formatting & tags allowed) +
    +
    "; + + $this->ipsclass->html .= "

    "; + + $this->ipsclass->html .= "
    Filters
    "; + $this->ipsclass->html .= "
    + + + + + +
    +
    + Send to Groups:"; + + foreach( $this->ipsclass->cache['group_cache'] as $g ) + { + if ( $g['g_id'] == $this->ipsclass->vars['guest_group'] ) + { + continue; + } + + $checked = ""; + + if ( $mail['mail_groups'] ) + { + if ( strstr( ','.$mail['mail_groups'].',', ','.$g['g_id'].',' ) ) + { + $checked = 'checked="checked"'; + } + } + + $this->ipsclass->html .= "  {$g['g_title']}
    "; + } + + $this->ipsclass->html .= "
    +
    +
    + Additional Filters + + + + + + + + + + + + + +
    Send to members with n posts
    Leave blank to not filter
    ". $this->ipsclass->adskin->form_dropdown('mail_post_ltmt', $dd_ltmt, $_POST['mail_post_ltml'] ? $_POST['mail_post_ltml'] : $mail['mail_post_ltmt'] ).' '. + $this->ipsclass->adskin->form_simple_input( "mail_filter_post", $_POST['mail_filter_post'] ? $_POST['mail_filter_post'] : $mail['mail_filter_post'], 7 )."
    Send to members who's last visit was n days ago
    Leave blank to not filter
    ". $this->ipsclass->adskin->form_dropdown('mail_visit_ltmt', $dd_ltmt, $_POST['mail_visit_ltml'] ? $_POST['mail_visit_ltml'] : $mail['mail_visit_ltmt'] ).' '. + $this->ipsclass->adskin->form_simple_input( "mail_filter_visit", $_POST['mail_filter_visit'] ? $_POST['mail_filter_visit'] : $mail['mail_filter_visit'], 7 )."
    Send to members who joined n days ago
    Leave blank to not filter
    ". $this->ipsclass->adskin->form_dropdown('mail_joined_ltmt', $dd_ltmt, $_POST['mail_joined_ltml'] ? $_POST['mail_joined_ltml'] : $mail['mail_joined_ltmt'] ).' '. + $this->ipsclass->adskin->form_simple_input( "mail_filter_joined", $_POST['mail_filter_joined'] ? $_POST['mail_filter_joined'] : $mail['mail_filter_joined'], 7 )."
    +
    +
    +
    +
       
    +
    "; + + $this->ipsclass->html .= "
    +
    +
    Quick Tags
    +
    You may use the following 'quick tags' in your email and they will be converted when the email is sent.
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {board_name}The name of your board{board_url}The URL to your board
    {reg_total}The total number of registered members{total_posts}The total number of posts
    {busy_count}The most number of users online{busy_time}The time that the most number of members were online
    {member_id}The member ID of the email recipient{member_name}The member name of the email recipient
    {member_joined}The member join date of the email recipient{member_posts}The number of posts for the email recipient
    +
    "; + + $this->ipsclass->admin->output(); + } + + //----------------------------------------- + // SHOW MAIN MAIL SCREENIE-POOS + //----------------------------------------- + + function mail_start() + { + $this->ipsclass->adskin->td_header[] = array( " " , "1%" ); + $this->ipsclass->adskin->td_header[] = array( "Subject" , "30%" ); + $this->ipsclass->adskin->td_header[] = array( "Sent On" , "15%" ); + $this->ipsclass->adskin->td_header[] = array( "Sent To" , "15%" ); + $this->ipsclass->adskin->td_header[] = array( "Time Taken" , "15%" ); + $this->ipsclass->adskin->td_header[] = array( " " , "1%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Your stored bulk email" ); + + //----------------------------------------- + // Get mail from DB + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'bulk_mail', 'order' => 'mail_start DESC' ) ); + $this->ipsclass->DB->simple_exec(); + + while( $r = $this->ipsclass->DB->fetch_row() ) + { + + $inprogress = ""; + + if ( $r['mail_updated'] == $r['mail_start'] ) + { + $time_taken = 'Not yet sent'; + } + else + { + $time_taken = intval($r['mail_updated'] - $r['mail_start']); + + if ( $time_taken < 0 ) + { + $time_taken = 0; + } + + if ( $time_taken ) + { + $time_taken = ceil( $time_taken / 60 ); + } + + $time_taken .= ' minutes'; + } + + if ( $r['mail_active'] ) + { + $inprogress = " ( Sending in progress - ipsclass->base_url}&{$this->ipsclass->form_code_js}&code=mail_send_cancel', 'OK to cancel bulk mail?'); return false;\">Cancel )"; + } + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( + "", + "{$r['mail_subject']} $inprogress", + $this->ipsclass->get_date( $r['mail_start'], 'SHORT' ), + $this->ipsclass->do_number_format( $r['mail_sentto'] ).' members', + $time_taken, + "
    Options
    " + ) ); + + $this->ipsclass->html .= << + menu_build_menu( + "mid-{$r['mail_id']}", + new Array( + img_item + " Re-send...", + img_edit + " Edit...", + img_delete + " ipsclass->base_url}&{$this->ipsclass->form_code}&code=mail_delete&id={$r['mail_id']}');return false;\">Delete..." + ) ); + +EOF; + } + + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + $this->ipsclass->admin->output(); + + } + + //----------------------------------------- + // INTERNAL: build members query + //----------------------------------------- + + function _build_members_query( $args = array() ) + { + $this->ipsclass->DB->load_cache_file( $this->root_path.'sources/sql/'.SQL_DRIVER.'_extra_queries.php', 'sql_extra_queries' ); + + $query = array(); + + if ( is_numeric($args['mail_filter_post']) ) + { + $ltmt = $args['mail_post_ltmt'] == 'lt' ? '<' : '>'; + $query[] = "posts ".$ltmt." ".intval($args['mail_filter_post']); + } + + if ( $args['mail_filter_visit'] ) + { + $ltmt = $args['mail_visit_ltmt'] == 'lt' ? '>' : '<'; + $time = time() - ( $args['mail_filter_visit'] * 86400 ); + $query[] = "last_visit ".$ltmt." ". $time; + } + + if ( $args['mail_filter_joined'] ) + { + $ltmt = $args['mail_joined_ltmt'] == 'lt' ? '>' : '<'; + $time = time() - ( $args['mail_filter_joined'] * 86400 ); + $query[] = "joined ".$ltmt." ". $time; + } + + if ( $args['mail_honor'] ) + { + $query[] = "allow_admin_mails=1"; + } + + if ( $args['mail_groups'] ) + { + $tmp_q = '(mgroup IN ('. $args['mail_groups'] .')'; + + $temp = explode( ',', $args['mail_groups'] ); + + if ( is_array( $temp ) and count( $temp ) ) + { + $tmp = array(); + + foreach( $temp as $id ) + { + $this->ipsclass->DB->cache_add_query( 'acp_postoffice_concat_bit', array( 'gid' => $id ), 'sql_extra_queries' ); + $tmp[] = $this->ipsclass->DB->cur_query; + $this->ipsclass->DB->cur_query = ""; + } + + $tmp_q .= " OR ( ".implode( ' OR ', $tmp ). " ) )"; + } + else + { + $tmp_q .= ")"; + } + + $query[] = $tmp_q; + } + + return implode( ' AND ', $query ); + } + + //----------------------------------------- + // INTERNAL: convert quick tags + //----------------------------------------- + + function _convert_quick_tags( $contents="", $member=array() ) + { + $contents = str_replace( "{board_name}" , str_replace( "'", "'", $this->ipsclass->vars['board_name'] ) , $contents ); + $contents = str_replace( "{board_url}" , $this->ipsclass->vars['board_url']."/index.".$this->ipsclass->vars['php_ext'] , $contents ); + $contents = str_replace( "{reg_total}" , $this->ipsclass->cache['stats']['mem_count'] , $contents ); + $contents = str_replace( "{total_posts}" , $this->ipsclass->cache['stats']['total_topics'] + $this->ipsclass->cache['stats']['total_replies'] , $contents ); + $contents = str_replace( "{busy_count}" , $this->ipsclass->cache['stats']['most_count'] , $contents ); + $contents = str_replace( "{busy_time}" , $this->ipsclass->get_date( $this->ipsclass->cache['stats']['most_date'], 'SHORT' ), $contents ); + $contents = str_replace( "{member_id}" , $member['id'], $contents ); + $contents = str_replace( "{member_name}" , $member['members_display_name'], $contents ); + $contents = str_replace( "{member_joined}", date( 'j-F y', $member['joined'] ), $contents ); + $contents = str_replace( "{member_posts}" , $member['posts'], $contents ); + + return $contents; + } + + //----------------------------------------- + // INTERNAL: get default mail + //----------------------------------------- + + function _get_default_mail_contents() + { + $mail = "{member_name},\n\n\n\n-------------------------------------\n{board_name} Statistics:\n" + ."-------------------------------------\nRegistered Users: {reg_total}\nTotal Posts: {total_posts}\n" + ."Busiest Time: {busy_count} users were online on {busy_time}\n\n" + ."-------------------------------------\nHandy Links\n" + ."-------------------------------------\nBoard Address: {board_url}\nLog In: {board_url}?act=Login&CODE=00\n" + ."Lost Password Recovery: {board_url}?act=Reg&CODE=10\n\n" + ."-------------------------------------\nHow to unsubscribe\n" + ."-------------------------------------\nVisit your email preferences ({board_url}?act=UserCP&CODE=02) and ensure " + ."that the box for 'Send me any updates sent by the board administrator' is unchecked and submit the form"; + + return $mail; + + } + + +} + + ?> \ No newline at end of file diff --git a/upload/sources/action_admin/prefs.php b/upload/sources/action_admin/prefs.php index f598a378..b7333f7b 100644 --- a/upload/sources/action_admin/prefs.php +++ b/upload/sources/action_admin/prefs.php @@ -1,205 +1,197 @@ - $Date: 2006-10-05 11:04:08 -0500 (Thu, 05 Oct 2006) $ -| > $Revision: 609 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > ACP Prefs functions -| > Module written by Matt Mecham -| > Date started: 22nd May 2003 -| -| > Module Version Number: 1.0.0 -+-------------------------------------------------------------------------- -*/ - - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - -class ad_prefs { - - var $base_url; - - function auto_run() - { - //----------------------------------------- - // Show the wee form - //----------------------------------------- - - if ( $this->ipsclass->input['set'] == 1 ) - { - $this->msg = 'Savings set'; - - if ( $this->ipsclass->input['tx'] == "" or $this->ipsclass->input['ty'] == "" ) - { - $this->msg = 'Пожалуйста, заполните форму'; - - print $this->get_html(); - } - else - { - $this->ipsclass->my_setcookie( 'acpprefs', $this->ipsclass->input['menu'] .','. $this->ipsclass->input['tx'] .','. $this->ipsclass->input['ty'] .','. $this->ipsclass->input['preview']); - - $this->msg = 'Настройки сохранены '; - - $this->tx = $this->ipsclass->input['tx']; - $this->ty = $this->ipsclass->input['ty']; - - if ( $this->ipsclass->input['menu'] ) - { - $this->s_yes = 'selected'; - $this->s_no = ''; - } - else - { - $this->s_yes = ''; - $this->s_no = 'selected'; - } - - if ( $this->ipsclass->input['preview'] ) - { - $this->p_yes = 'selected'; - $this->p_no = ''; - } - else - { - $this->p_yes = ''; - $this->p_no = 'selected'; - } - - print $this->get_html(); - } - - - } - else - { - $state = 0; - $tx = 80; - $ty = 40; - - if ( $cookie = $this->ipsclass->my_getcookie('acpprefs') ) - { - list( $state, $tx, $ty, $prev_show ) = explode( ",", $cookie ); - } - - $this->tx = $tx; - $this->ty = $ty; - - if ( $state ) - { - $this->s_yes = 'selected'; - $this->s_no = ''; - } - else - { - $this->s_yes = ''; - $this->s_no = 'selected'; - } - - if ( $prev_show ) - { - $this->p_yes = 'selected'; - $this->p_no = ''; - } - else - { - $this->p_yes = ''; - $this->p_no = 'selected'; - } - - print $this->get_html(); - - } - - } - - function get_html() - { - global $SKIN; - -$hit_muhl = << - - IPB-ваши предпочтения - - - - -
    - -
    - Ваши предпочтения в админцентре - Сохранить расположение меню админцентра       -

    - Размер шрифта в текстбоксах  X -

    - Показывать предпросмотрт макроса      -

    -
    -
    -
    - - -EOF; - - return $hit_muhl; - } - - - -} - - + $Date: 2006-10-05 12:04:08 -0400 (Thu, 05 Oct 2006) $ +| > $Revision: 609 $ +| > $Author: matt $ ++--------------------------------------------------------------------------- +| +| > ACP Prefs functions +| > Module written by Matt Mecham +| > Date started: 22nd May 2003 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class ad_prefs { + + var $base_url; + + function auto_run() + { + //----------------------------------------- + // Show the wee form + //----------------------------------------- + + if ( $this->ipsclass->input['set'] == 1 ) + { + $this->msg = 'Savings set'; + + if ( $this->ipsclass->input['tx'] == "" or $this->ipsclass->input['ty'] == "" ) + { + $this->msg = 'Please complete the form'; + + print $this->get_html(); + } + else + { + $this->ipsclass->my_setcookie( 'acpprefs', $this->ipsclass->input['menu'] .','. $this->ipsclass->input['tx'] .','. $this->ipsclass->input['ty'] .','. $this->ipsclass->input['preview']); + + $this->msg = 'Settings saved'; + + $this->tx = $this->ipsclass->input['tx']; + $this->ty = $this->ipsclass->input['ty']; + + if ( $this->ipsclass->input['menu'] ) + { + $this->s_yes = 'selected'; + $this->s_no = ''; + } + else + { + $this->s_yes = ''; + $this->s_no = 'selected'; + } + + if ( $this->ipsclass->input['preview'] ) + { + $this->p_yes = 'selected'; + $this->p_no = ''; + } + else + { + $this->p_yes = ''; + $this->p_no = 'selected'; + } + + print $this->get_html(); + } + + + } + else + { + $state = 0; + $tx = 80; + $ty = 40; + + if ( $cookie = $this->ipsclass->my_getcookie('acpprefs') ) + { + list( $state, $tx, $ty, $prev_show ) = explode( ",", $cookie ); + } + + $this->tx = $tx; + $this->ty = $ty; + + if ( $state ) + { + $this->s_yes = 'selected'; + $this->s_no = ''; + } + else + { + $this->s_yes = ''; + $this->s_no = 'selected'; + } + + if ( $prev_show ) + { + $this->p_yes = 'selected'; + $this->p_no = ''; + } + else + { + $this->p_yes = ''; + $this->p_no = 'selected'; + } + + print $this->get_html(); + + } + + } + + function get_html() + { + global $SKIN; + +$hit_muhl = << + + IPB-ACP Prefs + + + + +
    + +
    + Your ACP Prefs + Save ACP Menu State       +

    + Template's Textbox Size  X +

    + Show Macro Preview?      +

    +
    +
    +
    + + +EOF; + + return $hit_muhl; + } + + + +} + + ?> \ No newline at end of file diff --git a/upload/sources/action_admin/profilefields.php b/upload/sources/action_admin/profilefields.php index e0f28b05..6bca0211 100644 --- a/upload/sources/action_admin/profilefields.php +++ b/upload/sources/action_admin/profilefields.php @@ -1,582 +1,574 @@ - $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > Custom profile field functions -| > Module written by Matt Mecham -| > Date started: 24th June 2002 -| -| > Module Version Number: 1.0.0 -| > DBA Checked: Tue 25th May 2004 -+-------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - - -class ad_profilefields { - - var $base_url; - var $func; - - /** - * Section title name - * - * @var string - */ - var $perm_main = "content"; - - /** - * Section title name - * - * @var string - */ - var $perm_child = "field"; - - function auto_run() - { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Дополнительные поля' ); - - //----------------------------------------- - // get class - //----------------------------------------- - - require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); - $this->func = new custom_fields( $DB ); - - //----------------------------------------- - // switch-a-magoo - //----------------------------------------- - - switch($this->ipsclass->input['code']) - { - case 'add': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); - $this->main_form('add'); - break; - - case 'doadd': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); - $this->main_save('add'); - break; - - case 'edit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->main_form('edit'); - break; - - case 'doedit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->main_save('edit'); - break; - - case 'delete': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); - $this->delete_form(); - break; - - case 'dodelete': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); - $this->do_delete(); - break; - - default: - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->main_screen(); - break; - } - - } - - //----------------------------------------- - // - // Rebuild cache - // - //----------------------------------------- - - function rebuild_cache() - { - $this->ipsclass->cache['profilefields'] = array(); - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'pfields_data', 'order' => 'pf_position' ) ); - - $this->ipsclass->DB->simple_exec(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->cache['profilefields'][ $r['pf_id'] ] = $r; - } - - $this->ipsclass->update_cache( array( 'name' => 'profilefields', 'array' => 1, 'deletefirst' => 1 ) ); - } - - //----------------------------------------- - // - // Delete a group - // - //----------------------------------------- - - function delete_form() - { - if ($this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Вы должны ввести ID дополнительного поля"); - } - - $this->ipsclass->admin->page_title = "Удаление дополнительного поля"; - - $this->ipsclass->admin->page_detail = "Убедитесь, что вы действительно хотите удалить именно это дополнительное поле профиля, так как вся информация добавленная пользователями в это поле будет утеряна!"; - - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'pfields_data', 'where' => "pf_id=".intval($this->ipsclass->input['id']) ) ); - $this->ipsclass->DB->simple_exec(); - - if ( ! $field = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->admin->error("Невозможно найти дополнительное поле с таким ID"); - } - - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'dodelete' ), - 2 => array( 'act' , 'field' ), - 3 => array( 'id' , $this->ipsclass->input['id'] ), - 4 => array( 'section', $this->ipsclass->section_code ), - ) ); - - - - //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Подтверждение удаления" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Удаляемое дополнительное поле профиля:" , - "".$field['pf_title']."", - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Удалить это поле"); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - $this->ipsclass->admin->output(); - } - - - - function do_delete() - { - if ($this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Вы должны ввести ID дополнительного поля"); - } - - //----------------------------------------- - // Check to make sure that the relevant groups exist. - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'pfields_data', 'where' => "pf_id=".intval($this->ipsclass->input['id']) ) ); - $this->ipsclass->DB->simple_exec(); - - if ( ! $row = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->admin->error("Невозможно найти дополнительное поле с таким ID"); - } - - $this->ipsclass->DB->sql_drop_field( 'pfields_content', "field_{$row['pf_id']}" ); - - $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'pfields_data', 'where' => "pf_id=".intval($this->ipsclass->input['id']) ) ); - - $this->rebuild_cache(); - - $this->ipsclass->admin->done_screen("Удалено дополнительное поле профиля", "Дополнительные поля профиля", "{$this->ipsclass->form_code}", 'redirect' ); - - } - - - //----------------------------------------- - // - // Save changes to DB - // - //----------------------------------------- - - function main_save($type='edit') - { - $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); - - if ($this->ipsclass->input['pf_title'] == "") - { - $this->ipsclass->admin->error("Вы должны ввести название дополнительного поля профиля"); - } - - //----------------------------------------- - // check-da-motcha - //----------------------------------------- - - if ($type == 'edit') - { - if ($this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Вы должны ввести ID дополнительного поля"); - } - - } - - $content = ""; - - if ( $_POST['pf_content'] != "") - { - $content = $this->func->method_format_content_for_save( $_POST['pf_content'] ); - } - - $db_string = array( 'pf_title' => $this->ipsclass->input['pf_title'], - 'pf_desc' => $this->ipsclass->input['pf_desc'], - 'pf_content' => $this->ipsclass->txt_stripslashes($content), - 'pf_type' => $this->ipsclass->input['pf_type'], - 'pf_not_null' => intval($this->ipsclass->input['pf_not_null']), - 'pf_member_hide' => intval($this->ipsclass->input['pf_member_hide']), - 'pf_max_input' => intval($this->ipsclass->input['pf_max_input']), - 'pf_member_edit' => intval($this->ipsclass->input['pf_member_edit']), - 'pf_position' => intval($this->ipsclass->input['pf_position']), - 'pf_show_on_reg' => intval($this->ipsclass->input['pf_show_on_reg']), - 'pf_input_format' => $this->ipsclass->input['pf_input_format'], - 'pf_admin_only' => intval($this->ipsclass->input['pf_admin_only']), - 'pf_topic_format' => $this->ipsclass->txt_stripslashes( $_POST['pf_topic_format']), - ); - - - if ($type == 'edit') - { - $this->ipsclass->DB->do_update( 'pfields_data', $db_string, 'pf_id='.$this->ipsclass->input['id'] ); - - $this->rebuild_cache(); - - $this->ipsclass->main_msg = "Изменено дополнительное поле профиля"; - $this->main_screen(); - - } - else - { - $this->ipsclass->DB->do_insert( 'pfields_data', $db_string ); - - $new_id = $this->ipsclass->DB->get_insert_id(); - - $this->ipsclass->DB->sql_add_field( 'pfields_content', "field_$new_id", 'text' ); - - $this->ipsclass->DB->sql_optimize_table( 'pfields_content' ); - - $this->rebuild_cache(); - - $this->ipsclass->main_msg = "Дополнительное поле профиля изменено"; - $this->main_screen(); - } - } - - - //----------------------------------------- - // - // Add / edit group - // - //----------------------------------------- - - function main_form($type='edit') - { - $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); - $this->ipsclass->admin->nav[] = array( '', 'Добавление/изменение дополнительного поля' ); - - if ($type == 'edit') - { - if ( ! $this->ipsclass->input['id'] ) - { - $this->ipsclass->admin->error("Ни один ID группы не выбран, вернитесь и попробуйте снова."); - } - - $form_code = 'doedit'; - $button = 'Изменить это дополнительное поле'; - - } - else - { - $form_code = 'doadd'; - $button = 'Добавить это дополнительное поле'; - } - - //----------------------------------------- - // get field from db - //----------------------------------------- - - if ( $this->ipsclass->input['id'] ) - { - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'pfields_data', 'where' => "pf_id=".intval($this->ipsclass->input['id']) ) ); - $this->ipsclass->DB->simple_exec(); - - $fields = $this->ipsclass->DB->fetch_row(); - } - else - { - $fields = array( 'pf_topic_format' => '{title}: {content}
    ' ); - } - - //----------------------------------------- - // Top 'o 'the mornin' - //----------------------------------------- - - if ($type == 'edit') - { - $this->ipsclass->admin->page_title = "Изменение дополнительного поля ".$fields['pf_title']; - } - else - { - $this->ipsclass->admin->page_title = 'Добавление дополнительного поля'; - $fields = array( 'pf_title' => '', - 'pf_content' => '', - 'pf_desc' => '', - 'pf_type' => '', - 'pf_max_input' => '', - 'pf_position' => '', - 'pf_input_format' => '', - 'pf_topic_format' => '', - 'pf_show_on_reg' => '', - 'pf_not_null' => '', - 'pf_member_edit' => '', - 'pf_member_hide' => '', - 'pf_admin_only' => '' ); - } - - //----------------------------------------- - // Wise words - //----------------------------------------- - - $this->ipsclass->admin->page_detail = "Пожалуйста, дважды тщательно проверьте всю информацию прежде, чем подтвердить это дополнительное поле профиля"; - - //----------------------------------------- - // Start form - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , $form_code ), - 2 => array( 'act' , 'field' ), - 3 => array( 'id' , $this->ipsclass->input['id'] ), - 4 => array( 'section', $this->ipsclass->section_code ), - ) ); - - //----------------------------------------- - // Format... - //----------------------------------------- - - $fields['pf_content'] = $this->func->method_format_content_for_edit($fields['pf_content'] ); - - //----------------------------------------- - // Tbl (no ae?) - //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Настройка дополнительных полей профиля" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Название
    Максимальное количество символов: 200
    " , - $this->ipsclass->adskin->form_input("pf_title", $fields['pf_title'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Описание
    Максимальное количество символов: 250.
    Может быть использовано для примечаний.
    " , - $this->ipsclass->adskin->form_input("pf_desc", $fields['pf_desc'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Тип поля" , - $this->ipsclass->adskin->form_dropdown("pf_type", - array( - 0 => array( 'text' , 'Однострочное текстовое (input)' ), - 1 => array( 'drop' , 'Выпадающее меню (drowdown)' ), - 2 => array( 'area' , 'Многострочное текстовое (textarea)' ), - ), - $fields['pf_type'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Максимальная длина
    Для текстовых полей (только цифры)
    " , - $this->ipsclass->adskin->form_input("pf_max_input", $fields['pf_max_input'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Порядок сортировки
    При редактировании и отображении.
    Цифра 1 — самая низкая позиция.
    " , - $this->ipsclass->adskin->form_input("pf_position", $fields['pf_position'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Формат поля
    Использование: a — буквы
    n — цифры.
    Например, кредитная карта: nnnn-nnnn-nnnn-nnnn
    Например, дата рождения: nn-nn-nnnn
    Оставьте поле пустым для использования любых символов.
    " , - $this->ipsclass->adskin->form_input("pf_input_format", $fields['pf_input_format'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Содержимое опций для выпадающего меню
    Использование: ключ=значение (по одному значению на строку)
    Пример для поля Пол:
    m=мужской
    f=женский
    u=не скажу

    Результат:
    Одно из значений: m, f или u будет сохранено в базе данных.
    При отображении в профиле выводится Пол: не скажу (при выборе пользователем значения не скажу)
    " , - $this->ipsclass->adskin->form_textarea("pf_content", $fields['pf_content'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Добавить на страницу регистрации?
    При выборе «Да», это дополнительное поле будет предложено заполнить при регистрации.
    " , - $this->ipsclass->adskin->form_yes_no("pf_show_on_reg", $fields["pf_show_on_reg"] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Это поле обязательно к заполнению?
    При выборе «Да», будет выводиться сообщение об ошибке до тех пор, пока пользователь его не заполнит.
    " , - $this->ipsclass->adskin->form_yes_no("pf_not_null", $fields['pf_not_null'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Поле может быть изменено пользователем?
    При выборе «Нет», пользователь не сможет редактировать это поле, но смогут супермодераторы и администраторы.
    " , - $this->ipsclass->adskin->form_yes_no("pf_member_edit", $fields['pf_member_edit'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Сделать это поле личным?
    При выборе «Да», поле будет видимым только для самого пользователя, супермодераторов и администраторов.
    При выборе «Нет», остальные пользователи смогут искать по этому полю.
    " , - $this->ipsclass->adskin->form_yes_no("pf_member_hide", $fields['pf_member_hide'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Сделать видимым и изменяемым только супермодераторам и администраторам?
    При выборе «Да», эта опция отменит предыдущие, так что только супермодераторы и администраторы смогут видеть и изменять это поле.
    " , - $this->ipsclass->adskin->form_yes_no("pf_admin_only", $fields['pf_admin_only'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Отображение поля в сообщении:
    Оставьте поле пустым, если вы не хотите, чтобы это дополнительное поле добавлялось после информации об авторе при отображении сообщений.
    Доступные теги:
    {title} — название дополнительного поля
    {content} — содержимое дополнительного поля
    {key} — выбор пользователя из выпадающего меню
    Пример: {title}:{content}<br />
    Пример: {title}:<img src='imgs/{key}.gif'>
    " , - $this->ipsclass->adskin->form_textarea("pf_topic_format", $fields['pf_topic_format'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form($button); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - $this->ipsclass->admin->output(); - - - } - - //----------------------------------------- - // - // Show "Management Screen - // - //----------------------------------------- - - function main_screen() - { - $this->ipsclass->admin->page_title = "Дополнительные поля профиля"; - - $this->ipsclass->admin->page_detail = "Дополнительные поля профиля могут использоваться для получения дополнительной информации о ваших пользователях, они могут изменяться при регистрации или во время редактирования профиля.
    Эта опция очень полезна, если вы хотите собрать ту информацию о пользователях, которая вам необходима, но при этом не доступна в базовой версии форума."; - - $this->ipsclass->adskin->td_header[] = array( "Название" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Тип" , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Обязательное?" , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Личное?" , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Показывать при регистрации?" , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Только админ" , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Изменить" , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Удалить" , "10%" ); - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Список дополнительных полей профиля" ); - - $real_types = array( 'drop' => 'выпадающее меню', - 'area' => 'текстовый блок', - 'text' => 'текстовое поле', - ); - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'pfields_data', 'order' => 'pf_position' ) ); - $this->ipsclass->DB->simple_exec(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - - $hide = ' '; - $req = ' '; - $regi = ' '; - $admin = ' '; - - //----------------------------------------- - // Hidden? - //----------------------------------------- - - if ($r['pf_member_hide'] == 1) - { - $hide = '
    Да
    '; - } - - //----------------------------------------- - // Required? - //----------------------------------------- - - if ($r['pf_not_null'] == 1) - { - $req = '
    Да
    '; - } - - //----------------------------------------- - // Show on reg? - //----------------------------------------- - - if ($r['pf_show_on_reg'] == 1) - { - $regi = '
    Да
    '; - } - - //----------------------------------------- - // Admin only... - //----------------------------------------- - - if ($r['pf_admin_only'] == 1) - { - $admin = '
    Да
    '; - } - - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "{$r['pf_title']}
    {$r['pf_desc']}
    " , - "
    {$real_types[$r['pf_type']]}
    ", - $req, - $hide, - $regi, - $admin, - "
    Изменить
    ", - "
    Удалить
    ", - ) ); - - } - } - else - { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Не найдено", "center", "tablerow1"); - } - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("", 'center', 'tablefooter' ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - - $this->ipsclass->admin->output(); - - - } -} - - + $Date: 2007-01-11 17:33:24 -0500 (Thu, 11 Jan 2007) $ +| > $Revision: 826 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > Custom profile field functions +| > Module written by Matt Mecham +| > Date started: 24th June 2002 +| +| > Module Version Number: 1.0.0 +| > DBA Checked: Tue 25th May 2004 ++-------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class ad_profilefields { + + var $base_url; + var $func; + + /** + * Section title name + * + * @var string + */ + var $perm_main = "content"; + + /** + * Section title name + * + * @var string + */ + var $perm_child = "field"; + + function auto_run() + { + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Custom Profile Fields' ); + + //----------------------------------------- + // get class + //----------------------------------------- + + require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); + $this->func = new custom_fields( $DB ); + + //----------------------------------------- + // switch-a-magoo + //----------------------------------------- + + switch($this->ipsclass->input['code']) + { + case 'add': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); + $this->main_form('add'); + break; + + case 'doadd': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); + $this->main_save('add'); + break; + + case 'edit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->main_form('edit'); + break; + + case 'doedit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->main_save('edit'); + break; + + case 'delete': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); + $this->delete_form(); + break; + + case 'dodelete': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); + $this->do_delete(); + break; + + default: + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->main_screen(); + break; + } + + } + + //----------------------------------------- + // + // Rebuild cache + // + //----------------------------------------- + + function rebuild_cache() + { + $this->ipsclass->cache['profilefields'] = array(); + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'pfields_data', 'order' => 'pf_position' ) ); + + $this->ipsclass->DB->simple_exec(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->cache['profilefields'][ $r['pf_id'] ] = $r; + } + + $this->ipsclass->update_cache( array( 'name' => 'profilefields', 'array' => 1, 'deletefirst' => 1 ) ); + } + + //----------------------------------------- + // + // Delete a group + // + //----------------------------------------- + + function delete_form() + { + if ($this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("Could not resolve the group ID, please try again"); + } + + $this->ipsclass->admin->page_title = "Deleting a Custom Profile Field"; + + $this->ipsclass->admin->page_detail = "Please check to ensure that you are attempting to remove the correct custom profile field as all data will be lost!."; + + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'pfields_data', 'where' => "pf_id=".intval($this->ipsclass->input['id']) ) ); + $this->ipsclass->DB->simple_exec(); + + if ( ! $field = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->admin->error("Could not fetch the row from the database"); + } + + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'dodelete' ), + 2 => array( 'act' , 'field' ), + 3 => array( 'id' , $this->ipsclass->input['id'] ), + 4 => array( 'section', $this->ipsclass->section_code ), + ) ); + + + + //----------------------------------------- + + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Removal Confirmation" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Custom Profile field to remove" , + "".$field['pf_title']."", + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Delete this custom field"); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + $this->ipsclass->admin->output(); + } + + + + function do_delete() + { + if ($this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("Could not resolve the field ID, please try again"); + } + + //----------------------------------------- + // Check to make sure that the relevant groups exist. + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'pfields_data', 'where' => "pf_id=".intval($this->ipsclass->input['id']) ) ); + $this->ipsclass->DB->simple_exec(); + + if ( ! $row = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->admin->error("Could not resolve the ID's passed to deletion"); + } + + $this->ipsclass->DB->sql_drop_field( 'pfields_content', "field_{$row['pf_id']}" ); + + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'pfields_data', 'where' => "pf_id=".intval($this->ipsclass->input['id']) ) ); + + $this->rebuild_cache(); + + $this->ipsclass->admin->done_screen("Profile Field Removed", "Custom Profile Field Control", "{$this->ipsclass->form_code}", 'redirect' ); + + } + + + //----------------------------------------- + // + // Save changes to DB + // + //----------------------------------------- + + function main_save($type='edit') + { + $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); + + if ($this->ipsclass->input['pf_title'] == "") + { + $this->ipsclass->admin->error("You must enter a field title."); + } + + //----------------------------------------- + // check-da-motcha + //----------------------------------------- + + if ($type == 'edit') + { + if ($this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("Could not resolve the field id"); + } + + } + + $content = ""; + + if ( $_POST['pf_content'] != "") + { + $content = $this->func->method_format_content_for_save( $_POST['pf_content'] ); + } + + $db_string = array( 'pf_title' => $this->ipsclass->input['pf_title'], + 'pf_desc' => $this->ipsclass->input['pf_desc'], + 'pf_content' => $this->ipsclass->txt_stripslashes($content), + 'pf_type' => $this->ipsclass->input['pf_type'], + 'pf_not_null' => intval($this->ipsclass->input['pf_not_null']), + 'pf_member_hide' => intval($this->ipsclass->input['pf_member_hide']), + 'pf_max_input' => intval($this->ipsclass->input['pf_max_input']), + 'pf_member_edit' => intval($this->ipsclass->input['pf_member_edit']), + 'pf_position' => intval($this->ipsclass->input['pf_position']), + 'pf_show_on_reg' => intval($this->ipsclass->input['pf_show_on_reg']), + 'pf_input_format' => $this->ipsclass->input['pf_input_format'], + 'pf_admin_only' => intval($this->ipsclass->input['pf_admin_only']), + 'pf_topic_format' => $this->ipsclass->txt_stripslashes( $_POST['pf_topic_format']), + ); + + + if ($type == 'edit') + { + $this->ipsclass->DB->do_update( 'pfields_data', $db_string, 'pf_id='.$this->ipsclass->input['id'] ); + + $this->rebuild_cache(); + + $this->ipsclass->main_msg = "Profile Field Edited"; + $this->main_screen(); + + } + else + { + $this->ipsclass->DB->do_insert( 'pfields_data', $db_string ); + + $new_id = $this->ipsclass->DB->get_insert_id(); + + $this->ipsclass->DB->sql_add_field( 'pfields_content', "field_$new_id", 'text' ); + + $this->ipsclass->DB->sql_optimize_table( 'pfields_content' ); + + $this->rebuild_cache(); + + $this->ipsclass->main_msg = "Profile Field Added"; + $this->main_screen(); + } + } + + + //----------------------------------------- + // + // Add / edit group + // + //----------------------------------------- + + function main_form($type='edit') + { + $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); + $this->ipsclass->admin->nav[] = array( '', 'Add/Edit Custom Profile Field' ); + + if ($type == 'edit') + { + if ( ! $this->ipsclass->input['id'] ) + { + $this->ipsclass->admin->error("No group id to select from the database, please try again."); + } + + $form_code = 'doedit'; + $button = 'Complete Edit'; + + } + else + { + $form_code = 'doadd'; + $button = 'Add Field'; + } + + //----------------------------------------- + // get field from db + //----------------------------------------- + + if ( $this->ipsclass->input['id'] ) + { + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'pfields_data', 'where' => "pf_id=".intval($this->ipsclass->input['id']) ) ); + $this->ipsclass->DB->simple_exec(); + + $fields = $this->ipsclass->DB->fetch_row(); + } + else + { + $fields = array( 'pf_topic_format' => '{title}: {content}
    ' ); + } + + //----------------------------------------- + // Top 'o 'the mornin' + //----------------------------------------- + + if ($type == 'edit') + { + $this->ipsclass->admin->page_title = "Editing Profile Field ".$fields['pf_title']; + } + else + { + $this->ipsclass->admin->page_title = 'Adding a new profile field'; + $fields = array( 'pf_title' => '', + 'pf_content' => '', + 'pf_desc' => '', + 'pf_type' => '', + 'pf_max_input' => '', + 'pf_position' => '', + 'pf_input_format' => '', + 'pf_topic_format' => '', + 'pf_show_on_reg' => '', + 'pf_not_null' => '', + 'pf_member_edit' => '', + 'pf_member_hide' => '', + 'pf_admin_only' => '' ); + } + + //----------------------------------------- + // Wise words + //----------------------------------------- + + $this->ipsclass->admin->page_detail = "Please double check the information before submitting the form."; + + //----------------------------------------- + // Start form + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , $form_code ), + 2 => array( 'act' , 'field' ), + 3 => array( 'id' , $this->ipsclass->input['id'] ), + 4 => array( 'section', $this->ipsclass->section_code ), + ) ); + + //----------------------------------------- + // Format... + //----------------------------------------- + + $fields['pf_content'] = $this->func->method_format_content_for_edit($fields['pf_content'] ); + + //----------------------------------------- + // Tbl (no ae?) + //----------------------------------------- + + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Field Settings" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Field Title
    Max characters: 200
    " , + $this->ipsclass->adskin->form_input("pf_title", $fields['pf_title'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Description
    Max Characters: 250
    Can be used to note hidden/required status
    " , + $this->ipsclass->adskin->form_input("pf_desc", $fields['pf_desc'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Field Type" , + $this->ipsclass->adskin->form_dropdown("pf_type", + array( + 0 => array( 'text' , 'Text Input' ), + 1 => array( 'drop' , 'Drop Down Box' ), + 2 => array( 'area' , 'Text Area' ), + ), + $fields['pf_type'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Maximum Input
    For text input and text areas (in characters)
    " , + $this->ipsclass->adskin->form_input("pf_max_input", $fields['pf_max_input'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Display order
    When editing and displaying (numeric 1 lowest)
    " , + $this->ipsclass->adskin->form_input("pf_position", $fields['pf_position'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Expected Input Format
    Use: a for alpha characters
    Use: n for numerics.
    Example, for credit card numbers: nnnn-nnnn-nnnn-nnnn
    Example, Date of Birth: nn-nn-nnnn
    Leave blank to accept any input
    " , + $this->ipsclass->adskin->form_input("pf_input_format", $fields['pf_input_format'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Option Content (for drop downs)
    In sets, one set per line
    Example for 'Gender' field:
    m=Male
    f=Female
    u=Not Telling
    Will produce:

    m,f or u stored in database. When showing field in profile, will use value from pair (f=Female, shows 'Female')
    " , + $this->ipsclass->adskin->form_textarea("pf_content", $fields['pf_content'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Include on registration page?
    If 'yes', the field will be shown upon registration.
    " , + $this->ipsclass->adskin->form_yes_no("pf_show_on_reg", $fields["pf_show_on_reg"] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Field MUST be completed and not left empty?
    If 'yes', an error will be shown if this field is not completed.
    " , + $this->ipsclass->adskin->form_yes_no("pf_not_null", $fields['pf_not_null'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Field can be edited by the member?
    If 'no', the member cannot edit the field but Super Moderators and Admins will be able to.
    " , + $this->ipsclass->adskin->form_yes_no("pf_member_edit", $fields['pf_member_edit'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Make this a private profile field?
    If yes, field only visible to profile owner, super moderators and admins. If 'no', members can search within this field.
    " , + $this->ipsclass->adskin->form_yes_no("pf_member_hide", $fields['pf_member_hide'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Make Admin and Super Moderator Editable/Viewable Only?
    If yes, will override the above options so only admins and super moderators can see and edit this field.
    " , + $this->ipsclass->adskin->form_yes_no("pf_admin_only", $fields['pf_admin_only'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Topic View Format?
    Leave blank if you do not wish to add this field in the author details when viewing a topic.
    {title} is the title of the custom field, {content} is the user added content. {key} is the form select value of the selected item in a dropdown box.
    Example: {title}:{content}<br />
    Example: {title}:<img src='imgs/{key}'>
    " , + $this->ipsclass->adskin->form_textarea("pf_topic_format", $fields['pf_topic_format'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form($button); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + $this->ipsclass->admin->output(); + + + } + + //----------------------------------------- + // + // Show "Management Screen + // + //----------------------------------------- + + function main_screen() + { + $this->ipsclass->admin->page_title = "Custom Profile Fields"; + + $this->ipsclass->admin->page_detail = "Custom Profile fields can be used to add optional or required fields to be completed when registering or editing a profile. This is useful if you wish to record data from your members that is not already present in the base board."; + + $this->ipsclass->adskin->td_header[] = array( "Field Title" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Type" , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "REQUIRED" , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "NOT PUBLIC" , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "SHOW REG" , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "ADMIN ONLY" , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "Edit" , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "Delete" , "10%" ); + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Custom Profile Field Management" ); + + $real_types = array( 'drop' => 'Drop Down Box', + 'area' => 'Text Area', + 'text' => 'Text Input', + ); + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'pfields_data', 'order' => 'pf_position' ) ); + $this->ipsclass->DB->simple_exec(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + + $hide = ' '; + $req = ' '; + $regi = ' '; + $admin = ' '; + + //----------------------------------------- + // Hidden? + //----------------------------------------- + + if ($r['pf_member_hide'] == 1) + { + $hide = '
    Y
    '; + } + + //----------------------------------------- + // Required? + //----------------------------------------- + + if ($r['pf_not_null'] == 1) + { + $req = '
    Y
    '; + } + + //----------------------------------------- + // Show on reg? + //----------------------------------------- + + if ($r['pf_show_on_reg'] == 1) + { + $regi = '
    Y
    '; + } + + //----------------------------------------- + // Admin only... + //----------------------------------------- + + if ($r['pf_admin_only'] == 1) + { + $admin = '
    Y
    '; + } + + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "{$r['pf_title']}
    {$r['pf_desc']}
    " , + "
    {$real_types[$r['pf_type']]}
    ", + $req, + $hide, + $regi, + $admin, + "
    Edit
    ", + "
    Delete
    ", + ) ); + + } + } + else + { + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("None found", "center", "tablerow1"); + } + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("", 'center', 'tablefooter' ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + + $this->ipsclass->admin->output(); + + + } +} + + ?> \ No newline at end of file diff --git a/upload/sources/action_admin/quickhelp.php b/upload/sources/action_admin/quickhelp.php index fa420c7d..e47f3d17 100644 --- a/upload/sources/action_admin/quickhelp.php +++ b/upload/sources/action_admin/quickhelp.php @@ -1,173 +1,170 @@ - $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > Admin Quick Help System -| > Module written by Matt Mecham -| > Date started: 1st march 2002 -| -| > Module Version Number: 1.0.0 -| > DBA Checked: Tue 25th May 2004 -+-------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - - -class ad_quickhelp { - - var $help_text = array(); - - function init_help_array() - { - - return array( 'mg_dohtml' => array( 'title' => "Использование [doHTML] тегов", - 'body' => "При использовании [doHTML], все пользователи смогут использовать чистый HTML, в сообщениях. Вы можете включать или отключать эту функцию для каждого форума в секции управления форумами.
    -
    Предупреждение!
    - Разрешение пользователям использовать HTML, является небезопасной функцией, поэтому стоит допустить к использованию этой функции, только доверенные Вам группы пользователей, которые не будут использовать это в корыстных целях. Хоть IPB и фильтрует некоторые нежелательные элементы в сообщениях, - но всё равно, опытные пользователи смогут, воспользуясь этими тегами, воровать сеансы cookies, производить редиректы в сообщениях на другие сайты, портить формат отображения тем и т.д. -
    Invision Power Board и Invision Power Services не несут никакой ответственности за любые неполадки, произосшедшие из-за использования таких тегов. -

    Используйте это с умом! - ", - ), - - 'mod_mmod' => array( 'title' => "Модерация и мульти-модерация тем", - 'body' => "Имейте ввиду, что при допуске модераторов к мульти-модерации тем, они смогут полностью воспользоваться этой функцией. -
    Например, если одно из Ваших правил мульти-модерации, настроено на перемещение тем, но Вы запретили в настройках одного из модераторов перемещать темы, - данный модератор всё равно сможет перемещать темы при помощи функции мульти-модерации. - ", - ), - - 'set_spider' => array( 'title' => "Что такое поисковая машина?", - 'body' => "Поисковые машины, такие как Google, используют всякие программы, для поиска и добавления ссылок в свои базы данных.
    Invision Power может использовать ботов, для помощи пользователям, получать необходимую разыскиваемую информацию при использовании поиска. -
    -
    - Предупреждение! -
    - Invision Power Board распознаёт многие поисковые машины и записывает их данные user_agent. Но, в любом случае имейте ввиду, - что возможна и фальсификация, и некоторые пользователи смогут представить себя в виде безопасных поисковых машин. -
    Это не предоставит Вам никакие проблемы, т.к. бот будет иметь статус гостя, но в любом случае, будьте осторожны. -

    Также имейте ввиду, что многие поисковые машины, не индексируют - динамически сгенерированные страницы, во избежании перегрузки сервера, при постонном чтении тем. - ", - ), - - - - 'mg_upload' => array( 'title' => "Разрешения загрузки", - 'body' => "Если Вы хотите разрешить этой группе присоединять (загружать) файлы в сообщениях, Вы должны проверить следующие данные: -
      -
    • Введите разумное числовое значение в поле 'Максимальный размер загружаемых файлов. -
    • Проверьте разрешения форума для этой группы и отметьте поле 'Загрузка'. -
    - Вы можете выбрать, в каких форумах эта группа пользователей может загружать файлы. -

    Предупреждение!
    Если при отправке сообщений, сообщения не будут появляться и Вас будет возвращать на главную страницу форума, отключите возможность загрузки для этой группы, введя 0 в это поле. Этим самым Вы отключите возможность загрузки. - ", - ), - - - 'mg_promote' => array( 'title' => "Перемещение по группам", - 'body' => "При включении этой функции, (необходимо указать группу и кол-во сообщений), - пользователи этой группы, будут перемещены в какую-либо другую группу, при наборе определённого кол-ва сообщений. -

    - Многие администраторы используют эту функцию в целях выделения активных пользователей форума, для перемещения этих пользователей в более продвинутую группу пользователей, которым доступны определённые функции форума, недоступные пользователям младшей группы (например для разрешения пользователям этой группы загружать и скачивать файлы, загружать собственные аватары и т.д.), а в некоторых случаях - и для доступа этой группы к приватным форумам. Таким образом можно создать младшую группу пользователей и установить для них различные ограничения и при - наборе определённого количества сообщений, переводить этих пользователей в старшую группу, у которых нет никаких ограничений. -

    Предупреждение!
    Перед включением этой функиции, тщательно проверьте введённые Вами данные.
    По ошибке Вы можете случайно установить автоперемещение в администраторскую группу, что небезопасно. - ", - ), - 's_reg_antispam' => array ( 'title' => "Антиспам при регистрации", - 'body' => "Для предотвращения многочисленных регистраций программами-ботами (которые могут повлечь за собой несколько тысяч ненужных регистраций и несколько тысяч отправленных с Вашего сервера писем), - Вы должны включить эту функцию. -

    Если включить эту функцию, то будут генерироваться различные 6-значные числа и отображаться в виде рисунка (это послужит препятствием для программ-ботов, которые не смогут прочесть эти числа). Пользователи, при регистрации - должны буду ввести это число в точности, иначе их регистрация будет отклонена.", - ), - - 'm_bulkemail' => array ( 'title' => "Массовая Email рассылка", - 'body' => "Обзор
    С помощью массовой e-mail рассылки, Вы сможете уведомлять пользователей определённых групп или всех Ваших пользователей о различных мероприятиях и новостях форума. -

    Установки
    Вы можете отправить письмо определённой группе пользователей или только пользователям, подписанным на 'Уведомления от Администратора'. Не рекомендуется использовать это для - спама.
    - Доступные теги
    В тексте письма Вы можете использовать следующие теги: -
    {board_name} будет переконвертировано в название Вашего форума -
    {reg_total} отобразит кол-во зарегистрированных пользователей -
    {total_posts} отобразит общее кол-во сообщений форума -
    {busy_count} отобразит рекорд посещаемости форума с кол-вом посетителей -
    {busy_time} отобразит дату рекорда посещаемости форума -
    {board_url} отобразит ссылку на Ваш форум -

    Имя пользователя, пароль и другие данные профилей, использовать не рекомедуется.", - ), - 'comp_menu' => array ( 'title' => "Меню системы компонентов", - 'body' => "Текст меню Понятный текст меню. Пример: Утилиты и настройки.
    - URL меню «конечная» часть URL. Нет нужды вводить полный путь URL. Пример: code={code}
    - Переадресация? Если Да, то часть 'act={}§ion={}&code={}' пути в поле URL или переадресация могут не работать.
    - Название и текст переменной в системе ограничений доступа в админцент. Примеры: add, remove, edit, rebuild, recount, recache - все имеют - языковые переменные. Любые другие переменные для системы ограничений доступа требуют добавления их в поле «Название переменной». Пример: Если название - 'tools', в поле «Текст переменной» вы можете ввести - 'Разрешить доступ к утилитам?'.
    ", - ), - ); - - } - - function auto_run() - { - $id = $this->ipsclass->input['id']; - - $this->help_text = $this->init_help_array(); - - if ($this->help_text[$id]['title'] == "") - { - $this->ipsclass->admin->error("Для этой функции нет доступной информации помощи"); - } - - print " - - Быстрая помощь - - - - - - - - - -
    {$this->help_text[$id]['title']}
    {$this->help_text[$id]['body']}
    - - "; - - - exit(); - - } - - - -} - - + $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ +| > $Revision: 567 $ +| > $Author: matt $ ++--------------------------------------------------------------------------- +| +| > Admin Quick Help System +| > Module written by Matt Mecham +| > Date started: 1st march 2002 +| +| > Module Version Number: 1.0.0 +| > DBA Checked: Tue 25th May 2004 ++-------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class ad_quickhelp { + + var $help_text = array(); + + function init_help_array() + { + + return array( 'mg_dohtml' => array( 'title' => "Posting HTML", + 'body' => "This will allow all members of the group to post pure HTML in forums that have the ability to accept raw HTML. You can turn this on and off + for each forum via the edit forum settings function. Note: When HTML in posts in quoted by a member who does not have the permission to post HTML, the + post will be shown in unparsed HTML format with most of the formatting removed.
    +
    Warning!
    + Allowing a member to post HTML is a very dangerous thing, you should not enable this functionality on any group that will use it maliciously. Although IPB tries + to filter some of the more harmful content, it is NOT foolproof and this tag CAN be used to steal session cookies, redirect members and destroy the topic view layout. +
    Invision Power Board and Invision Power Services will not be held responsible for any misfortune that occurs from the usage of this tag. +

    Use it wisely! + ", + ), + + 'mod_mmod' => array( 'title' => "Moderations and Topic Multi-Moderation", + 'body' => "If you allow your moderators access to the forums' multi-moderation then you must be aware that they have full use. +
    For example, if one of your multi-moderation actions allowed the topic to be moved and you do not allow move permissions the + moderator will still be able to use the topic multi-moderation and move the topic. + ", + ), + + 'set_spider' => array( 'title' => "What are Search Engine Spiders?", + 'body' => "Search engines such as Google 'spider' the web by using special programs to find and add links to the search engine + database.
    Invision Power can take advantage of separating the bots from the real users and you can then + ensure that they are getting adequate information to help with search engine ranking. +
    +
    + Warning! +
    + Invision Power Board recognises the search engine spiders and crawlers by their user_agent. Please keep in mind + that it's not impossible to fake this and a malicious user could pose as a harmless search engine spider. +
    This is not a problem as by default the spider will have guest permissions, but it's something that + you should keep in mind when allowing permissions. +

    Also keep in mind that most search engines do NOT search dynamically generated website for fear + of crashing the server with the constant reading of topics. + ", + ), + + + + 'mg_upload' => array( 'title' => "Upload Permissions", + 'body' => "If you wish to allow this group to attach files (upload) when posting, you will have to ensure you have completed the following: +
      +
    • You have entered a reasonable numerical figure in the groups 'Max upload file size' field. +
    • You have edited the forum permissions for this group and checked the 'Upload' checkbox. +
    + This allows you to control in which forums this group can upload to. +

    Warning!
    If, when posting, no post is made and you are returned back to the board index, disable this groups upload by entering 0 into this field. This will turn off the mutli-part form the uploads use. + ", + ), + + + 'mg_promote' => array( 'title' => "Group Promotion", + 'body' => "If enabled (by choosing a member group to promote your members to and by entering a number of posts to achieve this) + when your members meet or exceed the number of posts set they will be 'promoted' to the specified group. +

    + Many administrators use this feature to set up a 'Senior Members' group with more functionality (such as a longer edit time, larger post uploads) and even + allow access to otherwise hidden forums - when your members have made enough posts, they are promoted to this group allowing you to intice more posting and + allow for a more restrictive set of permissions for newcomers. +

    Warning!
    Use this feature carefully and always check the information before proceeding.
    It is possible to advance to an Admin group - you have been warned. + ", + ), + 's_reg_antispam' => array ( 'title' => "Registration AntiSpam", + 'body' => "To prevent robots from registering (such as a malicious denial of service attack registering thousands of new accounts and forcing thousands of emails to be sent from your server) + you can enable this option. +

    When enabled, a random 6 digit numerical string is generated and shown in a graphical format (to prevent advanced bots from reading the source page). The user must enter + this string exactly when registering or the account will not be created.", + ), + + 'm_bulkemail' => array ( 'title' => "Bulk Emailing", + 'body' => "Overview
    Bulk emailing allows you to target a specific section of your community or email all your registered members. +

    Settings
    You can choose which user groups will receive the email and elect to override the user set 'Allow Admin Emails' function. It is NOT recommended that you do override this + however.
    + Allowed Tags
    Although the email system sends the mail via BCC to preserve system resources, you can add in dynamic content with the following tags. +
    {board_name} will return the name of your board +
    {reg_total} will return the total number of registered members +
    {total_posts} will return the total number of posts +
    {busy_count} will return the most number of online users +
    {busy_time} will return the date of the most online users +
    {board_url} will return the URL to the board +

    As the email is sent via BCC, it is not possible to include the members username, password or other user profile data.", + ), + 'comp_menu' => array ( 'title' => "Components menu system", + 'body' => "Menu text is the actual menu item text. IE: Tools and Settings.
    + Menu URL is the final part of the URL. No need to add the full URL or the 'section=components&act=blog' part unless this is a redirect. IE: code={code}
    + Menu Redirect if yes, complete the 'act={}§ion={}&code={}' part of the URL in the URL box or the redirect may not work.
    + Perm Bit and Perm Lang is the ACP restriction perm bit. Entries: add, remove, edit, rebuild, recount, recache all have + language entries. Any other bit names will require adding into the Perm Bit Language box. Eg: If the perm bit was 'tools', you may enter 'Allow TOOLS Access'.
    ", + ), + ); + + } + + function auto_run() + { + $id = $this->ipsclass->input['id']; + + $this->help_text = $this->init_help_array(); + + if ($this->help_text[$id]['title'] == "") + { + $this->ipsclass->admin->error("No help information is available for this function at present"); + } + + print " + + Quick Help + + + + + + + + + +
    {$this->help_text[$id]['title']}
    {$this->help_text[$id]['body']}
    + + "; + + + exit(); + + } + + + +} + + ?> \ No newline at end of file diff --git a/upload/sources/action_admin/rebuild.php b/upload/sources/action_admin/rebuild.php index 6d329bec..cc39af1e 100644 --- a/upload/sources/action_admin/rebuild.php +++ b/upload/sources/action_admin/rebuild.php @@ -2,25 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-12-13 16:16:03 -0500 (Wed, 13 Dec 2006) $ -| > $Revision: 791 $ +| > $Date: 2008-01-31 16:16:15 -0500 (Thu, 31 Jan 2008) $ +| > $Revision: 1182 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -35,21 +27,21 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } class ad_rebuild { var $base_url; - + /** * Section title name * * @var string */ var $perm_main = "tools"; - + /** * Section title name * @@ -58,7 +50,7 @@ class ad_rebuild { var $perm_child = "rebuild"; - function auto_run() + function auto_run() { switch($this->ipsclass->input['code']) { @@ -93,7 +85,7 @@ class ad_rebuild { case 'dophotos': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' ); $this->rebuild_photos(); - break; + break; case 'doattachdata': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' ); $this->rebuild_attachdata(); @@ -111,19 +103,19 @@ class ad_rebuild { $this->clean_photos(); break; //----------------------------------------- - // Tools + // Tools //----------------------------------------- - + case '220tool_photos': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' ); $this->tools_220_photos(); break; - + case '220tool_contacts': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' ); $this->tools_220_contacts(); break; - + case '220tool_templatebits': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' ); $this->tools_220_template_bits(); @@ -132,7 +124,7 @@ class ad_rebuild { $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' ); $this->tools_210_polls(); break; - + case '210calevents': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' ); $this->tools_210_calevents(); @@ -141,65 +133,65 @@ class ad_rebuild { $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' ); $this->tools_210_dupe_settings(); break; - + case 'tool_settings': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' ); $this->tools_dupe_settings(); break; - + case 'tool_converge': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' ); $this->tools_converge(); break; - + case 'tool_bansettings': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' ); $this->tool_bansettings(); break; - + case 'tools': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->tools_splash(); break; - + default: $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->rebuild_start(); break; } } - + /*-------------------------------------------------------------------------*/ // 220: Photos /*-------------------------------------------------------------------------*/ - + function tools_220_photos() { //----------------------------------------- // INIT //----------------------------------------- - + $start = intval($_GET['st']); $lend = 50; $end = $start + $lend; $done = 0; $updated = 0; - + //----------------------------------------- // Get lib //----------------------------------------- - + require_once( ROOT_PATH . 'sources/lib/func_usercp.php' ); $func_70s_style = new func_usercp; $func_70s_style->ipsclass =& $this->ipsclass; - + require_once( KERNEL_PATH.'class_image.php' ); - $image_lib = new class_image(); - + $image_lib = new class_image(); + //----------------------------------------- // OK.. //----------------------------------------- - + $this->ipsclass->DB->build_query( array( 'select' => 'me.*', 'from' => array( 'member_extra' => 'me' ), 'where' => "me.photo_type='upload'", @@ -217,43 +209,11 @@ class ad_rebuild { 'from' => array( 'groups' => 'g' ), 'where' => 'g.g_id=m.mgroup' ), - ) + ) ) ); - + $o = $this->ipsclass->DB->exec_query(); - - /*CREATE TABLE ibf_member_extra ( - id mediumint(8) NOT NULL default '0', - - photo_type varchar(10) default '', - photo_location varchar(255) default '', - photo_dimensions varchar(200) default '', - - PRIMARY KEY (id) - ); - - CREATE TABLE ibf_profile_portal ( - pp_member_id INT(10) NOT NULL default '0', - pp_profile_update INT(10) UNSIGNED NOT NULL default '0', - - pp_main_photo VARCHAR(255) NOT NULL default '', - pp_main_width INT(5) UNSIGNED NOT NULL default '0', - pp_main_height INT(5) UNSIGNED NOT NULL default '0', - pp_thumb_photo VARCHAR(255) NOT NULL default '', - pp_thumb_width INT(5) UNSIGNED NOT NULL default '0', - pp_thumb_height INT(5) UNSIGNED NOT NULL default '0', - - PRIMARY KEY ( pp_member_id ) - - //----------------------------------------- - // Mini photo - //----------------------------------------- - - $_data = $this->ipsclass->scale_image( array( 'max_height' => $t_height, - 'max_width' => $t_width, - 'cur_width' => $im['img_width'], - 'cur_height' => $im['img_height'] ) ); - );*/ + //----------------------------------------- // Do it... //----------------------------------------- @@ -263,56 +223,56 @@ class ad_rebuild { //----------------------------------------- // Got some to convert! //----------------------------------------- - + while( $row = $this->ipsclass->DB->fetch_row( $o ) ) { //----------------------------------------- // INIT //----------------------------------------- - + $member_id = intval( $row['id'] ); $photo = array(); - + //----------------------------------------- // Not got a photo? //----------------------------------------- - + if ( $member_id AND $row['photo_location'] ) { //----------------------------------------- // Get member //----------------------------------------- - + $member = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'profile_portal', 'where' => "pp_member_id=".$member_id ) ); - + if ( ! $member['pp_main_photo'] ) { //----------------------------------------- // Resize image... 150 / 150 / 75 / 75 //----------------------------------------- - + list( $p_max, $p_width, $p_height ) = explode( ":", $row['g_photo_max_vars'] ); - + $_dims = explode( ',', $row['photo_dimensions'] ); - + $_main = $this->ipsclass->scale_image( array( 'max_height' => 150, 'max_width' => 150, 'cur_width' => $_dims[0], 'cur_height' => $_dims[1] ) ); - + $_thumb = $this->ipsclass->scale_image( array( 'max_height' => 50, 'max_width' => 50, 'cur_width' => $_dims[0], 'cur_height' => $_dims[1] ) ); - + if ( ! $this->ipsclass->vars['disable_ipbsize'] ) { //----------------------------------------- // Main photo //----------------------------------------- - + $image_lib->in_type = 'file'; $image_lib->out_type = 'file'; $image_lib->in_file_dir = $this->ipsclass->vars['upload_dir']; @@ -320,21 +280,21 @@ class ad_rebuild { $image_lib->out_file_name = 'photo-'.$row['id']; $image_lib->desired_width = $p_width; $image_lib->desired_height = $p_height; - + $return = $image_lib->generate_thumbnail(); $im['img_width'] = $return['thumb_width']; $im['img_height'] = $return['thumb_height']; - + # Do we have an attachment? if ( isset( $return['thumb_location'] ) AND strstr( $return['thumb_location'], 'photos-' ) ) { //----------------------------------------- // Kill old and rename new... //----------------------------------------- - + $real_name = 'photo-'.$row['id'].'.'.$image_lib->file_extension; - + if( $real_name != $row['photo_location'] ) { @unlink( $this->ipsclass->vars['upload_dir'] . "/" . $row['photo_location'] ); @@ -343,11 +303,11 @@ class ad_rebuild { @rename( $this->ipsclass->vars['upload_dir'] . "/" . $return['thumb_location'], $this->ipsclass->vars['upload_dir'] . "/" . $real_name ); @chmod( $this->ipsclass->vars['upload_dir'] . "/" . $real_name, 0777 ); } - + //----------------------------------------- // MINI photo //----------------------------------------- - + $image_lib->in_type = 'file'; $image_lib->out_type = 'file'; $image_lib->in_file_dir = $this->ipsclass->vars['upload_dir']; @@ -355,21 +315,21 @@ class ad_rebuild { $image_lib->out_file_name = 'photo-thumb-'.$row['id']; $image_lib->desired_width = 50; $image_lib->desired_height = 50; - + $return = $image_lib->generate_thumbnail(); $t_im['img_width'] = $return['thumb_width']; $t_im['img_height'] = $return['thumb_height']; $t_im['img_location'] = $return['thumb_location']; } - + $photo = array( 'final_location' => $real_name ? $real_name : $row['photo_location'], 'final_width' => $im['img_width'] ? $im['img_width'] : $_main['img_width'], 'final_height' => $im['img_height'] ? $im['img_height'] : $_main['img_height'], 't_final_location' => $t_im['img_location'] ? $t_im['img_location'] : $row['photo_location'], 't_final_width' => $t_im['img_width'] ? $t_im['img_width'] : $_thumb['img_width'], 't_final_height' => $t_im['img_height'] ? $t_im['img_height'] : $_thumb['img_height'] ); - + //----------------------------------------- // Save... //----------------------------------------- @@ -397,7 +357,7 @@ class ad_rebuild { 'pp_member_id' => $member_id, ) ); } - + $updated++; } } @@ -407,20 +367,20 @@ class ad_rebuild { { $done = 1; } - + //----------------------------------------- // Done? //----------------------------------------- - + if ( ! $done ) { - $this->ipsclass->main_msg = "Фотографии пользователей: $start до $end завершено. $updated обновлений за проход..."; - + $this->ipsclass->main_msg = "Member photos: $start to $end completed. $updated updated during this batch..."; + $url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&st='.$end; } else { - $this->ipsclass->main_msg = "Фотографии пользователей обновлены."; + $this->ipsclass->main_msg = "Member photos updated"; $url = "{$this->ipsclass->form_code}&code=tools"; } @@ -431,45 +391,45 @@ class ad_rebuild { $this->ipsclass->admin->redirect( $url, $this->ipsclass->main_msg, 0, 1 ); } - - + + /*-------------------------------------------------------------------------*/ // REBUILD THUMBNAILS /*-------------------------------------------------------------------------*/ - + function rebuild_photos() { require_once( KERNEL_PATH.'class_image.php' ); - + //----------------------------------------- // Set up //----------------------------------------- - + $done = 0; $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; $end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100; $dis = $end + $start; $output = array(); - + //----------------------------------------- // Got any more? //----------------------------------------- - - $tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'pp_member_id', 'from' => 'profile_portal', + + $tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'pp_member_id', 'from' => 'profile_portal', 'where' => "pp_main_photo != ''", 'order' => 'pp_member_id ASC', 'limit' => array($dis,1) ) ); $max = intval( $tmp['pp_member_id'] ); - + //----------------------------------------- // Avoid limit... //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'profile_portal', 'order' => 'pp_member_id ASC', 'where' => "pp_main_photo != ''", 'limit' => array($start,$end) ) ); $outer = $this->ipsclass->DB->simple_exec(); - + //----------------------------------------- // Process... //----------------------------------------- - + while( $r = $this->ipsclass->DB->fetch_row( $outer ) ) { if ( $r['pp_thumb_photo'] and ( $r['pp_thumb_photo'] != $r['pp_main_photo'] ) ) @@ -478,17 +438,17 @@ class ad_rebuild { { if ( ! @unlink( $this->ipsclass->vars['upload_dir'].'/'.$r['pp_thumb_photo'] ) ) { - $output[] = "Невозможно переместить: ".$r['pp_thumb_photo']; + $output[] = "Could not remove: ".$r['pp_thumb_photo']; continue; } } } - + $photo_data = array(); $thumb_data = array(); - + $image = new class_image(); - + $image->in_type = 'file'; $image->out_type = 'file'; $image->in_file_dir = $this->ipsclass->vars['upload_dir']; @@ -496,36 +456,36 @@ class ad_rebuild { $image->desired_width = 50; $image->desired_height = 50; $image->gd_version = $this->ipsclass->vars['gd_version']; - + $thumb_data = $image->generate_thumbnail(); - + $photo_data['pp_thumb_width'] = $thumb_data['thumb_width']; $photo_data['pp_thumb_height'] = $thumb_data['thumb_height']; $photo_data['pp_thumb_photo'] = $thumb_data['thumb_location']; - + if ( count( $photo_data ) ) { $this->ipsclass->DB->do_update( 'profile_portal', $photo_data, 'pp_member_id='.$r['pp_member_id'] ); - - $output[] = "Изменение размера: ".$r['pp_main_photo']; + + $output[] = "Resized: ".$r['pp_main_photo']; } - + unset($image); - + $done++; } - + //----------------------------------------- // Finish - or more?... //----------------------------------------- - + if ( ! $done and ! $max ) { //----------------------------------------- // Done.. //----------------------------------------- - - $text = "Обновление завершено
    ".implode( "
    ", $output ); + + $text = "Rebuild completed
    ".implode( "
    ", $output ); $url = "{$this->ipsclass->form_code}"; $time = 2; } @@ -534,54 +494,54 @@ class ad_rebuild { //----------------------------------------- // More.. //----------------------------------------- - - $text = "Обновлено $dis, продолжаем...
    ".implode( "
    ", $output ); + + $text = "Up to $dis processed so far, continuing...
    ".implode( "
    ", $output ); $url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$dis; $time = 0; } - + //----------------------------------------- // Bye.... //----------------------------------------- - + $this->ipsclass->admin->redirect( $url, $text, 0, $time ); - } - + } + /*-------------------------------------------------------------------------*/ // 220: Contacts /*-------------------------------------------------------------------------*/ - + function tools_220_contacts() { //----------------------------------------- // INIT //----------------------------------------- - + $start = intval($_GET['st']); $lend = 50; $end = $start + $lend; $done = 0; $updated = 0; - + //----------------------------------------- // Get lib //----------------------------------------- - + require_once( ROOT_PATH . 'sources/action_public/profile.php' ); $profile = new profile(); $profile->ipsclass =& $this->ipsclass; - + //----------------------------------------- // OK.. //----------------------------------------- - + $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'contacts', 'where' => 'allow_msg=1', 'limit' => array( $start, $lend ) ) ); - + $o = $this->ipsclass->DB->exec_query(); - + //----------------------------------------- // Do it... //----------------------------------------- @@ -591,17 +551,17 @@ class ad_rebuild { //----------------------------------------- // Got some to convert! //----------------------------------------- - + while( $row = $this->ipsclass->DB->fetch_row( $o ) ) { //----------------------------------------- // Already a friend //----------------------------------------- - + $friend = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'profile_friends', 'where' => 'friends_member_id=' . intval( $row['member_id'] ) . ' AND friends_friend_id=' . intval( $row['contact_id'] ) ) ); - + if ( ! $friend['friends_id'] ) { //----------------------------------------- @@ -612,16 +572,16 @@ class ad_rebuild { 'friends_friend_id' => $row['contact_id'], 'friends_approved' => 1, 'friends_added' => time() ) ); - + //----------------------------------------- // Rebuild... //----------------------------------------- - + $profile->personal_function_recache_members_friends( array( 'id' => $row['member_id'] ) ); - + $updated++; } - + $this->ipsclass->DB->do_delete( "contacts", "id={$row['id']}" ); } } @@ -629,20 +589,20 @@ class ad_rebuild { { $done = 1; } - + //----------------------------------------- // Done? //----------------------------------------- - + if ( ! $done ) { - $this->ipsclass->main_msg = "Контакты: $start до $end завершено. $updated обновлений за проход..."; - + $this->ipsclass->main_msg = "Contacts: $start to $end completed. $updated updated during this batch..."; + $url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&st='.$end; } else { - $this->ipsclass->main_msg = "Контакты обновлены."; + $this->ipsclass->main_msg = "Contacts updated"; $url = "{$this->ipsclass->form_code}&code=tools"; } @@ -653,17 +613,17 @@ class ad_rebuild { $this->ipsclass->admin->redirect( $url, $this->ipsclass->main_msg, 0, 1 ); } - + /*-------------------------------------------------------------------------*/ // 220: Template Bits /*-------------------------------------------------------------------------*/ - + function tools_220_template_bits() { //----------------------------------------- // INIT //----------------------------------------- - + $updated = 0; $set_skin_set_id = intval( $this->ipsclass->input['set_skin_set_id'] ); $_bits = array(); @@ -671,26 +631,26 @@ class ad_rebuild { $lend = 25; $end = $start + $lend; $done = 0; - + //----------------------------------------- // Get API class //----------------------------------------- - + require_once( ROOT_PATH . 'sources/api/api_skins.php' ); $api = new api_skins; $api->ipsclass =& $this->ipsclass; - + //----------------------------------------- // OK.. //----------------------------------------- - + $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'skin_templates', 'where' => 'set_id='.$set_skin_set_id, 'limit' => array( $start, $lend ) ) ); - + $o = $this->ipsclass->DB->exec_query(); - + //----------------------------------------- // Do it... //----------------------------------------- @@ -700,13 +660,13 @@ class ad_rebuild { //----------------------------------------- // Got some to convert! //----------------------------------------- - + while( $row = $this->ipsclass->DB->fetch_row( $o ) ) { if ( preg_match( "#ipb\.|skin_update_template_bit( $row['section_content'] ); - + if ( $section_content AND $section_content != $row['section_content'] ) { $updated++; @@ -719,20 +679,20 @@ class ad_rebuild { { $done = 1; } - + //----------------------------------------- // Done? //----------------------------------------- - + if ( ! $done ) { - $this->ipsclass->main_msg = "Шаблоны: $start до $end завершено. $updated обновлено..."; - + $this->ipsclass->main_msg = "Template bits: $start to $end completed. $updated updated..."; + $url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&st='.$end.'&set_skin_set_id='.$set_skin_set_id; } else { - $this->ipsclass->main_msg = "Шаблоны успешно обновлены."; + $this->ipsclass->main_msg = "Template bits updated"; $url = "{$this->ipsclass->form_code}&code=tools"; } @@ -743,141 +703,141 @@ class ad_rebuild { $this->ipsclass->admin->redirect( $url, $this->ipsclass->main_msg, 0, 1 ); } - + /*-------------------------------------------------------------------------*/ // 210: TOOLS DUPLICATE SETTINGS /*-------------------------------------------------------------------------*/ - + function tools_210_dupe_settings() { //----------------------------------------- // Remove dupe categories //----------------------------------------- - + $title_id_to_keep = array(); $title_id_to_delete = array(); $title_deleted_count = 0; $msg = ''; - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'conf_settings_titles', 'order' => 'conf_title_id DESC' ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { if ( $title_id_to_keep[ $r['conf_title_title'] ] ) { $title_id_to_delete[ $r['conf_title_id'] ] = $r['conf_title_id']; - - $msg .= "Удалено: {$r['conf_title_title']} ID:{$r['conf_title_id']}
    "; + + $msg .= "Deleting: {$r['conf_title_title']} ID:{$r['conf_title_id']}
    "; } else { $title_id_to_keep[ $r['conf_title_title'] ] = $r['conf_title_id']; - $msg .= "Сохранено: {$r['conf_title_title']} ID:{$r['conf_title_id']}
    "; + $msg .= "KEEPING: {$r['conf_title_title']} ID:{$r['conf_title_id']}
    "; } } - + if ( count( $title_id_to_delete ) ) { $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'conf_settings_titles', 'where' => 'conf_title_id IN ('.implode( ',', $title_id_to_delete ).')' ) ); } - + $title_deleted_count = intval( count($title_id_to_delete) ); - + //----------------------------------------- // Time to move on dude //----------------------------------------- - - $this->ipsclass->main_msg = "Удалено $title_deleted_count дублирующихся групп настроек
    $msg"; + + $this->ipsclass->main_msg = "$title_deleted_count duplicate setting titles deleted
    $msg"; $this->tools_splash(); } - + /*-------------------------------------------------------------------------*/ // CALENDAR EVENTS /*-------------------------------------------------------------------------*/ - + function tools_210_calevents() { $start = intval($_GET['st']); $lend = 50; $end = $start + $lend; $max = intval($_GET['max']); - + //----------------------------------------- // Check to make sure table exists //----------------------------------------- - + if ( ! $this->ipsclass->DB->table_exists( 'calendar_events' ) ) { - $this->ipsclass->main_msg = "Вы не можете запустить этот инструмент, поскольку таблица «calendar_events» отсутствует."; + $this->ipsclass->main_msg = "You cannot run this tool as the old calendar_events table has been removed"; $this->tools_splash(); } - + //----------------------------------------- // Do we need to run this tool? //----------------------------------------- - + if ( ! $max ) { $original = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as max', 'from' => 'calendar_events' ) ); $new = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as max', 'from' => 'cal_events' ) ); - + if ( $new['max'] >= $original['max'] OR ! $original['max'] ) { - $this->ipsclass->main_msg = "Календарные события уже сконвертированы."; + $this->ipsclass->main_msg = "Calendar events already converted"; $this->tools_splash(); } } - + $max = intval( $original['max'] ); - + //----------------------------------------- // In steps... //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'calendar_events', 'limit' => array( $start, $lend ) ) ); $o = $this->ipsclass->DB->simple_exec(); - + //----------------------------------------- // Do it... //----------------------------------------- - + if ( $this->ipsclass->DB->get_num_rows($o) ) { //----------------------------------------- // Got some to convert! //----------------------------------------- - + while ( $r = $this->ipsclass->DB->fetch_row($o) ) { $recur_remap = array( 'w' => 1, 'm' => 2, 'y' => 3 ); - + $begin_date = $this->ipsclass->date_getgmdate( $r['unix_stamp'] ); $end_date = $this->ipsclass->date_getgmdate( $r['end_unix_stamp'] ); - + if ( ! $begin_date OR ! $end_date ) { continue; } - + $day = $begin_date['mday']; $month = $begin_date['mon']; $year = $begin_date['year']; - + $end_day = $end_date['mday']; $end_month = $end_date['mon']; $end_year = $end_date['year']; - + $_final_unix_from = gmmktime(0, 0, 0, $month, $day, $year ); - + //----------------------------------------- // Recur or ranged... //----------------------------------------- - + if ( $r['event_repeat'] OR $r['event_ranged'] ) { $_final_unix_to = gmmktime(23, 59, 59, $end_month, $end_day, $end_year); @@ -886,7 +846,7 @@ class ad_rebuild { { $_final_unix_to = 0; } - + $new_event = array( 'event_calendar_id' => 1, 'event_member_id' => $r['userid'], 'event_content' => $r['event_text'], @@ -900,38 +860,38 @@ class ad_rebuild { 'event_tz' => 0, 'event_unix_from' => $_final_unix_from, 'event_unix_to' => $_final_unix_to ); - + //----------------------------------------- // INSERT //----------------------------------------- - + $this->ipsclass->DB->do_insert( 'cal_events', $new_event ); } - - $this->ipsclass->main_msg = "Календарные события: $start до $end завершены...."; - + + $this->ipsclass->main_msg = "Calendar events: $start to $end completed...."; + $url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&max='.$max.'&st='.$end; } else { - $this->ipsclass->main_msg = "Календарные события уже сконвертированы."; - + $this->ipsclass->main_msg = "Calendar events converted"; + $url = "{$this->ipsclass->form_code}&code=tools"; } - + //----------------------------------------- // Bye.... //----------------------------------------- - + $this->ipsclass->admin->redirect( $url, $this->ipsclass->main_msg, 0, $time ); - - + + } - + /*-------------------------------------------------------------------------*/ // POLLS /*-------------------------------------------------------------------------*/ - + function tools_210_polls() { $start = intval($_GET['st']); @@ -940,51 +900,51 @@ class ad_rebuild { $max = intval($_GET['max']); $done = 0; $converted = intval( $_GET['conv'] ); - + //----------------------------------------- // First off.. grab number of polls to convert //----------------------------------------- - + if ( ! $max ) { $total = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as max', 'from' => 'topics', 'where' => "poll_state IN ('open', 'close', 'closed')" ) ); - + $max = $total['max']; } - + if ( $max < 1 ) { $done = 1; } - + //----------------------------------------- // In steps... //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'topics', 'where' => "poll_state IN ('open', 'close', 'closed' )", 'limit' => array( $start, $lend ) ) ); $o = $this->ipsclass->DB->simple_exec(); - + //----------------------------------------- // Do it... //----------------------------------------- - + if ( $this->ipsclass->DB->get_num_rows($o) ) { //----------------------------------------- // Got some to convert! //----------------------------------------- - + while ( $r = $this->ipsclass->DB->fetch_row($o) ) { $converted++; - + $new_poll = array( 1 => array() ); - + $poll_data = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'polls', 'where' => "tid=".$r['tid'] @@ -993,57 +953,57 @@ class ad_rebuild { { continue; } - + if ( ! $poll_data['poll_question'] ) { $poll_data['poll_question'] = $r['title']; } - + //----------------------------------------- // Kick start new poll //----------------------------------------- - + $new_poll[1]['question'] = $poll_data['poll_question']; - + //----------------------------------------- // Get OLD polls //----------------------------------------- - + $poll_answers = unserialize( stripslashes( $poll_data['choices'] ) ); - + reset($poll_answers); - + foreach ( $poll_answers as $entry ) { $id = $entry[0]; $choice = $entry[1]; $votes = $entry[2]; - + $total_votes += $votes; - + if ( strlen($choice) < 1 ) { continue; } - + $new_poll[ 1 ]['choice'][ $id ] = $choice; $new_poll[ 1 ]['votes'][ $id ] = $votes; } - + //----------------------------------------- // Got something? //----------------------------------------- - + if ( count( $new_poll[1]['choice'] ) ) { $this->ipsclass->DB->do_update( 'polls' , array( 'choices' => serialize( $new_poll ) ), 'tid='.$r['tid'] ); $this->ipsclass->DB->do_update( 'topics', array( 'poll_state' => 1 ), 'tid='.$r['tid'] ); } - + //----------------------------------------- // All done? //----------------------------------------- - + if ( $converted >= $max ) { $done = 1; @@ -1055,70 +1015,70 @@ class ad_rebuild { { $done = 1; } - - + + if ( ! $done ) { - $this->ipsclass->main_msg = "Опросы: $start до $end из $max завершено...."; - + $this->ipsclass->main_msg = "Polls: $start to $end of $max completed...."; + $url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&max='.$max.'&st='.$end.'&conv='.$converted; } else { - $this->ipsclass->main_msg = "Опросы успешно сконвертированы."; - + $this->ipsclass->main_msg = "Polls converted"; + $url = "{$this->ipsclass->form_code}&code=tools"; } - + //----------------------------------------- // Bye.... //----------------------------------------- - + $this->ipsclass->admin->redirect( $url, $this->ipsclass->main_msg, 0, 1 ); } - + /*-------------------------------------------------------------------------*/ // TOOLS BAN SETTINGS /*-------------------------------------------------------------------------*/ - + function tool_bansettings() { //----------------------------------------- // Init //----------------------------------------- - + $bomb = array(); $ban = array(); $ip_count = 0; $email_count = 0; $name_count = 0; - + //----------------------------------------- // Get current entries //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'banfilters', 'order' => 'ban_date desc' ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $ban[ $r['ban_type'] ][ $r['ban_content'] ] = $r; } - + //----------------------------------------- // Get $INFO (again) ip email name //----------------------------------------- - + require( ROOT_PATH."conf_global.php" ); - + //----------------------------------------- // IP //----------------------------------------- - + if ( $INFO['ban_ip'] ) { $bomb = explode( '|', $INFO['ban_ip'] ); - + if ( is_array( $bomb ) and count( $bomb ) ) { foreach( $bomb as $bang ) @@ -1126,21 +1086,21 @@ class ad_rebuild { if ( ! is_array($ban['ip'][ $bang ]) ) { $this->ipsclass->DB->do_insert( 'banfilters', array( 'ban_type' => 'ip', 'ban_content' => $bang, 'ban_date' => time() ) ); - + $ip_count++; } } } } - + //----------------------------------------- // EMAIL //----------------------------------------- - + if ( $INFO['ban_email'] ) { $bomb = explode( '|', $INFO['ban_email'] ); - + if ( is_array( $bomb ) and count( $bomb ) ) { foreach( $bomb as $bang ) @@ -1148,21 +1108,21 @@ class ad_rebuild { if ( ! is_array($ban['email'][ $bang ]) ) { $this->ipsclass->DB->do_insert( 'banfilters', array( 'ban_type' => 'email', 'ban_content' => $bang, 'ban_date' => time() ) ); - + $email_count++; } } } } - + //----------------------------------------- // EMAIL //----------------------------------------- - + if ( $INFO['ban_names'] ) { $bomb = explode( '|', $INFO['ban_names'] ); - + if ( is_array( $bomb ) and count( $bomb ) ) { foreach( $bomb as $bang ) @@ -1170,40 +1130,40 @@ class ad_rebuild { if ( ! is_array($ban['name'][ $bang ]) ) { $this->ipsclass->DB->do_insert( 'banfilters', array( 'ban_type' => 'name', 'ban_content' => $bang, 'ban_date' => time() ) ); - + $name_count++; } } } } - - $this->ipsclass->main_msg = "Импортировано: $ip_count IP-адресов, $email_count адресов email, $name_count запрещенных имен."; - + + $this->ipsclass->main_msg = "$ip_count IP addresses imported, $email_count email address imported, $name_count names imported."; + require_once( ROOT_PATH."sources/action_admin/banandbadword.php"); $thing = new ad_banandbadword(); $thing->ipsclass =& $this->ipsclass; - + $thing->ban_rebuildcache(); - + $this->tools_splash(); } - + /*-------------------------------------------------------------------------*/ // TOOLS (UN)CONVERGE /*-------------------------------------------------------------------------*/ - + function tools_converge() { //----------------------------------------- // Get all validating members... //----------------------------------------- - + $to_unconverge = array(); $unconverge_count = 0; - + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, email, mgroup', 'from' => 'members', 'where' => 'mgroup='.$this->ipsclass->vars['auth_group'] ) ); $this->ipsclass->DB->simple_exec(); - + while( $m = $this->ipsclass->DB->fetch_row() ) { if ( preg_match( "#^{$m['id']}\-#", $m['email'] ) ) @@ -1211,9 +1171,9 @@ class ad_rebuild { $to_unconverge[] = $m['id']; } } - + $unconverge_count = intval( count($to_unconverge) ); - + if ( $unconverge_count ) { foreach( $to_unconverge as $mid ) @@ -1222,33 +1182,33 @@ class ad_rebuild { $this->ipsclass->DB->do_update( 'member_extra', array( 'bio' => 'dupemail' ), 'id='.$mid ); } } - + //----------------------------------------- // Time to move on dude //----------------------------------------- - - $this->ipsclass->main_msg = "Всего найдено и восстановлено $unconverge_count пользователей."; + + $this->ipsclass->main_msg = "$unconverge_count members found and restored"; $this->tools_splash(); - + } - + /*-------------------------------------------------------------------------*/ // TOOLS DUPLICATE SETTINGS /*-------------------------------------------------------------------------*/ - + function tools_dupe_settings() { //----------------------------------------- // Remove dupe categories //----------------------------------------- - + $title_id_to_keep = array(); $title_id_to_delete = array(); $title_deleted_count = 0; - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'conf_settings_titles', 'order' => 'conf_title_id' ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { if ( $title_id_to_keep[ $r['conf_title_title'] ] ) @@ -1260,25 +1220,25 @@ class ad_rebuild { $title_id_to_keep[ $r['conf_title_title'] ] = $r['conf_title_id']; } } - + if ( count( $title_id_to_delete ) ) { $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'conf_settings_titles', 'where' => 'conf_title_id IN ('.implode( ',', $title_id_to_delete ).')' ) ); } - + $title_deleted_count = intval( count($title_id_to_delete) ); - + //----------------------------------------- // Remove dupe settings //----------------------------------------- - + $setting_id_to_keep = array(); $setting_id_to_delete = array(); $setting_id_deleted_count = 0; - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'conf_settings', 'order' => 'conf_id' ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { if ( $setting_id_to_keep[ $r['conf_title'].','.$r['conf_key'] ] ) @@ -1290,337 +1250,341 @@ class ad_rebuild { $setting_id_to_keep[ $r['conf_title'].','.$r['conf_key'] ] = $r['conf_id']; } } - + if ( count( $setting_id_to_delete ) ) { $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'conf_settings', 'where' => 'conf_id IN ('.implode( ',', $setting_id_to_delete ).')' ) ); } - + $setting_deleted_count = intval( count($setting_id_to_delete) ); - + //----------------------------------------- // Time to move on dude //----------------------------------------- - - $this->ipsclass->main_msg = "Удалено: $title_deleted_count двойных названий, $setting_deleted_count двойных системных настроек."; + + $this->ipsclass->main_msg = "$title_deleted_count duplicate setting titles deleted and $setting_deleted_count duplicate settings deleted"; $this->tools_splash(); } - + /*-------------------------------------------------------------------------*/ // TOOLS SPLASH /*-------------------------------------------------------------------------*/ - + function tools_splash() { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=tools', 'Инструменты очистки' ); - + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=tools', 'Maintenance Tools' ); + //----------------------------------------- // Get skin list... //----------------------------------------- - + require_once( ROOT_PATH . 'sources/action_admin/skintools.php' ); $ad_skintools = new ad_skintools; $ad_skintools->ipsclass =& $this->ipsclass; - + $skin_list = $ad_skintools->_get_skinlist(); - //$skin_list = str_replace( '', '', $skin_list ); - + //$skin_list = str_replace( '', '', $skin_list ); + //----------------------------------------- // 2.2.0: START //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( 'Инструменты обновления: IPB 2.1.x -> 2.2.0', 'Инструменты для преобразования содержимого форума в формат версий IPB 2.2.x после обновления с IPB 2.1.x.' ) . "
    "; - + + $this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( 'IPB 2.1.x -> 2.2.0 Upgrade Tools', 'These tools will clean up and rebuild content from an upgrade from the IPB 2.1.x series' ) . "
    "; + //----------------------------------------- // 220: Personal Photos //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , '220tool_photos' ), 2 => array( 'act' , 'rebuild' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( "{none}" , "100%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Конвертирование фотографий IPB 2.1.x в формат IPB 2.2.x" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "В IPB 2.2.x введен расширенный пользовательский профиль с фотографией пользователя.
    Этот инструмент позволит привести существующие загруженные пользовательские фотографии к новому формату." + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Convert IPB 2.1.x 'Photos' to IPB 2.2.x 'Member Profile Photos'" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "IPB 2.2.0 introduced an extended profile system with a member photo.
    This tool will update any existing 'uploaded' photos to the new format." ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form( 'Запустить'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form( 'RUN TOOL'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // 220: Contacts //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , '220tool_contacts' ), 2 => array( 'act' , 'rebuild' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( "{none}" , "100%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Конвертирование «Контактов» из 2.1.х в «Друзей» 2.2.х" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "В IPB 2.2.x введена система «Друзей» полностью заменяющая «Список контактов» в версии 2.1.х. Данный инструмент позволяет преобразовать все существующие пользовательские контакты в друзей." + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Convert IPB 2.1.x 'Contacts' to IPB 2.2.x 'Friends'" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "IPB 2.2.0 introduced a 'Friends' feature which replaced the PM 'Contacts'.
    This tool converts any previous contacts into non-mutual Friends." ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form( 'Запустить'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form( 'RUN TOOL'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // 220: Template Bits //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , '220tool_templatebits' ), 2 => array( 'act' , 'rebuild' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( "{none}" , "100%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Конвертирование HTML-логики в шаблонах из формата 2.1.х в 2.2.x" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Формат логических конструкций в версии 2.2.х незначительно изменился. Этот инструмент позволяет обновить главный шаблон, хранящийся в базе. После окончания работы данного инструмента необходимо запустить инструмент обновления шаблонов стиля. -
    Запустить для стиля: $skin_list" + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Convert IPB 2.1.x Template HTML Logic to IPB 2.2.x Template HTML Logic" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "This tool should only be used to update IPB 2.1 skins to be compatible with IPB 2.2. Using this tool on skins for IPB 2.2 or 2.3 will break them.
    The format for HTML logic in IPB 2.2.0 changed slightly. This tool updates your master skin set held in the DB. You may wish to rebuild caches after using this tool. +
    Run against skin set: $skin_list" ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form( 'Запустить'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form( 'RUN TOOL'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // 2.1.0: START //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( 'Инструменты обновления: IPB 2.0.x -> 2.1.0', 'Инструменты для преобразования содержимого форума в формат версий IPB 2.1.x после обновления с IPB 2.0.x.' ) . "
    "; - + + $this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( 'IPB 2.0.x -> 2.1.0 Upgrade Tools', 'These tools will clean up and rebuild content from an upgrade from the IPB 2.0.x series' ) . "
    "; + //----------------------------------------- // 210: DUPE SETTINGS //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , '210tool_settings' ), 2 => array( 'act' , 'rebuild' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( "{none}" , "100%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Удаление дубликатов системных настроек" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "После обновления форума или его конвертирования из других форумных систем некоторые системные настройки могу дублироваться.
    Этот инструмент удалит дубликаты." + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Remove Duplicate System Setting Groups from IPB 2.1.x" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "After an upgrade from IPB 2.0.x or import from another board software, you may find that due to running an upgrade tool + twice or a time-out you'll end up with some duplicate tool groups in the System Settings." ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Запустить'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('RUN TOOL'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // 210: CALEVENTS //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , '210calevents' ), 2 => array( 'act' , 'rebuild' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( "{none}" , "100%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Конвертирование календарных событий" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Формат размещения календарных событий в базе данных изменился между версиями 2.1.x и 2.0.x. Этот инструмент обновит календарные события из 2.0.x в формат 2.1.x.
    Используйте этот инструмент только в тех случаях, когда вы проводили обновление форума вручную, или некоторые события пропали." + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Convert 2.0.x Calendar Events to 2.1.x Format" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "This tool converts IPB 2.0.x calendar events to the new format. Use this tool after a manual upgrade or when some calendar events didn't convert." ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Запустить'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('RUN TOOL'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // 210: POLLS //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , '210polls' ), 2 => array( 'act' , 'rebuild' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( "{none}" , "100%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Конвертирование опросов" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Функция опросов в IPB 2.1.x расширилась, в связи с чем изменился формат их хранения. Этот инструмент обновит опросы из 2.0.x в формат 2.1.x.
    Используйте этот инструмент только в тех случаях, когда вы проводили обновление форума вручную, или некоторые опросы пропали." + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Convert 2.0.x Polls to 2.1.x Format" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "This tool converts IPB 2.0.x polls to the new format. Use this tool after a manual upgrade or when some polls didn't convert." ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Запустить'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('RUN TOOL'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // 2.0.0: START //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( 'Инструменты обновления: IPB 1.x.x -> 2.0.0', 'Инструменты для преобразования содержимого форума в формат версий IPB 2.0.x после обновления с IPB 1.x.x.' ) . "
    "; - - + + $this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( 'IPB 1.x.x -> 2.0.0 Upgrade Tools', 'These tools will clean up and rebuild content from an upgrade from the IPB 1.x.x series' ) . "
    "; + + //----------------------------------------- // DUPE SETTINGS //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'tool_settings' ), 2 => array( 'act' , 'rebuild' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( "{none}" , "100%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Удаление дубликатов системных настроек" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "После обновления форума или его конвертирования из других форумных систем некоторые системные настройки могу дублироваться.
    Этот инструмент удалит дубликаты." + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Remove Duplicate System Settings from IPB 2.0.x" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "After an upgrade from a previous version or import from another board software, you may find that due to running an upgrade tool + twice or a time-out you'll end up with some duplicate tools in the System Settings. +
    This tool finds the duplicates which have a greater ID than the original." ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Запустить'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('RUN TOOL'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // STATISTICS (also vali mem) //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'tool_converge' ), 2 => array( 'act' , 'rebuild' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( "{none}" , "100%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Поиск и восстановление «соединившихся» пользователей" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "В старых версиях форума разрешалось разным пользователям иметь один e-mail адрес. В IPB 2.x это запрещено. Исходя из этого после обновления форума или его конвертирования из других форумных систем разные пользователи могут иметь одинаковые e-mail адреса, а их учетные записи были перемещены в группу «Неактивированные». -
    Этот инструмент найдет этих пользователей и переместит в обычную группу пользователей, а в случае обнаружения повторного e-mail адреса предложит изменить его." + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Find & Restore 'Converged' Members" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "After an upgrade from a previous version or import from another board software, you may find that because several of your members have used duplicate + email addresses, their account has been moved into the validating group. +
    This tool finds these members and restores them into the default member group and asks them to change their email address." ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Запустить'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('RUN TOOL'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // Import old bandana settings //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'tool_bansettings' ), 2 => array( 'act' , 'rebuild' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( "{none}" , "100%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Поиск и восстановление старых фильтров блокировки" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "После обновления форума с более ранних версий ваши фильтры блокировки могут отсутствовать. -
    Этот инструмент попытается импортировать старые записи. Они не заменят ваши новые записи." + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Find & Restore old IPB Ban Settings" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "After an upgrade from a previous version, you may find that your ban settings are no longer + stored.
    Running this tool attempts to import your old ban settings. Old entries will not overwrite new entries." ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Запустить'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('RUN TOOL'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // Print //----------------------------------------- - + $this->ipsclass->admin->output(); - + } - + /*-------------------------------------------------------------------------*/ // Clean out photos /*-------------------------------------------------------------------------*/ - + function clean_photos() { require_once( KERNEL_PATH.'class_upload.php' ); - + $upload = new class_upload(); - + //----------------------------------------- // Set up //----------------------------------------- - + $done = 0; $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; $end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100; $display = $end + $start; $output = array(); - + //----------------------------------------- // Pop open the directory and // peek inside... //----------------------------------------- - + $i = 0; - + $dh = opendir( $this->ipsclass->vars['upload_dir'] ); - + while ( false !== ( $file = readdir( $dh ) ) ) { if ( strstr( $file, 'photo-' ) ) { $fullfile = $this->ipsclass->vars['upload_dir'].'/'.$file; - + $i++; - + //----------------------------------------- // Already started? //----------------------------------------- - + if ( $start > $i ) { continue; } - + //----------------------------------------- // Done for this iteration? //----------------------------------------- - + if ( $i > $display ) { break; } - + //----------------------------------------- // Try and get attach row //----------------------------------------- - + $found = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'pp_member_id', 'from' => 'profile_portal', 'where' => "pp_main_photo='{$file}' OR pp_thumb_photo='{$file}'" ) ); - + if ( ! $found['pp_member_id'] ) { @unlink( $fullfile ); - $output[] = "Удалена фотография без связей: $file"; + $output[] = "Removed orphan: $file"; } else { - $output[] = "Фотография в порядке: $file"; + $output[] = "Attached File OK: $file"; } } } - + closedir( $dh ); - + //----------------------------------------- // Finish - or more?... //----------------------------------------- - + if ( $i < $display) { //----------------------------------------- // Done.. //----------------------------------------- - - $text = "Обновление завершено
    ".implode( "
    ", $output ); + + $text = "Rebuild completed
    ".implode( "
    ", $output ); $url = "{$this->ipsclass->form_code}"; $time = 2; } @@ -1629,105 +1593,105 @@ class ad_rebuild { //----------------------------------------- // More.. //----------------------------------------- - - $text = "Файлов проверено {$display}, продолжение...
    ".implode( "
    ", $output ); + + $text = "Up to {$display} processed so far, continuing...
    ".implode( "
    ", $output ); $url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$display; $time = 0; } - + //----------------------------------------- // Bye.... //----------------------------------------- - + $this->ipsclass->admin->redirect( $url, $text, 0, $time ); } - + /*-------------------------------------------------------------------------*/ // Clean out avatars /*-------------------------------------------------------------------------*/ - + function clean_avatars() { require_once( KERNEL_PATH.'class_upload.php' ); - + $upload = new class_upload(); - + //----------------------------------------- // Set up //----------------------------------------- - + $done = 0; $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; $end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100; $dis = $end + $start; $output = array(); - + //----------------------------------------- // Pop open the directory and // peek inside... //----------------------------------------- - + $i = 0; - + $dh = opendir( $this->ipsclass->vars['upload_dir'] ); - + while ( false !== ( $file = readdir( $dh ) ) ) { if ( strstr( $file, 'av-' ) ) { $fullfile = $this->ipsclass->vars['upload_dir'].'/'.$file; - + $i++; - + //----------------------------------------- // Already started? //----------------------------------------- - + if ( $start > $i ) { continue; } - + //----------------------------------------- // Done for this iteration? //----------------------------------------- - + if ( $i > $dis ) { break; } - + //----------------------------------------- // Try and get attach row //----------------------------------------- - + $found = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'id', 'from' => 'member_extra', 'where' => "avatar_location='$file' or avatar_location='upload:$file'" ) ); - + if ( ! $found['id'] ) { @unlink( $fullfile ); - $output[] = "Удалена аватара без связей: $file"; + $output[] = "Removed orphan: $file"; } else { - $output[] = "Аватара в порядке: $file"; + $output[] = "Attached File OK: $file"; } } } - + closedir( $dh ); - + //----------------------------------------- // Finish - or more?... //----------------------------------------- - + if ( $i < $dis) { //----------------------------------------- // Done.. //----------------------------------------- - - $text = "Обновление завершено
    ".implode( "
    ", $output ); + + $text = "Rebuild completed
    ".implode( "
    ", $output ); $url = "{$this->ipsclass->form_code}"; $time = 2; } @@ -1736,105 +1700,163 @@ class ad_rebuild { //----------------------------------------- // More.. //----------------------------------------- - - $text = "Файлов проверено: $dis, продолжение...
    ".implode( "
    ", $output ); + + $text = "Up to $dis processed so far, continuing...
    ".implode( "
    ", $output ); $url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$dis; $time = 0; } - + //----------------------------------------- // Bye.... //----------------------------------------- - + $this->ipsclass->admin->redirect( $url, $text, 0, $time ); } - + /*-------------------------------------------------------------------------*/ // Clean out attachments /*-------------------------------------------------------------------------*/ - + function clean_attachments() { require_once( KERNEL_PATH.'class_upload.php' ); - + $upload = new class_upload(); - + //----------------------------------------- // Set up //----------------------------------------- - + $done = 0; $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; $end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100; $dis = $end + $start; $output = array(); - + //----------------------------------------- // Pop open the directory and // peek inside... //----------------------------------------- - + $i = 0; - + $dh = opendir( $this->ipsclass->vars['upload_dir'] ); - + while ( false !== ( $file = readdir( $dh ) ) ) { - if ( strstr( $file, 'post-' ) ) + if ( $file == '.' OR $file == '..' ) + { + continue; + } + + $fullfile = $this->ipsclass->vars['upload_dir'].'/'.$file; + + if( is_dir( $fullfile ) ) + { + $ndh = opendir( $fullfile ); + + while( false !== ( $nfile = readdir( $ndh ) ) ) + { + if ( $nfile == '.' OR $nfile == '..' ) + { + continue; + } + + if ( strstr( $nfile, 'post-' ) ) + { + $i++; + + //----------------------------------------- + // Already started? + //----------------------------------------- + + if ( $start > $i ) + { + continue; + } + + //----------------------------------------- + // Done for this iteration? + //----------------------------------------- + + if ( $i > $dis ) + { + break; + } + + //----------------------------------------- + // Try and get attach row + //----------------------------------------- + + $found = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'attach_id', 'from' => 'attachments', 'where' => "attach_location='{$file}/{$nfile}' OR attach_thumb_location='{$file}/{$nfile}'" ) ); + + if ( ! $found['attach_id'] ) + { + @unlink( $fullfile . '/' . $nfile ); + $output[] = "Removed orphan: $nfile"; + } + else + { + $output[] = "Attached File OK: $nfile"; + } + } + } + + closedir( $ndh ); + } + else if ( strstr( $file, 'post-' ) ) { - $fullfile = $this->ipsclass->vars['upload_dir'].'/'.$file; - $i++; - + //----------------------------------------- // Already started? //----------------------------------------- - + if ( $start > $i ) { continue; } - + //----------------------------------------- // Done for this iteration? //----------------------------------------- - + if ( $i > $dis ) { break; } - + //----------------------------------------- // Try and get attach row //----------------------------------------- - + $found = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'attach_id', 'from' => 'attachments', 'where' => "attach_location='$file' OR attach_thumb_location='$file'" ) ); - + if ( ! $found['attach_id'] ) { @unlink( $fullfile ); - $output[] = "Удален файл без связей: $file"; + $output[] = "Removed orphan: $file"; } else { - $output[] = "Прикрепленный файл в порядке: $file"; + $output[] = "Attached File OK: $file"; } } } - + closedir( $dh ); - + //----------------------------------------- // Finish - or more?... //----------------------------------------- - + if ( $i < $dis) { //----------------------------------------- // Done.. //----------------------------------------- - - $text = "Обновление завершено
    ".implode( "
    ", $output ); + + $text = "Rebuild completed
    ".implode( "
    ", $output ); $url = "{$this->ipsclass->form_code}"; $time = 2; } @@ -1843,77 +1865,77 @@ class ad_rebuild { //----------------------------------------- // More.. //----------------------------------------- - - $text = "Файлов проверено: $dis, продолжение...
    ".implode( "
    ", $output ); + + $text = "Up to $dis processed so far, continuing...
    ".implode( "
    ", $output ); $url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$dis; $time = 0; } - + //----------------------------------------- // Bye.... //----------------------------------------- - + $this->ipsclass->admin->redirect( $url, $text, 0, $time ); } - + /*-------------------------------------------------------------------------*/ // REBUILD ATTACH DATA /*-------------------------------------------------------------------------*/ - + function rebuild_attachdata() { require_once( KERNEL_PATH.'class_upload.php' ); - + $upload = new class_upload(); - + //----------------------------------------- // Set up //----------------------------------------- - + $done = 0; $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; $end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100; $dis = $end + $start; $output = array(); - + //----------------------------------------- // Got any more? //----------------------------------------- - + $tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'attach_id', 'from' => 'attachments', 'limit' => array($dis,1) ) ); $max = intval( $tmp['attach_id'] ); - + //----------------------------------------- // Avoid limit... //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'attachments', 'order' => 'attach_id ASC', 'limit' => array($start,$end) ) ); $outer = $this->ipsclass->DB->simple_exec(); - + //----------------------------------------- // Process... //----------------------------------------- - + while( $r = $this->ipsclass->DB->fetch_row( $outer ) ) { //----------------------------------------- // Get ext //----------------------------------------- - + $update = array(); - + $update['attach_ext'] = $upload->_get_file_extension( $r['attach_file'] ); - + if ( $r['attach_location'] ) { if ( file_exists( $this->ipsclass->vars['upload_dir'].'/'.$r['attach_location'] ) ) { $update['attach_filesize'] = @filesize( $this->ipsclass->vars['upload_dir'].'/'.$r['attach_location'] ); - + if( $r['attach_is_image'] ) { $dims = @getimagesize( $this->ipsclass->vars['upload_dir'].'/'.$r['attach_location'] ); - + if( $dims[0] AND $dims[1] ) { $update['attach_img_width'] = $dims[0]; @@ -1922,26 +1944,26 @@ class ad_rebuild { } } } - + if ( count( $update ) ) { $this->ipsclass->DB->do_update( 'attachments', $update, 'attach_id='.$r['attach_id'] ); } - + $done++; } - + //----------------------------------------- // Finish - or more?... //----------------------------------------- - + if ( ! $done and ! $max ) { //----------------------------------------- // Done.. //----------------------------------------- - - $text = "Обновление завершено
    ".implode( "
    ", $output ); + + $text = "Rebuild completed
    ".implode( "
    ", $output ); $url = "{$this->ipsclass->form_code}"; $time = 2; } @@ -1950,55 +1972,55 @@ class ad_rebuild { //----------------------------------------- // More.. //----------------------------------------- - - $text = "Файлов проверено: $dis, продолжение...
    ".implode( "
    ", $output ); + + $text = "Up to $dis processed so far, continuing...
    ".implode( "
    ", $output ); $url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$dis; $time = 0; } - + //----------------------------------------- // Bye.... //----------------------------------------- - + $this->ipsclass->admin->redirect( $url, $text, 0, $time ); } - + /*-------------------------------------------------------------------------*/ // REBUILD THUMBNAILS /*-------------------------------------------------------------------------*/ - + function rebuild_thumbnails() { require_once( KERNEL_PATH.'class_image.php' ); - + //----------------------------------------- // Set up //----------------------------------------- - + $done = 0; $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; $end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100; $dis = $end + $start; $output = array(); - + //----------------------------------------- // Got any more? //----------------------------------------- - - $tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'attach_id', 'from' => 'attachments', 'limit' => array($dis,1) ) ); + + $tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'attach_id', 'from' => 'attachments', 'where' => "attach_rel_module IN('post','msg')", 'limit' => array($dis,1) ) ); $max = intval( $tmp['attach_id'] ); - + //----------------------------------------- // Avoid limit... //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'attachments', 'order' => 'attach_id ASC', 'limit' => array($start,$end) ) ); + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'attachments', 'where' => "attach_rel_module IN('post','msg')", 'order' => 'attach_id ASC', 'limit' => array($start,$end) ) ); $outer = $this->ipsclass->DB->simple_exec(); - + //----------------------------------------- // Process... //----------------------------------------- - + while( $r = $this->ipsclass->DB->fetch_row( $outer ) ) { if ( $r['attach_is_image'] ) @@ -2009,17 +2031,17 @@ class ad_rebuild { { if ( ! @unlink( $this->ipsclass->vars['upload_dir'].'/'.$r['attach_thumb_location'] ) ) { - $output[] = "Невозможно удалить: ".$r['attach_thumb_location']; + $output[] = "Could not remove: ".$r['attach_thumb_location']; continue; } } } - + $attach_data = array(); $thumb_data = array(); - + $image = new class_image(); - + $image->in_type = 'file'; $image->out_type = 'file'; $image->in_file_dir = $this->ipsclass->vars['upload_dir']; @@ -2027,37 +2049,37 @@ class ad_rebuild { $image->desired_width = $this->ipsclass->vars['siu_width']; $image->desired_height = $this->ipsclass->vars['siu_height']; $image->gd_version = $this->ipsclass->vars['gd_version']; - + $thumb_data = $image->generate_thumbnail(); - + $attach_data['attach_thumb_width'] = $thumb_data['thumb_width']; $attach_data['attach_thumb_height'] = $thumb_data['thumb_height']; $attach_data['attach_thumb_location'] = $thumb_data['thumb_location']; - + if ( count( $attach_data ) ) { $this->ipsclass->DB->do_update( 'attachments', $attach_data, 'attach_id='.$r['attach_id'] ); - - $output[] = "Размер изменен: ".$r['attach_location']; + + $output[] = "Resized: ".$r['attach_location']; } - + unset($image); } - + $done++; } - + //----------------------------------------- // Finish - or more?... //----------------------------------------- - + if ( ! $done and ! $max ) { //----------------------------------------- // Done.. //----------------------------------------- - - $text = "Обновление завершено
    ".implode( "
    ", $output ); + + $text = "Rebuild completed
    ".implode( "
    ", $output ); $url = "{$this->ipsclass->form_code}"; $time = 2; } @@ -2066,31 +2088,31 @@ class ad_rebuild { //----------------------------------------- // More.. //----------------------------------------- - - $text = "Файлов проверено: $dis, продолжение...
    ".implode( "
    ", $output ); + + $text = "Up to $dis processed so far, continuing...
    ".implode( "
    ", $output ); $url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$dis; $time = 0; } - + //----------------------------------------- // Bye.... //----------------------------------------- - + $this->ipsclass->admin->redirect( $url, $text, 0, $time ); } - + /*-------------------------------------------------------------------------*/ // REBUILD POST COUNTS /*-------------------------------------------------------------------------*/ - + function rebuild_post_counts() { //----------------------------------------- // Forums not to count? //----------------------------------------- - + $forums = array(); - + foreach( $this->ipsclass->cache['forum_cache'] as $data ) { if ( ! $data['inc_postcount'] ) @@ -2098,35 +2120,35 @@ class ad_rebuild { $forums[] = $data['id']; } } - + //----------------------------------------- // Set up //----------------------------------------- - + $done = 0; $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; $end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100; $dis = $end + $start; $output = array(); - + //----------------------------------------- // Got any more? //----------------------------------------- - + $tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'id', 'from' => 'members', 'limit' => array($dis,1) ) ); $max = intval( $tmp['id'] ); - + //----------------------------------------- // Avoid limit... //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name', 'from' => 'members', 'order' => 'id ASC', 'limit' => array($start,$end) ) ); $outer = $this->ipsclass->DB->simple_exec(); - + //----------------------------------------- // Process... //----------------------------------------- - + while( $r = $this->ipsclass->DB->fetch_row( $outer ) ) { if ( ! count( $forums ) ) @@ -2144,28 +2166,28 @@ class ad_rebuild { ) ) ) ); $this->ipsclass->DB->exec_query(); - + $count = $this->ipsclass->DB->fetch_row(); } - + $new_post_count = intval( $count['count'] ); - + $this->ipsclass->DB->do_update( 'members', array( 'posts' => $new_post_count ), 'id='.$r['id'] ); - + $done++; } - + //----------------------------------------- // Finish - or more?... //----------------------------------------- - + if ( ! $done and ! $max ) { //----------------------------------------- // Done.. //----------------------------------------- - - $text = "Обновление завершено
    ".implode( "
    ", $output ); + + $text = "Rebuild completed
    ".implode( "
    ", $output ); $url = "{$this->ipsclass->form_code}"; $time = 2; } @@ -2174,72 +2196,72 @@ class ad_rebuild { //----------------------------------------- // More.. //----------------------------------------- - - $text = "Файлов проверено: $dis, продолжение...
    ".implode( "
    ", $output ); + + $text = "Up to $dis processed so far, continuing...
    ".implode( "
    ", $output ); $url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$dis; $time = 0; } - + //----------------------------------------- // Bye.... //----------------------------------------- - + $this->ipsclass->admin->redirect( $url, $text, 0, $time ); } - + /*-------------------------------------------------------------------------*/ // REBUILD POSTS /*-------------------------------------------------------------------------*/ - + function rebuild_post_names() { //----------------------------------------- // Set up //----------------------------------------- - + $done = 0; $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; $end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100; $dis = $end + $start; $output = array(); - + //----------------------------------------- // Got any more? //----------------------------------------- - + $tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'id', 'from' => 'members', 'limit' => array($dis,1) ) ); $max = intval( $tmp['id'] ); - + //----------------------------------------- // Avoid limit... //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, members_display_name', 'from' => 'members', 'order' => 'id ASC', 'limit' => array($start,$end) ) ); $outer = $this->ipsclass->DB->simple_exec(); - + //----------------------------------------- // Process... //----------------------------------------- - + while( $r = $this->ipsclass->DB->fetch_row( $outer ) ) { $this->ipsclass->DB->do_update( 'contacts' , array( 'contact_name' => $r['members_display_name'] ), "contact_id=" .$r['id'] ); $this->ipsclass->DB->do_update( 'topics' , array( 'starter_name' => $r['members_display_name'] ), "starter_id=" .$r['id'] ); - + $done++; } - + //----------------------------------------- // Finish - or more?... //----------------------------------------- - + if ( ! $done and ! $max ) { //----------------------------------------- // Done.. //----------------------------------------- - - $text = "Обновление завершено
    ".implode( "
    ", $output ); + + $text = "Rebuild completed
    ".implode( "
    ", $output ); $url = "{$this->ipsclass->form_code}"; $time = 2; } @@ -2248,77 +2270,169 @@ class ad_rebuild { //----------------------------------------- // More.. //----------------------------------------- - - $text = "Файлов проверено: $dis, продолжение...
    ".implode( "
    ", $output ); + + $text = "Up to $dis processed so far, continuing...
    ".implode( "
    ", $output ); $url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$dis; $time = 0; } - + //----------------------------------------- // Bye.... //----------------------------------------- - + $this->ipsclass->admin->redirect( $url, $text, 0, $time ); } - + /*-------------------------------------------------------------------------*/ // REBUILD POSTS /*-------------------------------------------------------------------------*/ - + function rebuild_posts() { require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); $parser = new parse_bbcode(); $parser->ipsclass =& $this->ipsclass; $parser->allow_update_caches = 1; - + //----------------------------------------- // Set up //----------------------------------------- - + $done = 0; $last = 0; $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; $end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100; $dis = intval($this->ipsclass->input['dis']) >=0 ? intval($this->ipsclass->input['dis']) : 0; $output = array(); - + + $types = array( 'posts', 'pms', 'cal', 'announce', 'sigs' ); + + $type = in_array( $this->ipsclass->input['type'], $types ) ? $this->ipsclass->input['type'] : 'posts'; + //----------------------------------------- // Got any more? //----------------------------------------- + + switch( $type ) + { + case 'cal': + $tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'event_id', 'from' => 'cal_events', 'limit' => array($dis,1) ) ); + $max = intval( $tmp['event_id'] ); + break; - $tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'pid', 'from' => 'posts', 'limit' => array($dis,1) ) ); - $max = intval( $tmp['pid'] ); + case 'announce': + $tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'announce_id', 'from' => 'announcements', 'limit' => array($dis,1) ) ); + $max = intval( $tmp['announce_id'] ); + break; + case 'pms': + $tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'msg_id', 'from' => 'message_text', 'limit' => array($dis,1) ) ); + $max = intval( $tmp['msg_id'] ); + break; + + case 'sigs': + $tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'id', 'from' => 'member_extra', 'where' => "signature IS NOT NULL", 'limit' => array($dis,1) ) ); + $max = intval( $tmp['id'] ); + break; + + case 'posts': + default: + $tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'pid', 'from' => 'posts', 'limit' => array($dis,1) ) ); + $max = intval( $tmp['pid'] ); + break; + } + //print $dis . ' ' . $start . ' ' . $end . ' ' . $max;exit; $this->ipsclass->load_skin(); - + //----------------------------------------- // Avoid limit... //----------------------------------------- + + switch( $type ) + { + case 'cal': + $this->ipsclass->DB->build_query( array( 'select' => 'e.*', + 'from' => array( 'cal_events' => 'e' ), + 'order' => 'e.event_id ASC', + 'where' => 'e.event_id > ' . $start, + 'limit' => array($end), + 'add_join' => array( 1 => array( 'type' => 'left', + 'select' => 'm.mgroup', + 'from' => array( 'members' => 'm' ), + 'where' => "m.id=e.event_member_id" + ) ) + ) ); + break; - $this->ipsclass->DB->build_query( array( 'select' => 'p.*', - 'from' => array( 'posts' => 'p' ), - 'order' => 'p.pid ASC', - 'where' => 'p.pid > ' . $start, - 'limit' => array($end), - 'add_join' => array( 1 => array( 'type' => 'left', - 'select' => 't.forum_id', - 'from' => array( 'topics' => 't' ), - 'where' => "t.tid=p.topic_id" - ), - 2 => array( 'type' => 'left', - 'select' => 'm.mgroup', - 'from' => array( 'members' => 'm' ), - 'where' => "m.id=p.author_id" - ) ) - ) ); + case 'announce': + $this->ipsclass->DB->build_query( array( 'select' => 'a.*', + 'from' => array( 'announcements' => 'a' ), + 'order' => 'a.announce_id ASC', + 'where' => 'a.announce_id > ' . $start, + 'limit' => array($end), + 'add_join' => array( 1 => array( 'type' => 'left', + 'select' => 'm.mgroup', + 'from' => array( 'members' => 'm' ), + 'where' => "m.id=a.announce_member_id" + ) ) + ) ); + break; + + case 'pms': + $this->ipsclass->DB->build_query( array( 'select' => 'p.*', + 'from' => array( 'message_text' => 'p' ), + 'order' => 'p.msg_id ASC', + 'where' => 'p.msg_id > ' . $start, + 'limit' => array($end), + 'add_join' => array( 1 => array( 'type' => 'left', + 'select' => 'm.mgroup', + 'from' => array( 'members' => 'm' ), + 'where' => "m.id=p.msg_author_id" + ) ) + ) ); + break; + + case 'sigs': + $this->ipsclass->DB->build_query( array( 'select' => 'me.signature, me.id', + 'from' => array( 'member_extra' => 'me' ), + 'order' => 'me.id ASC', + 'where' => "me.signature != '' AND me.id > " . $start, + 'limit' => array($end), + 'add_join' => array( 1 => array( 'type' => 'left', + 'select' => 'm.mgroup', + 'from' => array( 'members' => 'm' ), + 'where' => "m.id=me.id" + ) ) + ) ); + break; + + case 'posts': + default: + $this->ipsclass->DB->build_query( array( 'select' => 'p.*', + 'from' => array( 'posts' => 'p' ), + 'order' => 'p.pid ASC', + 'where' => 'p.pid > ' . $start, + 'limit' => array($end), + 'add_join' => array( 1 => array( 'type' => 'left', + 'select' => 't.forum_id', + 'from' => array( 'topics' => 't' ), + 'where' => "t.tid=p.topic_id" + ), + 2 => array( 'type' => 'left', + 'select' => 'm.mgroup', + 'from' => array( 'members' => 'm' ), + 'where' => "m.id=p.author_id" + ) ) + ) ); + break; + } $outer = $this->ipsclass->DB->exec_query(); - + //----------------------------------------- // Process... //----------------------------------------- - + while( $r = $this->ipsclass->DB->fetch_row( $outer ) ) { $parser->quote_open = 0; @@ -2326,40 +2440,84 @@ class ad_rebuild { $parser->quote_error = 0; $parser->error = ''; $parser->image_count = 0; - - $parser->parse_smilies = $r['use_emo']; - $parser->parse_html = 0; - $parser->parse_bbcode = $this->ipsclass->cache['forum_cache'][ $r['forum_id'] ]['use_ibc']; - + $this->ipsclass->member['g_bypass_badwords'] = $this->ipsclass->cache['group_cache'][ $r['mgroup'] ]['g_bypass_badwords']; - - $rawpost = $parser->pre_edit_parse( $r['post'] ); - + + switch( $type ) + { + case 'cal': + $parser->parse_smilies = $r['event_smilies']; + $parser->parse_html = 0; + $parser->parse_bbcode = 1; + + $rawpost = $parser->pre_edit_parse( $r['event_content'] ); + break; + + case 'announce': + $parser->parse_smilies = 1; + $parser->parse_html = $r['announce_html_enabled']; + $parser->parse_nl2br = $r['announce_nlbr_enabled']; + $parser->parse_bbcode = 1; + + $rawpost = $parser->pre_edit_parse( $r['announce_post'] ); + break; + + case 'pms': + $parser->parse_smilies = 1; + $parser->parse_nl2br = 1; + $parser->parse_html = $this->ipsclass->vars['msg_allow_html']; + $parser->parse_bbcode = $this->ipsclass->vars['msg_allow_code']; + + $rawpost = $parser->pre_edit_parse( $r['msg_post'] ); + break; + + case 'sigs': + $parser->parse_smilies = 0; + $parser->parsing_signature = 1; + $parser->parse_html = $this->ipsclass->vars['sig_allow_html']; + $parser->parse_bbcode = $this->ipsclass->vars['sig_allow_ibc']; + + $rawpost = $parser->pre_edit_parse( $r['signature'] ); + break; + + case 'posts': + default: + $parser->parse_smilies = $r['use_emo']; + $parser->parse_html = ( $this->ipsclass->cache['forum_cache'][ $r['forum_id'] ]['use_html'] AND + $this->ipsclass->cache['group_cache'][ $r['mgroup'] ]['g_dohtml'] AND + $r['post_htmlstate'] > 0 ) ? 1 : 0; + $parser->parse_nl2br = ( $r['post_htmlstate'] != 1 ) ? 1 : 0; + $parser->parse_bbcode = $this->ipsclass->cache['forum_cache'][ $r['forum_id'] ]['use_ibc']; + + $rawpost = $parser->pre_edit_parse( $r['post'] ); + break; + } + $newpost = $parser->pre_db_parse( $rawpost ); - + //----------------------------------------- // Remove old \' escaping //----------------------------------------- - + $newpost = str_replace( "\\'", "'", $newpost ); - + //----------------------------------------- // Convert old dohtml? //----------------------------------------- - + $htmlstate = 0; - + if ( strstr( strtolower($newpost), '[dohtml]' ) ) { //----------------------------------------- // Can we use HTML? //----------------------------------------- - - if ( $this->ipsclass->cache['forum_cache'][ $r['forum_id'] ]['use_html'] ) + + if ( $type == 'posts' AND $this->ipsclass->cache['forum_cache'][ $r['forum_id'] ]['use_html'] ) { $htmlstate = 2; } - + $newpost = preg_replace( "#\[dohtml\]#i" , "", $newpost ); $newpost = preg_replace( "#\[/dohtml\]#i", "", $newpost ); } @@ -2367,34 +2525,60 @@ class ad_rebuild { { $htmlstate = intval( $r['post_htmlstate'] ); } - + //----------------------------------------- // Convert old attachment tags //----------------------------------------- - + $newpost = preg_replace( "#\[attachmentid=(\d+?)\]#is", "[attachment=\\1:attachment]", $newpost ); - - if ( $newpost ) + + $newpost = $parser->pre_display_parse( $newpost ); + + if ( $newpost OR $type == 'sigs' ) { - $this->ipsclass->DB->do_update( 'posts', array( 'post' => $newpost, 'post_htmlstate' => $htmlstate ), 'pid='.$r['pid'] ); + switch( $type ) + { + case 'posts': + $this->ipsclass->DB->do_update( 'posts', array( 'post' => $newpost, 'post_htmlstate' => $htmlstate ), 'pid='.$r['pid'] ); + $last = $r['pid']; + break; + + case 'pms': + $this->ipsclass->DB->do_update( 'message_text', array( 'msg_post' => $newpost ), 'msg_id='.$r['msg_id'] ); + $last = $r['msg_id']; + break; + + case 'sigs': + $this->ipsclass->DB->do_update( 'member_extra', array( 'signature' => $newpost ), 'id='.$r['id'] ); + $last = $r['id']; + break; + + case 'cal': + $this->ipsclass->DB->do_update( 'cal_events', array( 'event_content' => $newpost ), 'event_id='.$r['event_id'] ); + $last = $r['event_id']; + break; + + case 'announce': + $this->ipsclass->DB->do_update( 'announcements', array( 'announce_post' => $newpost ), 'announce_id='.$r['announce_id'] ); + $last = $r['announce_id']; + break; + } } - + $done++; - - $last = $r['pid']; } //----------------------------------------- // Finish - or more?... //----------------------------------------- - + if ( ! $done and ! $max ) { //----------------------------------------- // Done.. //----------------------------------------- - - $text = "Обновление завершено
    ".implode( "
    ", $output ); + + $text = "Rebuild completed
    ".implode( "
    ", $output ); $url = "{$this->ipsclass->form_code}"; $time = 2; } @@ -2403,82 +2587,84 @@ class ad_rebuild { //----------------------------------------- // More.. //----------------------------------------- - + $dis = $dis + $done; - - $text = "Обновлено {$dis}, продолжаем...
    ".implode( "
    ", $output ); - $url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$last.'&dis='.$dis; + + $text = "Up to {$dis} processed so far, continuing...
    ".implode( "
    ", $output ); + $url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&type='.$type.'&pergo='.$this->ipsclass->input['pergo'].'&st='.$last.'&dis='.$dis; $time = 0; } - + //----------------------------------------- // Bye.... //----------------------------------------- - + $this->ipsclass->admin->redirect( $url, $text, 0, $time ); } - + /*-------------------------------------------------------------------------*/ // RESYNCHRONIZE TOPICS /*-------------------------------------------------------------------------*/ - + function resync_topics() { require_once( ROOT_PATH.'sources/lib/func_mod.php' ); $modfunc = new func_mod(); $modfunc->ipsclass =& $this->ipsclass; - + + $this->ipsclass->load_language( 'lang_global' ); + //----------------------------------------- // Set up //----------------------------------------- - + $done = 0; $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; $end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100; $dis = $end + $start; $output = array(); - + //----------------------------------------- // Got any more? //----------------------------------------- - + $tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as count', 'from' => 'topics', 'limit' => array($dis,1) ) ); $max = intval( $tmp['count'] ); - + //----------------------------------------- // Avoid limit... //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'topics', 'order' => 'tid ASC', 'limit' => array($start,$end) ) ); $outer = $this->ipsclass->DB->simple_exec(); - + //----------------------------------------- // Process... //----------------------------------------- - + while( $r = $this->ipsclass->DB->fetch_row( $outer ) ) { $modfunc->rebuild_topic($r['tid'], 0); - + if ( $this->ipsclass->input['pergo'] <= 200 ) { - $output[] = "Проверяемая тема ".$r['title']; + $output[] = "Processed topic ".$r['title']; } - + $done++; } - + //----------------------------------------- // Finish - or more?... //----------------------------------------- - + if ( ! $done and ! $max ) { //----------------------------------------- // Done.. //----------------------------------------- - - $text = "Обновление завершено
    ".implode( "
    ", $output ); + + $text = "Rebuild completed
    ".implode( "
    ", $output ); $url = "{$this->ipsclass->form_code}"; $time = 2; } @@ -2487,75 +2673,75 @@ class ad_rebuild { //----------------------------------------- // More.. //----------------------------------------- - - $text = "Тем проверено: $dis, продолжение...
    ".implode( "
    ", $output ); + + $text = "$dis processed so far, continuing...
    ".implode( "
    ", $output ); $url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$dis; $time = 0; } - + //----------------------------------------- // Bye.... //----------------------------------------- - + $this->ipsclass->admin->redirect( $url, $text, 0, $time ); } - + /*-------------------------------------------------------------------------*/ // RESYNCHRONIZE FORUMS /*-------------------------------------------------------------------------*/ - + function resync_forums() { require_once( ROOT_PATH.'sources/lib/func_mod.php' ); $modfunc = new func_mod(); $modfunc->ipsclass =& $this->ipsclass; - + //----------------------------------------- // Set up //----------------------------------------- - + $done = 0; $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; $end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100; $dis = $end + $start; $output = array(); - + //----------------------------------------- // Got any more? //----------------------------------------- - + $tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as count', 'from' => 'forums', 'limit' => array($dis,1) ) ); $max = intval( $tmp['count'] ); - + //----------------------------------------- // Avoid limit... //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forums', 'order' => 'id ASC', 'limit' => array($start,$end) ) ); $outer = $this->ipsclass->DB->simple_exec(); - + //----------------------------------------- // Process... //----------------------------------------- - + while( $r = $this->ipsclass->DB->fetch_row( $outer ) ) { $modfunc->forum_recount( $r['id'] ); - $output[] = "Проверяемый форум ".$r['name']; + $output[] = "Processed forum ".$r['name']; $done++; } - + //----------------------------------------- // Finish - or more?... //----------------------------------------- - + if ( ! $done and ! $max ) { //----------------------------------------- // Done.. //----------------------------------------- - - $text = "Обновление завершено
    ".implode( "
    ", $output ); + + $text = "Rebuild completed
    ".implode( "
    ", $output ); $url = "{$this->ipsclass->form_code}"; $time = 2; } @@ -2564,57 +2750,57 @@ class ad_rebuild { //----------------------------------------- // More.. //----------------------------------------- - - $text = "Форумов проверено: $dis, продолжение...
    ".implode( "
    ", $output ); + + $text = "$dis processed so far, continuing...
    ".implode( "
    ", $output ); $url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$dis; $time = 0; } - + //----------------------------------------- // Bye.... //----------------------------------------- - + $this->ipsclass->admin->redirect( $url, $text, 0, $time ); } - + /*-------------------------------------------------------------------------*/ // DO COUNT - Count the stats /*-------------------------------------------------------------------------*/ - + function docount() { if ( (! $this->ipsclass->input['posts']) and (! $this->ipsclass->input['online']) and (! $this->ipsclass->input['members'] ) and (! $this->ipsclass->input['lastreg'] ) ) { - $this->ipsclass->admin->error("Нечего пересчитывать, вы должны выбрать хоть что-то!"); + $this->ipsclass->admin->error("Nothing to recount!"); } - + $stats = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='stats'" ) ); - + $stats = unserialize($this->ipsclass->txt_stripslashes($stats['cs_value'])); - + if ($this->ipsclass->input['posts']) { $topics = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'COUNT(*) as tcount', 'from' => 'topics', 'where' => 'approved=1' ) ); - + $posts = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'SUM(posts) as replies', 'from' => 'topics', 'where' => 'approved=1' ) ); - + $stats['total_topics'] = $topics['tcount']; $stats['total_replies'] = $posts['replies']; } - + if ($this->ipsclass->input['members']) { $this->ipsclass->DB->simple_construct( array( 'select' => 'count(id) as members', 'from' => 'members', 'where' => "mgroup <> '".$this->ipsclass->vars['auth_group']."'" ) ); $this->ipsclass->DB->simple_exec(); - + $r = $this->ipsclass->DB->fetch_row(); $stats['mem_count'] = intval($r['members']); } - + if ($this->ipsclass->input['lastreg']) { $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, members_display_name', @@ -2623,18 +2809,18 @@ class ad_rebuild { 'order' => "id DESC", 'limit' => array(0,1) ) ); $this->ipsclass->DB->simple_exec(); - + $r = $this->ipsclass->DB->fetch_row(); $stats['last_mem_name'] = $r['members_display_name'] ? $r['members_display_name'] : $r['name']; $stats['last_mem_id'] = $r['id']; } - + if ($this->ipsclass->input['online']) { $stats['most_date'] = time(); $stats['most_count'] = 1; } - + if ( count($stats) > 0 ) { $this->ipsclass->cache['stats'] =& $stats; @@ -2642,313 +2828,321 @@ class ad_rebuild { } else { - $this->ipsclass->admin->error("Нечего пересчитывать!"); + $this->ipsclass->admin->error("Nothing to recount!"); } - - $this->ipsclass->main_msg = 'Статистика пересчитана'; - - $this->ipsclass->admin->done_screen("Статистика пересчитана", "Пересчет и обновление", "{$this->ipsclass->form_code}", 'redirect' ); - + + $this->ipsclass->main_msg = 'Statistics Recounted'; + + $this->ipsclass->admin->done_screen("Statistics Recounted", "Recount statistics section", "{$this->ipsclass->form_code}", 'redirect' ); + } - + /*-------------------------------------------------------------------------*/ // MAIN PAGE /*-------------------------------------------------------------------------*/ - + function rebuild_start() { - $this->ipsclass->admin->page_detail = "Эта секция позволяет вам синхронизировать данные вашего форума."; - $this->ipsclass->admin->page_title = "Пересчет и обновление"; - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Пересчет и обновление' ); - + $this->ipsclass->admin->page_detail = "Please choose which statistics to recount."; + $this->ipsclass->admin->page_title = "Recount & Rebuild Manager"; + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Recount & Rebuild' ); + //----------------------------------------- // STATISTICS //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'docount' ), 2 => array( 'act' , 'rebuild' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - - $this->ipsclass->adskin->td_header[] = array( "Действие" , "70%" ); - $this->ipsclass->adskin->td_header[] = array( "Опция" , "30%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Пересчет статистики" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Пересчитать все темы и сообщения?", - $this->ipsclass->adskin->form_dropdown( 'posts', array( 0 => array( 1, 'Да' ), 1 => array( 0, 'Нет' ) ) ) + + $this->ipsclass->adskin->td_header[] = array( "Statistic" , "70%" ); + $this->ipsclass->adskin->td_header[] = array( "Option" , "30%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Recount Statistics" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Recount total topics and posts", + $this->ipsclass->adskin->form_dropdown( 'posts', array( 0 => array( 1, 'Yes' ), 1 => array( 0, 'No' ) ) ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Пересчитать пользователей?", - $this->ipsclass->adskin->form_dropdown( 'members', array( 0 => array( 1, 'Да' ), 1 => array( 0, 'Нет' ) ) ) + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Recount Members", + $this->ipsclass->adskin->form_dropdown( 'members', array( 0 => array( 1, 'Yes' ), 1 => array( 0, 'No' ) ) ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Найти последнего зарегистрированного пользователя?", - $this->ipsclass->adskin->form_dropdown( 'lastreg', array( 0 => array( 1, 'Да' ), 1 => array( 0, 'Нет' ) ) ) + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Reset last registered member", + $this->ipsclass->adskin->form_dropdown( 'lastreg', array( 0 => array( 1, 'Yes' ), 1 => array( 0, 'No' ) ) ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Сбросить «Рекорд посещаемости форума»?", - $this->ipsclass->adskin->form_dropdown( 'online', array( 0 => array( 0, 'Нет' ), 1 => array( 1, 'Да' ) ) ) + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Reset 'Most online' statistic?", + $this->ipsclass->adskin->form_dropdown( 'online', array( 0 => array( 0, 'No' ), 1 => array( 1, 'Yes' ) ) ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Обновить'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Reset these statistics'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // Resynchronise Forums //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doresyncforums' ), 2 => array( 'act' , 'rebuild' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ресинхронизация форумов" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Ресинхронизация форумов
    Этот инструмент позволяет пересчитать темы, сообщения и найти последнего автора.
    Действует для всех ваших форумов.
    ", - $this->ipsclass->adskin->form_simple_input( 'pergo', '50', 5 ). " за раз" + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Resynchronize Forums" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Resynchronize Forums
    This will recount topics, posts and the forum last poster for all your forums
    ", + $this->ipsclass->adskin->form_simple_input( 'pergo', '50', 5 ). " Per Cycle" ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Запустить'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Resynchronize Forums'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // Resynchronise Forums //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doresynctopics' ), 2 => array( 'act' , 'rebuild' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ресинхронизация тем" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Ресинхронизация тем
    Этот инструмент позволяет пересчитывать ответы, количество прикрепленных файлов, авторов тем и авторов ответов.
    ", - "по ". $this->ipsclass->adskin->form_simple_input( 'pergo', '500', 5 ). " за раз" + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Resynchronize Topics" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Resynchronize Topics
    This will recount replies, attachment count and the topic starter and last poster for all your topics.
    ", + $this->ipsclass->adskin->form_simple_input( 'pergo', '500', 5 ). " Per Cycle" ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Запустить'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Resynchronize Topics'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // Resynchronise Posts //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doposts' ), 2 => array( 'act' , 'rebuild' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Обновление содержимого сообщений" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Обновление содержимого сообщений
    Этот инструмент позволяет обновить содержимое всех сообщений, включая BB-коды и смайлики.
    Полезно в тех случаях, когда вы изменили множество смайликов или изменили к ним путь.
    ", - "по ". $this->ipsclass->adskin->form_simple_input( 'pergo', '500', 5 ). " за раз" + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Rebuild Content [Posts, Calendar Entries, Private Messages, Announcements, Signatures]" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Rebuild Content
    This will rebuild the submitted content including BBCode, custom bbcode, HTML (where allowed) and emoticons. Useful if you've changed a lot of custom bbcodes, emoticons or the emoticon paths.
    ", + $this->ipsclass->adskin->form_dropdown( 'type', array( + array( 'posts' , 'Post Content' ), + array( 'pms' , 'Private Messages' ), + array( 'cal' , 'Calendar Events' ), + array( 'announce' , 'Announcements' ), + array( 'sigs' , 'Signatures' ), + ) ) . + "  " . + $this->ipsclass->adskin->form_simple_input( 'pergo', '500', 5 ). " Per Cycle" ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Запустить'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Rebuild Content'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // Resynchronise User Names //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'dopostnames' ), 2 => array( 'act' , 'rebuild' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Обновление имен пользователей" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Обновление имен пользователей
    Этот инструмент позволяет сбросить сохраненные имена пользователей в темах, сообщениях и т.п.
    Полезно в тех случаях, когда вы часто конвертируете или меняете в ручную имена пользователей.
    ", - "по ". $this->ipsclass->adskin->form_simple_input( 'pergo', '500', 5 ). " за раз" + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Rebuild User Names" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Rebuild User Names
    This will reset the saved usernames in posts, topics, logs, etc. Useful if you've recently converted or manually changed member's names.
    ", + $this->ipsclass->adskin->form_simple_input( 'pergo', '500', 5 ). " Per Cycle" ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Запустить'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Rebuild User Names'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // Resynchronise User Post Counts //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'dopostcounts' ), 2 => array( 'act' , 'rebuild' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Пересчет сообщений пользователей" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Пересчет сообщений пользователей
    Этот инструмент позволяет пересчитать все сообщения пользователей по ТЕКУЩИМ сообщениям базы данных форума.
    Обычно после пересчета счетчики сообщений пользователей УМЕНЬШАЮТСЯ, так как при пересчете не учитываются удаленные сообщения.
    Это действие следует выполнить в том случае, если вы хотите узнать настоящее количество сообщений ваших пользователей.
    ", - "по ". $this->ipsclass->adskin->form_simple_input( 'pergo', '500', 5 ). " за раз" + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Rebuild User Post Counts" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Rebuild User Post Counts
    This will recount members posts based on CURRENT posts from the database. This will almost certainly REDUCE the post counts for your members as deleted and pruned posts will no longer be counted. This should not be used if you wish to retain your member's current post counts.
    THERE IS NO UNDO!", + $this->ipsclass->adskin->form_simple_input( 'pergo', '500', 5 ). " Per Cycle" ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Запустить'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Rebuild User Post Counts'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - + + //----------------------------------------- // Rebuild user photo thumbnails //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'dophotos' ), 2 => array( 'act' , 'rebuild' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Обновление эскизов изображения профиля" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Обновление эскизов изображения профиля
    Этот инструмент обновит все эскизы изображения профиля к текущему размеру. Этот инструмент полезен в тех случаях, если вы недавно изменили размер эскизов изображений профиля и желаете обновить размер у всех установленных изображений.
    Внимание: этот инструмент требует много ресурсов.", - $this->ipsclass->adskin->form_simple_input( 'pergo', '20', 5 ). " за раз" + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Rebuild Profile Photo Thumbnails" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Rebuild Profile Photo Thumbnails
    This will rebuild all your profile image thumbnails to the current size. This is useful if you've recently changed the thumbnail size and wish to update all current photos
    This is moderately resource intensive.", + $this->ipsclass->adskin->form_simple_input( 'pergo', '20', 5 ). " Per Cycle" ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Запустить'); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Rebuild Profile Photo Thumbnails'); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + //----------------------------------------- // Rebuild thumbnails //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'dothumbnails' ), 2 => array( 'act' , 'rebuild' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Обновление уменьшенных изображений" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Обновление уменьшенных изображений
    Этот инструмент позволяет обновить уменьшенные изображения прикрепленных файлов.
    Полезно в тех случаях, когда вы изменили размеры уменьшенных изображений и хотите обновить все прикрепленные изображения.
    Внимание: этот инструмент требует достаточно много ресурсов.", - "по ". $this->ipsclass->adskin->form_simple_input( 'pergo', '20', 5 ). " за раз" + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Rebuild Attachment Thumbnails" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Rebuild Attachment Thumbnails
    This will rebuild all your attachment image thumbnails to the current size. This is useful if you've recently changed the thumbnail size and wish to update all current attachments
    This is moderately resource intensive.", + $this->ipsclass->adskin->form_simple_input( 'pergo', '20', 5 ). " Per Cycle" ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Запустить'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Rebuild Attachment Thumbnails'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // Rebuild attachment data //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doattachdata' ), 2 => array( 'act' , 'rebuild' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Обновление информации о прикрепленных файлах" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Обновление информации о прикрепленных файлах
    Этот инструмент позволяет обновить всю информацию о прикрепленных файлах, такую как: размер файла, местоположение и расширение файла.
    Внимание: этот инструмент требует достаточно много ресурсов.", - $this->ipsclass->adskin->form_simple_input( 'pergo', '50', 5 ). " за раз" + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Rebuild Attachment Data" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Rebuild Attachment Data
    This will rebuild all your attachment data such as filesize, location and file extension
    This is moderately resource intensive.", + $this->ipsclass->adskin->form_simple_input( 'pergo', '50', 5 ). " Per Cycle" ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Запустить'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Rebuild Attachment Data'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // Clean up attachments //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'cleanattachments' ), 2 => array( 'act' , 'rebuild' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Удаление прикрепленных файлов без связей" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Удаление прикрепленных файлов без связей
    Этот инструмент позволяет проверить и удалить все файлы 'post-', которые уже не являются прикрепленными.
    Внимание: этот инструмент требует достаточно много ресурсов.", - $this->ipsclass->adskin->form_simple_input( 'pergo', '50', 5 ). " за раз" + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Remove orphaned attachments" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Remove orphaned attachments
    This will check and remove all orphaned 'post-' attachments not assigned to a post.
    This is moderately resource intensive.", + $this->ipsclass->adskin->form_simple_input( 'pergo', '50', 5 ). " Per Cycle" ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Запустить'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Remove orphaned attachments'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // Clean up uploaded avatars //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'cleanavatars' ), 2 => array( 'act' , 'rebuild' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Удаление аватаров без связей" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Удаление аватаров без связей
    Этот инструмент позволяет проверить и удалить все файлы 'av-', которые уже не используются пользователями.
    Внимание: этот инструмент требует достаточно много ресурсов.", - $this->ipsclass->adskin->form_simple_input( 'pergo', '50', 5 ). " за раз" + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Remove orphaned uploaded avatars" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Remove orphaned avatars
    This will check and remove all orphaned 'av-' avatars not assigned to a member.
    This is moderately resource intensive.", + $this->ipsclass->adskin->form_simple_input( 'pergo', '50', 5 ). " Per Cycle" ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Запустить'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Remove orphaned avatars'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // Clean up uploaded photos //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'cleanphotos' ), 2 => array( 'act' , 'rebuild' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Удаление фотографий без связей" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Удаление фотографий без связей
    Этот инструмент позволяет проверить и удалить все файлы 'photo-', которые уже не используются пользователями.
    Внимание: этот инструмент требует достаточно много ресурсов.", - $this->ipsclass->adskin->form_simple_input( 'pergo', '50', 5 ). " за раз" + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Remove orphaned uploaded photos" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Remove orphaned photos
    This will check and remove all orphaned 'photo-' photographs not assigned to a member.
    This is moderately resource intensive.", + $this->ipsclass->adskin->form_simple_input( 'pergo', '50', 5 ). " Per Cycle" ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Запустить'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Remove orphaned photos'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //-------------------------------// - + $this->ipsclass->admin->output(); - + } - - - - + + + + } -?> +?> \ No newline at end of file diff --git a/upload/sources/action_admin/remote_template.php b/upload/sources/action_admin/remote_template.php index 7020b5b8..222934d2 100644 --- a/upload/sources/action_admin/remote_template.php +++ b/upload/sources/action_admin/remote_template.php @@ -1,933 +1,1063 @@ - $Date: 2006-11-06 17:01:30 -0600 (Mon, 06 Nov 2006) $ -| > $Revision: 715 $ -| > $Author: bfarber $ -+--------------------------------------------------------------------------- -| -| > Skin -> Templates pop up functions -| > Module written by Matt Mecham -| > Date started: 9th July 2002 -| -| > Module Version Number: 1.0.0 -+-------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - - -class ad_remote_template { - - var $base_url; - - function auto_run() - { - //----------------------------------------- - - switch($this->ipsclass->input['code']) - { - case 'preview': - $this->do_preview(); - break; - - case 'edit_bit': - $this->edit_bit(); - break; - - case 'macro_one': - $this->macro_one(); - break; - - case 'macro_two': - $this->macro_two(); - break; - - case 'compare': - $this->compare_frames(); - break; - - case 'dotop': - $this->print_compare_top(); - break; - - case 'donew': - $this->print_compare_new(); - break; - - //----------------------------------------- - - case 'search': - $this->search_frames(); - break; - - case 'searchbox': - $this->print_search_box(); - break; - - case 'searchlinks': - $this->print_searchlinks(); - break; - - //----------------------------------------- - - case 'css_search': - $this->css_search_frames(); - break; - - case 'csssearchlinks': - $this->print_css_searchlinks(); - break; - - case 'css_diff': - $this->css_differences(); - break; - - case 'previewstate': - $this->do_message("Preview Window"); - break; - - //----------------------------------------- - - case 'css_preview': - $this->css_preview(); - break; - - default: - exit(); - break; - } - - } - - //----------------------------------------- - - function css_search_frames() - { - print " - Search - - - - - "; - - exit(); - } - - /*-------------------------------------------------------------------------*/ - // CSS differences - /*-------------------------------------------------------------------------*/ - - function css_differences() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $id = intval( $this->ipsclass->input['id'] ); - $original = ""; - $new = ""; - - //----------------------------------------- - // Load HTML - //----------------------------------------- - - $this->html = $this->ipsclass->acp_load_template('cp_skin_lookandfeel'); - - //----------------------------------------- - // Get this skin set.. and master skin set.. - //----------------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => '*', - 'from' => 'skin_sets', - 'where' => 'set_skin_set_id IN (1,'.$id.')' ) ); - - $this->ipsclass->DB->exec_query(); - - while( $row = $this->ipsclass->DB->fetch_row() ) - { - if ( $row['set_skin_set_id'] == 1 ) - { - $original = $row['set_css']; - } - else - { - $new = $row['set_css']; - } - } - - //----------------------------------------- - // Get Diff library - //----------------------------------------- - - require_once( KERNEL_PATH . 'class_difference.php' ); - $class_difference = new class_difference(); - $class_difference->method = 'PHP'; - - $difference = $class_difference->get_differences( $original, $new ); - - if ( ! $class_difference->diff_found ) - { - $difference = "No differences found"; - } - - $this->ipsclass->html = $this->html->skin_css_view_bit( nl2br( $difference ) ); - - $this->ipsclass->admin->print_popup(); - } - - //----------------------------------------- - - function css_preview() - { - //----------------------------------------- - // GET THE TEMPLATES THAT THIS CSS USES - //----------------------------------------- - - $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.intval( $this->ipsclass->input['id']) ) ); - - $skin = $this->ipsclass->DB->fetch_row(); - - $element = trim(stripslashes($_GET['element'])); - - list($type, $name) = explode( "|", $element ); - - $like = "class='{$name}'"; - $first = '.'; - - if ($type == 'id') - { - $like = "id='{$name}'"; - $first = '#'; - } - - preg_match( "/($first"."$name)\s{0,}\{(.+?)\}/s", $this_set['set_cache_css'], $match ); - - $defs = explode( ";", str_replace( "\n\n", "\n", str_replace( "\r\n", "\n", trim($match[2]) ) ) ); - - $def_output = ""; - - foreach($defs as $bit) - { - list($type, $value) = explode( ":", trim($bit) ); - - $type = trim($type); - - $value = trim($value); - - if ($type != "" and $value != "") - { - $extra = ""; - - if ($type == 'color' or $type == 'background-color') - { - $extra = "   "; - } - - $def_output .= "$type$value $extra\n"; - } - } - - $css = "\n"; - - $html = " - - CSS Предпросмотр - $css - - - - - - -
    Предпросмотр CSS класса '$name'
    Из стиля '{$this_set['set_name']}'
    -
    - - - - - - - -
    Предпросмотр
    Строка примера: Клара у Карла украла кораллы, а Карл у Клары украл кларнет
    -
    - - - - - $def_output -
    Отформатированное определение CSS стиля
    - - - "; - - print $html; - - exit(); - - } - - //----------------------------------------- - //--------------------------------------- - - function print_css_searchlinks() - { - //----------------------------------------- - // GET THE TEMPLATES THAT THIS CSS USES - //----------------------------------------- - - $element = trim(stripslashes($_GET['element'])); - - $this->ipsclass->input['id'] = intval( $this->ipsclass->input['id'] ); - - list($type, $name) = explode( "|", $element ); - - $like = "class=_{$name}"; - - if ($type == 'id') - { - $like = "id=_{$name}"; - } - - require ROOT_PATH .'sources/lib/skin_info.php'; - - //die("SELECT suid, set_id, group_name, func_name FROM ibf_skin_templates WHERE set_id='".$set['tmpl_id']."' AND section_content LIKE '%".$like."%' ORDER BY group_name"); - - $this->ipsclass->DB->build_query( array( 'select' => 'suid, set_id, group_name, func_name', 'from' => 'skin_templates', 'where' => "set_id IN (1,".$this->ipsclass->input['id'].") AND section_content LIKE '%".$like."%'", 'order' => 'group_name' ) ); - $this->ipsclass->DB->exec_query(); - - if (! $this->ipsclass->DB->get_num_rows() ) - { - $this->do_message("Не найдено записей в шаблоне с ID {$set['set_id']}"); - } - - $results = array(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - if ( ! isset($result[ $r['group_name'] ]) ) - { - $result[ $r['group_name'] ] = array(); - } - - $result[ $r['group_name'] ][ $r['func_name'] ] = array( 'suid' => $r['suid'], 'func_name' => $r['func_name'] ); - - } - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table(); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Результаты поиска" ) , 'title' ); - - foreach( $result as $group_name => $sub_array ) - { - if ( isset($skin_names[ $group_name ]) ) - { - $group_name = $skin_names[ $group_name ][0]; - } - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "$group_name" ) , 'catrow' ); - - if (is_array($sub_array) and count($sub_array) > 0 ) - { - foreach( $sub_array as $data ) - { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "+ {$data['func_name']}" ) ); - } - } - } - - - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - $this->ipsclass->admin->print_popup(); - - } - - /*-------------------------------------------------------------------------*/ - // PRINT THE SEARCH RESULT LINKS - /*-------------------------------------------------------------------------*/ - - function print_searchlinks() - { - //----------------------------------------- - // Printing no results? - //----------------------------------------- - - if ($this->ipsclass->input['bypass'] == 1) - { - $this->do_message("Ничего не найдено"); - } - - //----------------------------------------- - // Clean up search post - //----------------------------------------- - - $search_text = trim($this->unconvert_tags(stripslashes($_POST['search']))); - - $search_text = str_replace( "\$", "\\$", $search_text); - $search_text = str_replace( "'" , "\\'", $search_text); - - if ($search_text == "") - { - $this->do_message("Вы должны ввести строку для поиска"); - } - - require ROOT_PATH .'sources/lib/skin_info.php'; - - //----------------------------------------- - // Get template bits - //----------------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => 'suid, set_id, group_name, func_name', 'from' => 'skin_templates', 'where' => "set_id=".$this->ipsclass->input['set_id']." AND section_content LIKE '%$search_text%'", 'order' => 'group_name' ) ); - $this->ipsclass->DB->exec_query(); - - if ( ! $this->ipsclass->DB->get_num_rows() ) - { - $this->do_message("Не найдено записей, содержащих искомую строку"); - } - - $results = array(); - - //----------------------------------------- - // Loop.. - //----------------------------------------- - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - if ( ! isset($result[ $r['group_name'] ]) ) - { - $result[ $r['group_name'] ] = array(); - } - - $result[ $r['group_name'] ][] = array( 'suid' => $r['suid'], 'func_name' => $r['func_name'] ); - - } - - //----------------------------------------- - // Print.. - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table(); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Результаты поиска" ) , 'title' ); - - foreach( $result as $group_name => $sub_array ) - { - if ( isset($skin_names[ $group_name ]) ) - { - $group_name = $skin_names[ $group_name ][0]; - } - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "$group_name" ) , 'catrow' ); - - if (is_array($sub_array) and count($sub_array) > 0 ) - { - foreach( $sub_array as $data ) - { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "+ ipsclass->input['set_id']}&type=text&hl=".urlencode(stripslashes($_POST['search']))."' target='preview'>{$data['func_name']}" ) ); - } - } - } - - //----------------------------------------- - // Done.. - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - $this->ipsclass->admin->print_popup(); - - } - - //----------------------------------------- - - function do_message($message="") - { - $this->ipsclass->html = "

    $message

     "; - - $this->ipsclass->admin->print_popup(); - - } - - //----------------------------------------- - - function print_search_box() - { - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'searchlinks' ), - 2 => array( 'act' , 'rtempl' ), - 3 => array( 'set_id', $this->ipsclass->input['set_id'] ) - ) ,'theform', 'target="links"' ); - - //----------------------------------------- - - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Введите запрос для поиска:
    ". - $this->ipsclass->adskin->form_input( 'search' ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Найти!"); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - $this->ipsclass->admin->print_popup(); - - } - - //----------------------------------------- - - function search_frames() - { - $this->ipsclass->boink_it( $this->ipsclass->base_url.'§ion=lookandfeel&act=skintools&code=searchsplash' ); - - - exit(); - print " - Search - - - - - - - - "; - - exit(); - } - - //----------------------------------------- - - function compare_frames() - { - print " - - Сравнение - - - - - - - - - - - - "; - - exit(); - } - - //----------------------------------------- - - function print_compare_top() - { - $content = $this->ipsclass->input['content'] == 'orig' ? 'Стандартный шаблон' : 'Текущий шаблон'; - - print " - -
    $content
    - "; - - exit(); - } - - //----------------------------------------- - - function print_compare_new() - { - $template = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_templates', 'where' => "suid=".intval($this->ipsclass->input['suid']) ) ); - - if ( ! $template['suid'] ) - { - $this->ipsclass->admin->error("Вы должны выбрать ID шаблона!"); - } - - $skin = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.$template['set_id'] ) ); - - $css = $skin['set_cache_css']; - - $css_text = "\n"; - - print " - $css_text - - - - - - "; - - exit(); - - - } - - //----------------------------------------- - - function macro_one($msg="") - { - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'macro_two' ), - 2 => array( 'act' , 'rtempl' ), - 3 => array( 'suid' , $this->ipsclass->input['suid'] ) - ) ); - - //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Поиск макросов" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Введите искомый макрос
    (Например: {ibf.skin.set_image_dir})", - $this->ipsclass->adskin->form_input( 'lookup', $this->ipsclass->input['lookup'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Найти"); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - $this->ipsclass->admin->print_popup(); - - } - - //----------------------------------------- - - function macro_two() - { - if ($this->ipsclass->input['lookup'] == "") - { - $this->ipsclass->admin->error("You must enter a macro to look up", 1); - } - - $is_valid = 0; - $macro = ""; - $extra = ""; - - if ( preg_match( "/<\{(\S+)\}>/", $this->ipsclass->input['lookup'], $match ) ) - { - $is_valid = 1; - $macro = $match[1]; - } - - else if ( preg_match( "/{?(?:ibf|ipb)\.(skin|lang|vars|member)(.+?)}?$/", $this->ipsclass->input['lookup'], $match ) ) - { - $is_valid = 1; - $macro = $match[2]; - $extra = $match[1]; - $macro = str_replace( "'", "'", $macro ); - $macro = preg_replace( "#[\[\]\"'\.]#", "", $macro ); - } - else - { - $is_valid = 0; - } - - if ($is_valid != 1) - { - $this->macro_one("Неправильный формат"); - } - - if ($extra != "") - { - if ($extra == 'member') - { - if (isset($this->ipsclass->member[$macro])) - { - if ($this->ipsclass->member[$macro] == "") - { - $answer = ""; - } - else - { - $answer = $this->ipsclass->member[$macro]; - } - } - $result = "Информация пользователя загружена"; - } - else if ($extra == 'vars') - { - //----------------------------------------- - // Filter out sensitive stuff - //----------------------------------------- - - $safe_INFO['board_name'] = $this->ipsclass->vars['board_name']; - $safe_INFO['board_url'] = $this->ipsclass->vars['board_url']; - - $answer = $safe_INFO[$macro]; - - $result = "Системные переменные (могут быть защищены)"; - } - else if ($extra == 'lang') - { - $result = "Языковой текст"; - - $this->ipsclass->DB->simple_construct( array( 'select' => 'group_name', 'from' => 'skin_templates', 'where' => "suid='{$this->ipsclass->input['suid']}'" ) ); - $this->ipsclass->DB->simple_exec(); - - if ( $r = $this->ipsclass->DB->fetch_row() ) - { - $filename = preg_replace( "/^skin_/", "lang_", $r['group_name'] ); - - if ( @file_exists( ROOT_PATH. "cache/lang_cache/ru/$filename".".php" ) ) - { - require ROOT_PATH. "cache/lang_cache/ru/$filename".".php"; - - $answer = $lang[$macro]; - } - } - } - } - else - { - //----------------------------------------- - // Is macro - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => 'set_id', 'from' => 'skin_templates', 'where' => "suid='{$this->ipsclass->input['suid']}'" ) ); - $this->ipsclass->DB->simple_exec(); - - $template = $this->ipsclass->DB->fetch_row(); - - $this->ipsclass->DB->simple_construct( array( 'select' => 'macro_value, macro_replace', - 'from' => 'skin_macro', - 'where' => "macro_set IN( 1,{$template['set_id']}) AND macro_value='$macro'", - 'order' => "macro_set DESC" ) ); - $this->ipsclass->DB->simple_exec(); - - if ($val = $this->ipsclass->DB->fetch_row()) - { - $answer = htmlentities($val['macro_replace']); - $result = "Найденные макросы"; - } - else - { - $answer = "Макрос не найден"; - } - } - - $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Результаты поиска макроса Перейт" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Введенный макрос", $this->ipsclass->input['lookup'] ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Тип макроса", $result ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Результат
    Может быть пустым, если нет информации", $answer ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - $this->ipsclass->admin->print_popup(); - - - - } - - /*-------------------------------------------------------------------------*/ - // SHOW PREVIEW - /*-------------------------------------------------------------------------*/ - - function do_preview() - { - //----------------------------------------- - // Check... - //----------------------------------------- - - if ($this->ipsclass->input['suid'] == "") - { - $this->ipsclass->admin->error("Не выбран ID шаблона, вернитесь назад и повторите попытку"); - } - - //----------------------------------------- - // Get from DB - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_templates', 'where' => "suid='".$this->ipsclass->input['suid']."'" ) ); - $this->ipsclass->DB->simple_exec(); - - if ( ! $template = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->admin->error("Шаблон с этим ID не найден, вернитесь назад и повторите попытку"); - } - - //----------------------------------------- - // Get skin set details - //----------------------------------------- - - $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.$template['set_id'] ) ); - - $macros = unserialize(stripslashes($this_set['set_cache_macro'])); - - if ( is_array($macros) and count($macros) ) - { - foreach( $macros as $mc ) - { - $macro_orig[] = "<{".$mc['macro_value']."}>"; - $macro_repl[] = $mc['macro_replace']; - } - } - - $table = " - - - - - - -
    Группа шаблонов: {$template['group_name']} . Шаблон: {$template['func_name']}
    Смотреть как [ Текст | HTML | HTML с CSS ]
    -

    - "; - - if ($this->ipsclass->input['type'] == 'text') - { - @header("Content-type: text/html; charset={$this->ipsclass->vars['gb_char_set']}"); - print $table; - $html = $this->convert_tags($template['section_content']); - - $html = str_replace( "<" , "<" , $html); - $html = str_replace( ">" , ">" , $html); - $html = str_replace( "\"", """, $html); - - if ($_GET['hl'] != "") - { - $hl = str_replace( '{-22-}', '"', urldecode(stripslashes($_GET['hl'])) ); - - $hl = str_replace( "<" , "<" , $hl); - $hl = str_replace( ">" , ">" , $hl); - $hl = str_replace( "\"", """, $hl); - - $html = str_replace( $hl, "$hl", $html ); - } - - $html = preg_replace( "!<\!--(.+?)(//)?-->!s" , "<!--\\1--\\2>", $html ); - $html = preg_replace( "#<([^&<>]+)>#s" , "<\\1>" , $html ); //Matches - $html = preg_replace( "#<([^&<>]+)=#s" , "<\\1=" , $html ); //Matches \\1>" , $html ); //Matches - $html = preg_replace( "!=("|')([^<>])("|')(\s|>)!s" , "=\\1\\2\\3\\4" , $html ); //Matches ='this' - - $html = str_replace( "\n", "
    ", str_replace("\r\n", "\n", $html ) ); - - print "
    ".$html."
    "; - exit(); - - } - else if ($this->ipsclass->input['type'] == 'html') - { - @header("Content-type: text/html; charset={$this->ipsclass->vars['gb_char_set']}"); - print $table; - print $this->convert_tags($template['section_content']); - - exit(); - } - else if($this->ipsclass->input['type'] == 'css') - { - $css = $this_set['set_cache_css']; - - $css_text = "\n"; - - @header("Content-type: text/html; charset={$this->ipsclass->vars['gb_char_set']}"); - print "Предпросмотр$css_text$table \n"; - print str_replace( $macro_orig, $macro_repl, $this->convert_tags($template['section_content']) ); - - exit(); - - } - - - - } - - - //----------------------------------------- - - - - function convert_tags($t="") - { - if ($t == "") - { - return ""; - } - - $t = preg_replace( "/{?\\\$this->ipsclass->base_url}?/" , "{ibf.script_url}" , $t ); - $t = preg_replace( "/{?\\\$this->ipsclass->session_id}?/" , "{ibf.session_id}" , $t ); - $t = preg_replace( "/{?\\\$this->ipsclass->skin\['?(\w+)'?\]}?/" , "{ibf.skin.\\1}" , $t ); - $t = preg_replace( "/{?\\\$this->ipsclass->lang\['?(\w+)'?\]}?/" , "{ibf.lang.\\1}" , $t ); - $t = preg_replace( "/{?\\\$this->ipsclass->vars\['?(\w+)'?\]}?/" , "{ibf.vars.\\1}" , $t ); - $t = preg_replace( "/{?\\\$this->ipsclass->member\['?(\w+)'?\]}?/" , "{ibf.member.\\1}" , $t ); - - return $t; - - } - - function unconvert_tags($t="") - { - if ($t == "") - { - return ""; - } - - $t = preg_replace( "/{ibf\.script_url}/i" , '{$this->ipsclass->base_url}' , $t); - $t = preg_replace( "/{ibf\.session_id}/i" , '{$this->ipsclass->session_id}' , $t); - $t = preg_replace( "/{ibf\.skin\.(\w+)}/" , '{$this->ipsclass->skin[\''."\\1".'\']}' , $t); - $t = preg_replace( "/{ibf\.lang\.(\w+)}/" , '{$this->ipsclass->lang[\''."\\1".'\']}' , $t); - $t = preg_replace( "/{ibf\.vars\.(\w+)}/" , '{$this->ipsclass->vars[\''."\\1".'\']}' , $t); - $t = preg_replace( "/{ibf\.member\.(\w+)}/" , '{$this->ipsclass->member[\''."\\1".'\']}' , $t); - - return $t; - - } - - -} - - + $Date: 2007-08-21 17:49:04 -0400 (Tue, 21 Aug 2007) $ +| > $Revision: 1099 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > Skin -> Templates pop up functions +| > Module written by Matt Mecham +| > Date started: 9th July 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class ad_remote_template { + + var $base_url; + + function auto_run() + { + //----------------------------------------- + + switch($this->ipsclass->input['code']) + { + case 'preview': + $this->do_preview(); + break; + + case 'edit_bit': + $this->edit_bit(); + break; + + case 'cache_settings': + $this->cache_settings(); + break; + + case 'cache_settings_save': + $this->cache_settings_save(); + break; + + case 'macro_one': + $this->macro_one(); + break; + + case 'macro_two': + $this->macro_two(); + break; + + case 'compare': + $this->compare_frames(); + break; + + case 'dotop': + $this->print_compare_top(); + break; + + case 'donew': + $this->print_compare_new(); + break; + + //----------------------------------------- + + case 'search': + $this->search_frames(); + break; + + case 'searchbox': + $this->print_search_box(); + break; + + case 'searchlinks': + $this->print_searchlinks(); + break; + + //----------------------------------------- + + case 'css_search': + $this->css_search_frames(); + break; + + case 'csssearchlinks': + $this->print_css_searchlinks(); + break; + + case 'css_diff': + $this->css_differences(); + break; + + case 'previewstate': + $this->do_message("Preview Window"); + break; + + //----------------------------------------- + + case 'css_preview': + $this->css_preview(); + break; + + default: + exit(); + break; + } + + } + + /*-------------------------------------------------------------------------*/ + // Cache settings - SAVE + /*-------------------------------------------------------------------------*/ + + function cache_settings_save() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $suid = intval( $this->ipsclass->input['suid'] ); + $files = ( is_array($_POST['group_names_secondary']) AND count($_POST['group_names_secondary']) ) ? implode( ',', array_values( $_POST['group_names_secondary'] ) ) : ''; + + //----------------------------------------- + // Get template bit + //----------------------------------------- + + $template = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'skin_templates', 'where' => "suid=".$suid ) ); + + //----------------------------------------- + // Check... + //----------------------------------------- + + if ( ! $template['suid'] ) + { + $this->ipsclass->main_msg = "There is no such template bit"; + $this->cache_settings(); + return; + } + + //----------------------------------------- + // Update... + //----------------------------------------- + + $this->ipsclass->DB->do_update( 'skin_templates', array( 'group_names_secondary' => ',' . $files . ',' ), "suid=".$suid ); + + $this->ipsclass->main_msg = "Cache settings updated"; + $this->cache_settings(); + return; + } + + /*-------------------------------------------------------------------------*/ + // Cache settings + /*-------------------------------------------------------------------------*/ + + function cache_settings() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $suid = intval( $this->ipsclass->input['suid'] ); + $skins = array(); + $form = array(); + + //----------------------------------------- + // LOAD HTML + //----------------------------------------- + + $this->html = $this->ipsclass->acp_load_template('cp_skin_lookandfeel'); + + //----------------------------------------- + // Get $skin_names stuff + //----------------------------------------- + + require_once( ROOT_PATH.'sources/lib/skin_info.php' ); + + //----------------------------------------- + // Get template bit + //----------------------------------------- + + $template = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'skin_templates', 'where' => "suid='{$this->ipsclass->input['suid']}'" ) ); + + //----------------------------------------- + // Generate skin list... + //----------------------------------------- + + $group_titles = $this->ipsclass->cache_func->_get_templates( 1, 0, 'groups' ); + + foreach( $group_titles as $g ) + { + //----------------------------------------- + // Skip current cache file + //----------------------------------------- + + if ( $g['group_name'] == $template['group_name'] ) + { + continue; + } + + //----------------------------------------- + // Fix up names + //----------------------------------------- + + $easy_name = $g['group_name']; + + //----------------------------------------- + // If available, change group name to easy name + //----------------------------------------- + + if ( isset( $skin_names[ $g['group_name'] ] ) ) + { + $easy_name = $skin_names[ $g['group_name'] ][0]; + } + + //----------------------------------------- + // Compile + //----------------------------------------- + + $skins[] = array( $g['group_name'], $easy_name ); + } + + //----------------------------------------- + // Sort out form + //----------------------------------------- + + $_selected = explode( ',', $template['group_names_secondary'] ); + + $form['_title'] = ( $skin_names[ $template['group_name'] ][0] ) ? $skin_names[ $template['group_name'] ][0] : $template['group_name']; + $form['group_names_secondary'] = $this->ipsclass->adskin->form_multiselect( 'group_names_secondary[]', $skins, $_selected, 10 ); + + $this->ipsclass->html = $this->html->skin_cache_settings( $form, $template ); + + $this->ipsclass->admin->print_popup(); + } + + + + + //----------------------------------------- + + function css_search_frames() + { + print " + Search + + + + + "; + + exit(); + } + + /*-------------------------------------------------------------------------*/ + // CSS differences + /*-------------------------------------------------------------------------*/ + + function css_differences() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $id = intval( $this->ipsclass->input['id'] ); + $original = ""; + $new = ""; + + //----------------------------------------- + // Load HTML + //----------------------------------------- + + $this->html = $this->ipsclass->acp_load_template('cp_skin_lookandfeel'); + + //----------------------------------------- + // Get this skin set.. and master skin set.. + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => '*', + 'from' => 'skin_sets', + 'where' => 'set_skin_set_id IN (1,'.$id.')', + 'order' => 'set_skin_set_id ASC' ) ); + + $this->ipsclass->DB->exec_query(); + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + if ( $row['set_skin_set_id'] == 1 ) + { + $original = $row['set_css']; + } + else + { + $new = $row['set_css'] ? $row['set_css'] : $original; + } + } + + //----------------------------------------- + // Get Diff library + //----------------------------------------- + + require_once( KERNEL_PATH . 'class_difference.php' ); + $class_difference = new class_difference(); + $class_difference->method = 'PHP'; + + $difference = $class_difference->get_differences( $original, $new ); + + if ( ! $class_difference->diff_found ) + { + $difference = "No differences found"; + } + + $this->ipsclass->html = $this->html->skin_css_view_bit( nl2br( $difference ) ); + + $this->ipsclass->admin->print_popup(); + } + + //----------------------------------------- + + function css_preview() + { + //----------------------------------------- + // GET THE TEMPLATES THAT THIS CSS USES + //----------------------------------------- + + $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.intval( $this->ipsclass->input['id']) ) ); + + $skin = $this->ipsclass->DB->fetch_row(); + + $element = trim(stripslashes($_GET['element'])); + + list($type, $name) = explode( "|", $element ); + + $like = "class='{$name}'"; + $first = '.'; + + if ($type == 'id') + { + $like = "id='{$name}'"; + $first = '#'; + } + + preg_match( "/($first"."$name)\s{0,}\{(.+?)\}/s", $this_set['set_cache_css'], $match ); + + $defs = explode( ";", str_replace( "\n\n", "\n", str_replace( "\r\n", "\n", trim($match[2]) ) ) ); + + $def_output = ""; + + foreach($defs as $bit) + { + list($type, $value) = explode( ":", trim($bit) ); + + $type = trim($type); + + $value = trim($value); + + if ($type != "" and $value != "") + { + $extra = ""; + + if ($type == 'color' or $type == 'background-color') + { + $extra = "   "; + } + + $def_output .= "$type$value $extra\n"; + } + } + + $css = "\n"; + + $html = " + + CSS Preview + $css + + + + + + +
    Preview CSS Element '$name'
    From style sheet '{$this_set['set_name']}'
    +
    + + + + + + + +
    Preview
    Cozy Lummux Gives Smart Squid Who Asks For Job Pen ([Indeed!])
    +
    + + + + + $def_output +
    Formatted CSS Definition
    + + + "; + + print $html; + + exit(); + + } + + //----------------------------------------- + //--------------------------------------- + + function print_css_searchlinks() + { + //----------------------------------------- + // GET THE TEMPLATES THAT THIS CSS USES + //----------------------------------------- + + $element = trim(stripslashes($_GET['element'])); + + $this->ipsclass->input['id'] = intval( $this->ipsclass->input['id'] ); + + list($type, $name) = explode( "|", $element ); + + $like = "class=_{$name}"; + + if ($type == 'id') + { + $like = "id=_{$name}"; + } + + require ROOT_PATH .'sources/lib/skin_info.php'; + + //die("SELECT suid, set_id, group_name, func_name FROM ibf_skin_templates WHERE set_id='".$set['tmpl_id']."' AND section_content LIKE '%".$like."%' ORDER BY group_name"); + + $this->ipsclass->DB->build_query( array( 'select' => 'suid, set_id, group_name, func_name', 'from' => 'skin_templates', 'where' => "set_id IN (1,".$this->ipsclass->input['id'].") AND section_content LIKE '%".$like."%'", 'order' => 'group_name' ) ); + $this->ipsclass->DB->exec_query(); + + if (! $this->ipsclass->DB->get_num_rows() ) + { + $this->do_message("No matches for that string in template set ID {$set['set_id']}"); + } + + $results = array(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + if ( ! isset($result[ $r['group_name'] ]) ) + { + $result[ $r['group_name'] ] = array(); + } + + $result[ $r['group_name'] ][ $r['func_name'] ] = array( 'suid' => $r['suid'], 'func_name' => $r['func_name'] ); + + } + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table(); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Search Results" ) , 'title' ); + + foreach( $result as $group_name => $sub_array ) + { + if ( isset($skin_names[ $group_name ]) ) + { + $group_name = $skin_names[ $group_name ][0]; + } + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "$group_name" ) , 'catrow' ); + + if (is_array($sub_array) and count($sub_array) > 0 ) + { + foreach( $sub_array as $data ) + { + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "+ {$data['func_name']}" ) ); + } + } + } + + + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + $this->ipsclass->admin->print_popup(); + + } + + /*-------------------------------------------------------------------------*/ + // PRINT THE SEARCH RESULT LINKS + /*-------------------------------------------------------------------------*/ + + function print_searchlinks() + { + //----------------------------------------- + // Printing no results? + //----------------------------------------- + + if ($this->ipsclass->input['bypass'] == 1) + { + $this->do_message("No Search Results"); + } + + //----------------------------------------- + // Clean up search post + //----------------------------------------- + + $search_text = trim($this->unconvert_tags(stripslashes($_POST['search']))); + + $search_text = str_replace( "\$", "\\$", $search_text); + $search_text = str_replace( "'" , "\\'", $search_text); + + if ($search_text == "") + { + $this->do_message("Please enter a string to search"); + } + + require ROOT_PATH .'sources/lib/skin_info.php'; + + //----------------------------------------- + // Get template bits + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => 'suid, set_id, group_name, func_name', 'from' => 'skin_templates', 'where' => "set_id=".$this->ipsclass->input['set_id']." AND section_content LIKE '%$search_text%'", 'order' => 'group_name' ) ); + $this->ipsclass->DB->exec_query(); + + if ( ! $this->ipsclass->DB->get_num_rows() ) + { + $this->do_message("No matches for that string"); + } + + $results = array(); + + //----------------------------------------- + // Loop.. + //----------------------------------------- + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + if ( ! isset($result[ $r['group_name'] ]) ) + { + $result[ $r['group_name'] ] = array(); + } + + $result[ $r['group_name'] ][] = array( 'suid' => $r['suid'], 'func_name' => $r['func_name'] ); + + } + + //----------------------------------------- + // Print.. + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table(); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Search Results" ) , 'title' ); + + foreach( $result as $group_name => $sub_array ) + { + if ( isset($skin_names[ $group_name ]) ) + { + $group_name = $skin_names[ $group_name ][0]; + } + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "$group_name" ) , 'catrow' ); + + if (is_array($sub_array) and count($sub_array) > 0 ) + { + foreach( $sub_array as $data ) + { + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "+ ipsclass->input['set_id']}&type=text&hl=".urlencode(stripslashes($_POST['search']))."' target='preview'>{$data['func_name']}" ) ); + } + } + } + + //----------------------------------------- + // Done.. + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + $this->ipsclass->admin->print_popup(); + + } + + //----------------------------------------- + + function do_message($message="") + { + $this->ipsclass->html = "

    $message

     "; + + $this->ipsclass->admin->print_popup(); + + } + + //----------------------------------------- + + function print_search_box() + { + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'searchlinks' ), + 2 => array( 'act' , 'rtempl' ), + 3 => array( 'set_id', $this->ipsclass->input['set_id'] ) + ) ,'theform', 'target="links"' ); + + //----------------------------------------- + + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Enter text to search for
    ". + $this->ipsclass->adskin->form_input( 'search' ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Search!"); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + $this->ipsclass->admin->print_popup(); + + } + + //----------------------------------------- + + function search_frames() + { + $this->ipsclass->boink_it( $this->ipsclass->base_url.'§ion=lookandfeel&act=skintools&code=searchsplash' ); + + + exit(); + print " + Search + + + + + + + + "; + + exit(); + } + + //----------------------------------------- + + function compare_frames() + { + print " + + Compare + + + + + + + + + + + + "; + + exit(); + } + + //----------------------------------------- + + function print_compare_top() + { + $content = $this->ipsclass->input['content'] == 'orig' ? 'Original Template' : 'Current Template'; + + print " + +
    $content
    + "; + + exit(); + } + + //----------------------------------------- + + function print_compare_new() + { + $template = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_templates', 'where' => "suid=".intval($this->ipsclass->input['suid']) ) ); + + if ( ! $template['suid'] ) + { + $this->ipsclass->admin->error("You must specify an existing template set ID, go back and try again"); + } + + $skin = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.$template['set_id'] ) ); + + $css = $skin['set_cache_css']; + + $css_text = "\n"; + + print " + $css_text + + + + + + "; + + exit(); + + + } + + //----------------------------------------- + + function macro_one($msg="") + { + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'macro_two' ), + 2 => array( 'act' , 'rtempl' ), + 3 => array( 'suid' , $this->ipsclass->input['suid'] ) + ) ); + + //----------------------------------------- + + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Macro Look-up" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Enter the Macro to look up
    (EG: {ibf.skin.set_image_dir})", + $this->ipsclass->adskin->form_input( 'lookup', $this->ipsclass->input['lookup'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Look-up"); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + $this->ipsclass->admin->print_popup(); + + } + + //----------------------------------------- + + function macro_two() + { + if ($this->ipsclass->input['lookup'] == "") + { + $this->ipsclass->admin->error("You must enter a macro to look up", 1); + } + + $is_valid = 0; + $macro = ""; + $extra = ""; + + if ( preg_match( "/<\{(\S+)\}>/", $this->ipsclass->input['lookup'], $match ) ) + { + $is_valid = 1; + $macro = $match[1]; + } + + else if ( preg_match( "/{?(?:ibf|ipb)\.(skin|lang|vars|member)(.+?)}?$/", $this->ipsclass->input['lookup'], $match ) ) + { + $is_valid = 1; + $macro = $match[2]; + $extra = $match[1]; + $macro = str_replace( "'", "'", $macro ); + $macro = preg_replace( "#[\[\]\"'\.]#", "", $macro ); + } + else + { + $is_valid = 0; + } + + if ($is_valid != 1) + { + $this->macro_one("Wrong format"); + } + + if ($extra != "") + { + if ($extra == 'member') + { + if (isset($this->ipsclass->member[$macro])) + { + if ($this->ipsclass->member[$macro] == "") + { + $answer = ""; + } + else + { + $answer = $this->ipsclass->member[$macro]; + } + } + $result = "Loaded Member Information"; + } + else if ($extra == 'vars') + { + //----------------------------------------- + // Filter out sensitive stuff + //----------------------------------------- + + $safe_INFO['board_name'] = $this->ipsclass->vars['board_name']; + $safe_INFO['board_url'] = $this->ipsclass->vars['board_url']; + + $answer = $safe_INFO[$macro]; + + $result = "Config Variable Information (May be protected)"; + } + else if ($extra == 'lang') + { + $result = "Language Text"; + + $this->ipsclass->DB->simple_construct( array( 'select' => 'group_name', 'from' => 'skin_templates', 'where' => "suid='{$this->ipsclass->input['suid']}'" ) ); + $this->ipsclass->DB->simple_exec(); + + if ( $r = $this->ipsclass->DB->fetch_row() ) + { + $filename = preg_replace( "/^skin_/", "lang_", $r['group_name'] ); + + if ( @file_exists( ROOT_PATH. "cache/lang_cache/en/$filename".".php" ) ) + { + require ROOT_PATH. "cache/lang_cache/en/$filename".".php"; + + $answer = $lang[$macro]; + } + } + } + } + else + { + //----------------------------------------- + // Is macro + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 'set_id', 'from' => 'skin_templates', 'where' => "suid='{$this->ipsclass->input['suid']}'" ) ); + $this->ipsclass->DB->simple_exec(); + + $template = $this->ipsclass->DB->fetch_row(); + + $this->ipsclass->DB->simple_construct( array( 'select' => 'macro_value, macro_replace', + 'from' => 'skin_macro', + 'where' => "macro_set IN( 1,{$template['set_id']}) AND macro_value='$macro'", + 'order' => "macro_set DESC" ) ); + $this->ipsclass->DB->simple_exec(); + + if ($val = $this->ipsclass->DB->fetch_row()) + { + $answer = htmlentities($val['macro_replace']); + $result = "From Macro Set"; + } + else + { + $answer = "Macro not found"; + } + } + + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Macro Look-up Result Go Again" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Entered Macro", $this->ipsclass->input['lookup'] ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Macro Type", $result ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Result
    May be blank if no info", $answer ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + $this->ipsclass->admin->print_popup(); + + + + } + + /*-------------------------------------------------------------------------*/ + // SHOW PREVIEW + /*-------------------------------------------------------------------------*/ + + function do_preview() + { + //----------------------------------------- + // Check... + //----------------------------------------- + + if ($this->ipsclass->input['suid'] == "") + { + $this->ipsclass->admin->error("You must specify an existing template set ID, go back and try again"); + } + + //----------------------------------------- + // Get from DB + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_templates', 'where' => "suid='".$this->ipsclass->input['suid']."'" ) ); + $this->ipsclass->DB->simple_exec(); + + if ( ! $template = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->admin->error("You must specify an existing template set ID, go back and try again"); + } + + //----------------------------------------- + // Get skin set details + //----------------------------------------- + + $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.$template['set_id'] ) ); + + $macros = unserialize(stripslashes($this_set['set_cache_macro'])); + + if ( is_array($macros) and count($macros) ) + { + foreach( $macros as $mc ) + { + $macro_orig[] = "<{".$mc['macro_value']."}>"; + $macro_repl[] = $mc['macro_replace']; + } + } + + $table = " + + + + + + +
    Template Group: {$template['group_name']} : Template bit: {$template['func_name']}
    View as [ Text | HTML | HTML with CSS ]
    +

    + "; + + if ($this->ipsclass->input['type'] == 'text') + { + @header("Content-type: text/html; charset={$this->ipsclass->vars['gb_char_set']}"); + print $table; + $html = $this->convert_tags($template['section_content']); + + $html = str_replace( "<" , "<" , $html); + $html = str_replace( ">" , ">" , $html); + $html = str_replace( "\"", """, $html); + + if ($_GET['hl'] != "") + { + $hl = str_replace( '{-22-}', '"', urldecode(stripslashes($_GET['hl'])) ); + + $hl = str_replace( "<" , "<" , $hl); + $hl = str_replace( ">" , ">" , $hl); + $hl = str_replace( "\"", """, $hl); + + $html = str_replace( $hl, "$hl", $html ); + } + + $html = preg_replace( "!<\!--(.+?)(//)?-->!s" , "<!--\\1--\\2>", $html ); + $html = preg_replace( "#<([^&<>]+)>#s" , "<\\1>" , $html ); //Matches + $html = preg_replace( "#<([^&<>]+)=#s" , "<\\1=" , $html ); //Matches \\1>" , $html ); //Matches + $html = preg_replace( "!=("|')([^<>])("|')(\s|>)!s" , "=\\1\\2\\3\\4" , $html ); //Matches ='this' + + $html = str_replace( "\n", "
    ", str_replace("\r\n", "\n", $html ) ); + + print "
    ".$html."
    "; + exit(); + + } + else if ($this->ipsclass->input['type'] == 'html') + { + @header("Content-type: text/html; charset={$this->ipsclass->vars['gb_char_set']}"); + print $table; + print $this->convert_tags($template['section_content']); + + exit(); + } + else if($this->ipsclass->input['type'] == 'css') + { + $css = $this_set['set_cache_css']; + + $css_text = "\n"; + + @header("Content-type: text/html; charset={$this->ipsclass->vars['gb_char_set']}"); + print "Preview$css_text$table \n"; + print str_replace( $macro_orig, $macro_repl, $this->convert_tags($template['section_content']) ); + + exit(); + + } + + + + } + + + //----------------------------------------- + + + + function convert_tags($t="") + { + if ($t == "") + { + return ""; + } + + $t = preg_replace( "/{?\\\$this->ipsclass->base_url}?/" , "{ibf.script_url}" , $t ); + $t = preg_replace( "/{?\\\$this->ipsclass->session_id}?/" , "{ibf.session_id}" , $t ); + $t = preg_replace( "/{?\\\$this->ipsclass->skin\['?(\w+)'?\]}?/" , "{ibf.skin.\\1}" , $t ); + $t = preg_replace( "/{?\\\$this->ipsclass->lang\['?(\w+)'?\]}?/" , "{ibf.lang.\\1}" , $t ); + $t = preg_replace( "/{?\\\$this->ipsclass->vars\['?(\w+)'?\]}?/" , "{ibf.vars.\\1}" , $t ); + $t = preg_replace( "/{?\\\$this->ipsclass->member\['?(\w+)'?\]}?/" , "{ibf.member.\\1}" , $t ); + + return $t; + + } + + function unconvert_tags($t="") + { + if ($t == "") + { + return ""; + } + + $t = preg_replace( "/{ibf\.script_url}/i" , '{$this->ipsclass->base_url}' , $t); + $t = preg_replace( "/{ibf\.session_id}/i" , '{$this->ipsclass->session_id}' , $t); + $t = preg_replace( "/{ibf\.skin\.(\w+)}/" , '{$this->ipsclass->skin[\''."\\1".'\']}' , $t); + $t = preg_replace( "/{ibf\.lang\.(\w+)}/" , '{$this->ipsclass->lang[\''."\\1".'\']}' , $t); + $t = preg_replace( "/{ibf\.vars\.(\w+)}/" , '{$this->ipsclass->vars[\''."\\1".'\']}' , $t); + $t = preg_replace( "/{ibf\.member\.(\w+)}/" , '{$this->ipsclass->member[\''."\\1".'\']}' , $t); + + return $t; + + } + + +} + + ?> \ No newline at end of file diff --git a/upload/sources/action_admin/rssexport.php b/upload/sources/action_admin/rssexport.php index e483a2e1..c89e96b0 100644 --- a/upload/sources/action_admin/rssexport.php +++ b/upload/sources/action_admin/rssexport.php @@ -1,607 +1,585 @@ - $Date: 2006-11-14 14:11:11 -0600 (Tue, 14 Nov 2006) $ -| > $Revision: 729 $ -| > $Author: bfarber $ -+--------------------------------------------------------------------------- -| -| > Components Functions -| > Module written by Matt Mecham -| > Date started: 12th April 2005 (13:09) -+-------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - -class ad_rssexport -{ - # Globals - var $ipsclass; - - var $perm_main = 'content'; - var $perm_child = 'rssexport'; - - var $use_sockets = 1; - - /*-------------------------------------------------------------------------*/ - // Main handler - /*-------------------------------------------------------------------------*/ - - function auto_run() - { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'RSS Export Manager' ); - $this->html = $this->ipsclass->acp_load_template('cp_skin_rss'); - - switch($this->ipsclass->input['code']) - { - case 'rssexport_overview': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->rssexport_overview(); - break; - - case 'rssexport_add': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); - $this->rssexport_form('add'); - break; - - case 'rssexport_edit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->rssexport_form('edit'); - break; - - case 'rssexport_add_save': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); - $this->rssexport_save('add'); - break; - - case 'rssexport_edit_save': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->rssexport_save('edit'); - break; - - case 'rssexport_recache': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recache' ); - $this->rssexport_rebuild_cache(); - break; - - case 'rssexport_delete': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); - $this->rssexport_delete(); - break; - - default: - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->rssexport_overview(); - break; - } - } - - /*-------------------------------------------------------------------------*/ - // RSS Export: Rebuild cache - /*-------------------------------------------------------------------------*/ - - function rssexport_rebuild_cache( $rss_export_id='', $return=1 ) - { - //-------------------------------------------- - // INIT - //-------------------------------------------- - - if ( ! $rss_export_id ) - { - $rss_export_id = $this->ipsclass->input['rss_export_id'] == 'all' ? 'all' : intval($this->ipsclass->input['rss_export_id']); - } - - //-------------------------------------------- - // Check - //-------------------------------------------- - - if ( ! $rss_export_id ) - { - $this->ipsclass->main_msg = "Не один ID не выбран, повторите попытку заново "; - $this->rssexport_overview(); - return; - } - - //-------------------------------------------- - // Require classes - //-------------------------------------------- - - require_once( KERNEL_PATH . 'class_rss.php' ); - $class_rss = new class_rss(); - $class_rss->ipsclass =& $this->ipsclass; - $class_rss->use_sockets = $this->use_sockets; - $class_rss->doc_type = $this->ipsclass->vars['gb_char_set']; - - //----------------------------------------- - // Load and config the post parser - // and load up the editor for the custom - // bbcode parsing - //----------------------------------------- - - require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); - $this->parser = new parse_bbcode(); - $this->parser->ipsclass = $this->ipsclass; - $this->parser->allow_update_caches = 1; - $this->parser->bypass_badwords = 0; - - //-------------------------------------------- - // Reset rss_export cache - //-------------------------------------------- - - $this->ipsclass->cache['rss_export'] = array(); - - //-------------------------------------------- - // Load skin - //-------------------------------------------- - - $this->ipsclass->load_skin(); - - //-------------------------------------------- - // Go loopy - //-------------------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'rss_export' ) ); - $outer = $this->ipsclass->DB->exec_query(); - - while( $row = $this->ipsclass->DB->fetch_row( $outer ) ) - { - //-------------------------------------------- - // Update RSS cache - //-------------------------------------------- - - if ( $row['rss_export_enabled'] ) - { - $this->ipsclass->cache['rss_export'][] = array( 'url' => $this->ipsclass->vars['board_url'].'/index.php?act=rssout&id='.$row['rss_export_id'], - 'title' => $row['rss_export_title'] ); - } - - if ( $rss_export_id == 'all' OR $row['rss_export_id'] == $rss_export_id ) - { - //-------------------------------------------- - // Build DB query - //-------------------------------------------- - - if ( $row['rss_export_include_post'] ) - { - $this->ipsclass->DB->build_query( array( 'select' => 't.*', - 'from' => array( 'topics' => 't' ), - 'where' => "t.forum_id IN( ".$row['rss_export_forums']." ) AND t.state != 'link' AND t.approved=1", - 'order' => 't.'.$row['rss_export_order'].' '. $row['rss_export_sort'], - 'limit' => array( 0, $row['rss_export_count'] ), - 'add_join' => array( 0 => array( 'select' => 'p.post', - 'from' => array( 'posts' => 'p' ), - 'where' => 't.topic_firstpost=p.pid', - 'type' => 'left' - ) ) - ) ); - } - else - { - $this->ipsclass->DB->build_query( array( 'select' => '*', - 'from' => 'topics', - 'where' => 'forum_id IN( '.$row['rss_export_forums'].' ) AND state != "link" AND approved=1', - 'order' => $row['rss_export_order'].' '. $row['rss_export_sort'], - 'limit' => array( 0, $row['rss_export_count'] ) - ) ); - } - - //-------------------------------------------- - // Exec Query - //-------------------------------------------- - - $inner = $this->ipsclass->DB->exec_query(); - - //-------------------------------------------- - // Create Channel - //-------------------------------------------- - - $channel_id = $class_rss->create_add_channel( array( 'title' => $row['rss_export_title'], - 'description' => $row['rss_export_desc'], - 'link' => $this->ipsclass->vars['board_url'].'/index.php', - 'pubDate' => $class_rss->rss_unix_to_rfc( time() ), - 'ttl' => $row['rss_export_cache_time'] - ) ); - - $class_rss->create_add_image( $channel_id, array( 'title' => $row['rss_export_title'], - 'url' => $row['rss_export_image'], - 'link' => $this->ipsclass->vars['board_url'].'/index.php' ) ); - - //-------------------------------------------- - // Loop through topics and display - //-------------------------------------------- - - while( $topic = $this->ipsclass->DB->fetch_row( $inner ) ) - { - //-------------------------------------------- - // Parse... - //-------------------------------------------- - - $this->parser->parse_html = 0; - $this->parser->parse_nl2br = 1; - - //$topic['post'] = $this->parser->pre_db_parse( $topic['post'] ); - $topic['post'] = $this->parser->pre_display_parse( $topic['post'] ); - - $topic['post'] = preg_replace( "#\[attachment=(\d+?)\:(?:[^\]]+?)\]#is", "".$this->ipsclass->vars['board_url']."/index.php?act=attach&type=post&id=\\1", $topic['post'] ); - - //----------------------------------------- - // Get the macros and replace them - //----------------------------------------- - - if ( is_array( $this->ipsclass->skin['_macros'] ) ) - { - foreach( $this->ipsclass->skin['_macros'] as $rowm ) - { - if ( isset($row['macro_value']) AND $row['macro_value'] != "" ) - { - $topic['post'] = str_replace( "<{".$rowm['macro_value']."}>", $rowm['macro_replace'], $topic['post'] ); - } - } - } - - //----------------------------------------- - // Fix up relative URLS - //----------------------------------------- - - $topic['post'] = preg_replace( "#([^/])style_images/(<\#IMG_DIR\#>)#is", "\\1".$this->ipsclass->vars['board_url']."/style_images/\\2" , $topic['post'] ); - $topic['post'] = preg_replace( "#([\"'])style_emoticons/#is" , "\\1".$this->ipsclass->vars['board_url']."/style_emoticons/", $topic['post'] ); - - //----------------------------------------- - // Convert smilies and emos - //----------------------------------------- - - $topic['post'] = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $topic['post'] ); - $topic['post'] = str_replace( "<#EMO_DIR#>", $this->ipsclass->skin['_emodir'] , $topic['post'] ); - - $topic['last_poster_name'] = $topic['last_poster_name'] ? $topic['last_poster_name'] : 'Гость'; - $topic['starter_name'] = $topic['starter_name'] ? $topic['starter_name'] : 'Гость'; - - //----------------------------------------- - // Add item - //----------------------------------------- - - $class_rss->create_add_item( $channel_id, array( 'title' => $topic['title'], - 'link' => $this->ipsclass->vars['board_url'].'/index.php?showtopic='.$topic['tid'], - 'description' => $topic['post'],//$topic['description'], - // 'content:encoded' => $topic['post'], - 'starter' => $topic['starter_name'], - 'poster' => $topic['last_poster_name'], - 'pubDate' => $class_rss->rss_unix_to_rfc( $topic['start_date'] ), - 'guid' => $topic['tid'] - ) ); - } - - //-------------------------------------------- - // Build document - //-------------------------------------------- - - $class_rss->rss_create_document(); - - //-------------------------------------------- - // Update the cache - //-------------------------------------------- - - $this->ipsclass->DB->do_update( 'rss_export', array( 'rss_export_cache_last' => time(), - 'rss_export_cache_content' => $class_rss->rss_document ), 'rss_export_id='.$row['rss_export_id'] ); - } - } - - //header( "Content-type: text/plain"); - //print $class_rss->rss_document; exit(); - - //-------------------------------------------- - // Update cache - //-------------------------------------------- - - $this->ipsclass->update_cache( array( 'name' => 'rss_export', 'deletefirst' => 1, 'donow' => 1, 'array' => 1 ) ); - - //-------------------------------------------- - // Return - //-------------------------------------------- - - if ( $return ) - { - $this->ipsclass->main_msg = "Экспорт RSS, кеш пересчитан"; - $this->rssexport_overview(); - return; - } - else - { - return $class_rss->rss_document; - } - } - - /*-------------------------------------------------------------------------*/ - // RSS Export: Delete - /*-------------------------------------------------------------------------*/ - - function rssexport_delete() - { - //-------------------------------------------- - // INIT - //-------------------------------------------- - - $rss_export_id = intval($this->ipsclass->input['rss_export_id']); - - //-------------------------------------------- - // Load RSS stream - //-------------------------------------------- - - $rssstream = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'rss_export', 'where' => "rss_export_id=$rss_export_id" ) ); - - if ( ! $rssstream['rss_export_id'] ) - { - $this->ipsclass->main_msg = "Невозможно загрузить строку RSS из базы данных. Возможно ее просто нет."; - $this->rssexport_overview(); - return; - } - - //-------------------------------------------- - // Remove it - //-------------------------------------------- - - $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'rss_export', 'where' => 'rss_export_id='.$rss_export_id ) ); - - $this->rssexport_rebuild_cache( $rss_export_id, 0 ); - $this->ipsclass->main_msg = "Экспорт RSS строки удален."; - $this->rssexport_overview(); - } - - /*-------------------------------------------------------------------------*/ - // RSS Export: Save - /*-------------------------------------------------------------------------*/ - - function rssexport_save($type='add') - { - //-------------------------------------------- - // INIT - //-------------------------------------------- - - $rss_export_id = intval($this->ipsclass->input['rss_export_id']); - $rss_export_title = $this->ipsclass->txt_UNhtmlspecialchars( trim( $this->ipsclass->input['rss_export_title'] ) ); - $rss_export_desc = $this->ipsclass->txt_UNhtmlspecialchars( trim( $this->ipsclass->input['rss_export_desc'] ) ); - $rss_export_image = $this->ipsclass->txt_UNhtmlspecialchars( trim( $this->ipsclass->input['rss_export_image'] ) ); - $rss_export_forums = is_array($_POST['rss_export_forums']) ? implode( ",", $_POST['rss_export_forums'] ) : ''; - $rss_export_include_post = intval($this->ipsclass->input['rss_export_include_post']); - $rss_export_count = intval($this->ipsclass->input['rss_export_count']); - $rss_export_cache_time = intval($this->ipsclass->input['rss_export_cache_time']); - $rss_export_enabled = intval($this->ipsclass->input['rss_export_enabled']); - $rss_export_sort = trim( $this->ipsclass->input['rss_export_sort'] ); - $rss_export_order = trim( $this->ipsclass->input['rss_export_order'] ); - - //-------------------------------------------- - // Checks... - //-------------------------------------------- - - if ( $type == 'edit' ) - { - if ( ! $rss_export_id ) - { - $this->ipsclass->main_msg = "Не один ID не выбран, повторите попытку заново "; - $this->rssexport_overview(); - return; - } - } - - if ( ! $rss_export_title OR ! $rss_export_count OR ! $rss_export_forums ) - { - $this->ipsclass->main_msg = "Вы должны заполнить все поля."; - $this->rssexport_form( $type ); - return; - } - - //-------------------------------------------- - // Save... - //-------------------------------------------- - - $array = array( - 'rss_export_enabled' => $rss_export_enabled, - 'rss_export_title' => $rss_export_title, - 'rss_export_desc' => $rss_export_desc, - 'rss_export_image' => $rss_export_image, - 'rss_export_forums' => $rss_export_forums, - 'rss_export_include_post' => $rss_export_include_post, - 'rss_export_count' => $rss_export_count, - 'rss_export_cache_time' => $rss_export_cache_time, - 'rss_export_order' => $rss_export_order, - 'rss_export_sort' => $rss_export_sort - ); - - if ( $type == 'add' ) - { - $this->ipsclass->DB->do_insert( 'rss_export', $array ); - $rss_export_id = 'all'; - $this->ipsclass->main_msg = 'Строка экспорта RSS создана'; - } - else - { - - $this->ipsclass->DB->do_update( 'rss_export', $array, 'rss_export_id='.$rss_export_id ); - $this->ipsclass->main_msg = 'Строка экспорта RSS изменена'; - } - - $this->rssexport_rebuild_cache( $rss_export_id, 0 ); - - $this->rssexport_overview(); - } - - /*-------------------------------------------------------------------------*/ - // RSS Export: Form - /*-------------------------------------------------------------------------*/ - - function rssexport_form( $type='add' ) - { - //----------------------------------------- - // Init Vars - //----------------------------------------- - - $rss_export_id = isset($this->ipsclass->input['rss_export_id']) ? intval($this->ipsclass->input['rss_export_id']) : 0; - $dd_sort = array( 0 => array( 'DESC', 'По убыванию (9-0)' ), 1 => array( 'ASC', 'По возрастанию (0-9)' ) ); - $dd_order = array( 0 => array( 'start_date' , 'По дате создания темы' ), - 1 => array( 'last_post' , 'По последнему сообщению' ), - 2 => array( 'views' , 'По кол-ву просмотров' ), - 3 => array( 'starter_id' , 'По последнему автору' ), - 4 => array( 'topic_rating_total', 'По рейтингу' ) ); - - //----------------------------------------- - // Check (please?) - //----------------------------------------- - - if ( $type == 'add' ) - { - $formcode = 'rssexport_add_save'; - $title = "Создание нового потока RSS экспорта"; - $button = "Создать"; - - $rssstream = array( 'rss_export_id' => 0, - 'rss_export_title' => '', - 'rss_export_forums' => NULL, - 'rss_export_desc' => '', - 'rss_export_image' => '', - 'rss_export_include_post' => 1, - 'rss_export_enabled' => 1, - 'rss_export_count' => '', - 'rss_export_cache_time' => '', - 'rss_export_sort' => '', - 'rss_export_order' => '' ); - } - else - { - $rssstream = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'rss_export', 'where' => 'rss_export_id='.$rss_export_id ) ); - - if ( ! $rssstream['rss_export_id'] ) - { - $this->ipsclass->main_msg = "Не один ID не выбран, повторите попытку заново."; - $this->rssexport_overview(); - return; - } - - $formcode = 'rssexport_edit_save'; - $title = "Редактирование ".$rssstream['rss_export_title']; - $button = "Сохранить изменения"; - } - - //------------------------------- - // Build forums multi-chooser - //------------------------------- - - $this->ipsclass->forums->forums_init(); - - require_once( ROOT_PATH.'sources/lib/admin_forum_functions.php' ); - $aff = new admin_forum_functions(); - $aff->ipsclass =& $this->ipsclass; - $dropdown = $aff->ad_forums_forum_list(1); - $rss_export_forums = ( isset($_POST['rss_export_forums']) AND is_array($_POST['rss_export_forums']) ) ? implode( ",", $_POST['rss_export_forums'] ) : $rssstream['rss_export_forums']; - - //------------------------------- - // Form elements - //------------------------------- - - $form = array(); - - $form['rss_export_title'] = $this->ipsclass->adskin->form_input( 'rss_export_title' , $this->ipsclass->txt_htmlspecialchars( ( isset($_POST['rss_export_title']) AND $_POST['rss_export_title'] ) ? $_POST['rss_export_title'] : $rssstream['rss_export_title'] ) ); - $form['rss_export_desc'] = $this->ipsclass->adskin->form_input( 'rss_export_desc' , $this->ipsclass->txt_htmlspecialchars( ( isset($_POST['rss_export_desc']) AND $_POST['rss_export_desc'] ) ? $_POST['rss_export_desc'] : $rssstream['rss_export_desc'] ) ); - $form['rss_export_image'] = $this->ipsclass->adskin->form_input( 'rss_export_image' , $this->ipsclass->txt_htmlspecialchars( ( isset($_POST['rss_export_image']) AND $_POST['rss_export_image'] ) ? $_POST['rss_export_image'] : $rssstream['rss_export_image'] ) ); - $form['rss_export_include_post'] = $this->ipsclass->adskin->form_yes_no( 'rss_export_include_post' , ( isset($_POST['rss_export_include_post']) AND $_POST['rss_export_include_post'] ) ? $_POST['rss_export_include_post'] : $rssstream['rss_export_include_post'] ); - $form['rss_export_enabled'] = $this->ipsclass->adskin->form_yes_no( 'rss_export_enabled' , ( isset($_POST['rss_export_enabled']) AND $_POST['rss_export_enabled'] ) ? $_POST['rss_export_enabled'] : $rssstream['rss_export_enabled'] ); - $form['rss_export_count'] = $this->ipsclass->adskin->form_simple_input( 'rss_export_count' , ( isset($_POST['rss_export_count']) AND $_POST['rss_export_count'] ) ? $_POST['rss_export_count'] : $rssstream['rss_export_count'], 5 ); - $form['rss_export_forums'] = $this->ipsclass->adskin->form_multiselect( 'rss_export_forums[]', $dropdown, explode( ",", $rss_export_forums ), 7 ); - $form['rss_export_cache_time'] = $this->ipsclass->adskin->form_simple_input( 'rss_export_cache_time' , ( isset($_POST['rss_export_cache_time']) AND $_POST['rss_export_cache_time'] ) ? $_POST['rss_export_cache_time'] : $rssstream['rss_export_cache_time'], 5 ); - $form['rss_export_sort'] = $this->ipsclass->adskin->form_dropdown( 'rss_export_sort' , $dd_sort , ( isset($_POST['rss_export_sort']) AND $_POST['rss_export_sort'] ) ? $_POST['rss_export_sort'] : $rssstream['rss_export_sort'] ); - $form['rss_export_order'] = $this->ipsclass->adskin->form_dropdown( 'rss_export_order', $dd_order, ( isset($_POST['rss_export_order']) AND $_POST['rss_export_order'] ) ? $_POST['rss_export_order'] : $rssstream['rss_export_order'] ); - - $this->ipsclass->html .= $this->html->rss_export_form( $form, $title, $formcode, $button, $rssstream ); - - $this->ipsclass->admin->page_title = "Управление экспорта RSS"; - $this->ipsclass->admin->page_detail = "Эта секция позволяет вам управлять потоками RSS."; - - $this->ipsclass->admin->nav[] = array( '', "Добавление или изменение потока RSS экспорта" ); - $this->ipsclass->admin->output(); - } - - /*-------------------------------------------------------------------------*/ - // List current RSS exports - /*-------------------------------------------------------------------------*/ - - function rssexport_overview() - { - //------------------------------- - // INIT - //------------------------------- - - $content = ""; - $rows = array(); - - $st = intval($this->ipsclass->input['st']) > 0 ? intval($this->ipsclass->input['st']) : 0; - - //------------------------------- - // Get feed count - //------------------------------- - - $num = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'count(*) as row_count', 'from' => 'rss_import' ) ); - - $page_links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $num['row_count'], - 'PER_PAGE' => 25, - 'CUR_ST_VAL' => $st, - 'L_SINGLE' => "", - 'L_MULTI' => "Страницы: ", - 'BASE_URL' => $this->ipsclass->base_url."&{$this->ipsclass->form_code}", - ) - ); - - //------------------------------- - // Get feeds - //------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'rss_export', 'order' => 'rss_export_id ASC' ) ); - $this->ipsclass->DB->simple_exec(); - - while( $r = $this->ipsclass->DB->fetch_row() ) - { - //------------------------------- - // (Alex) Cross - //------------------------------- - - $r['_enabled_img'] = $r['rss_export_enabled'] ? 'aff_tick.png' : 'aff_cross.png'; - - $content .= $this->html->rss_export_overview_row($r); - } - - $this->ipsclass->html .= $this->html->rss_export_overview( $content, $page_links ); - - $this->ipsclass->admin->page_title = "Управление RSS"; - $this->ipsclass->admin->page_detail = "Эта секция позволяет вам управлять полями RSS."; - $this->ipsclass->admin->output(); - } - - - - - -} - - + $Date: 2007-09-28 10:16:54 -0400 (Fri, 28 Sep 2007) $ +| > $Revision: 1117 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > Components Functions +| > Module written by Matt Mecham +| > Date started: 12th April 2005 (13:09) ++-------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class ad_rssexport +{ + # Globals + var $ipsclass; + + var $perm_main = 'content'; + var $perm_child = 'rssexport'; + + var $use_sockets = 1; + + /*-------------------------------------------------------------------------*/ + // Main handler + /*-------------------------------------------------------------------------*/ + + function auto_run() + { + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'RSS Export Manager' ); + $this->html = $this->ipsclass->acp_load_template('cp_skin_rss'); + + switch($this->ipsclass->input['code']) + { + case 'rssexport_overview': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->rssexport_overview(); + break; + + case 'rssexport_add': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); + $this->rssexport_form('add'); + break; + + case 'rssexport_edit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->rssexport_form('edit'); + break; + + case 'rssexport_add_save': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); + $this->rssexport_save('add'); + break; + + case 'rssexport_edit_save': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->rssexport_save('edit'); + break; + + case 'rssexport_recache': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recache' ); + $this->rssexport_rebuild_cache(); + break; + + case 'rssexport_delete': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); + $this->rssexport_delete(); + break; + + default: + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->rssexport_overview(); + break; + } + } + + /*-------------------------------------------------------------------------*/ + // RSS Export: Rebuild cache + /*-------------------------------------------------------------------------*/ + + function rssexport_rebuild_cache( $rss_export_id='', $return=1 ) + { + //-------------------------------------------- + // INIT + //-------------------------------------------- + + if ( ! $rss_export_id ) + { + $rss_export_id = $this->ipsclass->input['rss_export_id'] == 'all' ? 'all' : intval($this->ipsclass->input['rss_export_id']); + } + + //-------------------------------------------- + // Check + //-------------------------------------------- + + if ( ! $rss_export_id ) + { + $this->ipsclass->main_msg = "No ID was passed, please try again"; + $this->rssexport_overview(); + return; + } + + //-------------------------------------------- + // Require classes + //-------------------------------------------- + + require_once( KERNEL_PATH . 'class_rss.php' ); + $class_rss = new class_rss(); + $class_rss->ipsclass =& $this->ipsclass; + $class_rss->use_sockets = $this->use_sockets; + $class_rss->doc_type = $this->ipsclass->vars['gb_char_set']; + + //-------------------------------------------- + // Reset rss_export cache + //-------------------------------------------- + + $this->ipsclass->cache['rss_export'] = array(); + + //-------------------------------------------- + // Load skin + //-------------------------------------------- + + $this->ipsclass->load_skin(); + + //-------------------------------------------- + // Go loopy + //-------------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'rss_export' ) ); + $outer = $this->ipsclass->DB->exec_query(); + + while( $row = $this->ipsclass->DB->fetch_row( $outer ) ) + { + //-------------------------------------------- + // Update RSS cache + //-------------------------------------------- + + if ( $row['rss_export_enabled'] ) + { + $this->ipsclass->cache['rss_export'][] = array( 'url' => $this->ipsclass->vars['board_url'].'/index.php?act=rssout&id='.$row['rss_export_id'], + 'title' => $row['rss_export_title'] ); + } + + if ( $rss_export_id == 'all' OR $row['rss_export_id'] == $rss_export_id ) + { + //-------------------------------------------- + // Build DB query + //-------------------------------------------- + + if ( $row['rss_export_include_post'] ) + { + $this->ipsclass->DB->build_query( array( 'select' => 't.*', + 'from' => array( 'topics' => 't' ), + 'where' => "t.forum_id IN( ".$row['rss_export_forums']." ) AND t.state != 'link' AND t.approved=1", + 'order' => 't.'.$row['rss_export_order'].' '. $row['rss_export_sort'], + 'limit' => array( 0, $row['rss_export_count'] ), + 'add_join' => array( 0 => array( 'select' => 'p.post', + 'from' => array( 'posts' => 'p' ), + 'where' => 't.topic_firstpost=p.pid', + 'type' => 'left' + ) ) + ) ); + } + else + { + $this->ipsclass->DB->build_query( array( 'select' => '*', + 'from' => 'topics', + 'where' => "forum_id IN( ".$row['rss_export_forums']." ) AND state != 'link' AND approved=1", + 'order' => $row['rss_export_order'].' '. $row['rss_export_sort'], + 'limit' => array( 0, $row['rss_export_count'] ) + ) ); + } + + //-------------------------------------------- + // Exec Query + //-------------------------------------------- + + $inner = $this->ipsclass->DB->exec_query(); + + //-------------------------------------------- + // Create Channel + //-------------------------------------------- + + $channel_id = $class_rss->create_add_channel( array( 'title' => $row['rss_export_title'], + 'description' => $row['rss_export_desc'], + 'link' => $this->ipsclass->vars['board_url'].'/index.php', + 'pubDate' => $class_rss->rss_unix_to_rfc( time() ), + 'ttl' => $row['rss_export_cache_time'] + ) ); + + if( $row['rss_export_image'] ) + { + $class_rss->create_add_image( $channel_id, array( 'title' => $row['rss_export_title'], + 'url' => $row['rss_export_image'], + 'link' => $this->ipsclass->vars['board_url'].'/index.php' ) ); + } + + //-------------------------------------------- + // Loop through topics and display + //-------------------------------------------- + + while( $topic = $this->ipsclass->DB->fetch_row( $inner ) ) + { + //-------------------------------------------- + // Parse... + //-------------------------------------------- + + $topic['post'] = preg_replace( "#\[attachment=(\d+?)\:(?:[^\]]+?)\]#is", "".$this->ipsclass->vars['board_url']."/index.php?act=attach&type=post&id=\\1", $topic['post'] ); + + //----------------------------------------- + // Get the macros and replace them + //----------------------------------------- + + if ( is_array( $this->ipsclass->skin['_macros'] ) ) + { + foreach( $this->ipsclass->skin['_macros'] as $rowm ) + { + if ( isset($row['macro_value']) AND $row['macro_value'] != "" ) + { + $topic['post'] = str_replace( "<{".$rowm['macro_value']."}>", $rowm['macro_replace'], $topic['post'] ); + } + } + } + + //----------------------------------------- + // Fix up relative URLS + //----------------------------------------- + + $topic['post'] = preg_replace( "#([^/])style_images/(<\#IMG_DIR\#>)#is", "\\1".$this->ipsclass->vars['board_url']."/style_images/\\2" , $topic['post'] ); + $topic['post'] = preg_replace( "#([\"'])style_emoticons/#is" , "\\1".$this->ipsclass->vars['board_url']."/style_emoticons/", $topic['post'] ); + + //----------------------------------------- + // Convert smilies and emos + //----------------------------------------- + + $topic['post'] = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $topic['post'] ); + $topic['post'] = str_replace( "<#EMO_DIR#>", $this->ipsclass->skin['_emodir'] , $topic['post'] ); + + $topic['last_poster_name'] = $topic['last_poster_name'] ? $topic['last_poster_name'] : 'Guest'; + $topic['starter_name'] = $topic['starter_name'] ? $topic['starter_name'] : 'Guest'; + + //----------------------------------------- + // Add item + //----------------------------------------- + + $class_rss->create_add_item( $channel_id, array( 'title' => $topic['title'], + 'link' => $this->ipsclass->vars['board_url'].'/index.php?showtopic='.$topic['tid'], + 'description' => $topic['post'],//$topic['description'], + // 'content:encoded' => $topic['post'], + //'starter' => $topic['starter_name'], + //'poster' => $topic['last_poster_name'], + 'pubDate' => $class_rss->rss_unix_to_rfc( $topic['start_date'] ), + //'lastPostDate' => $class_rss->rss_unix_to_rfc( $topic['last_post'] ), + 'guid' => $this->ipsclass->vars['board_url'] . '/index.php?showtopic=' . $topic['tid'] + ) ); + } + + //-------------------------------------------- + // Build document + //-------------------------------------------- + + $class_rss->rss_create_document(); + + //-------------------------------------------- + // Update the cache + //-------------------------------------------- + + $this->ipsclass->DB->do_update( 'rss_export', array( 'rss_export_cache_last' => time(), + 'rss_export_cache_content' => $class_rss->rss_document ), 'rss_export_id='.$row['rss_export_id'] ); + } + } + + //header( "Content-type: text/plain"); + //print $class_rss->rss_document; exit(); + + //-------------------------------------------- + // Update cache + //-------------------------------------------- + + $this->ipsclass->update_cache( array( 'name' => 'rss_export', 'deletefirst' => 1, 'donow' => 1, 'array' => 1 ) ); + + //-------------------------------------------- + // Return + //-------------------------------------------- + + if ( $return ) + { + $this->ipsclass->main_msg = "RSS Export(s) Re-cached"; + $this->rssexport_overview(); + return; + } + else + { + return $class_rss->rss_document; + } + } + + /*-------------------------------------------------------------------------*/ + // RSS Export: Delete + /*-------------------------------------------------------------------------*/ + + function rssexport_delete() + { + //-------------------------------------------- + // INIT + //-------------------------------------------- + + $rss_export_id = intval($this->ipsclass->input['rss_export_id']); + + //-------------------------------------------- + // Load RSS stream + //-------------------------------------------- + + $rssstream = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'rss_export', 'where' => "rss_export_id=$rss_export_id" ) ); + + if ( ! $rssstream['rss_export_id'] ) + { + $this->ipsclass->main_msg = "Could not load the RSS stream from the database. It maybe missing."; + $this->rssexport_overview(); + return; + } + + //-------------------------------------------- + // Remove it + //-------------------------------------------- + + $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'rss_export', 'where' => 'rss_export_id='.$rss_export_id ) ); + + $this->rssexport_rebuild_cache( $rss_export_id, 0 ); + $this->ipsclass->main_msg = "RSS Export stream removed."; + $this->rssexport_overview(); + } + + /*-------------------------------------------------------------------------*/ + // RSS Export: Save + /*-------------------------------------------------------------------------*/ + + function rssexport_save($type='add') + { + //-------------------------------------------- + // INIT + //-------------------------------------------- + + $rss_export_id = intval($this->ipsclass->input['rss_export_id']); + $rss_export_title = $this->ipsclass->txt_UNhtmlspecialchars( trim( $this->ipsclass->input['rss_export_title'] ) ); + $rss_export_desc = $this->ipsclass->txt_UNhtmlspecialchars( trim( $this->ipsclass->input['rss_export_desc'] ) ); + $rss_export_image = $this->ipsclass->txt_UNhtmlspecialchars( trim( $this->ipsclass->input['rss_export_image'] ) ); + $rss_export_forums = is_array($_POST['rss_export_forums']) ? implode( ",", $_POST['rss_export_forums'] ) : ''; + $rss_export_include_post = intval($this->ipsclass->input['rss_export_include_post']); + $rss_export_count = intval($this->ipsclass->input['rss_export_count']); + $rss_export_cache_time = intval($this->ipsclass->input['rss_export_cache_time']); + $rss_export_enabled = intval($this->ipsclass->input['rss_export_enabled']); + $rss_export_sort = trim( $this->ipsclass->input['rss_export_sort'] ); + $rss_export_order = trim( $this->ipsclass->input['rss_export_order'] ); + + //-------------------------------------------- + // Checks... + //-------------------------------------------- + + if ( $type == 'edit' ) + { + if ( ! $rss_export_id ) + { + $this->ipsclass->main_msg = "No ID was passed, please try again"; + $this->rssexport_overview(); + return; + } + } + + if ( ! $rss_export_title OR ! $rss_export_count OR ! $rss_export_forums ) + { + $this->ipsclass->main_msg = "You must complete the entire form."; + $this->rssexport_form( $type ); + return; + } + + //-------------------------------------------- + // Save... + //-------------------------------------------- + + $array = array( + 'rss_export_enabled' => $rss_export_enabled, + 'rss_export_title' => $rss_export_title, + 'rss_export_desc' => $rss_export_desc, + 'rss_export_image' => $rss_export_image, + 'rss_export_forums' => $rss_export_forums, + 'rss_export_include_post' => $rss_export_include_post, + 'rss_export_count' => $rss_export_count, + 'rss_export_cache_time' => $rss_export_cache_time, + 'rss_export_order' => $rss_export_order, + 'rss_export_sort' => $rss_export_sort + ); + + if ( $type == 'add' ) + { + $this->ipsclass->DB->do_insert( 'rss_export', $array ); + $rss_export_id = 'all'; + $this->ipsclass->main_msg = 'RSS Export Stream Created'; + } + else + { + + $this->ipsclass->DB->do_update( 'rss_export', $array, 'rss_export_id='.$rss_export_id ); + $this->ipsclass->main_msg = 'RSS Export Stream Edited'; + } + + $this->rssexport_rebuild_cache( $rss_export_id, 0 ); + + $this->rssexport_overview(); + } + + /*-------------------------------------------------------------------------*/ + // RSS Export: Form + /*-------------------------------------------------------------------------*/ + + function rssexport_form( $type='add' ) + { + //----------------------------------------- + // Init Vars + //----------------------------------------- + + $rss_export_id = isset($this->ipsclass->input['rss_export_id']) ? intval($this->ipsclass->input['rss_export_id']) : 0; + $dd_sort = array( 0 => array( 'DESC', 'Descending (9-0)' ), 1 => array( 'ASC', 'Ascending (0-9)' ) ); + $dd_order = array( 0 => array( 'start_date' , 'Topic Start Date' ), + 1 => array( 'last_post' , 'Topic Last Post' ), + 2 => array( 'views' , 'Topic Views' ), + 3 => array( 'starter_id' , 'Topic Starter' ), + 4 => array( 'topic_rating_total', 'Topic Rating' ) ); + + //----------------------------------------- + // Check (please?) + //----------------------------------------- + + if ( $type == 'add' ) + { + $formcode = 'rssexport_add_save'; + $title = "Create New RSS Export Stream"; + $button = "Create New RSS Export Stream"; + + $rssstream = array( 'rss_export_id' => 0, + 'rss_export_title' => '', + 'rss_export_forums' => NULL, + 'rss_export_desc' => '', + 'rss_export_image' => '', + 'rss_export_include_post' => 1, + 'rss_export_enabled' => 1, + 'rss_export_count' => '', + 'rss_export_cache_time' => '', + 'rss_export_sort' => '', + 'rss_export_order' => '' ); + } + else + { + $rssstream = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'rss_export', 'where' => 'rss_export_id='.$rss_export_id ) ); + + if ( ! $rssstream['rss_export_id'] ) + { + $this->ipsclass->main_msg = "No ID was passed, please try again."; + $this->rssexport_overview(); + return; + } + + $formcode = 'rssexport_edit_save'; + $title = "Edit RSS Export Stream ".$rssstream['rss_export_title']; + $button = "Save Changes"; + } + + //------------------------------- + // Build forums multi-chooser + //------------------------------- + + $this->ipsclass->forums->forums_init(); + + require_once( ROOT_PATH.'sources/lib/admin_forum_functions.php' ); + $aff = new admin_forum_functions(); + $aff->ipsclass =& $this->ipsclass; + $dropdown = $aff->ad_forums_forum_list(1); + $rss_export_forums = ( isset($_POST['rss_export_forums']) AND is_array($_POST['rss_export_forums']) ) ? implode( ",", $_POST['rss_export_forums'] ) : $rssstream['rss_export_forums']; + + //------------------------------- + // Form elements + //------------------------------- + + $form = array(); + + $form['rss_export_title'] = $this->ipsclass->adskin->form_input( 'rss_export_title' , $this->ipsclass->txt_htmlspecialchars( ( isset($_POST['rss_export_title']) AND $_POST['rss_export_title'] ) ? $_POST['rss_export_title'] : $rssstream['rss_export_title'] ) ); + $form['rss_export_desc'] = $this->ipsclass->adskin->form_input( 'rss_export_desc' , $this->ipsclass->txt_htmlspecialchars( ( isset($_POST['rss_export_desc']) AND $_POST['rss_export_desc'] ) ? $_POST['rss_export_desc'] : $rssstream['rss_export_desc'] ) ); + $form['rss_export_image'] = $this->ipsclass->adskin->form_input( 'rss_export_image' , $this->ipsclass->txt_htmlspecialchars( ( isset($_POST['rss_export_image']) AND $_POST['rss_export_image'] ) ? $_POST['rss_export_image'] : $rssstream['rss_export_image'] ) ); + $form['rss_export_include_post'] = $this->ipsclass->adskin->form_yes_no( 'rss_export_include_post' , ( isset($_POST['rss_export_include_post']) AND $_POST['rss_export_include_post'] ) ? $_POST['rss_export_include_post'] : $rssstream['rss_export_include_post'] ); + $form['rss_export_enabled'] = $this->ipsclass->adskin->form_yes_no( 'rss_export_enabled' , ( isset($_POST['rss_export_enabled']) AND $_POST['rss_export_enabled'] ) ? $_POST['rss_export_enabled'] : $rssstream['rss_export_enabled'] ); + $form['rss_export_count'] = $this->ipsclass->adskin->form_simple_input( 'rss_export_count' , ( isset($_POST['rss_export_count']) AND $_POST['rss_export_count'] ) ? $_POST['rss_export_count'] : $rssstream['rss_export_count'], 5 ); + $form['rss_export_forums'] = $this->ipsclass->adskin->form_multiselect( 'rss_export_forums[]', $dropdown, explode( ",", $rss_export_forums ), 7 ); + $form['rss_export_cache_time'] = $this->ipsclass->adskin->form_simple_input( 'rss_export_cache_time' , ( isset($_POST['rss_export_cache_time']) AND $_POST['rss_export_cache_time'] ) ? $_POST['rss_export_cache_time'] : $rssstream['rss_export_cache_time'], 5 ); + $form['rss_export_sort'] = $this->ipsclass->adskin->form_dropdown( 'rss_export_sort' , $dd_sort , ( isset($_POST['rss_export_sort']) AND $_POST['rss_export_sort'] ) ? $_POST['rss_export_sort'] : $rssstream['rss_export_sort'] ); + $form['rss_export_order'] = $this->ipsclass->adskin->form_dropdown( 'rss_export_order', $dd_order, ( isset($_POST['rss_export_order']) AND $_POST['rss_export_order'] ) ? $_POST['rss_export_order'] : $rssstream['rss_export_order'] ); + + $this->ipsclass->html .= $this->html->rss_export_form( $form, $title, $formcode, $button, $rssstream ); + + $this->ipsclass->admin->page_title = "RSS Export Manager"; + $this->ipsclass->admin->page_detail = "This section will allow you to manage your RSS export feeds."; + + $this->ipsclass->admin->nav[] = array( '', "Add/Edit RSS Export Stream" ); + $this->ipsclass->admin->output(); + } + + /*-------------------------------------------------------------------------*/ + // List current RSS exports + /*-------------------------------------------------------------------------*/ + + function rssexport_overview() + { + //------------------------------- + // INIT + //------------------------------- + + $content = ""; + $rows = array(); + + $st = intval($this->ipsclass->input['st']) > 0 ? intval($this->ipsclass->input['st']) : 0; + + //------------------------------- + // Get feed count + //------------------------------- + + $num = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'count(*) as row_count', 'from' => 'rss_export' ) ); + + $page_links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $num['row_count'], + 'PER_PAGE' => 25, + 'CUR_ST_VAL' => $st, + 'L_SINGLE' => "", + 'L_MULTI' => "Pages: ", + 'BASE_URL' => $this->ipsclass->base_url."&{$this->ipsclass->form_code}", + ) + ); + + //------------------------------- + // Get feeds + //------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'rss_export', 'order' => 'rss_export_id ASC' ) ); + $this->ipsclass->DB->simple_exec(); + + while( $r = $this->ipsclass->DB->fetch_row() ) + { + //------------------------------- + // (Alex) Cross + //------------------------------- + + $r['_enabled_img'] = $r['rss_export_enabled'] ? 'aff_tick.png' : 'aff_cross.png'; + + $content .= $this->html->rss_export_overview_row($r); + } + + $this->ipsclass->html .= $this->html->rss_export_overview( $content, $page_links ); + + $this->ipsclass->admin->page_title = "RSS Export Manager"; + $this->ipsclass->admin->page_detail = "This section will allow you to manage your RSS export feeds."; + $this->ipsclass->admin->output(); + } + + + + + +} + + ?> \ No newline at end of file diff --git a/upload/sources/action_admin/rssimport.php b/upload/sources/action_admin/rssimport.php index da51fcbc..a610ebf7 100644 --- a/upload/sources/action_admin/rssimport.php +++ b/upload/sources/action_admin/rssimport.php @@ -2,25 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-12-18 18:02:43 -0500 (Mon, 18 Dec 2006) $ -| > $Revision: 805 $ +| > $Date: 2007-09-11 12:38:15 -0400 (Tue, 11 Sep 2007) $ +| > $Revision: 1102 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -32,7 +24,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -41,185 +33,185 @@ class ad_rssimport # Globals var $ipsclass; var $class_rss; - + var $perm_main = 'content'; var $perm_child = 'rssimport'; - + var $use_sockets = 1; var $func_mod; var $classes_loaded = 0; - + var $import_count = 0; - + var $validate_msg = array(); - + /*-------------------------------------------------------------------------*/ // Main handler /*-------------------------------------------------------------------------*/ - - function auto_run() + + function auto_run() { $this->html = $this->ipsclass->acp_load_template('cp_skin_rss'); - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'RSS Импорт' ); - + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'RSS Import Manager' ); + //-------------------------------------------- // Load classes //-------------------------------------------- - + require_once( ROOT_PATH.'sources/lib/func_mod.php' ); $this->func_mod = new func_mod(); $this->func_mod->ipsclass =& $this->ipsclass; - + //-------------------------------------------- // Sup? //-------------------------------------------- - + switch($this->ipsclass->input['code']) { case 'rssimport_overview': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->rssimport_overview(); break; - + case 'rssimport_validate': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->rssimport_validate( 1 ); - break; - + break; + case 'rssimport_add': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); $this->rssimport_form('add'); break; - + case 'rssimport_edit': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->rssimport_form('edit'); break; - + case 'rssimport_add_save': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); $this->rssimport_save('add'); break; - + case 'rssimport_edit_save': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->rssimport_save('edit'); break; - + case 'rssimport_recache': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recache' ); $this->rssimport_rebuild_cache(); break; - + case 'rssimport_remove': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->rssimport_remove_dialogue(); break; - + case 'rssimport_remove_complete': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->rssimport_remove_complete( 1 ); break; - + case 'rssimport_delete': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->rssimport_delete(); break; - + default: $this->rssimport_overview(); break; } } - + /*-------------------------------------------------------------------------*/ // RSS Import: Remove import stream /*-------------------------------------------------------------------------*/ - + function rssimport_delete() { //-------------------------------------------- // INIT //-------------------------------------------- - + $rss_import_id = intval($this->ipsclass->input['rss_import_id']); //-------------------------------------------- // Load RSS stream //-------------------------------------------- - + $rssstream = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'rss_import', 'where' => "rss_import_id=$rss_import_id" ) ); - + if ( ! $rssstream['rss_import_id'] ) { - $this->ipsclass->main_msg = "Невозможно загрузить строку RSS из базы данных. Возможно, ее просто нет."; + $this->ipsclass->main_msg = "Could not load the RSS stream from the database. It maybe missing."; $this->rssimport_overview(); return; } - + //-------------------------------------------- // Remove it //-------------------------------------------- - + $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'rss_import', 'where' => 'rss_import_id='.$rss_import_id ) ); - - $this->ipsclass->main_msg = "Испорт RSS строки удален"; + + $this->ipsclass->main_msg = "RSS Import stream removed."; $this->rssimport_overview(); } - + /*-------------------------------------------------------------------------*/ // RSS Import: Remove articles, done /*-------------------------------------------------------------------------*/ - + function rssimport_remove_complete( $return=0, $rss_import_id=0 ) { //-------------------------------------------- // INIT //-------------------------------------------- - + $rss_import_id = $rss_import_id ? $rss_import_id : intval($this->ipsclass->input['rss_import_id']); $remove_count = intval($this->ipsclass->input['remove_count']) ? intval($this->ipsclass->input['remove_count']) : 500; $remove_tids = array(); - + //-------------------------------------------- // Load RSS stream //-------------------------------------------- - + $rssstream = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'rss_import', 'where' => "rss_import_id=$rss_import_id" ) ); - + if ( ! $rssstream['rss_import_id'] ) { - $this->ipsclass->main_msg = "Невозможно загрузить строку RSS из базы данных. Возможно, ее просто нет."; + $this->ipsclass->main_msg = "Could not load the RSS stream from the database. It maybe missing."; $this->rssimport_overview(); return; } - + //-------------------------------------------- // Get tids //-------------------------------------------- - + $this->ipsclass->DB->build_query( array( 'select' => 'rss_imported_tid', 'from' => 'rss_imported', 'where' => 'rss_imported_impid='.$rss_import_id, 'order' => 'rss_imported_tid DESC', 'limit' => array( 0, $remove_count ) ) ); - + $this->ipsclass->DB->exec_query(); - + while( $tee = $this->ipsclass->DB->fetch_row() ) { $remove_tids[ $tee['rss_imported_tid'] ] = $tee['rss_imported_tid']; } - + //-------------------------------------------- // Check.. //-------------------------------------------- - + if ( ! count( $remove_tids ) ) { if ( $return ) { - $this->ipsclass->main_msg = "Нельзя определить место расположение тем для удаления"; + $this->ipsclass->main_msg = "Could not locate any topics to delete"; $this->rssimport_overview(); return; } @@ -228,107 +220,107 @@ class ad_rssimport return; } } - + //-------------------------------------------- // Remove 'em //-------------------------------------------- - + $this->func_mod->forum['id'] = $rssstream['rss_import_forum_id']; $this->func_mod->topic_delete( $remove_tids ); - + //-------------------------------------------- // Remove from DB //-------------------------------------------- - + $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'rss_imported', 'where' => 'rss_imported_tid IN('.implode(',',$remove_tids).')' ) ); - - $this->ipsclass->main_msg = intval(count($remove_tids))." тем удалено."; + + $this->ipsclass->main_msg = intval(count($remove_tids))." topics removed."; $this->rssimport_overview(); } - + /*-------------------------------------------------------------------------*/ // RSS Import: Remove articles, dialogue /*-------------------------------------------------------------------------*/ - + function rssimport_remove_dialogue() { //-------------------------------------------- // INIT //-------------------------------------------- - + $rss_import_id = intval($this->ipsclass->input['rss_import_id']); - + //-------------------------------------------- // Checks... //-------------------------------------------- - + if ( ! $rss_import_id ) { - $this->ipsclass->main_msg = "Не один ID не выбран, повторите попытку заново "; + $this->ipsclass->main_msg = "No ID was passed, please try again"; $this->rssimport_overview(); return; } - + //-------------------------------------------- // Load RSS stream //-------------------------------------------- - + $rssstream = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'rss_import', 'where' => "rss_import_id=$rss_import_id" ) ); - + if ( ! $rssstream['rss_import_id'] ) { - $this->ipsclass->main_msg = "Невозможно загрузить строку RSS из базы данных. Возможно, ее просто нет."; + $this->ipsclass->main_msg = "Could not load the RSS stream from the database. It maybe missing."; $this->rssimport_overview(); return; } - + //-------------------------------------------- // Count number of topics... //-------------------------------------------- - + $article_count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as cnt', 'from' => 'rss_imported', 'where' => 'rss_imported_impid='.$rss_import_id ) ); - + //-------------------------------------------- // Got any? //-------------------------------------------- - + if ( $article_count['cnt'] < 1 ) { - $this->ipsclass->main_msg = "Импорт RSS строки '{$rssstream['rss_import_title']}' не был произведен."; + $this->ipsclass->main_msg = "The RSS Import Stream '{$rssstream['rss_import_title']}' has no imported articles to remove."; $this->rssimport_overview(); return; } - + //-------------------------------------------- // We must have here... //-------------------------------------------- - + $this->ipsclass->html .= $this->html->rss_import_remove_articles_form( $rssstream, intval($article_count['cnt']) ); - - $this->ipsclass->admin->page_title = "Управление импортом RSS"; - $this->ipsclass->admin->page_detail = "В этой секции вы можете удалять уже созданные статьи."; - - $this->ipsclass->admin->nav[] = array( '', "Удаление RSS строки" ); + + $this->ipsclass->admin->page_title = "RSS Import Manager"; + $this->ipsclass->admin->page_detail = "This section will allow you to remove already posted articles."; + + $this->ipsclass->admin->nav[] = array( '', "Remove RSS Articles" ); $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // RSS Import: Rebuild cache /*-------------------------------------------------------------------------*/ - + function rssimport_rebuild_cache( $rss_import_id='', $return=1, $id_is_array=0 ) { //-------------------------------------------- // INIT //-------------------------------------------- - + $errors = array(); $affected_forum_ids = array(); $affected_members = array(); $rss_error = array(); $rss_import_ids = array(); $items_imported = 0; - + if ( ! $rss_import_id ) { $rss_import_id = $this->ipsclass->input['rss_import_id'] == 'all' ? 'all' : intval($this->ipsclass->input['rss_import_id']); @@ -337,25 +329,25 @@ class ad_rssimport //-------------------------------------------- // Check //-------------------------------------------- - + if ( ! $rss_import_id ) { - $this->ipsclass->main_msg = "Не один ID не выбран, повторите попытку заново "; + $this->ipsclass->main_msg = "No ID was passed, please try again"; $this->rssimport_overview(); return; } - + if( $id_is_array == 1 ) { $rss_import_ids = explode( ",", $rss_import_id ); } - + if ( ! $this->classes_loaded ) { //-------------------------------------------- // Require classes //-------------------------------------------- - + if ( ! is_object( $this->class_rss ) ) { require_once( KERNEL_PATH . 'class_rss.php' ); @@ -364,99 +356,99 @@ class ad_rssimport $this->class_rss->use_sockets = $this->use_sockets; $this->class_rss->rss_max_show = 100; } - + //----------------------------------------- // Force RTE editor //----------------------------------------- - + require_once( ROOT_PATH."sources/classes/editor/class_editor.php" ); require_once( ROOT_PATH."sources/classes/editor/class_editor_rte.php" ); $this->editor = new class_editor_module(); $this->editor->ipsclass =& $this->ipsclass; - + //----------------------------------------- // Load and config POST class //----------------------------------------- - + require_once( ROOT_PATH."sources/classes/post/class_post.php" ); $this->post = new class_post(); $this->post->ipsclass =& $this->ipsclass; - + //----------------------------------------- // Load and config the email class // - only here not to break post class //----------------------------------------- - + require_once( ROOT_PATH."sources/classes/class_email.php" ); $this->email = new emailer( ROOT_PATH ); $this->email->ipsclass =& $this->ipsclass; $this->email->email_init(); - + $this->post->email =& $this->email; - + //----------------------------------------- // Load and config the post parser //----------------------------------------- - + require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); $this->parser = new parse_bbcode(); $this->parser->ipsclass =& $this->ipsclass; $this->parser->allow_update_caches = 0; - + //-------------------------------------------- // Not loaded the func? //-------------------------------------------- - + if ( ! $this->func_mod ) { require_once( ROOT_PATH.'sources/lib/func_mod.php' ); $this->func_mod = new func_mod(); $this->func_mod->ipsclass =& $this->ipsclass; } - + $this->classes_loaded = 1; } - + //-------------------------------------------- // Init forums if not already done so //-------------------------------------------- - + if ( ! is_array( $this->ipsclass->forums->forum_by_id ) OR !count( $this->ipsclass->forums->forum_by_id ) ) { $this->ipsclass->forums->forums_init(); } - + //-------------------------------------------- // Go loopy //-------------------------------------------- - + $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'rss_import' ) ); $outer = $this->ipsclass->DB->exec_query(); - + while( $row = $this->ipsclass->DB->fetch_row( $outer ) ) { if ( $rss_import_id == 'all' OR $row['rss_import_id'] == $rss_import_id OR ( $id_is_array == 1 AND in_array( $row['rss_import_id'], $rss_import_ids ) ) ) { // Skip non-existent forums - bad stuff happens - + if ( !array_key_exists( $row['rss_import_forum_id'], $this->ipsclass->cache['forum_cache'] ) ) { continue; } - + //----------------------------------------- // Allowing badwords? //----------------------------------------- - + $this->parser->bypass_badwords = $row['rss_import_allow_html']; - + //-------------------------------------------- // Set this import's doctype //-------------------------------------------- - - $this->class_rss->doc_type = $this->ipsclass->vars['gb_char_set']; - $this->class_rss->feed_charset = $row['rss_import_charset']; - + + $this->class_rss->doc_type = $this->ipsclass->vars['gb_char_set']; + $this->class_rss->feed_charset = $row['rss_import_charset']; + if( strtolower($row['rss_import_charset']) != $this->ipsclass->vars['gb_char_set'] ) { $this->class_rss->convert_charset = 1; @@ -465,78 +457,78 @@ class ad_rssimport { $this->class_rss->convert_charset = 0; } - + //-------------------------------------------- // Set this import's authentication //-------------------------------------------- - - $this->class_rss->auth_req = $row['rss_import_auth']; - $this->class_rss->auth_user = $row['rss_import_auth_user']; - $this->class_rss->auth_pass = $row['rss_import_auth_pass']; - + + $this->class_rss->auth_req = $row['rss_import_auth']; + $this->class_rss->auth_user = $row['rss_import_auth_user']; + $this->class_rss->auth_pass = $row['rss_import_auth_pass']; + //-------------------------------------------- // Clear RSS object's error cache first //-------------------------------------------- - - $this->class_rss->errors = array(); - $this->class_rss->rss_items = array(); - - //-------------------------------------------- + + $this->class_rss->errors = array(); + $this->class_rss->rss_items = array(); + + //-------------------------------------------- // Reset the rss count as this is a new feed //-------------------------------------------- - - $this->class_rss->rss_count = 0; + + $this->class_rss->rss_count = 0; $this->class_rss->rss_max_show = $row['rss_import_pergo']; - + //-------------------------------------------- // Parse RSS //-------------------------------------------- - + $this->class_rss->rss_parse_feed_from_url( $row['rss_import_url'] ); - + //-------------------------------------------- // Got an error? //-------------------------------------------- - + if ( is_array( $this->class_rss->errors ) and count( $this->class_rss->errors ) ) { $rss_error = array_merge( $rss_error, $this->class_rss->errors ); continue; } - + //-------------------------------------------- // Got anything? //-------------------------------------------- - + if ( ! is_array( $this->class_rss->rss_channels ) or ! count( $this->class_rss->rss_channels ) ) { - $rss_error[] = "Нельзя открыть {$row['rss_import_url']} — не найдено каналов."; + $rss_error[] = "Could not open {$row['rss_import_url']} to locate channels."; continue; } - + //-------------------------------------------- // Update last check time //-------------------------------------------- - + $this->ipsclass->DB->do_update( 'rss_import', array( 'rss_import_last_import' => time() ), 'rss_import_id='.$row['rss_import_id'] ); - + //-------------------------------------------- // Apparently so: Parse feeds and check for // already imported GUIDs //-------------------------------------------- - + $final_items = array(); $items = array(); $check_guids = array(); $final_guids = array(); $count = 0; - + if ( ! is_array( $this->class_rss->rss_items ) or ! count( $this->class_rss->rss_items ) ) { - $rss_error[] = "{$row['rss_import_url']} — нет данных в канале для импорта"; + $rss_error[] = "{$row['rss_import_url']} has no items to import"; continue; } - + foreach ( $this->class_rss->rss_channels as $channel_id => $channel_data ) { if ( is_array( $this->class_rss->rss_items[ $channel_id ] ) and count ($this->class_rss->rss_items[ $channel_id ] ) ) @@ -546,11 +538,11 @@ class ad_rssimport $item_data['content'] = $item_data['content'] ? $item_data['content'] : $item_data['description']; $item_data['guid'] = md5( $item_data['guid'] ? $item_data['guid'] : preg_replace( "#\s|\r|\n#is", "", $item_data['title'].$item_data['link'].$item_data['description'] ) ); $item_data['unixdate'] = intval($item_data['unixdate']) ? intval($item_data['unixdate']) : time(); - + //-------------------------------------------- // Convert char set? //-------------------------------------------- - + if ( $row['rss_import_charset'] AND ( strtolower($this->ipsclass->vars['gb_char_set']) != strtolower($this->class_rss->doc_type) ) ) { $item_data['title'] = $this->ipsclass->txt_convert_charsets( $item_data['title'], $this->class_rss->doc_type ); @@ -560,7 +552,7 @@ class ad_rssimport //-------------------------------------------- // Dates? //-------------------------------------------- - + if ( $item_data['unixdate'] < 1 ) { $item_data['unixdate'] = time(); @@ -569,45 +561,45 @@ class ad_rssimport { $item_data['unixdate'] = time(); } - - + + if ( ! $item_data['title'] OR ! $item_data['content'] ) { - $rss_error[] = "Пропущено: '{$item_data['title']}' — нет названия или содержания"; + $rss_error[] = "Skipping '{$item_data['title']}' no title or content"; continue; } - - + + $items[ $item_data['guid'] ] = $item_data; $check_guids[] = $item_data['guid']; } } } - + //-------------------------------------------- // Check GUIDs //-------------------------------------------- - + if ( ! count( $check_guids ) ) { - $rss_error[] = "Нет RSS записей для импортирования!"; + $rss_error[] = "No RSS items to import"; continue; } - + $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'rss_imported', 'where' => "rss_imported_guid IN ('".implode( "','", $check_guids )."')" ) ); $this->ipsclass->DB->exec_query(); - + while ( $guid = $this->ipsclass->DB->fetch_row() ) { $final_guids[ $guid['rss_imported_guid'] ] = $guid['rss_imported_guid']; } - + //-------------------------------------------- // Compare GUIDs //-------------------------------------------- - + $item_count = 0; - + foreach( $items as $guid => $data ) { if ( in_array( $guid, $final_guids ) ) @@ -617,76 +609,82 @@ class ad_rssimport else { $item_count++; - + # Make sure each item has a unique date $final_items[ $data['unixdate'].$item_count ] = $data; } } - + //-------------------------------------------- // Sort array //-------------------------------------------- - + krsort( $final_items ); - + //-------------------------------------------- // Pick off last X //-------------------------------------------- - + $count = 1; $tmp_final_items = $final_items; $final_items = array(); - + foreach( $tmp_final_items as $date => $data ) { $final_items[ $date ] = $data; - + if ( $count >= $row['rss_import_pergo'] ) { break; } - + $count++; } - + //-------------------------------------------- // Anything left? //-------------------------------------------- - + if ( ! count( $final_items ) ) { continue; } - + //-------------------------------------------- // Figure out MID //-------------------------------------------- - + $member = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'id, name, members_display_name, ip_address', 'from' => 'members', 'where' => "id={$row['rss_import_mid']}" ) ); - + if ( ! $member['id'] ) { continue; } - + //-------------------------------------------- // Make 'dem posts //-------------------------------------------- - + $affected_forum_ids[] = $row['rss_import_forum_id']; - + foreach( $final_items as $topic_item ) { # Fix & $topic_item['title'] = str_replace( '&', '&', $topic_item['title'] ); + $topic_item['title'] = trim( $this->ipsclass->my_br2nl( $topic_item['title'] ) ); $topic_item['title'] = strip_tags( $topic_item['title'] ); $topic_item['title'] = $this->ipsclass->parse_clean_value( $topic_item['title'] ); - + # Fix up &reg; $topic_item['title'] = str_replace( '&reg;', '®', $topic_item['title'] ); + + if( $row['rss_import_topic_pre'] ) + { + $topic_item['title'] = str_replace( ' ', ' ', str_replace( '&nbsp;', ' ', $row['rss_import_topic_pre'] ) ) .' '. $topic_item['title']; + } $topic = array( - 'title' => str_replace( ' ', ' ', str_replace( '&nbsp;', ' ', $row['rss_import_topic_pre'] ) ) .' '. $topic_item['title'], + 'title' => $topic_item['title'], 'description' => '' , 'state' => $row['rss_import_topic_open'] ? 'open' : 'closed', 'posts' => 0, @@ -704,44 +702,52 @@ class ad_rssimport 'forum_id' => $row['rss_import_forum_id'], 'approved' => $row['rss_import_topic_hide'] ? 0 : 1, 'pinned' => 0 ); - + //-------------------------------------------- // Sort post content: Convert HTML to BBCode //-------------------------------------------- - + $this->parser->parse_smilies = 1; $this->parser->parse_html = 0; $this->parser->parse_bbcode = 1; - + //-------------------------------------------- // Clean up.. //-------------------------------------------- - + $topic_item['content'] = preg_replace( "#
    (\r)?\n#is", "
    ", $topic_item['content'] ); - + //-------------------------------------------- // Add in Show link... //-------------------------------------------- - + if ( $row['rss_import_showlink'] AND $topic_item['link'] ) { - $the_link = ""; - $the_link = str_replace( '{url}', $topic_item['link'], $row['rss_import_showlink'] ); + $the_link = str_replace( '{url}', trim($topic_item['link']), $row['rss_import_showlink'] ); + if ( $row['rss_import_allow_html'] ) { - $the_link = $this->parser->pre_display_parse( $this->parser->pre_db_parse( $this->editor->_rte_html_to_bbcode( stripslashes($the_link) ) ) ); + $the_link = "

    " . $this->parser->pre_display_parse( $this->parser->pre_db_parse( $this->editor->_rte_html_to_bbcode( $this->parser->pre_edit_parse( stripslashes($the_link) ) ) ) ); } - - $topic_item['content'] .= "\n\n" . $the_link; + else + { + $the_link = "\n\n" . $the_link; + } + + $topic_item['content'] .= $the_link; } //-------------------------------------------- // Not allowed HTML //-------------------------------------------- - + + $this->parser->parse_smilies = 1; + $this->parser->parse_html = 0; + $this->parser->parse_bbcode = 1; + #print $this->parser->pre_db_parse( stripslashes($topic_item['content']) );exit; if ( ! $row['rss_import_allow_html'] ) { - $post_content = $this->parser->pre_display_parse( $this->parser->pre_db_parse( $this->editor->_rte_html_to_bbcode( stripslashes($topic_item['content']) ) ) ); + $post_content = $this->parser->pre_display_parse( $this->parser->pre_db_parse( $this->editor->_rte_html_to_bbcode( $this->parser->pre_edit_parse( stripslashes($topic_item['content']) ) ) ) ); } else { @@ -761,88 +767,88 @@ class ad_rssimport 'queued' => 0, 'post_htmlstate' => 0, ); - + //----------------------------------------- // Insert the topic into the database to get the // last inserted value of the auto_increment field // follow suit with the post //----------------------------------------- - + $this->ipsclass->DB->do_insert( 'topics', $topic ); - + $post['topic_id'] = $this->ipsclass->DB->get_insert_id(); $topic['tid'] = $post['topic_id']; - + //----------------------------------------- // Update the post info with the upload array info //----------------------------------------- - + $post['post_key'] = md5(time()); $post['new_topic'] = 1; - + //----------------------------------------- // Add post to DB //----------------------------------------- - + $this->ipsclass->DB->do_insert( 'posts', $post ); - + $post['pid'] = $this->ipsclass->DB->get_insert_id(); - + //----------------------------------------- // Update topic with firstpost ID //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'update' => 'topics', 'set' => "topic_firstpost=".$post['pid'], 'where' => "tid=".$topic['tid'] ) ); - + $this->ipsclass->DB->simple_exec(); - + //-------------------------------------------- // Insert GUID match //-------------------------------------------- - + $this->ipsclass->DB->do_insert( 'rss_imported', array( 'rss_imported_impid' => $row['rss_import_id'], 'rss_imported_guid' => $topic_item['guid'], 'rss_imported_tid' => $topic['tid'] ) ); - + //----------------------------------------- // Are we tracking this forum? If so generate some mailies - yay! //----------------------------------------- - + $this->post->forum = $this->ipsclass->cache['forum_cache'][$row['rss_import_forum_id']]; $this->post->forum_tracker( $row['rss_import_forum_id'], $topic['tid'], $topic['title'], $this->ipsclass->cache['forum_cache'][ $row['rss_import_forum_id'] ]['name'], $post['post'], $member['id'], $member['members_display_name'] ); - + if( $topic['approved'] == 0 ) { $this->post->notify_new_topic_approval( $topic['tid'], $topic['title'], $topic['starter_name'], $post['pid'] ); } $this->import_count++; - + //-------------------------------------------- // Increment user? //-------------------------------------------- - + if ( $row['rss_import_inc_pcount'] AND $this->ipsclass->cache['forum_cache'][ $row['rss_import_forum_id'] ]['inc_postcount'] ) { if ( ! $affected_members[ $member['id'] ] OR $affected_members[ $member['id'] ] < 0 ) { $affected_members[ $member['id'] ] = 0; } - + $affected_members[ $member['id'] ]++; } } } } - + //-------------------------------------------- // Update members //-------------------------------------------- - + if ( is_array( $affected_members ) and count( $affected_members ) ) { foreach( $affected_members as $mid => $inc ) @@ -854,34 +860,34 @@ class ad_rssimport } } } - + //-------------------------------------------- // Recount stats //-------------------------------------------- - + if ( is_array( $affected_forum_ids ) and count( $affected_forum_ids ) ) { foreach( $affected_forum_ids as $fid ) { $this->func_mod->forum_recount( $fid ); } - + $this->func_mod->stats_recount(); } - + //-------------------------------------------- // Return //-------------------------------------------- - + if ( $return ) { - $this->ipsclass->main_msg = "Импорт RSS, кеш пересчитан"; - + $this->ipsclass->main_msg = "RSS Import(s) Re-cached"; + if ( count( $rss_error ) ) { $this->ipsclass->main_msg .= "
    ".implode( "
    ", $rss_error ); } - + $this->rssimport_overview(); return; } @@ -890,33 +896,33 @@ class ad_rssimport return TRUE; } } - + /*-------------------------------------------------------------------------*/ // RSS Import: Save /*-------------------------------------------------------------------------*/ - + function rssimport_save($type='add') { //-------------------------------------------- // Do we want to validate? //-------------------------------------------- - + if( isset($this->ipsclass->input['rssimport_validate']) AND $this->ipsclass->input['rssimport_validate'] ) { $this->rssimport_validate(); - + if( count($this->validate_msg) ) { - $this->ipsclass->main_msg = "Результаты проверки для ".$this->ipsclass->txt_stripslashes( trim( $_POST['rss_import_url'] ) )."
     ·".implode( "
     ·", $this->validate_msg ); + $this->ipsclass->main_msg = "Validation Results for ".$this->ipsclass->txt_stripslashes( trim( $_POST['rss_import_url'] ) )."
     ·".implode( "
     ·", $this->validate_msg ); $this->rssimport_form( $type ); return; } } - + //-------------------------------------------- // INIT //-------------------------------------------- - + $rss_import_id = intval($this->ipsclass->input['rss_import_id']); $rss_import_title = trim( $this->ipsclass->input['rss_import_title'] ); $rss_import_url = $this->ipsclass->txt_stripslashes( trim( $_POST['rss_import_url'] ) ); @@ -933,48 +939,48 @@ class ad_rssimport $rss_import_charset = $this->ipsclass->input['rss_import_charset']; $rss_import_allow_html = intval($this->ipsclass->input['rss_import_allow_html']); $rss_import_auth = intval($this->ipsclass->input['rss_import_auth']); - $rss_import_auth_user = trim($this->ipsclass->input['rss_import_auth_user']) ? trim($this->ipsclass->input['rss_import_auth_user']) : 'Не требуется'; - $rss_import_auth_pass = trim($this->ipsclass->input['rss_import_auth_pass']) ? trim($this->ipsclass->input['rss_import_auth_pass']) : 'Не требуется'; - + $rss_import_auth_user = trim($this->ipsclass->input['rss_import_auth_user']) ? trim($this->ipsclass->input['rss_import_auth_user']) : 'Not Needed'; + $rss_import_auth_pass = trim($this->ipsclass->input['rss_import_auth_pass']) ? trim($this->ipsclass->input['rss_import_auth_pass']) : 'Not Needed'; + $rss_error = array(); - + //-------------------------------------------- // Checks... //-------------------------------------------- - + if ( $type == 'edit' ) { if ( ! $rss_import_id ) { - $this->ipsclass->main_msg = "Не один ID не выбран, повторите попытку заново "; + $this->ipsclass->main_msg = "No ID was passed, please try again"; $this->rssimport_overview(); return; } } - + if ( ! $rss_import_title OR ! $rss_import_url OR ! $rss_import_pergo OR ! $rss_import_forum_id OR ! $rss_import_mid ) { - $this->ipsclass->main_msg = "Вы должны заполнить все поля."; + $this->ipsclass->main_msg = "You must complete the entire form."; $this->rssimport_form( $type ); return; } - + //-------------------------------------------- // Load classes //-------------------------------------------- - + require_once( KERNEL_PATH . 'class_rss.php' ); $this->class_rss = new class_rss(); $this->class_rss->ipsclass =& $this->ipsclass; $this->class_rss->use_sockets = $this->use_sockets; $this->class_rss->rss_max_show = $rss_import_pergo; - + //-------------------------------------------- // Set this import's doctype //-------------------------------------------- - + $supported_encodings = array( 'utf-8', 'iso-8859-1', 'us-ascii' ); - + if( in_array( strtolower($this->ipsclass->vars['gb_char_set']), $supported_encodings ) ) { $this->class_rss->doc_type = $this->ipsclass->vars['gb_char_set']; @@ -983,50 +989,50 @@ class ad_rssimport { $this->class_rss->doc_type = 'UTF-8'; } - + if( strtolower($rss_import_charset) != $this->class_rss->doc_type ) { $this->class_rss->convert_charset = 1; $this->class_rss->feed_charset = $rss_import_charset; - $this->class_rss->destination_charset = $this->ipsclass->vars['gb_char_set']; + $this->class_rss->destination_charset = $this->class_rss->doc_type; } else { $this->class_rss->convert_charset = 0; } - + //-------------------------------------------- // Set this import's authentication //-------------------------------------------- - + $this->class_rss->auth_req = $rss_import_auth; $this->class_rss->auth_user = $rss_import_auth_user; $this->class_rss->auth_pass = $rss_import_auth_pass; - + //-------------------------------------------- // Test URL //-------------------------------------------- - + $this->class_rss->rss_parse_feed_from_url( $rss_import_url ); - + //-------------------------------------------- // Got an error? //-------------------------------------------- - + if ( is_array( $this->class_rss->errors ) and count( $this->class_rss->errors ) ) { $rss_error = array_merge( $rss_error, $this->class_rss->errors ); } - + //-------------------------------------------- // Got anything? //-------------------------------------------- - + if ( ! is_array( $this->class_rss->rss_channels ) or ! count( $this->class_rss->rss_channels ) ) { - $rss_error[] = "Нельзя открыть $rss_import_url для локальных каналов."; + $rss_error[] = "Could not open $rss_import_url to locate channels."; } - + if ( is_array( $rss_error ) AND count( $rss_error ) ) { $this->ipsclass->main_msg = implode( "
    ", $rss_error ); @@ -1037,12 +1043,12 @@ class ad_rssimport //-------------------------------------------- // Figure out MID //-------------------------------------------- - - $member = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'id, name', 'from' => 'members', 'where' => "members_l_display_name='{$rss_import_mid}'" ) ); - + + $member = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'id, name', 'from' => 'members', 'where' => "members_l_display_name='" . strtolower($rss_import_mid) . "'" ) ); + if ( !isset($member['id']) OR !$member['id'] ) { - $this->ipsclass->main_msg = "Нельзя найти пользователя: '{$rss_import_mid}'"; + $this->ipsclass->main_msg = "We could not find a member called '{$rss_import_mid}'"; $this->rssimport_form( $type ); return; } @@ -1050,33 +1056,33 @@ class ad_rssimport { $rss_import_mid = $member['id']; } - + //-------------------------------------------- // Check to make sure forum ID is valid //-------------------------------------------- - + $this->ipsclass->forums->forums_init(); - + if ( !isset($this->ipsclass->forums->forum_by_id[ $rss_import_forum_id ]) OR !$this->ipsclass->forums->forum_by_id[ $rss_import_forum_id ] ) { - $this->ipsclass->main_msg = "Выбранный форум для импорта не существует"; + $this->ipsclass->main_msg = "The selected forum to import into doesn't exist"; $this->rssimport_form( $type ); return; } - + if ( $this->ipsclass->forums->forum_by_id[ $rss_import_forum_id ]['sub_can_post'] != 1 OR $this->ipsclass->forums->forum_by_id[ $rss_import_forum_id ]['redirect_on'] == 1 ) { - $this->ipsclass->main_msg = "Выбранный форум для импорта не может принять темы."; + $this->ipsclass->main_msg = "The selected forum to import into isn't capable of receiving topics."; $this->rssimport_form( $type ); return; } - - + + //-------------------------------------------- // Save... //-------------------------------------------- - - $array = array( + + $array = array( 'rss_import_title' => $rss_import_title, 'rss_import_url' => $rss_import_url, 'rss_import_mid' => $rss_import_mid, @@ -1095,62 +1101,62 @@ class ad_rssimport 'rss_import_auth_user' => $rss_import_auth_user, 'rss_import_auth_pass' => $rss_import_auth_pass, ); - + if ( $type == 'add' ) { $this->ipsclass->DB->do_insert( 'rss_import', $array ); - $this->ipsclass->main_msg = 'Создана строка RSS импорта'; + $this->ipsclass->main_msg = 'RSS Import Stream Created'; $rss_import_id = $this->ipsclass->DB->get_insert_id(); } else { $this->ipsclass->DB->do_update( 'rss_import', $array, 'rss_import_id='.$rss_import_id ); - $this->ipsclass->main_msg = 'Строка RSS импорта отредактирована'; + $this->ipsclass->main_msg = 'RSS Import Stream Edited'; } - + if( $rss_import_enabled ) { $this->rssimport_rebuild_cache( $rss_import_id, 0 ); } - + $this->rssimport_overview(); } - + /*-------------------------------------------------------------------------*/ // RSS Import: Form /*-------------------------------------------------------------------------*/ - + function rssimport_form( $type='add' ) { //----------------------------------------- // Init Vars //----------------------------------------- - + $rss_import_id = isset($this->ipsclass->input['rss_import_id']) ? intval($this->ipsclass->input['rss_import_id']) : 0; - + //------------------------------- // Build forums drop down //------------------------------- - + $this->ipsclass->forums->forums_init(); - + require_once( ROOT_PATH.'sources/lib/admin_forum_functions.php' ); $aff = new admin_forum_functions(); $aff->ipsclass =& $this->ipsclass; $forum_dropdown = $aff->ad_forums_forum_list(1); - + //----------------------------------------- // Check (please?) //----------------------------------------- - + if ( $type == 'add' ) { $formcode = 'rssimport_add_save'; - $title = "Создать строку RSS импорта"; - $button = "Создать"; - $rssstream = array( 'rss_import_topic_open' => 1, - 'rss_import_enabled' => 1, - 'rss_import_showlink' => '[url={url}]Читать дальше[/url]', + $title = "Create New RSS Import Stream"; + $button = "Create New RSS Import Stream"; + $rssstream = array( 'rss_import_topic_open' => 1, + 'rss_import_enabled' => 1, + 'rss_import_showlink' => '[url={url}]View the full article[/url]', 'rss_import_title' => '', 'rss_import_url' => '', 'rss_import_forum_id' => 0, @@ -1170,36 +1176,36 @@ class ad_rssimport else { $rssstream = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'rss_import', 'where' => 'rss_import_id='.$rss_import_id ) ); - + if ( ! $rssstream['rss_import_id'] ) { - $this->ipsclass->main_msg = "Не один ID не выбран, повторите попытку заново."; + $this->ipsclass->main_msg = "No ID was passed, please try again."; $this->rssimport_overview(); return; } - + //-------------------------------------------- // Figure out MID //-------------------------------------------- - + $member = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'id, members_display_name', 'from' => 'members', 'where' => "id=".intval($rssstream['rss_import_mid']) ) ); - + if ( $member['id'] ) { $rssstream['rss_import_mid'] = $member['members_display_name']; } - + $formcode = 'rssimport_edit_save'; - $title = "Редактирование: ".$rssstream['rss_import_title']; - $button = "Сохранить изменения"; + $title = "Edit RSS Import Stream ".$rssstream['rss_import_title']; + $button = "Save Changes"; } - + //------------------------------- // Form elements //------------------------------- - + $form = array(); - + $form['rss_import_title'] = $this->ipsclass->adskin->form_input( 'rss_import_title' , ( isset($_POST['rss_import_title']) AND $_POST['rss_import_title'] ) ? stripslashes($_POST['rss_import_title']) : $rssstream['rss_import_title'] ); $form['rss_import_enabled'] = $this->ipsclass->adskin->form_yes_no( 'rss_import_enabled' , ( isset($_POST['rss_import_enabled']) AND $_POST['rss_import_enabled'] ) ? $_POST['rss_import_enabled'] : $rssstream['rss_import_enabled'] ); $form['rss_import_url'] = $this->ipsclass->adskin->form_input( 'rss_import_url' , ( isset($_POST['rss_import_url']) AND $_POST['rss_import_url'] ) ? $_POST['rss_import_url'] : $rssstream['rss_import_url'] ); @@ -1228,89 +1234,89 @@ class ad_rssimport { $form['rss_div_show'] = "style='display:;'"; } - + $form['rss_import_auth_user'] = $this->ipsclass->adskin->form_input( 'rss_import_auth_user' , ( isset($_POST['rss_import_auth_user']) AND $_POST['rss_import_auth_user'] ) ? $_POST['rss_import_auth_user'] : $rssstream['rss_import_auth_user'] ); - $form['rss_import_auth_pass'] = $this->ipsclass->adskin->form_input( 'rss_import_auth_pass' , ( isset($_POST['rss_import_auth_pass']) AND $_POST['rss_import_auth_pass'] ) ? $_POST['rss_import_auth_pass'] : $rssstream['rss_import_auth_pass'] ); - + $form['rss_import_auth_pass'] = $this->ipsclass->adskin->form_input( 'rss_import_auth_pass' , ( isset($_POST['rss_import_auth_pass']) AND $_POST['rss_import_auth_pass'] ) ? $_POST['rss_import_auth_pass'] : $rssstream['rss_import_auth_pass'] ); + $this->ipsclass->html .= $this->html->rss_import_form( $form, $title, $formcode, $button, $rssstream ); - - $this->ipsclass->admin->page_title = "Управление импортом RSS"; - $this->ipsclass->admin->page_detail = "Эта секция позволяет вам управлять потоками импорта RSS."; - - $this->ipsclass->admin->nav[] = array( "", "Управление RSS импортом" ); + + $this->ipsclass->admin->page_title = "RSS Import Manager"; + $this->ipsclass->admin->page_detail = "This section will allow you to manage your RSS Import feeds."; + + $this->ipsclass->admin->nav[] = array( "", "Add/Edit RSS Import" ); $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // List current RSS Imports /*-------------------------------------------------------------------------*/ - + function rssimport_overview() { //------------------------------- // INIT //------------------------------- - + $content = ""; $rows = array(); - + $st = intval($this->ipsclass->input['st']) > 0 ? intval($this->ipsclass->input['st']) : 0; - + //------------------------------- // Get feed count //------------------------------- - + $num = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'count(*) as row_count', 'from' => 'rss_import' ) ); - + $page_links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $num['row_count'], 'PER_PAGE' => 25, 'CUR_ST_VAL' => $st, 'L_SINGLE' => "", - 'L_MULTI' => "Страницы: ", + 'L_MULTI' => "Pages: ", 'BASE_URL' => $this->ipsclass->base_url."&{$this->ipsclass->form_code}", ) - ); + ); //------------------------------- // Get feeds //------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'rss_import', 'order' => 'rss_import_id ASC', 'limit' => array( $st, 25 ) ) ); $this->ipsclass->DB->simple_exec(); - + while( $r = $this->ipsclass->DB->fetch_row() ) { //------------------------------- // (Alex) Cross //------------------------------- - + $r['_enabled_img'] = $r['rss_import_enabled'] ? 'aff_tick.png' : 'aff_cross.png'; - + $content .= $this->html->rss_import_overview_row($r); } - + $this->ipsclass->html .= $this->html->rss_import_overview( $content, $page_links ); - - $this->ipsclass->admin->page_title = "Управление импортом RSS"; - $this->ipsclass->admin->page_detail = "Эта секция позволяет вам управлять потоками импорта RSS."; + + $this->ipsclass->admin->page_title = "RSS Import Manager"; + $this->ipsclass->admin->page_detail = "This section will allow you to manage your RSS Import feeds."; $this->ipsclass->admin->output(); } - - + + /*-------------------------------------------------------------------------*/ // RSS Import: Save /*-------------------------------------------------------------------------*/ - + function rssimport_validate( $standalone=0 ) { $return = 0; - + if( !$standalone ) { //-------------------------------------------- // INIT //-------------------------------------------- - + $rss_import_id = intval($this->ipsclass->input['rss_import_id']); $rss_import_title = trim( $this->ipsclass->input['rss_import_title'] ); $rss_import_url = $this->ipsclass->txt_stripslashes( trim( $_POST['rss_import_url'] ) ); @@ -1327,21 +1333,21 @@ class ad_rssimport $rss_import_charset = $this->ipsclass->input['rss_import_charset']; $rss_import_allow_html = intval($this->ipsclass->input['rss_import_allow_html']); $rss_import_auth = intval($this->ipsclass->input['rss_import_auth']); - $rss_import_auth_user = trim($this->ipsclass->input['rss_import_auth_user']) ? trim($this->ipsclass->input['rss_import_auth_user']) : 'Не требуется'; - $rss_import_auth_pass = trim($this->ipsclass->input['rss_import_auth_pass']) ? trim($this->ipsclass->input['rss_import_auth_pass']) : 'Не требуется'; - + $rss_import_auth_user = trim($this->ipsclass->input['rss_import_auth_user']) ? trim($this->ipsclass->input['rss_import_auth_user']) : 'Not Needed'; + $rss_import_auth_pass = trim($this->ipsclass->input['rss_import_auth_pass']) ? trim($this->ipsclass->input['rss_import_auth_pass']) : 'Not Needed'; + $return = 1; } else { $return = 0; - + $rss_input_id = isset($this->ipsclass->input['rss_id']) ? intval($this->ipsclass->input['rss_id']) : 0; - + if( $rss_input_id > 0 ) { $rss_data = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'rss_import', 'where' => 'rss_import_id='.$rss_input_id ) ); - + if( !$rss_data['rss_import_url'] ) { $rss_import_url = ""; @@ -1352,14 +1358,14 @@ class ad_rssimport else { $standalone = 0; - + $rss_import_id = intval($rss_data['rss_import_id']); $rss_import_url = $rss_data['rss_import_url']; - + $member = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'members_display_name', 'from' => 'members', 'where' => 'id='.$rss_data['rss_import_mid'] ) ); - + $rss_import_mid = $member['members_display_name']; - + $rss_import_forum_id = intval($rss_data['rss_import_forum_id']); $rss_import_inc_pcount = intval($rss_data['rss_import_inc_pcount']); $rss_import_charset = $rss_data['rss_import_charset']; @@ -1374,26 +1380,26 @@ class ad_rssimport $rss_import_charset = $this->ipsclass->vars['gb_char_set']; $rss_import_auth = ""; $rss_import_auth_user = ""; - $rss_import_auth_pass = ""; + $rss_import_auth_pass = ""; } } - + if( !$rss_import_url ) { - $this->validate_msg[] = $this->html->rss_validate_msg( array( 'msg' => "URL адрес для проверки не введен" ) ); + $this->validate_msg[] = $this->html->rss_validate_msg( array( 'msg' => "There was no url entered to validate" ) ); } else { //-------------------------------------------- // INIT //-------------------------------------------- - + if ( ! $this->classes_loaded ) { //-------------------------------------------- // Require classes //-------------------------------------------- - + if ( ! is_object( $this->class_rss ) ) { require_once( KERNEL_PATH . 'class_rss.php' ); @@ -1402,17 +1408,17 @@ class ad_rssimport $this->class_rss->use_sockets = $this->use_sockets; $this->class_rss->rss_max_show = 100; } - + $this->classes_loaded = 1; } - + //-------------------------------------------- // Set this import's doctype //-------------------------------------------- - + $this->class_rss->doc_type = $this->ipsclass->vars['gb_char_set']; $this->class_rss->feed_charset = $this->ipsclass->vars['gb_char_set']; - + if( strtolower($rss_import_charset) != $this->ipsclass->vars['gb_char_set'] ) { $this->class_rss->convert_charset = 1; @@ -1421,50 +1427,50 @@ class ad_rssimport { $this->class_rss->convert_charset = 0; } - + //-------------------------------------------- // Set this import's authentication - //-------------------------------------------- - $this->class_rss->auth_req = $rss_import_auth; + //-------------------------------------------- + $this->class_rss->auth_req = $rss_import_auth; $this->class_rss->auth_user = $rss_import_auth_user; $this->class_rss->auth_pass = $rss_import_auth_pass; - + //-------------------------------------------- // Clear RSS object's error cache first //-------------------------------------------- $this->class_rss->errors = array(); $this->class_rss->rss_items = array(); - - //-------------------------------------------- + + //-------------------------------------------- // Reset the rss count as this is a new feed //-------------------------------------------- - + $this->class_rss->rss_count = 0; - + //-------------------------------------------- // Parse RSS //-------------------------------------------- - + $this->class_rss->rss_parse_feed_from_url( $rss_import_url ); - + //-------------------------------------------- // Validate Data - HTTP Status Code/Text //-------------------------------------------- - + if( $this->class_rss->class_file_management->http_status_code != "200" ) { if( $this->class_rss->class_file_management->http_status_code ) { - $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-invalid', + $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-invalid', 'msg' => "HTTP Status Code: ".$this->class_rss->class_file_management->http_status_code." (".$this->class_rss->class_file_management->http_status_text.")" ) ); } } else { - $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-valid', + $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-valid', 'msg' => "HTTP Status Code: ".$this->class_rss->class_file_management->http_status_code." (".$this->class_rss->class_file_management->http_status_text.")" ) ); } - + if ( is_array( $this->class_rss->errors ) and count( $this->class_rss->errors ) ) { foreach( $this->class_rss->errors as $error ) @@ -1480,49 +1486,49 @@ class ad_rssimport { if( strtolower($rss_import_charset) != strtolower($this->class_rss->orig_doc_type) ) { - $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-invalid', - 'msg' => "Кодировка RSS — {$this->class_rss->orig_doc_type}, но вы указали — {$rss_import_charset}" ) ); + $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-invalid', + 'msg' => "The RSS feed's charset is {$this->class_rss->orig_doc_type} but you entered {$rss_import_charset}" ) ); } else { - $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-valid', - 'msg' => "Кодировка RSS — {$this->class_rss->orig_doc_type} (корректная)" ) ); + $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-valid', + 'msg' => "The RSS feed's charset is {$this->class_rss->orig_doc_type} (correct)" ) ); } } else { - $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-valid', - 'msg' => "Кодировка RSS — {$this->class_rss->orig_doc_type}" ) ); + $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-valid', + 'msg' => "The RSS feed's charset is {$this->class_rss->orig_doc_type}" ) ); } } else { - $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-invalid', - 'msg' => "Невозможно определить кодировку RSS" ) ); + $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-invalid', + 'msg' => "We could not determine the feed's character set" ) ); } - + //-------------------------------------------- // Any Channels? //-------------------------------------------- - + if ( ! is_array( $this->class_rss->rss_channels ) or ! count( $this->class_rss->rss_channels ) ) { - $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-invalid', - 'msg' => "Невозможно найти какие-либо каналы в указанной RSS (нечего импортировать)." ) ); + $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-invalid', + 'msg' => "We could not find any channels in the RSS feed (nothing to import)." ) ); } else { - $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-valid', - 'msg' => "Найдено ".count($this->class_rss->rss_channels)." каналов в RSS." ) ); - + $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-valid', + 'msg' => "We found ".count($this->class_rss->rss_channels)." channel(s) in the RSS feed." ) ); + //-------------------------------------------- // Any Items? //-------------------------------------------- if ( ! is_array( $this->class_rss->rss_items ) or ! count( $this->class_rss->rss_items ) ) { - $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-invalid', - 'msg' => "Не найдено настоящего контента (темы, новости и т.д.) (нечего импортировать)" ) ); + $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-invalid', + 'msg' => "We could not find any actual content (topics, news articles, etc.) (nothing to import)" ) ); } else { @@ -1530,36 +1536,36 @@ class ad_rssimport { if ( is_array( $this->class_rss->rss_items[ $channel_id ] ) and count ($this->class_rss->rss_items[ $channel_id ] ) ) { - $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-valid', - 'msg' => "Найдено ".count($this->class_rss->rss_items[ $channel_id ])." статей/тем в RSS." ) ); - + $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-valid', + 'msg' => "We found ".count($this->class_rss->rss_items[ $channel_id ])." article(s)/topic(s) in the RSS feed." ) ); + foreach( $this->class_rss->rss_items[ $channel_id ] as $item_data ) { if( !$item_data['unixdate'] ) { - $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-msg', - 'msg' => "Дата не найдена в не менее, чем одной RSS статье - будет использоваться текущее время." ) ); + $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-msg', + 'msg' => "A date was not found in at least one of the RSS articles - current time would be used instead." ) ); } - + if ( $item_data['unixdate'] < 1 ) { - $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-msg', - 'msg' => "Найдена некорректная дата в не менее, чем одной RSS статье - будет использоваться текущее время." ) ); + $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-msg', + 'msg' => "An invalid date was found in at least one of the RSS articles - current time would be used instead." ) ); } else if ( $item_data['unixdate'] > time() ) { $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-msg', - 'msg' => "Найдена некорректная дата в не менее, чем одной RSS статье - будет использоваться текущее время." ) ); - } - - $item_data['content'] = $item_data['content'] ? $item_data['content'] : $item_data['description']; - + 'msg' => "An invalid date was found in at least one of the RSS articles - current time would be used instead." ) ); + } + + $item_data['content'] = $item_data['content'] ? $item_data['content'] : $item_data['description']; + if ( ! $item_data['title'] OR ! $item_data['content'] ) { - $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-invalid', - 'msg' => "Не менее, чем одна статья имеет некорректный заголовок или содержание. Если все статьи имеют оба некорректных поля, ничего не импортируется. IPB пропустит эти данные." ) ); + $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-invalid', + 'msg' => "At least one article was missing a title or a description/content field. If all articles are missing both fields, nothing would import. Otherwise IPB would skip just the items missing both a title and content." ) ); } - + break 2; } } @@ -1567,54 +1573,54 @@ class ad_rssimport } } } - + if( !$standalone ) { if( $rss_import_mid ) { $member = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'id, name', 'from' => 'members', 'where' => "members_l_display_name='{$rss_import_mid}'" ) ); - + if ( ! $member['id'] ) { - $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-invalid', - 'msg' => "Указанный пользователь '{$rss_import_mid}' не найден." ) ); + $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-invalid', + 'msg' => "The specified member '{$rss_import_mid}' could not be found." ) ); } } else { - $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-invalid', - 'msg' => "Мы не можем разрешить пользователя, используемого для импорта статей." ) ); - } + $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-invalid', + 'msg' => "We could not validate the member used to import articles." ) ); + } } - + //-------------------------------------------- // Init forums if not already done so //-------------------------------------------- - + if ( ! is_array( $this->ipsclass->forums->forum_by_id ) OR !count( $this->ipsclass->forums->forum_by_id ) ) { $this->ipsclass->forums->forums_init(); - } - + } + if( !$standalone AND $rss_import_forum_id ) { if ( ! $this->ipsclass->forums->forum_by_id[ $rss_import_forum_id ] ) { - $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-invalid', - 'msg' => "Указанный форум не найден." ) ); + $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-invalid', + 'msg' => "The specified forum could not be found." ) ); } else { if ( $this->ipsclass->forums->forum_by_id[ $rss_import_forum_id ]['sub_can_post'] != 1 OR $this->ipsclass->forums->forum_by_id[ $rss_import_forum_id ]['redirect_on'] == 1 ) { - $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-invalid', - 'msg' => "Указанный форум — форум переадресации или категория, или же невозможно открывать новые темы в нем." ) ); + $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-invalid', + 'msg' => "The specified forum is either a redirect forum, or a category, and cannot display new topics." ) ); } - + if( $rss_import_inc_pcount AND !$this->ipsclass->forums->forum_by_id[ $rss_import_forum_id ]['inc_postcount'] ) { - $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-invalid', - 'msg' => "В указанном форуме не включен счетчик сообщений пользователей — счетчик сообщений пользователя не будет увеличен." ) ); + $this->validate_msg[] = $this->html->rss_validate_msg( array( 'class' => 'rss-feed-invalid', + 'msg' => "The specified forum does not allow posts to increment user's post count - importer's post count will not be incremented." ) ); } } } @@ -1622,12 +1628,12 @@ class ad_rssimport //-------------------------------------------- // Display? //-------------------------------------------- - + if ( !$return ) { if( count($this->validate_msg) ) { - $this->ipsclass->main_msg = "Результаты проверки для ".$rss_import_url."
     ·".implode( "
     ·", $this->validate_msg ); + $this->ipsclass->main_msg = "Validation Results for ".$rss_import_url."
     ·".implode( "
     ·", $this->validate_msg ); $this->rssimport_overview(); return; } @@ -1636,7 +1642,7 @@ class ad_rssimport { return TRUE; } - } + } } } diff --git a/upload/sources/action_admin/security.php b/upload/sources/action_admin/security.php index 28ad6161..f1507ef0 100644 --- a/upload/sources/action_admin/security.php +++ b/upload/sources/action_admin/security.php @@ -2,22 +2,14 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +--------------------------------------------------------------------------- | > $Date: 2006-06-08 17:11:50 +0100 (Thu, 08 Jun 2006) $ | > $Revision: 289 $ @@ -36,7 +28,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -44,31 +36,31 @@ class ad_security { var $base_url; - + /** * Section title name * * @var string */ var $perm_main = "admin"; - + /** * Section title name * * @var string */ var $perm_child = "security"; - + function auto_run() { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Центр безопасности' ); - + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'IPB Security Center' ); + //----------------------------------------- // LOAD HTML //----------------------------------------- - + $this->html = $this->ipsclass->acp_load_template('cp_skin_security'); - + switch($this->ipsclass->input['code']) { default: @@ -102,7 +94,7 @@ class ad_security case 'acprename': $this->do_acprename(); break; - + case 'acphtaccess': $this->acphtaccess_form(); break; @@ -111,151 +103,151 @@ class ad_security break; } } - + /*-------------------------------------------------------------------------*/ // ACP HTACCESS: Step two /*-------------------------------------------------------------------------*/ - + function acphtaccess_do() { //----------------------------------------- // INIT //----------------------------------------- - + $name = trim( $_POST['name'] ); $pass = trim( $_POST['pass'] ); - + $htaccess_pw = ""; $htaccess_auth = ""; - + //----------------------------------------- // Check... //----------------------------------------- - + if ( ! $name or ! $pass ) { - $this->ipsclass->main_msg = "Вы должны полностью заполнить форму."; + $this->ipsclass->main_msg = "You must complete the form"; $this->acphtaccess_form(); return; } - + //----------------------------------------- // Format files... //----------------------------------------- - + $htaccess_auth = "AuthType Basic\n" . "AuthName \"IPB ACP\"\n" . "AuthUserFile " . ROOT_PATH . IPB_ACP_DIRECTORY . "/.htpasswd\n" . "Require valid-user\n"; - + $htaccess_pw = $name . ":" . crypt( $pass, base64_encode( $pass ) ); - + if ( $FH = @fopen( ROOT_PATH . IPB_ACP_DIRECTORY . '/' . '.htpasswd', 'w' ) ) { fwrite( $FH, $htaccess_pw ); fclose( $FH ); - + $FF = @fopen( ROOT_PATH . IPB_ACP_DIRECTORY . '/' . '.htaccess', 'w' ); fwrite( $FF, $htaccess_auth ); fclose( $FF ); - - $this->ipsclass->main_msg = "Файл защиты успешно создан."; + + $this->ipsclass->main_msg = "Authentication files written"; $this->security_overview(); } else { $this->ipsclass->html .= $this->html->htaccess_data( $htaccess_pw, $htaccess_auth ); - $this->ipsclass->admin->nav[] = array( '', '.htaccess АЦ' ); + $this->ipsclass->admin->nav[] = array( '', 'ACP .htaccess' ); $this->ipsclass->admin->output(); } - - + + } - + /*-------------------------------------------------------------------------*/ // ACP HTACCESS: Step One /*-------------------------------------------------------------------------*/ - + function acphtaccess_form() { //----------------------------------------- // Show it //----------------------------------------- - + $this->ipsclass->html .= $this->html->htaccess_form(); - - $this->ipsclass->admin->nav[] = array( '', '.htaccess АЦ' ); - + + $this->ipsclass->admin->nav[] = array( '', 'ACP .htaccess' ); + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // Rename ACP directory /*-------------------------------------------------------------------------*/ - + function do_acprename() { //----------------------------------------- // Show it //----------------------------------------- - + $this->ipsclass->html .= $this->html->rename_admin_dir(); - - $this->ipsclass->admin->nav[] = array( '', 'Изменение директории админцентра' ); - + + $this->ipsclass->admin->nav[] = array( '', 'Rename the admin directory' ); + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // Change conf global /*-------------------------------------------------------------------------*/ - + function do_confglobal() { //----------------------------------------- // INIT //----------------------------------------- - + $done = 0; - + //----------------------------------------- // Try... //----------------------------------------- - + if ( @chmod( ROOT_PATH . 'conf_global.php', 0444) ) { $done = 1; } - + //----------------------------------------- // Wow, that was really hard. I deserve a // payraise after this function... //----------------------------------------- - + if ( $done ) { - $this->ipsclass->main_msg = "CHMOD успешно изменен."; + $this->ipsclass->main_msg = "CHMOD change completed."; } else { - $this->ipsclass->main_msg = "Невозможно продолжить операцию.
    Пожалуйста, установите файлу «conf_global.php» при помощи FTP-программы атрибуты доступа (CHMOD) 0444."; + $this->ipsclass->main_msg = "Could not complete the process.
    Please use your FTP client to change the CHMOD value of 'conf_global.php' to 0444."; } - + $this->security_overview(); } - + /*-------------------------------------------------------------------------*/ // Add htaccess to non IPB dirs /*-------------------------------------------------------------------------*/ - + function do_htaccess() { //----------------------------------------- // INIT //----------------------------------------- - + $name = '.htaccess'; $msg = array(); $dirs = array( ROOT_PATH . 'cache', @@ -267,6 +259,7 @@ class ad_security ROOT_PATH . 'uploads' ); $towrite = << Order allow,deny @@ -278,92 +271,92 @@ EOF; //----------------------------------------- // Do it! //----------------------------------------- - + foreach( $dirs as $directory ) { - if ( $FH = @fopen( $directory . '/'. $name, 'w' ) ) + if ( $FH = @fopen( $directory . '/'. $name, 'a+' ) ) { fwrite( $FH, $towrite ); fclose( $FH ); - - $msg[] = "Запись «.htaccess» в директорию $directory..."; + + $msg[] = "Written .htaccess to $directory..."; } else { - $msg[] = "Невозможно произвести запись в $directory..."; + $msg[] = "Skipped $directory, could not write into it..."; } } - + //----------------------------------------- // Done... //----------------------------------------- - + $this->ipsclass->main_msg = implode( "
    ", $msg ); $this->security_overview(); } - + /*-------------------------------------------------------------------------*/ // List admins /*-------------------------------------------------------------------------*/ - + function list_admins() { //----------------------------------------- // INIT //----------------------------------------- - + $content = ""; $groups = array(); $query = ""; $members = array(); - + //----------------------------------------- // Get all admin groups... //----------------------------------------- - + $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'groups', 'where' => 'g_access_cp > 0 AND g_access_cp IS NOT NULL' ) ); - + $o = $this->ipsclass->DB->exec_query(); - + while( $row = $this->ipsclass->DB->fetch_row( $o ) ) { $_gid = intval( $row['g_id'] ); - + # I hate looped queries, but this should be OK. - + $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'members', 'where' => "mgroup=" . $_gid ." OR mgroup_others LIKE '%,". $_gid .",%' OR mgroup_others='".$_gid."' OR mgroup_others LIKE '".$_gid.",%' OR mgroup_others LIKE '%,".$_gid."'", 'order' => 'joined DESC' ) ); $b = $this->ipsclass->DB->exec_query(); - + while( $member = $this->ipsclass->DB->fetch_row( $b ) ) { if ( ! $member['mgroup'] AND ! $member['mgroup_others'] ) { continue; } - + $members[ $member['id'] ] = $member; } - + $groups[ $row['g_id'] ] = $row; } - + //----------------------------------------- // Generate list //----------------------------------------- - + foreach( $members as $id => $member ) { $member['members_display_name'] = $member['members_display_name'] ? $member['members_display_name'] : $member['name']; $member['_mgroup'] = $this->ipsclass->cache['group_cache'][ $member['mgroup'] ]['g_title']; $_tmp = array(); $member['_joined'] = $this->ipsclass->get_date( $member['joined'], 'JOINED' ); - + foreach( explode( ",", $member['mgroup_others'] ) as $gid ) { if ( $gid ) @@ -371,30 +364,30 @@ EOF; $_tmp[] = $this->ipsclass->cache['group_cache'][ $gid ]['g_title']; } } - + $member['_mgroup_others'] = implode( ", ", $_tmp ); - + $content .= $this->html->list_admin_row( $member ); } - - $this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( "Пользователи, имеющие доступ в АЦ", "Ниже приведен список пользователей, которые имеют доступ в админцентр.
    Если в списке присутствуют пользователи, которые не должны иметь доступ в админцентр, вы можете исправить это, нажав «Изменить» рядом с нужной учетной записью." ) ."
    "; + + //$this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( "Members with ACP Access", "Below is a list of all members with access to your ACP.
    If you do not recognize any, please remove their ACP access immediately." ) ."
    "; $this->ipsclass->html .= $this->html->list_admin_overview( $content ); - - $this->ipsclass->admin->nav[] = array( '', 'Список администраторов' ); - + + $this->ipsclass->admin->nav[] = array( '', 'List Administrators' ); + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // Deep scan /*-------------------------------------------------------------------------*/ - + function deep_scan() { //----------------------------------------- // INIT //----------------------------------------- - + $filter = trim( $this->ipsclass->input['filter'] ); $file_count = 0; $bad_count = 0; @@ -411,48 +404,47 @@ EOF; 8 => '#ff8400', 9 => '#ff8400', 10 => '#ff0000' ); - + //----------------------------------------- // Get class //----------------------------------------- - + require_once( ROOT_PATH . 'sources/classes/class_virus_checker.php' ); $class_virus_checker = new class_virus_checker(); $class_virus_checker->ipsclass =& $this->ipsclass; - + //----------------------------------------- // Run it... //----------------------------------------- - + $class_virus_checker->anti_virus_deep_scan( ROOT_PATH, '(php|cgi|pl|perl|php3|php4|php5|php6)' ); - + //----------------------------------------- // Update... //----------------------------------------- - - $cache = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='systemvars'" ) ); - $cache_array = unserialize(stripslashes($cache['cs_value'])); - + + $cache_array =& $this->ipsclass->cache['systemvars']; + $cache_array['last_deepscan_check'] = time(); - + $this->ipsclass->update_cache( array( 'name' => 'systemvars', 'value' => $cache_array, 'array' => 1, 'donow' => 1 ) ); - + //----------------------------------------- // Got any bad files? //----------------------------------------- - + if ( is_array( $class_virus_checker->bad_files ) and count( $class_virus_checker->bad_files ) ) { foreach( $class_virus_checker->bad_files as $idx => $data ) { $file_count++; - + $_data = array(); $_info = stat( $data['file_path'] ); - + $_data['size'] = filesize( $data['file_path'] ); $_data['human'] = ceil( $_data['size'] / 1024 ); $_data['mtime'] = $this->ipsclass->get_date( $_info['mtime'], 'SHORT' ); @@ -460,16 +452,16 @@ EOF; $_data['left_width'] = $data['score'] * 5; $_data['right_width'] = 50 - $_data['left_width']; $_data['color'] = $colors[ $data['score'] ]; - + if ( $data['score'] >= 7 ) { $bad_score++; } - + if ( strstr( $filter, 'score' ) ) { $_filter = intval( str_replace( 'score-', '', $filter ) ); - + if ( $data['score'] < $_filter ) { continue; @@ -487,69 +479,69 @@ EOF; if ( $_info['mtime'] < time() - 86400 * 30 ) { continue; - } + } } else if ( $filter == 'all' ) { - + } else { $filter = ""; } - + if ( strtoupper( substr(PHP_OS, 0, 3) ) == 'WIN' ) { $file_path = str_replace( ROOT_PATH, "", $data['file_path'] ); $file_path = str_replace( "\\", "/", $file_path ); - + $data['file_path'] = str_replace( "/\\", "\\", $data['file_path'] ); - } + } else { $file_path = str_replace( ROOT_PATH.'/', '', $data['file_path'] ); $data['file_path'] = str_replace( ROOT_PATH.'/', '', $data['file_path'] ); } - + $content .= $this->html->deep_scan_bad_files_row( $file_path, $data['file_path'], $_data ); } - + if ( $bad_score ) { - $this->ipsclass->html .= $this->ipsclass->skin_acp_global->warning_box( 'Используемые системой файлы', 'Сканер обнаружил следующие файлы.
    '.$bad_score.' из '.$file_count.' файлов имеют рейтинг 7/10 и выше.
    Если вам неизвестно происхождение какого-либо из файлов, мы рекомендуем вам их очень внимательно изучить.' ) . "
    "; + $this->ipsclass->html .= $this->ipsclass->skin_acp_global->warning_box( 'All Executables', 'The deep scanner has found the following files.
    '.$bad_score.' of '.$file_count.' files are rating 7/10 or more.
    If you\'re unsure of their origin, please investigate them immediately.' ) . "
    "; } else { - $this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( 'Используемые системой файлы', 'Сканер проверил '.$file_count.' файлов.
    Если вам неизвестно происхождение какого-либо из файлов, мы рекомендуем вам их очень внимательно изучить.' ) . "
    "; + $this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( 'All Executables', 'The deep scanner has found '.$file_count.' files.
    If you\'re unsure of their origin, please investigate them immediately.' ) . "
    "; } - + $this->ipsclass->html .= $this->html->deep_scan_bad_files_wrapper( $content ); } - + //----------------------------------------- // Fix filter... //----------------------------------------- - + if ( $filter ) { $this->ipsclass->html = preg_replace( "#(value=[\"']".preg_quote( $filter, '#' )."['\"])#i", "\\1 selected='selected'", $this->ipsclass->html ); } - - $this->ipsclass->admin->nav[] = array( '', 'Сканер' ); - + + $this->ipsclass->admin->nav[] = array( '', 'Deep Scan' ); + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // Anti virus checker /*-------------------------------------------------------------------------*/ - + function anti_virus_check() { //----------------------------------------- // INIT //----------------------------------------- - + $content = ""; $checked_content = ""; $colors = array( 0 => '#84ff00', @@ -563,46 +555,45 @@ EOF; 8 => '#ff8400', 9 => '#ff8400', 10 => '#ff0000' ); - + //----------------------------------------- // Get class //----------------------------------------- - + require_once( ROOT_PATH . 'sources/classes/class_virus_checker.php' ); $class_virus_checker = new class_virus_checker(); $class_virus_checker->ipsclass =& $this->ipsclass; - + //----------------------------------------- // Run it... //----------------------------------------- - + $class_virus_checker->run_scan(); - + //----------------------------------------- // Update... //----------------------------------------- - - $cache = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='systemvars'" ) ); - $cache_array = unserialize(stripslashes($cache['cs_value'])); - + + $cache_array =& $this->ipsclass->cache['systemvars']; + $cache_array['last_virus_check'] = time(); - + $this->ipsclass->update_cache( array( 'name' => 'systemvars', 'value' => $cache_array, 'array' => 1, 'donow' => 1 ) ); - + //----------------------------------------- // Got any bad files? //----------------------------------------- - + if ( is_array( $class_virus_checker->bad_files ) and count( $class_virus_checker->bad_files ) ) { foreach( $class_virus_checker->bad_files as $idx => $data ) { $_data = array(); $_info = stat( $data['file_path'] ); - + $_data['size'] = filesize( $data['file_path'] ); $_data['human'] = ceil( $_data['size'] / 1024 ); $_data['mtime'] = $this->ipsclass->get_date( $_info['mtime'], 'SHORT' ); @@ -610,384 +601,383 @@ EOF; $_data['left_width'] = $data['score'] * 5; $_data['right_width'] = 50 - $_data['left_width']; $_data['color'] = $colors[ $data['score'] ]; - + if ( strtoupper( substr(PHP_OS, 0, 3) ) == 'WIN' ) { $root_path = str_replace( "/", "\\", ROOT_PATH ); $file_path = str_replace( $root_path, "", $data['file_path'] ); $file_path = str_replace( "\\", "/", $file_path ); - } + } else { $file_path = str_replace( ROOT_PATH, '', $data['file_path'] ); } - + $content .= $this->html->anti_virus_bad_files_row( $file_path, $data['file_path'], $_data ); } - - $this->ipsclass->html .= $this->ipsclass->skin_acp_global->warning_box( 'Обнаружены подозрительные файлы', 'Ниже приведен список обнаруженных подозрительных файлов.
    Если вы не уверены, что загружали их, то, пожалуйста, удалите их в целях безопасности.' ) . "
    "; - + + $this->ipsclass->html .= $this->ipsclass->skin_acp_global->warning_box( 'Suspicious Files Detected', 'The unauthorized file scan located the following suspicious files.
    If you\'re unsure of their origin, please remove them immediately.' ) . "
    "; + $this->ipsclass->html .= $this->html->anti_virus_bad_files_wrapper( $content ); } else { - $this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( 'Подозрительные файлы не обнаружены', 'Сканер не обнаружил подозрительных файлов.
    Пожалуйста, старайтесь как можно чаще проводить эту проверку.' ) . "
    "; + $this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( 'No Suspicious Files Detected', 'The unauthorized file scan did not identify any suspicious files.
    Please scan regularly to ensure that your system is secure' ) . "
    "; } - + //----------------------------------------- // Show checked folders... //----------------------------------------- - + if ( is_array( $class_virus_checker->checked_folders ) and count( $class_virus_checker->checked_folders ) ) { foreach( $class_virus_checker->checked_folders as $name ) { $checked_content .= $this->html->anti_virus_checked_row( str_replace( ROOT_PATH, '', $name ) ); } - + $this->ipsclass->html .= $this->html->anti_virus_checked_wrapper( $checked_content ); } - - $this->ipsclass->admin->nav[] = array( '', 'Проверка на вирусы' ); - + + $this->ipsclass->admin->nav[] = array( '', 'Unauthorized File Check' ); + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // ACP LINK /*-------------------------------------------------------------------------*/ - + function do_acplink() { //----------------------------------------- // Update the setting... //----------------------------------------- - + $this->update_setting( 'security_remove_acp_link', $this->ipsclass->vars['security_remove_acp_link'] ? 0 : 1 ); - + //----------------------------------------- // Done.. //----------------------------------------- - - $lang = $this->ipsclass->vars['security_remove_acp_link'] == 0 ? 'восстановлена' : 'удалена'; - - $this->ipsclass->main_msg = "Ссылка на админцентр {$lang}."; + + $lang = $this->ipsclass->vars['security_remove_acp_link'] == 0 ? 'restored' : 'removed'; + + $this->ipsclass->main_msg = "ACP link display {$lang}"; $this->security_overview(); } - + /*-------------------------------------------------------------------------*/ // DYNAMIC IMAGES /*-------------------------------------------------------------------------*/ - + function do_dynamic_images() { //----------------------------------------- // Update the setting... //----------------------------------------- - + $this->update_setting( 'allow_dynamic_img', $this->ipsclass->vars['allow_dynamic_img'] ? 0 : 1 ); - + //----------------------------------------- // Done.. //----------------------------------------- - - $lang = $this->ipsclass->vars['allow_dynamic_img'] == 0 ? 'запрещены' : 'разрешены'; - - $this->ipsclass->main_msg = "Динамические изобаржения {$lang}."; + + $lang = $this->ipsclass->vars['allow_dynamic_img'] == 0 ? 'disabled' : 'enabled'; + + $this->ipsclass->main_msg = "Dynamic images {$lang}"; $this->security_overview(); } - + /*-------------------------------------------------------------------------*/ // STRONG HOLD COOKIE /*-------------------------------------------------------------------------*/ - + function do_stronghold() { //----------------------------------------- // Update the setting... //----------------------------------------- - + $this->update_setting( 'cookie_stronghold', $this->ipsclass->vars['cookie_stronghold'] ? 0 : 1 ); - + //----------------------------------------- // Done.. //----------------------------------------- - - $lang = $this->ipsclass->vars['cookie_stronghold'] == 0 ? 'выключены' : 'включены'; - - $this->ipsclass->main_msg = "Защищеные cookie {$lang}."; + + $lang = $this->ipsclass->vars['cookie_stronghold'] == 0 ? 'disabled' : 'enabled'; + + $this->ipsclass->main_msg = "Cookie stronghold {$lang}"; $this->security_overview(); } - + /*-------------------------------------------------------------------------*/ // Update setting /*-------------------------------------------------------------------------*/ - + function update_setting( $key, $value ) { //----------------------------------------- // Check //----------------------------------------- - + if ( ! $key ) { return FALSE; } - + //----------------------------------------- // Update DB //----------------------------------------- - + $this->ipsclass->DB->do_update( 'conf_settings', array( 'conf_value' => $value ), "conf_key='".$key."'" ); - + //----------------------------------------- // Rebuild settings cache //----------------------------------------- - + require_once( ROOT_PATH . 'sources/action_admin/settings.php' ); $settings = new ad_settings(); $settings->ipsclass =& $this->ipsclass; - + $settings->setting_rebuildcache(); - + //----------------------------------------- // Done... //----------------------------------------- - + return TRUE; } - - + + /*-------------------------------------------------------------------------*/ // View current log in logs /*-------------------------------------------------------------------------*/ - + function security_overview() { //----------------------------------------- // INIT //----------------------------------------- - + $content = array( 'bad' => '', 'good' => '', 'ok' => '' ); - $cache = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='systemvars'" ) ); - $cache_array = unserialize(stripslashes($cache['cs_value'])); - + $cache_array =& $this->ipsclass->cache['systemvars']; + //----------------------------------------- // Virus checker link //----------------------------------------- - + if ( intval($cache_array['last_virus_check']) < time() - 7 * 86400 ) { - $content['bad'] .= $this->html->security_item_bad( 'Сканер подозрительных файлов', - 'Сканер проверит наиболее часто используемые директории для загрузки файлов на подозрительные файлы.
    Сканер на подозрительные файлы не запускали более недели.', - 'Запустить', + $content['bad'] .= $this->html->security_item_bad( 'IPB Unauthorized File Checker', + 'The IPB unauthorized file checker will check your IPB installation for suspicious files.
    The unauthorized file checker has not been run in over a week', + 'Run Tool Now', $this->ipsclass->form_code_js.'&code=virus_check', 'vchecker' ); - + } else { $last_run = $this->ipsclass->get_date( $cache_array['last_virus_check'], 'SHORT' ); - $content['good'] .= $this->html->security_item_good( 'Сканер подозрительных файлов', - 'Сканер проверит наиболее часто используемые директории для загрузки файлов на подозрительные файлы.
    Последний запуск: '.$last_run, - 'Запустить', + $content['good'] .= $this->html->security_item_good( 'IPB Unauthorized File Checker', + 'The IPB unauthorized file checker will check your IPB installation for suspicious files.
    The unauthorized file checker was last run: '.$last_run, + 'Run Tool Now', $this->ipsclass->form_code_js.'&code=virus_check', 'vchecker' ); } - + //----------------------------------------- // Deep scan link //----------------------------------------- - + if ( intval($cache_array['last_deepscan_check']) < time() - 30 * 86400 ) { - $content['bad'] .= $this->html->security_item_bad( 'Глубокое сканирование', - 'Сканер проверит и выведет список всех файлов вашей системы.
    Сканер не запускали более месяца.', - 'Запустить', + $content['bad'] .= $this->html->security_item_bad( 'IPB Executables Deep Scan', + 'The IPB deep scanner will pick out and list every single executable file in your installation.
    The scanner has not been run in over a month', + 'Run Tool Now', $this->ipsclass->form_code_js.'&code=deep_scan', 'deepscan' ); - + } else { $last_run = $this->ipsclass->get_date( $cache_array['last_deepscan_check'], 'SHORT' ); - $content['good'] .= $this->html->security_item_good( 'Глубокое сканирование', - 'Сканер проверит и выведет список всех файлов вашей системы.
    Последний запуск: '.$last_run, - 'Запустить', + $content['good'] .= $this->html->security_item_good( 'IPB Executables Deep Scan', + 'The IPB deep scanner will pick out and list every single executable file in your installation.
    The scanner was last run: '.$last_run, + 'Run Tool Now', $this->ipsclass->form_code_js.'&code=deep_scan', 'deepscan' ); } - + //----------------------------------------- // Get .htaccess settings //----------------------------------------- - + if ( strtoupper( substr(PHP_OS, 0, 3) ) !== 'WIN' ) { $_extra = ''; - + if ( ! is_writeable( ROOT_PATH . IPB_ACP_DIRECTORY ) ) { - $_extra = "
    IPB не может произвести запись файла «.htaccess» в директорию админцентра. Пожалуйста, установите атрибуты доступа (CHMOD) 0777 на эту директорию при помощи FTP-программы.
    "; + $_extra = "
    IPB cannot write the .htaccess files into your '/admin/' directory. Please use your FTP client to CHMOD it to 0777.
    "; } - + if ( ! file_exists( ROOT_PATH . IPB_ACP_DIRECTORY . '/.htaccess' ) ) { - $content['ok'] .= $this->html->security_item_ok( 'Защита файлом «.htaccess» АЦ', - 'Для повышения безопасности вы можете добавить HTTP-аутентификацию на директорию админцентра (по умолчанию: /admin/).
    IPB не обнаружил «.htaccess» файл в директории админцентра.'. $_extra, - 'Подробнее', + $content['ok'] .= $this->html->security_item_ok( 'IPB ACP .htaccess Protection', + 'To make your ACP even more secure, you can add HTTP authentication in your "/admin/" directory.
    IPB cannot locate an ACP .htaccess file.'. $_extra, + 'Learn More', $this->ipsclass->form_code_js.'&code=acphtaccess', 'acphtaccess' ); } else { - $content['good'] .= $this->html->security_item_good( 'Защита файлом «.htaccess» АЦ', - 'Для повышения безопасности вы можете добавить HTTP-аутентификацию на директорию админцентра (по умолчанию: /admin/).
    IPB обнаружил «.htaccess» файл в директории админцентра.'.$_extra, - 'Подробнее', + $content['good'] .= $this->html->security_item_good( 'IPB ACP .htaccess Protection', + 'To make your ACP even more secure, you can take add HTTP authentication in your "/admin/" directory.
    IPB has located an ACP .htaccess file.'.$_extra, + 'Learn More', $this->ipsclass->form_code_js.'&code=acphtaccess', 'acphtaccess' ); } - + # Other htaccess protection if ( ! file_exists( ROOT_PATH . 'style_emoticons/.htaccess' ) ) { - $content['ok'] .= $this->html->security_item_ok( 'Защита файлом «.htaccess»', - 'IPB может записать файл «.htaccess» в директории, где не содержатся php-файлы, препятствуя тем самым запуску файлов PHP и CGI в этих директориях.
    IPB не обнаружил какие-либо «.htaccess» файлы.', - 'Запустить', - $this->ipsclass->form_code_js.'&code=htaccess', + $content['ok'] .= $this->html->security_item_ok( 'IPB PHP/CGI .htaccess Protection', + 'IPB can write .htaccess files to non-PHP directories to prevent PHP and CGI files from executing.
    IPB cannot locate any .htaccess files.', + 'Run Tool Now', + $this->ipsclass->form_code_js.'&code=htaccess', 'htaccess' ); } else { - $content['good'] .= $this->html->security_item_good( 'Защита файлом «.htaccess»', - 'IPB может записать файл «.htaccess» в директории, где не содержатся php-файлы, препятствуя тем самым запуску файлов PHP и CGI в этих директориях.
    IPB обнаружил «.htaccess» файлы.', - 'Запустить', + $content['good'] .= $this->html->security_item_good( 'IPB .htaccess Protection', + 'IPB can write .htaccess files to non-PHP directories to prevent PHP and CGI files from executing.
    IPB has located some .htaccess files.', + 'Run Tool Now', $this->ipsclass->form_code_js.'&code=htaccess', 'htaccess' ); } - + //----------------------------------------- // Conf global //----------------------------------------- - + if ( is_writeable( ROOT_PATH . 'conf_global.php' ) ) { - $content['bad'] .= $this->html->security_item_bad( 'Запись в файл «conf_global»', - 'После установки IPB рекомендуется изменить атрибуты доступа к файлу «conf_global.php», чтобы другие пользователи не могли произвести чтение или запись.
    «conf_global.php» доступен для записи.', - 'Запустить', + $content['bad'] .= $this->html->security_item_bad( 'Make "conf_global" un-writeable', + 'After installation, you should change the CHMOD on the "conf_global.php" file to prevent others from reading and writing to it.
    "conf_global.php" is writeable.', + 'Run Tool Now', $this->ipsclass->form_code_js.'&code=confglobal', 'confglobal' ); - + } else { - $content['good'] .= $this->html->security_item_good( 'Запись в файл «conf_global»', - 'После установки IPB рекомендуется изменить атрибуты доступа к файлу «conf_global.php», чтобы другие пользователи не могли произвести чтение или запись.
    «conf_global.php» недоступен для записи.', - 'Запустить', + $content['good'] .= $this->html->security_item_good( 'Make "conf_global" un-writeable', + 'After installation, you should change the CHMOD on the "conf_global.php" file to prevent others from reading and writing to it.
    "conf_global.php" is NOT writeable.', + 'Learn More', $this->ipsclass->form_code_js.'&code=confglobal', 'confglobal' ); } } - + //----------------------------------------- // Dynamic images //----------------------------------------- - + if ( ! $this->ipsclass->vars['allow_dynamic_img'] ) { - $content['good'] .= $this->html->security_item_good( 'Отключение динамических изображений', - 'IP.Board может запретить использовать динамические изображения в сообщениях. Их использование в сообщениях подвергает большому риску безопасность вашего форума.
    Динамические изображения в данный момент запрещены.', - 'Исправить', + $content['good'] .= $this->html->security_item_good( 'Disable Dynamic Images', + 'IPB can stop dynamic images being posted on your forums. Dynamic images pose a security risk as they allow javascript to run.
    Dynamic images are already disabled.', + 'Toggle Now', $this->ipsclass->form_code_js.'&code=dynamic_images', 'dynamic_images' ); - + } else { - $content['bad'] .= $this->html->security_item_bad( 'Отключение динамических изображений', - 'IP.Board может запретить использовать динамические изображения в сообщениях. Их использование в сообщениях подвергает большому риску безопасность вашего форума.
    Динамические изображения РАЗРЕШЕНЫ.', - 'Исправить', + $content['bad'] .= $this->html->security_item_bad( 'Disable Dynamic Images', + 'IPB can stop dynamic images being posted on your forums. Dynamic images pose a security risk ask they allow javascript to run.
    Dynamic images are ENABLED.', + 'Toggle Now', $this->ipsclass->form_code_js.'&code=dynamic_images', 'dynamic_images' ); } - + //----------------------------------------- - // Strong hold cookie + // Strong hold cookie //----------------------------------------- - + if ( ! $this->ipsclass->vars['cookie_stronghold'] ) { - $content['bad'] .= $this->html->security_item_bad( 'Защищенные cookies', - 'IPB может записывать более защищенные cookies в браузер пользователя после его успешной авторизации, тем самым снижая вероятность их кражи злоумышленником.
    Защищенные cookies отключены.', - 'Исправить', + $content['bad'] .= $this->html->security_item_bad( 'Enable the Stronghold Cookie', + 'IPB can store a stronghold cookie in the user\'s browser which is used when automatically logging in to prevent successful cookie theft.
    Stronghold cookies are disabled.', + 'Toggle Now', $this->ipsclass->form_code_js.'&code=stronghold', 'stronghold' ); - + } else { - $content['good'] .= $this->html->security_item_good( 'Защищенные cookies', - 'IPB может записывать более защищенные cookies в браузер пользователя после его успешной авторизации, тем самым снижая вероятность их кражи злоумышленником.
    Защищенные cookies включены.', - 'Исправить', + $content['good'] .= $this->html->security_item_good( 'Enable the Stronghold Cookie', + 'IPB can store a stronghold cookie in the user\'s browser which is used when automatically logging in to prevent successful cookie theft.
    Stronghold cookies are ENABLED.', + 'Toggle Now', $this->ipsclass->form_code_js.'&code=stronghold', 'stronghold' ); } - + //----------------------------------------- // Remove ACP link //----------------------------------------- - + if ( ! $this->ipsclass->vars['security_remove_acp_link'] ) { - $content['ok'] .= $this->html->security_item_ok( 'Удаление ссылки на админцентр', - 'IPB может удалить ссылку «Админцентр» из пользовательской панели навигации на вашем форуме.
    Данная ссылка отображается, когда пользователь авторизирован на форуме как администратор.', - 'Исправить', + $content['ok'] .= $this->html->security_item_ok( 'Remove ACP Link', + 'IPB can remove the "Admin CP" link from the board\'s header. This is useful when renaming the default \'admin\' directory.
    The ACP link is visible when logged in as an admin.', + 'Toggle Now', $this->ipsclass->form_code_js.'&code=acplink', 'acplink' ); - + } else { - $content['good'] .= $this->html->security_item_good( 'Удаление ссылки на админцентр', - 'IPB может удалить ссылку «Админцентр» из пользовательской панели навигации на вашем форуме.
    Данная ссылка отображается, когда пользователь авторизирован на форуме как администратор.
    Ссылка на админцентр в данный момент удалена.', - 'Исправить', + $content['good'] .= $this->html->security_item_good( 'Remove ACP Link', + 'IPB can remove the "Admin CP" link from the board\'s header. This is useful when renaming the default \'admin\' directory.
    The ACP link has been removed.', + 'Toggle Now', $this->ipsclass->form_code_js.'&code=acplink', 'acplink' ); } - + //----------------------------------------- // ACP directory renamed //----------------------------------------- - + if ( IPB_ACP_DIRECTORY == 'admin' ) { - $content['ok'] .= $this->html->security_item_ok( 'Название директории АЦ', - 'Стандартную директорию админцентра (/admin/) можно переименовать — тем самым злоумышленнику будет сложнее нарушить работу форума в случае взлома учетной записи какого-либо из администраторов.
    Директория админцентра не переименована.', - 'Подробнее', + $content['ok'] .= $this->html->security_item_ok( 'Rename the \'admin\' directory', + 'The default \'admin\' directory can be renamed to make it hard to find.
    The admin directory has not been renamed.', + 'Learn More', $this->ipsclass->form_code_js.'&code=acprename', 'acprename' ); - + } else { - $content['good'] .= $this->html->security_item_good( 'Название директории АЦ', - 'Стандартную директорию админцентра (/admin/) можно переименовать — тем самым злоумышленнику будет сложнее нарушить работу форума в случае взлома учетной записи какого-либо из администраторов.
    Директория админцентра переименована.', - 'Подробнее', + $content['good'] .= $this->html->security_item_good( 'Rename the \'admin\' directory', + 'The default \'admin\' directory can be renamed to make it hard to find.
    The admin directory HAS been renamed.', + 'Learn More', $this->ipsclass->form_code_js.'&code=acprename', 'acprename' ); } - - + + //----------------------------------------- // Print... //----------------------------------------- - - + + $this->ipsclass->html .= $this->html->security_overview( $content ); - + $this->ipsclass->admin->output(); } } -?> +?> \ No newline at end of file diff --git a/upload/sources/action_admin/settings.php b/upload/sources/action_admin/settings.php index 69c32d93..83d33566 100644 --- a/upload/sources/action_admin/settings.php +++ b/upload/sources/action_admin/settings.php @@ -2,25 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-11-01 16:46:24 -0600 (Wed, 01 Nov 2006) $ -| > $Revision: 695 $ +| > $Date: 2008-04-24 11:40:55 -0400 (Thu, 24 Apr 2008) $ +| > $Revision: 1258 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -35,42 +27,43 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } class ad_settings { var $base_url; - var $in_group = array(); - var $key_array = array(); + var $in_group = array(); + var $key_array = array(); - var $get_by_key = ""; - var $return_after_save = ""; + var $get_by_key = ""; + var $return_after_save = ""; var $html; var $parser; var $han_editor; - var $image_dir; - var $editor_loaded = 0; + var $image_dir = null; + var $editor_loaded = 0; + var $help_settings = array(); /** * Section title name * * @var string */ - var $perm_main = "tools"; + var $perm_main = "tools"; /** * Section title name * * @var string */ - var $perm_child = "op"; + var $perm_child = "op"; function auto_run() { - $this->ipsclass->admin->nav[] = array( "{$this->ipsclass->form_code}", "Просмотр всех основных настроек" ); + $this->ipsclass->admin->nav[] = array( "{$this->ipsclass->form_code}", "View General Settings" ); //----------------------------------------- // Load template @@ -78,6 +71,12 @@ class ad_settings { $this->html = $this->ipsclass->acp_load_template( 'cp_skin_settings' ); + //----------------------------------------- + // Get XML Class for help keys + //----------------------------------------- + + require_once( KERNEL_PATH . 'class_xml.php' ); + //----------------------------------------- $this->ipsclass->DB->sql_get_version(); @@ -142,6 +141,11 @@ class ad_settings { $this->setting_view(); break; + case 'setting_help': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->setting_help(); + break; + case 'setting_delete': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->setting_delete(); @@ -221,7 +225,7 @@ class ad_settings { $xml_settings = array(); $fields = array( 'conf_title' , 'conf_description', 'conf_group' , 'conf_type' , 'conf_key' , 'conf_default', 'conf_extra' , 'conf_evalphp' , 'conf_protected', 'conf_position', 'conf_start_group', 'conf_end_group', - 'conf_help_key', 'conf_add_cache' , 'conf_title_keyword' ); + 'conf_add_cache' , 'conf_title_keyword' ); $upload_new = array(); $upload_missing = array(); $original_new = array(); @@ -252,10 +256,8 @@ class ad_settings { require_once( KERNEL_PATH.'class_xml.php' ); $xml = new class_xml(); - - $xml->lite_parser = 1; - - //----------------------------------------- + + //----------------------------------------- // Unpack the datafile //----------------------------------------- @@ -271,11 +273,7 @@ class ad_settings { // Ensure [0] is populated //----------------------------------------- - $tmp = $xml->xml_array['settingexport']['settinggroup']['setting']; - - unset($xml->xml_array['settingexport']['settinggroup']['setting']); - - $xml->xml_array['settingexport']['settinggroup']['setting'][0] = $tmp; + $xml->xml_array['settingexport']['settinggroup']['setting'] = array( 0 => $xml->xml_array['settingexport']['settinggroup']['setting'] ); } //----------------------------------------- @@ -330,7 +328,7 @@ class ad_settings { // IMPORT PARTIAL SETTINGS /*-------------------------------------------------------------------------*/ - function settings_do_import( $noreturn=0, $use_lite_xml=1 ) + function settings_do_import( $noreturn=0 ) { //----------------------------------------- // INIT @@ -358,13 +356,13 @@ class ad_settings { if ( ! $this->ipsclass->input['file_location'] ) { - $this->ipsclass->main_msg = "Не выбрано ни одного файла для загрузки или неправильное название файла."; + $this->ipsclass->main_msg = "No upload file was found and no filename was specified."; $this->setting_start(); } if ( ! file_exists( ROOT_PATH . $this->ipsclass->input['file_location'] ) ) { - $this->ipsclass->main_msg = "Невозможно найти файл, чтобы открыть: " . ROOT_PATH . $this->ipsclass->input['file_location']; + $this->ipsclass->main_msg = "Could not find the file to open at: " . ROOT_PATH . $this->ipsclass->input['file_location']; $this->setting_start(); } @@ -403,7 +401,7 @@ class ad_settings { if ( ! $content ) { - $this->ipsclass->admin->error( "Импортируемый файл имеет неправильный формат или испорчен." ); + $this->ipsclass->admin->error( "Import file is not in the correct format or is corrupt" ); } if ( $tool == 'check' ) @@ -441,11 +439,6 @@ class ad_settings { $xml = new class_xml(); - if ( $use_lite_xml ) - { - $xml->lite_parser = 1; - } - //----------------------------------------- // Unpack the datafile //----------------------------------------- @@ -458,7 +451,7 @@ class ad_settings { $fields = array( 'conf_title' , 'conf_description', 'conf_group' , 'conf_type' , 'conf_key' , 'conf_default', 'conf_extra' , 'conf_evalphp' , 'conf_protected', 'conf_position', 'conf_start_group', 'conf_end_group', - 'conf_help_key', 'conf_add_cache' , 'conf_title_keyword' ); + 'conf_add_cache' , 'conf_title_keyword' ); $setting_fields = array( 'conf_title_keyword', 'conf_title_title', 'conf_title_desc', 'conf_title_noshow', 'conf_title_module' ); @@ -472,11 +465,7 @@ class ad_settings { // Ensure [0] is populated //----------------------------------------- - $tmp = $xml->xml_array['settingexport']['settinggroup']['setting']; - - unset($xml->xml_array['settingexport']['settinggroup']['setting']); - - $xml->xml_array['settingexport']['settinggroup']['setting'][0] = $tmp; + $xml->xml_array['settingexport']['settinggroup']['setting'] = array( 0 => $xml->xml_array['settingexport']['settinggroup']['setting'] ); } //----------------------------------------- @@ -650,7 +639,7 @@ class ad_settings { // Resync //----------------------------------------- - $this->ipsclass->main_msg = "$updated настройки обновлены и $inserted добавлены"; + $this->ipsclass->main_msg = "$updated settings updated $inserted settings inserted"; if ( ! $noreturn ) { @@ -694,7 +683,7 @@ class ad_settings { if ( ! count( $ids ) ) { - $this->ipsclass->main_msg = "Вы должны выделить хоть КАКИЕ-НИБУДЬ настройки для экспорта!"; + $this->ipsclass->main_msg = "You must select SOME settings to export!"; $this->setting_someexport_start(); } @@ -792,9 +781,9 @@ class ad_settings { function setting_someexport_start() { - $this->ipsclass->admin->page_title = "Экспорт выделенных настроек системы"; - $this->ipsclass->admin->page_detail = "Проверьте все поля, которые вы выделили для экспорта настроек"; - $this->ipsclass->admin->nav[] = array( '', "Настройки экспорта" ); + $this->ipsclass->admin->page_title = "Export Selected System Settings"; + $this->ipsclass->admin->page_detail = "Check the box of the setting you wish to export."; + $this->ipsclass->admin->nav[] = array( '', "Export Settings" ); //----------------------------------------- // start form @@ -806,7 +795,7 @@ class ad_settings { ) ); $this->ipsclass->html .= "
    -
    Системные настройки
    +
    System Settings
    "; $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'conf_settings', 'order' => 'conf_id' ) ); @@ -848,7 +837,7 @@ class ad_settings { $this->ipsclass->html .= $output; $this->ipsclass->html .= "
    -
    "; +
    "; $this->ipsclass->admin->output(); } @@ -1011,13 +1000,13 @@ class ad_settings { if ( $count > 0 ) { - $this->ipsclass->main_msg = "Нельзя удалить эту группу настроек, так как в ней содержатся активные настройки"; + $this->ipsclass->main_msg = "Cannot remove this setting group as it still contains active settings"; } else { $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'conf_settings_titles', 'where' => 'conf_title_id='.intval($this->ipsclass->input['id']) ) ); - $this->ipsclass->main_msg = "Группа настроек удалена"; + $this->ipsclass->main_msg = "Setting Group Removed"; } } @@ -1053,15 +1042,15 @@ class ad_settings { function settinggroup_form( $type='add' ) { - $this->ipsclass->admin->page_title = "Настройка конфигурации системы"; - $this->ipsclass->admin->page_detail = "Эта секция содержит все конфигурационные опции для вашего IPB."; - $this->ipsclass->admin->nav[] = array( '', "Добавление/изменение настройки" ); + $this->ipsclass->admin->page_title = "System Configuration Settings"; + $this->ipsclass->admin->page_detail = "This section contains all the configuration options for your IPB."; + $this->ipsclass->admin->nav[] = array( '', "Add/Edit Settings" ); if ( $type == 'add' ) { $formcode = 'settinggroup_add'; - $title = "Создание новой группы системных настроек"; - $button = "Создать"; + $title = "Create New Board Setting Group"; + $button = "Create New Setting Group"; $conf = array( 'conf_title_title' => '', 'conf_title_desc' => '', 'conf_title_keyword' => '', @@ -1074,13 +1063,13 @@ class ad_settings { if ( ! $conf['conf_title_id'] ) { - $this->ipsclass->main_msg = "Нет пригодного ID, попробуйте заново ."; + $this->ipsclass->main_msg = "No ID was passed, please try again."; $this->setting_start(); } $formcode = 'settinggroup_edit'; - $title = "Редактирование настройки ".$conf['conf_title']; - $button = "Сохранить изменения"; + $title = "Edit Setting ".$conf['conf_title']; + $button = "Save Changes"; } $this->ipsclass->admin->page_detail = ' '; @@ -1109,19 +1098,19 @@ class ad_settings { $this->ipsclass->html .= $this->ipsclass->adskin->start_table( $title ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Название" , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Setting Group title?" , $this->ipsclass->adskin->form_input( 'conf_title_title', ( isset($_POST['conf_title_title']) AND $_POST['conf_title_title'] ) ? $_POST['conf_title_title'] : $conf['conf_title_title'] ) ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Описание" , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Setting Group Description?" , $this->ipsclass->adskin->form_textarea( 'conf_title_desc', ( isset($_POST['conf_title_desc']) AND $_POST['conf_title_desc'] ) ? $_POST['conf_title_desc'] : $conf['conf_title_desc'] ) ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Ключевое слово
    Используется для того, чтобы получить из базы данных без ссылки на ID." , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Setting Group Keyword?
    Used to pull this from the DB without relying on an ID
    " , $this->ipsclass->adskin->form_input( 'conf_title_keyword', ( isset($_POST['conf_title_keyword']) AND $_POST['conf_title_keyword'] ) ? $_POST['conf_title_keyword'] : $conf['conf_title_keyword'] ) ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "PHP-модуль
    Введите название PHP-модуля (например, example.php). Указанный файл должен быть загружен в директорию /sources/components_acp/setting_plugins." , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Setting Group Module?
    Enter the filename of the PHP module file (eg: example.php) for pre and post setting parsing. The file name must be uploaded into the /sources/components_acp/setting_plugins directory." , $this->ipsclass->adskin->form_input( 'conf_title_module', ( isset($_POST['conf_title_module']) AND $_POST['conf_title_module'] ) ? $_POST['conf_title_module'] : $conf['conf_title_module'] ) ) ); @@ -1131,7 +1120,7 @@ class ad_settings { if ( IN_DEV ) { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Скрыть из списка системных настроек?" , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Hide from main settings list?" , $this->ipsclass->adskin->form_yes_no( 'conf_title_noshow', ( isset($_POST['conf_title_noshow']) AND $_POST['conf_title_noshow'] ) ? $_POST['conf_title_noshow'] : $conf['conf_title_noshow'] ) ) ); } @@ -1163,7 +1152,7 @@ class ad_settings { if ( ! $conf_title_keyword ) { - $this->ipsclass->main_msg = "Вы должны ввести уникальное ключевое слово для: Ключевые слова для группы"; + $this->ipsclass->main_msg = "You must enter a unique keyword for: Setting Group Keyword"; $this->settinggroup_form(); return; } @@ -1179,14 +1168,14 @@ class ad_settings { { if ( ! $this->ipsclass->input['id'] ) { - $this->ipsclass->main_msg = "Нет пригодного ID, попробуйте заново "; + $this->ipsclass->main_msg = "No ID was passed, please try again"; $this->settinggroup_form(); return; } if ( $test['conf_title_title'] AND $test['conf_title_id'] != $this->ipsclass->input['id'] ) { - $this->ipsclass->main_msg = "Вы уже используете это ключевое слово для уже существующих групп"; + $this->ipsclass->main_msg = "You are already using this keyword for another setting group"; $this->settinggroup_form(); return; } @@ -1197,7 +1186,7 @@ class ad_settings { { if ( $test['conf_title_title'] ) { - $this->ipsclass->main_msg = "Вы уже используете это ключевое слово для уже существующих групп"; + $this->ipsclass->main_msg = "You are already using this keyword for another setting group"; $this->settinggroup_form(); return; } @@ -1210,7 +1199,7 @@ class ad_settings { $array = array( 'conf_title_title' => $this->ipsclass->input['conf_title_title'], 'conf_title_desc' => $this->ipsclass->txt_stripslashes( $_POST['conf_title_desc'] ), 'conf_title_keyword' => $conf_title_keyword, - 'conf_title_noshow' => $this->ipsclass->input['conf_title_noshow'], + 'conf_title_noshow' => intval($this->ipsclass->input['conf_title_noshow']), 'conf_title_module' => $this->ipsclass->input['conf_title_module'] ); @@ -1218,12 +1207,12 @@ class ad_settings { if ( $type == 'add' ) { $this->ipsclass->DB->do_insert( 'conf_settings_titles', $array ); - $this->ipsclass->main_msg = 'Готово!'; + $this->ipsclass->main_msg = 'New Setting Group Added'; } else { $this->ipsclass->DB->do_update( 'conf_settings_titles', $array, 'conf_title_id='.intval($this->ipsclass->input['id']) ); - $this->ipsclass->main_msg = 'Готово!'; + $this->ipsclass->main_msg = 'Setting Group Edited'; } $this->setting_rebuildcache(); @@ -1239,15 +1228,15 @@ class ad_settings { function setting_form( $type='add' ) { - $this->ipsclass->admin->page_title = "Настройка конфигурации системы"; - $this->ipsclass->admin->page_detail = "Эта секция содержит все конфигурационные опции для вашего IPB."; - $this->ipsclass->admin->nav[] = array( '', "Добавление/изменение настройки" ); + $this->ipsclass->admin->page_title = "System Configuration Settings"; + $this->ipsclass->admin->page_detail = "This section contains all the configuration options for your IPB."; + $this->ipsclass->admin->nav[] = array( '', "Add/Edit Settings" ); if ( $type == 'add' ) { $formcode = 'setting_add'; - $title = "Добавление настройки"; - $button = "Создать"; + $title = "Create New Board Setting"; + $button = "Create New Setting"; $conf = array( 'conf_group' => $this->ipsclass->input['conf_group'], 'conf_add_cache' => 1, 'conf_title' => '', @@ -1259,8 +1248,7 @@ class ad_settings { 'conf_extra' => '', 'conf_evalphp' => '', 'conf_start_group' => '', - 'conf_end_group' => '', - 'conf_help_key' => '' ); + 'conf_end_group' => '' ); if ( IN_DEV ) { @@ -1284,13 +1272,13 @@ class ad_settings { if ( ! $conf['conf_id'] ) { - $this->ipsclass->main_msg = "Нет пригодного ID, попробуйте заново."; + $this->ipsclass->main_msg = "No ID was passed, please try again."; $this->setting_start(); } $formcode = 'setting_edit'; - $title = "Редактирование настройки «{$conf['conf_title']}»"; - $button = "Изменить"; + $title = "Edit Setting ".$conf['conf_title']; + $button = "Save Changes"; } $this->ipsclass->admin->page_detail = ' '; @@ -1313,12 +1301,12 @@ class ad_settings { // Type //----------------------------------------- - $types = array( 0 => array( 'input' , 'Ввод текста (одна строка)' ), - 1 => array( 'dropdown', 'Выпадающее меню' ), - 2 => array( 'yes_no' , 'Да/нет (единичный выбор ответа)'), - 3 => array( 'textarea', 'Текстовое поле' ), - 4 => array( 'editor' , 'Редактор' ), - 5 => array( 'multi' , 'Мульти-выбор' ), + $types = array( 0 => array( 'input' , 'Text Input' ), + 1 => array( 'dropdown', 'Drop Down' ), + 2 => array( 'yes_no' , 'Yes/No Radio Buttons'), + 3 => array( 'textarea', 'Textarea' ), + 4 => array( 'editor' , 'Full Editor' ), + 5 => array( 'multi' , 'Multi Select' ), ); //----------------------------------------- @@ -1344,66 +1332,62 @@ class ad_settings { $this->ipsclass->html .= $this->ipsclass->adskin->start_table( $title ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Название" , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Setting title?" , $this->ipsclass->adskin->form_input( 'conf_title', ( isset($_POST['conf_title']) AND $_POST['conf_title'] ) ? $_POST['conf_title'] : $conf['conf_title'] ) ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Расположение" , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Setting Position?" , $this->ipsclass->adskin->form_input( 'conf_position', ( isset($_POST['conf_position']) AND $_POST['conf_position'] ) ? $_POST['conf_position'] : $conf['conf_position'] ) ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Описание" , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Setting Description?" , $this->ipsclass->adskin->form_textarea( 'conf_description', ( isset($_POST['conf_description']) AND $_POST['conf_description'] ) ? $_POST['conf_description'] : $conf['conf_description'] ) ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Группа" , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Setting Group?" , $this->ipsclass->adskin->form_dropdown( 'conf_group', $groups, ( isset($_POST['conf_group']) AND $_POST['conf_group'] ) ? $_POST['conf_group'] : $conf['conf_group'] ) ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Тип" , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Setting Type?" , $this->ipsclass->adskin->form_dropdown( 'conf_type', $types, ( isset($_POST['conf_type']) AND $_POST['conf_type'] ) ? $_POST['conf_type'] : $conf['conf_type'] ) ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Ключ" , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Setting Key?" , $this->ipsclass->adskin->form_input( 'conf_key', ( isset($_POST['conf_key']) AND $_POST['conf_key'] ) ? $_POST['conf_key'] : $conf['conf_key'] ) ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Текущее значение" , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Setting Current Value?" , $this->ipsclass->adskin->form_textarea( 'conf_value', $this->ipsclass->txt_htmlspecialchars( ( isset($_POST['conf_value']) AND $_POST['conf_value'] ) ? $_POST['conf_value'] : $conf['conf_value'] ) ) ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Значение по умолчанию?" , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Setting Default Value?" , $this->ipsclass->adskin->form_textarea( 'conf_default', $this->ipsclass->txt_htmlspecialchars( ( isset($_POST['conf_default']) AND $_POST['conf_default'] ) ? $_POST['conf_default'] : $conf['conf_default'] ) ) ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Дополнительно
    Используетя для ввода дополнительной информации.
    Пример использования для выпадающего меню: key=value (по одному на строку).
    " , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Setting Extra?
    Use for creating form element extras.
    Drop down box use: Key=Value; one per line.
    " , $this->ipsclass->adskin->form_textarea( 'conf_extra', ( isset($_POST['conf_extra']) AND $_POST['conf_extra'] ) ? $_POST['conf_extra'] : $conf['conf_extra'] ) ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Выполнение PHP-кода до отображения или сохранения настройки:
    \$show = 1; до отображения настройки.
    \$save = 1; до сохранения настройки.
    Используйте \$key и \$value во время написания PHP-кода.
    " , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Raw PHP code to eval before showing and saving?
    \$show = 1; is set when showing setting.
    \$save = 1; is set when saving the setting.
    Use \$key and \$value when writing PHP code.
    " , $this->ipsclass->adskin->form_textarea( 'conf_evalphp', ( isset($_POST['conf_evalphp']) AND $_POST['conf_evalphp'] ) ? $_POST['conf_evalphp'] : $conf['conf_evalphp'] ) ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Начать группу настроек:
    Введите название или оставьте поле пустым, если вы не хотите начинать новую группу.
    " , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Start setting group?
    Enter title here or leave blank to not start a setting group
    " , $this->ipsclass->adskin->form_input( 'conf_start_group', ( isset($_POST['conf_start_group']) AND $_POST['conf_start_group'] ) ? $_POST['conf_start_group'] : $conf['conf_start_group'] ) ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Закончить группу настроек?
    Вы можете закрыть открытую группу.
    " , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "End setting group?
    End an opened setting group
    " , $this->ipsclass->adskin->form_yes_no( 'conf_end_group', ( isset($_POST['conf_end_group']) AND $_POST['conf_end_group'] ) ? $_POST['conf_end_group'] : $conf['conf_end_group'] ) ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Ключ помощи (опционально)
    «Ключ» используется для ссылок к помощи админцентра.
    " , - $this->ipsclass->adskin->form_input( 'conf_help_key', ( isset($_POST['conf_help_key']) AND $_POST['conf_help_key'] ) ? $_POST['conf_help_key'] : $conf['conf_help_key'] ) - ) ); - if ( IN_DEV ) { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Сделать настройкой по умолчанию?
    Пользователи не смогут удалить эту настройку.
    " , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Make a default settings (cannot be removed by user)?" , $this->ipsclass->adskin->form_yes_no( 'conf_protected', ( isset($_POST['conf_protected']) AND $_POST['conf_protected'] ) ? $_POST['conf_protected'] : $conf['conf_protected'] ) ) ); } - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Добавить в кеш настроек?" , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Add this option into the settings cache?" , $this->ipsclass->adskin->form_yes_no( 'conf_add_cache', ( isset($_POST['conf_add_cache']) AND $_POST['conf_add_cache'] ) ? $_POST['conf_add_cache'] : $conf['conf_add_cache'] ) ) ); @@ -1429,19 +1413,26 @@ class ad_settings { //----------------------------------------- // INIT //----------------------------------------- - - $search_key = isset($this->ipsclass->input['search']) ? trim( urldecode( $this->ipsclass->input['search'] ) ) : ''; - $conf_group = $this->ipsclass->input['conf_group']; - $conf_titles = array(); - $in_group = array(); - $last_conf_id = -1; - $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; - $end = 150; + + $search_key = isset($this->ipsclass->input['search']) ? trim( urldecode( $this->ipsclass->input['search'] ) ) : ''; + $conf_group = $this->ipsclass->input['conf_group']; + $conf_title_keyword = $this->ipsclass->input['conf_title_keyword']; + $conf_titles = array(); + $in_group = array(); + $last_conf_id = -1; + $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; + $end = 150; $this->ipsclass->input['search'] = isset($this->ipsclass->input['search']) ? $this->ipsclass->input['search'] : ''; - $load_modules = array(); - $key_array = array(); - $_show_error = 0; - $html = ''; + $load_modules = array(); + $key_array = array(); + $_show_error = 0; + $html = ''; + + //----------------------------------------- + // Sort out key stuff + //----------------------------------------- + + $this->get_by_key = $this->get_by_key ? $this->get_by_key : ( $conf_title_keyword ? $conf_title_keyword : '' ); //----------------------------------------- // Load and config the std/rte editors @@ -1450,8 +1441,8 @@ class ad_settings { require_once( ROOT_PATH."sources/handlers/han_editor.php" ); $this->han_editor = new han_editor(); $this->han_editor->ipsclass =& $this->ipsclass; - $this->han_editor->init(); $this->han_editor->from_acp = 1; + $this->han_editor->init(); //----------------------------------------- // Load and config the post parser @@ -1464,12 +1455,20 @@ class ad_settings { $this->parser->bypass_badwords = 1; + $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'acp_help', 'where' => "is_setting=1" ) ); + $this->ipsclass->DB->exec_query(); + + while( $r = $this->ipsclass->DB->fetch_row() ) + { + $this->help_settings[ $r['page_key'] ] = $r; + } + //----------------------------------------- // Page headers //----------------------------------------- - $this->ipsclass->admin->page_title = $this->ipsclass->admin->page_title ? $this->ipsclass->admin->page_title : "Настройки системной конфигурации"; - $this->ipsclass->admin->page_detail = $this->ipsclass->admin->page_detail ? $this->ipsclass->admin->page_detail : "Эта секция содержит все конфигурационные настройки системы IP.Board.
    Если вы желаете оставить запись пустой, пожалуйста используйте ключевую фразу: {blank} или значение: 0."; + $this->ipsclass->admin->page_title = $this->ipsclass->admin->page_title ? $this->ipsclass->admin->page_title : "System Configuration Settings"; + $this->ipsclass->admin->page_detail = $this->ipsclass->admin->page_detail ? $this->ipsclass->admin->page_detail : "This section contains all the configuration options for your IPB.
    If you wish to leave an entry blank, please use the keyword: {blank} or enter a zero: 0."; //----------------------------------------- // Already got our fields? @@ -1489,6 +1488,8 @@ class ad_settings { { $load_modules[ $r['conf_title_module'] ] = $_data['conf_title_module']; } + + $this->ipsclass->my_group_helpkey = $_data['conf_title_keyword']; } $title = "Settings for group: {$group_title}"; @@ -1512,6 +1513,8 @@ class ad_settings { $conf_group = $r['conf_title_id']; $conf_title = $r['conf_title_title']; + $this->ipsclass->my_group_helpkey = $r['conf_title_keyword']; + if ( $r['conf_title_module'] ) { $load_modules[ $r['conf_title_module'] ] = $r['conf_title_module']; @@ -1526,7 +1529,7 @@ class ad_settings { if ( ! $conf_group and ! $search_key ) { - $this->ipsclass->main_msg = "Ни одна группа не выбрана, попробуйте снова."; + $this->ipsclass->main_msg = "No group was passed, please try again."; $this->setting_start(); } @@ -1566,7 +1569,7 @@ class ad_settings { if ( ! count( $conf_entry ) ) { - $this->ipsclass->main_msg = "Не найдено ни одной настройки, соответствующей запросу «{$keywords}»."; + $this->ipsclass->main_msg = "Your search for '$keywords' produced no matches."; $this->setting_start(); } @@ -1586,7 +1589,7 @@ class ad_settings { 'where' => "c.conf_group='{$conf_group}'", 'order' => 'c.conf_position, c.conf_title', 'limit' => array( $start,$end ), - 'add_join' => array( 0 => array( 'select' => 'cc.conf_title_title, cc.conf_title_module', + 'add_join' => array( 0 => array( 'select' => 'cc.conf_title_title, cc.conf_title_module, cc.conf_title_keyword', 'from' => array( 'conf_settings_titles' => 'cc' ), 'where' => 'cc.conf_title_id=c.conf_group', 'type' => 'left' @@ -1601,6 +1604,8 @@ class ad_settings { $conf_entry[ $r['conf_id'] ] = $r; + $this->ipsclass->my_group_helpkey = $r['conf_title_keyword']; + if ( $r['conf_end_group'] ) { $in_g = 0; @@ -1622,7 +1627,7 @@ class ad_settings { } } - $title = "Список настроек группы «{$group_title}»"; + $title = "Settings for group: {$group_title}"; } } @@ -1646,7 +1651,7 @@ class ad_settings { 'PER_PAGE' => $end, 'CUR_ST_VAL' => $start, 'L_SINGLE' => "", - 'L_MULTI' => "Страниц: ", + 'L_MULTI' => "Multi Page", 'BASE_URL' => $this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=setting_view&search={$search_key}", 'search' => $search_key, ) ); @@ -1664,8 +1669,8 @@ class ad_settings { if ( ! $search_key AND ! $this->get_by_key ) { - $html .= $this->ipsclass->adskin->js_make_button("Добавить настройку" , $this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=settingnew&conf_group=".$conf_group).' '; - $html .= ""; + $html .= $this->ipsclass->adskin->js_make_button("Add New Setting" , $this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=settingnew&conf_group=".$conf_group).' '; + $html .= ""; } $html .= "   @@ -1707,7 +1712,7 @@ class ad_settings { { if ( ! $_show_error ) { - if ( $r['_error'] ) + if ( isset($r['_error']) AND $r['_error'] ) { $_show_error = 1; } @@ -1719,19 +1724,48 @@ class ad_settings { if ( $_show_error ) { - $this->ipsclass->html .= $this->ipsclass->skin_acp_global->warning_box( "Ошибка настроек", "Одна или более настроек возвращают ошибку.
    Настройки не обновлены." ) . "
    "; + $this->ipsclass->html .= $this->ipsclass->skin_acp_global->warning_box( "Settings Error", "One or more of the settings returned an error.
    The settings were NOT updated." ) . "
    "; } $this->ipsclass->html .= $html; $this->ipsclass->html .= ""; - $this->ipsclass->html .= "
    "; + $this->ipsclass->html .= "
    "; - $this->ipsclass->html .= "

    Системные настройки ".$this->setting_make_dropdown()."
    "; + $this->ipsclass->html .= "

    Settings Quick Jump".$this->setting_make_dropdown()."
    "; $this->ipsclass->admin->output(); } + + function setting_help() + { + $key = trim( $this->ipsclass->input['key'] ); + + //----------------------------------------- + // Load and parse help key file + //----------------------------------------- + + $help = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'acp_help', 'where' => "page_key='{$key}' AND is_setting=1" ) ); + + if( !$help['page_key'] ) + { + $this->ipsclass->html = $this->ipsclass->skin_acp_global->warning_box( "Help text not found", "We're sorry - the help text you were looking for could not be found" ); + } + else + { + $help['title'] = str_replace( '{base_url}', $this->ipsclass->base_url, $help['help_title'] ); + $help['helptext'] = str_replace( '{base_url}', $this->ipsclass->base_url, $help['help_body'] ); + + $help['title'] = str_replace( '{skin_url}', $this->ipsclass->skin_acp_url, $help['title'] ); + $help['helptext'] = str_replace( '{skin_url}', $this->ipsclass->skin_acp_url, $help['helptext'] ); + + $this->ipsclass->html = $this->html->popup_help( $help['title'], $help['helptext'] ); + } + + $this->ipsclass->admin->print_popup(); + } + //----------------------------------------- // Settings show - core routine... //----------------------------------------- @@ -1763,7 +1797,7 @@ class ad_settings { { $tablerow1 = "tablerow1shaded"; $tablerow2 = "tablerow2shaded"; - $revert_button = ""; + $revert_button = ""; if( $r['conf_type'] == 'editor' ) { @@ -1850,6 +1884,11 @@ class ad_settings { while( $row = $this->ipsclass->DB->fetch_row() ) { + if( $row['g_id'] == $this->ipsclass->vars['admin_group'] AND $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) + { + continue; + } + $dropdown[] = array( $row['g_id'], $row['g_title'] ); } } @@ -1882,11 +1921,18 @@ class ad_settings { break; } + $help_key = ''; + + if( array_key_exists( $r['conf_key'], $this->help_settings ) ) + { + $help_key = "  ipsclass->base_url}§ion=tools&act=op&code=setting_help&key={$r['conf_key']}', 400, 500, 'SettingHelp' );return false;\" title='{$this->help_settings[ $r['conf_key'] ]['help_mouseover']}'>{$this->help_settings[ $r["; + } + //----------------------------------------- // Error? //----------------------------------------- - if ( $r['_error'] ) + if ( isset($r['_error']) AND $r['_error'] ) { $form_element = "
    ".$r['_error']."
    " . $form_element; } @@ -1895,8 +1941,8 @@ class ad_settings { // Continue //----------------------------------------- - $delete = "| Удалить"; - $edit = "Изменить"; + $delete = "| Delete"; + $edit = "Edit"; $reorder = 1; if ( $r['conf_protected'] and ! IN_DEV ) @@ -1947,13 +1993,13 @@ class ad_settings { $r['conf_title'] = preg_replace( "/(".$this->ipsclass->input['search'].")/i", "\\1", $r['conf_title'] ); $r['conf_description'] = preg_replace( "/(".$this->ipsclass->input['search'].")/i", "\\1", $r['conf_description'] ); - $r['conf_description'] .= "

    Группа настроек: {$r['conf_title_title']}"; + $r['conf_description'] .= "

    Setting Group: {$r['conf_title_title']}"; } $html = "$start - + "; @@ -1986,8 +2032,8 @@ class ad_settings { function setting_start() { - $this->ipsclass->admin->page_title = "Системные настройки"; - $this->ipsclass->admin->page_detail = "Эта секция позволяет вам изменять системные настройки вашего IPB."; + $this->ipsclass->admin->page_title = "System Configuration Settings"; + $this->ipsclass->admin->page_detail = "This section contains all the configuration options for your IPB."; //----------------------------------------- // Are we, like, in dev or what? @@ -2013,10 +2059,10 @@ class ad_settings { $_mtime = $this->ipsclass->get_date( $last_settings_save , 'JOINED' ); $_dbtime = $this->ipsclass->get_date( $last_update['cs_value'], 'JOINED' ); - $_html = $this->ipsclass->skin_acp_global->warning_box( "Файл «settings.xml» обновлен", - "Файл «resources/settings.xml» был обновлен. Пожалуйста, посетите эту страницу для повторного импортирования. -
    Дата последнего изменения файла «settings.xml»: $_mtime. -
    Последний запуск импортирования: $_dbtime" ) . "
    "; + $_html = $this->ipsclass->skin_acp_global->warning_box( "settings.xml File Updated", + "The 'resources/settings.xml' file has been updated. Please visit this page to re-import it to make sure your settings are up-to-date +
    Last modified time for 'settings.xml': $_mtime. +
    Last import run: $_dbtime" ) . "
    "; $this->ipsclass->html .= $_html; } @@ -2034,8 +2080,8 @@ class ad_settings { $basic_title = "
    {$r['conf_title']}
    {$r['conf_description']}
    {$r['conf_title']}{$help_key}
    {$r['conf_description']}
    {$revert_button}
    {$form_element}
    - - +
    Системные настройки
     
    " +
    System Settings
     
    " ."  
    "; @@ -2052,7 +2098,7 @@ class ad_settings { { if ( $r['conf_title_noshow'] ) { - $hidden = ' (скрытая группа)'; + $hidden = ' (Hidden)'; } else { @@ -2061,26 +2107,26 @@ class ad_settings { if( IN_DEV ) { - $in_dev_extra = "Экспортировать"; + $in_dev_extra = "Export"; } else { $in_dev_extra = ''; } - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "
    Директория
    ", - "{$r['conf_title_title']}$hidden (настроек: ".intval($r['conf_title_count']).")
    {$r['conf_title_desc']}
    " , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "
    Folder
    ", + "{$r['conf_title_title']}$hidden (".intval($r['conf_title_count'])." settings)
    {$r['conf_title_desc']}
    " , array("
    - Изменить - Удалить - Пересчитать + Edit + Delete + Recount {$in_dev_extra}
    ", 1, 'tablerow3' ) ) ); } $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( array("
    ". - $this->ipsclass->adskin->js_make_button("Добавить группу настроек", $this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=settinggroup_new")."
    ", 3, 'tablesubheader' ) + $this->ipsclass->adskin->js_make_button("Add Setting Group", $this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=settinggroup_new")."
    ", 3, 'tablesubheader' ) ) ); $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); @@ -2103,21 +2149,21 @@ class ad_settings { //----------------------------------------- - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Импортирование настроек" ); + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "XML settings file tools" ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Загрузка файла XML с настройками
    Этот файл должен начинаться с «ipb_» и иметь расширение «.xml» или «.xml.gz».
    Существующие настройки будут обновлены, другие — добавлены.
    " , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Upload XML settings file from your computer
    Duplicate entries will not be overwritten but the default setting and other options will be updated. The file must end with either '.xml' or '.xml.gz'
    " , $this->ipsclass->adskin->form_upload( ) ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "ИЛИ введите название файла
    Этот файл должен быть загружен в корневую директорию вашего форума.
    " , + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "OR enter the filename of the XML settings file
    The file must be uploaded into the forum's root folder
    " , $this->ipsclass->adskin->form_input( 'file_location', 'resources/settings.xml' ) ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Запуск инструмента
    Пожалуйста, выберите инструмент, который необходимо запустить.
    " , - $this->ipsclass->adskin->form_dropdown( 'tool', array( 0 => array( 'import', 'Импортирование' ), 1 => array( 'check', 'Сравнение' ) ) ) + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Tool To Run
    Please choose the tool you wish to run
    " , + $this->ipsclass->adskin->form_dropdown( 'tool', array( 0 => array( 'import', 'Import Settings' ), 1 => array( 'check', 'Show New & Deleted Settings' ) ) ) ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Импортировать"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Run Tool"); $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); @@ -2125,11 +2171,11 @@ class ad_settings { // Other & Dev options //----------------------------------------- - $this->ipsclass->html .= "

    "; + $this->ipsclass->html .= "

    "; if ( IN_DEV ) { - $this->ipsclass->html .= "
    "; + $this->ipsclass->html .= "
    Developer Options: Export all to XML
    "; } $this->ipsclass->admin->output(); @@ -2155,7 +2201,7 @@ class ad_settings { if ( ! $this->ipsclass->input['id'] and ! $this->ipsclass->input['search'] ) { - $this->ipsclass->main_msg = "Вы должны ввести ID системной настройки"; + $this->ipsclass->main_msg = "No ID was passed, please try again"; $this->setting_start(); } @@ -2176,7 +2222,7 @@ class ad_settings { } } - $this->ipsclass->main_msg = "Системные настройки пересортированы"; + $this->ipsclass->main_msg = "Settings reordered"; $this->ipsclass->input['conf_group'] = $this->ipsclass->input['id']; @@ -2191,7 +2237,7 @@ class ad_settings { if ( ! count($fields ) ) { - $this->ipsclass->main_msg = "Нет полей для сохранения"; + $this->ipsclass->main_msg = "No fields were passed to be saved"; $this->ipsclass->settings_view(); } @@ -2309,6 +2355,7 @@ class ad_settings { require_once( ROOT_PATH."sources/handlers/han_editor.php" ); $this->han_editor = new han_editor(); $this->han_editor->ipsclass =& $this->ipsclass; + $this->han_editor->from_acp = 1; $this->han_editor->init(); //----------------------------------------- @@ -2354,7 +2401,7 @@ class ad_settings { $this->ipsclass->input['conf_group'] = $this->ipsclass->input['id']; - $this->ipsclass->main_msg = "Системные настройки обновлены"; + $this->ipsclass->main_msg = "Settings updated"; $this->setting_rebuildcache(); @@ -2391,7 +2438,7 @@ class ad_settings { { if ( ! $this->ipsclass->input['id'] ) { - $this->ipsclass->main_msg = "Вы должны ввести ID системной настройки"; + $this->ipsclass->main_msg = "No ID was passed, please try again"; $this->setting_form( $type ); } } @@ -2412,12 +2459,6 @@ class ad_settings { $conf_group = ( isset($this->ipsclass->input['conf_newgroup']) ANd $this->ipsclass->input['conf_newgroup'] ) ? $this->ipsclass->input['conf_newgroup'] : $this->ipsclass->input['conf_group']; - //----------------------------------------- - // Added by Artur (ibresource.ru) - //----------------------------------------- - - //$_POST['conf_description'] = nl2br($_POST['conf_description']); - $array = array( 'conf_title' => $this->ipsclass->input['conf_title'], 'conf_description' => $this->ipsclass->txt_stripslashes( $_POST['conf_description'] ), 'conf_group' => $this->ipsclass->input['conf_group'], @@ -2431,7 +2472,6 @@ class ad_settings { 'conf_position' => intval( $this->ipsclass->input['conf_position'] ), 'conf_start_group' => $this->ipsclass->input['conf_start_group'], 'conf_end_group' => $this->ipsclass->input['conf_end_group'], - 'conf_help_key' => $this->ipsclass->input['conf_help_key'], 'conf_add_cache' => intval( $this->ipsclass->input['conf_add_cache'] ), ); @@ -2439,7 +2479,7 @@ class ad_settings { if ( $type == 'add' ) { $this->ipsclass->DB->do_insert( 'conf_settings', $array ); - $this->ipsclass->main_msg = 'Новая системная настройка добавлена'; + $this->ipsclass->main_msg = 'New Setting Added'; $this->ipsclass->DB->simple_exec_query( array( 'update' => 'conf_settings_titles', 'set' => 'conf_title_count=conf_title_count+1', 'where' => 'conf_title_id='.$this->ipsclass->input['conf_group'] ) ); @@ -2447,7 +2487,7 @@ class ad_settings { else { $this->ipsclass->DB->do_update( 'conf_settings', $array, 'conf_id='.intval($this->ipsclass->input['id']) ); - $this->ipsclass->main_msg = 'Системная настройка изменена'; + $this->ipsclass->main_msg = 'Setting Edited'; } $this->setting_rebuildcache(); @@ -2465,7 +2505,7 @@ class ad_settings { if ( ! $this->ipsclass->input['id'] ) { - $this->ipsclass->main_msg = "Вы должны ввести ID системной настройки"; + $this->ipsclass->main_msg = "No ID was passed, please try again"; $this->setting_form(); } @@ -2477,7 +2517,7 @@ class ad_settings { $this->ipsclass->DB->simple_exec_query( array( 'update' => 'conf_settings', 'set' => "conf_value=''", 'where' => 'conf_id='.$this->ipsclass->input['id'] ) ); - $this->ipsclass->main_msg = "Системная настройка возвращена к первоначальному виду."; + $this->ipsclass->main_msg = "Configuration setting reverted back to default."; $this->setting_rebuildcache(); @@ -2493,7 +2533,7 @@ class ad_settings { { if ( ! $this->ipsclass->input['id'] ) { - $this->ipsclass->main_msg = "Вы должны ввести ID системной настройки"; + $this->ipsclass->main_msg = "No ID was passed, please try again"; $this->setting_form(); } @@ -2507,7 +2547,7 @@ class ad_settings { $this->ipsclass->DB->simple_exec_query( array( 'update' => 'conf_settings_titles', 'set' => 'conf_title_count=conf_title_count-1', 'where' => 'conf_title_id='.$conf['conf_group'] ) ); - $this->ipsclass->main_msg = "Системная настройка удалена"; + $this->ipsclass->main_msg = "Configuration Setting Deleted"; $this->setting_rebuildcache(); @@ -2581,7 +2621,7 @@ class ad_settings { $this->setting_get_groups(); } - $ret = "
    + $ret = "
    "; + return $ret."\n"; } //----------------------------------------- @@ -2618,7 +2658,7 @@ class ad_settings { // Explain how, why and what to do.. $this->ipsclass->admin->page_detail = ""; - $this->ipsclass->admin->page_title = "Продолжение невозможно"; + $this->ipsclass->admin->page_title = "Unable to continue"; $this->ipsclass->html .= $this->return_sql_no_no_cant_do_it_sorry_text(); @@ -2634,12 +2674,13 @@ class ad_settings { } else { - $this->ipsclass->admin->error("Извините, ваша версия MySQL не поддерживает поиск по полному тексту"); + $this->ipsclass->admin->error("Sorry, the version of MySQL that you are using is unable to use FULLTEXT searches"); } - $this->ipsclass->admin->save_log("Обновлены настройки поиска по полному тексту"); + $this->ipsclass->admin->save_log("Full Text Options Updated"); - $this->ipsclass->admin->done_screen("Индексы поиска по полному тексты обновлены", "Настройки поиска по полному тексту", "{$this->ipsclass->form_code}&code=setting_view&conf_group=19", "redirect" ); + $query = urlencode( 'Type of search to use' ); + $this->ipsclass->admin->done_screen("Full Text Indexes Rebuilt", "Full Text Settings", "{$this->ipsclass->form_code}&code=setting_view&search={$query}", "redirect" ); } /*-------------------------------------------------------------------------*/ @@ -2714,9 +2755,9 @@ class ad_settings { } } - $this->ipsclass->admin->save_log("Обновлены настройки форума, Back Up записан"); + $this->ipsclass->admin->save_log("Board Settings Updated, Back Up Written"); - $this->ipsclass->admin->done_screen("Конфигурация обновлена", "Начало Админцентра", "act=index" ); + $this->ipsclass->admin->done_screen("Forum Configurations updated", "Administration CP Home", "act=index" ); } @@ -2764,20 +2805,18 @@ Make sure you use a trailing semi-colon. Your MySQL database name can be found i
    In mysql type:
    -
    alter table ibf_topics add fulltext(title);
    +
    alter table " . SQL_PREFIX . "topics add fulltext(title);

    -If you are not using 'ibf_' as your table extension, adjust that query to suit. This query can take a while -depending on the number of topics you have. +This query can take a while depending on the number of topics you have.

    Step 4: Indexing the posts table
    In mysql type:
    -
    alter table ibf_posts add fulltext(post);
    +
    alter table " . SQL_PREFIX . "posts add fulltext(post);

    -If you are not using 'ibf_' as your table extension, adjust that query to suit. This query can take a while -depending on the number of posts you have. On average MySQL can index 80,000 posts an hour. If you are using MySQL 4, the time is greatly reduced. +This query can take a while depending on the number of posts you have. On average MySQL can index 80,000 posts an hour. If you are using MySQL 4, the time is greatly reduced.
    "; } @@ -2790,43 +2829,22 @@ depending on the number of posts you have. On average MySQL can index 80,000 pos return; } - /** - * Santy - */ $this->ipsclass->input['conf_group'] = intval($this->ipsclass->input['conf_group']); - /** - * Require the XML class - */ require_once( KERNEL_PATH . 'class_xml.php' ); $xml = new class_xml(); - /** - * Set the root tag - */ $xml->xml_set_root( 'settingexport', array( 'exported' => time() ) ); - /** - * Create base group - */ $xml->xml_add_group( 'settinggroup' ); - /** - * Grab title keyword first - */ $conf_title = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'conf_title_title, conf_title_desc, conf_title_noshow, conf_title_keyword, conf_title_module', 'from' => 'conf_settings_titles', 'where' => "conf_title_id = {$this->ipsclass->input['conf_group']}" ) ); - /** - * Die? - */ if ( ! $conf_title ) { return; } - /** - * Create Content - */ foreach( $conf_title as $field_name=>$field_value ) { $content[] = $xml->xml_build_simple_tag( $field_name, $field_value ); @@ -2836,9 +2854,6 @@ depending on the number of posts you have. On average MySQL can index 80,000 pos $entry[] = $xml->xml_build_entry( 'setting', $content ); - /** - * Grab settings - */ $this->ipsclass->DB->simple_select( '*', 'conf_settings', "conf_group = {$this->ipsclass->input['conf_group']}" ); $this->ipsclass->DB->exec_query(); @@ -2862,14 +2877,8 @@ depending on the number of posts you have. On average MySQL can index 80,000 pos $xml->xml_add_entry_to_group( 'settinggroup', $entry ); } - /** - * Format - */ $xml->xml_format_document(); - /** - * Send to browser - */ $this->ipsclass->admin->show_download( $xml->xml_document, 'mod_settings.xml', '', 0 ); } diff --git a/upload/sources/action_admin/skin_css.php b/upload/sources/action_admin/skin_css.php index 5b549fee..83edc1c9 100644 --- a/upload/sources/action_admin/skin_css.php +++ b/upload/sources/action_admin/skin_css.php @@ -1,1060 +1,1090 @@ - $Date: 2006-12-07 06:46:38 -0500 (Thu, 07 Dec 2006) $ -| > $Revision: 777 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > CSS management functions -| > Module written by Matt Mecham -| > Date started: 4th April 2002 -| -| > Module Version Number: 1.0.0 -| > DBA Checked: Tue 25th May 2004 -+-------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - - -class ad_skin_css -{ - - var $base_url; - var $template = ""; - var $functions = ""; - - /** - * Section title name - * - * @var string - */ - var $perm_main = "lookandfeel"; - - /** - * Section title name - * - * @var string - */ - var $perm_child = "style"; - - - function auto_run() - { - //----------------------------------------- - // Get the libraries - //----------------------------------------- - - require_once( ROOT_PATH.'sources/lib/admin_template_functions.php' ); - - $this->functions = new admin_template_functions(); - $this->functions->ipsclass =& $this->ipsclass; - - //----------------------------------------- - - switch($this->ipsclass->input['code']) - { - case 'floateditor': - $this->functions->build_editor_area_floated(1); - break; - - - case 'edit2': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->do_form('edit'); - break; - - case 'edit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->do_form('edit'); - break; - - case 'doedit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->save_css('edit'); - break; - - case 'optimize': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->optimize(); - break; - - case 'easyedit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->easy_edit(); - break; - - case 'doresync': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->do_resynch(); - break; - - case 'colouredit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->colouredit(); - break; - - case 'docolour': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->do_colouredit(); - break; - - default: - print "Действия не выбраны"; exit(); - break; - - //case 'wrapper': - // $this->list_sheets(); - // break; - //case 'add': - // $this->do_form('add'); - // break; - //case 'doadd': - // $this->save_css('add'); - // break; - //case 'remove': - // $this->remove(); - // break; - //case 'css_upload': - // $this->css_upload('new'); - // break; - //case 'export': - // $this->export(); - // break; - } - - } - - //----------------------------------------- - // RESYNCH STYLE SHEETS - //----------------------------------------- - - function do_resynch() - { - //----------------------------------------- - - if ($this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Не выбран ID шаблона, вернитесь назад и повторите попытку"); - } - - //----------------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => 'cssid, css_text, css_name, css_comments', - 'from' => 'skin_css', - 'where' => 'cssid='.intval($this->ipsclass->input['id']) - ) ); - $this->ipsclass->DB->exec_query(); - - if ( ! $cssinfo = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->admin->error("Нельзя получить CSS из базы данных"); - } - - if ( $this->ipsclass->input['favour'] == 'cache' ) - { - $cache_file = ROOT_PATH."cache/css_".$this->ipsclass->input['id'].".css"; - - if ( file_exists( $cache_file ) ) - { - $FH = fopen( $cache_file, 'r' ); - $cache_data = fread( $FH, filesize($cache_file) ); - fclose($FH); - } - else - { - $this->ipsclass->admin->error("Нельзя найти Кеш CSS файла @ $cache_file"); - } - - $this->ipsclass->DB->do_update( 'skin_css', array( 'css_text' => $cache_data ), 'cssid='.intval($this->ipsclass->input['id']) ); - } - else - { - $cache_file = ROOT_PATH."cache/css_".$this->ipsclass->input['id'].".css"; - - $FH = fopen( $cache_file, 'w' ); - fputs( $FH, $cssinfo['css_text'], strlen($cssinfo['css_text']) ); - fclose($FH); - } - - if ( $this->ipsclass->input['return'] != 'colouredit' ) - { - $this->do_form('edit'); - } - else - { - $this->colouredit(); - } - } - - - - //----------------------------------------- - // RESYNCH SPLASH - //----------------------------------------- - - function resync_splash($db_length, $cache_length, $cache_mtime, $db_mtime, $id, $return="") - { - //----------------------------------------- - - $this->ipsclass->admin->page_detail = "Найдено несоответствие между кеш стилем страницы и таблицой стилей сохраненной в базе данных."; - $this->ipsclass->admin->page_title = " Синхронизация таблицы стилей"; - - //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( " " , "50%" ); - $this->ipsclass->adskin->td_header[] = array( " " , "50%" ); - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doresync' ), - 2 => array( 'act' , 'style' ), - 3 => array( 'id' , $id ), - 4 => array( 'return', $return ), - 5 => array( 'section', $this->ipsclass->section_code ), - ) ); - - $favour = 'db'; - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Синхранизировать CSS перед его редактированием..." ); - - if ( intval($cache_mtime) > intval($db_mtime) ) - { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "CSS в базе данных, последнее обновление: ".$this->ipsclass->admin->get_date($db_mtime, 'LONG'), - "CSS в базе данных, кол-во символов: $db_length", - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "CSS в кеше, последнее обновление: ".$this->ipsclass->admin->get_date($cache_mtime, 'LONG')."", - "CSS в кеше, кол-во символов: $cache_length", - ) ); - $favour = 'cache'; - - } - else - { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "CSS в базе данных, последнее обновление: ".$this->ipsclass->admin->get_date($db_mtime, 'LONG')."", - "CSS в базе данных, кол-во символов: $db_length", - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "CSS в кеше, последнее обновление: ".$this->ipsclass->admin->get_date($cache_mtime, 'LONG'), - "CSS в кеше, кол-во символов: $cache_length", - ) ); - } - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "Использовать синхронизация....", - $this->ipsclass->adskin->form_dropdown( 'favour', array( - 0 => array( 'cache', 'Переписать версию базы данных с кеш версией'), - 1 => array( 'db' , 'Обновить версию кеша из базы данных' ), - ), $favour ), - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Синхронизировать"); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - //----------------------------------------- - //------------------------------- - - $this->ipsclass->admin->output(); - } - - - //----------------------------------------- - // OPTIMIZE STYLE SHEET - //----------------------------------------- - - function optimize() - { - if ($this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Вы должны уточнить текущий CSS ID, вернитесь и повторите заново"); - } - - //----------------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'skin_css', 'where' => 'cssid='.intval($this->ipsclass->input['id']) ) ); - $this->ipsclass->DB->exec_query(); - - if ( ! $row = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->admin->error("Невозможно запросить информацию из базы данных"); - } - - //----------------------------------------- - - $orig_size = strlen($row['css_text']); - - $orig_text = str_replace( "\r\n", "\n", $row['css_text']); - $orig_text = str_replace( "\r" , "\n", $orig_text); - $orig_text = str_replace( "\n\n", "\n", $orig_text); - - $parsed = array(); - - //----------------------------------------- - // Remove comments - //----------------------------------------- - - $orig_text = preg_replace( "#/\*(.+?)\*/#s", "", $orig_text ); - - //----------------------------------------- - // Grab all the definitions - //----------------------------------------- - - preg_match_all( "/(.+?)\{(.+?)\}/s", $orig_text, $match, PREG_PATTERN_ORDER ); - - for ( $i = 0 ; $i < count($match[0]); $i++ ) - { - $match[1][$i] = trim($match[1][$i]); - $parsed[ $match[1][$i] ] = trim($match[2][$i]); - } - - //----------------------------------------- - - if ( count($parsed) < 1) - { - $this->ipsclass->admin->error("Таблицы стиля находится в формате который не понимает Invision Power Board, оптимизация не произведена."); - } - - //----------------------------------------- - // Clean them up - //----------------------------------------- - - $final = ""; - - foreach( $parsed as $name => $p ) - { - //----------------------------------------- - // Ignore comments - //----------------------------------------- - - if ( preg_match( "#^//#", $name) ) - { - continue; - } - - //----------------------------------------- - // Split up the components - //----------------------------------------- - - $parts = explode( ";", $p); - $defs = array(); - - foreach( $parts as $part ) - { - if ($part != "") - { - list($definition, $data) = explode( ":", $part ); - $defs[] = trim($definition).": ".trim($data); - } - } - - $final .= $name . " { ".implode("; ", $defs). " }\n"; - } - - $final_size = strlen($final); - - if ($final_size < 1000) - { - $this->ipsclass->admin->error("Таблицы стиля находится в формате который не понимает Invision Power Board, оптимизация не произведена."); - } - - //----------------------------------------- - // Update the DB - //----------------------------------------- - - $dbs = $this->ipsclass->DB->compile_db_update_string( ); - - $this->ipsclass->DB->do_update( 'skin_css', array( 'css_text' => $final ), 'cssid='.intval($this->ipsclass->input['id']) ); - - $saved = $orig_size - $final_size; - $pc_saved = 0; - - if ($saved > 0) - { - $pc_saved = sprintf( "%.2f", ($saved / $orig_size) * 100); - } - - $this->ipsclass->admin->done_screen("Таблица стилей обновлена: Изменения сохранены: $saved ($pc_saved %)", "Настройка таблицы стилей", "{$this->ipsclass->form_code}" ); - } - - - //----------------------------------------- - // ADD / EDIT WRAPPERS - //----------------------------------------- - - function save_css( $type='add' ) - { - $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); - - //----------------------------------------- - // Check input - //----------------------------------------- - - if ($type == 'edit') - { - if ($this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Вы должны уточнить текущий CSS ID, вернитесь и повторите заново"); - } - - } - - if ($this->ipsclass->input['txtcss'] == "") - { - $this->ipsclass->admin->error("Ваша таблица стилей не должна быть пустой"); - } - - - $css = $this->ipsclass->txt_stripslashes($_POST['txtcss']); - $css = str_replace( '../', '../' , $css ); - $css = str_replace( '\\' , '\\\\', $css ); - $css = str_replace( '<#IMG_DIR#>', '<#IMG_DIR#>', $css ); - - $this->ipsclass->DB->do_update( 'skin_sets', array( 'set_css' => $css, 'set_css_updated' => time() ), 'set_skin_set_id='.$this->ipsclass->input['id'] ); - - //----------------------------------------- - // Update cache? - //----------------------------------------- - - $extra = "Файл кеша таблицы стилей обновлен"; - - $message = $this->ipsclass->cache_func->_write_css_to_cache( $this->ipsclass->input['id'] ); - - //----------------------------------------- - // Back to it... - //----------------------------------------- - - if ( ! $this->ipsclass->input['savereload'] ) - { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code ,'Управление стилем' ); - $this->ipsclass->main_msg = "Таблица стилей обновлена: $extra"; - $this->ipsclass->admin->redirect( $this->ipsclass->base_url.'§ion='.$this->ipsclass->section_code.'&act=sets', "Таблица стилей обновлена, вернитесь к управлению скином" ); - } - else - { - //----------------------------------------- - // Reload edit window - //----------------------------------------- - - $this->ipsclass->main_msg = "Таблица стилей обновлена: $extra"; - $this->do_form('edit'); - } - } - - - //----------------------------------------- - // Show Add/Edit form - //----------------------------------------- - - function do_form( $type='add' ) - { - //----------------------------------------- - - if ( $this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Вы должны уточнить ID текущего шаблона, вернитесь и повторите заново"); - } - - $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); - - //----------------------------------------- - // check tree... - //----------------------------------------- - - $found_id = ""; - $found_content = ""; - $this_set = ""; - - $in = $this->ipsclass->input['p'] > 0 ? ','.intval($this->ipsclass->input['p']) : ''; - - //----------------------------------------- - // Query - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'stylesheets_do_form_concat', array( 'id' => $this->ipsclass->input['id'], 'parent' => $in ) ); - $this->ipsclass->DB->cache_exec_query(); - - //----------------------------------------- - // check tree... - //----------------------------------------- - - while( $row = $this->ipsclass->DB->fetch_row() ) - { - if ( $row['set_css'] and ! $found_id ) - { - $found_id = $row['set_skin_set_id']; - $found_content = $row['set_css']; - $found_time = $row['set_css_updated']; - } - - if ( $this->ipsclass->input['id'] == $row['set_skin_set_id'] ) - { - $this_set = $row; - } - } - - //----------------------------------------- - - $css = $found_content; - - $code = 'doedit'; - $button = 'Сохранить'; - - //----------------------------------------- - // Preserve <#IMG_DIR#> - //----------------------------------------- - - $css = str_replace( '<#IMG_DIR#>', '<#IMG_DIR#>', $css ); - - //----------------------------------------- - // COLURS!ooO! - //----------------------------------------- - - //.class { definitions } - //#id { definitions } - - $css_elements = array(); - - preg_match_all( "/(\.|\#)(\S+?)\s{0,}\{.+?\}/s", $css, $match ); - - for ($i=0; $i < count($match[0]); $i++) - { - $type = trim($match[1][$i]); - - $name = trim($match[2][$i]); - - if ($type == '.') - { - $css_elements[] = array( 'class|'.$name, $type.$name ); - } - else - { - $css_elements[] = array( 'id|'.$name, $type.$name ); - } - } - - //----------------------------------------- - - $this->ipsclass->admin->page_detail = "Вы можете полностью использовать CSS когда добавляете или редактируете таблицу стилей."; - $this->ipsclass->admin->page_title = " Настройка таблицы стилей"; - - //----------------------------------------- - - $this->ipsclass->html .= ""; - - //----------------------------------------- - // Show the form - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , $code ), - 2 => array( 'act' , 'style' ), - 3 => array( 'id' , $this->ipsclass->input['id'] ), - 4 => array( 'section', $this->ipsclass->section_code ), - ), "theform" ); - - //----------------------------------------- - // Editor section - //----------------------------------------- - - $this->ipsclass->html .= $this->functions->build_generic_editor_area( array( 'section' => $this->ipsclass->section_code, 'act' => 'style', 'title' => '', 'textareaname' => 'css', 'textareainput' => $css ) ); - - $formbuttons = "
    - - -
    \n"; - - $this->ipsclass->html = str_replace( '', $formbuttons, $this->ipsclass->html ); - - $this->ipsclass->html .= "
    "; - - //----------------------------------------- - // CSS search form - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'css_search' ), - 2 => array( 'act' , 'style' ), - 3 => array( 'id' , $this->ipsclass->input['id'] ), - 4 => array( 'section', $this->ipsclass->section_code ), - ), "cssForm" ); - - - $this->ipsclass->adskin->td_header[] = array( " " , "20%" ); - $this->ipsclass->adskin->td_header[] = array( " " , "80%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Информация об использовании CSS классов" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "Показать, где в шаблонах используется: ", - $this->ipsclass->adskin->form_dropdown('csschoice', $css_elements).' ' - .'' - .' ' - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form(); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - $this->ipsclass->html .= $this->ipsclass->adskin->skin_jump_menu_wrap(); - - //----------------------------------------- - - $this->ipsclass->admin->nav[] = array( 'section='.$this->ipsclass->section_code.'&act=sets' ,'Настройки стиля' ); - $this->ipsclass->admin->nav[] = array( '' ,'Редактирование таблицей стилей в '.$this_set['set_name'] ); - - $this->ipsclass->admin->output(); - } - - //----------------------------------------- - // EDIT COLOURS START - //----------------------------------------- - - function colouredit() - { - //----------------------------------------- - - if ($this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Вы должны уточнить ID текущего шаблона, вернитесь и повторите попытку снова"); - } - - $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); - - //----------------------------------------- - // check tree... - //----------------------------------------- - - $found_id = ""; - $found_content = ""; - $this_set = ""; - - if ( $this->ipsclass->input['p'] > 0 ) - { - $in = ','.intval($this->ipsclass->input['p']); - } - - //----------------------------------------- - // Query - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'stylesheets_do_form_concat', array( 'id' => $this->ipsclass->input['id'], 'parent' => $in ) ); - $this->ipsclass->DB->cache_exec_query(); - - //----------------------------------------- - // check tree... - //----------------------------------------- - - while( $row = $this->ipsclass->DB->fetch_row() ) - { - if ( $row['set_css'] and ! $found_id ) - { - $found_id = $row['set_skin_set_id']; - $found_content = $row['set_css']; - $found_time = $row['set_css_updated']; - } - - if ( $this->ipsclass->input['id'] == $row['set_skin_set_id'] ) - { - $this_set = $row; - } - } - - //----------------------------------------- - - $css = $found_content; - $css = preg_replace( "#/\*.+?\*/#s", "", $css ); - //print "
    "; print $css; exit();
    -		//-----------------------------------------
    -		// Start the CSS matcher thingy
    -		//-----------------------------------------
    -		
    -		//.class { definitions }
    -		//#id { definitions }
    -		
    -		$colours = array();
    -		
    -		//-----------------------------------------
    -		// Make http:// safe..
    -		//-----------------------------------------
    -		
    -		$css = str_replace( 'http://', 'http|//', $css );
    -		
    -		preg_match_all( "/([\:\.\#\w\s,\-]+)\{(.+?)\}/s", $css, $match );
    -		
    -		for ($i=0; $i < count($match[0]); $i++)
    -		{
    -			$name    = trim($match[1][$i]);
    -			$content = trim($match[2][$i]);
    -			
    -			$defs    = explode( ';', $content );
    -			
    -			if ( count( $defs ) > 0 )
    -			{
    -				foreach( $defs as $a )
    -				{
    -					$a = trim($a);
    -					
    -					if ( $a != "" )
    -					{
    -						list( $property, $value ) = explode( ":", $a, 2 );
    -						
    -						$property = trim($property);
    -						$value    = trim( str_replace( 'http|//', 'http://', $value) );
    -						
    -						if ( $property )
    -						{
    -							if ( $property == 'color' or $property == 'background-color' )
    -							{
    -								$colours[ $name ][$property] = $value;
    -							}
    -							else
    -							{
    -								$colours[ $name ]['_extra'] .= $property.':'.$value.';'."\n";
    -							}
    -						}
    -					}
    -				}
    -			}
    -		}
    -		
    -		//print "
    "; print_r( $colours ); exit();
    -		
    -		if ( count($colours) < 1 )
    -		{
    -			$this->ipsclass->admin->error("CSS работает не надежно! Цвета для редактирования не выбраны");
    -		}
    -		
    -		//-----------------------------------------
    -		
    -		// Get $skin_names stuff
    -		
    -		require ROOT_PATH .'sources/lib/skin_info.php';
    -	
    -		$this->ipsclass->admin->page_detail = "You edit the existing colours below. Launch Colour Picker";
    -		$this->ipsclass->admin->page_title  = " Настройка таблицы стилей [Цвета]";
    -		
    -		
    -		
    -		$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code'  , 'docolour'   ),
    -																			 2 => array( 'act'   , 'style'      ),
    -																			 3 => array( 'id'    , $this->ipsclass->input['id']    ),
    -																			 4 => array( 'section', $this->ipsclass->section_code ),
    -																	)    );
    -									     
    -		//-----------------------------------------
    -		
    -		$this->ipsclass->adskin->td_header[] = array( "{none}" , "100%" );
    -		
    -		//-----------------------------------------
    -		
    -		$this->ipsclass->html .= "
    -							
    -							";
    -						    
    -		$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Цвета CSS" );
    -		$this->ipsclass->html .= "";
    -		
    -		foreach ( $colours as $prop => $val )
    -		{
    -			$tbl_colour = "";
    -			$tbl_bg     = "";
    -			$tbl_html   = "";
    -			
    -			$desc = $css_names[ $prop ];
    -			
    -			if ( $desc == "" )
    -			{
    -				$desc = 'Недоступно';
    -			}
    -			
    -			$name = $prop;
    -			
    -			$md5 = md5($name);
    -			
    -			if ( strlen($name) > 80 )
    -			{
    -				$name = substr( $name, 0, 80 ) .'...';
    -			}
    -			
    -			$font_box  = $this->ipsclass->adskin->form_simple_input('f'.$md5.'color'           , $val['color'], "14");
    -			$bgcol_box = $this->ipsclass->adskin->form_simple_input('f'.$md5.'backgroundcolor' , $val['background-color'], "14");
    -			
    -			$this->ipsclass->html .= "
    -
    - {$name} - - - - - -
    -
    - Цвет шрифта - {$font_box}    -
    -
    -
    - Цвет заднего фона - {$bgcol_box}    -
    -
    -
    - Другие атрибуты CSS - -
    -
    -
    -
    "; - } - - $this->ipsclass->html .= ""; - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Изменить"); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - $this->ipsclass->admin->output(); - - - } - - //----------------------------------------- - // EDIT COLOURS START - //----------------------------------------- - - function do_colouredit() - { - //----------------------------------------- - - if ($this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Вы должны уточнить ID текущего шаблона, вернитесь и повторите попытку снова"); - } - - $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); - - //----------------------------------------- - // check tree... - //----------------------------------------- - - $found_id = ""; - $found_content = ""; - $this_set = ""; - - if ( $this->ipsclass->input['p'] > 0 ) - { - $in = ','.intval($this->ipsclass->input['p']); - } - - //----------------------------------------- - // Query - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'stylesheets_do_form_concat', array( 'id' => $this->ipsclass->input['id'], 'parent' => $in ) ); - $this->ipsclass->DB->cache_exec_query(); - - //----------------------------------------- - // check tree... - //----------------------------------------- - - while( $row = $this->ipsclass->DB->fetch_row() ) - { - if ( $row['set_css'] and ! $found_id ) - { - $found_id = $row['set_skin_set_id']; - $found_content = $row['set_css']; - $found_time = $row['set_css_updated']; - } - - if ( $this->ipsclass->input['id'] == $row['set_skin_set_id'] ) - { - $this_set = $row; - } - } - - //----------------------------------------- - - $css = $found_content; - $css = preg_replace( "#/\*.+?\*/#s", "", $css ); - - //----------------------------------------- - // Start the CSS matcher thingy - //----------------------------------------- - - $css = str_replace( 'http://', 'http|//', $css ); - - $colours = array(); - - preg_match_all( "/([\:\.\#\w\s,\-]+)\{(.+?)\}/s", $css, $match ); - - for ($i=0; $i < count($match[0]); $i++) - { - $name = trim($match[1][$i]); - $content = trim($match[2][$i]); - - $md5 = md5($name); - - $defs = explode( ';', $content ); - - if ( count( $defs ) > 0 ) - { - foreach( $defs as $a ) - { - $a = trim($a); - - if ( $a != "" ) - { - list( $property, $value ) = explode( ":", $a, 2 ); - - $property = trim($property); - $value = trim( str_replace( 'http|//', 'http://', $value) ); - - if ( $property ) - { - $colours[ $name ][$property] = $value; - } - } - } - } - - foreach( array( 'color', 'backgroundcolor' ) as $prop ) - { - if ( strlen($_POST['f'.$md5.$prop]) >= 1 ) - { - $field = $prop == 'backgroundcolor' ? 'background-color' : $prop; - - $colours[ $name ][$field] = stripslashes($_POST['f'.$md5.$prop]); - } - } - - if ( isset( $_POST['f'.$md5.'extra'] ) ) - { - $tmp = str_replace( "\n", "", $_POST['f'.$md5.'extra'] ); - $tmp = str_replace( "\r", "", $tmp ); - - $extra_attr = explode( ";", $tmp ); - - if ( is_array( $extra_attr ) and count( $extra_attr ) ) - { - foreach( $extra_attr as $l ) - { - $l = str_replace( 'http://', 'http|//', $l ); - - list( $p, $v ) = explode( ":", $l ); - - $colours[ $name ][ trim($p) ] = trim( str_replace( 'http|//', 'http://', $v) ); - } - } - } - } - - if ( count($colours) < 1 ) - { - $this->ipsclass->admin->error("Нет цветов для редактирования"); - } - - //----------------------------------------- - - unset($name); - unset($property); - - $final = ""; - - foreach( $colours as $name => $property ) - { - $final .= $name."\n{\n"; - - if ( is_array($property) and count($property) > 0 ) - { - foreach( $property as $key => $value ) - { - if ( $key AND isset($value) ) - { - $final .= "\t".$key.": ".$value.";\n"; - } - } - } - - $final .= "}\n\n"; - - } - - $this->ipsclass->input['txtcss'] = $final; - $_POST['txtcss'] = $final; - $this->ipsclass->input['savereload'] = 0; - $this->save_css('edit'); - - } - - - -} - - + $Date: 2008-03-28 18:08:02 -0400 (Fri, 28 Mar 2008) $ +| > $Revision: 1232 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > CSS management functions +| > Module written by Matt Mecham +| > Date started: 4th April 2002 +| +| > Module Version Number: 1.0.0 +| > DBA Checked: Tue 25th May 2004 ++-------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class ad_skin_css +{ + + var $base_url; + var $template = ""; + var $functions = ""; + + /** + * Section title name + * + * @var string + */ + var $perm_main = "lookandfeel"; + + /** + * Section title name + * + * @var string + */ + var $perm_child = "style"; + + + function auto_run() + { + //----------------------------------------- + // Get the libraries + //----------------------------------------- + + require_once( ROOT_PATH.'sources/lib/admin_template_functions.php' ); + + $this->functions = new admin_template_functions(); + $this->functions->ipsclass =& $this->ipsclass; + + //----------------------------------------- + + switch($this->ipsclass->input['code']) + { + case 'floateditor': + $this->functions->build_editor_area_floated(1); + break; + + + case 'edit2': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->do_form('edit'); + break; + + case 'edit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->do_form('edit'); + break; + + case 'doedit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->save_css('edit'); + break; + + case 'optimize': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->optimize(); + break; + + case 'easyedit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->easy_edit(); + break; + + case 'doresync': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->do_resynch(); + break; + + case 'colouredit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->colouredit(); + break; + + case 'docolour': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->do_colouredit(); + break; + + default: + print "No action taken"; exit(); + break; + + //case 'wrapper': + // $this->list_sheets(); + // break; + //case 'add': + // $this->do_form('add'); + // break; + //case 'doadd': + // $this->save_css('add'); + // break; + //case 'remove': + // $this->remove(); + // break; + //case 'css_upload': + // $this->css_upload('new'); + // break; + //case 'export': + // $this->export(); + // break; + } + + } + + //----------------------------------------- + // RESYNCH STYLE SHEETS + //----------------------------------------- + + function do_resynch() + { + //----------------------------------------- + + if ($this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("You must specify an existing wrapper ID, go back and try again"); + } + + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => 'cssid, css_text, css_name, css_comments', + 'from' => 'skin_css', + 'where' => 'cssid='.intval($this->ipsclass->input['id']) + ) ); + $this->ipsclass->DB->exec_query(); + + if ( ! $cssinfo = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->admin->error("Could not query the CSS details from the database"); + } + + if ( $this->ipsclass->input['favour'] == 'cache' ) + { + $cache_file = ROOT_PATH."cache/css_".$this->ipsclass->input['id'].".css"; + + if ( file_exists( $cache_file ) ) + { + $FH = fopen( $cache_file, 'r' ); + $cache_data = fread( $FH, filesize($cache_file) ); + fclose($FH); + } + else + { + $this->ipsclass->admin->error("Could not locate cached CSS file @ $cache_file"); + } + + $this->ipsclass->DB->do_update( 'skin_css', array( 'css_text' => $cache_data ), 'cssid='.intval($this->ipsclass->input['id']) ); + } + else + { + $cache_file = ROOT_PATH."cache/css_".$this->ipsclass->input['id'].".css"; + + $FH = fopen( $cache_file, 'w' ); + fputs( $FH, $cssinfo['css_text'], strlen($cssinfo['css_text']) ); + fclose($FH); + } + + if ( $this->ipsclass->input['return'] != 'colouredit' ) + { + $this->do_form('edit'); + } + else + { + $this->colouredit(); + } + } + + + + //----------------------------------------- + // RESYNCH SPLASH + //----------------------------------------- + + function resync_splash($db_length, $cache_length, $cache_mtime, $db_mtime, $id, $return="") + { + //----------------------------------------- + + $this->ipsclass->admin->page_detail = "A mismatch has been found between the cached style sheet and the style sheet stored in the database"; + $this->ipsclass->admin->page_title = "Resynchronise Style Sheet"; + + //----------------------------------------- + + $this->ipsclass->adskin->td_header[] = array( " " , "50%" ); + $this->ipsclass->adskin->td_header[] = array( " " , "50%" ); + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doresync' ), + 2 => array( 'act' , 'style' ), + 3 => array( 'id' , $id ), + 4 => array( 'return', $return ), + 5 => array( 'section', $this->ipsclass->section_code ), + ) ); + + $favour = 'db'; + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Resynch CSS before editing..." ); + + if ( intval($cache_mtime) > intval($db_mtime) ) + { + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( + "CSS in database last updated: ".$this->ipsclass->admin->get_date($db_mtime, 'LONG'), + "CSS in database, # characters: $db_length", + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( + "CSS in CACHE last updated: ".$this->ipsclass->admin->get_date($cache_mtime, 'LONG')."", + "CSS in CACHE, # characters: $cache_length", + ) ); + $favour = 'cache'; + + } + else + { + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( + "CSS in database last updated: ".$this->ipsclass->admin->get_date($db_mtime, 'LONG')."", + "CSS in database, # characters: $db_length", + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( + "CSS in CACHE last updated: ".$this->ipsclass->admin->get_date($cache_mtime, 'LONG'), + "CSS in CACHE, # characters: $cache_length", + ) ); + } + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( + "Resynchronise using....", + $this->ipsclass->adskin->form_dropdown( 'favour', array( + 0 => array( 'cache', 'Overwrite database version with cached version'), + 1 => array( 'db' , 'Update cached version from the database' ), + ), $favour ), + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Resynchronise"); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + //----------------------------------------- + //------------------------------- + + $this->ipsclass->admin->output(); + } + + + //----------------------------------------- + // OPTIMIZE STYLE SHEET + //----------------------------------------- + + function optimize() + { + if ($this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("You must specify an existing CSS ID, go back and try again"); + } + + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'skin_css', 'where' => 'cssid='.intval($this->ipsclass->input['id']) ) ); + $this->ipsclass->DB->exec_query(); + + if ( ! $row = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->admin->error("Could not query the information from the database"); + } + + //----------------------------------------- + + $orig_size = strlen($row['css_text']); + + $orig_text = str_replace( "\r\n", "\n", $row['css_text']); + $orig_text = str_replace( "\r" , "\n", $orig_text); + $orig_text = str_replace( "\n\n", "\n", $orig_text); + + $parsed = array(); + + //----------------------------------------- + // Remove comments + //----------------------------------------- + + $orig_text = preg_replace( "#/\*(.+?)\*/#s", "", $orig_text ); + + //----------------------------------------- + // Grab all the definitions + //----------------------------------------- + + preg_match_all( "/(.+?)\{(.+?)\}/s", $orig_text, $match, PREG_PATTERN_ORDER ); + + for ( $i = 0 ; $i < count($match[0]); $i++ ) + { + $match[1][$i] = trim($match[1][$i]); + $parsed[ $match[1][$i] ] = trim($match[2][$i]); + } + + //----------------------------------------- + + if ( count($parsed) < 1) + { + $this->ipsclass->admin->error("The stylesheet is in a format that Invision Power Board cannot understand, no optimization done."); + } + + //----------------------------------------- + // Clean them up + //----------------------------------------- + + $final = ""; + + foreach( $parsed as $name => $p ) + { + //----------------------------------------- + // Ignore comments + //----------------------------------------- + + if ( preg_match( "#^//#", $name) ) + { + continue; + } + + //----------------------------------------- + // Split up the components + //----------------------------------------- + + $parts = explode( ";", $p); + $defs = array(); + + foreach( $parts as $part ) + { + if ($part != "") + { + list($definition, $data) = explode( ":", $part ); + $defs[] = trim($definition).": ".trim($data); + } + } + + $final .= $name . " { ".implode("; ", $defs). " }\n"; + } + + $final_size = strlen($final); + + if ($final_size < 1000) + { + $this->ipsclass->admin->error("The stylesheet is in a format that Invision Power Board cannot understand, no optimization done."); + } + + //----------------------------------------- + // Update the DB + //----------------------------------------- + + $dbs = $this->ipsclass->DB->compile_db_update_string( ); + + $this->ipsclass->DB->do_update( 'skin_css', array( 'css_text' => $final ), 'cssid='.intval($this->ipsclass->input['id']) ); + + $saved = $orig_size - $final_size; + $pc_saved = 0; + + if ($saved > 0) + { + $pc_saved = sprintf( "%.2f", ($saved / $orig_size) * 100); + } + + $this->ipsclass->admin->done_screen("Stylesheet updated: Characters Saved: $saved ($pc_saved %)", "Manage Style Sheets", "{$this->ipsclass->form_code}" ); + } + + + //----------------------------------------- + // ADD / EDIT WRAPPERS + //----------------------------------------- + + function save_css( $type='add' ) + { + $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); + + //----------------------------------------- + // Check input + //----------------------------------------- + + if ($type == 'edit') + { + if ($this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("You must specify an existing CSS ID, go back and try again"); + } + + } + + if ($this->ipsclass->input['txtcss'] == "") + { + $this->ipsclass->admin->error("You can't have an empty stylesheet, can you?"); + } + + + $css = $this->ipsclass->txt_stripslashes($_POST['txtcss']); + $css = str_replace( '../', '../' , $css ); + $css = str_replace( '\\' , '\\\\', $css ); + $css = str_replace( '<#IMG_DIR#>', '<#IMG_DIR#>', $css ); + + $this->ipsclass->DB->do_update( 'skin_sets', array( 'set_css' => $css, 'set_css_updated' => time() ), 'set_skin_set_id='.$this->ipsclass->input['id'] ); + + //----------------------------------------- + // Update cache? + //----------------------------------------- + + $extra = "Stylesheet cache file updated"; + + $message = $this->ipsclass->cache_func->_write_css_to_cache( $this->ipsclass->input['id'] ); + + //----------------------------------------- + // Back to it... + //----------------------------------------- + + if ( ! $this->ipsclass->input['savereload'] ) + { + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code ,'Skin Manager Home' ); + $this->ipsclass->main_msg = "Stylesheet updated : $extra"; + $this->ipsclass->admin->redirect( $this->ipsclass->base_url.'§ion='.$this->ipsclass->section_code.'&act=sets', "Stylesheet updated, returning to the skin manager" ); + } + else + { + //----------------------------------------- + // Reload edit window + //----------------------------------------- + + $this->ipsclass->main_msg = "Stylesheet updated : $extra"; + $this->do_form('edit'); + } + } + + + //----------------------------------------- + // Show Add/Edit form + //----------------------------------------- + + function do_form( $type='add' ) + { + //----------------------------------------- + + if ( $this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("You must specify an existing wrapper ID, go back and try again"); + } + + $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); + + //----------------------------------------- + // check tree... + //----------------------------------------- + + $found_id = ""; + $found_content = ""; + $this_set = ""; + + $in = $this->ipsclass->input['p'] > 0 ? ','.intval($this->ipsclass->input['p']) : ''; + + //----------------------------------------- + // Query + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'stylesheets_do_form_concat', array( 'id' => $this->ipsclass->input['id'], 'parent' => $in ) ); + $this->ipsclass->DB->cache_exec_query(); + + //----------------------------------------- + // check tree... + //----------------------------------------- + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + if ( $row['set_css'] and ! $found_id ) + { + $found_id = $row['set_skin_set_id']; + $found_content = $row['set_css']; + $found_time = $row['set_css_updated']; + } + + if ( $this->ipsclass->input['id'] == $row['set_skin_set_id'] ) + { + $this_set = $row; + } + } + + //----------------------------------------- + + $css = $found_content; + + $code = 'doedit'; + $button = 'Save Stylesheet'; + + //----------------------------------------- + // Preserve <#IMG_DIR#> + //----------------------------------------- + + $css = str_replace( '<#IMG_DIR#>', '<#IMG_DIR#>', $css ); + + //----------------------------------------- + // COLURS!ooO! + //----------------------------------------- + + //.class { definitions } + //#id { definitions } + + $css_elements = array(); + + preg_match_all( "/(\.|\#)(\S+?)\s{0,}\{.+?\}/s", $css, $match ); + + for ($i=0; $i < count($match[0]); $i++) + { + $type = trim($match[1][$i]); + + $name = trim($match[2][$i]); + + if ($type == '.') + { + $css_elements[] = array( 'class|'.$name, $type.$name ); + } + else + { + $css_elements[] = array( 'id|'.$name, $type.$name ); + } + } + + //----------------------------------------- + + $this->ipsclass->admin->page_detail = "You may use CSS fully when adding or editing stylesheets.
    Click here to view the changes between this CSS and the default skin CSS."; + $this->ipsclass->admin->page_title = "Manage Style Sheets"; + + //----------------------------------------- + + $this->ipsclass->html .= ""; + + //----------------------------------------- + // Show the form + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , $code ), + 2 => array( 'act' , 'style' ), + 3 => array( 'id' , $this->ipsclass->input['id'] ), + 4 => array( 'section', $this->ipsclass->section_code ), + ), "theform" ); + + //----------------------------------------- + // Editor section + //----------------------------------------- + + $this->ipsclass->html .= $this->functions->build_generic_editor_area( array( 'section' => $this->ipsclass->section_code, 'act' => 'style', 'title' => '', 'textareaname' => 'css', 'textareainput' => $css ) ); + + $formbuttons = "
    + + + +
    \n"; + + $this->ipsclass->html = str_replace( '', $formbuttons, $this->ipsclass->html ); + + $this->ipsclass->html .= "
    "; + + //----------------------------------------- + // CSS search form + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'css_search' ), + 2 => array( 'act' , 'style' ), + 3 => array( 'id' , $this->ipsclass->input['id'] ), + 4 => array( 'section', $this->ipsclass->section_code ), + ), "cssForm" ); + + + $this->ipsclass->adskin->td_header[] = array( " " , "20%" ); + $this->ipsclass->adskin->td_header[] = array( " " , "80%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Find CSS Usage" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( + "Show me where...", + $this->ipsclass->adskin->form_dropdown('csschoice', $css_elements).' ... is used within the templates  ' + .'' + .' ' + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form(); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + $this->ipsclass->html .= $this->ipsclass->adskin->skin_jump_menu_wrap(); + + //----------------------------------------- + + $this->ipsclass->admin->nav[] = array( 'section='.$this->ipsclass->section_code.'&act=sets' ,'Skin Manager Home' ); + $this->ipsclass->admin->nav[] = array( '' ,'Editing Style Sheet in set '.$this_set['set_name'] ); + + $this->ipsclass->admin->output(); + } + + //----------------------------------------- + // EDIT COLOURS START + //----------------------------------------- + + function colouredit() + { + //----------------------------------------- + + if ($this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("You must specify an existing CSS ID, go back and try again"); + } + + $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); + + //----------------------------------------- + // check tree... + //----------------------------------------- + + $found_id = ""; + $found_content = ""; + $this_set = ""; + + if ( $this->ipsclass->input['p'] > 0 ) + { + $in = ','.intval($this->ipsclass->input['p']); + } + + //----------------------------------------- + // Query + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'stylesheets_do_form_concat', array( 'id' => $this->ipsclass->input['id'], 'parent' => $in ) ); + $this->ipsclass->DB->cache_exec_query(); + + //----------------------------------------- + // check tree... + //----------------------------------------- + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + if ( $row['set_css'] and ! $found_id ) + { + $found_id = $row['set_skin_set_id']; + $found_content = $row['set_css']; + $found_time = $row['set_css_updated']; + } + + if ( $this->ipsclass->input['id'] == $row['set_skin_set_id'] ) + { + $this_set = $row; + } + } + + //----------------------------------------- + + $css = $found_content; + $css = preg_replace( "#/\*.+?\*/#s", "", $css ); + //print "
    "; print $css; exit();
    +		//-----------------------------------------
    +		// Start the CSS matcher thingy
    +		//-----------------------------------------
    +		
    +		//.class { definitions }
    +		//#id { definitions }
    +		//@import url(url);
    +		
    +		$colours = array();
    +		$hiddens = array();
    +		
    +		//-----------------------------------------
    +		// Get imported CSS
    +		//-----------------------------------------
    +		
    +		preg_match_all( "/@import\s+(.+?)$/sm", $css, $imports );
    +		
    +		$i = 5;
    +		
    +		if( is_array( $imports[1] ) AND count($imports[1]) )
    +		{
    +			foreach( $imports[1] as $import )
    +			{
    +				$hiddens[$i] = array( 'import_' . $i, str_replace( '<#IMG_DIR#>', $this_set['set_image_dir'], trim($import) ) );
    +				
    +				$i++;
    +			}
    +		}
    +		//print "
    "; print_r($imports); exit();
    +		//print "
    "; print_r($hiddens); exit();
    +		//-----------------------------------------
    +		// Make http:// safe..
    +		//-----------------------------------------
    +		
    +		$css = str_replace( 'http://', 'http|//', $css );
    +		
    +		preg_match_all( "/([\:\.\#\w\s,\-]+)\{(.+?)\}/s", $css, $match );
    +		
    +		for ($i=0; $i < count($match[0]); $i++)
    +		{
    +			$name    = trim($match[1][$i]);
    +			$content = trim($match[2][$i]);
    +			
    +			$defs    = explode( ';', $content );
    +			
    +			if ( count( $defs ) > 0 )
    +			{
    +				foreach( $defs as $a )
    +				{
    +					$a = trim($a);
    +					
    +					if ( $a != "" )
    +					{
    +						list( $property, $value ) = explode( ":", $a, 2 );
    +						
    +						$property = trim($property);
    +						$value    = trim( str_replace( 'http|//', 'http://', $value) );
    +						
    +						if ( $property )
    +						{
    +							if ( $property == 'color' or $property == 'background-color' )
    +							{
    +								$colours[ $name ][$property] = $value;
    +							}
    +							else
    +							{
    +								$colours[ $name ]['_extra'] .= $property.':'.$value.';'."\n";
    +							}
    +						}
    +					}
    +				}
    +			}
    +		}
    +		
    +		//print "
    "; print_r( $colours ); exit();
    +		
    +		if ( count($colours) < 1 )
    +		{
    +			$this->ipsclass->admin->error("CSS all gone wonky! No colours to edit");
    +		}
    +		
    +		//-----------------------------------------
    +		
    +		// Get $skin_names stuff
    +		
    +		require ROOT_PATH .'sources/lib/skin_info.php';
    +	
    +		$this->ipsclass->admin->page_detail = "You edit the existing colours below. Launch Colour Picker";
    +		$this->ipsclass->admin->page_title  = "Manage Style Sheets [ Colours ]";
    +		
    +		$formfields = array( 1 => array( 'code'  , 'docolour'   ),
    +																			 2 => array( 'act'   , 'style'      ),
    +																			 3 => array( 'id'    , $this->ipsclass->input['id']    ),
    +																			 4 => array( 'section', $this->ipsclass->section_code ),
    +																	);
    +
    +		if( count($hiddens) )
    +		{
    +			$formfields = $formfields + $hiddens;
    +		}
    +		
    +		$this->ipsclass->html .= $this->ipsclass->adskin->start_form( $formfields );
    +									     
    +		//-----------------------------------------
    +		
    +		$this->ipsclass->adskin->td_header[] = array( "{none}" , "100%" );
    +		
    +		//-----------------------------------------
    +		
    +		$this->ipsclass->html .= "
    +							
    +							";
    +						    
    +		$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "CSS Colours" );
    +		$this->ipsclass->html .= "";
    +		
    +		foreach ( $colours as $prop => $val )
    +		{
    +			$tbl_colour = "";
    +			$tbl_bg     = "";
    +			$tbl_html   = "";
    +			
    +			$desc = $css_names[ $prop ];
    +			
    +			if ( $desc == "" )
    +			{
    +				$desc = 'None available';
    +			}
    +			
    +			$name = $prop;
    +			
    +			$md5 = md5($name);
    +			
    +			if ( strlen($name) > 80 )
    +			{
    +				$name = substr( $name, 0, 80 ) .'...';
    +			}
    +			
    +			$font_box  = $this->ipsclass->adskin->form_simple_input('f'.$md5.'color'           , $val['color'], "14");
    +			$bgcol_box = $this->ipsclass->adskin->form_simple_input('f'.$md5.'backgroundcolor' , $val['background-color'], "14");
    +			
    +			$this->ipsclass->html .= "
    +
    + {$name} + + + + + +
    +
    + Font Color + {$font_box}    +
    +
    +
    + Background Color + {$bgcol_box}    +
    +
    +
    + Other CSS Attributes + +
    +
    +
    +
    "; + } + + $this->ipsclass->html .= ""; + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Edit"); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + $this->ipsclass->admin->output(); + + + } + + //----------------------------------------- + // EDIT COLOURS START + //----------------------------------------- + + function do_colouredit() + { + //----------------------------------------- + + if ($this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("You must specify an existing CSS ID, go back and try again"); + } + + $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); + + //----------------------------------------- + // check tree... + //----------------------------------------- + + $found_id = ""; + $found_content = ""; + $this_set = ""; + + if ( $this->ipsclass->input['p'] > 0 ) + { + $in = ','.intval($this->ipsclass->input['p']); + } + + //----------------------------------------- + // Query + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'stylesheets_do_form_concat', array( 'id' => $this->ipsclass->input['id'], 'parent' => $in ) ); + $this->ipsclass->DB->cache_exec_query(); + + //----------------------------------------- + // check tree... + //----------------------------------------- + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + if ( $row['set_css'] and ! $found_id ) + { + $found_id = $row['set_skin_set_id']; + $found_content = $row['set_css']; + $found_time = $row['set_css_updated']; + } + + if ( $this->ipsclass->input['id'] == $row['set_skin_set_id'] ) + { + $this_set = $row; + } + } + + //----------------------------------------- + + $css = $found_content; + $css = preg_replace( "#/\*.+?\*/#s", "", $css ); + + //----------------------------------------- + // Start the CSS matcher thingy + //----------------------------------------- + + $css = str_replace( 'http://', 'http|//', $css ); + + $colours = array(); + + preg_match_all( "/([\:\.\#\w\s,\-]+)\{(.+?)\}/s", $css, $match ); + + for ($i=0; $i < count($match[0]); $i++) + { + $name = trim($match[1][$i]); + $content = trim($match[2][$i]); + + $md5 = md5($name); + + $defs = explode( ';', $content ); + + if ( count( $defs ) > 0 ) + { + foreach( $defs as $a ) + { + $a = trim($a); + + if ( $a != "" ) + { + list( $property, $value ) = explode( ":", $a, 2 ); + + $property = trim($property); + $value = trim( str_replace( 'http|//', 'http://', $value) ); + + if ( $property ) + { + $colours[ $name ][$property] = $value; + } + } + } + } + + foreach( array( 'color', 'backgroundcolor' ) as $prop ) + { + if ( strlen($_POST['f'.$md5.$prop]) >= 1 ) + { + $field = $prop == 'backgroundcolor' ? 'background-color' : $prop; + + $colours[ $name ][$field] = stripslashes($_POST['f'.$md5.$prop]); + } + } + + if ( isset( $_POST['f'.$md5.'extra'] ) ) + { + $tmp = str_replace( "\n", "", $_POST['f'.$md5.'extra'] ); + $tmp = str_replace( "\r", "", $tmp ); + + $extra_attr = explode( ";", $tmp ); + + if ( is_array( $extra_attr ) and count( $extra_attr ) ) + { + foreach( $extra_attr as $l ) + { + $l = str_replace( 'http://', 'http|//', $l ); + + list( $p, $v ) = explode( ":", $l ); + + $colours[ $name ][ trim($p) ] = trim( str_replace( 'http|//', 'http://', $v) ); + } + } + } + } + + if ( count($colours) < 1 ) + { + $this->ipsclass->admin->error("CSS all gone wonky! No colours to edit"); + } + + //----------------------------------------- + + unset($name); + unset($property); + + $final = ""; + + //----------------------------------------- + // Got any CSS imports? + //----------------------------------------- + + foreach( $this->ipsclass->input as $k => $v ) + { + if( preg_match( "/import_\d+/s", $k ) ) + { + $final .= "@import {$v}\n"; + } + } + + foreach( $colours as $name => $property ) + { + $final .= $name."\n{\n"; + + if ( is_array($property) and count($property) > 0 ) + { + foreach( $property as $key => $value ) + { + if ( $key AND isset($value) ) + { + $final .= "\t".$key.": ".$value.";\n"; + } + } + } + + $final .= "}\n\n"; + + } + + $this->ipsclass->input['txtcss'] = $final; + $_POST['txtcss'] = $final; + $this->ipsclass->input['savereload'] = 0; + $this->save_css('edit'); + } + + + +} + + ?> \ No newline at end of file diff --git a/upload/sources/action_admin/skin_diff.php b/upload/sources/action_admin/skin_diff.php index e6e80dd1..2dc11727 100644 --- a/upload/sources/action_admin/skin_diff.php +++ b/upload/sources/action_admin/skin_diff.php @@ -2,25 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-12-08 16:41:30 -0500 (Fri, 08 Dec 2006) $ -| > $Revision: 781 $ +| > $Date: 2007-12-17 18:07:20 -0500 (Mon, 17 Dec 2007) $ +| > $Revision: 1149 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -32,7 +24,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -44,7 +36,7 @@ class ad_skin_diff * @var string */ var $perm_main = "lookandfeel"; - + /** * Section title name * @@ -55,65 +47,65 @@ class ad_skin_diff function auto_run() { - $this->ipsclass->admin->page_detail = "Сравнить ваш стиль."; - $this->ipsclass->admin->page_title = "HTML Сравнение стилей"; - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Сравнение' ); + $this->ipsclass->admin->page_detail = "Compare your template set differences."; + $this->ipsclass->admin->page_title = "Skin Template HTML Differences"; + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Skin Differences Home' ); //----------------------------------------- // LOAD HTML //----------------------------------------- - + $this->html = $this->ipsclass->acp_load_template('cp_skin_lookandfeel'); - + //----------------------------------------- // What to do? //----------------------------------------- - + switch($this->ipsclass->input['code']) { case 'skin_diff': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rundiff' ); $this->skin_differences_start(); break; - + case 'skin_diff_process': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rundiff' ); $this->skin_differences_process(); break; - + case 'skin_diff_view': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rundiff' ); $this->skin_differences_view(); break; - + case 'skin_diff_export': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':export' ); $this->skin_differences_export(); break; - + case 'skin_diff_view_diff': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rundiff' ); $this->skin_differences_view_diff(); break; - + case 'skin_diff_from_skin': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rundiff' ); $this->skin_differences_start_from_skin(); break; - + case 'skin_diff_remove': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->skin_differences_remove(); break; - - + + default: $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->skin_differences_list(); break; } } - + /*-------------------------------------------------------------------------*/ // Compare skin differences [VIEW] /*-------------------------------------------------------------------------*/ @@ -127,47 +119,47 @@ class ad_skin_diff //----------------------------------------- // Init //----------------------------------------- - + $diff_session_id = intval( $this->ipsclass->input['diff_session_id'] ); - + //----------------------------------------- // Get current session //----------------------------------------- - + $current_session = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'template_diff_session', 'where' => 'diff_session_id='.$diff_session_id ) ); - + if ( ! $current_session['diff_session_id'] ) { - $this->ipsclass->admin->error("Невозможно получить текущую сессию шаблона."); + $this->ipsclass->admin->error("Could not get the current template compare session."); } - + //----------------------------------------- // Delete from IMPORT //----------------------------------------- - + $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'templates_diff_import', 'where' => 'diff_session_id='.$diff_session_id ) ); - + //----------------------------------------- // Delete from SESSION //----------------------------------------- - + $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'template_diff_session', 'where' => 'diff_session_id='.$diff_session_id ) ); - + //----------------------------------------- // Delete from CHANGES //----------------------------------------- - + $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'template_diff_changes', 'where' => 'diff_session_id='.$diff_session_id ) ); - + //----------------------------------------- // Done... //----------------------------------------- - - $this->ipsclass->main_msg = "Отчет о различиях удален"; - + + $this->ipsclass->main_msg = "Differences report removed"; + $this->skin_differences_list(); } - + /*-------------------------------------------------------------------------*/ // Compare skin differences [EXPORT] /*-------------------------------------------------------------------------*/ @@ -181,58 +173,58 @@ class ad_skin_diff //----------------------------------------- // Init //----------------------------------------- - + $diff_session_id = intval( $this->ipsclass->input['diff_session_id'] ); $content = ''; $missing = 0; $changed = 0; - + //----------------------------------------- // Get current session //----------------------------------------- - + $current_session = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'template_diff_session', 'where' => 'diff_session_id='.$diff_session_id ) ); - + if ( ! $current_session['diff_session_id'] ) { - $this->ipsclass->admin->error("Невозможно получить текущую сессию шаблона"); + $this->ipsclass->admin->error("Could not get the current template compare session."); } - + //----------------------------------------- // Get data //----------------------------------------- - + $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'template_diff_changes', 'where' => 'diff_session_id='.$diff_session_id, 'order' => 'diff_change_func_group ASC, diff_change_func_name ASC' ) ); - - + + $this->ipsclass->DB->exec_query(); - + while( $row = $this->ipsclass->DB->fetch_row() ) { //----------------------------------------- // Culmulate //----------------------------------------- - + $row['diff_change_type'] ? $changed++ : $missing++; - + $row['diff_change_content'] = str_replace( "\n", "
    ", $row['diff_change_content']); $row['diff_change_content'] = str_replace( "><", ">\n<" ,$row['diff_change_content']); $row['diff_change_content'] = preg_replace( "#(?html->skin_diff_export_row( $row['diff_change_func_name'], $row['diff_change_func_group'], $row['diff_change_content'] ); } - + $content = $this->html->skin_diff_export_overview( $content, $missing, $changed, $current_session['diff_session_title'], gmdate( 'r' ) ); - + $this->ipsclass->admin->show_download( $content, 'ipb-difference-export.html', "unknown/unknown", 0 ); - + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // Compare skin differences [VIEW] /*-------------------------------------------------------------------------*/ @@ -246,33 +238,33 @@ class ad_skin_diff //----------------------------------------- // Init //----------------------------------------- - + $diff_key = $this->ipsclass->input['diff_key']; //----------------------------------------- // Get data //----------------------------------------- - + $diff_row = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'template_diff_changes', 'where' => "diff_change_key='".$diff_key."'" ) ); - - + + if ( ! $diff_row['diff_change_key'] ) { - $this->ipsclass->admin->error( "Ключ не найден" ); + $this->ipsclass->admin->error( "No key found" ); } - + $diff_row['diff_change_content'] = str_replace( "\n", "
    ", $diff_row['diff_change_content']); $diff_row['diff_change_content'] = str_replace( "><", ">\n<" ,$diff_row['diff_change_content']); $diff_row['diff_change_content'] = preg_replace( "#(?ipsclass->html = $this->html->skin_diff_view_bit( $diff_row['diff_change_func_group'], $diff_row['diff_change_func_name'], $diff_row['diff_change_content'] ); - + $this->ipsclass->admin->print_popup(); } - - + + /*-------------------------------------------------------------------------*/ // Compare skin differences [VIEW] /*-------------------------------------------------------------------------*/ @@ -286,83 +278,83 @@ class ad_skin_diff //----------------------------------------- // Init //----------------------------------------- - + $diff_session_id = intval( $this->ipsclass->input['diff_session_id'] ); $content = ''; $missing = 0; $changed = 0; $last_group = ''; - + //----------------------------------------- // Get current session //----------------------------------------- - + $current_session = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'template_diff_session', 'where' => 'diff_session_id='.$diff_session_id ) ); - + if ( ! $current_session['diff_session_id'] ) { - $this->ipsclass->admin->error("Невозможно получить текущую сессию шаблона."); + $this->ipsclass->admin->error("Could not get the current template compare session."); } - + //----------------------------------------- // Get data //----------------------------------------- - + $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'template_diff_changes', 'where' => 'diff_session_id='.$diff_session_id, 'order' => 'diff_change_func_group ASC, diff_change_func_name ASC' ) ); - - + + $this->ipsclass->DB->exec_query(); - + while( $row = $this->ipsclass->DB->fetch_row() ) { //----------------------------------------- // Gen data //----------------------------------------- - + $key = $diff_session_id.':'.$row['diff_change_func_group'].':'.$row['diff_change_func_name']; $size = $this->ipsclass->size_format( $this->ipsclass->math_strlen_to_bytes( strlen( $row['diff_change_content'] ) ) ); - + //----------------------------------------- // Diff type //----------------------------------------- - + if ( ! $row['diff_change_type'] ) { - $diff_is = 'Новое'; + $diff_is = 'New'; $missing++; } else { - $diff_is = 'Изменено'; + $diff_is = 'Changed'; $changed++; } - + //----------------------------------------- // New cat? //----------------------------------------- - + if ( $last_group != $row['diff_change_func_group'] ) { $last_group = $row['diff_change_func_group']; - + $content .= $this->html->skin_diff_row_newgroup( $row['diff_change_func_group'] ); } - + //----------------------------------------- // Culmulate //----------------------------------------- - + $content .= $this->html->skin_diff_row( $row['diff_change_func_name'], $size, $key, $diff_is, str_replace( ':', '_', $key ) ); } - + $this->ipsclass->html = $this->html->skin_diff_overview( $content, $missing, $changed ); - + $this->ipsclass->admin->output(); } - + /*-------------------------------------------------------------------------*/ // Compare skin differences: From 1 skin to another /*-------------------------------------------------------------------------*/ @@ -376,57 +368,57 @@ class ad_skin_diff //----------------------------------------- // Init //----------------------------------------- - + $content = ""; $skin_id = intval( $this->ipsclass->input['skin_id'] ); - + //----------------------------------------- // Check... //----------------------------------------- - + if ( ! $skin_id ) { $this->ipsclass->admin->error( "No skin ID passed!" ); } - + //----------------------------------------- // Get skin set... //----------------------------------------- - + $skin_set = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.$skin_id ) ); - + if ( ! $skin_set['set_skin_set_id'] ) { - $this->ipsclass->admin->error( "Не выбран ID стиля (заново!)" ); + $this->ipsclass->admin->error( "No skin ID passed (again)!" ); } - + //----------------------------------------- // Get number template bits //----------------------------------------- - + $total_bits = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as count', 'from' => 'skin_templates', 'where' => 'set_id=1' ) ); - + //----------------------------------------- // Create session //----------------------------------------- - + $this->ipsclass->DB->do_insert( 'template_diff_session', array( 'diff_session_togo' => intval( $total_bits['count'] ), 'diff_session_done' => 0, - 'diff_session_title' => "Сравнение со стилем: ".$skin_set['set_name'], + 'diff_session_title' => "Comparison from skin set: ".$skin_set['set_name'], 'diff_session_updated' => time(), 'diff_session_ignore_missing' => 1 ) ); - + $diff_session_id = $this->ipsclass->DB->get_insert_id(); - + $seen_templates = array(); //----------------------------------------- // Grab template bits from DB //----------------------------------------- - + $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'skin_templates', 'where' => 'set_id='.$skin_id ) ); $outer = $this->ipsclass->DB->exec_query(); - + while( $entry = $this->ipsclass->DB->fetch_row( $outer ) ) { $check = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'diff_key', 'from' => 'templates_diff_import', 'where' => "diff_key='".$diff_session_id.':'.$entry[ 'group_name' ].':'.$entry[ 'func_name' ]."'" ) ); @@ -449,14 +441,14 @@ class ad_skin_diff 'diff_func_data' => $entry[ 'func_data' ], 'diff_func_name' => $entry[ 'func_name' ], 'diff_func_content' => $entry[ 'section_content' ], - 'diff_session_id' => $diff_session_id ), 'diff_key='.$diff_session_id.':'.$entry[ 'group_name' ].':'.$entry[ 'func_name' ] ); + 'diff_session_id' => $diff_session_id ), "diff_key='" . $diff_session_id.':'.$entry[ 'group_name' ].':'.$entry[ 'func_name' ] . "'" ); } } } - + $this->ipsclass->admin->output_multiple_redirect_init( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code_js."&code=skin_diff_process&diff_session_id={$diff_session_id}&pergo=10" ); } - + /*-------------------------------------------------------------------------*/ // Compare skin differences /*-------------------------------------------------------------------------*/ @@ -470,146 +462,146 @@ class ad_skin_diff //----------------------------------------- // Init //----------------------------------------- - + $content = ""; $seen = array(); - + //----------------------------------------- // Check... //----------------------------------------- - + if ( ! $this->ipsclass->input['diff_session_title'] ) { - $this->ipsclass->admin->error( "Вы должны ввести название" ); + $this->ipsclass->admin->error( "You must enter a title" ); } - + //----------------------------------------- // Get uploaded file //----------------------------------------- - + if ( $_FILES['FILE_UPLOAD']['name'] == "" or ! $_FILES['FILE_UPLOAD']['name'] or ($_FILES['FILE_UPLOAD']['name'] == "none") ) { //----------------------------------------- // Ut-oh.... //----------------------------------------- - - $this->ipsclass->admin->error( "Файл не был загружен" ); + + $this->ipsclass->admin->error( "No file was uploaded" ); } else { //----------------------------------------- // Get uploaded schtuff //----------------------------------------- - + $tmp_name = $_FILES['FILE_UPLOAD']['name']; $tmp_name = preg_replace( "#\.gz$#", "", $tmp_name ); - + $content = $this->ipsclass->admin->import_xml( $tmp_name ); } - + if( !$content ) { $this->ipsclass->admin->error( "There was no content in the file to process" ); } - + //----------------------------------------- // Get number missing template bits //----------------------------------------- - + $total_bits = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as count', 'from' => 'skin_templates', 'where' => 'set_id=1' ) ); - + //----------------------------------------- // Create session //----------------------------------------- - + $this->ipsclass->DB->allow_sub_select = 1; - + $this->ipsclass->DB->do_insert( 'template_diff_session', array( 'diff_session_togo' => intval( $total_bits['count'] ), 'diff_session_done' => 0, 'diff_session_title' => $this->ipsclass->input['diff_session_title'], 'diff_session_updated' => time(), 'diff_session_ignore_missing' => intval( $this->ipsclass->input['diff_session_ignore_missing'] ) ) ); - + $diff_session_id = $this->ipsclass->DB->get_insert_id(); - + //----------------------------------------- // Get xml mah-do-dah //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); $xml = new class_xml(); - + //----------------------------------------- // Check to see if its an archive... //----------------------------------------- - + if ( preg_match( "#xml_read_archive_data( $content ); - + //----------------------------------------- // Get the XML documents //----------------------------------------- - + $import_xml = array(); - + foreach( $xmlarchive->file_array as $f ) { $import_xml[ $f['filename'] ] = $f['content']; } - + //----------------------------------------- // Import Templates //----------------------------------------- - + $content = $import_xml['ipb_templates.xml']; } - + //----------------------------------------- // Parse document //----------------------------------------- - + $xml->xml_parse_document( $content ); - + //----------------------------------------- // Import template bits... //----------------------------------------- - + if ( ! is_array( $xml->xml_array['templateexport']['templategroup']['template'] ) ) { - $this->ipsclass->admin->error("Ошибка с ipb_templates.xml - продолжить невозможно"); + $this->ipsclass->admin->error("Error with ipb_templates.xml - could not process XML properly"); } - + foreach( $xml->xml_array['templateexport']['templategroup']['template'] as $entry ) { $diff_key = $diff_session_id.':'.$entry[ 'group_name' ]['VALUE'].':'.$entry[ 'func_name' ]['VALUE']; - + if ( ! $seen[ $diff_key ] ) { $this->ipsclass->DB->allow_sub_select = 1; - + $this->ipsclass->DB->do_insert( 'templates_diff_import', array( 'diff_key' => $diff_session_id.':'.$entry[ 'group_name' ]['VALUE'].':'.$entry[ 'func_name' ]['VALUE'], 'diff_func_group' => $entry[ 'group_name' ]['VALUE'], 'diff_func_data' => $entry[ 'func_data' ]['VALUE'], 'diff_func_name' => $entry[ 'func_name' ]['VALUE'], 'diff_func_content' => $entry[ 'section_content' ]['VALUE'], 'diff_session_id' => $diff_session_id ) ); - + $seen[ $diff_key ] = 1; } - + } - + $this->ipsclass->admin->output_multiple_redirect_init( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code_js."&code=skin_diff_process&diff_session_id={$diff_session_id}&pergo=10" ); } - + /*-------------------------------------------------------------------------*/ // Compare skin differences [PROCESS] /*-------------------------------------------------------------------------*/ @@ -623,43 +615,43 @@ class ad_skin_diff //----------------------------------------- // INIT //----------------------------------------- - + $pergo = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 10; $diff_session_id = intval( $this->ipsclass->input['diff_session_id'] ); $done = 0; $img = '- '; - + //----------------------------------------- // Get current session //----------------------------------------- - + $current_session = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'template_diff_session', 'where' => 'diff_session_id='.$diff_session_id ) ); - + if ( ! $current_session['diff_session_id'] ) { - $this->ipsclass->admin->error("Невозможно получить текущую сессию шаблона."); + $this->ipsclass->admin->error("Could not get the current template compare session."); } - + //----------------------------------------- // Get Diff library //----------------------------------------- - + require_once( KERNEL_PATH . 'class_difference.php' ); $class_difference = new class_difference(); $class_difference->method = 'PHP'; - + //----------------------------------------- // Get template bits to check //----------------------------------------- - + $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'skin_templates', 'where' => 'set_id=1', 'order' => 'suid ASC', 'limit' => array( intval( $current_session['diff_session_done'] ), intval( $pergo ) ) ) ); - + $outer = $this->ipsclass->DB->exec_query(); - + if ( ! $this->ipsclass->DB->get_num_rows( $outer ) ) { $done = 1; @@ -671,34 +663,34 @@ class ad_skin_diff //----------------------------------------- // Get corresponding row from diff table //----------------------------------------- - + $diff_row = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'templates_diff_import', 'where' => "diff_func_group='{$row['group_name']}' AND diff_func_name='{$row['func_name']}' AND diff_session_id=".$diff_session_id ) ); - + //----------------------------------------- // Got anything? //----------------------------------------- - + if ( $diff_row['diff_key'] ) { //----------------------------------------- // Get difference //----------------------------------------- - + $difference = $class_difference->get_differences( $row['section_content'], $diff_row['diff_func_content'] ); - + //----------------------------------------- // Got any differences? //----------------------------------------- - + if ( $class_difference->diff_found ) { - + //----------------------------------------- // Get corresponding row from diff table //----------------------------------------- - + $diff_check = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'diff_change_key', 'from' => 'template_diff_changes', 'where' => "diff_change_key='" . $diff_session_id.':'.$row['group_name'].':'.$row['func_name'] . "'" ) ); @@ -735,36 +727,36 @@ class ad_skin_diff 'diff_session_id' => $diff_session_id ) ); } } - + //----------------------------------------- // Increment //----------------------------------------- - + $current_session['diff_session_done']++; } } - + //----------------------------------------- // Update current session //----------------------------------------- - + $this->ipsclass->DB->do_update( 'template_diff_session', array( 'diff_session_done' => intval( $current_session['diff_session_done'] ) ), 'diff_session_id='.$diff_session_id ); - + //----------------------------------------- // Done or more? //----------------------------------------- - + if ( ! $done ) { $this->ipsclass->admin->output_multiple_redirect_hit( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code_js."&code=skin_diff_process&diff_session_id={$diff_session_id}&pergo=".$pergo, - $img.' '.$current_session['diff_session_done'].' из '. $current_session['diff_session_togo'] .' шаблонов обработано...' ); + $img.' '.$current_session['diff_session_done'].' of '. $current_session['diff_session_togo'] .' template bits processed...' ); } else { - $this->ipsclass->admin->output_multiple_redirect_done( "Результаты"); + $this->ipsclass->admin->output_multiple_redirect_done( "View the differences results"); } } - + /*-------------------------------------------------------------------------*/ // Compare skin differences [START] /*-------------------------------------------------------------------------*/ @@ -778,40 +770,40 @@ class ad_skin_diff //----------------------------------------- // Init //----------------------------------------- - + $content = ''; - + //----------------------------------------- // Get sessions //----------------------------------------- - + $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'template_diff_session', 'order' => 'diff_session_updated DESC' ) ); - - + + $this->ipsclass->DB->exec_query(); - + while( $row = $this->ipsclass->DB->fetch_row() ) { //----------------------------------------- // Gen data //----------------------------------------- - + $row['_date'] = $this->ipsclass->get_date( $row['diff_session_updated'], 'TINY' ); - + //----------------------------------------- // Culmulate //----------------------------------------- - + $content .= $this->html->skin_diff_main_row( $row ); } - + $this->ipsclass->html = $this->html->skin_diff_main_overview( $content ); - + $this->ipsclass->admin->output(); } - + } diff --git a/upload/sources/action_admin/skin_import.php b/upload/sources/action_admin/skin_import.php index 62658641..120f9c4c 100644 --- a/upload/sources/action_admin/skin_import.php +++ b/upload/sources/action_admin/skin_import.php @@ -2,26 +2,18 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-12-04 10:31:02 -0600 (Mon, 04 Dec 2006) $ -| > $Revision: 757 $ -| > $Author: matt $ +| > $Date: 2008-01-25 16:22:42 -0500 (Fri, 25 Jan 2008) $ +| > $Revision: 1178 $ +| > $Author: bfarber $ +--------------------------------------------------------------------------- | | > Import functions @@ -34,7 +26,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Неверный вход

    У вас нет доступа к директиве этого файла. Если вы проводили обновления, убедитесь, что не забыли обновить 'admin.php'."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -42,14 +34,14 @@ if ( ! defined( 'IN_ACP' ) ) class ad_skin_import { var $base_url; - + /** * Section title name * * @var string */ var $perm_main = "lookandfeel"; - + /** * Section title name * @@ -59,8 +51,8 @@ class ad_skin_import { function auto_run() { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Импорт и экспорт стилей' ); - + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Skin Import/Export' ); + //----------------------------------------- switch($this->ipsclass->input['code']) @@ -69,45 +61,45 @@ class ad_skin_import { $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':export' ); $this->do_export(); break; - + case 'exportimages': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':export' ); $this->do_export_images(); break; - + case 'importtemplates': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':import' ); $this->import_xml_templates(); break; - + case 'importimages': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':import' ); $this->import_xml_images(); break; - + case 'importmacros': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':import' ); $this->import_xml_macros(); break; - + case 'exportmacros': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':export' ); $this->export_xml_macros(); - break; - + break; + //----------------------------------------- default: $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->show_export_page(); break; } - + } - + //----------------------------------------- // PERFORM IMPORT IMAGES //----------------------------------------- - + function import_xml_images() { if ( $_FILES['FILE_UPLOAD']['name'] == "" or ! $_FILES['FILE_UPLOAD']['name'] or ($_FILES['FILE_UPLOAD']['name'] == "none") ) @@ -115,19 +107,19 @@ class ad_skin_import { //----------------------------------------- // check and load from server //----------------------------------------- - + if ( ! $this->ipsclass->input['skin_location'] ) { - $this->ipsclass->main_msg = "Не выбран файл для загрузки."; + $this->ipsclass->main_msg = "No upload file was found and no filename was specified."; $this->show_export_page(); } - + if ( ! file_exists( ROOT_PATH . $this->ipsclass->input['skin_location'] ) ) { - $this->ipsclass->main_msg = "Не найден файл: " . ROOT_PATH . $this->ipsclass->input['skin_location']; + $this->ipsclass->main_msg = "Could not find the file to open at: " . ROOT_PATH . $this->ipsclass->input['skin_location']; $this->show_export_page(); } - + if ( preg_match( "#\.gz$#", $this->ipsclass->input['skin_location'] ) ) { if ( $FH = @gzopen( ROOT_PATH.$this->ipsclass->input['skin_location'], 'rb' ) ) @@ -136,7 +128,7 @@ class ad_skin_import { { $content .= @gzread( $FH, 1024 ); } - + @gzclose( $FH ); } } @@ -148,7 +140,7 @@ class ad_skin_import { @fclose( $FH ); } } - + $tmp_name = str_replace( ".gz", '', $this->ipsclass->input['skin_location'] ); } else @@ -156,35 +148,35 @@ class ad_skin_import { //----------------------------------------- // Get uploaded schtuff //----------------------------------------- - + $tmp_name = $_FILES['FILE_UPLOAD']['name']; $tmp_name = preg_replace( "#\.gz$#", "", $tmp_name ); - + $content = $this->ipsclass->admin->import_xml( $tmp_name ); } - + //----------------------------------------- // Get xml mah-do-dah //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); $xml = new class_xml(); - + require_once( KERNEL_PATH.'class_xmlarchive.php' ); $xmlarchive = new class_xmlarchive( KERNEL_PATH ); - + $xmlarchive->xml_read_archive_data( $content ); - + //----------------------------------------- - // Set up.. + // Set up.. //----------------------------------------- - + $safename = $this->ipsclass->input['skin_name'] ? $this->ipsclass->input['skin_name'] : preg_replace( "#ipb_images-(.+?)\.xml#i", "\\1", $tmp_name ); $safename = substr( str_replace( " ", "", strtolower( preg_replace( "[^a-zA-Z0-9]", "", $safename ) ) ), 0, 10 ); $images = array(); - + foreach( $xmlarchive->file_array as $f ) { if ( $f['content'] and $f['filename'] ) @@ -195,58 +187,58 @@ class ad_skin_import { ); } } - + //----------------------------------------- // Got owt? //----------------------------------------- - + if ( ! count($images) ) { - $this->ipsclass->main_msg = "В этом XML-архиве нет изображений для импортирования."; + $this->ipsclass->main_msg = "There were no images to import from that XMLarchive."; $this->show_export_page(); } - + //----------------------------------------- // Reet- test to see if we // can create dirs //----------------------------------------- - + if ( ! is_writable( CACHE_PATH.'style_images' ) ) { - $this->ipsclass->main_msg = "Невозможно создать новую директорию в /style_images/, проверьте правильно ли установлены права доступа (CHMOD) у /style_images/, права доступа должны быть 0777."; + $this->ipsclass->main_msg = 'We cannot create a new folder in the "style_images" folder - please check the CHMOD value of that folder and change to 0777 is required.'; $this->show_export_page(); } - + //----------------------------------------- // Check to make sure we're not // creating a DUPE! //----------------------------------------- - + if ( file_exists( CACHE_PATH.'style_images/'.$safename ) ) { $safename .= time(); } - + //----------------------------------------- // Create //----------------------------------------- - + if ( ! @mkdir( CACHE_PATH.'style_images/'.$safename, 0777 ) ) { - $this->ipsclass->main_msg = "Невозможно создать новую директорию в /style_images/.."; + $this->ipsclass->main_msg = "We are unable to create a directory in the 'style_images' folder."; $this->show_export_page(); } else { @chmod( CACHE_PATH.'style_images/'.$safename, 0777 ); } - + foreach( $images as $id => $data ) { //----------------------------------------- // Do we have a duuuur? //----------------------------------------- - + if ( $data['path'] ) { if ( ! file_exists( CACHE_PATH.'style_images/'.$safename.'/'.$data['path'] ) ) @@ -254,12 +246,12 @@ class ad_skin_import { @mkdir( CACHE_PATH.'style_images/'.$safename.'/'.$data['path'], 0777 ); @chmod( CACHE_PATH.'style_images/'.$safename.'/'.$data['path'], 0777 ); } - + $data['filename'] = $data['path'] . '/'. $data['filename']; } - + $content = $data['content']; - + if ( $content ) { if ( $FH = @fopen( CACHE_PATH.'style_images/'.$safename.'/'.$data['filename'], 'wb' ) ) @@ -268,61 +260,65 @@ class ad_skin_import { { @fclose( $FH ); } + + @chmod( CACHE_PATH.'style_images/'.$safename.'/'.$data['filename'], 0777 ); } } } - + //----------------------------------------- // Apply to a skin? //----------------------------------------- - + if( $this->ipsclass->input['skin_set'] ) { $skin_id = intval($this->ipsclass->input['skin_set']); $this->ipsclass->DB->do_update( 'skin_sets', array( 'set_image_dir' => $safename ), 'set_skin_set_id='.$skin_id ); - - $this->ipsclass->cache_func->_rebuild_skin_id_cache( array() ); + + #$this->ipsclass->cache_func->_rebuild_skin_id_cache( array() ); + + $this->ipsclass->cache_func->_rebuild_all_caches( array($skin_id) ); } - + //----------------------------------------- // all done? //----------------------------------------- - - $this->ipsclass->main_msg = "Изображения импортированы!"; + + $this->ipsclass->main_msg = "Image set imported!"; $this->show_export_page(); } - + //----------------------------------------- // PERFORM IMPORT TEMPLATES //----------------------------------------- - + function import_xml_templates() { //----------------------------------------- // Get default skin //----------------------------------------- - + $default = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_default=1' ) ); - + if ( $_FILES['FILE_UPLOAD']['name'] == "" or ! $_FILES['FILE_UPLOAD']['name'] or ($_FILES['FILE_UPLOAD']['name'] == "none") ) { //----------------------------------------- // check and load from server //----------------------------------------- - + if ( ! $this->ipsclass->input['skin_location'] ) { - $this->ipsclass->main_msg = "Не выбран файл для загрузки."; + $this->ipsclass->main_msg = "No upload file was found and no filename was specified."; $this->show_export_page(); } - + if ( ! file_exists( ROOT_PATH . $this->ipsclass->input['skin_location'] ) ) { - $this->ipsclass->main_msg = "Не найден файл: " . ROOT_PATH . $this->ipsclass->input['skin_location']; + $this->ipsclass->main_msg = "Could not find the file to open at: " . ROOT_PATH . $this->ipsclass->input['skin_location']; $this->show_export_page(); } - + if ( preg_match( "#\.gz$#", $this->ipsclass->input['skin_location'] ) ) { if ( $FH = @gzopen( ROOT_PATH.$this->ipsclass->input['skin_location'], 'rb' ) ) @@ -331,7 +327,7 @@ class ad_skin_import { { $content .= @gzread( $FH, 1024 ); } - + @gzclose( $FH ); } } @@ -343,86 +339,85 @@ class ad_skin_import { @fclose( $FH ); } } - + $tmp_name = str_replace( ".gz", '', $this->ipsclass->input['skin_location'] ); - + } else { //----------------------------------------- // Get uploaded schtuff //----------------------------------------- - + $tmp_name = $_FILES['FILE_UPLOAD']['name']; $tmp_name = preg_replace( "#\.gz$#", "", $tmp_name ); - + $content = $this->ipsclass->admin->import_xml( $tmp_name ); } - + if( !$content ) { - $this->ipsclass->admin->error( "Обрабатываемый файл пуст" ); + $this->ipsclass->admin->error( "There was no content in the file to process" ); } - + //----------------------------------------- // Get xml mah-do-dah //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); $xml = new class_xml(); - + $xml->doc_type = $this->ipsclass->vars['gb_char_set']; - $xml->use_doctype = 1; - $xml->lite_parser = 1; - + $xml->use_doctype = 1; + require_once( KERNEL_PATH.'class_xmlarchive.php' ); $xmlarchive = new class_xmlarchive( KERNEL_PATH ); - + $xmlarchive->xml_read_archive_data( $content ); - + //----------------------------------------- // Get the XML documents //----------------------------------------- - + $import_xml = array(); - + foreach( $xmlarchive->file_array as $f ) { $import_xml[ $f['filename'] ] = $f['content']; } - + //----------------------------------------- // Import INFO //----------------------------------------- - + if ( $import_xml[ 'ipb_info.xml' ] != '' ) { $info_xml = $this->_extract_xml_info( $import_xml[ 'ipb_info.xml' ], $xml, $xmlarchive ); } - + if ( ! is_array( $info_xml ) and ! count( $info_xml ) ) { - $this->ipsclass->main_msg = "Импортируемый XML-архив некорректный - проверьте файл и попробуйте снова."; + $this->ipsclass->main_msg = "The XMLarchive import doesn't appear to be valid - please check the file and try again."; $this->show_export_page(); } - + //----------------------------------------- // Import Templates //----------------------------------------- - + if ( $import_xml[ 'ipb_templates.xml' ] != '' ) { $templates_xml = $this->_extract_xml_templates( $import_xml[ 'ipb_templates.xml' ], $xml, $xmlarchive ); } - + //("content-type: text/plain"); print_r($templates_xml); exit(); - + //----------------------------------------- // Import CSS //----------------------------------------- - + if ( $import_xml[ 'ipb_css.xml' ] != '' ) { $css_xml = $this->_extract_xml_css( $import_xml[ 'ipb_css.xml' ], $xml, $xmlarchive ); @@ -431,25 +426,25 @@ class ad_skin_import { //----------------------------------------- // Import Macro //----------------------------------------- - + if ( $import_xml[ 'ipb_macro.xml' ] != '' ) { $macro_xml = $this->_extract_xml_macros( $import_xml[ 'ipb_macro.xml' ], $xml, $xmlarchive ); } - + //----------------------------------------- // Import WRAPPER //----------------------------------------- - + if ( $import_xml[ 'ipb_wrapper.xml' ] != '' ) { $wrapper_xml = $this->_extract_xml_wrapper( $import_xml[ 'ipb_wrapper.xml' ], $xml, $xmlarchive ); } - + //----------------------------------------- // Which image directory to use? //----------------------------------------- - + if( $this->ipsclass->input['image_set'] ) { $img_dir = $this->ipsclass->input['image_set']; @@ -457,14 +452,14 @@ class ad_skin_import { else { $img_dir = $default['set_image_dir']; - } - + } + //----------------------------------------- // Add new skin! //----------------------------------------- - + $this->ipsclass->DB->allow_sub_select = 1; - + $this->ipsclass->DB->do_insert( 'skin_sets', array( 'set_name' => $this->ipsclass->input['skin_name'] ? $this->ipsclass->input['skin_name'] : $info_xml['set_name'].' (Import)', 'set_hidden' => 0, 'set_default' => 0, @@ -473,40 +468,42 @@ class ad_skin_import { 'set_author_email' => $info_xml['set_author_email'], 'set_author_name' => $info_xml['set_author_name'], 'set_author_url' => $info_xml['set_author_url'], + 'set_key' => $info_xml['set_key'], 'set_css' => $css_xml, 'set_wrapper' => $wrapper_xml, 'set_css_updated' => time(), 'set_emoticon_folder' => $default['set_emoticon_folder'], 'set_image_dir' => $img_dir ) ); - + $new_skin_id = $this->ipsclass->DB->get_insert_id(); - + //----------------------------------------- // Insert templates... //----------------------------------------- - + if ( is_array( $templates_xml ) and count( $templates_xml ) ) { foreach( $templates_xml as $t ) { $this->ipsclass->DB->allow_sub_select = 1; - + $this->ipsclass->DB->do_insert( 'skin_templates', array( 'set_id' => $new_skin_id, - 'group_name' => $t['group_name'], - 'section_content' => $t['section_content'], - 'func_name' => $t['func_name'], - 'func_data' => $t['func_data'], - 'updated' => time(), - 'can_remove' => 1, + 'group_name' => $t['group_name'], + 'section_content' => $t['section_content'], + 'func_name' => $t['func_name'], + 'func_data' => $t['func_data'], + 'group_names_secondary' => $t['group_names_secondary'], + 'updated' => time(), + 'can_remove' => 1, ) ); } } - + //----------------------------------------- // Insert Macros //----------------------------------------- - + if ( is_array( $macro_xml ) and count( $macro_xml ) ) { foreach( $macro_xml as $t ) @@ -515,9 +512,9 @@ class ad_skin_import { { continue; } - + $this->ipsclass->DB->allow_sub_select = 1; - + $this->ipsclass->DB->do_insert( 'skin_macro', array( 'macro_set' => $new_skin_id, 'macro_value' => $t['macro_value'], 'macro_replace' => $t['macro_replace'], @@ -525,64 +522,64 @@ class ad_skin_import { ) ); } } - + //----------------------------------------- // Rebuild caches //----------------------------------------- - + $this->ipsclass->cache_func->_rebuild_all_caches( array($new_skin_id) ); - + //----------------------------------------- // DONE! //----------------------------------------- - - $this->ipsclass->main_msg = 'Стиль успешно импортирован! (id: '.$new_skin_id.')'; - + + $this->ipsclass->main_msg = 'Skin Set Imported! (id: '.$new_skin_id.')'; + $this->ipsclass->main_msg .= "
    ".implode( "
    ", $this->ipsclass->cache_func->messages ); - + $this->show_export_page(); } - - + + //----------------------------------------- // PERFORM IMPORT TEMPLATES //----------------------------------------- - + function import_xml_macros() { $skin_id = intval($this->ipsclass->input['skin_set']); - + $skin = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.$skin_id ) ); - + $current = $skin['set_skin_set_id']; $parent = $skin['set_skin_set_parent'] > 0 ? $skin['set_skin_set_parent'] : 1; //----------------------------------------- // Get default skin //----------------------------------------- - + $default = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_default=1' ) ); - + if ( $_FILES['FILE_UPLOAD']['name'] == "" or ! $_FILES['FILE_UPLOAD']['name'] or ($_FILES['FILE_UPLOAD']['name'] == "none") ) { //----------------------------------------- // check and load from server //----------------------------------------- - + if ( ! $this->ipsclass->input['skin_location'] ) { - $this->ipsclass->main_msg = "Загружаемый файл не был найден, или имя файла не указано."; + $this->ipsclass->main_msg = "No upload file was found and no filename was specified."; $this->show_export_page(); return; } - + if ( ! file_exists( ROOT_PATH . $this->ipsclass->input['skin_location'] ) ) { - $this->ipsclass->main_msg = "Невозможно найти и открыть файл: " . ROOT_PATH . $this->ipsclass->input['skin_location']; + $this->ipsclass->main_msg = "Could not find the file to open at: " . ROOT_PATH . $this->ipsclass->input['skin_location']; $this->show_export_page(); return; } - + if ( preg_match( "#\.gz$#", $this->ipsclass->input['skin_location'] ) ) { if ( $FH = @gzopen( ROOT_PATH.$this->ipsclass->input['skin_location'], 'rb' ) ) @@ -591,7 +588,7 @@ class ad_skin_import { { $content .= @gzread( $FH, 1024 ); } - + @gzclose( $FH ); } } @@ -603,58 +600,57 @@ class ad_skin_import { @fclose( $FH ); } } - + $tmp_name = str_replace( ".gz", '', $this->ipsclass->input['skin_location'] ); - + } else { //----------------------------------------- // Get uploaded schtuff //----------------------------------------- - + $tmp_name = $_FILES['FILE_UPLOAD']['name']; $tmp_name = preg_replace( "#\.gz$#", "", $tmp_name ); - + $content = $this->ipsclass->admin->import_xml( $tmp_name ); } - + if( !$content ) { - $this->ipsclass->main_msg = "Невозможно открыть XML-файл"; + $this->ipsclass->main_msg = "Could not open the xml file"; $this->show_export_page(); return; } - + //----------------------------------------- // Get xml mah-do-dah //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); $xml = new class_xml(); $xml->doc_type = $this->ipsclass->vars['gb_char_set']; - $xml->use_doctype = 1; - $xml->lite_parser = 1; - + $xml->use_doctype = 1; + //----------------------------------------- // Get the XML documents //----------------------------------------- $xml->xml_parse_document( $content ); - + //----------------------------------------- // Import Macros //----------------------------------------- - + if ( ! is_array( $xml->xml_array['macroexport']['macrogroup'] ) and ! count( $xml->xml_array['macroexport']['macrogroup'] ) ) { - $this->ipsclass->main_msg = "Импортируемый XML-архив некорректный - проверьте файл и попробуйте снова."; + $this->ipsclass->main_msg = "The XML import doesn't appear to be valid - please check the file and try again."; $this->show_export_page(); return; } - + $this->ipsclass->DB->do_delete( 'skin_macro', "macro_set={$skin_id}" ); - + foreach( $xml->xml_array['macroexport']['macrogroup']['macro'] as $id => $entry ) { $newrow = array(); @@ -664,53 +660,53 @@ class ad_skin_import { $newrow['macro_set'] = $skin_id; $this->ipsclass->DB->do_insert( 'skin_macro', $newrow ); - } - + } + //----------------------------------------- // Rebuild caches //----------------------------------------- - + $this->ipsclass->cache_func->_rebuild_all_caches( array($skin_id) ); - + //----------------------------------------- // DONE! //----------------------------------------- - - $this->ipsclass->main_msg = 'Макросы успешно импортированы! (id: '.$skin_id.')'; - + + $this->ipsclass->main_msg = 'Macros Imported! (id: '.$skin_id.')'; + $this->ipsclass->main_msg .= "
    ".implode( "
    ", $this->ipsclass->cache_func->messages ); - + $this->show_export_page(); - } - - + } + + //----------------------------------------- // PERFORM EXPORT MACROS //----------------------------------------- - + function export_xml_macros() { $skin_id = intval($this->ipsclass->input['skin_id']); - + $skin = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.$skin_id ) ); - + $current = $skin['set_skin_set_id']; $parent = $skin['set_skin_set_parent'] > 0 ? $skin['set_skin_set_parent'] : 1; - + //----------------------------------------- // Get xml mah-do-dah //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); $xml = new class_xml(); - + //----------------------------------------- // Get data //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_macro', 'where' => 'macro_set='.$parent ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $macros[ strtolower( $r['macro_value'] ) ] = $r; @@ -719,175 +715,171 @@ class ad_skin_import { //----------------------------------------- // Get this set macro //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_macro', 'where' => 'macro_set='.$skin['set_skin_set_id'] ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $macros[ strtolower( $r['macro_value'] ) ] = $r; } - + //----------------------------------------- // Format macros into XML //----------------------------------------- - + if ( count( $macros ) ) { $xml->xml_set_root( 'macroexport', array( 'exported' => time() ) ); $xml->xml_add_group( 'macrogroup' ); - + foreach( $macros as $data ) { $content = array(); - + $content[] = $xml->xml_build_simple_tag( 'macro_value' , $data['macro_value'] ); $content[] = $xml->xml_build_simple_tag( 'macro_replace', $data['macro_replace'] ); - + $entry[] = $xml->xml_build_entry( 'macro', $content ); } - + $xml->xml_add_entry_to_group( 'macrogroup', $entry ); - + $xml->xml_format_document(); } - + //----------------------------------------- // Send to browser. //----------------------------------------- - + $this->ipsclass->admin->show_download( $xml->xml_document, 'ipb_macro.xml', '', 0 ); - } - - + } + + //----------------------------------------- // PERFORM EXPORT IMAGES THING YES! //----------------------------------------- - + function do_export_images() { $skin_dir = $this->ipsclass->input['skin_dirs']; - + if ( ! @file_exists( CACHE_PATH.'style_images/'.$skin_dir ) ) { - $this->ipsclass->main_msg = "Невозможно найти выбранную директорию, проверьте настройки и попробуйте еще раз"; + $this->ipsclass->main_msg = "We cannot locate the selected image directory - please try another"; $this->show_export_page(); } - + //----------------------------------------- // Get xml mah-do-dah //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); $xml = new class_xml(); - + require_once( KERNEL_PATH.'class_xmlarchive.php' ); $xmlarchive = new class_xmlarchive( KERNEL_PATH ); - + $xmlarchive->strip_path = CACHE_PATH.'style_images/'.$skin_dir; - + $xmlarchive->xml_add_directory( CACHE_PATH.'style_images/'.$skin_dir ); - + $xmlarchive->xml_create_archive(); $contents = $xmlarchive->xml_get_contents(); - + $this->ipsclass->admin->show_download( $contents, 'ipb_images-'.$skin_dir.'.xml' ); } - + //----------------------------------------- // PERFORM EXPORT! //----------------------------------------- - + function do_export() { //----------------------------------------- // Get current skin //----------------------------------------- - + $skin = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.intval($this->ipsclass->input['skin_id']) ) ); - + $current = $skin['set_skin_set_id']; $parent = $skin['set_skin_set_parent']; - + $safename = substr( str_replace( " ", "", strtolower( preg_replace( "[^a-zA-Z0-9]", "", $skin['set_name'] ) ) ), 0, 10 ); - + //----------------------------------------- // Get xml mah-do-dah //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); $xml = new class_xml(); - + require_once( KERNEL_PATH.'class_xmlarchive.php' ); $xmlarchive = new class_xmlarchive( KERNEL_PATH ); - + //----------------------------------------- // Get data //----------------------------------------- - + $templates_xml = $this->_export_get_templates( $skin, $xml, $parent ); $css_xml = $this->_export_get_css( $skin, $xml, $parent ); $macro_xml = $this->_export_get_macro( $skin, $xml, $parent ); $wrapper_xml = $this->_export_get_wrapper( $skin, $xml, $parent ); $info_xml = $this->_export_get_info( $skin, $xml, $parent ); - + //header("Content-Type: text/plain"); //print $templates_xml."\n\n".$css_xml."\n\n".$macro_xml."\n\n".$wrapper_xml."\n\n".$info_xml; //exit(); - + //----------------------------------------- // Format XMLarchive //----------------------------------------- - + $xmlarchive->xml_add_file_contents( $info_xml , 'ipb_info.xml'); $xmlarchive->xml_add_file_contents( $templates_xml, 'ipb_templates.xml'); $xmlarchive->xml_add_file_contents( $css_xml , 'ipb_css.xml' ); $xmlarchive->xml_add_file_contents( $macro_xml , 'ipb_macro.xml' ); $xmlarchive->xml_add_file_contents( $wrapper_xml , 'ipb_wrapper.xml' ); - + $xmlarchive->xml_create_archive(); - + $skin_xmlfile = $xmlarchive->xml_get_contents(); - + //----------------------------------------- // Send to browser. //----------------------------------------- - + $this->ipsclass->admin->show_download( $skin_xmlfile, 'ipb_skin-'.$safename.'.xml' ); } - + /*-------------------------------------------------------------------------*/ // _EXTRACT MACROS /*-------------------------------------------------------------------------*/ - + function _extract_xml_macros( $content, $xml, $xmlarchive ) { $return = array(); - + //----------------------------------------- // Unpack the datafile //----------------------------------------- - + $xml->xml_parse_document( $content ); - + if ( ! is_array( $xml->xml_array['macroexport']['macrogroup']['macro'][0] ) ) { //----------------------------------------- // Ensure [0] is populated //----------------------------------------- - - $tmp = $xml->xml_array['macroexport']['macrogroup']['macro']; - - unset($xml->xml_array['macroexport']['macrogroup']['macro']); - - $xml->xml_array['macroexport']['macrogroup']['macro'][0] = $tmp; + + $xml->xml_array['macroexport']['macrogroup']['macro'] = array( 0 => $xml->xml_array['macroexport']['macrogroup']['macro'] ); } - + if ( is_array( $xml->xml_array['macroexport']['macrogroup']['macro'] ) and count( $xml->xml_array['macroexport']['macrogroup']['macro'] ) ) { foreach( $xml->xml_array['macroexport']['macrogroup']['macro'] as $entry ) @@ -897,37 +889,33 @@ class ad_skin_import { ); } } - + return $return; } - + /*-------------------------------------------------------------------------*/ // _EXTRACT WRAPPER /*-------------------------------------------------------------------------*/ - + function _extract_xml_wrapper( $content, $xml, $xmlarchive ) { $return = array(); - + //----------------------------------------- // Unpack the datafile //----------------------------------------- - + $xml->xml_parse_document( $content ); - + if ( ! is_array( $xml->xml_array['wrapperexport']['wrappergroup']['wrapper'][0] ) ) { //----------------------------------------- // Ensure [0] is populated //----------------------------------------- - $tmp = $xml->xml_array['wrapperexport']['wrappergroup']['wrapper']; - - unset($xml->xml_array['wrapperexport']['wrappergroup']['wrapper']); - - $xml->xml_array['wrapperexport']['wrappergroup']['wrapper'][0] = $tmp; + $xml->xml_array['wrapperexport']['wrappergroup']['wrapper'] = array( 0 => $xml->xml_array['wrapperexport']['wrappergroup']['wrapper'] ); } - + if ( is_array( $xml->xml_array['wrapperexport']['wrappergroup']['wrapper'] ) ) { foreach( $xml->xml_array['wrapperexport']['wrappergroup']['wrapper'] as $entry ) @@ -935,37 +923,33 @@ class ad_skin_import { $return = $entry['wrappercontent']['VALUE']; } } - + return $return; } - + /*-------------------------------------------------------------------------*/ // _EXTRACT CSS /*-------------------------------------------------------------------------*/ - + function _extract_xml_css( $content, $xml, $xmlarchive ) { $return = array(); - + //----------------------------------------- // Unpack the datafile //----------------------------------------- - + $xml->xml_parse_document( $content ); - + if ( ! is_array( $xml->xml_array['cssexport']['cssgroup']['css'][0] ) ) { //----------------------------------------- // Ensure [0] is populated //----------------------------------------- - $tmp = $xml->xml_array['cssexport']['cssgroup']['css']; - - unset($xml->xml_array['cssexport']['cssgroup']['css']); - - $xml->xml_array['cssexport']['cssgroup']['css'][0] = $tmp; + $xml->xml_array['cssexport']['cssgroup']['css'] = array( 0 => $xml->xml_array['cssexport']['cssgroup']['css'] ); } - + if ( is_array( $xml->xml_array['cssexport']['cssgroup']['css'] ) ) { foreach( $xml->xml_array['cssexport']['cssgroup']['css'] as $entry ) @@ -973,37 +957,33 @@ class ad_skin_import { $return = $entry['csscontent']['VALUE']; } } - + return $return; } - + /*-------------------------------------------------------------------------*/ // _EXTRACT TEMPLATES /*-------------------------------------------------------------------------*/ - - function _extract_xml_templates( $content, $xml, $xmlarchive ) + + function _extract_xml_templates( $content, &$xml, &$xmlarchive ) { $return = array(); - + //----------------------------------------- // Unpack the datafile //----------------------------------------- $xml->xml_parse_document( $content ); - + if ( ! is_array( $xml->xml_array['templateexport']['templategroup']['template'][0] ) ) { //----------------------------------------- // Ensure [0] is populated //----------------------------------------- - - $tmp = $xml->xml_array['templateexport']['templategroup']['template']; - - unset($xml->xml_array['templateexport']['templategroup']['template']); - - $xml->xml_array['templateexport']['templategroup']['template'][0] = $tmp; + + $xml->xml_array['templateexport']['templategroup']['template'] = array( 0 => $xml->xml_array['templateexport']['templategroup']['template'] ); } - + if ( is_array( $xml->xml_array['templateexport']['templategroup']['template'] ) ) { foreach( $xml->xml_array['templateexport']['templategroup']['template'] as $entry ) @@ -1012,46 +992,43 @@ class ad_skin_import { { continue; } - - $return[] = array( 'group_name' => $entry[ 'group_name' ]['VALUE'], - 'section_content' => $entry[ 'section_content' ]['VALUE'], - 'func_name' => $entry[ 'func_name' ]['VALUE'], - 'func_data' => $entry[ 'func_data' ]['VALUE'] + + $return[] = array( 'group_name' => $entry[ 'group_name' ]['VALUE'], + 'section_content' => $entry[ 'section_content' ]['VALUE'], + 'func_name' => $entry[ 'func_name' ]['VALUE'], + 'func_data' => $entry[ 'func_data' ]['VALUE'], + 'group_names_secondary' => $entry[ 'group_names_secondary' ]['VALUE'], ); } } - + return $return; } - - + + /*-------------------------------------------------------------------------*/ // _EXTRACT INFO /*-------------------------------------------------------------------------*/ - + function _extract_xml_info( $content, $xml, $xmlarchive ) { $return = array(); - + //----------------------------------------- // Unpack the datafile //----------------------------------------- $xml->xml_parse_document( $content ); - + if ( ! is_array( $xml->xml_array['infoexport']['infogroup']['info'][0] ) ) { //----------------------------------------- // Ensure [0] is populated //----------------------------------------- - $tmp = $xml->xml_array['infoexport']['infogroup']['info']; - - unset($xml->xml_array['infoexport']['infogroup']['info']); - - $xml->xml_array['infoexport']['infogroup']['info'][0] = $tmp; + $xml->xml_array['infoexport']['infogroup']['info'] = array( 0 => $xml->xml_array['infoexport']['infogroup']['info'] ); } - + if ( is_array( $xml->xml_array['infoexport']['infogroup']['info'] ) ) { foreach( $xml->xml_array['infoexport']['infogroup']['info'] as $entry ) @@ -1060,218 +1037,220 @@ class ad_skin_import { $return[ 'set_author_email' ] = $entry['set_author_email']['VALUE']; $return[ 'set_author_name' ] = $entry['set_author_name']['VALUE']; $return[ 'set_author_url' ] = $entry['set_author_url']['VALUE']; + $return[ 'set_key' ] = $entry['set_key']['VALUE']; } } - + return $return; } - + /*-------------------------------------------------------------------------*/ // _EXPORT INFO (internal) /*-------------------------------------------------------------------------*/ - + function _export_get_info( $skin, $xml, $parent ) { $xml->xml_set_root( 'infoexport', array( 'exported' => time() ) ); $xml->xml_add_group( 'infogroup' ); - + $content[] = $xml->xml_build_simple_tag( 'set_name' , $skin['set_name'] ); $content[] = $xml->xml_build_simple_tag( 'set_author_email', $skin['set_author_email'] ); $content[] = $xml->xml_build_simple_tag( 'set_author_name' , $skin['set_author_name'] ); $content[] = $xml->xml_build_simple_tag( 'set_author_url' , $skin['set_author_url'] ); - + $content[] = $xml->xml_build_simple_tag( 'set_key' , $skin['set_key'] ); + $entry[] = $xml->xml_build_entry( 'info', $content ); - + $xml->xml_add_entry_to_group( 'infogroup', $entry ); - + $xml->xml_format_document(); $info_xml = $xml->xml_document; - + return $info_xml; } - + /*-------------------------------------------------------------------------*/ // _EXPORT WRAPPER (internal) /*-------------------------------------------------------------------------*/ - + function _export_get_wrapper( $skin, $xml, $parent ) { $raw_wrapper = ""; - + if ( $this->ipsclass->input['skin_options'] != 'noparent' ) { if ( $parent > 1 ) { $wrapper_parent = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.$parent ) ); } - + if ( $wrapper_parent['set_wrapper'] ) { $raw_wrapper = $wrapper_parent['set_wrapper']; } - + } - + if ( $skin['set_wrapper'] ) { $raw_wrapper = $skin['set_wrapper']; } - + $xml->xml_set_root( 'wrapperexport', array( 'exported' => time() ) ); $xml->xml_add_group( 'wrappergroup' ); - + $content[] = $xml->xml_build_simple_tag( 'wrappercontent', $raw_wrapper ); - + $entry[] = $xml->xml_build_entry( 'wrapper', $content ); - + $xml->xml_add_entry_to_group( 'wrappergroup', $entry ); - + $xml->xml_format_document(); $wrapper_xml = $xml->xml_document; - + return $wrapper_xml; } - + /*-------------------------------------------------------------------------*/ // _EXPORT MACRO (internal) /*-------------------------------------------------------------------------*/ - + function _export_get_macro( $skin, $xml, $parent ) { $macro_xml = ""; $macros = array(); $entry = array(); - + if ( $this->ipsclass->input['skin_options'] != 'noparent' ) { //----------------------------------------- // Get parent macros //----------------------------------------- - + if ( $parent > 1 ) { $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_macro', 'where' => 'macro_set='.$parent ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $macros[ strtolower( $r['macro_value'] ) ] = $r; } } } - + //----------------------------------------- // Get this set macro //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_macro', 'where' => 'macro_set='.$skin['set_skin_set_id'] ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $macros[ strtolower( $r['macro_value'] ) ] = $r; } - + //----------------------------------------- // Format macros into XML //----------------------------------------- - + if ( count( $macros ) ) { $xml->xml_set_root( 'macroexport', array( 'exported' => time() ) ); $xml->xml_add_group( 'macrogroup' ); - + foreach( $macros as $data ) { $content = array(); - + $content[] = $xml->xml_build_simple_tag( 'macro_value' , $data['macro_value'] ); $content[] = $xml->xml_build_simple_tag( 'macro_replace', $data['macro_replace'] ); - + $entry[] = $xml->xml_build_entry( 'macro', $content ); } - + $xml->xml_add_entry_to_group( 'macrogroup', $entry ); - + $xml->xml_format_document(); - + $macro_xml = $xml->xml_document; } - + return $macro_xml; } - + /*-------------------------------------------------------------------------*/ // _EXPORT CSS (internal) /*-------------------------------------------------------------------------*/ - + function _export_get_css( $skin, $xml, $parent ) { $raw_css = ""; - + if ( $this->ipsclass->input['skin_options'] != 'noparent' ) { if ( $parent > 1 ) { $css_parent = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.$parent ) ); } - + if ( $css_parent['set_css'] ) { $raw_css = $css_parent['set_css']; } } - + if ( $skin['set_css'] ) { $raw_css = $skin['set_css']; } - + $xml->xml_set_root( 'cssexport', array( 'exported' => time() ) ); $xml->xml_add_group( 'cssgroup' ); - + $content[] = $xml->xml_build_simple_tag( 'csscontent', $raw_css ); - + $entry[] = $xml->xml_build_entry( 'css', $content ); - + $xml->xml_add_entry_to_group( 'cssgroup', $entry ); - + $xml->xml_format_document(); $css_xml = $xml->xml_document; - + return $css_xml; } - + /*-------------------------------------------------------------------------*/ // _EXPORT TEMPLATES (internal) /*-------------------------------------------------------------------------*/ - + function _export_get_templates( $skin, $xml, $parent ) { $xml->xml_set_root( 'templateexport', array( 'exported' => time(), 'versionid' => '20000', 'type' => 'export' ) ); - + $xml->xml_add_group( 'templategroup' ); - + if ( $this->ipsclass->input['skin_options'] == 'noparent' ) { $this->ipsclass->DB->simple_construct( array( 'select' => 'group_name, section_content, func_name, func_data', 'from' => 'skin_templates', 'where' => 'set_id='.intval($this->ipsclass->input['skin_id']) ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $content = array(); - + foreach ( $r as $k => $v ) { $content[] = $xml->xml_build_simple_tag( $k, $v ); } - + $entry[] = $xml->xml_build_entry( 'template', $content ); } - + $xml->xml_add_entry_to_group( 'templategroup', $entry ); } else @@ -1279,138 +1258,140 @@ class ad_skin_import { //----------------------------------------- // Get template parents //----------------------------------------- - + $all_templates = array(); - + if ( $parent > 1 ) { $this->ipsclass->DB->simple_construct( array( 'select' => 'group_name, section_content, func_name, func_data', 'from' => 'skin_templates', 'where' => 'set_id='.$parent ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $all_templates[ strtolower( $r['group_name'] ) .','. strtolower( $r['func_name'] ) ] = $r; } } - + $this->ipsclass->DB->simple_construct( array( 'select' => 'group_name, section_content, func_name, func_data', 'from' => 'skin_templates', 'where' => 'set_id='.intval($this->ipsclass->input['skin_id']) ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $all_templates[ strtolower( $r['group_name'] ) .','. strtolower( $r['func_name'] ) ] = $r; } - + if ( count( $all_templates ) ) { foreach( $all_templates as $r ) { $content = array(); - + foreach ( $r as $k => $v ) { $content[] = $xml->xml_build_simple_tag( $k, $v ); } - + $entry[] = $xml->xml_build_entry( 'template', $content ); } - + $xml->xml_add_entry_to_group( 'templategroup', $entry ); } } - + $xml->xml_format_document(); - + $templates_xml = $xml->xml_document; - + return $templates_xml; } - - + + //----------------------------------------- // SHOW EXPORT PAGE //----------------------------------------- - + function show_export_page() { $form_array = array(); $set_to_image = array(); - - $this->ipsclass->admin->page_detail = "В этой секции вы можете импортировать и экспортировать стили. XML-архивы стилей (HTML шаблоны, CSS стили, макросы и общие шаблоны) независимы от набора изображений.
    Для экспорта 'полной версии' стиля вы должны экспортировать оба XML-архива: стиля и изображений.
    Импорт 'полного' шаблона так же состоит из двух действий, сначала вам необходимо загрузить XML-архив самого стиля, затем архив с его изображениями."; - $this->ipsclass->admin->page_title = "Импорт/экспорт стилей"; - + + $this->ipsclass->admin->page_detail = "You can download skin sets by configuring the form below. The skin XML templates (HTML, Macros, CSS & Wrapper) are independent of the image set.
    To download a 'full' skin set, you will need to download both the skin XML and the image set."; + $this->ipsclass->admin->page_title = "Export Skin Sets"; + //----------------------------------------- // Get skin list... //----------------------------------------- - + require_once( ROOT_PATH.'sources/classes/class_display.php' ); $display = new display(); $display->ipsclass =& $this->ipsclass; - + $skin_list = $display->_build_skin_list(); + $skin_list = str_replace( "selected='selected'", "", $skin_list ); + $skin_list = str_replace( 'selected="selected"', "", $skin_list ); //----------------------------------------- // Do we have an incoming ID? //----------------------------------------- - + if ( $this->ipsclass->input['id'] ) { $skin_list = str_replace( "value='{$this->ipsclass->input['id']}'", "value='{$this->ipsclass->input['id']}' selected='selected'", $skin_list ); } - + //----------------------------------------- // Get skins... //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_sets', 'order' => 'set_skin_set_id DESC' ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $set_to_image[ $r['set_image_dir'] ] = $r['set_name']; } - + //----------------------------------------- // Image dir //----------------------------------------- - + $dirs = array(); - + $dh = opendir( CACHE_PATH.'style_images' ); - + while ( false !== ( $file = readdir( $dh ) ) ) { if (($file != ".") && ($file != "..")) { if ( is_dir( CACHE_PATH.'style_images/'.$file ) ) { - $dirs[] = array( $file, 'Изображения: "'.$file.'" (используются шаблоном: '.$set_to_image[ $file ].')' ); + $dirs[] = array( $file, 'Image Set: "'.$file.'" (used in skin: '.$set_to_image[ $file ].')' ); } } } - + closedir( $dh ); - + //----------------------------------------- // start output //----------------------------------------- - + $start_form_a = $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'import' ), 2 => array( 'code', 'export' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $start_form_b = $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'import' ), 2 => array( 'code', 'exportimages' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $start_form_c = $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'import' ), 2 => array( 'code', 'importtemplates' ), 3 => array( 'MAX_FILE_SIZE', '10000000000' ), 4 => array( 'section', $this->ipsclass->section_code ), ) , "uploadform", " enctype='multipart/form-data'" ); - + $start_form_d = $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'import' ), 2 => array( 'code', 'importimages' ), 3 => array( 'MAX_FILE_SIZE', '10000000000' ), @@ -1428,167 +1409,167 @@ class ad_skin_import { 3 => array( 'MAX_FILE_SIZE', '10000000000' ), 4 => array( 'section', $this->ipsclass->section_code ), ) , "uploadform", " enctype='multipart/form-data'" ); - - $import_dirs[] = array( '', 'Никакую' ); + + $import_dirs[] = array( '', '-None-' ); $import_dirs = array_merge( $import_dirs, $dirs ); - - $import_skins = "".$skin_list; - + + $import_skins = "".$skin_list; + $this->ipsclass->html .= "
    -
    Экспорт...
    +
    Exporting...

    - Экспорт стилей + Export Skin Templates $start_form_a
    - + - +
    Какой стиль экспортировать?
    Пожалуйста, выберите стиль для экспорта.
    Export Which Skin Template Set?
    Please select which skin set (HTML templates, CSS, Macros & wrapper) you wish to export.
    Настройки экспорта
    Полнота экспорта
    Export Options
    Please choose how deep this export should look for customizations.
    ".$this->ipsclass->adskin->form_dropdown("skin_options", - array( 0 => array( 'noparent' , 'Весь стиль' ), - 1 => array( 'yesparent' , 'Только сделанные изменения' ) + array( 0 => array( 'noparent' , 'Export customizations in this skin only' ), + 1 => array( 'yesparent' , 'Export customizations in this skin and any parent skins' ) ) ) ."
    -
    +

    - +
    - Экспорт изображений + Export Skin Images $start_form_b
    - +
    Какие изображения экспортировать?
    Эти изображения будут экспортированы как XML-архив.
    Вы не сможете просмотреть изображения в этом архиве. Для просмотра изображений мы рекомендуем скачать изображения используя вашу FTP-программу.
    Export Which Image Set?
    Image sets are exported into the XMLarchive format. This is not suitable for safemode users and in such a case we recommend you manually download via FTP and ZIP the images.
    ". $this->ipsclass->adskin->form_dropdown( 'skin_dirs', $dirs )."
    -
    +

    - +
    - Экспорт макросов + Export Skin Macros $start_form_e
    - +
    Какие макросы эскпортировать?
    Макросы экспортируются в XML файл. Эта опция может не работать, если на вашем сервере включен безопасный режим (safemode).
    Export Macros From Which Skin Set?
    Macro sets are exported into XML format. This option may not work properly if your server has safemode enabled.
    -
    +
    -
    +
    - +
    - +
    -
    Импорт...
    +
    Importing...

    - Импорт шаблонов стиля + Import Skin Templates $start_form_c
    - + - + - + - + - +
    Загрузка XML-архива с шаблонами
    Этот файл должен начинаться с 'ipb_skin-' и заканчиваться '.xml' или '.xml.gz'
    Upload XML Template set
    The file must begin with 'ipb_skin-' and end with either '.xml' or '.xml.gz'
    ". $this->ipsclass->adskin->form_upload( ) ."
    ИЛИ введите название файла-архива
    Этот файл должен быть загружен в корневую директорию вашего форума.
    OR enter the filename of the XML Template Set
    The file must be uploaded into the forum's root folder
    ".$this->ipsclass->adskin->form_input( 'skin_location' )."
    Название шаблонов:
    Оставьте поле пустым, если хотите, чтобы использовать название шаблонов из XML-архива
    New Skin Set Name?
    Leave blank to use the skin name from the XMLarchive
    ".$this->ipsclass->adskin->form_input( 'skin_name' )."
    Какую директорию с изображениями использовать в этом стиле?
    Если вы не хотите сейчас выбрать это, выберите «Никакую».
    Use with which image set?
    If you have not yet uploaded the image set, leave on -None-
    ". $this->ipsclass->adskin->form_dropdown( 'image_set', $import_dirs )."
    -
    +
    - +
    - Импорт изображений + Import Skin Images $start_form_d
    - + - + - + - + - +
    Загрузка XML-архива с изображениями
    Этот файл должен начинаться с 'ipb_images-' и заканчиваться '.xml' или '.xml.gz'
    Upload XMLarchive Image set
    The file must begin with 'ipb_images-' and end with either '.xml' or '.xml.gz'
    ". $this->ipsclass->adskin->form_upload( ) ."
    ИЛИ введите название файла-архива
    Этот файл должен быть загружен в корневую директорию вашего форума
    OR enter the filename of the XMLarchive Image Set
    The file must be uploaded into the forum's root folder
    ".$this->ipsclass->adskin->form_input( 'skin_location' )."
    Название директории изображений:
    Оставьте поле пустым, если хотите, чтобы использовать название директории изображений из XML-архива.
    New Image Set Directory Name?
    Leave blank to use the set name from the XMLarchive
    ".$this->ipsclass->adskin->form_input( 'skin_name' )."
    Какой стиль использовать с импортируемой директорией?
    Если вы не хотите сейчас выбрать это, выберите «Никакой».
    Use with which skin set?
    If you do not want to apply this image set to any skin, leave on -None-.
    -
    +
    - +
    - Импорт макросов + Import Skin Macros $start_form_f
    - + - + - + - +
    Загрузка XML-архива с макросами
    Файл обязан начинаться с 'ipb_macros-' и иметь расширение '.xml'
    Upload XML Macro set
    The file must begin with 'ipb_macros-' and end with '.xml'
    ". $this->ipsclass->adskin->form_upload( ) ."
    ИЛИ введите имя файла XML-архива с макросами
    Файл должен находиться в корневой директории форума
    OR enter the filename of the XML Macro Set
    The file must be uploaded into the forum's root folder
    ".$this->ipsclass->adskin->form_input( 'skin_location' )."
    С каким стилем использовать?Use with which skin set?
    -
    +
    -
    +
    "; - - + + $this->ipsclass->admin->output(); - + } - - - + + + } diff --git a/upload/sources/action_admin/skin_macros.php b/upload/sources/action_admin/skin_macros.php index b2ed7b11..0f5a945c 100644 --- a/upload/sources/action_admin/skin_macros.php +++ b/upload/sources/action_admin/skin_macros.php @@ -1,492 +1,484 @@ - $Date: 2006-10-05 11:04:08 -0500 (Thu, 05 Oct 2006) $ -| > $Revision: 609 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > Skin -> Image Macro functions -| > Module written by Matt Mecham -| > Date started: 4th April 2002 -| -| > Module Version Number: 1.0.0 -| > DBA Checked: Tue 25th May 2004 -+-------------------------------------------------------------------------- -*/ - - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - - -class ad_skin_macros { - - var $base_url; - - /** - * Section title name - * - * @var string - */ - var $perm_main = "lookandfeel"; - - /** - * Section title name - * - * @var string - */ - var $perm_child = "image"; - - - function auto_run() - { - //----------------------------------------- - - switch($this->ipsclass->input['code']) - { - case 'edit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->show_macros(); - break; - - case 'doedit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->edit_set_name(); - break; - - case 'macroremove': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); - $this->macro_remove(); - break; - - case 'doeditmacro': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->macro_edit(); - break; - - case 'doaddmacro': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); - $this->macro_add(); - break; - - default: - print "Действие не выбрано"; exit(); - break; - } - } - - //----------------------------------------- - // Remove macro - //----------------------------------------- - - function macro_remove() - { - if ($this->ipsclass->input['mid'] == "") - { - $this->ipsclass->admin->error("Вы должны выбрать ID макроса, вернитесь назад и попробуйте еще раз"); - } - - $id = intval($this->ipsclass->input['id']); - $p = intval($this->ipsclass->input['p']); - - $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_macro', 'where' => "macro_id=".intval($this->ipsclass->input['mid']) ) ); - - //----------------------------------------- - // Recache macros - //----------------------------------------- - - $this->ipsclass->cache_func->_recache_macros($id, $p); - - //----------------------------------------- - // Bounce back - //----------------------------------------- - - $this->ipsclass->input['id'] = $id; - $this->ipsclass->main_msg = "Макрос удален!"; - $this->show_macros(); - } - - //----------------------------------------- - // Apply the edit to the DB - //----------------------------------------- - - function macro_edit() - { - if ($this->ipsclass->input['mid'] == "") - { - $this->ipsclass->admin->error("Вы должны выбрать ID макроса, вернитесь назад и попробуйте еще раз"); - } - - $id = intval($this->ipsclass->input['id']); - $p = intval($this->ipsclass->input['p']); - - $key = $this->ipsclass->DB->add_slashes( $this->ipsclass->txt_safeslashes($_POST['variable']) ); - $val = $this->ipsclass->DB->add_slashes( $this->ipsclass->txt_safeslashes($_POST['replacement']) ); - - //----------------------------------------- - // Get macro for examination.. - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_macro', 'where' => "macro_id=".intval($this->ipsclass->input['mid']) ) ); - $this->ipsclass->DB->simple_exec(); - - if ( ! $row = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->admin->error("Невозможно получить запись из базы данных"); - } - - //----------------------------------------- - // Is this our macro set? - //----------------------------------------- - - if ( $row['macro_set'] == $id ) - { - //----------------------------------------- - // Okay, update... - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'update' => 'skin_macro', 'set' => "macro_value='$key', macro_replace='$val'", 'where' => "macro_id=".intval($this->ipsclass->input['mid']) ) ); - $this->ipsclass->DB->simple_exec(); - } - else - { - //----------------------------------------- - // No? OK - best add it as a 'new' macro - //----------------------------------------- - - $this->ipsclass->DB->manual_addslashes = 1; - $this->ipsclass->DB->do_insert( 'skin_macro', array ( - 'macro_value' => $key, - 'macro_replace' => $val, - 'macro_can_remove' => 1, - 'macro_set' => $id - ) ); - - $this->ipsclass->DB->manual_addslashes = 0; - } - - - //----------------------------------------- - // Recache macros - //----------------------------------------- - - $this->ipsclass->cache_func->_recache_macros($id, $p); - - //----------------------------------------- - // Bounce back - //----------------------------------------- - - $this->ipsclass->input['id'] = $id; - $this->show_macros(); - } - - //----------------------------------------- - // ADD MACRO - //----------------------------------------- - - function macro_add() - { - if ($this->ipsclass->input['mid'] == "") - { - $this->ipsclass->admin->error("Вы должны выбрать ID макроса, вернитесь назад и попробуйте еще раз"); - } - - $id = intval($this->ipsclass->input['id']); - $p = intval($this->ipsclass->input['p']); - - $this->ipsclass->DB->do_insert( 'skin_macro', array ( - 'macro_value' => $this->ipsclass->txt_safeslashes($_POST['variable']), - 'macro_replace' => $this->ipsclass->txt_safeslashes($_POST['replacement']), - 'macro_can_remove' => 1, - 'macro_set' => $id - ) ); - - //----------------------------------------- - // Recache macros - //----------------------------------------- - - $this->ipsclass->cache_func->_recache_macros($id, $p); - - //----------------------------------------- - // Bounce back - //----------------------------------------- - - $this->ipsclass->input['id'] = $id; - $this->show_macros(); - - } - - - - //----------------------------------------- - // Show macros - //----------------------------------------- - - function show_macros() - { - //----------------------------------------- - - if ($this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Вы должны выбрать ID макроса, вернитесь назад и попробуйте еще раз"); - } - - //----------------------------------------- - // check tree... - //----------------------------------------- - - $this_set = ""; - - if ( $this->ipsclass->input['p'] > 0 ) - { - $in = ','.$this->ipsclass->input['p']; - } - - //----------------------------------------- - // Get macros - //----------------------------------------- - - $macros = $this->ipsclass->cache_func->_get_macros($this->ipsclass->input['id'], $this->ipsclass->input['p']); - - //----------------------------------------- - // Get img_dir this set is using... - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_sets', 'where' => "set_skin_set_id=".intval($this->ipsclass->input['id']) ) ); - $this->ipsclass->DB->simple_exec(); - - $skin = $this->ipsclass->DB->fetch_row(); - - $this->ipsclass->admin->page_detail = "Для изменения макроса, нажмите на ссылку 'Изменить' напротив выбранного макроса."; - - $this->ipsclass->admin->page_title = "Управление заменами макросов шаблона: {$skin['set_name']}"; - - //----------------------------------------- - // Start output - //----------------------------------------- - - $this->ipsclass->html .= " -
    -
    - - - - - -
    Управление заменами макросовipsclass->input['id']}');\" />
    - -
    -
    - - "; - - $this->ipsclass->html .= "
    \n
    \n"; - - $this->unaltered = "- "; - $this->altered = "+ "; - $this->inherited = "| "; - - //----------------------------------------- - // Loop and print - //----------------------------------------- - - foreach( $macros as $row ) - { - $real = $this->ipsclass->txt_htmlspecialchars( $row['macro_replace'] ); - $real = str_replace("\n", '\n', str_replace( "\r", '\r', $real) ); - - //----------------------------------------- - // Altered? - //----------------------------------------- - - if ( $row['macro_set'] == $this->ipsclass->input['id'] ) - { - $altered_image = $this->altered; - $css_info = '#FFDCD8'; - } - else if ( $row['macro_set'] == 1 ) - { - $altered_image = $this->unaltered; - $css_info = '#EEE'; - } - else - { - $altered_image = $this->inherited; - $css_info = '#FFF2D3'; - } - - //----------------------------------------- - // Figure out quotes - //----------------------------------------- - - $out_quote = '"'; - $in_quote = "'"; - - if ( preg_match( "/'/", $real ) ) - { - $out_quote = "'"; - $in_quote = '"'; - } - - if( $in_quote == '"' ) - { - $real = str_replace( """, '\"', $real ); - } - - if( $in_quote == "'" ) - { - $real = str_replace( "'", "\\'", $real ); - } - - $preview = str_replace( "<#IMG_DIR#>", $skin['set_image_dir'], $row['macro_replace'] ); - - if ( $row['macro_set'] > 1 and $row['macro_set'] == $this->ipsclass->input['id'] ) - { - $remove_button = "ipsclass->form_code_js}&code=macroremove&mid={$row['macro_id']}&id={$this->ipsclass->input['id']}&p={$this->ipsclass->input['p']}');\" />"; - } - else - { - $remove_button = ""; - } - - //----------------------------------------- - // Not an image? - //----------------------------------------- - - if ( ! preg_match( "#img\s{1,}src=#i", $row['macro_replace'] ) ) - { - $preview = substr( $real, 0, 200 ); - } - else - { - $preview = preg_replace( "#style_images#", $this->ipsclass->vars['board_url'].'/style_images', $preview ); - } - - $edit_button = ""; - - //----------------------------------------- - // Render row - //----------------------------------------- - - $style = "padding:4px;border-bottom:1px solid #DDD;background:{$css_info}"; - - $this->ipsclass->html .= " - - - - - - - "; - } - - - $this->ipsclass->html .= "
    $altered_image -  <{{$row['macro_value']}}> - $preview$remove_button $edit_button
    -
    -
    - ipsclass->input['id']}');\" /> -
    -
    "; - - $this->ipsclass->html .= $this->ipsclass->adskin->skin_jump_menu_wrap(); - - //----------------------------------------- - // Show altered / unaltered - // legend - //----------------------------------------- - - $this->ipsclass->html .= "
    -
    Пример работы макроса
    - Если вы добавили макрос 'green_font' и замену для него в виде '<font color='green'>', каждый элемент текста <{green_font}> будет отображен как <font color='green'> -
    <#IMG_DIR#> доступен в любом макросе. Во время вывода текста на экран будет произведена замена данного тега на путь прописанный в настройках к директории с изображениями. -

    -
    Описание обозначений:
    - {$this->altered} Этот макрос был изменен. -
    {$this->unaltered} Этот макрос не был изменен. -
    {$this->inherited} Этот макрос построен на базе существующего макрос. -
    "; - - $this->ipsclass->admin->nav[] = array( 'section='.$this->ipsclass->section_code.'&act=sets' ,'Управление стилями' ); - $this->ipsclass->admin->nav[] = array( '' ,'Управление заменами макросов '.$skin['set_name'] ); - - $this->ipsclass->admin->output(); - - } - - - -} - - + $Date: 2006-10-05 12:04:08 -0400 (Thu, 05 Oct 2006) $ +| > $Revision: 609 $ +| > $Author: matt $ ++--------------------------------------------------------------------------- +| +| > Skin -> Image Macro functions +| > Module written by Matt Mecham +| > Date started: 4th April 2002 +| +| > Module Version Number: 1.0.0 +| > DBA Checked: Tue 25th May 2004 ++-------------------------------------------------------------------------- +*/ + + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class ad_skin_macros { + + var $base_url; + + /** + * Section title name + * + * @var string + */ + var $perm_main = "lookandfeel"; + + /** + * Section title name + * + * @var string + */ + var $perm_child = "image"; + + + function auto_run() + { + //----------------------------------------- + + switch($this->ipsclass->input['code']) + { + case 'edit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->show_macros(); + break; + + case 'doedit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->edit_set_name(); + break; + + case 'macroremove': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); + $this->macro_remove(); + break; + + case 'doeditmacro': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->macro_edit(); + break; + + case 'doaddmacro': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); + $this->macro_add(); + break; + + default: + print "No action"; exit(); + break; + } + } + + //----------------------------------------- + // Remove macro + //----------------------------------------- + + function macro_remove() + { + if ($this->ipsclass->input['mid'] == "") + { + $this->ipsclass->admin->error("You must specify an existing macro ID, go back and try again"); + } + + $id = intval($this->ipsclass->input['id']); + $p = intval($this->ipsclass->input['p']); + + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_macro', 'where' => "macro_id=".intval($this->ipsclass->input['mid']) ) ); + + //----------------------------------------- + // Recache macros + //----------------------------------------- + + $this->ipsclass->cache_func->_recache_macros($id, $p); + + //----------------------------------------- + // Bounce back + //----------------------------------------- + + $this->ipsclass->input['id'] = $id; + $this->ipsclass->main_msg = "Macro removed!"; + $this->show_macros(); + } + + //----------------------------------------- + // Apply the edit to the DB + //----------------------------------------- + + function macro_edit() + { + if ($this->ipsclass->input['mid'] == "") + { + $this->ipsclass->admin->error("You must specify an existing image set ID, go back and try again"); + } + + $id = intval($this->ipsclass->input['id']); + $p = intval($this->ipsclass->input['p']); + + $key = $this->ipsclass->DB->add_slashes( $this->ipsclass->txt_safeslashes($_POST['variable']) ); + $val = $this->ipsclass->DB->add_slashes( $this->ipsclass->txt_safeslashes($_POST['replacement']) ); + + //----------------------------------------- + // Get macro for examination.. + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_macro', 'where' => "macro_id=".intval($this->ipsclass->input['mid']) ) ); + $this->ipsclass->DB->simple_exec(); + + if ( ! $row = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->admin->error("Could not retrieve the record from the DB"); + } + + //----------------------------------------- + // Is this our macro set? + //----------------------------------------- + + if ( $row['macro_set'] == $id ) + { + //----------------------------------------- + // Okay, update... + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'update' => 'skin_macro', 'set' => "macro_value='$key', macro_replace='$val'", 'where' => "macro_id=".intval($this->ipsclass->input['mid']) ) ); + $this->ipsclass->DB->simple_exec(); + } + else + { + //----------------------------------------- + // No? OK - best add it as a 'new' macro + //----------------------------------------- + + $this->ipsclass->DB->manual_addslashes = 1; + $this->ipsclass->DB->do_insert( 'skin_macro', array ( + 'macro_value' => $key, + 'macro_replace' => $val, + 'macro_can_remove' => 1, + 'macro_set' => $id + ) ); + + $this->ipsclass->DB->manual_addslashes = 0; + } + + + //----------------------------------------- + // Recache macros + //----------------------------------------- + + $this->ipsclass->cache_func->_recache_macros($id, $p); + + //----------------------------------------- + // Bounce back + //----------------------------------------- + + $this->ipsclass->input['id'] = $id; + $this->show_macros(); + } + + //----------------------------------------- + // ADD MACRO + //----------------------------------------- + + function macro_add() + { + if ($this->ipsclass->input['mid'] == "") + { + $this->ipsclass->admin->error("You must specify an existing macro set ID, go back and try again"); + } + + $id = intval($this->ipsclass->input['id']); + $p = intval($this->ipsclass->input['p']); + + $this->ipsclass->DB->do_insert( 'skin_macro', array ( + 'macro_value' => $this->ipsclass->txt_safeslashes($_POST['variable']), + 'macro_replace' => $this->ipsclass->txt_safeslashes($_POST['replacement']), + 'macro_can_remove' => 1, + 'macro_set' => $id + ) ); + + //----------------------------------------- + // Recache macros + //----------------------------------------- + + $this->ipsclass->cache_func->_recache_macros($id, $p); + + //----------------------------------------- + // Bounce back + //----------------------------------------- + + $this->ipsclass->input['id'] = $id; + $this->show_macros(); + + } + + + + //----------------------------------------- + // Show macros + //----------------------------------------- + + function show_macros() + { + //----------------------------------------- + + if ($this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("You must specify an existing macro set ID, go back and try again"); + } + + //----------------------------------------- + // check tree... + //----------------------------------------- + + $this_set = ""; + + if ( $this->ipsclass->input['p'] > 0 ) + { + $in = ','.$this->ipsclass->input['p']; + } + + //----------------------------------------- + // Get macros + //----------------------------------------- + + $macros = $this->ipsclass->cache_func->_get_macros($this->ipsclass->input['id'], $this->ipsclass->input['p']); + + //----------------------------------------- + // Get img_dir this set is using... + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_sets', 'where' => "set_skin_set_id=".intval($this->ipsclass->input['id']) ) ); + $this->ipsclass->DB->simple_exec(); + + $skin = $this->ipsclass->DB->fetch_row(); + + $this->ipsclass->admin->page_detail = "To edit a macro, simply click on the 'edit' link of the appropriate macro."; + + $this->ipsclass->admin->page_title = "Manage Replacement Macros in Set: {$skin['set_name']}"; + + //----------------------------------------- + // Start output + //----------------------------------------- + + $this->ipsclass->html .= " +
    +
    + + + + + +
    Manage Replacement Macrosipsclass->input['id']}');\" />
    + +
    +
    + + "; + + $this->ipsclass->html .= "
    \n
    \n"; + + $this->unaltered = "- "; + $this->altered = "+ "; + $this->inherited = "| "; + + //----------------------------------------- + // Loop and print + //----------------------------------------- + + foreach( $macros as $row ) + { + $real = $this->ipsclass->txt_htmlspecialchars( $row['macro_replace'] ); + $real = str_replace("\n", '\n', str_replace( "\r", '\r', $real) ); + + //----------------------------------------- + // Altered? + //----------------------------------------- + + if ( $row['macro_set'] == $this->ipsclass->input['id'] ) + { + $altered_image = $this->altered; + $css_info = '#FFDCD8'; + } + else if ( $row['macro_set'] == 1 ) + { + $altered_image = $this->unaltered; + $css_info = '#EEE'; + } + else + { + $altered_image = $this->inherited; + $css_info = '#FFF2D3'; + } + + //----------------------------------------- + // Figure out quotes + //----------------------------------------- + + $out_quote = '"'; + $in_quote = "'"; + + if ( preg_match( "/'/", $real ) ) + { + $out_quote = "'"; + $in_quote = '"'; + } + + if( $in_quote == '"' ) + { + $real = str_replace( """, '\"', $real ); + } + + if( $in_quote == "'" ) + { + $real = str_replace( "'", "\\'", $real ); + } + + $preview = str_replace( "<#IMG_DIR#>", $skin['set_image_dir'], $row['macro_replace'] ); + + if ( $row['macro_set'] > 1 and $row['macro_set'] == $this->ipsclass->input['id'] ) + { + $remove_button = "ipsclass->form_code_js}&code=macroremove&mid={$row['macro_id']}&id={$this->ipsclass->input['id']}&p={$this->ipsclass->input['p']}');\" />"; + } + else + { + $remove_button = ""; + } + + //----------------------------------------- + // Not an image? + //----------------------------------------- + + if ( ! preg_match( "#img\s{1,}src=#i", $row['macro_replace'] ) ) + { + $preview = substr( $real, 0, 200 ); + } + else + { + $preview = preg_replace( "#style_images#", $this->ipsclass->vars['board_url'].'/style_images', $preview ); + } + + $edit_button = ""; + + //----------------------------------------- + // Render row + //----------------------------------------- + + $style = "padding:4px;border-bottom:1px solid #DDD;background:{$css_info}"; + + $this->ipsclass->html .= " + + + + + + + "; + } + + + $this->ipsclass->html .= "
    $altered_image +  <{{$row['macro_value']}}> + $preview$remove_button $edit_button
    +
    +
    + ipsclass->input['id']}');\" /> +
    +
    "; + + $this->ipsclass->html .= $this->ipsclass->adskin->skin_jump_menu_wrap(); + + //----------------------------------------- + // Show altered / unaltered + // legend + //----------------------------------------- + + $this->ipsclass->html .= "
    +
    Replace Macro Example
    + If you added a key of 'green_font' and a replacement of '<font color='green'>', each instance of <{green_font}> would be converted to <font color='green'> +
    <#IMG_DIR#> is available to any macro, this is automatically replaced with the name of the image directory you choose when using this macro set in a skin +

    +
    Replacement Macro Legend:
    + {$this->altered} This item has been customized for this skin set. +
    {$this->unaltered} This item has not been customized from the master skin set. +
    {$this->inherited} This item has inherited customizations from the parent skin set. +
    "; + + $this->ipsclass->admin->nav[] = array( 'section='.$this->ipsclass->section_code.'&act=sets' ,'Skin Manager Home' ); + $this->ipsclass->admin->nav[] = array( '' ,'Editing Replacement Macros in Set '.$skin['set_name'] ); + + $this->ipsclass->admin->output(); + + } + + + +} + + ?> \ No newline at end of file diff --git a/upload/sources/action_admin/skin_remap.php b/upload/sources/action_admin/skin_remap.php new file mode 100644 index 00000000..8ba35625 --- /dev/null +++ b/upload/sources/action_admin/skin_remap.php @@ -0,0 +1,378 @@ + $Date: 2007-01-18 23:02:56 +0000 (Thu, 18 Jan 2007) $ +| > $Revision: 831 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > Skin Difference Engine +| > Module written by Matt Mecham +| > Date started: 22nd July 2005 ++-------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class ad_skin_remap +{ + /** + * Section title name + * + * @var string + */ + var $perm_main = "lookandfeel"; + + /** + * Section title name + * + * @var string + */ + var $perm_child = "skinremap"; + + + function auto_run() + { + $this->ipsclass->admin->page_detail = "This section allows you to force a skin set to be used in conjunction with a URL."; + $this->ipsclass->admin->page_title = "Skin Remapping"; + + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Skin Remapping Home' ); + + //----------------------------------------- + // LOAD HTML + //----------------------------------------- + + $this->html = $this->ipsclass->acp_load_template('cp_skin_lookandfeel'); + + //----------------------------------------- + // What to do? + //----------------------------------------- + + switch($this->ipsclass->input['code']) + { + case 'remap_remove': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->skin_remap_remove(); + break; + case 'remap_add_do': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->skin_remap_save('add'); + break; + case 'remap_edit_do': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->skin_remap_save('edit'); + break; + case 'remap_edit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->skin_remap_form('edit'); + break; + case 'remap_add': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->skin_remap_form('add'); + break; + case 'remap_list': + default: + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->skin_remap_list(); + break; + } + } + + /*-------------------------------------------------------------------------*/ + // Skin Remap: Save + /*-------------------------------------------------------------------------*/ + + function skin_remap_remove() + { + //-------------------------------------------- + // INIT + //-------------------------------------------- + + $map_id = intval($this->ipsclass->input['map_id']); + + //----------------------------------------- + // Geddit + //----------------------------------------- + + $remap = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', + 'from' => 'skin_url_mapping', + 'where' => 'map_id='.$map_id ) ); + + + if ( ! $remap['map_id'] ) + { + $this->ipsclass->main_msg = "No ID was passed, please try again."; + $this->skin_remap_list(); + return; + } + + //----------------------------------------- + // Remove it + //----------------------------------------- + + $this->ipsclass->DB->do_delete( 'skin_url_mapping', 'map_id=' . $map_id ); + + //----------------------------------------- + // Recache + //----------------------------------------- + + $this->skin_remap_recache(); + + //----------------------------------------- + // Done... + //----------------------------------------- + + $this->ipsclass->main_msg = "Remapping removed"; + $this->skin_remap_list(); + } + + /*-------------------------------------------------------------------------*/ + // Skin Remap: Save + /*-------------------------------------------------------------------------*/ + + function skin_remap_save( $type='add' ) + { + //-------------------------------------------- + // INIT + //-------------------------------------------- + + $map_id = intval($this->ipsclass->input['map_id']); + $map_title = trim( $this->ipsclass->txt_stripslashes( $this->ipsclass->txt_htmlspecialchars($_POST['map_title'])) ); + $map_url = trim( $this->ipsclass->txt_stripslashes( $this->ipsclass->txt_UNhtmlspecialchars($_POST['map_url'])) ); + $map_match_type = trim( $this->ipsclass->input['map_match_type'] ); + $map_skin_set_id = intval($this->ipsclass->input['map_skin_set_id']); + + //-------------------------------------------- + // Checks... + //-------------------------------------------- + + if ( $type == 'edit' ) + { + if ( ! $map_id OR ! $map_title OR ! $map_url ) + { + $this->ipsclass->main_msg = "You must complete the form fully"; + $this->skin_remap_form( $type ); + return; + } + } + else + { + if ( ! $map_title OR ! $map_url ) + { + $this->ipsclass->main_msg = "You must complete the entire form."; + $this->skin_remap_form( $type ); + return; + } + } + + //-------------------------------------------- + // Save... + //-------------------------------------------- + + $array = array( 'map_title' => $map_title, + 'map_url' => $map_url, + 'map_match_type' => $map_match_type, + 'map_skin_set_id' => $map_skin_set_id, + ); + + if ( $type == 'add' ) + { + $array['map_date_added'] = time(); + + $this->ipsclass->DB->do_insert( 'skin_url_mapping', $array ); + + $this->ipsclass->main_msg = 'Skin Remap Added'; + } + else + { + + $this->ipsclass->DB->do_update( 'skin_url_mapping', $array, 'map_id='.$map_id ); + + $this->ipsclass->main_msg = 'Skin Remap Edited'; + } + + //----------------------------------------- + // Rebuild skin cache... + //----------------------------------------- + + $this->skin_remap_recache(); + + //----------------------------------------- + // Done... + //----------------------------------------- + + $this->skin_remap_list(); + } + + /*-------------------------------------------------------------------------*/ + // Skin Remap: Form + /*-------------------------------------------------------------------------*/ + + function skin_remap_form( $type='add' ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $map_id = intval( $this->ipsclass->input['map_id'] ); + $map_match_type = array( 0 => array( 'contains', 'Contains' ), + 1 => array( 'exactly' , 'Is Exactly' ) ); + $form = array(); + $skins = array(); + $remap = array(); + + //----------------------------------------- + // Check (please?) + //----------------------------------------- + + if ( $type == 'add' ) + { + $formcode = 'remap_add_do'; + $title = "Add New Skin Remap"; + $button = "Add New Skin Remap"; + } + else + { + $remap = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', + 'from' => 'skin_url_mapping', + 'where' => 'map_id='.$map_id ) ); + + + if ( ! $remap['map_id'] ) + { + $this->ipsclass->main_msg = "No ID was passed, please try again."; + $this->skin_remap_list(); + return; + } + + $formcode = 'remap_edit_do'; + $title = "Edit Remapping ".$remap['map_title']; + $button = "Save Changes"; + } + + //----------------------------------------- + // Figure out skin + //----------------------------------------- + + $_skin_id = ( $_POST['map_skin_set_id'] ) ? $_POST['map_skin_set_id'] : $remap['map_skin_set_id']; + + //----------------------------------------- + // Get skins.. + //----------------------------------------- + + $tmp = $this->ipsclass->skin['_setid']; + + $this->ipsclass->skin['_setid'] = $_skin_id; + + require_once( ROOT_PATH.'sources/classes/class_display.php' ); + $display = new display(); + $display->ipsclass =& $this->ipsclass; + + $form['skin_list'] = $display->_build_skin_list(); + + $this->ipsclass->skin['_setid'] = $tmp; + + //----------------------------------------- + // Form elements + //----------------------------------------- + + $form['map_title'] = $this->ipsclass->adskin->form_input( 'map_title' , $this->ipsclass->txt_htmlspecialchars( ( isset($_POST['map_title']) AND $_POST['map_title'] ) ? $_POST['map_title'] : $remap['map_title'] ) ); + $form['map_match_type'] = $this->ipsclass->adskin->form_dropdown( 'map_match_type' , $map_match_type, ( isset($_POST['map_match_type']) AND $_POST['map_match_type'] ) ? $_POST['map_match_type'] : $remap['map_match_type'] ); + $form['map_url'] = $this->ipsclass->adskin->form_input( 'map_url' , $this->ipsclass->txt_htmlspecialchars( ( isset($_POST['map_url']) AND $_POST['map_url'] ) ? $_POST['map_url'] : $remap['map_url'] ) ); + + $this->ipsclass->html .= $this->html->skin_remap_form( $form, $title, $formcode, $button, $remap ); + + $this->ipsclass->admin->output(); + } + + /*-------------------------------------------------------------------------*/ + // Compare skin differences [START] + /*-------------------------------------------------------------------------*/ + /** + * Compare skin differences (START) + * + * + * @since 2.1.0.2005-07-22 + */ + function skin_remap_list() + { + //----------------------------------------- + // Init + //----------------------------------------- + + $content = ''; + $remaps = array(); + + //----------------------------------------- + // Get sessions + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => '*', + 'from' => 'skin_url_mapping', + 'order' => 'map_date_added DESC' ) ); + + + $this->ipsclass->DB->exec_query(); + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + //----------------------------------------- + // Gen data + //----------------------------------------- + + $row['_date'] = $this->ipsclass->get_date( $row['map_date_added'], 'TINY' ); + $row['_name'] = $this->ipsclass->cache['skin_id_cache'][ $row['map_skin_set_id'] ]['set_name']; + + //----------------------------------------- + // Culmulate + //----------------------------------------- + + $remaps[] = $row; + } + + $this->ipsclass->html = $this->html->skin_remap_overview( $remaps ); + + $this->ipsclass->admin->output(); + } + + /*-------------------------------------------------------------------------*/ + // Recache the skin stuff + /*-------------------------------------------------------------------------*/ + + function skin_remap_recache() + { + $this->ipsclass->cache['skin_remap'] = array(); + + $this->ipsclass->DB->build_query( array( 'select' => '*', + 'from' => 'skin_url_mapping' ) ); + + $this->ipsclass->DB->exec_query(); + + while( $r = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->cache['skin_remap'][ $r['map_id'] ] = $r; + } + + $this->ipsclass->update_cache( array( 'name' => 'skin_remap', 'deletefirst' => 1, 'donow' => 1, 'array' => 1 ) ); + + return TRUE; + } + +} + + +?> \ No newline at end of file diff --git a/upload/sources/action_admin/skin_sets.php b/upload/sources/action_admin/skin_sets.php index 51f46d03..680457a1 100644 --- a/upload/sources/action_admin/skin_sets.php +++ b/upload/sources/action_admin/skin_sets.php @@ -1,1928 +1,1924 @@ - $Date: 2006-12-07 06:46:38 -0500 (Thu, 07 Dec 2006) $ -| > $Revision: 777 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > Help Control functions -| > Module written by Matt Mecham -| > Date started: 2nd April 2002 -| -| > Module Version Number: 1.0.0 -| > DBA Checked: Tue 25th May 2004 -+-------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - - -class ad_skin_sets -{ - var $ipsclass; - var $html; - var $master_set = 1; - - /** - * Section title name - * - * @var string - */ - var $perm_main = "lookandfeel"; - - /** - * Section title name - * - * @var string - */ - var $perm_child = "sets"; - - function auto_run() - { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Список стилей' ); - - //----------------------------------------- - // LOAD HTML - //----------------------------------------- - - $this->html = $this->ipsclass->acp_load_template('cp_skin_lookandfeel'); - - //----------------------------------------- - // What to do? - //----------------------------------------- - - $this->ipsclass->input['code'] = isset($this->ipsclass->input['code']) ? $this->ipsclass->input['code'] : NULL; - - switch($this->ipsclass->input['code']) - { - case 'addset': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); - $this->add_set(); - break; - - case 'edit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->do_form('edit'); - break; - - case 'doedit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->save_skin('edit'); - break; - - case 'remove': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); - $this->remove_splash(); - break; - - case 'doremove': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); - $this->do_remove(); - break; - - //----------------------------------------- - - case 'revertallform': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->revert_all_form(); - break; - - case 'dorevert': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->do_revert_all(); - break; - - case 'toggledefault': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->set_toggle_default(); - break; - - case 'togglevisible': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->set_toggle_visible(); - break; - - //----------------------------------------- - // Export master - //----------------------------------------- - - case 'exportmaster': - $this->export_master(); - break; - - case 'exportmacro': - $this->export_macro(); - break; - - //----------------------------------------- - // Rebuild all - //----------------------------------------- - - case 'rebuildalltemplates': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' ); - $this->rebuild_all_templates(); - break; - - //----------------------------------------- - // Export bits - //----------------------------------------- - - case 'exportbitschoose': - $this->export_bits_choose(); - break; - - case 'exportbitscomplete': - $this->export_bits_complete(); - break; - - case 'master_xml_export': - $this->master_xml_export(); - break; - - case 'MOD_mod_xml': - $this->generate_mod_xml(); - break; - - default: - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->list_sets(); - break; - } - } - - /*-------------------------------------------------------------------------*/ - // Export Master XML - /*-------------------------------------------------------------------------*/ - - function master_xml_export() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $entry = array(); - - //----------------------------------------- - // Get XML class - //----------------------------------------- - - require_once( KERNEL_PATH.'class_xml.php' ); - - $xml = new class_xml(); - - $xml->doc_type = $this->ipsclass->vars['gb_char_set']; - - $xml->xml_set_root( 'export', array( 'exported' => time() ) ); - - //----------------------------------------- - // Set group - //----------------------------------------- - - $xml->xml_add_group( 'group' ); - - //----------------------------------------- - // Get templates... - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'skin_sets', - 'where' => "set_skin_set_id IN (1,2)" ) ); - - $this->ipsclass->DB->simple_exec(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - //----------------------------------------- - // Set up - //----------------------------------------- - - if ( $r['set_skin_set_id'] == 2 ) - { - $r['set_css'] = ''; - $r['set_cache_macro'] = ''; - $r['set_wrapper'] = ''; - $r['set_css_updated'] = 0; - $r['set_cache_css'] = ''; - $r['set_cache_wrapper'] = ''; - } - - //----------------------------------------- - // Fix up CSS - //----------------------------------------- - - if ( $r['set_css'] ) - { - $r['set_css'] = preg_replace( "#url\((style_images/)?\d+?/#i", "url(style_images/<#IMG_DIR#>/", $r['set_css'] ); - } - - $content = array(); - - //----------------------------------------- - // Sort the fields... - //----------------------------------------- - - foreach( $r as $k => $v ) - { - $content[] = $xml->xml_build_simple_tag( $k, $v ); - } - - $entry[] = $xml->xml_build_entry( 'row', $content ); - } - - $xml->xml_add_entry_to_group( 'group', $entry ); - - $xml->xml_format_document(); - - $doc = $xml->xml_document; - - //----------------------------------------- - // Print to browser - //----------------------------------------- - - $this->ipsclass->admin->show_download( $doc, 'skinsets.xml', '', 0 ); - } - - /*-------------------------------------------------------------------------*/ - // EXPORT SOME TEMPLATE BITS TO SQL FILE (COMPLETE) - /*-------------------------------------------------------------------------*/ - - function export_bits_complete() - { - $ids = array(); - - //----------------------------------------- - // get ids... - //----------------------------------------- - - foreach ($this->ipsclass->input as $key => $value) - { - if ( preg_match( "/^id_(\d+)$/", $key, $match ) ) - { - if ($this->ipsclass->input[$match[0]]) - { - $ids[] = $match[1]; - } - } - } - - $ids = $this->ipsclass->clean_int_array( $ids ); - - //----------------------------------------- - // Got any? - //----------------------------------------- - - if ( ! count( $ids ) ) - { - $this->ipsclass->main_msg = "Вы должны выбрать какую-нибудь часть шаблона для экспорта!"; - $this->export_bits_choose(); - } - - $final_sql = ""; - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_templates', 'where' => 'suid IN ('.implode(",",$ids).')' ) ); - $this->ipsclass->DB->simple_exec(); - - while( $r = $this->ipsclass->DB->fetch_row() ) - { - $content = preg_replace( "/'/", "\\'", $this->ipsclass->txt_safeslashes( $r['section_content'] ) ); - $datavar = preg_replace( "/'/", "\\'", $this->ipsclass->txt_safeslashes( $r['func_data'] ) ); - - $content = str_replace( "\n", '\n', $content ); - - $final_sql .= "REPLACE INTO ibf_skin_templates SET set_id=1, group_name='{$r['group_name']}', func_name='{$r['func_name']}', section_content='$content', func_data='$datavar';\n"; - } - - //@header("Content-type: text/plain"); - //print $final_sql; - //exit(); - - //----------------------------------------- - // Print to browser - //----------------------------------------- - - $this->ipsclass->admin->show_download( $final_sql, 'templates_update.sql', '', 0 ); - - } - - /*-------------------------------------------------------------------------*/ - // EXPORT SOME TEMPLATE BITS TO SQL FILE - /*-------------------------------------------------------------------------*/ - - function export_bits_choose() - { - $all_templates = array(); - - $this->ipsclass->DB->simple_construct( array( 'select' => 'group_name,set_id,suid,func_name', 'from' => 'skin_templates', 'where' => 'set_id=1' ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $all_templates[ $r['group_name'] ][] = $r; - } - - ksort( $all_templates ); - - //----------------------------------------- - // Start output - //----------------------------------------- - - $this->ipsclass->admin->page_title = "Экспорт выбранных частей шаблона"; - $this->ipsclass->admin->page_detail = "Выберите, какие части вы хотели бы экспортировать."; - - //----------------------------------------- - // start form - //----------------------------------------- - - $per_row = 3; - $td_width = 100 / $per_row; - $count = 0; - $output = "\n"; - - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'exportbitscomplete' ), - 2 => array( 'act' , 'sets' ), - 4 => array( 'section', $this->ipsclass->section_code ), - ) ); - - $this->ipsclass->html .= "
    -
    Template Bits
    - "; - - foreach( $all_templates as $group_name => $data ) - { - //----------------------------------------- - // Start secondary table - //----------------------------------------- - - $count = 0; - - $output .= "
    -
    $group_name
    - - "; - - foreach( $all_templates[ $group_name ] as $r ) - { - $count++; - - $class = $count == 2 ? 'tablerow2' : 'tablerow1'; - - $output .= ""; - - if ($count == $per_row ) - { - $output .= "\n\n"; - $count = 0; - } - } - - if ( $count > 0 and $count != $per_row ) - { - for ($i = $count ; $i < $per_row ; ++$i) - { - $output .= "\n"; - } - - $output .= ""; - } - - $output .= "\n
    - {$r['func_name']} -
     
    "; - } - - $this->ipsclass->html .= $output; - - $this->ipsclass->html .= "
    "; - - $this->ipsclass->admin->output(); - } - - /*-------------------------------------------------------------------------*/ - // REBUILD TEMPLATES - /*-------------------------------------------------------------------------*/ - - function rebuild_all_templates() - { - if ( $this->ipsclass->input['removewarning'] == 1 ) - { - $this->ipsclass->update_cache( array( 'value' => '', 'name' => 'skinpanic', 'donow' => 1, 'deletefirst' => 1, 'array' => 0 ) ); - } - - $justdone = intval($this->ipsclass->input['justdone']); - $justdone = $justdone ? $justdone : 1; - - //----------------------------------------- - // Get skins - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'skin_sets', - 'where' => 'set_skin_set_id > '.$justdone, - 'order' => 'set_skin_set_id', - 'limit' => array( 0, 1 ) - ) ); - - $this->ipsclass->DB->simple_exec(); - - //----------------------------------------- - // Got a biggun? - //----------------------------------------- - - $r = $this->ipsclass->DB->fetch_row(); - - if ( $r['set_skin_set_id'] ) - { - $this->ipsclass->cache_func->_rebuild_all_caches( array($r['set_skin_set_id']) ); - - $this->ipsclass->admin->redirect( "{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=rebuildalltemplates&justdone={$r['set_skin_set_id']}", "Обновление кеша для стиля «{$r['set_name']}».
    Переход к следующему стилю..." ); - } - else - { - $this->ipsclass->main_msg = "Все шаблоны кешированы!"; - $this->list_sets(); - } - } - - //----------------------------------------- - // Export master skin set. - //----------------------------------------- - - function export_master() - { - //----------------------------------------- - // Get xml mah-do-dah - //----------------------------------------- - - require_once( KERNEL_PATH.'class_xml.php' ); - - $xml = new class_xml(); - - //----------------------------------------- - // Start... - //----------------------------------------- - - $xml->xml_set_root( 'templateexport', array( 'exported' => time(), 'versionid' => '20000', 'type' => 'master' ) ); - - //----------------------------------------- - // Get emo group - //----------------------------------------- - - $xml->xml_add_group( 'templategroup' ); - - $this->ipsclass->DB->simple_construct( array( 'select' => 'group_name, section_content, func_name, func_data', 'from' => 'skin_templates', 'where' => 'set_id=1' ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $content = array(); - - foreach ( $r as $k => $v ) - { - $content[] = $xml->xml_build_simple_tag( $k, $v ); - } - - $entry[] = $xml->xml_build_entry( 'template', $content ); - } - - $xml->xml_add_entry_to_group( 'templategroup', $entry ); - - $xml->xml_format_document(); - - //----------------------------------------- - // Send to browser. - //----------------------------------------- - - $this->ipsclass->admin->show_download( $xml->xml_document, 'ipb_templates.xml', '', 0 ); - } - - //----------------------------------------- - // Export master macros - //----------------------------------------- - - function export_macro() - { - //----------------------------------------- - // Get xml mah-do-dah - //----------------------------------------- - - require_once( KERNEL_PATH.'class_xml.php' ); - - $xml = new class_xml(); - - //----------------------------------------- - // Start... - //----------------------------------------- - - $xml->xml_set_root( 'macroexport', array( 'exported' => time() ) ); - - //----------------------------------------- - // Get emo group - //----------------------------------------- - - $xml->xml_add_group( 'macrogroup' ); - - $this->ipsclass->DB->simple_construct( array( 'select' => 'macro_value,macro_replace', 'from' => 'skin_macro', 'where' => 'macro_set=1' ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $content = array(); - - foreach ( $r as $k => $v ) - { - $content[] = $xml->xml_build_simple_tag( $k, $v ); - } - - $entry[$r['macro_value']] = $xml->xml_build_entry( 'macro', $content ); - } - - $xml->xml_add_entry_to_group( 'macrogroup', $entry ); - - $xml->xml_format_document(); - - //----------------------------------------- - // Send to browser. - //----------------------------------------- - - $this->ipsclass->admin->show_download( $xml->xml_document, 'macro.xml', '', 0 ); - - } - - //----------------------------------------- - // ADD SET - //----------------------------------------- - - function add_set() - { - //----------------------------------------- - // Check for input - //----------------------------------------- - - $new = array(); - $message = array(); - - if ($this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Вы должны выбрать ID существующего стиля, вернитесь и попытайтесь заново."); - } - - if ( $this->ipsclass->input['id'] == 1 ) - { - $this->ipsclass->main_msg = "Вы не можете изменять стиль"; - $this->list_sets(); - } - - if ( ! $this->ipsclass->input['set_name'] ) - { - $this->ipsclass->main_msg = "Вы должны ввести имя стилю."; - $this->list_sets(); - } - - if ( $this->ipsclass->input['id'] == -1 ) - { - //----------------------------------------- - // No parent... - //----------------------------------------- - - $new['set_skin_set_parent'] = -1; - $get_from_db = 1; - } - else - { - $new['set_skin_set_parent'] = $this->ipsclass->input['id']; - $get_from_db = intval($this->ipsclass->input['id']); - } - - $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.$get_from_db ) ); - - $new['set_name'] = $this->ipsclass->input['set_name']; - $new['set_image_dir'] = $this_set['set_image_dir']; - $new['set_hidden'] = intval( $this->ipsclass->input['hidden'] ); - $new['set_default'] = 0; - $new['set_css_method'] = $this_set['set_css_method']; - $new['set_cache_css'] = $this_set['set_cache_css']; - $new['set_cache_macro'] = $this_set['set_cache_macro']; - $new['set_cache_wrapper'] = $this_set['set_cache_wrapper']; - - $this->ipsclass->DB->do_insert( 'skin_sets', $new ); - - $newid = $this->ipsclass->DB->get_insert_id(); - - //----------------------------------------- - // Rebuild caches - //----------------------------------------- - - $this->ipsclass->cache_func->_rebuild_all_caches( array( $newid ) ); - - $this->ipsclass->main_msg = 'Стиль добавлен'; - - $this->ipsclass->main_msg .= "
    ".implode("
    ", array_merge( $message, $this->ipsclass->cache_func->messages) ); - $this->list_sets(); - } - - //----------------------------------------- - // Revert customizations > DO - //----------------------------------------- - - function do_revert_all() - { - //----------------------------------------- - // Check for input - //----------------------------------------- - - $message = array(); - - if ($this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Вы должны выбрать ID существующего стиля, вернитесь и попытайтесь заново. "); - } - - if ( $this->ipsclass->input['id'] == 1 ) - { - $this->ipsclass->main_msg = "Вы не можете изменять стиль"; - $this->list_sets(); - } - - $id = intval($this->ipsclass->input['id']); - - //----------------------------------------- - // Delete Templates? - //----------------------------------------- - - if ( isset($this->ipsclass->input['html']) AND $this->ipsclass->input['html'] ) - { - $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_templates', 'where' => 'set_id='.$id ) ); - $message[] = 'Все части HTML шаблоны были удалены...'; - } - - //----------------------------------------- - // Delete Macros? - //----------------------------------------- - - if ( isset($this->ipsclass->input['macro']) AND $this->ipsclass->input['macro'] ) - { - $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_macro', 'where' => 'macro_set='.$id ) ); - $message[] = 'Все макросы были удалены...'; - } - - //----------------------------------------- - // Delete Wrapper - //----------------------------------------- - - if ( isset($this->ipsclass->input['wrapper']) AND $this->ipsclass->input['wrapper'] ) - { - $this->ipsclass->DB->simple_exec_query( array( 'update' => 'skin_sets', 'set' => "set_wrapper=''", 'where' => 'set_skin_set_id='.$id ) ); - $message[] = 'Шаблон удален...'; - } - - //----------------------------------------- - // Delete Wrapper - //----------------------------------------- - - if ( isset($this->ipsclass->input['css']) AND $this->ipsclass->input['css'] ) - { - $this->ipsclass->DB->simple_exec_query( array( 'update' => 'skin_sets', 'set' => "set_css=''", 'where' => 'set_skin_set_id='.$id ) ); - $message[] = 'CSS удален...'; - } - - //----------------------------------------- - // Rebuild caches - //----------------------------------------- - - $this->ipsclass->cache_func->_rebuild_all_caches( array( $id ) ); - - $this->ipsclass->main_msg = 'Настройки стиля удалены'; - - $this->ipsclass->main_msg .= "
    ".implode("
    ", array_merge( $message, $this->ipsclass->cache_func->messages) ); - $this->list_sets(); - } - - //----------------------------------------- - // Revert customizations form - //----------------------------------------- - - function revert_all_form() - { - $templates = 0; - $macros = 0; - $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); - - //----------------------------------------- - // Check for input - //----------------------------------------- - - if ($this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Вы должны выбрать какую-нибудь часть шаблона для экспорта"); - } - - if ( $this->ipsclass->input['id'] == 1 ) - { - $this->ipsclass->main_msg = "Вы не можете изменять стиль"; - $this->list_sets(); - } - - $this->ipsclass->admin->page_detail = "Пожалуйста, имейте ввиду, что эти изменения не могут быть приняты!"; - $this->ipsclass->admin->page_title = "Возвращение настроек стиля"; - - //----------------------------------------- - // Get macro / template info - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => 'count(*) as aerosmith', 'from' => 'skin_templates', 'where' => "set_id={$this->ipsclass->input['id']}" ) ); - $this->ipsclass->DB->simple_exec(); - - $r = $this->ipsclass->DB->fetch_row(); - $templates = intval($r['aerosmith']); - - $this->ipsclass->DB->simple_construct( array( 'select' => 'count(*) as aerosmith', 'from' => 'skin_macro', 'where' => "macro_set={$this->ipsclass->input['id']}" ) ); - $this->ipsclass->DB->simple_exec(); - - $r = $this->ipsclass->DB->fetch_row(); - $macros = intval($r['aerosmith']); - - //----------------------------------------- - // Get the thingies - //----------------------------------------- - - $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => "set_skin_set_id=".$this->ipsclass->input['id'] ) ); - - //----------------------------------------- - // Start the form - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code', 'dorevert' ), - 2 => array( 'act' , 'sets' ), - 3 => array( 'id' , $this->ipsclass->input['id'] ), - 4 => array( 'section', $this->ipsclass->section_code ), - ), "theAdminForm" ); - - $none = "Нет настроек для удаления"; - - $html = $templates ? $this->ipsclass->adskin->form_yes_no('html' , 0) : $none; - $macro = $macros ? $this->ipsclass->adskin->form_yes_no('macro' , 0) : $none; - $wrapper = $this_set['set_wrapper'] ? $this->ipsclass->adskin->form_yes_no('wrapper', 0) : $none; - $css = $this_set['set_css'] ? $this->ipsclass->adskin->form_yes_no('css' , 0) : $none; - - //----------------------------------------- - // Start output - //----------------------------------------- - - $this->ipsclass->html .= "
    -
    Возвращение настроек стиля {$this_set['set_name']}
    -
    -
    - Настройки HTML шаблон - - - - - -
    Вернуть все настройки HTML шаблона?
    Вы сделали {$templates} изменений в шаблонах
    {$html}
    -
    -
    -
    - Настройки макросов - - - - - -
    Вернуть все настройки макросов?
    You have {$macros} macro customizations
    {$macro}
    -
    -
    -
    - Настройка шапки и низа шаблона - - - - - -
    Возвращение шапки и низа шаблона?{$wrapper}
    -
    -
    -
    - Настройка таблицы стилей (CSS) - - - - - -
    Обратить CSS к стандартным?{$css}
    -
    -
    Имейте ввиду, что все настройки будут потеряны, если вы поставите 'да'
    Это не может быть завершено
    -
    -
    "; - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form_standalone("Начать"); - - //----------------------------------------- - // Output - //----------------------------------------- - - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code ,'Управление стилями' ); - $this->ipsclass->admin->nav[] = array( '' ,'Возвращение всех настроек для '.$this_set['set_name'] ); - - $this->ipsclass->admin->output(); - } - - - //----------------------------------------- - // REMOVE SKIN SET FORM - //----------------------------------------- - - function remove_splash() - { - $this->ipsclass->admin->page_detail = "Пожалуйста, ознакомьтесь с этой страницей внимательно."; - $this->ipsclass->admin->page_title = "Удаление стиля"; - - //----------------------------------------- - // Get this skin set... - //----------------------------------------- - - $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.intval($this->ipsclass->input['id']) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code', 'doremove' ), - 2 => array( 'act' , 'sets' ), - 3 => array( 'id' , $this->ipsclass->input['id'] ), - 4 => array( 'section', $this->ipsclass->section_code ), - ) ); - - $this->ipsclass->adskin->td_header[] = array( " " , "100%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Удаление {$this_set['set_name']}" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "
    - ВНИМАНИЕ: Это действие нельзя будет вернуть или отменить

    - Продолжение этого действия навсегда удалит все настройки этого стиля, включающие HTML шаблоны, CSS и макросы . -

    - После удаления этого стиля другой автоматически станет основным для форума. - ", - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Окончательное удаление {$this_set['set_name']}"); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - $this->ipsclass->admin->output(); - } - - //----------------------------------------- - // TOGGLE DEFAULT SKIN - //----------------------------------------- - - function set_toggle_default() - { - $affected_ids = array(); - $children = array(); - $message = array(); - - //----------------------------------------- - // Check for input - //----------------------------------------- - - if ($this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Вы должны выбрать какую-нибудь часть шаблона для экспорта"); - } - - if ( $this->ipsclass->input['id'] == 1 ) - { - $this->ipsclass->main_msg = 'Вы не можете изменять стиль'; - $this->list_sets(); - } - - //----------------------------------------- - // Set as default - //----------------------------------------- - - $this->ipsclass->DB->do_update( 'skin_sets', array( 'set_default' => 0 ), "" ); - $this->ipsclass->DB->do_update( 'skin_sets', array( 'set_default' => 1, 'set_hidden' => 0 ), "set_skin_set_id =".intval($this->ipsclass->input['id']) ); - - //----------------------------------------- - // Rebuild caches and relationships? - //----------------------------------------- - - $this->ipsclass->cache_func->_rebuild_all_caches( array( $this->ipsclass->input['id'] ) ); - - $this->ipsclass->main_msg = 'Стиль установлен, как по умолчанию'; - $this->list_sets(); - } - - //----------------------------------------- - // TOGGLE VISIBILITY - //----------------------------------------- - - function set_toggle_visible() - { - $affected_ids = array(); - $children = array(); - $message = array(); - - //----------------------------------------- - // Check for input - //----------------------------------------- - - if ($this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Вы должны выбрать какую-нибудь часть шаблона для экспорта"); - } - - if ( $this->ipsclass->input['id'] == 1 ) - { - $this->ipsclass->main_msg = 'Вы не можете изменять стиль'; - $this->list_sets(); - } - - //----------------------------------------- - // Get current skin - //----------------------------------------- - - $skin = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.intval($this->ipsclass->input['id']) ) ); - - $hidden = 1; - - if ( $skin['set_hidden'] ) - { - $hidden = 0; - } - - //----------------------------------------- - // We're not going to make all skins invisible? - //----------------------------------------- - - if ( $hidden == 1 ) - { - $count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as count', - 'from' => 'skin_sets', - 'where' => 'set_hidden=0 AND set_skin_set_id NOT IN ( 1,'. intval($this->ipsclass->input['id']).')' ) ); - - if ( ! intval($count['count']) ) - { - $this->ipsclass->main_msg = 'Вы не можете сделать единственный видимый стиль невидимым. '; - $this->list_sets(); - return; - } - } - - $this->ipsclass->DB->do_update( 'skin_sets', array( 'set_hidden' => $hidden ), 'set_skin_set_id='.intval($this->ipsclass->input['id']) ); - - //----------------------------------------- - // Rebuild caches and relationships? - //----------------------------------------- - - $this->ipsclass->cache_func->_rebuild_all_caches( array( $this->ipsclass->input['id'] ) ); - - $this->ipsclass->main_msg = 'Видимость стиля изменена'; - $this->list_sets(); - } - - //----------------------------------------- - // DO REMOVE SKIN SET - //----------------------------------------- - - function do_remove() - { - $affected_ids = array(); - $children = array(); - $message = array(); - - //----------------------------------------- - // Check for input - //----------------------------------------- - - if ($this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Вы должны выбрать какую-нибудь часть шаблона для экспорта"); - } - - if ( $this->ipsclass->input['id'] == 1 ) - { - $this->ipsclass->main_msg = 'Вы не можете изменять стиль'; - $this->list_sets(); - } - - //----------------------------------------- - // Get this skin set... - //----------------------------------------- - - $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.intval($this->ipsclass->input['id']) ) ); - - //----------------------------------------- - // Can we remove? - //----------------------------------------- - - if ( $this_set['set_default'] == 1 ) - { - $this->ipsclass->main_msg = 'IPB не может удалить этот стиль, так как он установлен, как по умолчанию, вам нужно поставить другой стиль, как основной и попробовать удалить этот заново.'; - $this->list_sets(); - } - - $this_count = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as jazzyjeff', 'from' => 'skin_sets' ) ); - - if ( $this_count['jazzyjeff'] == 2 ) - { - $this->ipsclass->main_msg = 'IPB не может удалить этот стиль, так как он единственный стиль, который у вас есть.'; - $this->list_sets(); - } - - //----------------------------------------- - // Get any children - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => 'set_skin_set_id, set_skin_set_parent', 'from' => 'skin_sets', 'where' => "set_skin_set_parent=".intval($this->ipsclass->input['id']) ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $affected_ids[] = $r['set_skin_set_id']; - $children[] = $r['set_skin_set_id']; - } - - //----------------------------------------- - // Update children to root - //----------------------------------------- - - if ( count($children) ) - { - $this->ipsclass->DB->do_update( 'skin_sets', array( 'set_skin_set_parent' => '-1' ), 'set_skin_set_id IN ('.implode(',',$children).')' ); - } - - //----------------------------------------- - // Members using this skin? - //----------------------------------------- - - $this->ipsclass->DB->do_update( 'members', array( 'skin' => 0 ), 'skin='.intval($this->ipsclass->input['id']) ); - - //----------------------------------------- - // Delete the skin... - //----------------------------------------- - - $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_sets', 'where' => 'set_skin_set_id='.intval($this->ipsclass->input['id']) ) ); - - //----------------------------------------- - // Remove macros... - //----------------------------------------- - - $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_macro', 'where' => 'macro_set='.intval($this->ipsclass->input['id']) ) ); - - //----------------------------------------- - // Remove templates... - //----------------------------------------- - - $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_templates', 'where' => 'set_id='.intval($this->ipsclass->input['id']) ) ); - - //----------------------------------------- - // Remove template cache... - //----------------------------------------- - - $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_templates_cache', 'where' => 'template_set_id='.intval($this->ipsclass->input['id']) ) ); - - //----------------------------------------- - // Remove CSS file... - //----------------------------------------- - - @unlink( CACHE_PATH.'style_images/css_'.$this->ipsclass->input['id'].'.css' ); - $message[] = 'Очистка: удаление кеша CSS...'; - - //----------------------------------------- - // Remove CACHE folder - //----------------------------------------- - - $this->ipsclass->admin->rm_dir( CACHE_PATH.'cache/skin_cache/cacheid_'.$this->ipsclass->input['id'] ); - $message[] = 'Очистка: удаление кеша HTML шаблонов...'; - - //----------------------------------------- - // Rebuild caches and relationships? - //----------------------------------------- - - if ( count($affected_ids) ) - { - $this->ipsclass->cache_func->_rebuild_all_caches($affected_ids); - } - - $this->ipsclass->cache_func->_rebuild_skin_id_cache(); - - $this->ipsclass->main_msg = 'Стиль удален'; - - $this->ipsclass->main_msg .= "
    ".implode("
    ", array_merge( $message, $this->ipsclass->cache_func->messages) ); - $this->list_sets(); - - } - - - - //----------------------------------------- - // ADD / EDIT SKIN SETS - //----------------------------------------- - - function save_skin( $type='add' ) - { - //----------------------------------------- - // Fix up incoming - //----------------------------------------- - - //img / prt - - if ($type == 'edit') - { - if ($this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Вы должны выбрать какую-нибудь часть шаблона для экспорта"); - } - } - - if ($this->ipsclass->input['set_name'] == "") - { - $this->ipsclass->admin->error("Вы должны ввести имя для этого пакета"); - } - - $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id = '.intval($this->ipsclass->input['id']) ) ); - - //----------------------------------------- - // Init var - //----------------------------------------- - - $barney = array( 'set_name' => $this->ipsclass->txt_stripslashes($_POST['set_name']), - 'set_css_method' => $this->ipsclass->input['set_css_method'], - 'set_hidden' => $this->ipsclass->input['set_hidden'], - 'set_image_dir' => $this->ipsclass->input['set_image_dir'], - 'set_author_email' => $this->ipsclass->input['set_author_email'], - 'set_author_url' => $this->ipsclass->input['set_author_url'], - 'set_author_name' => $this->ipsclass->input['set_author_name'], - 'set_skin_set_parent' => $this->ipsclass->input['set_skin_set_parent'], - 'set_emoticon_folder' => $this->ipsclass->input['set_emoticon_folder'], - ); - - if ($type == 'add') - { - - - } - else - { - //----------------------------------------- - // Did we set it to default? - //----------------------------------------- - - if ( $this->ipsclass->input['set_default'] ) - { - $this->ipsclass->DB->do_update( 'skin_sets', array( 'set_default' => 0 ), 'set_skin_set_id <> '.intval($this->ipsclass->input['id']) ); - $barney['set_default'] = 1; - } - - //----------------------------------------- - // Did the parent change? - //----------------------------------------- - - $affected_ids = array(); - - if ( $this->ipsclass->input['prt'] != $this->ipsclass->input['set_skin_set_parent'] ) - { - $affected_ids[ $this_set['set_skin_set_id'] ] = $this_set['set_skin_set_id']; - - //----------------------------------------- - // Any kids? - //----------------------------------------- - - $children = array(); - $child_id = array(); - - $this->ipsclass->DB->simple_construct( array( 'select' => 'set_skin_set_id', 'from' => 'skin_sets', 'where' => 'set_skin_set_parent='.$this_set['set_skin_set_id'] ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $children[] = $r; - $child_id[] = $r['set_skin_set_id']; - $affected_ids[ $r['set_skin_set_id'] ] = $r['set_skin_set_id']; - } - - if ( count($children) ) - { - //----------------------------------------- - // Move children to direct root children - //----------------------------------------- - - $this->ipsclass->DB->simple_exec_query( array( 'update' => 'skin_sets', 'set' => 'set_skin_set_parent = -1', 'where' => 'set_skin_set_id IN ('.implode(",",$child_id).')' ) ); - } - } - - if ( $this->ipsclass->input['css'] != $this->ipsclass->input['set_css_method'] ) - { - if ( $this->ipsclass->input['set_css_method'] ) - { - //----------------------------------------- - // Caching switched on... - //----------------------------------------- - - $affected_ids[ $this_set['set_skin_set_id'] ] = $this_set['set_skin_set_id']; - } - } - - //----------------------------------------- - // Img dir changed? recache css - //----------------------------------------- - - if ( $this->ipsclass->input['img'] != $this->ipsclass->input['set_image_dir'] ) - { - $affected_ids[ $this_set['set_skin_set_id'] ] = $this_set['set_skin_set_id']; - } - - $this->ipsclass->DB->do_update( 'skin_sets', $barney, "set_skin_set_id=".intval($this->ipsclass->input['id']) ); - - //----------------------------------------- - // Rebuild caches and relationships? - //----------------------------------------- - - $this->ipsclass->cache_func->_rebuild_all_caches($affected_ids); - - $this->ipsclass->main_msg = 'Настройки стиля обновлены'; - - $this->ipsclass->main_msg .= "
    ".implode("
    ", $this->ipsclass->cache_func->messages); - - //$this->ipsclass->admin->redirect("{$this->ipsclass->form_code}", "Настройки стиля обновлены" ); - $this->list_sets(); - } - } - - //----------------------------------------- - // ADD / EDIT SETS - //----------------------------------------- - - function do_form( $type='add' ) - { - //----------------------------------------- - // Check for input - //----------------------------------------- - - $sets = array(); - $parents = array( 0=> array( '-1', 'Нет родителя' ) ); - $row = array(); - - if ($this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Вы должны выбрать какую-нибудь часть шаблона для экспорта"); - } - - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_sets' ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $sets[ $r['set_skin_set_id'] ] = $r; - - if ( ($r['set_skin_set_parent'] < 0 and $r['set_skin_set_id'] != 1 ) and ( $this->ipsclass->input['id'] != $r['set_skin_set_id'] ) ) - { - $parents[] = array( $r['set_skin_set_id'], $r['set_name'] ); - } - - if ( $this->ipsclass->input['id'] == $r['set_skin_set_id'] ) - { - $row = $r; - } - } - - - //----------------------------------------- - - if ($type == 'add') - { - $code = 'doadd'; - $button = 'Создать'; - $row['set_name'] = $row['set_name']; - $row['set_default'] = 0; - } - else - { - $code = 'doedit'; - $button = 'Изменить'; - } - - //----------------------------------------- - // Image dir - //----------------------------------------- - - $dirs = array(); - - $dh = opendir( CACHE_PATH.'style_images' ); - - while ( false !== ( $file = readdir( $dh ) ) ) - { - if (($file != ".") && ($file != "..")) - { - if ( is_dir(CACHE_PATH.'style_images/'.$file) ) - { - $dirs[] = array( $file, $file ); - } - } - } - closedir( $dh ); - - //----------------------------------------- - // Emoticons dir - //----------------------------------------- - - $emodirs = array(); - - $dh = opendir( CACHE_PATH.'style_emoticons' ); - - while ( false !== ( $file = readdir( $dh ) ) ) - { - if (($file != ".") && ($file != "..")) - { - if ( is_dir(CACHE_PATH.'style_emoticons/'.$file) ) - { - $emodirs[] = array( $file, $file ); - } - } - } - closedir( $dh ); - - - if ( is_writeable( CACHE_PATH."style_images" ) ) - { - $cssextra = $this->ipsclass->adskin->form_yes_no('set_css_method', $row['set_css_method']); - } - else - { - $cssextra = "IPB не может произвести запись в директорию /style_images/."; - } - - - //----------------------------------------- - - $this->ipsclass->admin->page_detail = "Изменить настройки вы можете ниже."; - $this->ipsclass->admin->page_title = "Управление стилями"; - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code', $code ), - 2 => array( 'act' , 'sets' ), - 3 => array( 'id' , $this->ipsclass->input['id'] ), - 4 => array( 'img' , $row['set_image_dir'] ), - 5 => array( 'prt' , $row['set_skin_set_parent'] ), - 6 => array( 'css' , $row['set_css_method'] ), - 7 => array( 'section', $this->ipsclass->section_code ), - ), "theAdminForm" ); - - //----------------------------------------- - // Start output - //----------------------------------------- - - $this->ipsclass->html .= "
    -
    $button
    -
    -
    - Основной - - - - - - - - - "; - - if ( $row['set_default'] ) - { - $this->ipsclass->html .= " - - "; - } - else - { - $this->ipsclass->html .= " - - "; - } - - $this->ipsclass->html .= " - - - - -
    Название".$this->ipsclass->adskin->form_input('set_name', $row['set_name'])."
    Скрыть от пользователей?".$this->ipsclass->adskin->form_yes_no('set_hidden', $row['set_hidden'])."
    Сделать его стилем по умолчанию?Стиль уже используется по умолчанию.
    Сделать его стилем по умолчанию?".$this->ipsclass->adskin->form_checkbox('set_default', $row['set_default'])."
    Стиль имеет родителя?".$this->ipsclass->adskin->form_dropdown('set_skin_set_parent', $parents, $row['set_skin_set_parent'])."
    -
    -
    -
    - Hастройки CSS - - - - - -
    Кешировать CSS стили в файл?
    Это уменьшит размер HTML. -
    ".$cssextra."
    Внимание: Изменение значения этой опции перекеширует все кеши CSS стилей. Убедитесь, что все ваши кеши CSS синхронизированы с базой данных.
    -
    -
    -
    - Настройки изображений - - - - - - - - - -
    Директория с изображениями
    Директория изображений будет заменяться <#IMG_DIR#> в CSS и макросах.
    style_images/ ".$this->ipsclass->adskin->form_dropdown('set_image_dir', $dirs, $row['set_image_dir'])."
    Используемые смайлики
    Выберите, какие смайлики будут использоваться в этом стиле.
    style_emoticons/ ".$this->ipsclass->adskin->form_dropdown('set_emoticon_folder', $emodirs, $row['set_emoticon_folder'])."
    -
    - -
    -
    - Сведения об авторе - - - - - - - - - - - - - -
    Имя
    *Необязательно.
    ".$this->ipsclass->adskin->form_input('set_author_name', $row['set_author_name'])."
    E-mail адрес
    *Необязательно.
    ".$this->ipsclass->adskin->form_input('set_author_email', $row['set_author_email'])."
    Домашняя страница
    *Необязательно.
    ".$this->ipsclass->adskin->form_input('set_author_url', $row['set_author_url'])."
    -
    -
    -
    "; - - - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form_standalone($button); - - //----------------------------------------- - - $this->ipsclass->admin->output(); - - - } - - //----------------------------------------- - // SHOW ALL SKIN SETS - //----------------------------------------- - - function list_sets() - { - $form_array = array(); - $this_set = ""; - $forums = array(); - $forum_skins = array(); - $macro_array = array(); - $template_array = array(); - $content = ""; - - $this->ipsclass->admin->page_detail = "Для изменения стиля просто нажмите на кнопку справа от названия и выберите необходимый пункт в появившемся меню."; - $this->ipsclass->admin->page_title = "Список стилей"; - - //----------------------------------------- - // Get forum names - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, skin_id', 'from' => 'forums' ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $f = $this->ipsclass->DB->fetch_row() ) - { - $forums[ $f['id'] ] = $f['name']; - - if ( $f['skin_id'] != "") - { - $forum_skins[ $f['skin_id'] ][] = $f['name']; - } - } - - //----------------------------------------- - // Get macro / template info - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'stylesets_list_sets_templates', array() ); - $this->ipsclass->DB->cache_exec_query(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $template_array[ $r['set_id'] ] = 1; - } - - $this->ipsclass->DB->cache_add_query( 'stylesets_list_sets_macros', array() ); - $this->ipsclass->DB->cache_exec_query(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $macro_array[ $r['macro_set'] ] = 1; - } - - //----------------------------------------- - // GET SKINS - //----------------------------------------- - - $skin_sets = array(); - $last_id = 0; - $default_skin = ""; - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_sets', 'order' => 'set_skin_set_parent, set_skin_set_id ASC' ) ); - $this->ipsclass->DB->simple_exec(); - - $no_sets = 0; - $i_sets = 0; - - while ( $row = $this->ipsclass->DB->fetch_row() ) - { - $skins[ $row['set_skin_set_id'] ] = $row; - - if ( $row['set_skin_set_parent'] == -1 ) - { - $no_sets++; - } - } - - //----------------------------------------- - // Loop-de-loop - //----------------------------------------- - - foreach( $skins as $r ) - { - $i_sets++; - - $skin_sets[ $r['set_skin_set_id'] ] = $r; - - $skin_sets[ $r['set_skin_set_parent'] ]['_lastid'] = $r['set_skin_set_id']; - $skin_sets[ $r['set_skin_set_parent'] ]['_children'][] = $r['set_skin_set_id']; - - $extra = ""; - $forums = "Не используется в форумах"; - - //----------------------------------------- - // Used in forums? - //----------------------------------------- - - if ( isset($forum_skins[ $r['set_skin_set_id'] ]) AND is_array($forum_skins[ $r['set_skin_set_id'] ]) ) - { - if ( count($forum_skins[ $r['set_skin_set_id'] ]) > 0 ) - { - $extra = "Используется в форумах: ".implode( ",", $forum_skins[ $r['set_skin_set_id'] ] ); - - $forums = ""; - } - } - - $this->unaltered = "- "; - $this->altered = "+ "; - $this->inherited = "| "; - - //----------------------------------------- - // Default / Hidden? - //----------------------------------------- - - $default = "Не по умолчанию"; - $hidden = "visible"; - $folder_icon = 'skin_folder.gif'; - $css_extra = ""; - - //----------------------------------------- - // Child of master, middle skin - // or last skin? - //----------------------------------------- - - if ( $i_sets >= $no_sets ) - { - $line_image = " "; - } - else - { - $line_image = " "; - } - - //----------------------------------------- - // Hidden? - //----------------------------------------- - - if ($r['set_hidden'] == 1) - { - $hidden = "Invisible"; - $folder_icon = 'skin_folder_hidden.gif'; - $css_extra = 'color:#7F7FAA'; - } - - //----------------------------------------- - // Default? - //----------------------------------------- - - if ($r['set_default'] == 1) - { - $default = "Не по умолчанию"; - $default_skin = $r['set_name']; - } - - //----------------------------------------- - // IPB Master? - //----------------------------------------- - - if ( $r['set_skin_set_id'] == 1 ) - { - $folder_icon = 'skin_folder_master.gif'; - $line_image = ""; - $css_extra = "color:gray"; - $hidden = ""; - $default = ""; - $forums = ""; - } - else - { - //----------------------------------------- - // Not.. - //----------------------------------------- - - if ( $r['set_skin_set_parent'] >= 0 ) - { - //----------------------------------------- - // Child though... - //----------------------------------------- - - if ( $folder_icon != 'skin_folder_hidden.gif' ) - { - $folder_icon = 'skin_folder_children.gif'; - } - - $line_image = ""; - } - } - - //----------------------------------------- - // Skin opts - //----------------------------------------- - - if ( $r['set_skin_set_id'] == 1 AND ! IN_DEV ) - { - $menulist = "\"Это базовый стиль, он не может быть удален или изменен.
    " - ."Если вы хотите изменить стиль по умолчанию, нажмите" - ." на «» и выберите соответствующую опцию.\""; - } - else - { - $menulist = preg_replace( "#,$#", "", $this->html->skin_sets_overview_row_menulist( $r ) ); - } - - //----------------------------------------- - // Add skin row - //----------------------------------------- - $skin_sets[ $r['set_skin_set_id'] ]['_html'] = isset($skin_sets[ $r['set_skin_set_id'] ]['_html']) ? $skin_sets[ $r['set_skin_set_id'] ]['_html'] : ''; - - $skin_sets[ $r['set_skin_set_id'] ]['_html'] .= $this->html->skin_sets_overview_row( $r, $forums, $hidden, $default, $menulist, $i_sets, $no_sets, $folder_icon, $line_image, $css_extra ); - - $form_array[] = array( $r['set_skin_set_id'], $r['set_name'] ); - } - - //----------------------------------------- - // Show root forums - //----------------------------------------- - - foreach( $skin_sets as $id => $data ) - { - if ( isset($data['set_skin_set_parent']) AND $data['set_skin_set_parent'] == -1 ) - { - $wrapper_icon = $this->_get_status_of_parent( $data['set_wrapper'] ); - $css_icon = $this->_get_status_of_parent( $data['set_css'] ); - $templates_icon = $this->_get_status_of_parent( isset($template_array[ $data['set_skin_set_id'] ]) ? $template_array[ $data['set_skin_set_id'] ] : 0 ); - $macro_icon = $this->_get_status_of_parent( isset($macro_array[ $data['set_skin_set_id'] ]) ? $macro_array[ $data['set_skin_set_id'] ] : 0 ); - - //----------------------------------------- - // Fix n' stitch - //----------------------------------------- - - $data['_html'] = str_replace( '' , $wrapper_icon , $data['_html'] ); - $data['_html'] = str_replace( '', $templates_icon, $data['_html'] ); - $data['_html'] = str_replace( '' , $css_icon , $data['_html']); - $data['_html'] = str_replace( '' , $macro_icon , $data['_html'] ); - - $content .= $data['_html']."\n"; - } - } - - //----------------------------------------- - // Show any children - //----------------------------------------- - - foreach( $skin_sets as $id => $data ) - { - if ( isset($data['_children']) AND is_array( $data['_children'] ) and count( $data['_children'] ) > 0 ) - { - $html = ""; - - foreach( $data['_children'] as $cid ) - { - $image = ""; - - if ( $cid == $data['_lastid'] ) - { - //----------------------------------------- - // Last skin, show L - //----------------------------------------- - - $image = 'skin_line_l.gif'; - } - else - { - //----------------------------------------- - // First skin, show T - //----------------------------------------- - - $image = 'skin_line_t.gif'; - } - - $skin_sets[ $cid ]['_html'] = str_replace( "", " ", $skin_sets[ $cid ]['_html'] ); - - //----------------------------------------- - // (un)altered icons: - //----------------------------------------- - - $wrapper_icon = $this->_get_status_of_child( isset($skin_sets[ $cid ]['set_wrapper']) ? $skin_sets[ $cid ]['set_wrapper'] : '' , isset($skin_sets[ $id ]['set_wrapper']) ? $skin_sets[ $id ]['set_wrapper'] : '' ); - $css_icon = $this->_get_status_of_child( isset($skin_sets[ $cid ]['set_css']) ? $skin_sets[ $cid ]['set_css'] : '' , isset($skin_sets[ $id ]['set_css']) ? $skin_sets[ $id ]['set_css'] : '' ); - $templates_icon = $this->_get_status_of_child( isset($template_array[ $cid ]) ? $template_array[ $cid ] : '' , isset($template_array[ $id ]) ? $template_array[ $id ] : '' ); - $macro_icon = $this->_get_status_of_child( isset($macro_array[ $cid ]) ? $macro_array[ $cid ] : '' , isset($macro_array[ $id ]) ? $macro_array[ $id ] : '' ); - - //----------------------------------------- - // Fix n' stitch - //----------------------------------------- - - $skin_sets[ $cid ]['_html'] = str_replace( '' , $wrapper_icon , $skin_sets[ $cid ]['_html'] ); - $skin_sets[ $cid ]['_html'] = str_replace( '', $templates_icon, $skin_sets[ $cid ]['_html'] ); - $skin_sets[ $cid ]['_html'] = str_replace( '' , $css_icon , $skin_sets[ $cid ]['_html'] ); - $skin_sets[ $cid ]['_html'] = str_replace( '' , $macro_icon , $skin_sets[ $cid ]['_html'] ); - - $html .= $skin_sets[ $cid ]['_html']; - } - - $content = str_replace( "", $html, $content ); - } - } - - //----------------------------------------- - // Add in default skin name - //----------------------------------------- - - $this->ipsclass->html = $this->html->skin_sets_overview( $content ); - - $this->ipsclass->html = str_replace( '', $default_skin, $this->ipsclass->html ); - - if( IN_DEV ) - { - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( - 1 => array( 'section' , 'lookandfeel' ), - 2 => array( 'act' , 'sets' ), - 3 => array( 'code' , 'MOD_mod_xml' ), - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( 'Режим разработчика: экспорт файлов стиля' ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - 'WHERE group_name LIKE \'%' . $this->ipsclass->adskin->form_input( 'group_name' ) . '%\' AND set_id = ' . $this->ipsclass->adskin->form_input( 'set_id', 1, '', '', 2 ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form( 'Сгенерировать и скачать файл XML' ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - } - - $this->ipsclass->admin->output(); - } - - //----------------------------------------- - // Get status of a child - //----------------------------------------- - - function _get_status_of_child($this_item, $parent_item) - { - if ( $this_item ) - { - return $this->altered; - } - else if ( $parent_item ) - { - return $this->inherited; - } - else - { - return $this->unaltered; - } - } - - //----------------------------------------- - // Get status of a parent - //----------------------------------------- - - function _get_status_of_parent($this_item) - { - if ( ! $this_item ) - { - return $this->unaltered; - } - else - { - return $this->altered; - } - } - - function generate_mod_xml() - { - if( empty( $this->ipsclass->input['group_name'] ) ) - { - $this->list_sets(); - return; - } - - /** - * Set ID - */ - $this->ipsclass->input['set_id'] = ( $this->ipsclass->input['set_id'] ) ? (int)$this->ipsclass->input['set_id'] : 1; - - /** - * Require the XML class - */ - require_once( KERNEL_PATH . 'class_xml.php' ); - $xml = new class_xml(); - - /** - * Set the root tag - */ - $xml->xml_set_root( 'templateexport', array( 'exported' => time(), 'versionid' => '220', 'type' => 'master' ) ); - - /** - * Create base group - */ - $xml->xml_add_group( 'templategroup' ); - - //$content[] = $xml->xml_build_simple_tag( 'description', "Описание" ); - //$entry[] = $xml->xml_build_entry( 'product', $content, array( 'id' => '1.0' ) ); - //$xml->xml_add_entry_to_group( 'productgroup', $entry ); - //$xml->xml_format_document(); - - /** - * SQL - */ - $this->ipsclass->DB->simple_select( '*', 'skin_templates', "group_name LIKE '%{$this->ipsclass->input['group_name']}%' AND set_id = {$this->ipsclass->input['set_id']}" ); - $this->ipsclass->DB->exec_query(); - - if( $this->ipsclass->DB->get_num_rows() ) - { - while( $row = $this->ipsclass->DB->fetch_row() ) - { - unset( $content ); - - $content[] = $xml->xml_build_simple_tag( 'group_name', $row['group_name'] ); - $content[] = $xml->xml_build_simple_tag( 'section_content', $row['section_content'] ); - $content[] = $xml->xml_build_simple_tag( 'func_name', $row['func_name'] ); - $content[] = $xml->xml_build_simple_tag( 'func_data', $row['func_data'] ); - - $entry[] = $xml->xml_build_entry( 'template', $content ); - } - - $xml->xml_add_entry_to_group( 'templategroup', $entry ); - } - - /** - * Format - */ - $xml->xml_format_document(); - - /** - * Send to browser - */ - $this->ipsclass->admin->show_download( $xml->xml_document, 'mod_templates.xml', '', 0 ); - } - -} - - + $Date: 2008-03-28 18:08:02 -0400 (Fri, 28 Mar 2008) $ +| > $Revision: 1232 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > Help Control functions +| > Module written by Matt Mecham +| > Date started: 2nd April 2002 +| +| > Module Version Number: 1.0.0 +| > DBA Checked: Tue 25th May 2004 ++-------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class ad_skin_sets +{ + var $ipsclass; + var $html; + var $master_set = 1; + + /** + * Section title name + * + * @var string + */ + var $perm_main = "lookandfeel"; + + /** + * Section title name + * + * @var string + */ + var $perm_child = "sets"; + + function auto_run() + { + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Skin Manager Home' ); + + //----------------------------------------- + // LOAD HTML + //----------------------------------------- + + $this->html = $this->ipsclass->acp_load_template('cp_skin_lookandfeel'); + + //----------------------------------------- + // What to do? + //----------------------------------------- + + $this->ipsclass->input['code'] = isset($this->ipsclass->input['code']) ? $this->ipsclass->input['code'] : NULL; + + switch($this->ipsclass->input['code']) + { + case 'addset': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); + $this->add_set(); + break; + + case 'edit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->do_form('edit'); + break; + + case 'doedit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->save_skin('edit'); + break; + + case 'remove': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); + $this->remove_splash(); + break; + + case 'doremove': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); + $this->do_remove(); + break; + + //----------------------------------------- + + case 'revertallform': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->revert_all_form(); + break; + + case 'dorevert': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->do_revert_all(); + break; + + case 'toggledefault': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->set_toggle_default(); + break; + + case 'togglevisible': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->set_toggle_visible(); + break; + + //----------------------------------------- + // Export master + //----------------------------------------- + + case 'exportmaster': + $this->export_master(); + break; + + case 'exportmacro': + $this->export_macro(); + break; + + //----------------------------------------- + // Rebuild all + //----------------------------------------- + + case 'rebuildalltemplates': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' ); + $this->rebuild_all_templates(); + break; + + //----------------------------------------- + // Export bits + //----------------------------------------- + + case 'exportbitschoose': + $this->export_bits_choose(); + break; + + case 'exportbitscomplete': + $this->export_bits_complete(); + break; + + case 'master_xml_export': + $this->master_xml_export(); + break; + + case 'MOD_mod_xml': + $this->generate_mod_xml(); + break; + + default: + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->list_sets(); + break; + } + } + + /*-------------------------------------------------------------------------*/ + // Export Master XML + /*-------------------------------------------------------------------------*/ + + function master_xml_export() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $entry = array(); + + //----------------------------------------- + // Get XML class + //----------------------------------------- + + require_once( KERNEL_PATH.'class_xml.php' ); + + $xml = new class_xml(); + + $xml->doc_type = $this->ipsclass->vars['gb_char_set']; + + $xml->xml_set_root( 'export', array( 'exported' => time() ) ); + + //----------------------------------------- + // Set group + //----------------------------------------- + + $xml->xml_add_group( 'group' ); + + //----------------------------------------- + // Get templates... + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', + 'from' => 'skin_sets', + 'where' => "set_skin_set_id IN (1,2)" ) ); + + $this->ipsclass->DB->simple_exec(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + //----------------------------------------- + // Set up + //----------------------------------------- + + if ( $r['set_skin_set_id'] == 2 ) + { + $r['set_css'] = ''; + $r['set_cache_macro'] = ''; + $r['set_wrapper'] = ''; + $r['set_css_updated'] = 0; + $r['set_cache_css'] = ''; + $r['set_cache_wrapper'] = ''; + } + + //----------------------------------------- + // Fix up CSS + //----------------------------------------- + + if ( $r['set_css'] ) + { + $r['set_css'] = preg_replace( "#url\((style_images/)?\d+?/#i", "url(style_images/<#IMG_DIR#>/", $r['set_css'] ); + } + + $content = array(); + + //----------------------------------------- + // Sort the fields... + //----------------------------------------- + + foreach( $r as $k => $v ) + { + $content[] = $xml->xml_build_simple_tag( $k, $v ); + } + + $entry[] = $xml->xml_build_entry( 'row', $content ); + } + + $xml->xml_add_entry_to_group( 'group', $entry ); + + $xml->xml_format_document(); + + $doc = $xml->xml_document; + + //----------------------------------------- + // Print to browser + //----------------------------------------- + + $this->ipsclass->admin->show_download( $doc, 'skinsets.xml', '', 0 ); + } + + /*-------------------------------------------------------------------------*/ + // EXPORT SOME TEMPLATE BITS TO SQL FILE (COMPLETE) + /*-------------------------------------------------------------------------*/ + + function export_bits_complete() + { + $ids = array(); + + //----------------------------------------- + // get ids... + //----------------------------------------- + + foreach ($this->ipsclass->input as $key => $value) + { + if ( preg_match( "/^id_(\d+)$/", $key, $match ) ) + { + if ($this->ipsclass->input[$match[0]]) + { + $ids[] = $match[1]; + } + } + } + + $ids = $this->ipsclass->clean_int_array( $ids ); + + //----------------------------------------- + // Got any? + //----------------------------------------- + + if ( ! count( $ids ) ) + { + $this->ipsclass->main_msg = "You must select SOME template bits to export!"; + $this->export_bits_choose(); + } + + $final_sql = ""; + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_templates', 'where' => 'suid IN ('.implode(",",$ids).')' ) ); + $this->ipsclass->DB->simple_exec(); + + while( $r = $this->ipsclass->DB->fetch_row() ) + { + $content = preg_replace( "/'/", "\\'", $this->ipsclass->txt_safeslashes( $r['section_content'] ) ); + $datavar = preg_replace( "/'/", "\\'", $this->ipsclass->txt_safeslashes( $r['func_data'] ) ); + + $content = str_replace( "\n", '\n', $content ); + + $final_sql .= "REPLACE INTO ibf_skin_templates SET set_id=1, group_names_secondary='". $r['group_names_secondary']. "', group_name='{$r['group_name']}', func_name='{$r['func_name']}', section_content='$content', func_data='$datavar';\n"; + } + + //@header("Content-type: text/plain"); + //print $final_sql; + //exit(); + + //----------------------------------------- + // Print to browser + //----------------------------------------- + + $this->ipsclass->admin->show_download( $final_sql, 'templates_update.sql', '', 0 ); + + } + + /*-------------------------------------------------------------------------*/ + // EXPORT SOME TEMPLATE BITS TO SQL FILE + /*-------------------------------------------------------------------------*/ + + function export_bits_choose() + { + $all_templates = array(); + + $this->ipsclass->DB->simple_construct( array( 'select' => 'group_name,set_id,suid,func_name, group_names_secondary', 'from' => 'skin_templates', 'where' => 'set_id=1' ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $all_templates[ $r['group_name'] ][] = $r; + } + + ksort( $all_templates ); + + //----------------------------------------- + // Start output + //----------------------------------------- + + $this->ipsclass->admin->page_title = "Export Selected Template bits"; + $this->ipsclass->admin->page_detail = "Check the box of the bit you wish to export."; + + //----------------------------------------- + // start form + //----------------------------------------- + + $per_row = 3; + $td_width = 100 / $per_row; + $count = 0; + $output = "";//"\n"; + + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'exportbitscomplete' ), + 2 => array( 'act' , 'sets' ), + 4 => array( 'section', $this->ipsclass->section_code ), + ) ); + + $this->ipsclass->html .= "
    +
    Template Bits
    + "; + + foreach( $all_templates as $group_name => $data ) + { + //----------------------------------------- + // Start secondary table + //----------------------------------------- + + $count = 0; + + $output .= "
    +
    $group_name
    + + "; + + foreach( $all_templates[ $group_name ] as $r ) + { + $count++; + + $class = $count == 2 ? 'tablerow2' : 'tablerow1'; + + $output .= ""; + + if ($count == $per_row ) + { + $output .= "\n\n"; + $count = 0; + } + } + + if ( $count > 0 and $count != $per_row ) + { + for ($i = $count ; $i < $per_row ; ++$i) + { + $output .= "\n"; + } + + $output .= ""; + } + + $output .= "\n
    + {$r['func_name']} +
     
    "; + } + + $this->ipsclass->html .= $output; + + $this->ipsclass->html .= "
    "; + + $this->ipsclass->admin->output(); + } + + /*-------------------------------------------------------------------------*/ + // REBUILD TEMPLATES + /*-------------------------------------------------------------------------*/ + + function rebuild_all_templates() + { + if ( $this->ipsclass->input['removewarning'] == 1 ) + { + $this->ipsclass->update_cache( array( 'value' => '', 'name' => 'skinpanic', 'donow' => 1, 'deletefirst' => 1, 'array' => 0 ) ); + } + + $justdone = intval($this->ipsclass->input['justdone']); + $justdone = $justdone ? $justdone : 1; + + //----------------------------------------- + // Get skins + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', + 'from' => 'skin_sets', + 'where' => 'set_skin_set_id > '.$justdone, + 'order' => 'set_skin_set_id', + 'limit' => array( 0, 1 ) + ) ); + + $this->ipsclass->DB->simple_exec(); + + //----------------------------------------- + // Got a biggun? + //----------------------------------------- + + $r = $this->ipsclass->DB->fetch_row(); + + if ( $r['set_skin_set_id'] ) + { + $this->ipsclass->cache_func->_rebuild_all_caches( array($r['set_skin_set_id']) ); + + $this->ipsclass->admin->redirect( "{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=rebuildalltemplates&justdone={$r['set_skin_set_id']}", "Rebuilt cache for skin set {$r['set_name']}
    Proceeding to the next skin..." ); + } + else + { + $this->ipsclass->main_msg = "All skin templates recached!"; + $this->list_sets(); + } + } + + //----------------------------------------- + // Export master skin set. + //----------------------------------------- + + function export_master() + { + //----------------------------------------- + // Get xml mah-do-dah + //----------------------------------------- + + require_once( KERNEL_PATH.'class_xml.php' ); + + $xml = new class_xml(); + + //----------------------------------------- + // Start... + //----------------------------------------- + + $xml->xml_set_root( 'templateexport', array( 'exported' => time(), 'versionid' => '20000', 'type' => 'master' ) ); + + //----------------------------------------- + // Get emo group + //----------------------------------------- + + $xml->xml_add_group( 'templategroup' ); + + $this->ipsclass->DB->simple_construct( array( 'select' => 'group_name, section_content, func_name, func_data, group_names_secondary', 'from' => 'skin_templates', 'where' => 'set_id=1' ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $content = array(); + + foreach ( $r as $k => $v ) + { + $content[] = $xml->xml_build_simple_tag( $k, $v ); + } + + $entry[] = $xml->xml_build_entry( 'template', $content ); + } + + $xml->xml_add_entry_to_group( 'templategroup', $entry ); + + $xml->xml_format_document(); + + //----------------------------------------- + // Send to browser. + //----------------------------------------- + + $this->ipsclass->admin->show_download( $xml->xml_document, 'ipb_templates.xml', '', 0 ); + } + + //----------------------------------------- + // Export master macros + //----------------------------------------- + + function export_macro() + { + //----------------------------------------- + // Get xml mah-do-dah + //----------------------------------------- + + require_once( KERNEL_PATH.'class_xml.php' ); + + $xml = new class_xml(); + + //----------------------------------------- + // Start... + //----------------------------------------- + + $xml->xml_set_root( 'macroexport', array( 'exported' => time() ) ); + + //----------------------------------------- + // Get emo group + //----------------------------------------- + + $xml->xml_add_group( 'macrogroup' ); + + $this->ipsclass->DB->simple_construct( array( 'select' => 'macro_value,macro_replace', 'from' => 'skin_macro', 'where' => 'macro_set=1' ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $content = array(); + + foreach ( $r as $k => $v ) + { + $content[] = $xml->xml_build_simple_tag( $k, $v ); + } + + $entry[$r['macro_value']] = $xml->xml_build_entry( 'macro', $content ); + } + + $xml->xml_add_entry_to_group( 'macrogroup', $entry ); + + $xml->xml_format_document(); + + //----------------------------------------- + // Send to browser. + //----------------------------------------- + + $this->ipsclass->admin->show_download( $xml->xml_document, 'macro.xml', '', 0 ); + + } + + //----------------------------------------- + // ADD SET + //----------------------------------------- + + function add_set() + { + //----------------------------------------- + // Check for input + //----------------------------------------- + + $new = array(); + $message = array(); + + if ($this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("You must specify an existing skin set ID, go back and try again"); + } + + if ( $this->ipsclass->input['id'] == 1 ) + { + $this->ipsclass->main_msg = "You cannot alter the master skin set"; + $this->list_sets(); + } + + if ( ! $this->ipsclass->input['set_name'] ) + { + $this->ipsclass->main_msg = "You must enter a skin set name."; + $this->list_sets(); + } + + if ( $this->ipsclass->input['id'] == -1 ) + { + //----------------------------------------- + // No parent... + //----------------------------------------- + + $new['set_skin_set_parent'] = -1; + $get_from_db = 1; + } + else + { + $new['set_skin_set_parent'] = $this->ipsclass->input['id']; + $get_from_db = intval($this->ipsclass->input['id']); + } + + $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.$get_from_db ) ); + + $new['set_name'] = $this->ipsclass->input['set_name']; + $new['set_image_dir'] = $this_set['set_image_dir']; + $new['set_hidden'] = intval( $this->ipsclass->input['hidden'] ); + $new['set_default'] = 0; + $new['set_css_method'] = $this_set['set_css_method']; + $new['set_cache_css'] = $this_set['set_cache_css']; + $new['set_cache_macro'] = $this_set['set_cache_macro']; + $new['set_cache_wrapper'] = $this_set['set_cache_wrapper']; + + $this->ipsclass->DB->do_insert( 'skin_sets', $new ); + + $newid = $this->ipsclass->DB->get_insert_id(); + + //----------------------------------------- + // Rebuild caches + //----------------------------------------- + + $this->ipsclass->cache_func->_rebuild_all_caches( array( $newid ) ); + + $this->ipsclass->main_msg = 'Skin Set Added'; + + $this->ipsclass->main_msg .= "
    ".implode("
    ", array_merge( $message, $this->ipsclass->cache_func->messages) ); + $this->list_sets(); + } + + //----------------------------------------- + // Revert customizations > DO + //----------------------------------------- + + function do_revert_all() + { + //----------------------------------------- + // Check for input + //----------------------------------------- + + $message = array(); + + if ($this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("You must specify an existing skin set ID, go back and try again"); + } + + if ( $this->ipsclass->input['id'] == 1 ) + { + $this->ipsclass->main_msg = "You cannot alter the master skin set"; + $this->list_sets(); + } + + $id = intval($this->ipsclass->input['id']); + + //----------------------------------------- + // Delete Templates? + //----------------------------------------- + + if ( isset($this->ipsclass->input['html']) AND $this->ipsclass->input['html'] ) + { + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_templates', 'where' => 'set_id='.$id ) ); + $message[] = 'Removed all custom HTML template bits...'; + } + + //----------------------------------------- + // Delete Macros? + //----------------------------------------- + + if ( isset($this->ipsclass->input['macro']) AND $this->ipsclass->input['macro'] ) + { + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_macro', 'where' => 'macro_set='.$id ) ); + $message[] = 'Removed all custom replacement macros...'; + } + + //----------------------------------------- + // Delete Wrapper + //----------------------------------------- + + if ( isset($this->ipsclass->input['wrapper']) AND $this->ipsclass->input['wrapper'] ) + { + $this->ipsclass->DB->simple_exec_query( array( 'update' => 'skin_sets', 'set' => "set_wrapper=''", 'where' => 'set_skin_set_id='.$id ) ); + $message[] = 'Removed custom wrapper...'; + } + + //----------------------------------------- + // Delete Wrapper + //----------------------------------------- + + if ( isset($this->ipsclass->input['css']) AND $this->ipsclass->input['css'] ) + { + $this->ipsclass->DB->simple_exec_query( array( 'update' => 'skin_sets', 'set' => "set_css=''", 'where' => 'set_skin_set_id='.$id ) ); + $message[] = 'Removed custom CSS...'; + } + + //----------------------------------------- + // Rebuild caches + //----------------------------------------- + + $this->ipsclass->cache_func->_rebuild_all_caches( array( $id ) ); + + $this->ipsclass->main_msg = 'Skin set customizations removed'; + + $this->ipsclass->main_msg .= "
    ".implode("
    ", array_merge( $message, $this->ipsclass->cache_func->messages) ); + $this->list_sets(); + } + + //----------------------------------------- + // Revert customizations form + //----------------------------------------- + + function revert_all_form() + { + $templates = 0; + $macros = 0; + $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); + + //----------------------------------------- + // Check for input + //----------------------------------------- + + if ($this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("You must specify an existing skin set ID, go back and try again"); + } + + if ( $this->ipsclass->input['id'] == 1 ) + { + $this->ipsclass->main_msg = "You cannot alter the master skin set"; + $this->list_sets(); + } + + $this->ipsclass->admin->page_detail = "Please note that this change cannot be undone!"; + $this->ipsclass->admin->page_title = "Revert Skin Set Customizations"; + + //----------------------------------------- + // Get macro / template info + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 'count(*) as aerosmith', 'from' => 'skin_templates', 'where' => "set_id={$this->ipsclass->input['id']}" ) ); + $this->ipsclass->DB->simple_exec(); + + $r = $this->ipsclass->DB->fetch_row(); + $templates = intval($r['aerosmith']); + + $this->ipsclass->DB->simple_construct( array( 'select' => 'count(*) as aerosmith', 'from' => 'skin_macro', 'where' => "macro_set={$this->ipsclass->input['id']}" ) ); + $this->ipsclass->DB->simple_exec(); + + $r = $this->ipsclass->DB->fetch_row(); + $macros = intval($r['aerosmith']); + + //----------------------------------------- + // Get the thingies + //----------------------------------------- + + $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => "set_skin_set_id=".$this->ipsclass->input['id'] ) ); + + //----------------------------------------- + // Start the form + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code', 'dorevert' ), + 2 => array( 'act' , 'sets' ), + 3 => array( 'id' , $this->ipsclass->input['id'] ), + 4 => array( 'section', $this->ipsclass->section_code ), + ), "theAdminForm" ); + + $none = "No customizations to remove"; + + $html = $templates ? $this->ipsclass->adskin->form_yes_no('html' , 0) : $none; + $macro = $macros ? $this->ipsclass->adskin->form_yes_no('macro' , 0) : $none; + $wrapper = $this_set['set_wrapper'] ? $this->ipsclass->adskin->form_yes_no('wrapper', 0) : $none; + $css = $this_set['set_css'] ? $this->ipsclass->adskin->form_yes_no('css' , 0) : $none; + + //----------------------------------------- + // Start output + //----------------------------------------- + + $this->ipsclass->html .= "
    +
    Reverting Customizations in set {$this_set['set_name']}
    +
    +
    + Template HTML Customizations + + + + + +
    Revert all template bit HTML customizations?
    You have {$templates} template customizations
    {$html}
    +
    +
    +
    + Macro Replacement Customizations + + + + + +
    Revert all macro customizations?
    You have {$macros} macro customizations
    {$macro}
    +
    +
    +
    + Board Header and Footer Wrapper Customizations + + + + + +
    Revert Board Header and Footer Wrapper?{$wrapper}
    +
    +
    +
    + Stylesheet (CSS) Customizations + + + + + +
    Revert CSS?{$css}
    +
    +
    Please note that all customizations will be lost if set to 'yes'
    This cannot be undone and there are no more confirmation screens
    +
    +
    "; + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form_standalone("Process"); + + //----------------------------------------- + // Output + //----------------------------------------- + + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code ,'Skin Manager Home' ); + $this->ipsclass->admin->nav[] = array( '' ,'Reverting all customizations in set '.$this_set['set_name'] ); + + $this->ipsclass->admin->output(); + } + + + //----------------------------------------- + // REMOVE SKIN SET FORM + //----------------------------------------- + + function remove_splash() + { + $this->ipsclass->admin->page_detail = "Please read this page carefully."; + $this->ipsclass->admin->page_title = "Removing Skin Set"; + + //----------------------------------------- + // Get this skin set... + //----------------------------------------- + + $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.intval($this->ipsclass->input['id']) ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code', 'doremove' ), + 2 => array( 'act' , 'sets' ), + 3 => array( 'id' , $this->ipsclass->input['id'] ), + 4 => array( 'section', $this->ipsclass->section_code ), + ) ); + + $this->ipsclass->adskin->td_header[] = array( " " , "100%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Remove Skin Set {$this_set['set_name']}" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( + "
    + PLEASE NOTE: This action cannot be undone

    + Continuing will permanently remove any customizations to this skin set, including template HTML, CSS, Wrappers and custom macros. +

    + Any children of this skin set will be set as 'root' skins without a parent. + ", + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Permanently Remove Set {$this_set['set_name']}"); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + $this->ipsclass->admin->output(); + } + + //----------------------------------------- + // TOGGLE DEFAULT SKIN + //----------------------------------------- + + function set_toggle_default() + { + $affected_ids = array(); + $children = array(); + $message = array(); + + //----------------------------------------- + // Check for input + //----------------------------------------- + + if ($this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("You must specify an existing skin set ID, go back and try again"); + } + + if ( $this->ipsclass->input['id'] == 1 ) + { + $this->ipsclass->main_msg = 'You cannot alter the master skin set'; + $this->list_sets(); + } + + //----------------------------------------- + // Set as default + //----------------------------------------- + + $this->ipsclass->DB->do_update( 'skin_sets', array( 'set_default' => 0 ), "" ); + $this->ipsclass->DB->do_update( 'skin_sets', array( 'set_default' => 1, 'set_hidden' => 0 ), "set_skin_set_id =".intval($this->ipsclass->input['id']) ); + + //----------------------------------------- + // Rebuild caches and relationships? + //----------------------------------------- + + $this->ipsclass->cache_func->_rebuild_all_caches( array( $this->ipsclass->input['id'] ) ); + + $this->ipsclass->main_msg = 'Skin set to default'; + $this->list_sets(); + } + + //----------------------------------------- + // TOGGLE VISIBILITY + //----------------------------------------- + + function set_toggle_visible() + { + $affected_ids = array(); + $children = array(); + $message = array(); + + //----------------------------------------- + // Check for input + //----------------------------------------- + + if ($this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("You must specify an existing skin set ID, go back and try again"); + } + + if ( $this->ipsclass->input['id'] == 1 ) + { + $this->ipsclass->main_msg = 'You cannot alter the master skin set'; + $this->list_sets(); + } + + //----------------------------------------- + // Get current skin + //----------------------------------------- + + $skin = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.intval($this->ipsclass->input['id']) ) ); + + $hidden = 1; + + if ( $skin['set_hidden'] ) + { + $hidden = 0; + } + + //----------------------------------------- + // We're not going to make all skins invisible? + //----------------------------------------- + + if ( $hidden == 1 ) + { + $count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as count', + 'from' => 'skin_sets', + 'where' => 'set_hidden=0 AND set_skin_set_id NOT IN ( 1,'. intval($this->ipsclass->input['id']).')' ) ); + + if ( ! intval($count['count']) ) + { + $this->ipsclass->main_msg = 'You cannot turn your last visible skin set invisible'; + $this->list_sets(); + return; + } + } + + $this->ipsclass->DB->do_update( 'skin_sets', array( 'set_hidden' => $hidden ), 'set_skin_set_id='.intval($this->ipsclass->input['id']) ); + + //----------------------------------------- + // Rebuild caches and relationships? + //----------------------------------------- + + $this->ipsclass->cache_func->_rebuild_all_caches( array( $this->ipsclass->input['id'] ) ); + + $this->ipsclass->main_msg = 'Skin set visibility changed'; + $this->list_sets(); + } + + //----------------------------------------- + // DO REMOVE SKIN SET + //----------------------------------------- + + function do_remove() + { + $affected_ids = array(); + $children = array(); + $message = array(); + + //----------------------------------------- + // Check for input + //----------------------------------------- + + if ($this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("You must specify an existing skin set ID, go back and try again"); + } + + if ( $this->ipsclass->input['id'] == 1 ) + { + $this->ipsclass->main_msg = 'You cannot alter the master skin set'; + $this->list_sets(); + } + + //----------------------------------------- + // Get this skin set... + //----------------------------------------- + + $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.intval($this->ipsclass->input['id']) ) ); + + //----------------------------------------- + // Can we remove? + //----------------------------------------- + + if ( $this_set['set_default'] == 1 ) + { + $this->ipsclass->main_msg = 'IPB cannot remove this skin as it is set as the default skin, please set another skin set to default and try again.'; + $this->list_sets(); + } + + $this_count = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as jazzyjeff', 'from' => 'skin_sets' ) ); + + if ( $this_count['jazzyjeff'] == 2 ) + { + $this->ipsclass->main_msg = 'IPB cannot remove this skin as it is the last editable skin set you currently have.'; + $this->list_sets(); + } + + //----------------------------------------- + // Get any children + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 'set_skin_set_id, set_skin_set_parent', 'from' => 'skin_sets', 'where' => "set_skin_set_parent=".intval($this->ipsclass->input['id']) ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $affected_ids[] = $r['set_skin_set_id']; + $children[] = $r['set_skin_set_id']; + } + + //----------------------------------------- + // Update children to root + //----------------------------------------- + + if ( count($children) ) + { + $this->ipsclass->DB->do_update( 'skin_sets', array( 'set_skin_set_parent' => '-1' ), 'set_skin_set_id IN ('.implode(',',$children).')' ); + } + + //----------------------------------------- + // Members using this skin? + //----------------------------------------- + + $this->ipsclass->DB->do_update( 'members', array( 'skin' => 0 ), 'skin='.intval($this->ipsclass->input['id']) ); + + //----------------------------------------- + // Delete the skin... + //----------------------------------------- + + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_sets', 'where' => 'set_skin_set_id='.intval($this->ipsclass->input['id']) ) ); + + //----------------------------------------- + // Remove macros... + //----------------------------------------- + + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_macro', 'where' => 'macro_set='.intval($this->ipsclass->input['id']) ) ); + + //----------------------------------------- + // Remove templates... + //----------------------------------------- + + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_templates', 'where' => 'set_id='.intval($this->ipsclass->input['id']) ) ); + + //----------------------------------------- + // Remove template cache... + //----------------------------------------- + + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_templates_cache', 'where' => 'template_set_id='.intval($this->ipsclass->input['id']) ) ); + + //----------------------------------------- + // Remove CSS file... + //----------------------------------------- + + @unlink( CACHE_PATH.'style_images/css_'.$this->ipsclass->input['id'].'.css' ); + $message[] = 'Clean up: removing CSS cache file...'; + + //----------------------------------------- + // Remove CACHE folder + //----------------------------------------- + + $this->ipsclass->admin->rm_dir( CACHE_PATH.'cache/skin_cache/cacheid_'.$this->ipsclass->input['id'] ); + $message[] = 'Clean up: removing HTML templates cache folder...'; + + //----------------------------------------- + // Rebuild caches and relationships? + //----------------------------------------- + + if ( count($affected_ids) ) + { + $this->ipsclass->cache_func->_rebuild_all_caches($affected_ids); + } + + $this->ipsclass->cache_func->_rebuild_skin_id_cache(); + + $this->ipsclass->main_msg = 'Skin set removed'; + + $this->ipsclass->main_msg .= "
    ".implode("
    ", array_merge( $message, $this->ipsclass->cache_func->messages) ); + $this->list_sets(); + + } + + + + //----------------------------------------- + // ADD / EDIT SKIN SETS + //----------------------------------------- + + function save_skin( $type='add' ) + { + //----------------------------------------- + // Fix up incoming + //----------------------------------------- + + //img / prt + + if ($type == 'edit') + { + if ($this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("You must specify an existing skin set ID, go back and try again"); + } + } + + if ($this->ipsclass->input['set_name'] == "") + { + $this->ipsclass->admin->error("You must specify a name for this skin pack ID"); + } + + $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id = '.intval($this->ipsclass->input['id']) ) ); + + //----------------------------------------- + // Init var + //----------------------------------------- + + $barney = array( 'set_name' => $this->ipsclass->txt_stripslashes($_POST['set_name']), + 'set_css_method' => $this->ipsclass->input['set_css_method'], + 'set_hidden' => $this->ipsclass->input['set_hidden'], + 'set_image_dir' => $this->ipsclass->input['set_image_dir'], + 'set_author_email' => $this->ipsclass->input['set_author_email'], + 'set_author_url' => $this->ipsclass->input['set_author_url'], + 'set_author_name' => $this->ipsclass->input['set_author_name'], + 'set_skin_set_parent' => $this->ipsclass->input['set_skin_set_parent'], + 'set_emoticon_folder' => $this->ipsclass->input['set_emoticon_folder'], + 'set_key' => substr( $this->ipsclass->input['set_key'], 0, 32 ), + ); + + if ($type == 'add') + { + + + } + else + { + //----------------------------------------- + // Did we set it to default? + //----------------------------------------- + + if ( $this->ipsclass->input['set_default'] ) + { + $this->ipsclass->DB->do_update( 'skin_sets', array( 'set_default' => 0 ), 'set_skin_set_id <> '.intval($this->ipsclass->input['id']) ); + $barney['set_default'] = 1; + } + + //----------------------------------------- + // Did the parent change? + //----------------------------------------- + + $affected_ids = array(); + + if ( $this->ipsclass->input['prt'] != $this->ipsclass->input['set_skin_set_parent'] ) + { + $affected_ids[ $this_set['set_skin_set_id'] ] = $this_set['set_skin_set_id']; + + //----------------------------------------- + // Any kids? + //----------------------------------------- + + $children = array(); + $child_id = array(); + + $this->ipsclass->DB->simple_construct( array( 'select' => 'set_skin_set_id', 'from' => 'skin_sets', 'where' => 'set_skin_set_parent='.$this_set['set_skin_set_id'] ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $children[] = $r; + $child_id[] = $r['set_skin_set_id']; + $affected_ids[ $r['set_skin_set_id'] ] = $r['set_skin_set_id']; + } + + if ( count($children) ) + { + //----------------------------------------- + // Move children to direct root children + //----------------------------------------- + + $this->ipsclass->DB->simple_exec_query( array( 'update' => 'skin_sets', 'set' => 'set_skin_set_parent = -1', 'where' => 'set_skin_set_id IN ('.implode(",",$child_id).')' ) ); + } + } + + if ( $this->ipsclass->input['css'] != $this->ipsclass->input['set_css_method'] ) + { + if ( $this->ipsclass->input['set_css_method'] ) + { + //----------------------------------------- + // Caching switched on... + //----------------------------------------- + + $affected_ids[ $this_set['set_skin_set_id'] ] = $this_set['set_skin_set_id']; + } + } + + //----------------------------------------- + // Img dir changed? recache css + //----------------------------------------- + + if ( $this->ipsclass->input['img'] != $this->ipsclass->input['set_image_dir'] ) + { + $affected_ids[ $this_set['set_skin_set_id'] ] = $this_set['set_skin_set_id']; + } + + $this->ipsclass->DB->do_update( 'skin_sets', $barney, "set_skin_set_id=".intval($this->ipsclass->input['id']) ); + + //----------------------------------------- + // Rebuild caches and relationships? + //----------------------------------------- + + $this->ipsclass->cache_func->_rebuild_all_caches($affected_ids); + + $this->ipsclass->main_msg = 'Skin Settings Updated'; + + $this->ipsclass->main_msg .= "
    ".implode("
    ", $this->ipsclass->cache_func->messages); + + //$this->ipsclass->admin->redirect("{$this->ipsclass->form_code}", "Skin Set Updated" ); + $this->list_sets(); + } + } + + //----------------------------------------- + // ADD / EDIT SETS + //----------------------------------------- + + function do_form( $type='add' ) + { + //----------------------------------------- + // Check for input + //----------------------------------------- + + $sets = array(); + $parents = array( 0=> array( '-1', 'No parent' ) ); + $row = array(); + + if ($this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("You must specify an existing skin set ID, go back and try again"); + } + + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_sets' ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $sets[ $r['set_skin_set_id'] ] = $r; + + if ( ($r['set_skin_set_parent'] < 0 and $r['set_skin_set_id'] != 1 ) and ( $this->ipsclass->input['id'] != $r['set_skin_set_id'] ) ) + { + $parents[] = array( $r['set_skin_set_id'], $r['set_name'] ); + } + + if ( $this->ipsclass->input['id'] == $r['set_skin_set_id'] ) + { + $row = $r; + } + } + + + //----------------------------------------- + + if ($type == 'add') + { + $code = 'doadd'; + $button = 'Create New Skin Set'; + $row['set_name'] = $row['set_name']; + $row['set_default'] = 0; + } + else + { + $code = 'doedit'; + $button = 'Edit Skin Settings'; + } + + //----------------------------------------- + // Image dir + //----------------------------------------- + + $dirs = array(); + + $dh = opendir( CACHE_PATH.'style_images' ); + + while ( false !== ( $file = readdir( $dh ) ) ) + { + if (($file != ".") && ($file != "..")) + { + if ( is_dir(CACHE_PATH.'style_images/'.$file) ) + { + $dirs[] = array( $file, $file ); + } + } + } + closedir( $dh ); + + //----------------------------------------- + // Emoticons dir + //----------------------------------------- + + $emodirs = array(); + + $dh = opendir( CACHE_PATH.'style_emoticons' ); + + while ( false !== ( $file = readdir( $dh ) ) ) + { + if (($file != ".") && ($file != "..")) + { + if ( is_dir(CACHE_PATH.'style_emoticons/'.$file) ) + { + $emodirs[] = array( $file, $file ); + } + } + } + closedir( $dh ); + + + if ( is_writeable( CACHE_PATH."style_images" ) ) + { + $cssextra = $this->ipsclass->adskin->form_yes_no('set_css_method', $row['set_css_method']); + } + else + { + $cssextra = "Unavailable, IPB cannot write into your 'style_images' folder"; + } + + + //----------------------------------------- + + $this->ipsclass->admin->page_detail = "Please configure the settings below."; + $this->ipsclass->admin->page_title = "Manage Skin Sets"; + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code', $code ), + 2 => array( 'act' , 'sets' ), + 3 => array( 'id' , $this->ipsclass->input['id'] ), + 4 => array( 'img' , $row['set_image_dir'] ), + 5 => array( 'prt' , $row['set_skin_set_parent'] ), + 6 => array( 'css' , $row['set_css_method'] ), + 7 => array( 'section', $this->ipsclass->section_code ), + ), "theAdminForm" ); + + //----------------------------------------- + // Start output + //----------------------------------------- + + $this->ipsclass->html .= "
    +
    $button
    +
    +
    + Basics + + + + + + + + + "; + + if ( $row['set_default'] ) + { + $this->ipsclass->html .= " + + "; + } + else + { + $this->ipsclass->html .= " + + "; + } + + $this->ipsclass->html .= " + + + + + + + + +
    Set Title".$this->ipsclass->adskin->form_input('set_name', $row['set_name'])."
    Hide from members?".$this->ipsclass->adskin->form_yes_no('set_hidden', $row['set_hidden'])."
    Set as default skin?Skin set as default already.
    Set as default skin?".$this->ipsclass->adskin->form_checkbox('set_default', $row['set_default'])."
    Skin Set Parent?".$this->ipsclass->adskin->form_dropdown('set_skin_set_parent', $parents, $row['set_skin_set_parent'])."
    Skin Set Key? (Optional)".$this->ipsclass->adskin->form_input('set_key', $row['set_key'])."
    +
    +
    +
    + CSS Options + + + + + +
    Cache CSS to text files?
    This will reduce the size of the HTML as the CSS will be in a browser cachable file. +
    ".$cssextra."
    Warning: Changing this value will re-cache any cached stylesheet information. Please make sure that you have synchronized any cache files with the database.
    +
    +
    +
    + Image Options + + + + + + + + + +
    Use image directory?
    The image directory will be used in place of <#IMG_DIR#> in CSS and macro replacements.
    style_images/ ".$this->ipsclass->adskin->form_dropdown('set_image_dir', $dirs, $row['set_image_dir'])."
    Use emoticons set?
    Choose which set of emoticons to assign to this skin.
    style_emoticons/ ".$this->ipsclass->adskin->form_dropdown('set_emoticon_folder', $emodirs, $row['set_emoticon_folder'])."
    +
    + +
    +
    + Set Author + + + + + + + + + + + + + +
    Set Author Name
    *Optional
    ".$this->ipsclass->adskin->form_input('set_author_name', $row['set_author_name'])."
    Set Author Email Address
    *Optional
    ".$this->ipsclass->adskin->form_input('set_author_email', $row['set_author_email'])."
    Set Author Website Address
    *Optional
    ".$this->ipsclass->adskin->form_input('set_author_url', $row['set_author_url'])."
    +
    +
    +
    "; + + + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form_standalone($button); + + //----------------------------------------- + + $this->ipsclass->admin->output(); + + + } + + //----------------------------------------- + // SHOW ALL SKIN SETS + //----------------------------------------- + + function list_sets() + { + $form_array = array(); + $this_set = ""; + $forums = array(); + $forum_skins = array(); + $macro_array = array(); + $template_array = array(); + $content = ""; + + $this->ipsclass->admin->page_detail = "Simply click on the button next to the skin set you wish to edit and select one of the options from the pop-up menu."; + $this->ipsclass->admin->page_title = "Manage Skin Sets"; + + //----------------------------------------- + // Get forum names + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, skin_id', 'from' => 'forums' ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $f = $this->ipsclass->DB->fetch_row() ) + { + $forums[ $f['id'] ] = $f['name']; + + if ( $f['skin_id'] != "") + { + $forum_skins[ $f['skin_id'] ][] = $f['name']; + } + } + + //----------------------------------------- + // Get macro / template info + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'stylesets_list_sets_templates', array() ); + $this->ipsclass->DB->cache_exec_query(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $template_array[ $r['set_id'] ] = 1; + } + + $this->ipsclass->DB->cache_add_query( 'stylesets_list_sets_macros', array() ); + $this->ipsclass->DB->cache_exec_query(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $macro_array[ $r['macro_set'] ] = 1; + } + + //----------------------------------------- + // GET SKINS + //----------------------------------------- + + $skin_sets = array(); + $last_id = 0; + $default_skin = ""; + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_sets', 'order' => 'set_skin_set_parent, set_skin_set_id ASC' ) ); + $this->ipsclass->DB->simple_exec(); + + $no_sets = 0; + $i_sets = 0; + + while ( $row = $this->ipsclass->DB->fetch_row() ) + { + $skins[ $row['set_skin_set_id'] ] = $row; + + if ( $row['set_skin_set_parent'] == -1 ) + { + $no_sets++; + } + } + + //----------------------------------------- + // Loop-de-loop + //----------------------------------------- + + foreach( $skins as $r ) + { + $i_sets++; + + $skin_sets[ $r['set_skin_set_id'] ] = $r; + + $skin_sets[ $r['set_skin_set_parent'] ]['_lastid'] = $r['set_skin_set_id']; + $skin_sets[ $r['set_skin_set_parent'] ]['_children'][] = $r['set_skin_set_id']; + + $extra = ""; + $forums = "Not used in forums"; + + //----------------------------------------- + // Used in forums? + //----------------------------------------- + + if ( isset($forum_skins[ $r['set_skin_set_id'] ]) AND is_array($forum_skins[ $r['set_skin_set_id'] ]) ) + { + if ( count($forum_skins[ $r['set_skin_set_id'] ]) > 0 ) + { + $extra = "Used in forums:".implode( ",", $forum_skins[ $r['set_skin_set_id'] ] ); + + $forums = ""; + } + } + + $this->unaltered = "- "; + $this->altered = "+ "; + $this->inherited = "| "; + + //----------------------------------------- + // Default / Hidden? + //----------------------------------------- + + $default = "Not Default"; + $hidden = "visible"; + $folder_icon = 'skin_folder.gif'; + $css_extra = ""; + + //----------------------------------------- + // Child of master, middle skin + // or last skin? + //----------------------------------------- + + if ( $i_sets >= $no_sets ) + { + $line_image = " "; + } + else + { + $line_image = " "; + } + + //----------------------------------------- + // Hidden? + //----------------------------------------- + + if ($r['set_hidden'] == 1) + { + $hidden = "Invisible"; + $folder_icon = 'skin_folder_hidden.gif'; + $css_extra = 'color:#7F7FAA'; + } + + //----------------------------------------- + // Default? + //----------------------------------------- + + if ($r['set_default'] == 1) + { + $default = "Not Default"; + $default_skin = $r['set_name']; + } + + //----------------------------------------- + // IPB Master? + //----------------------------------------- + + if ( $r['set_skin_set_id'] == 1 ) + { + $folder_icon = 'skin_folder_master.gif'; + $line_image = ""; + $css_extra = "color:gray"; + $hidden = ""; + $default = ""; + $forums = ""; + } + else + { + //----------------------------------------- + // Not.. + //----------------------------------------- + + if ( $r['set_skin_set_parent'] >= 0 ) + { + //----------------------------------------- + // Child though... + //----------------------------------------- + + if ( $folder_icon != 'skin_folder_hidden.gif' ) + { + $folder_icon = 'skin_folder_children.gif'; + } + + $line_image = ""; + } + } + + //----------------------------------------- + // Skin opts + //----------------------------------------- + + if ( $r['set_skin_set_id'] == 1 AND ! IN_DEV ) + { + $menulist = "\"This is the master skin and cannot be edited or removed.
    If you wish to customize the default skin, please click" + ."
    on the skin set '' and choose from the options.\""; + } + else + { + $menulist = preg_replace( "#,$#", "", $this->html->skin_sets_overview_row_menulist( $r ) ); + } + + //----------------------------------------- + // Add skin row + //----------------------------------------- + $skin_sets[ $r['set_skin_set_id'] ]['_html'] = isset($skin_sets[ $r['set_skin_set_id'] ]['_html']) ? $skin_sets[ $r['set_skin_set_id'] ]['_html'] : ''; + + $skin_sets[ $r['set_skin_set_id'] ]['_html'] .= $this->html->skin_sets_overview_row( $r, $forums, $hidden, $default, $menulist, $i_sets, $no_sets, $folder_icon, $line_image, $css_extra ); + + $form_array[] = array( $r['set_skin_set_id'], $r['set_name'] ); + } + + //----------------------------------------- + // Show root forums + //----------------------------------------- + + foreach( $skin_sets as $id => $data ) + { + if ( isset($data['set_skin_set_parent']) AND $data['set_skin_set_parent'] == -1 ) + { + $wrapper_icon = $this->_get_status_of_parent( $data['set_wrapper'] ); + $css_icon = $this->_get_status_of_parent( $data['set_css'] ); + $templates_icon = $this->_get_status_of_parent( isset($template_array[ $data['set_skin_set_id'] ]) ? $template_array[ $data['set_skin_set_id'] ] : 0 ); + $macro_icon = $this->_get_status_of_parent( isset($macro_array[ $data['set_skin_set_id'] ]) ? $macro_array[ $data['set_skin_set_id'] ] : 0 ); + + //----------------------------------------- + // Fix n' stitch + //----------------------------------------- + + $data['_html'] = str_replace( '' , $wrapper_icon , $data['_html'] ); + $data['_html'] = str_replace( '', $templates_icon, $data['_html'] ); + $data['_html'] = str_replace( '' , $css_icon , $data['_html']); + $data['_html'] = str_replace( '' , $macro_icon , $data['_html'] ); + + $content .= $data['_html']."\n"; + } + } + + //----------------------------------------- + // Show any children + //----------------------------------------- + + foreach( $skin_sets as $id => $data ) + { + if ( isset($data['_children']) AND is_array( $data['_children'] ) and count( $data['_children'] ) > 0 ) + { + $html = ""; + + foreach( $data['_children'] as $cid ) + { + $image = ""; + + if ( $cid == $data['_lastid'] ) + { + //----------------------------------------- + // Last skin, show L + //----------------------------------------- + + $image = 'skin_line_l.gif'; + } + else + { + //----------------------------------------- + // First skin, show T + //----------------------------------------- + + $image = 'skin_line_t.gif'; + } + + $skin_sets[ $cid ]['_html'] = str_replace( "", " ", $skin_sets[ $cid ]['_html'] ); + + //----------------------------------------- + // (un)altered icons: + //----------------------------------------- + + $wrapper_icon = $this->_get_status_of_child( isset($skin_sets[ $cid ]['set_wrapper']) ? $skin_sets[ $cid ]['set_wrapper'] : '' , isset($skin_sets[ $id ]['set_wrapper']) ? $skin_sets[ $id ]['set_wrapper'] : '' ); + $css_icon = $this->_get_status_of_child( isset($skin_sets[ $cid ]['set_css']) ? $skin_sets[ $cid ]['set_css'] : '' , isset($skin_sets[ $id ]['set_css']) ? $skin_sets[ $id ]['set_css'] : '' ); + $templates_icon = $this->_get_status_of_child( isset($template_array[ $cid ]) ? $template_array[ $cid ] : '' , isset($template_array[ $id ]) ? $template_array[ $id ] : '' ); + $macro_icon = $this->_get_status_of_child( isset($macro_array[ $cid ]) ? $macro_array[ $cid ] : '' , isset($macro_array[ $id ]) ? $macro_array[ $id ] : '' ); + + //----------------------------------------- + // Fix n' stitch + //----------------------------------------- + + $skin_sets[ $cid ]['_html'] = str_replace( '' , $wrapper_icon , $skin_sets[ $cid ]['_html'] ); + $skin_sets[ $cid ]['_html'] = str_replace( '', $templates_icon, $skin_sets[ $cid ]['_html'] ); + $skin_sets[ $cid ]['_html'] = str_replace( '' , $css_icon , $skin_sets[ $cid ]['_html'] ); + $skin_sets[ $cid ]['_html'] = str_replace( '' , $macro_icon , $skin_sets[ $cid ]['_html'] ); + + $html .= $skin_sets[ $cid ]['_html']; + } + + $content = str_replace( "", $html, $content ); + } + } + + //----------------------------------------- + // Add in default skin name + //----------------------------------------- + + $this->ipsclass->html = $this->html->skin_sets_overview( $content ); + + $this->ipsclass->html = str_replace( '', $default_skin, $this->ipsclass->html ); + + if( IN_DEV ) + { + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( + 1 => array( 'section' , 'lookandfeel' ), + 2 => array( 'act' , 'sets' ), + 3 => array( 'code' , 'MOD_mod_xml' ), + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( 'Developers: Export Module Skin Files' ); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( + 'WHERE group_name LIKE \'%' . $this->ipsclass->adskin->form_input( 'group_name' ) . '%\' AND set_id = ' . $this->ipsclass->adskin->form_input( 'set_id', 1, '', '', 2 ) ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form( 'Generate & Download XML' ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + } + + $this->ipsclass->admin->output(); + } + + //----------------------------------------- + // Get status of a child + //----------------------------------------- + + function _get_status_of_child($this_item, $parent_item) + { + if ( $this_item ) + { + return $this->altered; + } + else if ( $parent_item ) + { + return $this->inherited; + } + else + { + return $this->unaltered; + } + } + + //----------------------------------------- + // Get status of a parent + //----------------------------------------- + + function _get_status_of_parent($this_item) + { + if ( ! $this_item ) + { + return $this->unaltered; + } + else + { + return $this->altered; + } + } + + function generate_mod_xml() + { + if( empty( $this->ipsclass->input['group_name'] ) ) + { + $this->list_sets(); + return; + } + + /** + * Set ID + */ + $this->ipsclass->input['set_id'] = ( $this->ipsclass->input['set_id'] ) ? (int)$this->ipsclass->input['set_id'] : 1; + + /** + * Require the XML class + */ + require_once( KERNEL_PATH . 'class_xml.php' ); + $xml = new class_xml(); + + /** + * Set the root tag + */ + $xml->xml_set_root( 'templateexport', array( 'exported' => time(), 'versionid' => '220', 'type' => 'master' ) ); + + /** + * Create base group + */ + $xml->xml_add_group( 'templategroup' ); + + //$content[] = $xml->xml_build_simple_tag( 'description', "This is a descrption" ); + //$entry[] = $xml->xml_build_entry( 'product', $content, array( 'id' => '1.0' ) ); + //$xml->xml_add_entry_to_group( 'productgroup', $entry ); + //$xml->xml_format_document(); + + /** + * SQL + */ + $this->ipsclass->DB->simple_select( '*', 'skin_templates', "group_name LIKE '%{$this->ipsclass->input['group_name']}%' AND set_id = {$this->ipsclass->input['set_id']}" ); + $this->ipsclass->DB->exec_query(); + + if( $this->ipsclass->DB->get_num_rows() ) + { + while( $row = $this->ipsclass->DB->fetch_row() ) + { + unset( $content ); + + $content[] = $xml->xml_build_simple_tag( 'group_name', $row['group_name'] ); + $content[] = $xml->xml_build_simple_tag( 'section_content', $row['section_content'] ); + $content[] = $xml->xml_build_simple_tag( 'func_name', $row['func_name'] ); + $content[] = $xml->xml_build_simple_tag( 'func_data', $row['func_data'] ); + + $entry[] = $xml->xml_build_entry( 'template', $content ); + } + + $xml->xml_add_entry_to_group( 'templategroup', $entry ); + } + + /** + * Format + */ + $xml->xml_format_document(); + + /** + * Send to browser + */ + $this->ipsclass->admin->show_download( $xml->xml_document, 'mod_templates.xml', '', 0 ); + } + +} + + ?> \ No newline at end of file diff --git a/upload/sources/action_admin/skin_template_bits.php b/upload/sources/action_admin/skin_template_bits.php index baa2305c..f6975be7 100644 --- a/upload/sources/action_admin/skin_template_bits.php +++ b/upload/sources/action_admin/skin_template_bits.php @@ -1,1344 +1,1383 @@ - $Date: 2006-12-07 06:46:38 -0500 (Thu, 07 Dec 2006) $ -| > $Revision: 777 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > Skin -> Templates functions -| > Module written by Matt Mecham -| > Date started: 15th April 2002 -| -| > Module Version Number: 1.0.0 -| > DBA Checked: Tue 25th May 2004 -+-------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - - -class ad_skin_template_bits -{ - var $base_url; - var $template = ""; - var $functions = ""; - - var $search_bits; - - /** - * Section title name - * - * @var string - */ - var $perm_main = "lookandfeel"; - - /** - * Section title name - * - * @var string - */ - var $perm_child = "templ"; - - /** - * Search template bits - * - * var array - */ - - function auto_run() - { - //----------------------------------------- - // Get the libraries - //----------------------------------------- - - $this->template =& $this->ipsclass->cache_func->template; - - //----------------------------------------- - // LOAD HTML - //----------------------------------------- - - $this->html = $this->ipsclass->acp_load_template('cp_skin_lookandfeel'); - - //----------------------------------------- - - require_once( ROOT_PATH.'sources/lib/admin_template_functions.php' ); - - $this->functions = new admin_template_functions(); - $this->functions->ipsclass =& $this->ipsclass; - - //----------------------------------------- - - $this->unaltered = "- "; - $this->altered = "+ "; - $this->inherited = "| "; - - //----------------------------------------- - - switch($this->ipsclass->input['code']) - { - case 'template-sections-list': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->template_sections_list(); - break; - - case 'template-bits-list': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->template_bits_list(); - break; - - case 'template-edit-bit-complete': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->template_edit_bit_complete(); - break; - - case 'template_remove_bit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); - $this->template_revert_bit(); - break; - - case 'template-edit-bit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->template_edit_bit(); - break; - - case 'floateditor': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); - $this->functions->build_editor_area_floated(); - break; - - case 'addbit': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); - $this->add_bit(); - break; - - case 'doadd': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); - $this->do_add_bit(); - break; - - default: - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->template_sections_list(); - break; - } - } - - //----------------------------------------- - // Show template bits for a group - //----------------------------------------- - - function template_bits_list( $type='' ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $groups = array(); - $group_bits = array(); - $content = ""; - $master_names = array(); - $group_name = trim( $this->ipsclass->input['group_name'] ); - $id = intval( $this->ipsclass->input['id'] ); - $p = intval( $this->ipsclass->input['p'] ); - $type = $type != '' ? $type : ( isset($this->ipsclass->input['type']) ? trim( $this->ipsclass->input['type'] ) : '' ); - - //----------------------------------------- - // Get $skin_names stuff - //----------------------------------------- - - require_once( ROOT_PATH.'sources/lib/skin_info.php' ); - - //----------------------------------------- - // Get skin set - //----------------------------------------- - - $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => "set_skin_set_id=".$id ) ); - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! $id ) - { - $this->ipsclass->admin->error("Вы должны указать ID шаблона, вернитесь назад и попробуйте еще раз"); - } - - //----------------------------------------- - // Parent? - //----------------------------------------- - - if ( ! $p ) - { - if ( $this_set['set_skin_set_parent'] ) - { - $p = $this_set['set_skin_set_parent']; - } - } - - if ( $p > 0 ) - { - $in = ','.$p; - } - - //----------------------------------------- - // Get template bits master names.. - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => 'func_name', 'from' => 'skin_templates', 'where' => "group_name='{$group_name}' AND set_id=1" ) ); - $this->ipsclass->DB->simple_exec(); - - //----------------------------------------- - // Compile... - //----------------------------------------- - - while ( $m = $this->ipsclass->DB->fetch_row() ) - { - $master_names[ $m['func_name'] ] = $m['func_name']; - } - - $group['easy_name'] = $skin_names[ $group_name ][0]; - $group['group_name'] = $group_name; - - //----------------------------------------- - // Get group bits - //----------------------------------------- - - $group_bits = $this->ipsclass->cache_func->_get_templates($id, $p, 'groups', $group_name ); - - $add_button = ""; - - //----------------------------------------- - // Add to HTML - //----------------------------------------- - - $temp = ""; - $sec_arry = array(); - - //----------------------------------------- - // Stuff array to sort on name - //----------------------------------------- - - foreach( $group_bits as $i ) - { - $sec_arry[ $i['suid'] ] = $i; - $sec_arry[ $i['suid'] ]['easy_name'] = $i['func_name']; - } - - //----------------------------------------- - // Sort by easy_name - //----------------------------------------- - - usort($sec_arry, array( 'ad_skin_template_bits', 'perly_alpha_sort' ) ); - - //----------------------------------------- - // Loop and print main display - //----------------------------------------- - - foreach( $sec_arry as $sec ) - { - $custom_bit = ""; - - $sec['_p'] = intval( $p ); - $sec['_id'] = intval( $this->ipsclass->input['id'] ); - - //----------------------------------------- - // Altered? - //----------------------------------------- - - if ( $sec['set_id'] == $id ) - { - $altered_image = $this->html->template_bits_bit_row_image( $sec['suid'], 'skin_item_altered.gif' ); - } - else if ( $sec['set_id'] == 1 ) - { - $altered_image = $this->html->template_bits_bit_row_image( $sec['suid'], 'skin_item_unaltered.gif' ); - } - else - { - $altered_image = $this->html->template_bits_bit_row_image( $sec['suid'], 'skin_item_inherited.gif' ); - } - - $remove_button = "ipsclass->base_url}&{$this->ipsclass->form_code}&code=template_remove_bit&bitname={$sec['func_name']}&id={$this->ipsclass->input['id']}&p={$this->ipsclass->input['p']}&group_name={$sec['group_name']}&type=frame')\"> "; - - if ( $sec['set_id'] == $id ) - { - if ( $master_names[ $sec['func_name'] ] ) - { - $remove_button = "ipsclass->base_url}&{$this->ipsclass->form_code}&code=template_remove_bit&bitname={$sec['func_name']}&id={$this->ipsclass->input['id']}&p={$this->ipsclass->input['p']}&group_name={$sec['group_name']}&type=frame')\">X "; - } - else - { - $custom_bit = ' (custom bit)'; - $remove_button = "ipsclass->base_url}&{$this->ipsclass->form_code}&code=template_remove_bit&bitname={$sec['func_name']}&id={$this->ipsclass->input['id']}&p={$this->ipsclass->input['p']}&group_name={$sec['group_name']}&type=frame&custombit=1')\">X "; - } - } - - $content .= $this->html->template_bits_bit_row( $sec, $custom_bit, $remove_button, $altered_image ); - } - - //----------------------------------------- - // Just showing the XML? - //----------------------------------------- - - if ( $type == 'xml' ) - { - @header("Content-Type: text/plain"); - print $content; - exit(); - } - else - { - $this->ipsclass->html = $this->html->template_bits_bit_overview( $group, $content, $add_button ); - - $this->ipsclass->admin->print_popup(); - } - } - - //----------------------------------------- - // Show template groups/categories - //----------------------------------------- - - function template_sections_list() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $groups = array(); - $group_bits = array(); - $content = ""; - $javascript = ''; - $js_groups = ''; - $js_bits = ''; - $js_matches = ''; - - $this->ipsclass->input['id'] = intval( $this->ipsclass->input['id'] ); - $this->ipsclass->input['p'] = intval( $this->ipsclass->input['p'] ); - - //----------------------------------------- - // Get $skin_names stuff - //----------------------------------------- - - require_once( ROOT_PATH.'sources/lib/skin_info.php' ); - - //----------------------------------------- - // Get skin set - //----------------------------------------- - - $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => "set_skin_set_id=".$this->ipsclass->input['id'] ) ); - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( $this->ipsclass->input['id'] == "") - { - $this->ipsclass->admin->error("Вы должны указать ID шаблона, вернитесь назад и попробуйте еще раз"); - } - - //----------------------------------------- - // Parent? - //----------------------------------------- - - if ( ! $this->ipsclass->input['p'] ) - { - if ( $this_set['set_skin_set_parent'] ) - { - $this->ipsclass->input['p'] = $this_set['set_skin_set_parent']; - } - } - - if ( $this->ipsclass->input['p'] > 0 ) - { - $in = ','.$this->ipsclass->input['p']; - } - - $this->ipsclass->admin->page_detail = "В этой секции вы можете добавить новый шаблон."; - $this->ipsclass->admin->page_title = "Изменение шаблона"; - - //----------------------------------------- - // Generate inline JS - //----------------------------------------- - - if ( is_array( $this->search_bits ) and count( $this->search_bits ) ) - { - foreach( $this->search_bits as $group => $idx ) - { - $js_matches .= "\t'$group' : ". count( $this->search_bits[ $group ] ).",\n"; - $js_groups .= "\t'$group' : 1,\n"; - - foreach( $this->search_bits[ $group ] as $data ) - { - $js_bits .= "\t'{$group}_{$data['func_name']}' : 1,\n"; - } - } - - //----------------------------------------- - // Trim off trailing commas - //----------------------------------------- - - $js_matches = preg_replace( "#,\n?$#", "", $js_matches ); - $js_groups = preg_replace( "#,\n?$#", "", $js_groups ); - $js_bits = preg_replace( "#,\n?$#", "", $js_bits ); - - $javascript = "var template_search = 1;\n". - "var search_template_sections = {\n". $js_groups ."\n};\n". - "var search_template_bits = {\n" . $js_bits ."\n};\n". - "var search_template_matches = {\n" . $js_matches."\n};\n"; - - } - else - { - $javascript = "var template_search = 0;\nvar search_template_sections = {};\nvar search_template_bits = {};\nvar search_template_matches = {};\n"; - } - - //----------------------------------------- - // Get the groups... - //----------------------------------------- - - $group_titles = $this->ipsclass->cache_func->_get_templates($this->ipsclass->input['id'], $this->ipsclass->input['p'], 'groups'); - - foreach( $group_titles as $g ) - { - //----------------------------------------- - // Fix up names - //----------------------------------------- - - $g['easy_name'] = "".$g['group_name'].""; - $g['easy_desc'] = ""; - - //----------------------------------------- - // If available, change group name to easy name - //----------------------------------------- - - if ( isset($skin_names[ $g['group_name'] ]) ) - { - $g['easy_name'] = "".$skin_names[ $g['group_name'] ][0].""; - $g['easy_desc'] = str_replace( '"', '"', $skin_names[ $g['group_name'] ][1] ); - } - else - { - $g['easy_name'] = "".$g['group_name']." (нестандартная)"; - $g['easy_desc'] = "Эта группа не является частью стандартной инсталляции IPB и не имеет доступного описания"; - } - - if ( isset($skin_names[ $g['group_name'] ][2]) ) - { - $g['easy_preview'] = "ipsclass->vars['php_ext']}?{$skin_names[ $g['group_name'] ][2]}' target='_blank'>Предпросмотр"; - } - else - { - $g['easy_preview'] = "Нет доступных предпросмотров"; - } - - $groups[] = $g; - } - - //----------------------------------------- - // Sort by easy_name - //----------------------------------------- - - usort($groups, array( 'ad_skin_template_bits', 'perly_alpha_sort' ) ); - - //----------------------------------------- - // Loop and print - //----------------------------------------- - - foreach( $groups as $group ) - { - $eid = $group['suid']; - $exp_content = ""; - - $this->ipsclass->cache_func->template_count[$this->ipsclass->input['p']][ $group['group_name'] ]['count'] = - isset($this->ipsclass->cache_func->template_count[$this->ipsclass->input['p']][ $group['group_name'] ]['count']) ? - $this->ipsclass->cache_func->template_count[$this->ipsclass->input['p']][ $group['group_name'] ]['count'] : 0; - - $this->ipsclass->cache_func->template_count[$this->ipsclass->input['id']][ $group['group_name'] ]['count'] = - isset($this->ipsclass->cache_func->template_count[$this->ipsclass->input['id']][ $group['group_name'] ]['count']) ? - $this->ipsclass->cache_func->template_count[$this->ipsclass->input['id']][ $group['group_name'] ]['count'] : 0; - - $altered = sprintf( '%02d', intval($this->ipsclass->cache_func->template_count[$this->ipsclass->input['id']][ $group['group_name'] ]['count']) ); - $original = sprintf( '%02d', intval($this->ipsclass->cache_func->template_count[1][ $group['group_name'] ]['count']) ); - $inherited = sprintf( '%02d', intval($this->ipsclass->cache_func->template_count[$this->ipsclass->input['p']][ $group['group_name'] ]['count']) ); - $count_string = ""; - - if ( $this->ipsclass->input['p'] > 0 ) - { - $count_string = "$original {$this->unaltered} $inherited {$this->inherited} $altered {$this->altered}"; - } - else - { - $count_string = "$original {$this->unaltered} $altered {$this->altered}"; - } - - //----------------------------------------- - // Folder blob - //----------------------------------------- - - if ( $altered > 0 ) - { - $folder_blob = $this->altered; - } - else if ( $this->ipsclass->input['p'] > 0 and $inherited > 0 ) - { - $folder_blob = $this->inherited; - } - else - { - $folder_blob = $this->unaltered; - } - - $group['_p'] = intval( $this->ipsclass->input['p'] ); - $group['_id'] = intval( $this->ipsclass->input['id'] ); - - //----------------------------------------- - // Print normal rows - //----------------------------------------- - - $content .= $this->html->template_bits_overview_row_normal( $group, $folder_blob, $count_string ); - } - - $this->ipsclass->html .= $this->html->template_bits_overview( $content, $javascript ); - - $this->ipsclass->html .= $this->ipsclass->adskin->skin_jump_menu_wrap(); - - $this->ipsclass->admin->nav[] = array( 'section='.$this->ipsclass->section_code.'&act=sets' ,'Список стилей' ); - $this->ipsclass->admin->nav[] = array( '' ,'Изменение HTML шаблонов стиля «'.$this_set['set_name'].'»' ); - - $this->ipsclass->admin->output(); - } - - //----------------------------------------- - // Sneaky sorting. - // We use the format "1: name". without this hack - // 1: name, 2: other name, 11: other name - // will sort as 1: name, 11: other name, 2: other name - // There is natsort and such in PHP, but it causes some - // problems on older PHP installs, this is hackish but works - // by simply adding '0' to a number less than 2 characters long. - // of course, this won't work with three numerics in the hundreds - // but we don't have to worry about more that 99 bits in a template - // at this stage. - //----------------------------------------- - - function perly_word_sort($a, $b) - { - $nat_a = intval( $a['easy_name'] ); - $nat_b = intval( $b['easy_name'] ); - - if (strlen($nat_a) < 2) - { - $nat_a = '0'.$nat_a; - } - if (strlen($nat_b) < 2) - { - $nat_b = '0'.$nat_b; - } - - return strcmp($nat_a, $nat_b); - } - - //----------------------------------------- - // Sort by group name - //----------------------------------------- - - function perly_alpha_sort($a, $b) - { - return strcmp( strtolower($a['easy_name']), strtolower($b['easy_name']) ); - } - - - //----------------------------------------- - // ADD TEMPLATE BIT - //----------------------------------------- - - function add_bit() - { - $this->ipsclass->admin->page_detail = "В этой секции вы можете добавить новый шаблон."; - $this->ipsclass->admin->page_title = "Изменение шаблона"; - - $groupname = $this->ipsclass->input['expand']; - - $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => "set_skin_set_id=".intval($this->ipsclass->input['id']) ) ); - - //----------------------------------------- - // Sort out group titles - //----------------------------------------- - - $group_titles = $this->ipsclass->cache_func->_get_templates( $this->ipsclass->input['id'], $this->ipsclass->input['p'], 'groups' ); - - $formatted_groups = array(); - - foreach ( $group_titles as $d ) - { - $formatted_groups[] = array( $d['group_name'], $d['group_name'] ); - } - - //----------------------------------------- - // Good form old boy - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doadd' ), - 2 => array( 'act' , 'templ' ), - 3 => array( 'id' , $this->ipsclass->input['id'] ), - 4 => array( 'p' , $this->ipsclass->input['p'] ), - 5 => array( 'expand', $this->ipsclass->input['expand'] ), - 6 => array( 'section', $this->ipsclass->section_code ), - ) , "theform" ); - - //----------------------------------------- - // Editor prefs strip - //----------------------------------------- - - - - $options .= "
    Настройки нового шаблона
    -
    - - - - - - - - - - - - - - - - - -
    Название шаблона
    Допускаются только латинские символы, цифры и знаки подчеркивания, без пробелов.
    ".$this->ipsclass->adskin->form_input('func_name', $this->ipsclass->txt_stripslashes($_POST['func_name']))."
    Входящие переменные
    Определение переменных обрабатываемых в этом шаблоне.
    ".$this->ipsclass->adskin->form_input('func_data', str_replace( "'", ''', $this->ipsclass->txt_stripslashes($_POST['func_data']) ) )."
    Группа для шаблона...".$this->ipsclass->adskin->form_dropdown('group_name', $formatted_groups, $this->ipsclass->input['group_name'] ? $this->ipsclass->input['group_name'] : $this->ipsclass->input['expand'] )."
    Или создайте новую группу...
    Оставьте пустым для использования существующей группы.
    Допускаются только латинские символы, цифры и знаки подчеркивания, без пробелов
    skin_".$this->ipsclass->adskin->form_input('new_group_name', $this->ipsclass->txt_stripslashes($_POST['new_group_name']))."
    -
    -
    - "; - - $this->ipsclass->html .= $options; - - $this->ipsclass->admin->print_popup(); - } - - /*-------------------------------------------------------------------------*/ - // DO ADD NEW BIT - /*-------------------------------------------------------------------------*/ - - function do_add_bit() - { - //----------------------------------------- - // Check incoming - //----------------------------------------- - - $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => "set_skin_set_id=".intval($this->ipsclass->input['id']) ) ); - - if ( $_POST['new_group_name'] ) - { - if ( preg_match( "#[^\w_]#s", $_POST['new_group_name'] ) ) - { - $this->ipsclass->main_msg = 'Название группы шаблонов может состоять только из латинских символов, цифр и знаков подчеркивания.'; - $this->add_bit(); - } - } - - if ( ! $_POST['func_name'] ) - { - $this->ipsclass->main_msg = 'Название шаблона не может быть пустым.'; - $this->add_bit(); - } - else - { - if ( preg_match( "#[^\w_]#s", $_POST['func_name'] ) ) - { - $this->ipsclass->main_msg = 'Название шаблона может состоять только из латинских символов, цифр и знаков подчеркивания.'; - $this->add_bit(); - } - } - - - $new_group_name = strtolower(str_replace( 'skin_', '', trim($this->ipsclass->input['new_group_name']) )); - $func_name = strtolower(trim($this->ipsclass->input['func_name'])); - $group_name = $new_group_name ? 'skin_'.$new_group_name : $this->ipsclass->input['group_name']; - $func_data = preg_replace( "#,$#", "", str_replace( ''', "'", trim($this->ipsclass->txt_stripslashes($_POST['func_data'])) ) ); - $text = ''; - - //----------------------------------------- - // Is parent master template set? - //----------------------------------------- - - if( $this_set['set_skin_set_parent'] == "-1" ) - { - $parent_set = "1"; - } - else - { - $parent_set = $this_set['set_skin_set_parent']; - } - - //----------------------------------------- - // Make sure bit doesn't exist - //----------------------------------------- - - if ( $row = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'suid', 'from' => 'skin_templates', 'where' => "(set_id=".intval($this->ipsclass->input['id'])." OR set_id='{$parent_set}') AND group_name='$group_name' AND func_name='$func_name'" ) ) ) - { - $this->ipsclass->main_msg = "Шаблон '$func_name' уже существует в группе '$group_name'."; - $this->add_bit(); - } - - //----------------------------------------- - // Make sure it's not called "end" - //----------------------------------------- - - if ( strtolower($func_name) == 'end' ) - { - $this->ipsclass->main_msg = "Имя шаблона не может быть 'end'"; - $this->add_bit(); - } - - //----------------------------------------- - // INSERT NEW BIT - //----------------------------------------- - - $this->ipsclass->DB->do_insert( 'skin_templates', array ( - 'set_id' => intval($this->ipsclass->input['id']), - 'group_name' => $group_name, - 'section_content' => $text, - 'func_name' => $func_name, - 'func_data' => $func_data, - 'updated' => time(), - ) ); - - $new_id = $this->ipsclass->DB->get_insert_id(); - - //----------------------------------------- - // Rebuild the PHP file - //----------------------------------------- - - $this->ipsclass->cache_func->_recache_templates( $this->ipsclass->input['id'], $this->ipsclass->input['p'] ); - - //----------------------------------------- - // Back we go... - //----------------------------------------- - - $this->ipsclass->input[ 'cb_'.$new_id ] = 1; - $this->ipsclass->input[ 'suid' ] = $new_id; - $this->ipsclass->input['type'] = 'single'; - $this->template_edit_bit( $reload=1 ); - } - - /*-------------------------------------------------------------------------*/ - // EDIT TEMPLATE BIT - /*-------------------------------------------------------------------------*/ - - function template_edit_bit( $reload=0 ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $suid = isset($this->ipsclass->input['suid']) ? intval( $this->ipsclass->input['suid'] ) : 0; - $type = isset($this->ipsclass->input['type']) ? trim( $this->ipsclass->input['type'] ) : ''; - $id = isset($this->ipsclass->input['id']) ? intval( $this->ipsclass->input['id'] ) : 0; - $p = isset($this->ipsclass->input['p']) ? intval( $this->ipsclass->input['p'] ) : 0; - $bitname = isset($_REQUEST['bitname']) ? $this->ipsclass->parse_clean_value( urldecode( $_REQUEST['bitname'] ) ) : ''; - $group_name = isset($this->ipsclass->input['group_name']) ? trim( $this->ipsclass->input['group_name'] ) : ''; - - $template_bit_ids = array(); - $ids = array(); - - //----------------------------------------- - // PAGE HEADER - //----------------------------------------- - - $this->ipsclass->admin->page_detail = "Вы можете редактировать HTML код этого шаблона."; - $this->ipsclass->admin->page_title = "Управление стилями"; - - //----------------------------------------- - // Get $skin_names stuff - //----------------------------------------- - - require ROOT_PATH.'sources/lib/skin_info.php'; - - $this->functions->type = $type; - - //----------------------------------------- - // Group bits - //----------------------------------------- - - $group_bits = $this->ipsclass->cache_func->_get_templates($id, $p, 'groups', $group_name ); - - //----------------------------------------- - // Check for valid input... - //----------------------------------------- - - if ( $type == 'single' ) - { - if ( $suid == "" ) - { - //----------------------------------------- - // Grab relevant SUID based on IDs - //----------------------------------------- - - if ( $bitname == "" ) - { - $this->ipsclass->admin->error("Не выбраны ID шаблонов, пожалуйста, вернитесь назад и выберите что-нибудь"); - } - - foreach( $group_bits as $i ) - { - if ( $bitname == $i['func_name'] ) - { - $suid = $i['suid']; - } - } - } - - $ids[] = $suid; - } - else - { - //----------------------------------------- - // Bit names? - //----------------------------------------- - - if ( $bitname ) - { - foreach( explode( '|', $bitname ) as $name ) - { - foreach( $group_bits as $i ) - { - if ( $name == $i['func_name'] ) - { - $ids[] = $i['suid']; - } - } - } - } - else - { - foreach ( $this->ipsclass->input as $key => $value ) - { - if ( preg_match( "/^cb_(\d+)$/", $key, $match ) ) - { - if ($this->ipsclass->input[$match[0]]) - { - $ids[] = $match[1]; - } - } - } - } - } - - $ids = $this->ipsclass->clean_int_array( $ids ); - - if ( count($ids) < 1 ) - { - $this->ipsclass->admin->error("Ни одного ID не выбрано, пожалуйста, вернитесь назад и заполните все, что необходимо перед подтверждением формы"); - } - - //----------------------------------------- - // Build form - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->js_template_tools(); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'template-edit-bit-complete' ), - 2 => array( 'act' , 'templ' ), - 3 => array( 'suid' , $suid ), - 4 => array( 'type' , $type ), - 5 => array( 'id' , $id ), - 6 => array( 'p' , $p ), - 7 => array( 'section' , $this->ipsclass->section_code ), - 8 => array( 'bitname' , $bitname ), - 9 => array( 'group_name', $group_name ), - ) , "theform", "", 'template-bits-form' ); - - - //----------------------------------------- - // Get template bits - //----------------------------------------- - - $sec_arry = array(); - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_templates', 'where' => "suid IN (".implode(",",$ids).")" ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $i = $this->ipsclass->DB->fetch_row() ) - { - $sec_arry[ $i['suid'] ] = $i; - $sec_arry[ $i['suid'] ]['easy_name'] = $i['func_name']; - - //----------------------------------------- - // If easy name is available, use it - //----------------------------------------- - - if ( isset($bit_names[ $i['group_name'] ][ $i['func_name'] ]) AND $bit_names[ $i['group_name'] ][ $i['func_name'] ] != "" ) - { - $sec_arry[ $i['suid'] ]['easy_name'] = $bit_names[ $i['group_name'] ][ $i['func_name'] ]; - } - } - - //----------------------------------------- - // Sort by easy_name - //----------------------------------------- - - usort($sec_arry, array( 'ad_skin_template_bits', 'perly_alpha_sort' ) ); - - //----------------------------------------- - // Editor prefs strip - //----------------------------------------- - - $this->ipsclass->html .= $this->functions->html_build_editor_top(); - - //----------------------------------------- - // Loop and print - //----------------------------------------- - - foreach( $sec_arry as $template ) - { - //----------------------------------------- - // Swop < and > into ascii entities - // to prevent textarea breaking html - //----------------------------------------- - - $setid = $template['set_id']; - $groupname = $template['group_name']; - - if ( !isset($this->ipsclass->input['error_raw_'.$template['suid']]) OR !$this->ipsclass->input['error_raw_'.$template['suid']] ) - { - $templ = $template['section_content']; - } - else - { - $templ = $this->ipsclass->input['error_raw_'.$template['suid']]; - } - - $templ = str_replace( "&" , "&" , $templ ); - $templ = str_replace( "<" , "<" , $templ ); - $templ = str_replace( ">" , ">" , $templ ); - $templ = str_replace( '\n', '\n', $templ ); - - //----------------------------------------- - // Altered? - //----------------------------------------- - - if ( $template['set_id'] == $id ) - { - $altered_image = $this->altered; - } - else if ( $template['set_id'] == 1 ) - { - $altered_image = $this->unaltered; - } - else - { - $altered_image = $this->inherited; - } - - $this->ipsclass->html .= $this->functions->build_editor_area( $templ, $template, $altered_image ); - - $template_bit_ids[] = "t{$template['suid']}"; - } - - $this->ipsclass->html .= $this->functions->html_build_editor_bottom() . ""; - - if ( $type != 'single' AND $type != 'multiple' ) - { - $formbuttons = "
    - - -
    \n"; - - $this->ipsclass->html = str_replace( '', $formbuttons, $this->ipsclass->html ); - } - - //----------------------------------------- - // Let the JS know which IDs to - // look for (clever, no?) - //----------------------------------------- - - $this->ipsclass->html = str_replace( "", implode(",",$template_bit_ids), $this->ipsclass->html ); - - //----------------------------------------- - // Find easy name for group - //----------------------------------------- - - $old_groupname = $groupname; - - if ( $skin_names[ $groupname ][0] != "" ) - { - $groupname = $skin_names[ $groupname ][0]; - } - - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code ,'Управление стилями' ); - $this->ipsclass->admin->nav[] = array( "{$this->ipsclass->form_code}&code=edit&id={$id}&groupname={$old_groupname}", $groupname ); - - //----------------------------------------- - // Force reload of template bits? - //----------------------------------------- - - if ( $reload ) - { - $this->ipsclass->html .= "\n"; - } - - //----------------------------------------- - // Type of output - //----------------------------------------- - - if ( $type != 'single' AND $type != 'multiple' ) - { - $this->ipsclass->html .= $this->ipsclass->adskin->skin_jump_menu_wrap(); - $this->ipsclass->admin->output(); - } - else - { - $this->ipsclass->admin->print_popup(); - } - } - - /*-------------------------------------------------------------------------*/ - // COMPLETE EDIT - /*-------------------------------------------------------------------------*/ - - function template_edit_bit_complete() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $ids = array(); - $cb_ids = array(); - $error_bits = array(); - $type = trim( $this->ipsclass->input['type'] ); - - $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); - $this->ipsclass->input['p'] = intval($this->ipsclass->input['p']); - - //----------------------------------------- - // CHECK FOR INPUT - //----------------------------------------- - - foreach ($this->ipsclass->input as $key => $value) - { - if ( preg_match( "/^txt(\d+)$/", $key, $match ) ) - { - if ( $this->ipsclass->input[ $match[0] ] ) - { - //----------------------------------------- - // If multiple - only save clicked bit - //----------------------------------------- - - $cb_ids[ $match[1] ] = 'cb_'.$match[1]; - - if ( $type == 'multiple' ) - { - if ( $this->ipsclass->input[ 'edited-'.$match[1] ] ) - { - $ids[] = $match[1]; - } - } - - //----------------------------------------- - // Not multiple - continue - //----------------------------------------- - - else - { - $ids[] = $match[1]; - } - } - } - } - - $ids = $this->ipsclass->clean_int_array( $ids ); - - if ( count($ids) < 1 ) - { - $this->ipsclass->main_msg = "Нечего сохранять"; - - foreach( $cb_ids as $cb ) - { - $this->ipsclass->input[ $cb ] = 1; - } - - $this->template_edit_bit(); - } - - //----------------------------------------- - // Get the group name, etc - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_templates', 'where' => "suid IN (".implode(",",$ids).")" ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $template[ $r['suid'] ] = $r; - $real_name = $r['group_name']; - } - - //----------------------------------------- - // Process my bits :o - //----------------------------------------- - - foreach( $ids as $id ) - { - $text = $this->ipsclass->txt_stripslashes($_POST['txt'.$id]); - - //----------------------------------------- - // Sw(o|a)p back < & > - //----------------------------------------- - - $text = str_replace("<", "<", $text); - $text = str_replace(">", ">", $text); - $text = str_replace("&", "&", $text); - $text = str_replace( '\n', '\n',$text ); - $text = str_replace( '\\n' , '\\\\\\n', $text ); - $text = str_replace( '../', '../' , $text ); - $text = str_replace( '\' , '\\',$text ); - - //----------------------------------------- - // Convert \r to nowt - //----------------------------------------- - - $text = str_replace("\r", "", $text); - - $func = preg_replace( "#,$#", "", str_replace( ''', "'", trim($this->ipsclass->txt_stripslashes($_POST['funcdata_'.$id])) ) ); - - //----------------------------------------- - // Test to ensure they are legal - // - catch warnings, etc - //----------------------------------------- - - ob_start(); - eval( $this->template->convert_html_to_php( $template[ $id ]['func_name'], $func, $text ) ); - $return = ob_get_contents(); - ob_end_clean(); - - if ( $return ) - { - $error_bits[] = $id; - continue; - } - - //----------------------------------------- - // Is this in our template id group? - //----------------------------------------- - - if ( $template[ $id ]['set_id'] == $this->ipsclass->input['id'] ) - { - //----------------------------------------- - // Okay, update... - //----------------------------------------- - - $this->ipsclass->DB->do_update( 'skin_templates', array( 'section_content' => $text, 'updated' => time(), 'func_data' => $func ), 'suid='.$id ); - } - else - { - //----------------------------------------- - // No? OK - best add it as a 'new' bit - //----------------------------------------- - - $this->ipsclass->DB->do_insert( 'skin_templates', array ( - 'set_id' => $this->ipsclass->input['id'], - 'group_name' => $template[ $id ]['group_name'], - 'section_content' => $text, - 'func_name' => $template[ $id ]['func_name'], - 'func_data' => $func, - 'updated' => time(), - ) ); - - if ( $this->ipsclass->input['type'] == 'single' ) - { - $this->ipsclass->input['suid'] = $this->ipsclass->DB->get_insert_id(); - } - else - { - $cb_ids[ $id ] = 'cb_'.$this->ipsclass->DB->get_insert_id(); - unset($this->ipsclass->input['cb_'.$id ]); - } - } - } - - //----------------------------------------- - // Rebuild the PHP file - //----------------------------------------- - - $this->ipsclass->cache_func->_recache_templates( $this->ipsclass->input['id'], $this->ipsclass->input['p'], $real_name ); - - //----------------------------------------- - // Back we go... - //----------------------------------------- - - if ( count( $error_bits ) ) - { - foreach( $error_bits as $id ) - { - $this->ipsclass->input['cb_'.$id ] = 1; - $this->ipsclass->input['error_raw_'.$id] = $this->ipsclass->txt_stripslashes($_POST['txt'.$id]); - $this->ipsclass->main_msg = "Эти шаблоны не могут быть сохранены, так как найдена ошибка при парсинге. Проверьте введенный HTML-код и все входящие переменные."; - - $this->template_edit_bit(); - } - } - else - { - if ( ( $type != 'single' AND $type != 'multiple' ) AND ( ! $this->ipsclass->input['savereload'] ) ) - { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code ,'Менеджер стилей' ); - $this->ipsclass->admin->redirect( "{$this->ipsclass->form_code}&code=template-edit-bit&id={$this->ipsclass->input['id']}&group_name={$real_name}", "Шаблон(ы) обновлены, возвращение к окну выбора шаблона" ); - } - else - { - //----------------------------------------- - // Reload edit window - //----------------------------------------- - - if( count($this->ipsclass->cache_func->messages) ) - { - array_pop($this->ipsclass->cache_func->messages); - - $this->ipsclass->cache_func->messages[] = "Шаблон(ы) в базе данных обновлен(ы)"; - - $this->ipsclass->main_msg = implode( "
    ", $this->ipsclass->cache_func->messages ); - } - else - { - $this->ipsclass->main_msg = "Шаблон(ы) обновлен(ы)"; - } - - foreach( $cb_ids as $cb ) - { - $this->ipsclass->input[ $cb ] = 1; - } - - $this->template_edit_bit(); - } - } - } - - //----------------------------------------- - // REMOVE CUSTOMIZATION - //----------------------------------------- - - function template_revert_bit() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $suid = $this->ipsclass->input['suid']; - $type = $this->ipsclass->input['type']; - $bitname = $this->ipsclass->parse_clean_value( urldecode( $_REQUEST['bitname'] ) ); - $group_name = trim( $this->ipsclass->input['group_name'] ); - $id = intval( $this->ipsclass->input['id'] ); - $p = intval( $this->ipsclass->input['p'] ); - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! $suid ) - { - if ( $bitname == "" ) - { - $this->ipsclass->admin->error("Вы должны ввести правильный ID шаблона"); - } - - $group_bits = $this->ipsclass->cache_func->_get_templates($id, $p, 'groups', $group_name ); - - foreach( $group_bits as $i ) - { - if ( $bitname == $i['func_name'] ) - { - $suid = $i['suid']; - } - } - } - - if( !$suid AND $type=='frame' ) - { - $this->template_bits_list(); - } - - $row = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_templates', 'where' => 'suid='.$suid ) ); - - if ( $row['set_id'] == 1 ) - { - $this->ipsclass->admin->error("Вы не можете удалить шаблона из главного стиля."); - } - - $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_templates', 'where' => 'suid='.$suid ) ); - - //----------------------------------------- - // Rebuild the PHP file - //----------------------------------------- - - $this->ipsclass->cache_func->_recache_templates( $this->ipsclass->input['id'], $this->ipsclass->input['p'], $row['group_name'] ); - - //----------------------------------------- - // Reload template list or redirect? - //----------------------------------------- - - if ( $type == 'xml' ) - { - @header( "Content-Type: text/html; charset={$this->ipsclass->vars['gb_char_set']}" ); - print "done"; - exit(); - } - else if ( $type == 'frame' ) - { - $this->template_bits_list(); - } - else - { - $this->ipsclass->admin->redirect( "{$this->ipsclass->form_code}&code=edit&id={$row['set_id']}&p={$this->ipsclass->input['p']}&group_name={$row['group_name']}&#{$row['group_name']}", "Шаблон(ы) возвращены к «оригинальному» состоянию, возвращение к окну выбора шаблона" ); - } - } - - //==================================================================================================================== - // OLD - DEPRECIATED - //==================================================================================================================== - - - - - -} - - + $Date: 2007-06-29 15:38:25 -0400 (Fri, 29 Jun 2007) $ +| > $Revision: 1078 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > Skin -> Templates functions +| > Module written by Matt Mecham +| > Date started: 15th April 2002 +| +| > Module Version Number: 1.0.0 +| > DBA Checked: Tue 25th May 2004 ++-------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class ad_skin_template_bits +{ + var $base_url; + var $template = ""; + var $functions = ""; + + var $search_bits; + + /** + * Section title name + * + * @var string + */ + var $perm_main = "lookandfeel"; + + /** + * Section title name + * + * @var string + */ + var $perm_child = "templ"; + + /** + * Search template bits + * + * var array + */ + + function auto_run() + { + //----------------------------------------- + // Get the libraries + //----------------------------------------- + + $this->template =& $this->ipsclass->cache_func->template; + + //----------------------------------------- + // LOAD HTML + //----------------------------------------- + + $this->html = $this->ipsclass->acp_load_template('cp_skin_lookandfeel'); + + //----------------------------------------- + + require_once( ROOT_PATH.'sources/lib/admin_template_functions.php' ); + + $this->functions = new admin_template_functions(); + $this->functions->ipsclass =& $this->ipsclass; + + //----------------------------------------- + + $this->unaltered = "- "; + $this->altered = "+ "; + $this->inherited = "| "; + + //----------------------------------------- + + switch($this->ipsclass->input['code']) + { + case 'template-sections-list': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->template_sections_list(); + break; + + case 'template-bits-list': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->template_bits_list(); + break; + + case 'template-edit-bit-complete': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->template_edit_bit_complete(); + break; + + case 'template_remove_bit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); + $this->template_revert_bit(); + break; + + case 'template-edit-bit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->template_edit_bit(); + break; + + case 'floateditor': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); + $this->functions->build_editor_area_floated(); + break; + + case 'addbit': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); + $this->add_bit(); + break; + + case 'doadd': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); + $this->do_add_bit(); + break; + + default: + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->template_sections_list(); + break; + } + } + + //----------------------------------------- + // Show template bits for a group + //----------------------------------------- + + function template_bits_list( $type='' ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $groups = array(); + $group_bits = array(); + $content = ""; + $master_names = array(); + $group_name = trim( $this->ipsclass->input['group_name'] ); + $id = intval( $this->ipsclass->input['id'] ); + $p = intval( $this->ipsclass->input['p'] ); + $type = $type != '' ? $type : ( isset($this->ipsclass->input['type']) ? trim( $this->ipsclass->input['type'] ) : '' ); + $linked_bits = array(); + + //----------------------------------------- + // Get $skin_names stuff + //----------------------------------------- + + require_once( ROOT_PATH.'sources/lib/skin_info.php' ); + + //----------------------------------------- + // Get skin set + //----------------------------------------- + + $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => "set_skin_set_id=".$id ) ); + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( ! $id ) + { + $this->ipsclass->admin->error("You must specify an existing template set ID, go back and try again"); + } + + //----------------------------------------- + // Parent? + //----------------------------------------- + + if ( ! $p ) + { + if ( $this_set['set_skin_set_parent'] ) + { + $p = $this_set['set_skin_set_parent']; + } + } + + if ( $p > 0 ) + { + $in = ','.$p; + } + + //----------------------------------------- + // Get template bits master names.. + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 'func_name', 'from' => 'skin_templates', 'where' => "group_name='{$group_name}' AND set_id=1" ) ); + $this->ipsclass->DB->simple_exec(); + + //----------------------------------------- + // Compile... + //----------------------------------------- + + while ( $m = $this->ipsclass->DB->fetch_row() ) + { + $master_names[ $m['func_name'] ] = $m['func_name']; + } + + $group['easy_name'] = $skin_names[ $group_name ][0]; + $group['group_name'] = $group_name; + + //----------------------------------------- + // Get linked bits + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => '*', + 'from' => 'skin_template_links', + 'where' => "link_set_id IN( 1, " . $id . ") AND link_used_in='". $group_name ."'" ) ); + + $this->ipsclass->DB->exec_query(); + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + $linked_bits[ $row['link_template_name'] ] = $row['link_template_name']; + } + + //----------------------------------------- + // Get group bits + //----------------------------------------- + + $group_bits = $this->ipsclass->cache_func->_get_templates($id, $p, 'groups', $group_name ); + + $add_button = ""; + + //----------------------------------------- + // Add to HTML + //----------------------------------------- + + $temp = ""; + $sec_arry = array(); + + //----------------------------------------- + // Stuff array to sort on name + //----------------------------------------- + + foreach( $group_bits as $i ) + { + //----------------------------------------- + // Linked bit? + //----------------------------------------- + + if ( in_array( $i['func_name'], $linked_bits ) ) + { + continue; + } + + $sec_arry[ $i['suid'] ] = $i; + $sec_arry[ $i['suid'] ]['easy_name'] = $i['func_name']; + } + + //----------------------------------------- + // Sort by easy_name + //----------------------------------------- + + usort($sec_arry, array( 'ad_skin_template_bits', 'perly_alpha_sort' ) ); + + //----------------------------------------- + // Loop and print main display + //----------------------------------------- + + foreach( $sec_arry as $sec ) + { + $custom_bit = ""; + + $sec['_p'] = intval( $p ); + $sec['_id'] = intval( $this->ipsclass->input['id'] ); + + //----------------------------------------- + // Altered? + //----------------------------------------- + + if ( $sec['set_id'] == $id ) + { + $altered_image = $this->html->template_bits_bit_row_image( $sec['suid'], 'skin_item_altered.gif' ); + } + else if ( $sec['set_id'] == 1 ) + { + $altered_image = $this->html->template_bits_bit_row_image( $sec['suid'], 'skin_item_unaltered.gif' ); + } + else + { + $altered_image = $this->html->template_bits_bit_row_image( $sec['suid'], 'skin_item_inherited.gif' ); + } + + $remove_button = "ipsclass->base_url}&{$this->ipsclass->form_code}&code=template_remove_bit&bitname={$sec['func_name']}&id={$this->ipsclass->input['id']}&p={$this->ipsclass->input['p']}&group_name={$sec['group_name']}&type=frame')\"> "; + + if ( $sec['set_id'] == $id ) + { + if ( $master_names[ $sec['func_name'] ] ) + { + $remove_button = "ipsclass->base_url}&{$this->ipsclass->form_code}&code=template_remove_bit&bitname={$sec['func_name']}&id={$this->ipsclass->input['id']}&p={$this->ipsclass->input['p']}&group_name={$sec['group_name']}&type=frame')\">X "; + } + else + { + $custom_bit = ' (custom bit)'; + $remove_button = "ipsclass->base_url}&{$this->ipsclass->form_code}&code=template_remove_bit&bitname={$sec['func_name']}&id={$this->ipsclass->input['id']}&p={$this->ipsclass->input['p']}&group_name={$sec['group_name']}&type=frame&custombit=1')\">X "; + } + } + + $content .= $this->html->template_bits_bit_row( $sec, $custom_bit, $remove_button, $altered_image ); + } + + //----------------------------------------- + // Just showing the XML? + //----------------------------------------- + + if ( $type == 'xml' ) + { + @header("Content-Type: text/plain"); + print $content; + exit(); + } + else + { + $this->ipsclass->html = $this->html->template_bits_bit_overview( $group, $content, $add_button ); + + $this->ipsclass->admin->print_popup(); + } + } + + //----------------------------------------- + // Show template groups/categories + //----------------------------------------- + + function template_sections_list() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $groups = array(); + $group_bits = array(); + $content = ""; + $javascript = ''; + $js_groups = ''; + $js_bits = ''; + $js_matches = ''; + + $this->ipsclass->input['id'] = intval( $this->ipsclass->input['id'] ); + $this->ipsclass->input['p'] = intval( $this->ipsclass->input['p'] ); + + //----------------------------------------- + // Get $skin_names stuff + //----------------------------------------- + + require_once( ROOT_PATH.'sources/lib/skin_info.php' ); + + //----------------------------------------- + // Get skin set + //----------------------------------------- + + $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => "set_skin_set_id=".$this->ipsclass->input['id'] ) ); + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( $this->ipsclass->input['id'] == "") + { + $this->ipsclass->admin->error("You must specify an existing template set ID, go back and try again"); + } + + //----------------------------------------- + // Parent? + //----------------------------------------- + + if ( ! $this->ipsclass->input['p'] ) + { + if ( $this_set['set_skin_set_parent'] ) + { + $this->ipsclass->input['p'] = $this_set['set_skin_set_parent']; + } + } + + if ( $this->ipsclass->input['p'] > 0 ) + { + $in = ','.$this->ipsclass->input['p']; + } + + $this->ipsclass->admin->page_detail = "Please choose which section you wish to edit below."; + $this->ipsclass->admin->page_title = "Edit Template sets"; + + //----------------------------------------- + // Generate inline JS + //----------------------------------------- + + if ( is_array( $this->search_bits ) and count( $this->search_bits ) ) + { + foreach( $this->search_bits as $group => $idx ) + { + $js_matches .= "\t'$group' : ". count( $this->search_bits[ $group ] ).",\n"; + $js_groups .= "\t'$group' : 1,\n"; + + foreach( $this->search_bits[ $group ] as $data ) + { + $js_bits .= "\t'{$group}_{$data['func_name']}' : 1,\n"; + } + } + + //----------------------------------------- + // Trim off trailing commas + //----------------------------------------- + + $js_matches = preg_replace( "#,\n?$#", "", $js_matches ); + $js_groups = preg_replace( "#,\n?$#", "", $js_groups ); + $js_bits = preg_replace( "#,\n?$#", "", $js_bits ); + + $javascript = "var template_search = 1;\n". + "var search_template_sections = {\n". $js_groups ."\n};\n". + "var search_template_bits = {\n" . $js_bits ."\n};\n". + "var search_template_matches = {\n" . $js_matches."\n};\n"; + + } + else + { + $javascript = "var template_search = 0;\nvar search_template_sections = {};\nvar search_template_bits = {};\nvar search_template_matches = {};\n"; + } + + //----------------------------------------- + // Get the groups... + //----------------------------------------- + + $group_titles = $this->ipsclass->cache_func->_get_templates($this->ipsclass->input['id'], $this->ipsclass->input['p'], 'groups'); + + foreach( $group_titles as $g ) + { + //----------------------------------------- + // Fix up names + //----------------------------------------- + + $g['easy_name'] = "".$g['group_name'].""; + $g['easy_desc'] = ""; + + //----------------------------------------- + // If available, change group name to easy name + //----------------------------------------- + + if ( isset($skin_names[ $g['group_name'] ]) ) + { + $g['easy_name'] = "".$skin_names[ $g['group_name'] ][0].""; + $g['easy_desc'] = str_replace( '"', '"', $skin_names[ $g['group_name'] ][1] ); + } + else + { + $g['easy_name'] = "".$g['group_name']." (Non-Default Group)"; + $g['easy_desc'] = "This group is not part of the standard Invision Power Board installation and no description is available"; + } + + if ( isset($skin_names[ $g['group_name'] ][2]) ) + { + $g['easy_preview'] = "ipsclass->vars['php_ext']}?{$skin_names[ $g['group_name'] ][2]}' target='_blank'>Preview"; + } + else + { + $g['easy_preview'] = "No preview available"; + } + + $groups[] = $g; + } + + //----------------------------------------- + // Sort by easy_name + //----------------------------------------- + + usort($groups, array( 'ad_skin_template_bits', 'perly_alpha_sort' ) ); + + //----------------------------------------- + // Loop and print + //----------------------------------------- + + foreach( $groups as $group ) + { + $eid = $group['suid']; + $exp_content = ""; + + $this->ipsclass->cache_func->template_count[$this->ipsclass->input['p']][ $group['group_name'] ]['count'] = + isset($this->ipsclass->cache_func->template_count[$this->ipsclass->input['p']][ $group['group_name'] ]['count']) ? + $this->ipsclass->cache_func->template_count[$this->ipsclass->input['p']][ $group['group_name'] ]['count'] : 0; + + $this->ipsclass->cache_func->template_count[$this->ipsclass->input['id']][ $group['group_name'] ]['count'] = + isset($this->ipsclass->cache_func->template_count[$this->ipsclass->input['id']][ $group['group_name'] ]['count']) ? + $this->ipsclass->cache_func->template_count[$this->ipsclass->input['id']][ $group['group_name'] ]['count'] : 0; + + $altered = sprintf( '%02d', intval($this->ipsclass->cache_func->template_count[$this->ipsclass->input['id']][ $group['group_name'] ]['count']) ); + $original = sprintf( '%02d', intval($this->ipsclass->cache_func->template_count[1][ $group['group_name'] ]['count']) ); + $inherited = sprintf( '%02d', intval($this->ipsclass->cache_func->template_count[$this->ipsclass->input['p']][ $group['group_name'] ]['count']) ); + $count_string = ""; + + if ( $this->ipsclass->input['p'] > 0 ) + { + $count_string = "$original {$this->unaltered} $inherited {$this->inherited} $altered {$this->altered}"; + } + else + { + $count_string = "$original {$this->unaltered} $altered {$this->altered}"; + } + + //----------------------------------------- + // Folder blob + //----------------------------------------- + + if ( $altered > 0 ) + { + $folder_blob = $this->altered; + } + else if ( $this->ipsclass->input['p'] > 0 and $inherited > 0 ) + { + $folder_blob = $this->inherited; + } + else + { + $folder_blob = $this->unaltered; + } + + $group['_p'] = intval( $this->ipsclass->input['p'] ); + $group['_id'] = intval( $this->ipsclass->input['id'] ); + + //----------------------------------------- + // Print normal rows + //----------------------------------------- + + $content .= $this->html->template_bits_overview_row_normal( $group, $folder_blob, $count_string ); + } + + $this->ipsclass->html .= $this->html->template_bits_overview( $content, $javascript ); + + $this->ipsclass->html .= $this->ipsclass->adskin->skin_jump_menu_wrap(); + + $this->ipsclass->admin->nav[] = array( 'section='.$this->ipsclass->section_code.'&act=sets' ,'Skin Manager Home' ); + $this->ipsclass->admin->nav[] = array( '' ,'Managing Template Set "'.$this_set['set_name'].'"' ); + + $this->ipsclass->admin->output(); + } + + //----------------------------------------- + // Sneaky sorting. + // We use the format "1: name". without this hack + // 1: name, 2: other name, 11: other name + // will sort as 1: name, 11: other name, 2: other name + // There is natsort and such in PHP, but it causes some + // problems on older PHP installs, this is hackish but works + // by simply adding '0' to a number less than 2 characters long. + // of course, this won't work with three numerics in the hundreds + // but we don't have to worry about more that 99 bits in a template + // at this stage. + //----------------------------------------- + + function perly_word_sort($a, $b) + { + $nat_a = intval( $a['easy_name'] ); + $nat_b = intval( $b['easy_name'] ); + + if (strlen($nat_a) < 2) + { + $nat_a = '0'.$nat_a; + } + if (strlen($nat_b) < 2) + { + $nat_b = '0'.$nat_b; + } + + return strcmp($nat_a, $nat_b); + } + + //----------------------------------------- + // Sort by group name + //----------------------------------------- + + function perly_alpha_sort($a, $b) + { + return strcmp( strtolower($a['easy_name']), strtolower($b['easy_name']) ); + } + + + //----------------------------------------- + // ADD TEMPLATE BIT + //----------------------------------------- + + function add_bit() + { + $this->ipsclass->admin->page_detail = "You may add a template bit using this section."; + $this->ipsclass->admin->page_title = "Template Editing"; + + $groupname = $this->ipsclass->input['expand']; + + $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => "set_skin_set_id=".intval($this->ipsclass->input['id']) ) ); + + //----------------------------------------- + // Sort out group titles + //----------------------------------------- + + $group_titles = $this->ipsclass->cache_func->_get_templates( $this->ipsclass->input['id'], $this->ipsclass->input['p'], 'groups' ); + + $formatted_groups = array(); + + foreach ( $group_titles as $d ) + { + $formatted_groups[] = array( $d['group_name'], $d['group_name'] ); + } + + //----------------------------------------- + // Good form old boy + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doadd' ), + 2 => array( 'act' , 'templ' ), + 3 => array( 'id' , $this->ipsclass->input['id'] ), + 4 => array( 'p' , $this->ipsclass->input['p'] ), + 5 => array( 'expand', $this->ipsclass->input['expand'] ), + 6 => array( 'section', $this->ipsclass->section_code ), + ) , "theform" ); + + //----------------------------------------- + // Editor prefs strip + //----------------------------------------- + + + + $options .= "
    New Template Bit Specifics
    +
    + + + + + + + + + + + + + + + + + +
    New Template Bit Name
    Alphanumerics and underscores only, no spaces.
    ".$this->ipsclass->adskin->form_input('func_name', $this->ipsclass->txt_stripslashes($_POST['func_name']))."
    New Template Bit Incoming Data Variables
    Define the variables passed to this template bit.
    ".$this->ipsclass->adskin->form_input('func_data', str_replace( "'", ''', $this->ipsclass->txt_stripslashes($_POST['func_data']) ) )."
    New Template Bit Group...".$this->ipsclass->adskin->form_dropdown('group_name', $formatted_groups, $this->ipsclass->input['group_name'] ? $this->ipsclass->input['group_name'] : $this->ipsclass->input['expand'] )."
    Or Create New Group...
    Leave empty to use above group. Alphanumerics and underscores only, no spaces
    skin_".$this->ipsclass->adskin->form_input('new_group_name', $this->ipsclass->txt_stripslashes($_POST['new_group_name']))."
    +
    +
    + "; + + $this->ipsclass->html .= $options; + + $this->ipsclass->admin->print_popup(); + } + + /*-------------------------------------------------------------------------*/ + // DO ADD NEW BIT + /*-------------------------------------------------------------------------*/ + + function do_add_bit() + { + //----------------------------------------- + // Check incoming + //----------------------------------------- + + $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => "set_skin_set_id=".intval($this->ipsclass->input['id']) ) ); + + if ( $_POST['new_group_name'] ) + { + if ( preg_match( "#[^\w_]#s", $_POST['new_group_name'] ) ) + { + $this->ipsclass->main_msg = 'The new template bit group name must only contain alphanumerics and underscores.'; + $this->add_bit(); + } + } + + if ( ! $_POST['func_name'] ) + { + $this->ipsclass->main_msg = 'The new template bit name cannot be empty.'; + $this->add_bit(); + } + else + { + if ( preg_match( "#[^\w_]#s", $_POST['func_name'] ) ) + { + $this->ipsclass->main_msg = 'The new template bit name must only contain alphanumerics and underscores.'; + $this->add_bit(); + } + } + + + $new_group_name = strtolower(str_replace( 'skin_', '', trim($this->ipsclass->input['new_group_name']) )); + $func_name = strtolower(trim($this->ipsclass->input['func_name'])); + $group_name = $new_group_name ? 'skin_'.$new_group_name : $this->ipsclass->input['group_name']; + $func_data = preg_replace( "#,$#", "", str_replace( ''', "'", trim($this->ipsclass->txt_stripslashes($_POST['func_data'])) ) ); + $text = ''; + + //----------------------------------------- + // Is parent master template set? + //----------------------------------------- + + if( $this_set['set_skin_set_parent'] == "-1" ) + { + $parent_set = "1"; + } + else + { + $parent_set = $this_set['set_skin_set_parent']; + } + + //----------------------------------------- + // Make sure bit doesn't exist + //----------------------------------------- + + if ( $row = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'suid', 'from' => 'skin_templates', 'where' => "(set_id=".intval($this->ipsclass->input['id'])." OR set_id='{$parent_set}') AND group_name='$group_name' AND func_name='$func_name'" ) ) ) + { + $this->ipsclass->main_msg = "The new template bit '$func_name' already exists in group '$group_name'."; + $this->add_bit(); + } + + //----------------------------------------- + // Make sure it's not called "end" + //----------------------------------------- + + if ( strtolower($func_name) == 'end' ) + { + $this->ipsclass->main_msg = "You cannot name a template bit 'end'"; + $this->add_bit(); + } + + //----------------------------------------- + // INSERT NEW BIT + //----------------------------------------- + + $this->ipsclass->DB->do_insert( 'skin_templates', array ( + 'set_id' => intval($this->ipsclass->input['id']), + 'group_name' => $group_name, + 'section_content' => $text, + 'func_name' => $func_name, + 'func_data' => $func_data, + 'updated' => time(), + ) ); + + $new_id = $this->ipsclass->DB->get_insert_id(); + + //----------------------------------------- + // Rebuild the PHP file + //----------------------------------------- + + $this->ipsclass->cache_func->_recache_templates( $this->ipsclass->input['id'], $this->ipsclass->input['p'] ); + + //----------------------------------------- + // Back we go... + //----------------------------------------- + + $this->ipsclass->input[ 'cb_'.$new_id ] = 1; + $this->ipsclass->input[ 'suid' ] = $new_id; + $this->ipsclass->input['type'] = 'single'; + $this->template_edit_bit( $reload=1 ); + } + + /*-------------------------------------------------------------------------*/ + // EDIT TEMPLATE BIT + /*-------------------------------------------------------------------------*/ + + function template_edit_bit( $reload=0 ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $suid = isset($this->ipsclass->input['suid']) ? intval( $this->ipsclass->input['suid'] ) : 0; + $type = isset($this->ipsclass->input['type']) ? trim( $this->ipsclass->input['type'] ) : ''; + $id = isset($this->ipsclass->input['id']) ? intval( $this->ipsclass->input['id'] ) : 0; + $p = isset($this->ipsclass->input['p']) ? intval( $this->ipsclass->input['p'] ) : 0; + $bitname = isset($this->ipsclass->input['bitname']) ? $this->ipsclass->input['bitname'] : ''; + $group_name = isset($this->ipsclass->input['group_name']) ? trim( $this->ipsclass->input['group_name'] ) : ''; + + $template_bit_ids = array(); + $ids = array(); + + //----------------------------------------- + // PAGE HEADER + //----------------------------------------- + + $this->ipsclass->admin->page_detail = "You may edit the HTML of this template."; + $this->ipsclass->admin->page_title = "Template Editing"; + + //----------------------------------------- + // Get $skin_names stuff + //----------------------------------------- + + require ROOT_PATH.'sources/lib/skin_info.php'; + + $this->functions->type = $type; + + //----------------------------------------- + // Group bits + //----------------------------------------- + + $group_bits = $this->ipsclass->cache_func->_get_templates($id, $p, 'groups', $group_name ); + + //----------------------------------------- + // Check for valid input... + //----------------------------------------- + + if ( $type == 'single' ) + { + if ( $suid == "" ) + { + //----------------------------------------- + // Grab relevant SUID based on IDs + //----------------------------------------- + + if ( $bitname == "" ) + { + $this->ipsclass->admin->error("You must specify an existing template set ID, go back and try again"); + } + + foreach( $group_bits as $i ) + { + if ( $bitname == $i['func_name'] ) + { + $suid = $i['suid']; + } + } + } + + $ids[] = $suid; + } + else + { + //----------------------------------------- + // Bit names? + //----------------------------------------- + + if ( $bitname ) + { + foreach( explode( '|', $bitname ) as $name ) + { + foreach( $group_bits as $i ) + { + if ( $name == $i['func_name'] ) + { + $ids[] = $i['suid']; + } + } + } + } + else + { + foreach ( $this->ipsclass->input as $key => $value ) + { + if ( preg_match( "/^cb_(\d+)$/", $key, $match ) ) + { + if ($this->ipsclass->input[$match[0]]) + { + $ids[] = $match[1]; + } + } + } + } + } + + $ids = $this->ipsclass->clean_int_array( $ids ); + + if ( count($ids) < 1 ) + { + $this->ipsclass->admin->error("No ids selected, please go back and select some before submitting the form"); + } + + //----------------------------------------- + // Build form + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->js_template_tools(); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'template-edit-bit-complete' ), + 2 => array( 'act' , 'templ' ), + 3 => array( 'suid' , $suid ), + 4 => array( 'type' , $type ), + 5 => array( 'id' , $id ), + 6 => array( 'p' , $p ), + 7 => array( 'section' , $this->ipsclass->section_code ), + 8 => array( 'bitname' , $bitname ), + 9 => array( 'group_name', $group_name ), + ) , "theform", "", 'template-bits-form' ); + + + //----------------------------------------- + // Get template bits + //----------------------------------------- + + $sec_arry = array(); + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_templates', 'where' => "suid IN (".implode(",",$ids).")" ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $i = $this->ipsclass->DB->fetch_row() ) + { + $sec_arry[ $i['suid'] ] = $i; + $sec_arry[ $i['suid'] ]['easy_name'] = $i['func_name']; + + //----------------------------------------- + // If easy name is available, use it + //----------------------------------------- + + if ( isset($bit_names[ $i['group_name'] ][ $i['func_name'] ]) AND $bit_names[ $i['group_name'] ][ $i['func_name'] ] != "" ) + { + $sec_arry[ $i['suid'] ]['easy_name'] = $bit_names[ $i['group_name'] ][ $i['func_name'] ]; + } + } + + //----------------------------------------- + // Sort by easy_name + //----------------------------------------- + + usort($sec_arry, array( 'ad_skin_template_bits', 'perly_alpha_sort' ) ); + + //----------------------------------------- + // Editor prefs strip + //----------------------------------------- + + $this->ipsclass->html .= $this->functions->html_build_editor_top(); + + //----------------------------------------- + // Loop and print + //----------------------------------------- + + foreach( $sec_arry as $template ) + { + //----------------------------------------- + // Swop < and > into ascii entities + // to prevent textarea breaking html + //----------------------------------------- + + $setid = $template['set_id']; + $groupname = $template['group_name']; + + if ( !isset($this->ipsclass->input['error_raw_'.$template['suid']]) OR !$this->ipsclass->input['error_raw_'.$template['suid']] ) + { + $templ = $template['section_content']; + } + else + { + $templ = $this->ipsclass->input['error_raw_'.$template['suid']]; + } + + $templ = str_replace( "&" , "&" , $templ ); + $templ = str_replace( "<" , "<" , $templ ); + $templ = str_replace( ">" , ">" , $templ ); + $templ = str_replace( '\n', '\n', $templ ); + + //----------------------------------------- + // Altered? + //----------------------------------------- + + if ( $template['set_id'] == $id ) + { + $altered_image = $this->altered; + } + else if ( $template['set_id'] == 1 ) + { + $altered_image = $this->unaltered; + } + else + { + $altered_image = $this->inherited; + } + + $this->ipsclass->html .= $this->functions->build_editor_area( $templ, $template, $altered_image ); + + $template_bit_ids[] = "t{$template['suid']}"; + } + + $this->ipsclass->html .= $this->functions->html_build_editor_bottom() . ""; + + if ( $type != 'single' AND $type != 'multiple' ) + { + $formbuttons = "
    + + +
    \n"; + + $this->ipsclass->html = str_replace( '', $formbuttons, $this->ipsclass->html ); + } + + //----------------------------------------- + // Let the JS know which IDs to + // look for (clever, no?) + //----------------------------------------- + + $this->ipsclass->html = str_replace( "", implode(",",$template_bit_ids), $this->ipsclass->html ); + + //----------------------------------------- + // Find easy name for group + //----------------------------------------- + + $old_groupname = $groupname; + + if ( $skin_names[ $groupname ][0] != "" ) + { + $groupname = $skin_names[ $groupname ][0]; + } + + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code ,'Skin Manager Home' ); + $this->ipsclass->admin->nav[] = array( "{$this->ipsclass->form_code}&code=edit&id={$id}&groupname={$old_groupname}", $groupname ); + + //----------------------------------------- + // Force reload of template bits? + //----------------------------------------- + + if ( $reload ) + { + $this->ipsclass->html .= "\n"; + } + + //----------------------------------------- + // Type of output + //----------------------------------------- + + if ( $type != 'single' AND $type != 'multiple' ) + { + $this->ipsclass->html .= $this->ipsclass->adskin->skin_jump_menu_wrap(); + $this->ipsclass->admin->output(); + } + else + { + $this->ipsclass->admin->print_popup(); + } + } + + /*-------------------------------------------------------------------------*/ + // COMPLETE EDIT + /*-------------------------------------------------------------------------*/ + + function template_edit_bit_complete() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $ids = array(); + $cb_ids = array(); + $error_bits = array(); + $type = trim( $this->ipsclass->input['type'] ); + + $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); + $this->ipsclass->input['p'] = intval($this->ipsclass->input['p']); + + //----------------------------------------- + // CHECK FOR INPUT + //----------------------------------------- + + foreach ($this->ipsclass->input as $key => $value) + { + if ( preg_match( "/^txt(\d+)$/", $key, $match ) ) + { + if ( $this->ipsclass->input[ $match[0] ] ) + { + //----------------------------------------- + // If multiple - only save clicked bit + //----------------------------------------- + + $cb_ids[ $match[1] ] = 'cb_'.$match[1]; + + if ( $type == 'multiple' ) + { + if ( $this->ipsclass->input[ 'edited-'.$match[1] ] ) + { + $ids[] = $match[1]; + } + } + + //----------------------------------------- + // Not multiple - continue + //----------------------------------------- + + else + { + $ids[] = $match[1]; + } + } + } + } + + $ids = $this->ipsclass->clean_int_array( $ids ); + + if ( count($ids) < 1 ) + { + $this->ipsclass->main_msg = "Nothing to save"; + + foreach( $cb_ids as $cb ) + { + $this->ipsclass->input[ $cb ] = 1; + } + + $this->template_edit_bit(); + } + + $rebuild = array(); + + //----------------------------------------- + // Get the group name, etc + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_templates', 'where' => "suid IN (".implode(",",$ids).")" ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $template[ $r['suid'] ] = $r; + $real_name = $r['group_name']; + $rebuild[] = $r['group_name']; + + if( $r['group_names_secondary'] ) + { + $rebuild = array_merge( $rebuild, explode( ',', $this->ipsclass->clean_perm_string( $r['group_names_secondary'] ) ) ); + } + } + + //----------------------------------------- + // Process my bits :o + //----------------------------------------- + + foreach( $ids as $id ) + { + $text = $this->ipsclass->txt_stripslashes($_POST['txt'.$id]); + + //----------------------------------------- + // Sw(o|a)p back < & > + //----------------------------------------- + + $text = str_replace("<", "<", $text); + $text = str_replace(">", ">", $text); + $text = str_replace("&", "&", $text); + $text = str_replace( '\n', '\n',$text ); + //$text = str_replace( '\\n' , '\\\\\\n', $text ); + $text = str_replace( '../', '../' , $text ); + $text = str_replace( '\' , '\\',$text ); + + //----------------------------------------- + // Convert \r to nowt + //----------------------------------------- + + $text = str_replace("\r", "", $text); + + $func = preg_replace( "#,$#", "", str_replace( ''', "'", trim($this->ipsclass->txt_stripslashes($_POST['funcdata_'.$id])) ) ); + + //----------------------------------------- + // Test to ensure they are legal + // - catch warnings, etc + //----------------------------------------- + + ob_start(); + eval( $this->template->convert_html_to_php( $template[ $id ]['func_name'], $func, $text ) ); + $return = ob_get_contents(); + ob_end_clean(); + + if ( $return ) + { + $error_bits[] = $id; + continue; + } + + //----------------------------------------- + // Is this in our template id group? + //----------------------------------------- + + if ( $template[ $id ]['set_id'] == $this->ipsclass->input['id'] ) + { + //----------------------------------------- + // Okay, update... + //----------------------------------------- + + $this->ipsclass->DB->do_update( 'skin_templates', array( 'section_content' => $text, 'updated' => time(), 'func_data' => $func ), 'suid='.$id ); + } + else + { + //----------------------------------------- + // No? OK - best add it as a 'new' bit + //----------------------------------------- + + $this->ipsclass->DB->do_insert( 'skin_templates', array ( + 'set_id' => $this->ipsclass->input['id'], + 'group_name' => $template[ $id ]['group_name'], + 'section_content' => $text, + 'func_name' => $template[ $id ]['func_name'], + 'func_data' => $func, + 'updated' => time(), + 'group_names_secondary' => $template[ $id ]['group_names_secondary'], + ) ); + + if ( $this->ipsclass->input['type'] == 'single' ) + { + $this->ipsclass->input['suid'] = $this->ipsclass->DB->get_insert_id(); + } + else + { + $cb_ids[ $id ] = 'cb_'.$this->ipsclass->DB->get_insert_id(); + unset($this->ipsclass->input['cb_'.$id ]); + } + } + } + + //----------------------------------------- + // Rebuild the PHP file(?:s) + //----------------------------------------- + + foreach( $rebuild as $file_name ) + { + $this->ipsclass->cache_func->_recache_templates( $this->ipsclass->input['id'], $this->ipsclass->input['p'], $file_name ); + } + + //----------------------------------------- + // Back we go... + //----------------------------------------- + + if ( count( $error_bits ) ) + { + foreach( $error_bits as $id ) + { + $this->ipsclass->input['cb_'.$id ] = 1; + $this->ipsclass->input['error_raw_'.$id] = $this->ipsclass->txt_stripslashes($_POST['txt'.$id]); + $this->ipsclass->main_msg = "These template bits could not be saved because they cause an error when parsed. Please check the data including any HTML logic used and any input data variables."; + + $this->template_edit_bit(); + } + } + else + { + if ( ( $type != 'single' AND $type != 'multiple' ) AND ( ! $this->ipsclass->input['savereload'] ) ) + { + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code ,'Skin Manager Home' ); + $this->ipsclass->admin->redirect( "{$this->ipsclass->form_code}&code=template-edit-bit&id={$this->ipsclass->input['id']}&group_name={$real_name}", "Template bit(s) updated, returning to template selection screen" ); + } + else + { + //----------------------------------------- + // Reload edit window + //----------------------------------------- + + if( count($this->ipsclass->cache_func->messages) ) + { + array_pop($this->ipsclass->cache_func->messages); + + $this->ipsclass->cache_func->messages[] = "Template bit(s) saved to database"; + + $this->ipsclass->main_msg = implode( "
    ", $this->ipsclass->cache_func->messages ); + } + else + { + $this->ipsclass->main_msg = "Template bit(s) updated"; + } + + foreach( $cb_ids as $cb ) + { + $this->ipsclass->input[ $cb ] = 1; + } + + $this->template_edit_bit(); + } + } + } + + //----------------------------------------- + // REMOVE CUSTOMIZATION + //----------------------------------------- + + function template_revert_bit() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $suid = $this->ipsclass->input['suid']; + $type = $this->ipsclass->input['type']; + $bitname = $this->ipsclass->input['bitname']; + $group_name = trim( $this->ipsclass->input['group_name'] ); + $id = intval( $this->ipsclass->input['id'] ); + $p = intval( $this->ipsclass->input['p'] ); + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( ! $suid ) + { + if ( $bitname == "" ) + { + $this->ipsclass->admin->error("You must enter a corrent template bit ID"); + } + + $group_bits = $this->ipsclass->cache_func->_get_templates($id, $p, 'groups', $group_name ); + + foreach( $group_bits as $i ) + { + if ( $bitname == $i['func_name'] ) + { + $suid = $i['suid']; + } + } + } + + if( !$suid AND $type=='frame' ) + { + $this->template_bits_list(); + } + + $row = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_templates', 'where' => 'suid='.$suid ) ); + + if ( $row['set_id'] == 1 ) + { + $this->ipsclass->admin->error("You cannot remove a template bit from the master set."); + } + + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_templates', 'where' => 'suid='.$suid ) ); + + //----------------------------------------- + // Rebuild the PHP file + //----------------------------------------- + + $rebuild = array( $row['group_name'] ); + + if( $row['group_names_secondary'] ) + { + $rebuild = array_merge( $rebuild, explode( ',', $this->ipsclass->clean_perm_string( $row['group_names_secondary'] ) ) ); + } + + foreach( $rebuild as $file_name ) + { + $this->ipsclass->cache_func->_recache_templates( $this->ipsclass->input['id'], $this->ipsclass->input['p'], $file_name ); + } + + //----------------------------------------- + // Reload template list or redirect? + //----------------------------------------- + + if ( $type == 'xml' ) + { + @header( "Content-Type: text/html; charset={$this->ipsclass->vars['gb_char_set']}" ); + print "done"; + exit(); + } + else if ( $type == 'frame' ) + { + $this->template_bits_list(); + } + else + { + $this->ipsclass->admin->redirect( "{$this->ipsclass->form_code}&code=edit&id={$row['set_id']}&p={$this->ipsclass->input['p']}&group_name={$row['group_name']}&#{$row['group_name']}", "Template bit(s) reverted, returning to template selection screen" ); + } + } + + //==================================================================================================================== + // OLD - DEPRECIATED + //==================================================================================================================== + + + + + +} + + ?> \ No newline at end of file diff --git a/upload/sources/action_admin/skin_wrappers.php b/upload/sources/action_admin/skin_wrappers.php index 065a378e..1f65308d 100644 --- a/upload/sources/action_admin/skin_wrappers.php +++ b/upload/sources/action_admin/skin_wrappers.php @@ -2,22 +2,14 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +--------------------------------------------------------------------------- | > $Date: 2006-12-07 06:46:38 -0500 (Thu, 07 Dec 2006) $ | > $Revision: 777 $ @@ -35,7 +27,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -51,25 +43,25 @@ class ad_skin_wrappers { * @var string */ var $perm_main = "lookandfeel"; - + /** * Section title name * * @var string */ var $perm_child = "wrap"; - + function auto_run() { //----------------------------------------- // Get the libraries //----------------------------------------- - + require_once( ROOT_PATH.'sources/lib/admin_template_functions.php' ); - + $this->functions = new admin_template_functions(); $this->functions->ipsclass =& $this->ipsclass; - + //----------------------------------------- switch($this->ipsclass->input['code']) @@ -78,24 +70,24 @@ class ad_skin_wrappers { $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->functions->build_editor_area_floated(1); break; - + case 'edit': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->do_form('edit'); break; - + case 'doedit': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->save_wrapper('edit'); break; - + case 'export': $this->export(); - + default: print "No action chosen"; exit(); break; - + //case 'wrapper': // $this->list_wrappers(); // break; @@ -109,117 +101,117 @@ class ad_skin_wrappers { // $this->remove(); // break; } - + } - - + + //----------------------------------------- // ADD / EDIT WRAPPERS //----------------------------------------- - + function save_wrapper( $type='add' ) { //----------------------------------------- // INIT //----------------------------------------- - + $id = intval( $this->ipsclass->input['id'] ); - + //----------------------------------------- // Type? //----------------------------------------- - + if ($type == 'edit') { if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Вы должны выбрать ID существующего общего шаблона, вернитесь назад и попробуйте снова"); + $this->ipsclass->admin->error("You must specify an existing wrapper ID, go back and try again"); } } - + if ($this->ipsclass->input['txtwrapper'] == "") { - $this->ipsclass->admin->error("У вас не может быть пустого шаблона"); + $this->ipsclass->admin->error("You can't have an empty template, can you?"); } - + $tmpl = $this->ipsclass->admin->form_to_text( $this->ipsclass->txt_stripslashes($_POST['txtwrapper']) ); $tmpl = str_replace( '../', '../' , $tmpl ); - + if ( ! preg_match( "/<% BOARD %>/", $tmpl ) ) { - $this->ipsclass->admin->error("Вы не можете удалить <% BOARD %> !"); + $this->ipsclass->admin->error("You cannot remove the <% BOARD %> tag silly!"); } - + if ( ! preg_match( "/<% COPYRIGHT %>/", $tmpl ) ) { - $this->ipsclass->admin->error("Вы не можете удалить <% COPYRIGHT %> !"); + $this->ipsclass->admin->error("You cannot remove the <% COPYRIGHT %> tag silly!"); } - + $this->ipsclass->DB->do_update( 'skin_sets', array( 'set_wrapper' => $tmpl ), 'set_skin_set_id='.$id ); - + $this->ipsclass->cache_func->_recache_wrapper( $this->ipsclass->input['id'] ); - + //----------------------------------------- // Done //----------------------------------------- - + if ( ! $this->ipsclass->input['savereload'] ) { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code ,'Управление стилями' ); - $this->ipsclass->main_msg = "Общий шаблон форума обновлен"; - $this->ipsclass->admin->done_screen("Общий шаблон форум обновлен", "Управление стилями", 'section='.$this->ipsclass->section_code.'&act=sets', "redirect" ); + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code ,'Skin Manager Home' ); + $this->ipsclass->main_msg = "Board Header and Footer Wrapper Updated"; + $this->ipsclass->admin->done_screen("Board Header and Footer Wrapper Updated", "Skin Manager Home", 'section='.$this->ipsclass->section_code.'&act=sets', "redirect" ); } else { //----------------------------------------- // Reload edit window //----------------------------------------- - - $this->ipsclass->main_msg = "Общий шаблон форума обновлен"; + + $this->ipsclass->main_msg = "Board Header and Footer Wrapper updated"; $this->do_form('edit'); } - + } - + //----------------------------------------- // FORM //----------------------------------------- - + function do_form( $type='add' ) { //----------------------------------------- // Check input //----------------------------------------- - + if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Вы должны выбрать ID существующего общего шаблона, вернитесь назад и попробуйте снова"); + $this->ipsclass->admin->error("You must specify an existing skin set ID, go back and try again"); } - + //----------------------------------------- // check tree... //----------------------------------------- - + $found_id = ""; $found_content = ""; $this_set = ""; - + if ( $this->ipsclass->input['p'] > 0 ) { $in = ','.intval($this->ipsclass->input['p']); } - + //----------------------------------------- // Query //----------------------------------------- - + $this->ipsclass->DB->cache_add_query( 'stylesheets_do_form_concat', array( 'id' => intval($this->ipsclass->input['id']), 'parent' => $in ) ); $this->ipsclass->DB->cache_exec_query(); - + //----------------------------------------- // check tree... //----------------------------------------- - + while( $row = $this->ipsclass->DB->fetch_row() ) { if ( $row['set_wrapper'] and ! $found_id ) @@ -227,81 +219,82 @@ class ad_skin_wrappers { $found_id = $row['set_skin_set_id']; $found_content = $row['set_wrapper']; } - + if ( $this->ipsclass->input['id'] == $row['set_skin_set_id'] ) { $this_set = $row; } } - + if ($type == 'add') { $code = 'doadd'; - $button = 'Создать общий шаблон'; + $button = 'Create Wrapper'; } else { $code = 'doedit'; - $button = 'Сохранить общий шаблон'; + $button = 'Save Wrapper'; } - + //----------------------------------------- // Header //----------------------------------------- - - $this->ipsclass->admin->page_detail = "Вы можете использовать HTML во время добавления или изменения общего шаблона."; - $this->ipsclass->admin->page_title = "Изменение общего шаблона форума"; - + + $this->ipsclass->admin->page_detail = "You may use HTML fully when adding or editing wrappers."; + $this->ipsclass->admin->page_title = "Editing Board Header and Footer Wrapper"; + if ( $found_id == 1 ) { - $this->ipsclass->admin->page_detail .= "
    Это копия основного общего шаблона, изменения в форме ниже будут скопированы, как новый общий шаблон форума для выбранного шаблона."; + $this->ipsclass->admin->page_detail .= "
    This is a copy of the master wrapper, editing it below will copy the changes to a new wrapper unique to this skin set and any children of this set + will inherit this wrapper"; } - + //----------------------------------------- // Start form //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , $code ), 2 => array( 'act' , 'wrap' ), 3 => array( 'id' , $this->ipsclass->input['id'] ), 4 => array( 'fid' , $found_id ), 5 => array( 'section', $this->ipsclass->section_code ), ), "theform" ); - + //----------------------------------------- // Stop /textarea murdering layout //----------------------------------------- - + $found_content = $this->ipsclass->admin->text_to_form( $found_content ); - + //----------------------------------------- // Editor section //----------------------------------------- - + $this->ipsclass->html .= $this->functions->build_generic_editor_area( array( 'section' => $this->ipsclass->section_code, 'act' => 'wrap', 'title' => '', 'textareaname' => 'wrapper', 'textareainput' => $found_content ) ); - + $formbuttons = "
    - +
    \n"; - + $this->ipsclass->html = str_replace( '', $formbuttons, $this->ipsclass->html ); - - + + $this->ipsclass->html .= $this->ipsclass->adskin->skin_jump_menu_wrap(); - + //----------------------------------------- // Output //----------------------------------------- - - $this->ipsclass->admin->nav[] = array( 'section='.$this->ipsclass->section_code.'&act=sets' ,'Управление шаблонами' ); - $this->ipsclass->admin->nav[] = array( '' ,'Изменение общего шаблона форума '.$this_set['set_name'] ); - + + $this->ipsclass->admin->nav[] = array( 'section='.$this->ipsclass->section_code.'&act=sets' ,'Skin Manager Home' ); + $this->ipsclass->admin->nav[] = array( '' ,'Editing Board Wrapper in set '.$this_set['set_name'] ); + $this->ipsclass->admin->output(); } - - - + + + } diff --git a/upload/sources/action_admin/skintools.php b/upload/sources/action_admin/skintools.php index d22973fe..e14f166e 100644 --- a/upload/sources/action_admin/skintools.php +++ b/upload/sources/action_admin/skintools.php @@ -2,26 +2,18 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ +| > $Date: 2008-03-28 18:08:02 -0400 (Fri, 28 Mar 2008) $ +| > $Revision: 1232 $ +| > $Author: bfarber $ +--------------------------------------------------------------------------- | | > Skin Tools @@ -35,7 +27,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -47,14 +39,14 @@ class ad_skintools { var $skin_id = ""; var $ff_fixes = array(); var $log = array(); - + /** * Section title name * * @var string */ var $perm_main = "lookandfeel"; - + /** * Section title name * @@ -65,9 +57,9 @@ class ad_skintools { function auto_run() { - $this->ipsclass->admin->page_detail = "Пожалуйста, перед использованием инструментов внимательно ознакомьтесь с их описанием.
    Эти инструменты рекомендуется использовать, например, после обновления форума с более ранних версий."; - $this->ipsclass->admin->page_title = "Инструменты стилей"; - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Инструменты стилей' ); + $this->ipsclass->admin->page_detail = "Please read the instructions for each tool carefully."; + $this->ipsclass->admin->page_title = "Skin Set Tools"; + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Skin Tools' ); //----------------------------------------- @@ -77,61 +69,61 @@ class ad_skintools { $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recache' ); $this->rebuildcaches(); break; - + case 'rewritemastercache': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recache' ); $this->rewrite_master_cache(); break; - + case 'rebuildmastermacros': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recache' ); $this->rewrite_master_macros(); break; - + case 'rebuildmaster': $this->rebuildmaster(); break; - + case 'rebuildmasterhtml': $this->rebuildmaster_html(); break; - + case 'rebuildmastercomponents': $this->rebuildmaster_components(); break; - + case 'changemember': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':changemember' ); $this->change_member(); break; - + case 'changeforum': $this->change_forum(); - break; - + break; + //----------------------------------------- // Search stuff //----------------------------------------- - + case 'searchsplash': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':search' ); $this->searchreplace_start(); break; - + case 'simplesearch': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':search' ); $this->simple_search(); break; - + case 'searchandreplace': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':search' ); $this->search_and_replace(); break; - + //----------------------------------------- // Search stuff //----------------------------------------- - + case 'easylogo': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->easy_logo_start(); @@ -146,110 +138,109 @@ class ad_skintools { break; } } - + //----------------------------------------- // REBUILD MASTER MACROS //----------------------------------------- - + function rewrite_master_macros() { //----------------------------------------- // INIT //----------------------------------------- - + $file = ROOT_PATH . 'resources/macro.xml'; $macros = array(); $updated = 0; $inserted = 0; - + //----------------------------------------- // CHECK //----------------------------------------- - + if ( ! file_exists( $file ) ) { - $this->ipsclass->main_msg = "Файл «{$file}» не найден — запуск инструмента невозможен."; + $this->ipsclass->main_msg = "$file could not be found. Please check, upload or try again"; $this->show_intro(); } - + //----------------------------------------- // Get current macros //----------------------------------------- - + $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'skin_macro', 'where' => 'macro_set=1' ) ); - + $this->ipsclass->DB->exec_query(); - + while( $row = $this->ipsclass->DB->fetch_row() ) { $macros[ $row['macro_value'] ] = $row['macro_replace']; } - + //----------------------------------------- // Get XML //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); - - $xml = new class_xml(); - + + $xml = new class_xml(); + //----------------------------------------- // Get XML file //----------------------------------------- - + $skin_content = implode( "", file($file) ); - + //----------------------------------------- // Unpack the datafile (TEMPLATES) //----------------------------------------- - - $xml->lite_parser = 1; + $xml->xml_parse_document( $skin_content ); - + //----------------------------------------- // Check macros //----------------------------------------- - + if ( ! is_array( $xml->xml_array['macroexport']['macrogroup']['macro'] ) ) { - $this->ipsclass->main_msg = "Ошибка в файле «macros.xml»..."; + $this->ipsclass->main_msg = "Error with macros.xml - could not process XML properly"; $this->show_intro(); } - + foreach( $xml->xml_array['macroexport']['macrogroup']['macro'] as $entry ) { $_key = $entry[ 'macro_value' ]['VALUE']; $_val = $entry[ 'macro_replace' ]['VALUE']; - + if ( $macros[ $_key ] ) { $updated++; - + $this->ipsclass->DB->do_update( 'skin_macro', array( 'macro_value' => $_key, 'macro_replace' => $_val ), "macro_set=1 AND macro_value='".$this->ipsclass->DB->add_slashes( $_key )."'" ); } else { $inserted++; - + $this->ipsclass->DB->do_insert( 'skin_macro', array( 'macro_set' => 1, 'macro_value' => $_key, 'macro_replace' => $_val ) ); } } - + $this->ipsclass->cache_func->_recache_macros( 1, -1 ); - $this->ipsclass->main_msg = "$updated макросов обновлено и $inserted добавлено."; + $this->ipsclass->main_msg = "$updated macros updated, $inserted added."; $this->show_intro(); } - + /*-------------------------------------------------------------------------*/ // Rebuild Master System Skin Set /*-------------------------------------------------------------------------*/ - + /** * Rebuild Master System Templates from cacheid_1 directory * @@ -258,46 +249,46 @@ class ad_skintools { function rewrite_master_cache() { $this->ipsclass->cache_func->_recache_templates( 1, -1, 0, 1, 1 ); - + $this->ipsclass->main_msg .= implode("
    ", $this->ipsclass->cache_func->messages); - + $this->show_intro(); } - + //----------------------------------------- // EASY LOGO CHANGER (COMPLETE) //----------------------------------------- - + function easy_logo_complete() { //----------------------------------------- // Init //----------------------------------------- - + $master = array(); - + //----------------------------------------- // Check id //----------------------------------------- - + if ( ! $this->ipsclass->input['set_skin_set_id'] ) { - $this->ipsclass->main_msg = "Не выбран ID шаблона, вернитесь назад и повторите попытку"; + $this->ipsclass->main_msg = "No skin set ID was passed. Please ensure you actually chose a skin set to edit"; $this->easy_logo_start(); } - + //----------------------------------------- // Grab the default template bit //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_templates', 'where' => "group_name='skin_global' AND func_name='global_board_header'" ) ); $this->ipsclass->DB->simple_exec(); - + while( $r = $this->ipsclass->DB->fetch_row() ) { $master[ $r['set_id'] ] = $r; } - + if ( !isset($master[ $this->ipsclass->input['set_skin_set_id'] ]) OR !is_array($master[ $this->ipsclass->input['set_skin_set_id'] ]) ) { $final_html = $master[1]['section_content']; @@ -306,291 +297,289 @@ class ad_skintools { { $final_html = $master[ $this->ipsclass->input['set_skin_set_id'] ]['section_content']; } - + if ( ! strstr( $final_html, '' ) ) { - $this->ipsclass->main_msg = "Невозможно найти логотип для этого шаблона, убедитесь в том, что ваш шаблон обновлен."; + $this->ipsclass->main_msg = "Cannot locate the logo image tags for this skin set - please make sure your templates are up to date."; $this->easy_logo_start(); } - + //----------------------------------------- // Upload or new logo? //----------------------------------------- - + if ( $_FILES['FILE_UPLOAD']['name'] == "" or ! $_FILES['FILE_UPLOAD']['name'] or ($_FILES['FILE_UPLOAD']['name'] == "none") ) { if ( ! $_POST['logo_url'] ) { - $this->ipsclass->main_msg = "Вы должны либо загрузить новый логотип, либо ввести ссылку на существующий"; + $this->ipsclass->main_msg = "You must either upload a new logo or enter a URL"; $this->easy_logo_start(); } - + $newlogo = $_POST['logo_url']; } else { if ( ! is_writable( CACHE_PATH.'style_images' ) ) { - $this->ipsclass->main_msg = "Вы должны быть уверены, что у 'style_images' стоят правильные права (CHMOD) на запись в нее. Должны стоять 0777."; + $this->ipsclass->main_msg = "You must ensure that 'style_images' has the correct CHMOD value to allow PHP to write into it. Try 0777 if all else fails."; $this->easy_logo_start(); } - + //----------------------------------------- // Upload //----------------------------------------- - + $FILE_NAME = $_FILES['FILE_UPLOAD']['name']; $FILE_SIZE = $_FILES['FILE_UPLOAD']['size']; $FILE_TYPE = $_FILES['FILE_UPLOAD']['type']; - + //----------------------------------------- // Silly spaces //----------------------------------------- - + $FILE_NAME = preg_replace( "/\s+/", "_", $FILE_NAME ); - + //----------------------------------------- // Naughty Opera adds the filename on the end of the // mime type - we don't want this. //----------------------------------------- - + $FILE_TYPE = preg_replace( "/^(.+?);.*$/", "\\1", $FILE_TYPE ); - + //----------------------------------------- // Correct file type? //----------------------------------------- - + if ( ! preg_match( "#\.(?:gif|jpg|jpeg|png)$#is", $FILE_NAME ) ) { - $this->ipsclass->main_msg = "Неверный формат файла. Файл должен иметь формат GIF, JPEG или PNG."; + $this->ipsclass->main_msg = "The file you uploaded is not in the correct format. It has to be either a GIF, JPEG or PNG image."; $this->easy_logo_start(); } - + if ( move_uploaded_file( $_FILES[ 'FILE_UPLOAD' ]['tmp_name'], CACHE_PATH."style_images/{$this->ipsclass->input['set_skin_set_id']}_".$FILE_NAME) ) { @chmod( CACHE_PATH."style_images/{$this->ipsclass->input['set_skin_set_id']}_".$FILE_NAME, 0777 ); } else { - $this->ipsclass->main_msg = "Неудачная загрузка. Проверьте права доступа (CHMOD) у директории 'style_images' и убедитесь, что загружаемый файл имеет размер меньше, чем 2 Mb."; + $this->ipsclass->main_msg = "The upload failed. Please check permissions on the 'style_images' directory and make sure the uploaded file is less that 2mb in size."; $this->easy_logo_start(); } - + $newlogo = "style_images/{$this->ipsclass->input['set_skin_set_id']}_".urlencode($FILE_NAME); } - + //----------------------------------------- // Convert back stuff //----------------------------------------- - + foreach( array( 'headerhtml', 'javascripthtml', 'leftlinkshtml', 'rightlinkshtml' ) as $mail ) { //$_POST[ $mail ] = $this->ipsclass->admin->form_to_text( $_POST[ $mail ] ); //$_POST[ $mail ] = str_replace( "\r\n", "\n", $_POST[ $mail ] ); } - + //----------------------------------------- // Okay! Form the template //----------------------------------------- - + //$final_html = $_POST['headerhtml']; //$final_html = str_replace( "<{BOARD_LOGO}>", "IPB" , $final_html ); //$final_html = str_replace( "<{JAVASCRIPT}>", "\n{$_POST['javascripthtml']}\n" , $final_html ); //$final_html = str_replace( "<{LEFT_HAND_SIDE_LINKS}>", "{$_POST['leftlinkshtml']}" , $final_html ); //$final_html = str_replace( "<{RIGHT_HAND_SIDE_LINKS}>", "{$_POST['rightlinkshtml']}", $final_html ); - + $final_html = preg_replace( "#.+?#si", "IPB" , $final_html ); - + //----------------------------------------- // Update the DeeBee //----------------------------------------- - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_templates', 'where' => "set_id=".intval($this->ipsclass->input['set_skin_set_id'])." AND group_name='skin_global' AND func_name='global_board_header'" ) ); - + $this->ipsclass->DB->do_insert( 'skin_templates', array( 'section_content' => $final_html, 'set_id' => $this->ipsclass->input['set_skin_set_id'], 'group_name' => 'skin_global', 'func_name' => 'global_board_header', 'func_data' => '$component_links=""' ) ); - + $this->ipsclass->cache_func->_rebuild_all_caches(array($this->ipsclass->input['set_skin_set_id'])); - - $this->ipsclass->main_msg = 'Логотип изменен. Кеш стиля обновлен (ID: '.$this->ipsclass->input['set_skin_set_id'].')'; - + + $this->ipsclass->main_msg = 'Logo Changed and Skin Set Caches Rebuilt (id: '.$this->ipsclass->input['set_skin_set_id'].')'; + $this->ipsclass->main_msg .= "
    ".implode("
    ", $this->ipsclass->cache_func->messages); - + $this->easy_logo_start(); } - + //----------------------------------------- // EASY LOGO CHANGER (START) //----------------------------------------- - + function easy_logo_start() { //----------------------------------------- // Init //----------------------------------------- - + $master = array(); $skin_list = ""; $html = array(); - + //----------------------------------------- // Grab the default template bit //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_templates', 'where' => "group_name='skin_global' AND func_name='global_board_header'" ) ); $this->ipsclass->DB->simple_exec(); - + while( $r = $this->ipsclass->DB->fetch_row() ) { $master[ $r['set_id'] ] = $r; } - + if ( ! $master[1]['section_content'] ) { - $this->ipsclass->main_msg = "Невозможно найти базовый шаблон 'global_board_header'"; + $this->ipsclass->main_msg = "Cannot locate the master template bit 'global_board_header'"; $this->show_intro(); } - + if ( ! strstr( $master[1]['section_content'], '' ) ) { - $this->ipsclass->main_msg = "Невозможно найти тег логотипа, убедитесь в том, что ваш шаблон обновлен."; + $this->ipsclass->main_msg = "Cannot locate the logo image tags - please make sure your templates are up to date."; $this->show_intro(); } - + //----------------------------------------- // Get Skin Names //----------------------------------------- - + $skin_list = $this->_get_skinlist( 1 ); - + //----------------------------------------- // get URL //----------------------------------------- - + preg_match( "##si", $master[1]['section_content'], $match ); - + $current_img_url = $match[1]; - + //----------------------------------------- // get current HTML //----------------------------------------- - + $current_html = $master[1]['section_content']; - + $current_html = preg_replace( "#.+?#is" , "<{JAVASCRIPT}>" , $current_html ); $current_html = preg_replace( "##si" , "<{BOARD_LOGO}>" , $current_html ); $current_html = preg_replace( "#.+?#si" , "<{LEFT_HAND_SIDE_LINKS}>" , $current_html ); $current_html = preg_replace( "#.+?#si" , "<{RIGHT_HAND_SIDE_LINKS}>" , $current_html ); - + //----------------------------------------- // Regex out me bits //----------------------------------------- - + preg_match( "#(.+?)#si", $master[1]['section_content'], $match ); $html['javascript'] = $this->ipsclass->admin->text_to_form($match[1]); - + preg_match( "#(.+?)#si" , $master[1]['section_content'], $match ); $html['leftlinks'] = $this->ipsclass->admin->text_to_form($match[1]); - + preg_match( "#(.+?)#si" , $master[1]['section_content'], $match ); $html['rightlinks'] = $this->ipsclass->admin->text_to_form($match[1]); - + $current_html = $this->ipsclass->admin->text_to_form($current_html); - + //----------------------------------------- // Can we upload into style_images? //----------------------------------------- - - $warning = ! is_writable( CACHE_PATH.'style_images' ) ? "
    ВНИМАНИЕ: неправильные CHMOD директории /style_images/. Если вы желаете загрузить новый логотип, пожалуйста, установите 0755 или 0777 CHMOD для этой директории!
    " : ''; - + + $warning = ! is_writable( CACHE_PATH.'style_images' ) ? "
    WARNING: Unable to upload into 'style_images'. If you wish to upload a file, please CHMOD that directory now!
    " : ''; + //----------------------------------------- // Start the form //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'skintools' ), 2 => array( 'code' , 'easylogo_complete' ), 3 => array( 'MAX_FILE_SIZE', '10000000000' ), 4 => array( 'section', $this->ipsclass->section_code ), ) , "uploadform", " enctype='multipart/form-data'" ); - - + + $this->ipsclass->html .= "
    -
    Установка логотипа
    +
    Easy Logo Changer
    $warning
    - Конфигурация + Configuration - + - + - +
    К какому шаблону добавить логотип?
    Если вы уже изменяли шапку стиля из 'Управления шаблонами', то это действие удалит все ваши изменения.
    Apply to which skin set?
    If you've already modified the board header via the template editing section, this will overwrite your modifications
    $skin_list
    Ссылка к логотипу
    Вы можете использовать относительные ссылки или полный URL, начинающийся с http://
    URL to new logo
    You can use a relative URL or a full URL starting with http://
    ".$this->ipsclass->adskin->form_simple_input('logo_url', ( isset($_POST['logo_url']) AND $_POST['logo_url'] ) ? $_POST['logo_url'] : $current_img_url, '60' )."
    ИЛИ загрузить новый логотип
    Выберите файл для загрузки с вашего компьютера. Файл должен иметь разрешение .gif, .jpg, .jpeg или .png
    OR upload a new logo
    Browse your computer for a logo to upload. Filename must end in .gif, .jpg, .jpeg or .png
    ".$this->ipsclass->adskin->form_upload()."
    "; - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form_standalone("Установить"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form_standalone("Complete Edit"); + //----------------------------------------- - + $this->ipsclass->admin->output(); } - + //----------------------------------------- // REBUILD MASTER COMPONENTS //----------------------------------------- - + function rebuildmaster_components() { //----------------------------------------- // INIT //----------------------------------------- - + $file = ROOT_PATH . 'resources/skinsets.xml'; - + if ( ! file_exists( $file ) ) { - $this->ipsclass->main_msg = "$file не найден. Пожалуйста, вернитесь и проверьте еще все еще раз"; + $this->ipsclass->main_msg = "$file could not be found. Please check, upload or try again"; $this->show_intro(); } - + //----------------------------------------- // Get XML //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); - - $xml = new class_xml(); - + + $xml = new class_xml(); + //----------------------------------------- // Get XML file (CSS/WRAPPERS) //----------------------------------------- - + $skin_content = implode( "", file($file) ); - + //----------------------------------------- // Unpack the datafile (TEMPLATES) //----------------------------------------- - - $xml->lite_parser = 1; + $xml->xml_parse_document( $skin_content ); - - + //----------------------------------------- // (TEMPLATES) //----------------------------------------- @@ -601,102 +590,102 @@ class ad_skintools { $this->show_intro(); } else - { + { $this->ipsclass->DB->do_update( 'skin_sets', array( 'set_css' => $xml->xml_array['export']['group']['row'][0]['set_css']['VALUE'], 'set_cache_css' => $xml->xml_array['export']['group']['row'][0]['set_css']['VALUE'], 'set_wrapper' => $xml->xml_array['export']['group']['row'][0]['set_wrapper']['VALUE'], 'set_cache_wrapper' => $xml->xml_array['export']['group']['row'][0]['set_wrapper']['VALUE'], ), 'set_skin_set_id=1' ); } - - $this->ipsclass->main_msg = "Компоненты главного стиля успешно обновлены."; + + $this->ipsclass->main_msg = "Master Template Components Updated"; $this->show_intro(); } - + //----------------------------------------- // REBUILD MASTER HTML //----------------------------------------- - + function rebuildmaster_html() { $master = array(); $inserts = 0; $updates = 0; - + //----------------------------------------- // Template here? //----------------------------------------- - + if ( ! file_exists( ROOT_PATH.'resources/ipb_templates.xml' ) ) { $this->ipsclass->main_msg = "resources/ipb_templates.xml cannot be found in the forums root directory. Please check, upload or try again"; $this->show_intro(); } - + //----------------------------------------- // First, get all the default bits //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => 'suid,group_name,func_name', 'from' => 'skin_templates', 'where' => 'set_id=1' ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $master[ strtolower( $r['group_name'] ) ][ strtolower( $r['func_name'] ) ] = $r['suid']; } - + //----------------------------------------- // Get XML //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); - + $xml = new class_xml(); - + //----------------------------------------- // Get XML file (TEMPLATES) //----------------------------------------- - + $xmlfile = ROOT_PATH.'resources/ipb_templates.xml'; - + $setting_content = implode( "", file($xmlfile) ); - + //----------------------------------------- // Unpack the datafile (TEMPLATES) //----------------------------------------- - - $xml->lite_parser = 1; + $xml->xml_parse_document( $setting_content ); - + //----------------------------------------- // (TEMPLATES) //----------------------------------------- - + if ( ! is_array( $xml->xml_array['templateexport']['templategroup']['template'] ) ) { $this->ipsclass->main_msg = "Error with resources/ipb_templates.xml - could not process XML properly"; $this->show_intro(); } - + foreach( $xml->xml_array['templateexport']['templategroup']['template'] as $entry ) { $newrow = array(); - - $newrow['group_name'] = $entry[ 'group_name' ]['VALUE']; - $newrow['section_content'] = $entry[ 'section_content' ]['VALUE']; - $newrow['func_name'] = $entry[ 'func_name' ]['VALUE']; - $newrow['func_data'] = $entry[ 'func_data' ]['VALUE']; - $newrow['set_id'] = 1; - $newrow['updated'] = time(); - + + $newrow['group_name'] = $entry[ 'group_name' ]['VALUE']; + $newrow['section_content'] = $entry[ 'section_content' ]['VALUE']; + $newrow['func_name'] = $entry[ 'func_name' ]['VALUE']; + $newrow['func_data'] = $entry[ 'func_data' ]['VALUE']; + $newrow['group_names_secondary'] = $entry[ 'group_names_secondary' ]['VALUE']; + $newrow['set_id'] = 1; + $newrow['updated'] = time(); + if ( $master[ strtolower( $newrow['group_name'] ) ][ strtolower( $newrow['func_name'] ) ] ) { //----------------------------------------- // Update //----------------------------------------- - + $updates++; - + $this->ipsclass->DB->do_update( 'skin_templates', $newrow, 'suid='.$master[ strtolower( $newrow['group_name'] ) ][ strtolower( $newrow['func_name'] ) ] ); } else @@ -704,87 +693,87 @@ class ad_skintools { //----------------------------------------- // Insert //----------------------------------------- - + $inserts++; - + $this->ipsclass->DB->do_insert( 'skin_templates', $newrow ); } } - - $this->ipsclass->main_msg = "Главный стиль обновлен!
    Произведено $updates обновлений и $inserts добавлений."; - + + $this->ipsclass->main_msg = "Master template set rebuilt!
    $updates updated template bits, $inserts new template bits"; + $this->show_intro(); } - + //----------------------------------------- // COMPLEX SEARCH //----------------------------------------- - + function search_and_replace() { //----------------------------------------- // Get $skin_names stuff //----------------------------------------- - + require_once( ROOT_PATH.'sources/lib/skin_info.php' ); - + $SEARCH_set = intval( $this->ipsclass->input['set_skin_set_id'] ); $SEARCH_all = intval( $this->ipsclass->input['searchall'] ); - + //----------------------------------------- // Get set stuff //----------------------------------------- - - $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.$SEARCH_set ) ); - + + $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.$SEARCH_set ) ); + //----------------------------------------- // Clean up before / after //----------------------------------------- - + $before = $this->ipsclass->txt_stripslashes($_POST['searchfor']); $after = $this->ipsclass->txt_stripslashes($_POST['replacewith']); $before = str_replace( '"', '\"', $before ); $after = str_replace( '"', '\"', $after ); - + if ( ! $before ) { - $this->ipsclass->main_msg = "Вы не ввели значение для поиска."; + $this->ipsclass->main_msg = "You must enter a 'search for' string before continuing."; $this->searchreplace_start(); } - + //----------------------------------------- // Clean up regex //----------------------------------------- - + if ( $this->ipsclass->input['regexmode'] ) { $before = str_replace( '#', '\#', $before ); - + //----------------------------------------- // Test to ensure they are legal // - catch warnings, etc //----------------------------------------- - + ob_start(); eval( "preg_replace( \"#{$before}#i\", \"{$after}\", '' );"); $return = ob_get_contents(); ob_end_clean(); - + if ( $return ) { - $this->ipsclass->main_msg = "Произошла ошибка во время замены - проверьте введенные значения для поиска и замены."; + $this->ipsclass->main_msg = "There was an error processing the 'search for' and 'replace with' variables - please ensure that they are legal regular expressions before continuing."; $this->searchreplace_start(); } } - + //----------------------------------------- // we're here, so it's good //----------------------------------------- - + $templates = array(); $the_templates = array(); $matches = 0; - + if ( $SEARCH_all ) { $the_templates = $this->ipsclass->cache_func->_get_templates( $this_set['set_skin_set_id'], $this_set['set_skin_set_parent'], 'all' ); @@ -793,13 +782,13 @@ class ad_skintools { { $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_templates', 'where' => 'set_id='.$SEARCH_set ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $the_templates[ $r['group_name'] ][ strtolower($r['func_name']) ] = $r; } } - + if( count($the_templates) && is_array($the_templates) ) { foreach( $the_templates as $group_name => $group_data ) @@ -822,11 +811,11 @@ class ad_skintools { } } } - + /*$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_templates', 'where' => 'set_id='.$SEARCH_set ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { if ( $this->ipsclass->input['regexmode'] ) @@ -843,40 +832,40 @@ class ad_skintools { $matches++; } }*/ - + //----------------------------------------- // No matches... //----------------------------------------- - + if ( ! count($templates) ) { $this->ipsclass->html .= "
    -
    Результаты поиска и замены
    +
    Search & Replace Results
    - Вы искали: ".stripslashes(htmlspecialchars($before))." + You searched for: ".stripslashes(htmlspecialchars($before))."

    - Не найдено ни одной записи, соответствующей искомой строке. Попробуйте еще раз и расширьте диапазон поиска. + Unfortunately your search didn't return any matches. Please try again and broaden your search terms.
    "; - + $this->ipsclass->admin->output(); } - + //----------------------------------------- // Swapping or showing? //----------------------------------------- - + if ( $this->ipsclass->input['testonly'] ) { $this->ipsclass->html .= "
    -
    Результаты поиска и замены
    -
    {$matches} записей содержащих '".htmlentities($before)."' заменены на '".htmlentities($after)."'

    "; - +
    Search & Replace Results
    +
    {$matches} matches for '".htmlentities($before)."' to be replaced with '".htmlentities($after)."'

    "; + //----------------------------------------- // Go fru dem all and print.. //----------------------------------------- - + foreach( $templates as $group => $d ) { foreach( $templates[ $group ] as $tmp_data ) @@ -889,16 +878,16 @@ class ad_skintools { { $group_name = $group; } - + $html = $tmp_data['section_content']; - + //----------------------------------------- // Decode... //----------------------------------------- - + $hl = $before; $after = str_replace( '\\\\', '\\\\\\', $after ); - + if ( ! $after ) { $hl = preg_replace( "#\((.+?)\)#s", "(?:\\1)", $hl ); @@ -910,37 +899,37 @@ class ad_skintools { // Wrap tags (so we don't use // < >, etc ) //----------------------------------------- - + $html = preg_replace( "#{$hl}#si", '{#-^--opentag--^-#}'.$after.'{#-^--closetag--^-#}', $html ); } - + //----------------------------------------- // Clean up.. //----------------------------------------- - + $html = str_replace( "{#-^--opentag--^-#}\\", '{#-^--opentag--^-#}', $html ); - + //----------------------------------------- // convert to printable html //----------------------------------------- - + $html = str_replace( "<" , "<" , $html); $html = str_replace( ">" , ">" , $html); $html = str_replace( "\"", """, $html); - + $html = preg_replace( "!<\!--(.+?)(//)?-->!s" , "<!--\\1--\\2>", $html ); $html = preg_replace( "#<([^&<>]+)>#s" , "<\\1>" , $html ); //Matches $html = preg_replace( "#<([^&<>]+)=#s" , "<\\1=" , $html ); //Matches </\\1>" , $html ); //Matches $html = preg_replace( "!=("|')([^<>])("|')(\s|>)!s" , "=\\1\\2\\3\\4" , $html ); //Matches ='this' - + //----------------------------------------- // convert back wrap tags //----------------------------------------- - + $html = str_replace( '{#-^--opentag--^-#}' , "", $html ); $html = str_replace( '{#-^--closetag--^-#}', "", $html ); - + $this->ipsclass->html .= "
    {$group_name} · {$tmp_data['func_name']}
    {$html}
    @@ -948,11 +937,11 @@ class ad_skintools {
    "; } } - + $this->ipsclass->html .= "
    "; - - $this->ipsclass->admin->nav[] = array( "", "Результаты поиска в шаблоне ".$this_set['set_name'] ); - + + $this->ipsclass->admin->nav[] = array( "", "Search results from set ".$this_set['set_name'] ); + $this->ipsclass->admin->output(); } else @@ -960,10 +949,10 @@ class ad_skintools { //----------------------------------------- // Jus' do iiit //----------------------------------------- - + $after = str_replace( '\\\\', '\\\\\\', $after ); $report = array(); - + foreach( $templates as $group => $d ) { foreach( $templates[ $group ] as $tmp_data ) @@ -971,22 +960,22 @@ class ad_skintools { if ( $this->ipsclass->input['regexmode'] ) { $tmp_data['section_content'] = preg_replace( "#{$before}#si", $after, $tmp_data['section_content'] ); - + } else { $tmp_data['section_content'] = str_replace( $before, $after, $tmp_data['section_content'] ); } - + $do_insert = 0; $insert_array = array(); - + // Protect master templates... if( $tmp_data['set_id'] == 1 ) { $tmp_data['set_id'] = $SEARCH_set; - - $quick_check = $this->ipsclass->DB->simple_exec_query( array( 'select' => "COUNT(*) as thecnt", 'from' => 'skin_templates', + + $quick_check = $this->ipsclass->DB->simple_exec_query( array( 'select' => "COUNT(*) as thecnt", 'from' => 'skin_templates', 'where' => "group_name='{$tmp_data['group_name']}' AND func_name='{$tmp_data['func_name']}' AND set_id='{$tmp_data['set_id']}'" ) ); if( $quick_check['thecnt'] == 0 ) @@ -1000,7 +989,7 @@ class ad_skintools { //----------------------------------------- // Update DB //----------------------------------------- - + $this->ipsclass->DB->do_update( 'skin_templates', array( 'section_content' => $tmp_data['section_content'] ), 'suid='.$tmp_data['suid'] ); } else @@ -1013,76 +1002,76 @@ class ad_skintools { 'updated' => time(), 'can_remove' => 1 ); - + $this->ipsclass->DB->do_insert( 'skin_templates', $insert_array ); } - + $report[] = $tmp_data['func_name'].' updated...'; } } - + //----------------------------------------- // Recache skin template.. //----------------------------------------- - + $this->ipsclass->cache_func->_recache_templates( $SEARCH_set, $this_set['set_skin_set_parent'] ); $report[] = "Templates recached for set {$this_set['set_name']}"; - + $this->ipsclass->main_msg = implode( "
    ", $report ); $this->searchreplace_start(); } } - + //----------------------------------------- // SIMPLE SEARCH //----------------------------------------- - + function simple_search() { //----------------------------------------- // INIT //----------------------------------------- - + $rawword = $_GET['searchkeywords'] ? urldecode( $_GET['searchkeywords'] ) : $_POST['searchkeywords']; $templates = array(); $final = array(); $matches = array(); - + //----------------------------------------- // CLEAN UP //----------------------------------------- - + $SEARCH_word = trim( $this->ipsclass->txt_safeslashes( $rawword ) ); $SEARCH_safe = urlencode( $SEARCH_word ); $SEARCH_all = intval( $this->ipsclass->input['searchall'] ); $SEARCH_set = intval( $this->ipsclass->input['set_skin_set_id'] ); - + //----------------------------------------- // check (please?) //----------------------------------------- - + if ( ! $SEARCH_word ) { - $this->ipsclass->main_msg = "Вы должны ввести искомое слово"; + $this->ipsclass->main_msg = "You must enter a search word"; $this->searchreplace_start(); } - + //----------------------------------------- // Get set stuff //----------------------------------------- - - $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.$SEARCH_set ) ); - + + $this_set = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.$SEARCH_set ) ); + if ( ! $this_set['set_skin_set_id'] ) { - $this->ipsclass->main_msg = "В базе данных ничего не было найдено"; + $this->ipsclass->main_msg = "No such set was found in the DB"; $this->searchreplace_start(); } - + //----------------------------------------- // Get templates from DB //----------------------------------------- - + if ( $SEARCH_all ) { $templates = $this->ipsclass->cache_func->_get_templates( $this_set['set_skin_set_id'], $this_set['set_skin_set_parent'], 'all' ); @@ -1091,23 +1080,23 @@ class ad_skintools { { $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_templates', 'where' => 'set_id='.$SEARCH_set ) ); $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $templates[ $r['group_name'] ][ strtolower($r['func_name']) ] = $r; } } - + if ( ! count( $templates ) ) { - $this->ipsclass->main_msg = "Шаблоны не найдены!"; + $this->ipsclass->main_msg = "Couldn't locate any templates to search in!"; $this->searchreplace_start(); } - + //----------------------------------------- // Go fru dem all and search //----------------------------------------- - + foreach( $templates as $group => $d ) { foreach( $templates[ $group ] as $tmp_data ) @@ -1118,172 +1107,137 @@ class ad_skintools { } } } - + //----------------------------------------- // Print.. //----------------------------------------- - + if ( ! count($final) ) { $this->ipsclass->html .= "
    -
    Результаты поиска
    +
    Search Results
    - Вы искали: ".htmlentities($SEARCH_word)." + You searched for: ".htmlentities($SEARCH_word)."

    - Не найдено ни одной записи, соответствующей искомой строке. Попробуйте еще раз и расширьте диапазон поиска. + Unfortunately your search didn't return any matches. Please try again and broaden your search terms.
    "; - + $this->ipsclass->admin->output(); } - + //----------------------------------------- // SET ids right //----------------------------------------- - + $this->ipsclass->input['id'] = $SEARCH_set; $this->ipsclass->input['p'] = $this_set['set_skin_set_parent']; $this->ipsclass->input['code'] = 'template-sections-list'; $this->ipsclass->input['act'] = 'templ'; $this->ipsclass->form_code = 'section=lookandfeel&act=templ'; $this->ipsclass->form_code_js = str_replace( '&', '&', $this->ipsclass->form_code ); - + //----------------------------------------- // Pass array //----------------------------------------- - + require_once( ROOT_PATH."sources/action_admin/skin_template_bits.php" ); $temp = new ad_skin_template_bits(); $temp->ipsclass =& $this->ipsclass; $temp->search_bits = $final; $temp->auto_run(); } - + //----------------------------------------- // SEARCH & REPLACE SPLASH //----------------------------------------- - + function searchreplace_start() { $skin_list = $this->_get_skinlist( 1 ); - - $this->ipsclass->admin->page_detail = "Этот инструмеент позволяет вам быстро найти и заменить HTML-коды."; - $this->ipsclass->admin->page_title = "Поиск и замена в стилях"; - + + $this->ipsclass->admin->page_detail = "These tools will allow you to search for keywords and bulk replace HTML."; + $this->ipsclass->admin->page_title = "Skin Search & Replace"; + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'skintools' ), 2 => array( 'code' , 'simplesearch' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Простой поиск" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Искать...
    Введите одно слово или целый блок HTML для поиска", + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Simple Search" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Search for...
    Enter a simple keyword or block of HTML to search for", $this->ipsclass->adskin->form_simple_input( 'searchkeywords', '', 30 ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Поиск в...", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Search in set...", $skin_list - ."
    Так же искать в родительских стилях, включая главный стиль." + ."
    Search in selected set and all parents including the master set." ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Искать"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Search"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // Search and replace //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'skintools' ), 2 => array( 'code' , 'searchandreplace' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Поиск и замена" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Поиск по...
    Введите одно слово или целый блок HTML для поиска.
    Если включены регулярные выражения, то вы можете их использовать в своем запросе.
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Search and Replace" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Search for...
    Enter a keyword or a block of HTML to search for.
    If enabling 'regex mode' you may enter a regular expression here.
    ", $this->ipsclass->adskin->form_textarea( 'searchfor', $_POST['searchfor'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Заменить на...
    Введите одно слово или целый блок HTML для замены.
    Если включены регулярные выражения, то вы можете их использовать в своем запросе.
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Replace with...
    Enter the replacement block of HTML
    If enabling 'regex mode' you may enter a regular expression here.
    ", $this->ipsclass->adskin->form_textarea( 'replacewith', $_POST['replacewith'] ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Поиск в стиле...
    Примечание: поиск и замена будут произведены только в шаблонах выбранного стиля. Действие не будет произведено для шаблонов вложенных стилей.", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Search in set...
    NOTE: The search and replace will only work on the specified skin set. The parent and master skin sets will NOT be searched or any replacements made on them.", $skin_list - ."
    Так же искать в родительских стилях, включая главный стиль." + ."
    Search in selected set and all parents including the master set." ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Только тестирование запроса?
    При выборе 'Да', вы сможете увидеть предложенные замены.", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Test Search and Replace Only?
    If yes, no replacements will be made and you will be able to preview the changes.", $this->ipsclass->adskin->form_yes_no( 'testonly', 1 ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Включить регулярные выражения?
    Если выбрано 'Да', вы сможете использовать 'regex' в запросах поиска и замены. - Пример: Замена тегов <br> -
    Искать: <(br)\s?/?> -
    Заменить на: <\\1 clear='all' />
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Enable 'regex' mode?
    If yes, you may use 'regex' in your search and replacements. +
    Example:- Replace all <br> or <br /> with <br clear='all' /> +
    Search for: <(br)\s?/?> +
    Replace with: <\\1 clear='all' />
    ", $this->ipsclass->adskin->form_yes_no( 'regexmode', 0 ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Искать и заменить"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Search"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); } - + //----------------------------------------- // Swap members... //----------------------------------------- - + function change_member() { if( is_array($this->ipsclass->input['set_skin_set_id']) AND count($this->ipsclass->input['set_skin_set_id']) ) { $this->ipsclass->input['set_skin_set_id'] = $this->ipsclass->clean_int_array($this->ipsclass->input['set_skin_set_id']); - - $query_bit = " IN (".implode(",",$this->ipsclass->input['set_skin_set_id']).")"; - } - else - { - $this->ipsclass->main_msg = "Вы не выбрали ни одного стиля для удаления выбора его у пользователей"; - $this->show_intro(); - return; - } - - $new_id = intval($this->ipsclass->input['set_skin_set_id2']); - - if ($new_id == 'n') - { - $this->ipsclass->DB->do_update( 'members', array( 'skin' => '' ), 'skin'.$query_bit ); - } - else - { - $this->ipsclass->DB->do_update( 'members', array( 'skin' => $new_id ), 'skin'.$query_bit ); - } - - $this->ipsclass->main_msg = "Шаблоны пользователей обновлены"; - - $this->show_intro(); - } - - //----------------------------------------- - // Swap forums... - //----------------------------------------- - - function change_forum() - { - if( is_array($this->ipsclass->input['set_skin_set_id']) AND count($this->ipsclass->input['set_skin_set_id']) ) - { - $this->ipsclass->input['set_skin_set_id'] = $this->ipsclass->clean_int_array($this->ipsclass->input['set_skin_set_id']); - + $query_bit = " IN (".implode(",",$this->ipsclass->input['set_skin_set_id']).")"; } else @@ -1292,9 +1246,44 @@ class ad_skintools { $this->show_intro(); return; } - + $new_id = intval($this->ipsclass->input['set_skin_set_id2']); - + + if ($new_id == 'n') + { + $this->ipsclass->DB->do_update( 'members', array( 'skin' => 0 ), 'skin'.$query_bit ); + } + else + { + $this->ipsclass->DB->do_update( 'members', array( 'skin' => $new_id ), 'skin'.$query_bit ); + } + + $this->ipsclass->main_msg = "Members updated"; + + $this->show_intro(); + } + + //----------------------------------------- + // Swap forums... + //----------------------------------------- + + function change_forum() + { + if( is_array($this->ipsclass->input['set_skin_set_id']) AND count($this->ipsclass->input['set_skin_set_id']) ) + { + $this->ipsclass->input['set_skin_set_id'] = $this->ipsclass->clean_int_array($this->ipsclass->input['set_skin_set_id']); + + $query_bit = " IN (".implode(",",$this->ipsclass->input['set_skin_set_id']).")"; + } + else + { + $this->ipsclass->main_msg = "You did not choose any skin(s) to remove from the member's choice"; + $this->show_intro(); + return; + } + + $new_id = intval($this->ipsclass->input['set_skin_set_id2']); + if ($new_id == 'n') { $this->ipsclass->DB->do_update( 'forums', array( 'skin_id' => '' ), 'skin_id'.$query_bit ); @@ -1303,402 +1292,402 @@ class ad_skintools { { $this->ipsclass->DB->do_update( 'forums', array( 'skin_id' => $new_id ), 'skin_id'.$query_bit ); } - + $this->ipsclass->update_forum_cache(); - + $this->ipsclass->main_msg = "Forums updated"; - + $this->show_intro(); - } - + } + //----------------------------------------- // REBUILD MASTER //----------------------------------------- - + function rebuildmaster() { $pid = intval($this->ipsclass->input['phplocation']); $cid = intval($this->ipsclass->input['csslocation']); - + if ( $this->ipsclass->input['phpyes'] ) { if ( ! file_exists( CACHE_PATH.'cache/skin_cache/cacheid_'.$pid ) ) { - $this->ipsclass->main_msg = "IPB не может обновить главный шаблон, так как директория 'cacheid_$pid' не существует"; + $this->ipsclass->main_msg = 'IPB cannot rebuild the master templates as the folder "cacheid_$pid" does not exist'; } - + $this->ipsclass->cache_func->_rebuild_templates_from_php($pid); - - $this->ipsclass->main_msg = 'Попытка обновить PHP кеш-файлы главного стиля...'; - + + $this->ipsclass->main_msg = 'Attempting to rebuild master set from PHP cache files...'; + $this->ipsclass->main_msg .= "
    ".implode("
    ", $this->ipsclass->cache_func->messages); } - + if ( $this->ipsclass->input['cssyes'] ) { if ( ! file_exists( CACHE_PATH.'style_images/css_'.$cid.'.css' ) ) { - $this->ipsclass->main_msg = "IPB не может обновить базовые CSS стили, так как директория 'css_$cid' не существует"; + $this->ipsclass->main_msg = 'IPB cannot rebuild the master CSS as the CSS "css_$cid" does not exist'; } - + $css = @file_get_contents( CACHE_PATH.'style_images/css_'.$cid.'.css' ); - + if ( ! $css ) { - $this->ipsclass->main_msg = "IPB не может обновить базовые CSS стили, так как директория 'css_$cid' пустая"; + $this->ipsclass->main_msg = 'IPB cannot rebuild the master CSS as the CSS "css_$cid" appears to be empty.'; } - + $css = trim( preg_replace( "#^.*\*~START CSS~\*/#s", "", $css ) ); - + //----------------------------------------- // Attempt to rearrange style_images dir stuff //----------------------------------------- - - $this->ipsclass->main_msg = "Попытка восстановить CSS настройки из кеша CSS файлов..."; - + + $this->ipsclass->main_msg = 'Attempting to rebuild master CSS from CSS cache files...'; + $css = preg_replace( "#url\(([\"'])?(.+?)/(.+?)([\"'])?\)#is", "url(\\1style_images/1/\\3\\4)", $css ); - + $this->ipsclass->DB->do_update( 'skin_sets', array( 'set_css' => $css, 'set_cache_css' => $css, 'set_css_updated' => time() ), 'set_skin_set_id=1' ); - + $this->ipsclass->cache_func->_write_css_to_cache(1); - + $this->ipsclass->main_msg .= "
    ".implode("
    ", $this->ipsclass->cache_func->messages); } - + $this->show_intro(); } - + //----------------------------------------- // REBUILD CACHES //----------------------------------------- - + function rebuildcaches() { $this->ipsclass->cache_func->_rebuild_all_caches(array($this->ipsclass->input['set_skin_set_id'])); - - $this->ipsclass->main_msg = 'Кеш стиля обновлен (ID: '.$this->ipsclass->input['set_skin_set_id'].')'; - + + $this->ipsclass->main_msg = 'Skin Set Caches Rebuilt (id: '.$this->ipsclass->input['set_skin_set_id'].')'; + $this->ipsclass->main_msg .= "
    ".implode("
    ", $this->ipsclass->cache_func->messages); - + $this->show_intro(); } - + //----------------------------------------- // SHOW MAIN SCREEN //----------------------------------------- - + function show_intro() { $skin_list = $this->_get_skinlist(); - + //----------------------------------------- // REBUILD MASTER TEMPLATES //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'skintools' ), 2 => array( 'code' , 'rebuildmasterhtml' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + //----------------------------------------- // Attempt to get filemtime //----------------------------------------- - + $filemtime = 0; $file = ROOT_PATH . 'resources/ipb_templates.xml'; $error = ""; $notice = ""; $extra_html = ""; - + if ( @file_exists( $file ) ) { if ( $filemtime = @filemtime( $file ) ) { - $notice = "resources/ipb_templates.xml — последнее обновление: " . $this->ipsclass->get_date( $filemtime, 'JOINED' ); + $notice = "resources/ipb_templates.xml last updated: " . $this->ipsclass->get_date( $filemtime, 'JOINED' ); } - + if ( $filemtime2 = @filemtime( ROOT_PATH . 'sources/ipsclass.php' ) ) { if ( ( $filemtime2 - (86400 * 7) ) > $filemtime ) { - $error = "Пожалуйста, проверьте файл «resources/ipb_templates.xml» — «ipsclass.php» более чем на неделю новее."; + $error = "Please check resources/ipb_templates.xml - 'ipsclass.php' is more than a week newer."; } } } else { - $error = "Невозможно найти файл «{$file}» — убедитесь, что он был загружен."; + $error = "Cannot locate '{$file}' - please make sure a copy has been uploaded to the root forum directory"; } - + //----------------------------------------- // Got notices? //----------------------------------------- - + if ( $notice ) { $extra_html .= "
    $notice
    "; } - + if ( $error ) { $extra_html .= "
    $error
    "; } - + //----------------------------------------- // Continue //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( "{none}" , "100%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Обновление HTML шаблонов главного стиля" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Воспользовавшись этим инструментом, вы обновить все HTML шаблоны главного стиля из файла «ipb_templates.xml». -
    После запуска инструмента, возможно, вам потребуется обновить кеш-файлы стилей, чтобы увидеть изменения. + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Rebuild Master Templates" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Running this tool will rebuild your master HTML templates that all your skins inherit from. +
    After running, you may wish to rebuild your skin set caches to update them with the changes. $extra_html", ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Запустить"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Run tool..."); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // REBUILD MASTER CSS and BOARDWRAPPER //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'skintools' ), 2 => array( 'code' , 'rebuildmastercomponents' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + //----------------------------------------- // Attempt to get filemtime //----------------------------------------- - + $filemtime = 0; $file = ROOT_PATH . 'resources/skinsets.xml'; $error = ""; $notice = ""; $extra_html = ""; - + if ( @file_exists( $file ) ) { if ( $filemtime = @filemtime( $file ) ) { - $notice = "resources/skinsets.xml — последнее обновление: " . $this->ipsclass->get_date( $filemtime, 'JOINED' ); + $notice = "resources/skinsets.xml last updated: " . $this->ipsclass->get_date( $filemtime, 'JOINED' ); } - + if ( $filemtime2 = @filemtime( ROOT_PATH . 'sources/ipsclass.php' ) ) { if ( ( $filemtime2 - (86400 * 7) ) > $filemtime ) { - $error = "Пожалуйста, проверьте файл «resources/skinsets.xml» — «ipsclass.php» более чем на неделю новее."; + $error = "Please check resources/skinsets.xml - 'ipsclass.php' is more than a week newer."; } } } else { - $error = "Невозможно найти файл «{$file}» — убедитесь, что он был загружен."; + $error = "Cannot locate '{$file}' - please make sure that the 'install' directory exists."; } - + //----------------------------------------- // Got notices? //----------------------------------------- - + if ( $notice ) { $extra_html .= "
    $notice
    "; } - + if ( $error ) { $extra_html .= "
    $error
    "; } - + //----------------------------------------- // Continue //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( "{none}" , "100%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Обновление компонентов главного стиля" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Воспользовавшись этим инструментом, вы обновите общий шаблон форума, CSS, а так же настройки главного стиля из файла «skinsets.xml». -
    После запуска инструмента, возможно, вам потребуется обновить кеш-файлы стилей, чтобы увидеть изменения. + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Rebuild Master Skin Components" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Running this tool will rebuild your master HTML wrapper and CSS. +
    After running, you may wish to rebuild your skin set caches to update them with the changes. $extra_html", ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Запустить"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Run tool..."); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // REBUILD MASTER MACROS //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'skintools' ), 2 => array( 'code' , 'rebuildmastermacros' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + //----------------------------------------- // Attempt to get filemtime //----------------------------------------- - + $filemtime = 0; $file = ROOT_PATH . 'resources/macro.xml'; $error = ""; $notice = ""; $extra_html = ""; - + if ( @file_exists( $file ) ) { if ( $filemtime = @filemtime( $file ) ) { - $notice = "resources/macro.xml — последнее обновление: " . $this->ipsclass->get_date( $filemtime, 'JOINED' ); + $notice = "resources/macro.xml last updated: " . $this->ipsclass->get_date( $filemtime, 'JOINED' ); } - + if ( $filemtime2 = @filemtime( ROOT_PATH . 'sources/ipsclass.php' ) ) { if ( ( $filemtime2 - (86400 * 7) ) > $filemtime ) { - $error = "Пожалуйста, проверьте файл «resources/macro.xml» — «ipsclass.php» более чем на неделю новее."; + $error = "Please check resources/macro.xml - 'ipsclass.php' is more than a week newer."; } } } else { - $error = "Невозможно найти файл «{$file}» — убедитесь, что он был загружен."; + $error = "Cannot locate '{$file}' - please make sure that the 'install' directory exists."; } - + //----------------------------------------- // Got notices? //----------------------------------------- - + if ( $notice ) { $extra_html .= "
    $notice
    "; } - + if ( $error ) { $extra_html .= "
    $error
    "; } - + //----------------------------------------- // Continue //----------------------------------------- - + $this->ipsclass->adskin->td_header[] = array( "{none}" , "100%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Обновление макросов главного стиля" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Воспользовавшись этим инструментом, вы обновите все макросы главного стиля из файла «macro.xml». -
    После запуска инструмента, возможно, вам потребуется обновить кеш-файлы стилей, чтобы увидеть изменения. + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Rebuild Master Skin Macros" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Running this tool will rebuild your master macros. +
    After running, you may wish to rebuild your skin set caches to update them with the changes. $extra_html", ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Запустить"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Run tool..."); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // REBUILD CACHES //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'skintools' ), 2 => array( 'code' , 'rebuildcaches' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Обновление кеш-файлов" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Выберите стиль, у которого необходимо обновить кеш-файлы.
    Эта опция позволяет обновить все кеш-файлы всех HTML шаблонов, CSS стилей и макросов выбранного стиля, а также всех вложенных шаблонов.
    [ Обновить кеш-файлы у всех стилей ]", + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Rebuild Skin Set Cache" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Rebuild skin set cache on set...
    This option will rebuild the template HTML, wrapper, macro and css caches of this set and any children.
    [ Rebuild All ]", $skin_list ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Запустить"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Run tool..."); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- - // CHANGE MEMBERS + // CHANGE MEMBERS //----------------------------------------- - + $dd_two = str_replace( "select name='set_skin_set_id'", "select name='set_skin_set_id2'", $skin_list ); - $dd_two = str_replace( "", "", $dd_two ); - + $dd_two = str_replace( "", "", $dd_two ); + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'skintools' ), 2 => array( 'code' , 'changemember' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Переустановка стиля у пользователей" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "У пользователей, использующих стиль...
    Вы можете выбрать несколько стилей, зажав «Ctrl» на клавиатуре.", + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Update Members Skin Choice" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Where the member currently uses...", str_replace( "select name='set_skin_set_id'", "select name='set_skin_set_id[]' multiple='multiple' size='6'", $skin_list ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Переустановить на...", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Make them use...", $dd_two ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Запустить"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Run tool..."); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'skintools' ), 2 => array( 'code' , 'changeforum' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Переустановка стиля у форумов" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "У форумов, использующих стиль...
    Вы можете выбрать несколько стилей, зажав «Ctrl» на клавиатуре.", + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Update Forum Skin Options" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Where the forum currently uses...", str_replace( "select name='set_skin_set_id'", "select name='set_skin_set_id[]' multiple='multiple' size='6'", $skin_list ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Переустановить на...", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Change forum skin option to...", $dd_two ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Запустить"); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Run tool..."); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + //----------------------------------------- // REBUILD MASTER //----------------------------------------- - + if ( IN_DEV ) { $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'skintools' ), 2 => array( 'code' , 'rebuildmaster' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Обновление главного стиля" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "При помощи этого инструмента вы сможете обновить главный стиль из CSS и PHP-файлов.
    Пожалуйста, используйте этот инструмент крайне аккуратно.", - " Директория кеш-файлов PHP: skin_cache/cacheid_ ".$this->ipsclass->adskin->form_simple_input( 'phplocation', '1', 3 )."
    ". - " Кеш-файл CSS: style_images/css_ ".$this->ipsclass->adskin->form_simple_input( 'csslocation', '1',3 ) + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Rebuild Master Skin Set" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Rebuild 'IPB Master Skin Set' FROM CSS AND PHP files.
    This option will rebuild the template HTML for the master skin set. USE VERY CAREFULLY!", + " PHP cache dir.: skin_cache/cacheid_ ".$this->ipsclass->adskin->form_simple_input( 'phplocation', '1', 3 )."
    ". + " CSS cache file: style_images/css_ ".$this->ipsclass->adskin->form_simple_input( 'csslocation', '1',3 ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Запустить"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Run tool..."); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // Rewrite cache files to directory //----------------------------------------- @@ -1711,49 +1700,49 @@ class ad_skintools { $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Перезапись «cacheid_1» из базы данных" ); + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Rewrite cacheid_1 master skins from the DB" ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Обновление кеш-файлов директории «cacheid_1» главного стиля...
    Этот инструмент перезапишет все кеш-файлы главного стиля из базы данных.", + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Rebuild cacheid_1 master skins...
    This option will rewrite all your master cache skin files from the DB.", ) ); - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Запустить"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Run tool..."); $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); } - + //----------------------------------------- //------------------------------- - + $this->ipsclass->admin->output(); - + } - + //----------------------------------------- // Get dropdown of skin //----------------------------------------- - + function _get_skinlist( $check_default=0 ) { $skin_sets = array(); $skin_list = ""; - + return $skin_list; } - + //----------------------------------------- // Sort by group name //----------------------------------------- - + function perly_alpha_sort($a, $b) { return strcmp($a['easy_name'], $b['easy_name']); } - + } diff --git a/upload/sources/action_admin/spiderlogs.php b/upload/sources/action_admin/spiderlogs.php index e1549aeb..569121f1 100644 --- a/upload/sources/action_admin/spiderlogs.php +++ b/upload/sources/action_admin/spiderlogs.php @@ -1,311 +1,308 @@ - $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > Spider (MAN) Logs -| > Module written by Matt Mecham -| > Date started: 28th May 2003 -| -| > Module Version Number: 1.0.0 -| > DBA Checked: Tue 25th May 2004 -+-------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - -class ad_spiderlogs { - - var $base_url; - - /** - * Section title name - * - * @var string - */ - var $perm_main = "admin"; - - /** - * Section title name - * - * @var string - */ - var $perm_child = "spiderlog"; - - - function auto_run() - { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Журнал действий поисковых роботов' ); - - //----------------------------------------- - // Get bot names - //----------------------------------------- - - foreach( explode( "\n", $this->ipsclass->vars['search_engine_bots'] ) as $bot ) - { - list($ua, $n) = explode( "=", $bot ); - - $this->bot_map[ strtolower($ua) ] = $n; - } - - switch($this->ipsclass->input['code']) - { - case 'view': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->view(); - break; - - case 'remove': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); - $this->remove(); - break; - - //----------------------------------------- - default: - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); - $this->list_current(); - break; - } - - } - - //----------------------------------------- - // View Logs - //----------------------------------------- - - function view() - { - $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; - - $this->ipsclass->admin->page_detail = "Ниже указан список всех действий, которые были произведены поисковыми роботами на вашем форуме.
    В этом журнале фиксируются действия только известных роботов, которые указаны в настройке «Список „user-agent“ поисковых роботов»."; - $this->ipsclass->admin->page_title = "Журнал действий поисковых роботов"; - - $botty = urldecode($this->ipsclass->input['bid']); - $botty = str_replace( "!", "!", $botty ); - - if ( !isset($this->ipsclass->input['search_string']) OR $this->ipsclass->input['search_string'] == "" ) - { - $this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "bot='$botty'" ) ); - $this->ipsclass->DB->simple_exec(); - - $row = $this->ipsclass->DB->fetch_row(); - - $row_count = $row['count']; - - $query = "&{$this->ipsclass->form_code}&bid={$this->ipsclass->input['bid']}&code=view"; - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'spider_logs', - 'where' => "bot='$botty'", - 'order' => 'entry_date DESC', - 'limit' => array( $start, 20 ) ) ); - $this->ipsclass->DB->simple_exec(); - } - else - { - $this->ipsclass->input['search_string'] = urldecode($this->ipsclass->input['search_string']); - - $this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "query_string LIKE '%{$this->ipsclass->input['search_string']}%'" ) ); - $this->ipsclass->DB->simple_exec(); - - $row = $this->ipsclass->DB->fetch_row(); - - $row_count = $row['count']; - - $query = "&{$this->ipsclass->form_code}&code=view&search_string=".urlencode($this->ipsclass->input['search_string']); - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'spider_logs', - 'where' => "query_string LIKE '%{$this->ipsclass->input['search_string']}%'", - 'order' => 'entry_date DESC', - 'limit' => array( $start, 20 ) ) ); - $this->ipsclass->DB->simple_exec(); - } - - $links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $row_count, - 'PER_PAGE' => 20, - 'CUR_ST_VAL' => $start, - 'L_SINGLE' => "Одна страница", - 'L_MULTI' => "Страниц: ", - 'BASE_URL' => $this->ipsclass->base_url.$query, - ) - ); - - $this->ipsclass->admin->page_detail = "Ниже указан список всех действий, которые были произведены поисковыми роботами на вашем форуме.
    В этом журнале фиксируются действия только известных роботов, которые указаны в настройке «Список „user-agent“ поисковых роботов»."; - $this->ipsclass->admin->page_title = "Журнал действий поисковых роботов"; - - //----------------------------------------- - // Show form! - //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( "Поисковый робот" , "15%" ); - $this->ipsclass->adskin->td_header[] = array( "Строка запроса" , "15%" ); - $this->ipsclass->adskin->td_header[] = array( "Дата" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "IP-адрес" , "10%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Список действий — результаты поиска" ); - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader'); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - while ( $row = $this->ipsclass->DB->fetch_row() ) - { - $extra = ""; - - if ( preg_match( '#lo-fi#i', $row['query_string'] ) ) - { - $extra = '(Lo-Fi)'; - $row['query_string'] = 'showtopic='.preg_replace( "#Lo-Fi\: t(.+?)\.html#", "\\1", $row['query_string'] ); - } - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "".$this->bot_map[ strtolower($row['bot']) ]."", - "ipsclass->vars['php_ext']}?{$row['query_string']}' target='_blank'>$extra {$row['query_string']}", - $this->ipsclass->admin->get_date( $row['entry_date'], 'LONG' ), - "{$row['ip_address']}", - ) ); - - } - } - else - { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    Поиск не дал результатов
    "); - } - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader'); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - - //----------------------------------------- - //------------------------------- - - $this->ipsclass->admin->output(); - - } - - //----------------------------------------- - // Remove archived files - //----------------------------------------- - - function remove() - { - if ($this->ipsclass->input['bid'] == "") - { - $this->ipsclass->admin->error("Вы не выбрали бота, которого хотите удалить!"); - } - - $botty = urldecode($this->ipsclass->input['bid']); - $botty = str_replace( "!", "!", $botty ); - - $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'spider_logs', 'where' => "bot='$botty'" ) ); - - $this->ipsclass->admin->save_log("Удаленные записи из журнала поисковых роботов"); - - $this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}"); - exit(); - } - - - //----------------------------------------- - // SHOW ALL BOTS - //----------------------------------------- - - function list_current() - { - $form_array = array(); - - $this->ipsclass->admin->page_detail = "Ниже указан список всех действий, которые были произведены поисковыми роботами на вашем форуме.
    В этом журнале фиксируются действия только известных роботов, которые указаны в настройке «Список „user-agent“ поисковых роботов»."; - $this->ipsclass->admin->page_title = "Журнал действий поисковых роботов"; - - //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( "Поисковый робот" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Хитов" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Запущен" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Все действия" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Удалить все действия" , "20%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Список действий" ); - - - $this->ipsclass->DB->cache_add_query( 'spiderlogs_list_current', array() ); - $this->ipsclass->DB->cache_exec_query(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $url_butt = urlencode($r['bot']); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $this->bot_map[ strtolower($r['bot']) ], - "
    {$r['cnt']}
    ", - $this->ipsclass->admin->get_date( $r['entry_date'], 'SHORT' ), - "
    Просмотр
    ", - "
    Удалить
    ", - ) ); - } - - - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - - //----------------------------------------- - //------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'view' ), - 2 => array( 'act' , 'spiderlog' ), - 4 => array( 'section', $this->ipsclass->section_code ), - ) ); - - $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Поиск действий" ); - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Искать..." , - $this->ipsclass->adskin->form_input( "search_string").'... в строке запроса' - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Найти"); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - //----------------------------------------- - //------------------------------- - - $this->ipsclass->admin->output(); - - } - - - -} - - + $Date: 2007-03-28 18:08:51 -0400 (Wed, 28 Mar 2007) $ +| > $Revision: 910 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > Spider (MAN) Logs +| > Module written by Matt Mecham +| > Date started: 28th May 2003 +| +| > Module Version Number: 1.0.0 +| > DBA Checked: Tue 25th May 2004 ++-------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class ad_spiderlogs { + + var $base_url; + + /** + * Section title name + * + * @var string + */ + var $perm_main = "admin"; + + /** + * Section title name + * + * @var string + */ + var $perm_child = "spiderlog"; + + + function auto_run() + { + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Search Engine Spider Logs' ); + + //----------------------------------------- + // Get bot names + //----------------------------------------- + + foreach( explode( "\n", $this->ipsclass->vars['search_engine_bots'] ) as $bot ) + { + list($ua, $n) = explode( "=", $bot ); + + $this->bot_map[ strtolower($ua) ] = $n; + } + + switch($this->ipsclass->input['code']) + { + case 'view': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->view(); + break; + + case 'remove': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); + $this->remove(); + break; + + //----------------------------------------- + default: + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); + $this->list_current(); + break; + } + + } + + //----------------------------------------- + // View Logs + //----------------------------------------- + + function view() + { + $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; + + $this->ipsclass->admin->page_detail = "Viewing all actions by a search engine spider"; + $this->ipsclass->admin->page_title = "Search Engine Logs Manager"; + + $botty = urldecode($this->ipsclass->input['bid']); + $botty = str_replace( "!", "!", $botty ); + + if ( !isset($this->ipsclass->input['search_string']) OR $this->ipsclass->input['search_string'] == "" ) + { + $this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "bot='$botty'" ) ); + $this->ipsclass->DB->simple_exec(); + + $row = $this->ipsclass->DB->fetch_row(); + + $row_count = $row['count']; + + $query = "&{$this->ipsclass->form_code}&bid={$this->ipsclass->input['bid']}&code=view"; + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', + 'from' => 'spider_logs', + 'where' => "bot='$botty'", + 'order' => 'entry_date DESC', + 'limit' => array( $start, 20 ) ) ); + $this->ipsclass->DB->simple_exec(); + } + else + { + $this->ipsclass->input['search_string'] = urldecode($this->ipsclass->input['search_string']); + + $this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "query_string LIKE '%{$this->ipsclass->input['search_string']}%'" ) ); + $this->ipsclass->DB->simple_exec(); + + $row = $this->ipsclass->DB->fetch_row(); + + $row_count = $row['count']; + + $query = "&{$this->ipsclass->form_code}&code=view&search_string=".urlencode($this->ipsclass->input['search_string']); + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', + 'from' => 'spider_logs', + 'where' => "query_string LIKE '%{$this->ipsclass->input['search_string']}%'", + 'order' => 'entry_date DESC', + 'limit' => array( $start, 20 ) ) ); + $this->ipsclass->DB->simple_exec(); + } + + $links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $row_count, + 'PER_PAGE' => 20, + 'CUR_ST_VAL' => $start, + 'L_SINGLE' => "Single Page", + 'L_MULTI' => "Pages: ", + 'BASE_URL' => $this->ipsclass->base_url.$query, + ) + ); + + $this->ipsclass->admin->page_detail = "You may view and remove actions performed by a search engine bot"; + $this->ipsclass->admin->page_title = "Search Engine Logs Manager"; + + //----------------------------------------- + // Show form! + //----------------------------------------- + + $this->ipsclass->adskin->td_header[] = array( "Bot Name" , "15%" ); + $this->ipsclass->adskin->td_header[] = array( "Query String" , "15%" ); + $this->ipsclass->adskin->td_header[] = array( "Time of action" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "IP address" , "10%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Search Engine Logs" ); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader'); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + while ( $row = $this->ipsclass->DB->fetch_row() ) + { + $extra = ""; + + if ( preg_match( '#lo-fi#i', $row['query_string'] ) ) + { + $extra = '(Lo-Fi)'; + + $query_string_html = $extra . ' ' . $row['query_string']; + } + else + { + $query_string_html = "ipsclass->vars['php_ext']}?{$row['query_string']}' target='_blank'>{$row['query_string']}"; + } + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "".$this->bot_map[ strtolower($row['bot']) ]."", + $query_string_html, + $this->ipsclass->admin->get_date( $row['entry_date'], 'LONG' ), + "{$row['ip_address']}", + ) ); + + } + } + else + { + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    No results
    "); + } + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader'); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + + //----------------------------------------- + //------------------------------- + + $this->ipsclass->admin->output(); + + } + + //----------------------------------------- + // Remove archived files + //----------------------------------------- + + function remove() + { + if ($this->ipsclass->input['bid'] == "") + { + $this->ipsclass->admin->error("You did not select a bot to remove by!"); + } + + $botty = urldecode($this->ipsclass->input['bid']); + $botty = str_replace( "!", "!", $botty ); + + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'spider_logs', 'where' => "bot='$botty'" ) ); + + $this->ipsclass->admin->save_log("Removed Search Engine Logs"); + + $this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}"); + exit(); + } + + + //----------------------------------------- + // SHOW ALL BOTS + //----------------------------------------- + + function list_current() + { + $form_array = array(); + + $this->ipsclass->admin->page_detail = "You may view and remove entries in your spider engine logs"; + $this->ipsclass->admin->page_title = "Search Engine Logs Manager"; + + //----------------------------------------- + + $this->ipsclass->adskin->td_header[] = array( "Bot Name" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Hits" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Last Hit" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "View all by bot" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Remove all by bot" , "20%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Search Engine Spider Logs" ); + + + $this->ipsclass->DB->cache_add_query( 'spiderlogs_list_current', array() ); + $this->ipsclass->DB->cache_exec_query(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $url_butt = urlencode($r['bot']); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $this->bot_map[ strtolower($r['bot']) ], + "
    {$r['cnt']}
    ", + $this->ipsclass->admin->get_date( $r['entry_date'], 'SHORT' ), + "
    View
    ", + "
    Remove
    ", + ) ); + } + + + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + + //----------------------------------------- + //------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'view' ), + 2 => array( 'act' , 'spiderlog' ), + 4 => array( 'section', $this->ipsclass->section_code ), + ) ); + + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Search Search Engine Logs" ); + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Search for..." , + $this->ipsclass->adskin->form_input( "search_string").'... in the query string' + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Search"); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + //----------------------------------------- + //------------------------------- + + $this->ipsclass->admin->output(); + + } + + + +} + + ?> \ No newline at end of file diff --git a/upload/sources/action_admin/sql.php b/upload/sources/action_admin/sql.php index 3c9e6a84..67f773a3 100644 --- a/upload/sources/action_admin/sql.php +++ b/upload/sources/action_admin/sql.php @@ -1,73 +1,65 @@ - $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > SQL Admin Stuff -| > Module written by Matt Mecham -| > Date started: Friday 24 June 2005 -| -| > Module Version Number: 1.0.0 -+-------------------------------------------------------------------------- -*/ - - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - -class ad_sql -{ - /*-------------------------------------------------------------------------*/ - // Auto run - /*-------------------------------------------------------------------------*/ - - function auto_run() - { - if ( TRIAL_VERSION ) - { - print "Это свойство отключено в тестовой версии форума."; - exit(); - } - - //----------------------------------------- - // Make sure we're a root admin, or else! - //----------------------------------------- - - if ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group']) - { - $this->ipsclass->admin->error("Извините, но эти функции только для администраторской группы"); - } - - require_once( ROOT_PATH.'sources/action_admin/sql_'.strtolower($this->ipsclass->vars['sql_driver']).'.php' ); - $dbdriver = new ad_sql_module(); - $dbdriver->ipsclass =& $this->ipsclass; - $dbdriver->auto_run(); - } -} - - + $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ +| > $Revision: 567 $ +| > $Author: matt $ ++--------------------------------------------------------------------------- +| +| > SQL Admin Stuff +| > Module written by Matt Mecham +| > Date started: Friday 24 June 2005 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class ad_sql +{ + /*-------------------------------------------------------------------------*/ + // Auto run + /*-------------------------------------------------------------------------*/ + + function auto_run() + { + if ( TRIAL_VERSION ) + { + print "This feature is disabled in the trial version."; + exit(); + } + + //----------------------------------------- + // Make sure we're a root admin, or else! + //----------------------------------------- + + if ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group']) + { + $this->ipsclass->admin->error("Sorry, these functions are for the root admin group only"); + } + + require_once( ROOT_PATH.'sources/action_admin/sql_'.strtolower($this->ipsclass->vars['sql_driver']).'.php' ); + $dbdriver = new ad_sql_module(); + $dbdriver->ipsclass =& $this->ipsclass; + $dbdriver->auto_run(); + } +} + + ?> \ No newline at end of file diff --git a/upload/sources/action_admin/sql_mysql.php b/upload/sources/action_admin/sql_mysql.php index 2a1578bf..6c53d0fa 100644 --- a/upload/sources/action_admin/sql_mysql.php +++ b/upload/sources/action_admin/sql_mysql.php @@ -2,25 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-12-13 16:16:03 -0500 (Wed, 13 Dec 2006) $ -| > $Revision: 791 $ +| > $Date: 2007-08-31 10:37:48 -0400 (Fri, 31 Aug 2007) $ +| > $Revision: 1100 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -37,7 +29,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -50,100 +42,100 @@ class ad_sql_module { var $mysql_version = ""; var $true_version = ""; var $str_gzip_header = "\x1f\x8b\x08\x00\x00\x00\x00\x00"; - + var $db_has_issues = false; - + /** * Section title name * * @var string */ var $perm_main = "admin"; - + /** * Section title name * * @var string */ var $perm_child = "sql"; - + /*-------------------------------------------------------------------------*/ // Auto run module /*-------------------------------------------------------------------------*/ - + function auto_run() { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Инструменты' ); - + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'SQL Toolbox' ); + //----------------------------------------- // Make sure we're a root admin, or else! //----------------------------------------- - + if ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group']) { - $this->ipsclass->admin->error("Извините, но эти функции только для администраторской группы"); + $this->ipsclass->admin->error("Sorry, these functions are for the root admin group only"); } - + //----------------------------------------- // Get the mySQL version. //----------------------------------------- - + $this->ipsclass->DB->sql_get_version(); - + $this->true_version = $this->ipsclass->DB->true_version; $this->mysql_version = $this->ipsclass->DB->mysql_version; - + switch($this->ipsclass->input['code']) { case 'dotool': $this->run_tool(); break; - + case 'runtime': $this->view_sql("SHOW STATUS"); break; - + case 'system': $this->view_sql("SHOW VARIABLES"); break; - + case 'processes': $this->view_sql("SHOW PROCESSLIST"); break; - + case 'runsql': $_POST['query'] = isset($_POST['query']) ? $_POST['query'] : ''; $q = $_POST['query'] == "" ? urldecode($_GET['query']) : $_POST['query']; $this->view_sql(trim(stripslashes($q))); break; - + case 'backup': $this->show_backup_form(); break; - + case 'safebackup': $this->sbup_splash(); break; - + case 'dosafebackup': $this->do_safe_backup(); break; - + case 'export_tbl': $this->do_safe_backup(trim(urldecode(stripslashes($_GET['tbl'])))); break; - + //----------------------------------------- default: $this->list_index(); break; } } - + //----------------------------------------- // Back up baby, back up //----------------------------------------- - + function do_safe_backup($tbl_name="") { if ($tbl_name == "") @@ -162,13 +154,13 @@ class ad_sql_module { $enable_gzip = 1; $filename = $tbl_name; } - + $output = ""; - + @header("Pragma: no-cache"); - + $do_gzip = 0; - + if( $enable_gzip ) { $phpver = phpversion(); @@ -181,7 +173,7 @@ class ad_sql_module { } } } - + if( $do_gzip != 0 ) { @ob_start(); @@ -194,24 +186,24 @@ class ad_sql_module { header("Content-Type: text/x-delimtext; name=\"$filename.sql\""); header("Content-disposition: attachment; filename=$filename.sql"); } - + //----------------------------------------- // Get tables to work on //----------------------------------------- - + if ($tbl_name == "") { $tmp_tbl = $this->ipsclass->DB->get_table_names(); - + foreach($tmp_tbl as $tbl) { // Ensure that we're only peeking at IBF tables - + if ( preg_match( "/^".$this->ipsclass->vars['sql_tbl_prefix']."/", $tbl ) ) { // We've started our headers, so print as we go to stop // poss memory problems - + $this->get_table_sql($tbl, $create_tbl, $skip); } } @@ -220,11 +212,11 @@ class ad_sql_module { { $this->get_table_sql($tbl_name, $create_tbl, $skip); } - + //----------------------------------------- // GZIP? //----------------------------------------- - + if($do_gzip) { $size = ob_get_length(); @@ -236,20 +228,20 @@ class ad_sql_module { .$this->gzip_four_chars($crc) .$this->gzip_four_chars($size); } - + exit(); } - + //----------------------------------------- // Internal handler to return content from table //----------------------------------------- - + function get_table_sql($tbl, $create_tbl, $skip=0) { if ($create_tbl) { // Generate table structure - + if ( $this->ipsclass->input['addticks'] ) { $this->ipsclass->DB->query("SHOW CREATE TABLE `".$this->ipsclass->vars['sql_database'].".".$tbl."`"); @@ -258,14 +250,14 @@ class ad_sql_module { { $this->ipsclass->DB->query("SHOW CREATE TABLE ".$this->ipsclass->vars['sql_database'].".".$tbl); } - + $ctable = $this->ipsclass->DB->fetch_row(); - - echo $this->sql_strip_ticks($ctable['Создать таблицу']).";\n"; + + echo $this->sql_strip_ticks($ctable['Create Table']).";\n"; } - + // Are we skipping? Woohoo, where's me rope?! - + if ($skip == 1) { if ($tbl == $this->ipsclass->vars['sql_tbl_prefix'].'admin_sessions' @@ -277,46 +269,46 @@ class ad_sql_module { return $ret; } } - + // Get the data - + $this->ipsclass->DB->query("SELECT * FROM $tbl"); - + // Check to make sure rows are in this // table, if not return. - + $row_count = $this->ipsclass->DB->get_num_rows(); - + if ($row_count < 1) { return TRUE; } - + //----------------------------------------- // Get col names //----------------------------------------- - + $f_list = ""; - + $fields = $this->ipsclass->DB->get_result_fields(); - + $cnt = count($fields); - + for( $i = 0; $i < $cnt; $i++ ) { $f_list .= $fields[$i]->name . ", "; } - + $f_list = preg_replace( "/, $/", "", $f_list ); - + while ( $row = $this->ipsclass->DB->fetch_row() ) { //----------------------------------------- // Get col data //----------------------------------------- - + $d_list = ""; - + for( $i = 0; $i < $cnt; $i++ ) { if ( ! isset($row[ $fields[$i]->name ]) ) @@ -332,152 +324,154 @@ class ad_sql_module { $d_list .= "'',"; } } - + $d_list = preg_replace( "/,$/", "", $d_list ); - + echo "INSERT INTO $tbl ($f_list) VALUES($d_list);\n"; } - + return TRUE; - + } - + //----------------------------------------- // sql_strip_ticks from field names //----------------------------------------- - + function sql_strip_ticks($data) { return str_replace( "`", "", $data ); } - + //----------------------------------------- // Add slashes to single quotes to stop sql breaks //----------------------------------------- - + function sql_add_slashes($data) { $data = str_replace('\\', '\\\\', $data); $data = str_replace('\'', '\\\'', $data); $data = str_replace("\r", '\r' , $data); $data = str_replace("\n", '\n' , $data); - + return $data; } - + //----------------------------------------- // Almost there! //----------------------------------------- - + function sbup_splash() { - $this->ipsclass->admin->page_detail = "В этой секции вы можете произвести резервную копию вашей базы данных."; - $this->ipsclass->admin->nav[] = array( '', 'Резервное копирование MySQL' ); - $this->ipsclass->admin->page_title = "mySQL ".$this->true_version." — резервное копирование"; - + $this->ipsclass->admin->page_detail = "This section allows you to backup your database."; + $this->ipsclass->admin->nav[] = array( '', 'MySQL Database Backup' ); + $this->ipsclass->admin->page_title = "mySQL ".$this->true_version." Back Up"; + // Check for mySQL version.. // Might change at some point.. - + if ( $this->mysql_version < 3232 ) { - $this->ipsclass->admin->error("Извините, но версия mySQL ниже, чем 3.23.21 и Вы не сможете осуществить резервное копирование"); + $this->ipsclass->admin->error("Sorry, mySQL version of less than 3.23.21 are not support by this backup utility"); } - + $this->ipsclass->adskin->td_header[] = array( " " , "100%" ); - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Простое копирование" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "Резервное копирование базы mySQL

    После того, как Вы нажмёте на ссылку ниже, необходимо будет подождать, пока Ваш браузер не загрузит следующую страницу. Время загрузки может затянуться на несколько минут, в зависимости от размера копируемой базы данных. -

    - ipsclass->input['addticks']}&skip={$this->ipsclass->input['skip']}&enable_gzip={$this->ipsclass->input['enable_gzip']}'>Нажмите сюда для начала резервного копирования" + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Simple Back Up" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( + "Back Up mySQL Database

    Once you have clicked the link below, please wait + until your browser prompts you with a dialogue box. This may take some time depending on + the size of the database you are backing up. +

    + ipsclass->input['addticks']}&skip={$this->ipsclass->input['skip']}&enable_gzip={$this->ipsclass->input['enable_gzip']}'>Click here to start the backup" ) ); - - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - + + $this->ipsclass->admin->output(); - - + + } - - + + function show_backup_form() { - $this->ipsclass->admin->nav[] = array( '', 'Резервное копирование данных' ); - - $this->ipsclass->admin->page_detail = "В этой секции вы сможете сделать резервное копирование вашей базы данных. -

    Простое копирование -
    Этот инструмент соберет все данные в один файл и предложит вам его скачать. Полезно, когда - у хостинг-провайдера включен безопасный режим PHP и база имеет не очень большой размер. - "; - - $this->ipsclass->admin->page_title = "mySQL ".$this->true_version." — резервное копирование данных"; + $this->ipsclass->admin->nav[] = array( '', 'MySQL Database Backup' ); + + $this->ipsclass->admin->page_detail = "This section allows you to backup your database. +

    Simple Backup +
    This function compiles a single back up file and prompts a browser dialogue box for you to save + the file. This is beneficial for PHP safe mode enabled hosts, but can only be used on small databases. + "; + $this->ipsclass->admin->page_title = "mySQL ".$this->true_version." Back Up"; + // Check for mySQL version.. // Might change at some point.. - + if ( $this->mysql_version < 3232 ) { - $this->ipsclass->admin->error("Извините, но версия mySQL ниже, чем 3.23.21 и вы не сможете осуществить резервное копирование"); + $this->ipsclass->admin->error("Sorry, mySQL version of less than 3.23.21 are not support by this backup utility"); } - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'sql' ), 2 => array( 'code' , 'safebackup'), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Просто копирование" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "Добавить команду «CREATE TABLE»?
    Добавить обратные кавычки в названиях таблиц?
    (включите это, если у вас выскакивает ошибка mySQL) ", + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Simple Back Up" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( + "Add 'CREATE TABLE' statements?
    Add backticks around the table name?
    (if you get a mySQL error, enable this) ", $this->ipsclass->adskin->form_yes_no( 'create_tbl', 1), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "Пропустить не существенные данные?
    Такие данные, как: ibf_sessions, ibf_admin_sessions, ibf_search_results, ibf_reg_anti_spam — не будут добавлены.", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( + "Skip non essential data?
    Will not produce insert rows for ibf_sessions, ibf_admin_sessions, ibf_search_results, ibf_reg_anti_spam.", $this->ipsclass->adskin->form_yes_no( 'skip', 1), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "Сжать в GZIP?
    Если GZIP включён, то размер файла-копии будет сжат на более меньший размер.", - $this->ipsclass->adskin->form_yes_no( 'enable_gzip', 0), + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( + "GZIP Content?
    Will produce a smaller file if GZIP is enabled.", + $this->ipsclass->adskin->form_yes_no( 'enable_gzip', 0 ), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Начать"); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Start Back Up"); $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - + + $this->ipsclass->admin->output(); } - - + + //----------------------------------------- // Run mySQL queries //----------------------------------------- - - + + function view_sql($sql) { $limit = 50; $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; $pages = ""; - - $this->ipsclass->admin->page_detail = "В этой секции вы можете администратировать вашу базу данных."; - $this->ipsclass->admin->page_title = "mySQL ".$this->true_version." — администратирование"; - - $map = array( 'processes' => "процессы", - 'runtime' => "информация SQL Runtime", - 'system' => "переменные", + + $this->ipsclass->admin->page_detail = "This section allows you to administrate your mySQL database."; + $this->ipsclass->admin->page_title = "mySQL ".$this->true_version." Tool Box"; + + $map = array( 'processes' => "SQL Processes", + 'runtime' => "SQL Runtime Information", + 'system' => "SQL System Variables", ); - + if ( isset($map[ $this->ipsclass->input['code'] ]) AND $map[ $this->ipsclass->input['code'] ] != "" ) { $tbl_title = $map[ $this->ipsclass->input['code'] ]; @@ -485,35 +479,35 @@ class ad_sql_module { } else { - $tbl_title = "Самостоятельный запрос"; + $tbl_title = "Manual Query"; $man_query = 1; } - + //----------------------------------------- - + if ($man_query == 1) { $this->ipsclass->adskin->td_header[] = array( " " , "100%" ); - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'sql' ), 2 => array( 'code' , 'runsql'), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Выполнение запроса" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Run Query" ); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "
    ".$this->ipsclass->adskin->form_textarea("query", $sql )."
    " ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Выполнить"); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Run a New Query"); $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); } - + //----------------------------------------- - + $this->ipsclass->DB->return_die = 1; - + $the_queries = array(); - + if( strstr( $sql, ";" ) ) { $the_queries = preg_split( "/;[\r\n|\n]+/", $sql, -1, PREG_SPLIT_NO_EMPTY ); @@ -522,214 +516,214 @@ class ad_sql_module { { $the_queries[] = $sql; } - + if( !count($the_queries) ) { $this->ipsclass->adskin->td_header[] = array( " " , "100%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ошибка SQL" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array("Запросы не найдены") ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Error" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array("No valid queries were found") ); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); // End output and script } - + foreach( $the_queries as $sql ) { $links = ""; $sql = trim($sql); // Check for drop, create and flush - + $test_sql = str_replace( "\'", "", $sql ); $apos_count = substr_count( $test_sql, "'" ); - + if( $apos_count%2 != 0 ) { $this->ipsclass->adskin->td_header[] = array( " " , "100%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ошибка" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array("Этот запрос недействителен: {$sql}") ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Error" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array("This query appears to be invalid: {$sql}") ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + unset( $apos_count, $test_sql ); continue; } - + unset( $apos_count, $test_sql ); - - if ( preg_match( "/^DROP|FLUSH/i",$sql ) ) + + if ( preg_match( "/^(DROP|FLUSH)/i",$sql ) ) { $this->ipsclass->adskin->td_header[] = array( " " , "100%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ошибка" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array("Извините, эти запросы запрещены в целях безопасности.") ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - continue; + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Error" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array("Sorry, those queries are not allowed for your safety") ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + continue; } - else if ( preg_match( "/^(DELETE|UPDATE)/i", preg_replace( "#\s{1,}#s", "", $sql ) ) and preg_match( "/admin_login_logs/i", preg_replace( "#\s{1,}#s", "", $sql ) ) ) + else if ( preg_match( "/^(?!SELECT)/i", preg_replace( "#\s{1,}#s", "", $sql ) ) and preg_match( "/admin_login_logs/i", preg_replace( "#\s{1,}#s", "", $sql ) ) ) { $this->ipsclass->adskin->td_header[] = array( " " , "100%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ошибка" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array("Вам запрещено удалять или обновлять эту таблицу.") ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - continue; + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Error" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array("Sorry, you can't delete from or update that table") ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + continue; } - + $this->ipsclass->DB->error = ""; $this->ipsclass->DB->allow_sub_select = 1; $this->ipsclass->DB->query($sql,1); - + // Check for errors.. - + if ( $this->ipsclass->DB->error != "") { $this->ipsclass->adskin->td_header[] = array( " " , "100%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ошибка SQL" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "SQL Error" ); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array($this->ipsclass->DB->error) ); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + continue; - + } - - if ( preg_match( "/^INSERT|UPDATE|DELETE|ALTER|TRUNCATE|CREATE|REPLACE INTO/i", $sql ) ) + + if ( preg_match( "/^(INSERT|UPDATE|DELETE|ALTER|TRUNCATE|CREATE|REPLACE INTO)/i", $sql ) ) { // We can't show any info, and if we're here, there isn't // an error, so we're good to go. - + $this->ipsclass->adskin->td_header[] = array( " " , "100%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Результат" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array("Запрос: ".htmlspecialchars($sql)."
    Успешно выполнен.") ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "SQL Query Completed" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array("Query: ".htmlspecialchars($sql)."
    Executed Successfully") ); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + continue; - + } else if ( preg_match( "/^SELECT/i", $sql ) ) { // Sort out the pages and stuff // auto limit if need be - + if ( ! preg_match( "/LIMIT[ 0-9,]+$/i", $sql ) ) { $rows_returned = $this->ipsclass->DB->get_num_rows(); - + if ($rows_returned > $limit) { $links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $rows_returned, 'PER_PAGE' => $limit, 'CUR_ST_VAL' => $start, - 'L_SINGLE' => "Одна страница", - 'L_MULTI' => "Страниц: ", + 'L_SINGLE' => "Single Page", + 'L_MULTI' => "Pages: ", 'BASE_URL' => $this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=runsql&query=".urlencode($sql), ) ); - + if( substr( $sql, -1, 1 ) == ";" ) { $sql = substr( $sql, 0, -1 ); } - + $sql .= " LIMIT $start, $limit"; - + // Re-run with limit - + $this->ipsclass->DB->query($sql, 1); /// bypass table swapping } } - + } - + $fields = $this->ipsclass->DB->get_result_fields(); - + $cnt = count($fields); - - // Print the headers - we don't what or how many so... - + + // Print the headers - we don't know what or how many so... + for( $i = 0; $i < $cnt; $i++ ) { $this->ipsclass->adskin->td_header[] = array( $fields[$i]->name , "*" ); } - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Результат: ".$tbl_title ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Result: ".$tbl_title ); + if ($links != "") { $pages = $this->ipsclass->adskin->add_td_basic( $links, 'left', 'tablerow2' ); - + $this->ipsclass->html .= $pages; } - + while( $r = $this->ipsclass->DB->fetch_row() ) { // Grab the rows - we don't what or how many so... - + $rows = array(); - + for( $i = 0; $i < $cnt; $i++ ) { if ($man_query == 1) { // Limit output - if ( strlen($r[ $fields[$i]->name ]) > 200 ) + if ( strlen($r[ $fields[$i]->name ]) > 200 AND !preg_match( "/^SHOW/i", $sql ) ) { $r[ $fields[$i]->name ] = substr($r[ $fields[$i]->name ], 0, 200) .'...'; } } - - $rows[] = wordwrap( htmlspecialchars(nl2br($r[ $fields[$i]->name ])) , 50, "
    ", 1 ); + + $rows[] = nl2br( htmlspecialchars( wordwrap( $r[ $fields[$i]->name ] , 50, "\n", 1 ) ) ); } - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( $rows ); - + } - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->DB->free_result(); } - + //----------------------------------------- - + $this->ipsclass->admin->output(); - - + + } - + //----------------------------------------- // I'm A TOOL! //----------------------------------------- - + function run_tool() { - $this->ipsclass->admin->page_detail = "Эта секция позволит вам администрировать вашу базу данных.$extra"; - $this->ipsclass->admin->page_title = "mySQL ".$this->true_version." — инструменты"; - + $this->ipsclass->admin->page_detail = "This section allows you to administrate your mySQL database.$extra"; + $this->ipsclass->admin->page_title = "mySQL ".$this->true_version." Tool Box"; + //----------------------------------------- // have we got some there tables me laddo? //----------------------------------------- - + $tables = array(); - + foreach ($this->ipsclass->input as $key => $value) { if ( preg_match( "/^tbl_(\S+)$/", $key, $match ) ) @@ -740,324 +734,82 @@ class ad_sql_module { } } } - + if ( count($tables) < 1 ) { - $this->ipsclass->admin->error("Вы должны выбрать какую-нибудь таблицу, чтобы запустить этот запрос иначе ничего не выйдет"); + $this->ipsclass->admin->error("You must choose some tables to run this tool on or it's just plain outright silly"); } - + //----------------------------------------- // What tool is one running? // optimize analyze check repair //----------------------------------------- - + if (strtoupper($this->ipsclass->input['tool']) == 'DROP' || strtoupper($this->ipsclass->input['tool']) == 'CREATE' || strtoupper($this->ipsclass->input['tool']) == 'FLUSH') { - $this->ipsclass->admin->error("Вы не можете делать этого, извините"); + $this->ipsclass->admin->error("You can't do that, sorry"); } - + foreach($tables as $table) { $this->ipsclass->DB->query(strtoupper($this->ipsclass->input['tool'])." TABLE $table"); - + $fields = $this->ipsclass->DB->get_result_fields(); - + $data = $this->ipsclass->DB->fetch_row(); - + $cnt = count($fields); - + // Print the headers - we don't what or how many so... - + for( $i = 0; $i < $cnt; $i++ ) { $this->ipsclass->adskin->td_header[] = array( $fields[$i]->name , "*" ); } - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Результат: ".$this->ipsclass->input['tool']." ".$table ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Result: ".$this->ipsclass->input['tool']." ".$table ); + // Grab the rows - we don't what or how many so... - + $rows = array(); - + for( $i = 0; $i < $cnt; $i++ ) { $rows[] = $data[ $fields[$i]->name ]; } - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( $rows ); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); } - + //----------------------------------------- - + $this->ipsclass->admin->output(); - - + + } + + - - function db_index_diag() - { - //----------------------------------------- - // Fixing something? - //----------------------------------------- - - $queries_to_run = array(); - - foreach( $this->ipsclass->input as $k => $v ) - { - if( preg_match( "/^query(\d+)$/", $k, $matches ) ) - { - $queries_to_run[] = $v; - } - } - - if( isset($this->ipsclass->input['query']) AND $this->ipsclass->input['query'] ) - { - $queries_to_run[] = $this->ipsclass->input['query']; - } - - if( count($queries_to_run) > 0 ) - { - foreach( $queries_to_run as $the_query ) - { - $sql = trim( urldecode( base64_decode($the_query) ) ); - - if ( preg_match( "/^DROP|FLUSH/i", trim($sql) ) ) - { - $this->ipsclass->main_msg = "Эти запросы запрещены в целях безопасности."; - } - else - { - $this->ipsclass->DB->return_die = 1; - - $this->ipsclass->DB->query($sql,1); - - if( $this->ipsclass->DB->error != "" ) - { - $this->ipsclass->main_msg .= "Ошибка SQL
    {$this->ipsclass->DB->error}
    "; - } - else - { - $this->ipsclass->main_msg .= "Запрос: ".htmlspecialchars($sql)."
    Успешно выполнен.
    "; - } - - $this->ipsclass->DB->error = ""; - $this->ipsclass->DB->failed = 0; - } - } - } - - require ( ROOT_PATH.'/install/sql/mysql_tables.php' ); - - $indexes = array(); - - if( is_array($TABLE) && count($TABLE) ) - { - foreach( $TABLE as $definition ) - { - $table_name = ""; - $fields_str = ""; - $primary_key = ""; - $tablename = array(); - $fields = array(); - $final_keys = array(); - $col_definition = ""; - $colmatch = array(); - $final_primary = array(); - - preg_match( "#CREATE TABLE\s+?(.+?)\s+?\(#ie", $definition, $tablename ); - $table_name = $tablename[1]; - - if ( preg_match( "#\s+?PRIMARY\s+?KEY\s+?\((.*?)\)(?:(?:[,\s+?$])?\((.+?)\))?#is", $definition, $fields ) ) - { - if( count( $fields ) ) - { - $primary_key = trim($fields[1]); - - $col_definition = $this->sql_strip_ticks( $definition ); - - preg_match( "#^\s+?{$primary_key}\s+?(.+?)(?:[,$])#im", $col_definition, $colmatch ); - - $col_definition = trim($colmatch[1]); - - $final_primary = array( $primary_key, $col_definition ); - } - } - - if ( preg_match_all( "#(?sql_strip_ticks( $index_cols ) ); - - $index_name = $fields[1][$i] ? $fields[1][$i] : $index_cols; - - $final_keys[] = array( $index_name, implode( ",", array_map( 'trim', explode( ",", $index_cols ) ) ) ); - - $i++; - } - } - } - - - - if( $table_name AND ( $primary_key OR count($final_keys) ) ) - { - $indexes[] = array( 'table' => $table_name, - 'primary' => $final_primary, - 'index' => $final_keys - ); - } - } - } - - //echo "
    ";print_r($indexes);echo "
    ";exit; - - if( !count($indexes) ) - { - $this->ipsclass->admin->error( "Невозможно обработать файл «mysql_tables.php»." ); - } - - $output = array(); - - $table_html_count = 0; - $this->db_has_issues = false; - - foreach( $indexes as $data ) - { - $table_name = str_replace( "ibf_", "", $data['table']); - - $row = $this->ipsclass->DB->sql_get_table_schematic( $table_name ); - - $tbl = $this->sql_strip_ticks( $row['Create Table'] ); - - if( is_array($data['primary']) AND count($data['primary']) ) - { - $index_name = $data['primary'][0]; - $column_definition = $data['primary'][1]; - - if ( preg_match( "#\s+?PRIMARY\s+?KEY\s+?\({$index_name}\)?[,\s+?$]?#is", $tbl, $match ) ) - { - $ok = 1; - } - else - { - $query_needed = "ALTER TABLE ".SQL_PREFIX."$table_name CHANGE {$index_name} {$index_name} {$column_definition}, ADD PRIMARY KEY ({$index_name})"; - - if( !$this->ipsclass->DB->field_exists( $index_name, $table_name ) ) - { - $query_needed = str_replace( "CHANGE {$index_name}", "ADD", $query_needed ); - } - - $popup_div = ""; - - $output[] = $this->ipsclass->adskin->add_td_row( array( "".SQL_PREFIX."{$table_name}", - "{$index_name}", - "
    Исправить автоматически   |   Исправить в ручную
    {$popup_div}
    " - ) ); - $table_html_count++; - $this->db_has_issues = true; - } - - if ( $ok ) - { - $output[] = $this->ipsclass->adskin->add_td_row( array( "".SQL_PREFIX."{$table_name}", - "{$index_name}", - " " - ) ); - } - } - - if ( is_array( $data['index'] ) and count( $data['index'] ) ) - { - foreach( $data['index'] as $indexes ) - { - $index_name = $indexes[0]; - $index_cols = $indexes[1] ? $indexes[1] : $index_name; - $ok = 0; - - //print $index_name; print "
    ".$index_cols;print "
    ".$tbl; - - if ( preg_match( "#(?ALTER TABLE ".SQL_PREFIX."{$table_name} DROP INDEX {$index_name}, ADD INDEX {$index_name} ({$index_cols});
    "; - - $output[] = $this->ipsclass->adskin->add_td_row( array( "".SQL_PREFIX."{$table_name}", - "{$index_name}
    Missing field '{$mc}'
    ", - "
    Исправить автоматически   |   Исправить в ручную
    {$popup_div}
    " - ) ); - - $ok = 0; - $table_html_count++; - $this->db_has_issues = true; - } - } - } - } - else - { - $index_columns = $indexes[1] ? $indexes[1] : $index_name; - - $popup_div = ""; - - $output[] = $this->ipsclass->adskin->add_td_row( array( "".SQL_PREFIX."{$table_name}", - "{$index_name}", - "
    Исправить автоматически   |   Исправить в ручную
    {$popup_div}
    " - ) ); - $table_html_count++; - $this->db_has_issues = true; - } - - if ( $ok ) - { - $output[] = $this->ipsclass->adskin->add_td_row( array( "".SQL_PREFIX."{$table_name}", - "{$index_name}", - " " - ) ); - } - } - } - } - - return $output; - } - - + function db_table_diag( $print = 1 ) { $good_img = "YN"; $bad_img = "YN"; - $separator = $print ? "|" : "
    "; - - //----------------------------------------- + $separator = $print ? "|" : "
    "; + + //----------------------------------------- // Tool based on code by Stewart - thx :D - //----------------------------------------- - - //----------------------------------------- + //----------------------------------------- + + //----------------------------------------- // Fixing something? //----------------------------------------- - + $queries_to_run = array(); - + foreach( $this->ipsclass->input as $k => $v ) { if( preg_match( "/^query(\d+)$/", $k, $matches ) ) @@ -1065,28 +817,36 @@ class ad_sql_module { $queries_to_run[] = $v; } } - + if( isset($this->ipsclass->input['query']) AND $this->ipsclass->input['query'] ) { $queries_to_run[] = $this->ipsclass->input['query']; } - + if( count($queries_to_run) > 0 ) { foreach( $queries_to_run as $the_query ) { $sql = trim( urldecode( base64_decode($the_query) ) ); - - if ( preg_match( "/^DROP|FLUSH/i", trim($sql) ) ) + + if ( preg_match( "/^(DROP|FLUSH)/i", trim($sql) ) ) { $this->ipsclass->main_msg = "Sorry, those queries are not allowed for your safety"; + + continue; + } + else if ( preg_match( "/^(?!SELECT)/i", preg_replace( "#\s{1,}#s", "", $sql ) ) and preg_match( "/admin_login_logs/i", preg_replace( "#\s{1,}#s", "", $sql ) ) ) + { + $this->ipsclass->main_msg = "Sorry, those queries are not allowed for your safety"; + + continue; } else { $this->ipsclass->DB->return_die = 1; - + $this->ipsclass->DB->query($sql,1); - + if( $this->ipsclass->DB->error != "" ) { $this->ipsclass->main_msg .= "SQL Error
    {$this->ipsclass->DB->error}
    "; @@ -1095,58 +855,58 @@ class ad_sql_module { { $this->ipsclass->main_msg .= "Query: ".htmlspecialchars($sql)."
    Executed Successfully
    "; } - + $this->ipsclass->DB->error = ""; $this->ipsclass->DB->failed = 0; } } } - + require ( ROOT_PATH.'/install/sql/mysql_tables.php' ); - + $this->db_has_issues = false; $queries_needed = array(); $tables_needed = array(); - + if( is_array($TABLE) && count($TABLE) ) { $table_html_count = 0; - + foreach( $TABLE as $the_table ) { $expected_columns = array(); - + if( preg_match("#CREATE TABLE\s+?(.+?)\s+?\(#ie", $the_table, $bits)) { $tbl_name = $bits[1]; $tbl_name = str_replace( "ibf_", "", $tbl_name ); - + $table_defs[$tbl_name] = str_replace( $bits[1], SQL_PREFIX . $tbl_name, $the_table ); - + // Get the columns and lose the first line (it's the table name) $columns_array = explode( "\n", $the_table ); array_shift($columns_array); - + // Get rid of the end junk - if ( (strpos(end($columns_array), ");") == 0) || + if ( (strpos(end($columns_array), ");") == 0) || (strpos(end($columns_array), ")") == 0) || (strpos(end($columns_array), ";") == 0) ) { array_pop($columns_array); } - + reset($columns_array); - + foreach( $columns_array as $col ) { $temp = preg_split( "/[\s]+/" , $col ); $col_name = trim( next( $temp ) ); - - if( $col_name != "PRIMARY" && - $col_name != "KEY" && - $col_name != "UNIQUE" && - $col_name != "" && - $col_name != "(" && + + if( $col_name != "PRIMARY" && + $col_name != "KEY" && + $col_name != "UNIQUE" && + $col_name != "" && + $col_name != "(" && $col_name != ";" && $col_name != ");" ) { @@ -1157,15 +917,15 @@ class ad_sql_module { } else if ( preg_match("#ALTER TABLE ([a-z_]*) ADD ([a-z_]*) #is", $the_table, $bits) ) { - if( $bits[1] != "" && - $bits[2] != "" && + if( $bits[1] != "" && + $bits[2] != "" && $bits[2] != 'INDEX' && strpos($bits[2], 'TYPE') === false ) { $tbl_name = trim($bits[1]); $tbl_name = str_replace( "ibf_", "", $tbl_name ); $col_name = trim($bits[2]); - + $expected_columns[] = $col_name; $this->columns_to_defs[$tbl_name][$col_name] = str_replace( $bits[1], SQL_PREFIX . $tbl_name, $the_table ) . ";"; } @@ -1174,28 +934,28 @@ class ad_sql_module { { continue; } - + // Get the current schema.... $this->ipsclass->DB->return_die = 1; - + if( !$this->ipsclass->DB->table_exists( $tbl_name ) ) { $popup_div = ""; - + $output[] = $this->ipsclass->adskin->add_td_row( array( "" . SQL_PREFIX . $tbl_name . "", "
    {$bad_img}
    ", - "
    Исправить автоматически   {$separator}   Исправить в ручную
    {$popup_div}
    " + "
    Fix Automatically   {$separator}   Fix Manually
    {$popup_div}
    " ) ); $this->ipsclass->DB->failed = 0; $this->db_has_issues = true; - + $table_html_count++; } else { // Here we go... $missing = array(); - + foreach( $expected_columns as $trymeout ) { if( ! $this->ipsclass->DB->field_exists( $trymeout, $tbl_name ) ) @@ -1203,22 +963,22 @@ class ad_sql_module { $this->db_has_issues = true; $missing[] = $trymeout; $query_needed = "ALTER TABLE " . SQL_PREFIX . $tbl_name . " ADD " . $this->columns_to_defs[$tbl_name][$trymeout]; - + if( preg_match( "/auto_increment;/", $query_needed ) ) { $query_needed = substr( $query_needed, 0, -1 ).", ADD PRIMARY KEY( ". $trymeout . ");"; } - + $popup_div = ""; - + $output[] = $this->ipsclass->adskin->add_td_row( array( "" . SQL_PREFIX . $tbl_name . " (missing column {$trymeout})", "
    {$bad_img}
    ", - "
    Исправить автоматически   {$separator}   Исправить в ручную
    {$popup_div}
    " - ) ); + "
    Fix Automatically   {$separator}   Fix Manually
    {$popup_div}
    " + ) ); $table_html_count++; } } - + if( !count( $missing ) ) { $output[] = $this->ipsclass->adskin->add_td_row( array( "" . SQL_PREFIX . $tbl_name . "", @@ -1229,37 +989,37 @@ class ad_sql_module { } } } - + return $output; - } - - + } + + //----------------------------------------- // SHOW ALL TABLES AND STUFF! // 5 hours ago this seemed like a damned good idea. //----------------------------------------- - + function list_index() { $form_array = array(); $extra = ""; - + if ( $this->mysql_version < 3232 ) { - $extra = "
    Примечание: версия вашей mySQL ограниченная и возможно некоторые функции были удалены"; + $extra = "
    Note: your version of mySQL has a limited feature set and some tools have been removed"; } - - $this->ipsclass->admin->page_detail = "Эта секция позволит вам администрировать вашу базу данных.$extra"; - $this->ipsclass->admin->page_title = "SQL ".$this->true_version." — инструменты"; - + + $this->ipsclass->admin->page_detail = "This section allows you to administrate your mySQL database.$extra"; + $this->ipsclass->admin->page_title = "SQL ".$this->true_version." Tool Box"; + //----------------------------------------- // Show advanced stuff for mySQL > 3.23.03 //----------------------------------------- - + $idx_size = 0; $tbl_size = 0; - - + + $this->ipsclass->html .= " "; - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'sql' ), 2 => array( 'code' , 'dotool'), 4 => array( 'section', $this->ipsclass->section_code ), ) , "theForm" ); - + if ( $this->mysql_version >= 3230 ) { - - $this->ipsclass->adskin->td_header[] = array( "Таблица" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Записей" , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Экспорт" , "10%" ); - $this->ipsclass->adskin->td_header[] = array( '' , "10%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Таблицы Invision Power Board" ); - + + $this->ipsclass->adskin->td_header[] = array( "Table" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Rows" , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "Export" , "10%" ); + $this->ipsclass->adskin->td_header[] = array( '' , "10%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Invision Power Board Tables" ); + $this->ipsclass->DB->query("SHOW TABLE STATUS FROM `".$this->ipsclass->vars['sql_database']."`"); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { // Check to ensure it's a table for this install... - + if ( ! preg_match( "/^".$this->ipsclass->vars['sql_tbl_prefix']."/", $r['Name'] ) ) { continue; } - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "{$r['Name']}", "
    {$r['Rows']}
    ", - "
    Экспорт
    ", + "
    Export
    ", "
    ", ) ); } @@ -1328,89 +1088,89 @@ class ad_sql_module { else { // display a basic information table - - $this->ipsclass->adskin->td_header[] = array( "Таблица" , "60%" ); - $this->ipsclass->adskin->td_header[] = array( "Ячейки" , "30%" ); - $this->ipsclass->adskin->td_header[] = array( '' , "10%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Таблицы Invision Power Board" ); - + + $this->ipsclass->adskin->td_header[] = array( "Table" , "60%" ); + $this->ipsclass->adskin->td_header[] = array( "Rows" , "30%" ); + $this->ipsclass->adskin->td_header[] = array( '' , "10%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Invision Power Board Tables" ); + $tables = $this->ipsclass->DB->get_table_names(); - + foreach($tables as $tbl) { // Ensure that we're only peeking at IBF tables - + if ( ! preg_match( "/^".$this->ipsclass->vars['sql_tbl_prefix']."/", $tbl ) ) { continue; } - + $this->ipsclass->DB->query("SELECT COUNT(*) AS Rows FROM $tbl"); - + $cnt = $this->ipsclass->DB->fetch_row(); - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "$tbl", "
    {$cnt['Rows']}
    ", "
    ", ) ); - + } - + } - + //----------------------------------------- // Add in the bottom stuff //----------------------------------------- - + if ( $this->mysql_version < 3232 ) { $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( " - ", "center", "tablerow2" ); + ", "center", "tablerow2" ); } else { - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( " - ", "center", "tablerow2" ); + ", "center", "tablerow2" ); } - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - + + //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'sql' ), 2 => array( 'code' , 'runsql'), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( "{none}" , "30%" ); $this->ipsclass->adskin->td_header[] = array( "{none}" , "70%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Выполнение запроса к базе данных" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "SQL запрос
    Только для опытных пользователей.
    ", + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Run a Query" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Manual Query
    Advanced Users Only", $this->ipsclass->adskin->form_textarea("query", "" ), ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Выполнить"); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Run Query"); $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - + + //----------------------------------------- - + $this->ipsclass->admin->output(); - + } - + function gzip_four_chars($val) { for ($i = 0; $i < 4; $i ++) @@ -1418,9 +1178,9 @@ class ad_sql_module { $return .= chr($val % 256); $val = floor($val / 256); } - + return $return; - } + } } diff --git a/upload/sources/action_admin/statistics.php b/upload/sources/action_admin/statistics.php index 229b605b..760742e5 100644 --- a/upload/sources/action_admin/statistics.php +++ b/upload/sources/action_admin/statistics.php @@ -1,585 +1,570 @@ - $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > Statistical functions -| > Module written by Matt Mecham -| > Date started: 4th July 2002 -| -| > Module Version Number: 1.0.0 -| > DBA Checked: Tue 25th May 2004 -+-------------------------------------------------------------------------- -*/ - - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - -class ad_statistics -{ - var $base_url; - var $month_names = array(); - - /** - * Section title name - * - * @var string - */ - var $perm_main = "admin"; - - /** - * Section title name - * - * @var string - */ - var $perm_child = "stats"; - - - function auto_run() - { - //----------------------------------------- - - $this->month_names = array( 1 => 'Январь', 'Февраль', 'Март' , 'Апрель' , 'Май' , 'Июнь', - 'Июль' , 'Август' , 'Сентябрь' , 'Октябрь', 'Ноябрь', 'Декабрь' - ); - - switch($this->ipsclass->input['code']) - { - case 'show_reg': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':show' ); - $this->result_screen('reg'); - break; - - case 'show_topic': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':show' ); - $this->result_screen('topic'); - break; - - case 'topic': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':show' ); - $this->main_screen('topic'); - break; - - //----------------------------------------- - - case 'show_post': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':show' ); - $this->result_screen('post'); - break; - - case 'post': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':show' ); - $this->main_screen('post'); - break; - - //----------------------------------------- - - case 'show_msg': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':show' ); - $this->result_screen('msg'); - break; - - case 'msg': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':show' ); - $this->main_screen('msg'); - break; - - //----------------------------------------- - - case 'show_views': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':show' ); - $this->show_views(); - break; - - case 'views': - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':show' ); - $this->main_screen('views'); - break; - - //----------------------------------------- - - default: - $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':show' ); - $this->main_screen('reg'); - break; - } - - } - - - //----------------------------------------- - //| Results screen - //----------------------------------------- - - function show_views() - { - $this->ipsclass->admin->page_title = "Результаты"; - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Статистика' ); - $this->ipsclass->admin->nav[] = array( '', 'Просмотры тем' ); - $this->ipsclass->admin->page_detail = "Статистика просмотров тем в указанные промежутки времени..."; - - //----------------------------------------- - - if ( ! checkdate($this->ipsclass->input['to_month'] ,$this->ipsclass->input['to_day'] ,$this->ipsclass->input['to_year']) ) - { - $this->ipsclass->admin->error("«Дата до:» — неверное время. Пожалуйста, проверьте введенное вами значение..."); - } - - if ( ! checkdate($this->ipsclass->input['from_month'] ,$this->ipsclass->input['from_day'] ,$this->ipsclass->input['from_year']) ) - { - $this->ipsclass->admin->error("«Дата от:» — неверное время. Пожалуйста, проверьте введенное вами значение..."); - } - - //----------------------------------------- - - $to_time = mktime(12 ,0 ,0 ,$this->ipsclass->input['to_month'] ,$this->ipsclass->input['to_day'] ,$this->ipsclass->input['to_year'] ); - $from_time = mktime(12 ,0 ,0 ,$this->ipsclass->input['from_month'] ,$this->ipsclass->input['from_day'] ,$this->ipsclass->input['from_year']); - - - $human_to_date = getdate($to_time); - $human_from_date = getdate($from_time); - - $this->ipsclass->DB->cache_add_query( 'statistics_show_views', array( 'from_time' => $from_time, 'to_time' => $to_time, 'sortby' => $this->ipsclass->input['sortby'] ) ); - $this->ipsclass->DB->cache_exec_query(); - - $running_total = 0; - $max_result = 0; - - $results = array(); - - $this->ipsclass->adskin->td_header[] = array( "Форум" , "40%" ); - $this->ipsclass->adskin->td_header[] = array( "Результат" , "50%" ); - $this->ipsclass->adskin->td_header[] = array( "Просмотров" , "10%" ); - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Просмотры тем в форумах" - ." ({$human_from_date['mday']} {$this->month_names[$human_from_date['mon']]} {$human_from_date['year']} по" - ." {$human_to_date['mday']} {$this->month_names[$human_to_date['mon']]} {$human_to_date['year']})" - ); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - - while ($row = $this->ipsclass->DB->fetch_row() ) - { - - if ( $row['result_count'] > $max_result ) - { - $max_result = $row['result_count']; - } - - $running_total += $row['result_count']; - - $results[] = array( - 'result_name' => $row['result_name'], - 'result_count' => $row['result_count'], - ); - - } - - foreach( $results as $data ) - { - - $img_width = intval( ($data['result_count'] / $max_result) * 100 - 8); - - if ($img_width < 1) - { - $img_width = 1; - } - - $img_width .= '%'; - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $data['result_name'], - "", - "
    ".$data['result_count']."
    ", - ) ); - } - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( ' ', - "
    Всего
    ", - "
    ".$running_total."
    ", - ) ); - - } - else - { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "Поиск не дал результатов.", "center" ); - } - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - $this->ipsclass->admin->output(); - - } - - //----------------------------------------- - //| Results screen - //----------------------------------------- - - function result_screen($mode='reg') - { - $this->ipsclass->admin->page_title = "Результаты"; - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Статистика' ); - $this->ipsclass->admin->page_detail = " "; - - //----------------------------------------- - - if ( ! checkdate($this->ipsclass->input['to_month'] ,$this->ipsclass->input['to_day'] ,$this->ipsclass->input['to_year']) ) - { - $this->ipsclass->admin->error("«Дата до:» — неверное время. Пожалуйста, проверьте введенное вами значение..."); - } - - if ( ! checkdate($this->ipsclass->input['from_month'] ,$this->ipsclass->input['from_day'] ,$this->ipsclass->input['from_year']) ) - { - $this->ipsclass->admin->error("«Дата от:» — неверное время. Пожалуйста, проверьте введенное вами значение..."); - } - - //----------------------------------------- - - $to_time = mktime(0 ,0 ,0 ,$this->ipsclass->input['to_month'] ,$this->ipsclass->input['to_day'] ,$this->ipsclass->input['to_year'] ); - $from_time = mktime(0 ,0 ,0 ,$this->ipsclass->input['from_month'] ,$this->ipsclass->input['from_day'] ,$this->ipsclass->input['from_year']); - - - $human_to_date = getdate($to_time); - $human_from_date = getdate($from_time); - - //----------------------------------------- - - if ($mode == 'reg') - { - $table = 'Регистрации пользователей'; - - $sql_table = 'members'; - $sql_field = 'joined'; - - $this->ipsclass->admin->page_detail = "Статистика регистраций пользователей за указанные промежутки времени.
    Примечание: все время в GMT."; - $this->ipsclass->admin->nav[] = array( '', 'Регистрации' ); - } - else if ($mode == 'topic') - { - $table = 'Новые темы'; - - $sql_table = 'topics'; - $sql_field = 'start_date'; - - $this->ipsclass->admin->page_detail = "Статистика создания новых тем за указанные промежутки времени.
    Примечание: все время в GMT."; - $this->ipsclass->admin->nav[] = array( '', 'Новые темы' ); - } - else if ($mode == 'post') - { - $table = 'Сообщения'; - - $sql_table = 'posts'; - $sql_field = 'post_date'; - - $this->ipsclass->admin->page_detail = "Статистика сообщений сообщений за указанные промежутки времени.
    Примечание: все время в GMT."; - $this->ipsclass->admin->nav[] = array( '', 'Сообщения' ); - } - else if ($mode == 'msg') - { - $table = 'Личные сообщения'; - - $sql_table = 'message_topics'; - $sql_field = 'mt_date'; - - $this->ipsclass->admin->page_detail = "Статистика количество отправленных личных писем за указанные промежутки времени.
    Примечание: все время в GMT."; - $this->ipsclass->admin->nav[] = array( '', 'Личные сообщения' ); - } - - - switch ($this->ipsclass->input['timescale']) - { - case 'daily': - $title = 'за день'; - $sql_date = "%w %U %m %Y"; - $php_date = "|m| jS - Y"; - break; - - case 'monthly': - $title = 'за месяц'; - $sql_date = "%m %Y"; - $php_date = "|m| Y"; - break; - - default: - // weekly - $title = 'за неделю'; - $sql_date = "%U %Y"; - $php_date = "[|m| Y]"; - break; - } - - $this->ipsclass->DB->cache_add_query( 'statistics_result_screen', array( 'from_time' => $from_time, - 'to_time' => $to_time, - 'sortby' => $this->ipsclass->input['sortby'], - 'sql_field' => $sql_field, - 'sql_table' => $sql_table, - 'sql_date' => $sql_date ) ); - $this->ipsclass->DB->cache_exec_query(); - - $running_total = 0; - $max_result = 0; - - $results = array(); - - $this->ipsclass->adskin->td_header[] = array( "Дата" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Результат" , "70%" ); - $this->ipsclass->adskin->td_header[] = array( "Кол-во" , "10%" ); - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( $table - ." ".$title - ." ({$human_from_date['mday']} {$this->month_names[$human_from_date['mon']]} {$human_from_date['year']} до" - ." {$human_to_date['mday']} {$this->month_names[$human_to_date['mon']]} {$human_to_date['year']})" - ); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - - while ($row = $this->ipsclass->DB->fetch_row() ) - { - - if ( $row['result_count'] > $max_result ) - { - $max_result = $row['result_count']; - } - - $running_total += $row['result_count']; - - $results[] = array( - 'result_maxdate' => $row['result_maxdate'], - 'result_count' => $row['result_count'], - 'result_time' => $row['result_time'], - ); - - } - - foreach( $results as $data ) - { - - $img_width = intval( ($data['result_count'] / $max_result) * 100 - 8); - - if ($img_width < 1) - { - $img_width = 1; - } - - $img_width .= '%'; - - if ($this->ipsclass->input['timescale'] == 'weekly') - { - $date = "Неделя #".strftime("%W", $data['result_maxdate']) . date( $php_date, $data['result_maxdate'] ); - } - else - { - $date = date( $php_date, $data['result_maxdate'] ); - } - - $date = explode('|', $date); - - $date = $date[0] . $this->month_names[ (int) $date[1] ] . $date[2]; - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $date, - "", - "
    ".$data['result_count']."
    ", - ) ); - } - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( ' ', - "
    Всего
    ", - "
    ".$running_total."
    ", - ) ); - - } - else - { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "Поиск не дал результатов.", "center" ); - } - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - $this->ipsclass->admin->output(); - - } - - //----------------------------------------- - //| Date selection screen - //----------------------------------------- - - function main_screen($mode='reg') - { - $this->ipsclass->admin->page_title = "Статистика"; - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Статистика' ); - $this->ipsclass->admin->page_detail = "Пожалуйста, укажите необходимые периоды дат и другие опции ниже.
    Статистика создается только на информации, полученной из базы дынных. Учетные записи, сообщения и прочая информация, которая была удалена, не учитываются."; - - if ($mode == 'reg') - { - $form_code = 'show_reg'; - - $table = 'Статистика регистраций'; - } - else if ($mode == 'topic') - { - $form_code = 'show_topic'; - - $table = 'Статистика новых тем'; - } - else if ($mode == 'post') - { - $form_code = 'show_post'; - - $table = 'Статистика сообщений'; - } - else if ($mode == 'msg') - { - $form_code = 'show_msg'; - - $table = 'Статистика личных сообщений'; - } - else if ($mode == 'views') - { - $form_code = 'show_views'; - - $table = 'Статистика просмотров тем'; - } - - - $old_date = getdate(time() - (3600 * 24 * 90)); - $new_date = getdate(time() + (3600 * 24)); - - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , $form_code ), - 2 => array( 'act' , 'stats' ), - 4 => array( 'section', $this->ipsclass->section_code ), - ) ); - - //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( $table ); - - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Дата с" , - $this->ipsclass->adskin->form_dropdown( "from_month" , $this->make_month(), $old_date['mon'] ).'  '. - $this->ipsclass->adskin->form_dropdown( "from_day" , $this->make_day() , $old_date['mday'] ).'  '. - $this->ipsclass->adskin->form_dropdown( "from_year" , $this->make_year() , $old_date['year'] ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Дата по" , - $this->ipsclass->adskin->form_dropdown( "to_month" , $this->make_month(), $new_date['mon'] ).'  '. - $this->ipsclass->adskin->form_dropdown( "to_day" , $this->make_day() , $new_date['mday'] ).'  '. - $this->ipsclass->adskin->form_dropdown( "to_year" , $this->make_year() , $new_date['year'] ) - ) ); - - if ($mode != 'views') - { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Период времени" , - $this->ipsclass->adskin->form_dropdown( "timescale" , array( 0 => array( 'daily', 'Ежедневно'), 1 => array( 'weekly', 'Еженедельно' ), 2 => array( 'monthly', 'Ежемесячно' ) ) ) - ) ); - } - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Сортировка результатов" , - $this->ipsclass->adskin->form_dropdown( "sortby" , array( 0 => array( 'asc', 'По возрастанию — первые: самые старые'), 1 => array( 'desc', 'По убыванию — первые: самые новые' ) ), 'desc' ) - ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Показать"); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - $this->ipsclass->admin->output(); - - - } - - //----------------------------------------- - - function make_year() - { - $time_now = getdate(); - - $return = array(); - - $start_year = 2002; - - $latest_year = intval($time_now['year']); - - if ($latest_year == $start_year) - { - $start_year -= 1; - } - - for ( $y = $start_year; $y <= $latest_year; $y++ ) - { - $return[] = array( $y, $y); - } - - return $return; - } - - //----------------------------------------- - - function make_month() - { - $return = array(); - - for ( $m = 1 ; $m <= 12; $m++ ) - { - $return[] = array( $m, $this->month_names[$m] ); - } - - return $return; - } - - //----------------------------------------- - - function make_day() - { - $return = array(); - - for ( $d = 1 ; $d <= 31; $d++ ) - { - $return[] = array( $d, $d ); - } - - return $return; - } - - - -} - - + $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ +| > $Revision: 567 $ +| > $Author: matt $ ++--------------------------------------------------------------------------- +| +| > Statistical functions +| > Module written by Matt Mecham +| > Date started: 4th July 2002 +| +| > Module Version Number: 1.0.0 +| > DBA Checked: Tue 25th May 2004 ++-------------------------------------------------------------------------- +*/ + + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class ad_statistics +{ + var $base_url; + var $month_names = array(); + + /** + * Section title name + * + * @var string + */ + var $perm_main = "admin"; + + /** + * Section title name + * + * @var string + */ + var $perm_child = "stats"; + + + function auto_run() + { + //----------------------------------------- + + $this->month_names = array( 1 => 'January', 'February', 'March' , 'April' , 'May' , 'June', + 'July' , 'August' , 'September' , 'October', 'November', 'December' + ); + + switch($this->ipsclass->input['code']) + { + case 'show_reg': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':show' ); + $this->result_screen('reg'); + break; + + case 'show_topic': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':show' ); + $this->result_screen('topic'); + break; + + case 'topic': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':show' ); + $this->main_screen('topic'); + break; + + //----------------------------------------- + + case 'show_post': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':show' ); + $this->result_screen('post'); + break; + + case 'post': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':show' ); + $this->main_screen('post'); + break; + + //----------------------------------------- + + case 'show_msg': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':show' ); + $this->result_screen('msg'); + break; + + case 'msg': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':show' ); + $this->main_screen('msg'); + break; + + //----------------------------------------- + + case 'show_views': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':show' ); + $this->show_views(); + break; + + case 'views': + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':show' ); + $this->main_screen('views'); + break; + + //----------------------------------------- + + default: + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':show' ); + $this->main_screen('reg'); + break; + } + + } + + + //----------------------------------------- + //| Results screen + //----------------------------------------- + + function show_views() + { + $this->ipsclass->admin->page_title = "Statistic Center Results"; + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Statistics Overview' ); + $this->ipsclass->admin->nav[] = array( '', 'Topic Views' ); + $this->ipsclass->admin->page_detail = "Showing topic view statistics"; + + //----------------------------------------- + + if ( ! checkdate($this->ipsclass->input['to_month'] ,$this->ipsclass->input['to_day'] ,$this->ipsclass->input['to_year']) ) + { + $this->ipsclass->admin->error("The 'Date To:' time is incorrect, please check the input and try again"); + } + + if ( ! checkdate($this->ipsclass->input['from_month'] ,$this->ipsclass->input['from_day'] ,$this->ipsclass->input['from_year']) ) + { + $this->ipsclass->admin->error("The 'Date From:' time is incorrect, please check the input and try again"); + } + + //----------------------------------------- + + $to_time = mktime(12 ,0 ,0 ,$this->ipsclass->input['to_month'] ,$this->ipsclass->input['to_day'] ,$this->ipsclass->input['to_year'] ); + $from_time = mktime(12 ,0 ,0 ,$this->ipsclass->input['from_month'] ,$this->ipsclass->input['from_day'] ,$this->ipsclass->input['from_year']); + + + $human_to_date = getdate($to_time); + $human_from_date = getdate($from_time); + + $this->ipsclass->DB->cache_add_query( 'statistics_show_views', array( 'from_time' => $from_time, 'to_time' => $to_time, 'sortby' => $this->ipsclass->input['sortby'] ) ); + $this->ipsclass->DB->cache_exec_query(); + + $running_total = 0; + $max_result = 0; + + $results = array(); + + $this->ipsclass->adskin->td_header[] = array( "Forum" , "40%" ); + $this->ipsclass->adskin->td_header[] = array( "Result" , "50%" ); + $this->ipsclass->adskin->td_header[] = array( "Views" , "10%" ); + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Topic Views" + ." ({$human_from_date['mday']} {$this->month_names[$human_from_date['mon']]} {$human_from_date['year']} to" + ." {$human_to_date['mday']} {$this->month_names[$human_to_date['mon']]} {$human_to_date['year']})" + ); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + + while ($row = $this->ipsclass->DB->fetch_row() ) + { + + if ( $row['result_count'] > $max_result ) + { + $max_result = $row['result_count']; + } + + $running_total += $row['result_count']; + + $results[] = array( + 'result_name' => $row['result_name'], + 'result_count' => $row['result_count'], + ); + + } + + foreach( $results as $data ) + { + + $img_width = intval( ($data['result_count'] / $max_result) * 100 - 8); + + if ($img_width < 1) + { + $img_width = 1; + } + + $img_width .= '%'; + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $data['result_name'], + "", + "
    ".$data['result_count']."
    ", + ) ); + } + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( ' ', + "
    Total
    ", + "
    ".$running_total."
    ", + ) ); + + } + else + { + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "No results found", "center" ); + } + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + $this->ipsclass->admin->output(); + + } + + //----------------------------------------- + //| Results screen + //----------------------------------------- + + function result_screen($mode='reg') + { + $this->ipsclass->admin->page_title = "Statistic Center Results"; + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Statistics Overview' ); + $this->ipsclass->admin->page_detail = " "; + + //----------------------------------------- + + if ( ! checkdate($this->ipsclass->input['to_month'] ,$this->ipsclass->input['to_day'] ,$this->ipsclass->input['to_year']) ) + { + $this->ipsclass->admin->error("The 'Date To:' time is incorrect, please check the input and try again"); + } + + if ( ! checkdate($this->ipsclass->input['from_month'] ,$this->ipsclass->input['from_day'] ,$this->ipsclass->input['from_year']) ) + { + $this->ipsclass->admin->error("The 'Date From:' time is incorrect, please check the input and try again"); + } + + //----------------------------------------- + + $to_time = mktime(0 ,0 ,0 ,$this->ipsclass->input['to_month'] ,$this->ipsclass->input['to_day'] ,$this->ipsclass->input['to_year'] ); + $from_time = mktime(0 ,0 ,0 ,$this->ipsclass->input['from_month'] ,$this->ipsclass->input['from_day'] ,$this->ipsclass->input['from_year']); + + + $human_to_date = getdate($to_time); + $human_from_date = getdate($from_time); + + //----------------------------------------- + + if ($mode == 'reg') + { + $table = 'Registration Statistics'; + + $sql_table = 'members'; + $sql_field = 'joined'; + + $this->ipsclass->admin->page_detail = "Showing the number of users registered. (Note: All times based on GMT)"; + $this->ipsclass->admin->nav[] = array( '', 'Registered Users' ); + } + else if ($mode == 'topic') + { + $table = 'New Topic Statistics'; + + $sql_table = 'topics'; + $sql_field = 'start_date'; + + $this->ipsclass->admin->page_detail = "Showing the number of topics started. (Note: All times based on GMT)"; + $this->ipsclass->admin->nav[] = array( '', 'Topics Started' ); + } + else if ($mode == 'post') + { + $table = 'Post Statistics'; + + $sql_table = 'posts'; + $sql_field = 'post_date'; + + $this->ipsclass->admin->page_detail = "Showing the number of posts. (Note: All times based on GMT)"; + $this->ipsclass->admin->nav[] = array( '', 'Number of Posts' ); + } + else if ($mode == 'msg') + { + $table = 'PM Sent Statistics'; + + $sql_table = 'message_topics'; + $sql_field = 'mt_date'; + + $this->ipsclass->admin->page_detail = "Showing the number of sent messages. (Note: All times based on GMT)"; + $this->ipsclass->admin->nav[] = array( '', 'Sent Private Messages' ); + } + + + switch ($this->ipsclass->input['timescale']) + { + case 'daily': + $sql_date = "%w %U %m %Y"; + $php_date = "F jS - Y"; + break; + + case 'monthly': + $sql_date = "%m %Y"; + $php_date = "F Y"; + break; + + default: + // weekly + $sql_date = "%U %Y"; + $php_date = " [F Y]"; + break; + } + + $this->ipsclass->DB->cache_add_query( 'statistics_result_screen', array( 'from_time' => $from_time, + 'to_time' => $to_time, + 'sortby' => $this->ipsclass->input['sortby'], + 'sql_field' => $sql_field, + 'sql_table' => $sql_table, + 'sql_date' => $sql_date ) ); + $this->ipsclass->DB->cache_exec_query(); + + $running_total = 0; + $max_result = 0; + + $results = array(); + + $this->ipsclass->adskin->td_header[] = array( "Date" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Result" , "70%" ); + $this->ipsclass->adskin->td_header[] = array( "Count" , "10%" ); + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( ucfirst($this->ipsclass->input['timescale']) + ." ".$table + ." ({$human_from_date['mday']} {$this->month_names[$human_from_date['mon']]} {$human_from_date['year']} to" + ." {$human_to_date['mday']} {$this->month_names[$human_to_date['mon']]} {$human_to_date['year']})" + ); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + + while ($row = $this->ipsclass->DB->fetch_row() ) + { + + if ( $row['result_count'] > $max_result ) + { + $max_result = $row['result_count']; + } + + $running_total += $row['result_count']; + + $results[] = array( + 'result_maxdate' => $row['result_maxdate'], + 'result_count' => $row['result_count'], + 'result_time' => $row['result_time'], + ); + + } + + foreach( $results as $data ) + { + + $img_width = intval( ($data['result_count'] / $max_result) * 100 - 8); + + if ($img_width < 1) + { + $img_width = 1; + } + + $img_width .= '%'; + + if ($this->ipsclass->input['timescale'] == 'weekly') + { + $date = "Week #".strftime("%W", $data['result_maxdate']) . date( $php_date, $data['result_maxdate'] ); + } + else + { + $date = date( $php_date, $data['result_maxdate'] ); + } + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $date, + "", + "
    ".$data['result_count']."
    ", + ) ); + } + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( ' ', + "
    Total
    ", + "
    ".$running_total."
    ", + ) ); + + } + else + { + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "No results found", "center" ); + } + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + $this->ipsclass->admin->output(); + + } + + //----------------------------------------- + //| Date selection screen + //----------------------------------------- + + function main_screen($mode='reg') + { + $this->ipsclass->admin->page_title = "Statistic Center"; + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Statistics Overview' ); + $this->ipsclass->admin->page_detail = "Please define the date ranges and other options below.
    Note: The statistics generated are based on the information currently held in the database, they do not take into account pruned forums or delete posts, etc."; + + if ($mode == 'reg') + { + $form_code = 'show_reg'; + + $table = 'Registration Statistics'; + } + else if ($mode == 'topic') + { + $form_code = 'show_topic'; + + $table = 'New Topic Statistics'; + } + else if ($mode == 'post') + { + $form_code = 'show_post'; + + $table = 'Post Statistics'; + } + else if ($mode == 'msg') + { + $form_code = 'show_msg'; + + $table = 'PM Statistics'; + } + else if ($mode == 'views') + { + $form_code = 'show_views'; + + $table = 'Topic View Statistics'; + } + + + $old_date = getdate(time() - (3600 * 24 * 90)); + $new_date = getdate(time() + (3600 * 24)); + + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , $form_code ), + 2 => array( 'act' , 'stats' ), + 4 => array( 'section', $this->ipsclass->section_code ), + ) ); + + //----------------------------------------- + + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); + + //----------------------------------------- + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( $table ); + + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Date From" , + $this->ipsclass->adskin->form_dropdown( "from_month" , $this->make_month(), $old_date['mon'] ).'  '. + $this->ipsclass->adskin->form_dropdown( "from_day" , $this->make_day() , $old_date['mday'] ).'  '. + $this->ipsclass->adskin->form_dropdown( "from_year" , $this->make_year() , $old_date['year'] ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Date To" , + $this->ipsclass->adskin->form_dropdown( "to_month" , $this->make_month(), $new_date['mon'] ).'  '. + $this->ipsclass->adskin->form_dropdown( "to_day" , $this->make_day() , $new_date['mday'] ).'  '. + $this->ipsclass->adskin->form_dropdown( "to_year" , $this->make_year() , $new_date['year'] ) + ) ); + + if ($mode != 'views') + { + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Time scale" , + $this->ipsclass->adskin->form_dropdown( "timescale" , array( 0 => array( 'daily', 'Daily'), 1 => array( 'weekly', 'Weekly' ), 2 => array( 'monthly', 'Monthly' ) ) ) + ) ); + } + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Result Sorting" , + $this->ipsclass->adskin->form_dropdown( "sortby" , array( 0 => array( 'asc', 'Ascending - Oldest dates first'), 1 => array( 'desc', 'Descending - Newest dates first' ) ), 'desc' ) + ) ); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Show"); + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); + + $this->ipsclass->admin->output(); + + + } + + //----------------------------------------- + + function make_year() + { + $time_now = getdate(); + + $return = array(); + + $start_year = 2002; + + $latest_year = intval($time_now['year']); + + if ($latest_year == $start_year) + { + $start_year -= 1; + } + + for ( $y = $start_year; $y <= $latest_year; $y++ ) + { + $return[] = array( $y, $y); + } + + return $return; + } + + //----------------------------------------- + + function make_month() + { + $return = array(); + + for ( $m = 1 ; $m <= 12; $m++ ) + { + $return[] = array( $m, $this->month_names[$m] ); + } + + return $return; + } + + //----------------------------------------- + + function make_day() + { + $return = array(); + + for ( $d = 1 ; $d <= 31; $d++ ) + { + $return[] = array( $d, $d ); + } + + return $return; + } + + + +} + + ?> \ No newline at end of file diff --git a/upload/sources/action_admin/support.php b/upload/sources/action_admin/support.php index 5b838727..c6276a32 100644 --- a/upload/sources/action_admin/support.php +++ b/upload/sources/action_admin/support.php @@ -2,22 +2,14 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +--------------------------------------------------------------------------- | > $Date: 2006-03-23 07:34:25 -0500 (Thu, 23 Mar 2006) $ | > $Revision: 177 $ @@ -34,7 +26,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -42,99 +34,99 @@ if ( ! defined( 'IN_ACP' ) ) class ad_support { var $base_url; - + /** * Section title name * * @var string */ var $perm_main = "help"; - + /** * Section title name * * @var string */ var $perm_child = "support"; - + function auto_run() { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Помощь и поддержка' ); - + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Support' ); + //----------------------------------------- switch($this->ipsclass->input['code']) { case 'doctor': - $this->ipsclass->admin->page_detail = "Воспользовавшись нашей документацией, вы сможете узнать более подробно о том, как использовать ту или иную функцию в Invision Power Board."; - $this->ipsclass->admin->page_title = "Документация"; - + $this->ipsclass->admin->page_detail = "Please utilize our documentation to discover how to use features found in the software."; + $this->ipsclass->admin->page_title = "Documentation"; + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' ); - $this->ipsclass->admin->show_inframe( 'http://external.iblink.ru/docs-ipb' ); + $this->ipsclass->admin->show_inframe( 'http://anonym.to/http://external.ipslink.com/ipboard22/landing/?p=docs-ipb' ); break; break; - + case 'kb': - $this->ipsclass->admin->page_detail = "Воспользуйтесь нашей базой знаний для поиска решений общих проблем и проблем, связанных со старыми выпусками Invision Power Board. В данной базе вы также сможете найти описание, как использовать некоторые функции нашего программного обеспечения."; - $this->ipsclass->admin->page_title = "База знаний"; - + $this->ipsclass->admin->page_detail = "Please utilize our knowledgebase to search for common issues and fixes to those issues. You can also find documentation on how to use the features found in the software as well."; + $this->ipsclass->admin->page_title = "Help & Support"; + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' ); - $this->ipsclass->admin->show_inframe( 'http://external.iblink.ru/wiki' ); + $this->ipsclass->admin->show_inframe( 'http://anonym.to/http://external.ipslink.com/ipboard22/landing/?p=kb' ); break; - + case 'support': - $this->ipsclass->admin->page_detail = "Если у вас возникли проблемы или вопросы при использовании программного обеспечения компании Invision Power Services, то, пожалуйста, воспользуйтесь формой ниже, чтобы получить квалифицированную помощь. Помните, что время ответа в первую очередь зависит от сложности вашего вопроса.

    Вам необходимо иметь активную лицензию, чтобы воспользоваться клиент-центром."; - $this->ipsclass->admin->page_title = "Помощь и поддержка"; - + $this->ipsclass->admin->page_detail = "If you are experiencing an issue with your Invision Power Services software and require official assistance or support, you may utilize our ticketing system to submit a ticket. Please allow 24-48 hours for a response during normal business hours.

    You must have an active support contract with us in order to submit a ticket."; + $this->ipsclass->admin->page_title = "Help & Support"; + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' ); - $this->ipsclass->admin->show_inframe( 'http://external.iblink.ru/clientarea' ); - break; - - case 'ibresource': - $this->ipsclass->admin->page_detail = "Форумы IBResource — это ресурс, где можно найти много полезных статей и советов, модификаций и модулей, стилей и дополнительной графики, а так же получить помощь от других клиентов. Помните, вся информация на наших форумах предоставляется «как есть» и не подтверждена техническим отделом компании «Invision Power Services, Inc.» — все действия, описанные другими пользователями, вы будете делать на свой страх и риск. -

    Перевести свою учетную запись на наших форумах в группу «Клиенты» вы можете через клиент-центр."; - $this->ipsclass->admin->page_title = "Помощь и поддержка"; - + $this->ipsclass->admin->show_inframe( 'http://anonym.to/https://www.invisionpower.com/customer/index.php?&module=clientarea§ion=tickets' ); + break; + + case 'resources': + $this->ipsclass->admin->page_detail = "resources.invisionpower.com is a customer-only resource site where you can find helpful articles, modifications, skins, and graphics for your forum. Note that all content and advice found on resources.invisionpower.com is provided as-is by the individual user, and is not endorsed nor support by Invision Power Services, Inc. + If you are looking for additional resources for your board, this is the first place to go."; + $this->ipsclass->admin->page_title = "Help & Support"; + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' ); - $this->ipsclass->admin->show_inframe( 'http://external.iblink.ru/forums' ); + $this->ipsclass->admin->show_inframe( 'http://anonym.to/http://resources.invisionpower.com' ); break; - + case 'contact': - $this->ipsclass->admin->page_detail = "Если вы хотите связаться с нами, пожалуйста, ознакомьтесь с нашей контактной информацией и часами работы ниже."; - $this->ipsclass->admin->page_title = "Помощь и поддержка"; - + $this->ipsclass->admin->page_detail = "If you would like to contact us you can find our current contact information and hours of operation below."; + $this->ipsclass->admin->page_title = "Help & Support"; + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' ); - $this->ipsclass->admin->show_inframe( 'http://external.iblink.ru/contact' ); + $this->ipsclass->admin->show_inframe( 'http://anonym.to/http://external.ipslink.com/ipboard22/landing/?p=contact' ); break; - + case 'features': - $this->ipsclass->admin->page_detail = "Если вы хотите подсказать нам, как улучшить наши продукты, то просто оставьте свое предложение в одном из форумов ниже."; - $this->ipsclass->admin->page_title = "Предложения и пожелания"; - + $this->ipsclass->admin->page_detail = "If you would like to request a feature, or see if a particular feature has already been requested, for Invision Power Board this forum is the place to do so."; + $this->ipsclass->admin->page_title = "Help & Support"; + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' ); - $this->ipsclass->admin->show_inframe( 'http://external.iblink.ru/suggestfeatures' ); + $this->ipsclass->admin->show_inframe( 'http://anonym.to/http://external.ipslink.com/ipboard22/landing/?p=suggestfeatures' ); break; - + case 'bugs': - $this->ipsclass->admin->page_detail = "Вы можете отправить отчет о найденной ошибке, а так же узнать об исправлениях других ошибок, используя «Bugtracker» ниже."; - $this->ipsclass->admin->page_title = "Помощь и поддержка"; - + $this->ipsclass->admin->page_detail = "You may submit and track all bugs reported to us by our users for Invision Power Board in the Bugtracker below."; + $this->ipsclass->admin->page_title = "Help & Support"; + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' ); - $this->ipsclass->admin->show_inframe( 'http://external.iblink.ru/bugtrack' ); - break; - - + $this->ipsclass->admin->show_inframe( 'http://anonym.to/http://forums.invisionpower.com/index.php?autocom=bugtracker&code=show_project&product_id=2' ); + break; + + //----------------------------------------- default: - $this->ipsclass->admin->page_detail = "Если у вас возникли проблемы или вопросы при использование программного обеспечения компании Invision Power Services, то, пожалуйста, воспользуйтесь формой ниже, чтобы получить квалифицированную помощь. Помните, что время ответа в первую очередь зависит от сложности вашего вопроса.

    Вам необходимо иметь активную лицензию, чтобы воспользоваться клиент-центром."; - $this->ipsclass->admin->page_title = "Помощь и поддержка"; - + $this->ipsclass->admin->page_detail = "If you are experiencing an issue with your Invision Power Services software and require official assistance or support, you may utilize our ticketing system to submit a ticket. Please allow 24-48 hours for a response during normal business hours.

    You must have an active support contract with us in order to submit a ticket."; + $this->ipsclass->admin->page_title = "Help & Support"; + $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' ); - $this->ipsclass->admin->show_inframe( 'https://www.ibresource.ru/clientarea/index.php' ); + $this->ipsclass->admin->show_inframe( 'http://anonym.to/https://www.invisionpower.com/customer/index.php?&module=clientarea§ion=tickets' ); break; } } - + } diff --git a/upload/sources/action_admin/task_manager.php b/upload/sources/action_admin/task_manager.php index 9c3adddc..9f339e78 100644 --- a/upload/sources/action_admin/task_manager.php +++ b/upload/sources/action_admin/task_manager.php @@ -2,24 +2,16 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ +| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ | > $Revision: 567 $ | > $Author: matt $ +--------------------------------------------------------------------------- @@ -35,7 +27,7 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -43,55 +35,55 @@ class ad_task_manager { # Global var $ipsclass; - + var $functions = ""; - + /** * Section title name * * @var string */ var $perm_main = "tools"; - + /** * Section title name * * @var string */ var $perm_child = "task"; - + function auto_run() { $this->ipsclass->form_code = "{$this->ipsclass->form_code}"; - + //----------------------------------------- // Require and RUN !! THERES A BOMB //----------------------------------------- - + require_once( ROOT_PATH.'sources/lib/func_taskmanager.php' ); - + $this->functions = new func_taskmanager(); $this->functions->ipsclass =& $this->ipsclass; - + //----------------------------------------- // Load skin //----------------------------------------- - + $this->html = $this->ipsclass->acp_load_template('cp_skin_taskmanager'); - + //----------------------------------------- // Continue //----------------------------------------- + + $this->ipsclass->admin->page_detail = "The task manager contains all your scheduled tasks.
    Please note that as these tasks are run when the board is accessed, the next run time is to be used as a guide only and depends on the traffic your board gets."; + $this->ipsclass->admin->page_title = "Task Manager"; - $this->ipsclass->admin->page_detail = "Эта секция содержит все ваши установленные задачи.
    Пожалуйста, учтите, что все эти задачи запускаются только тогда, когда ваш форум доступен посетителям, следующий запуск происходит только при вызове форума."; - $this->ipsclass->admin->page_title = "Управление задачами"; - - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Список задач' ); - + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Task Manager Home' ); + //----------------------------------------- // Using "do"? //----------------------------------------- - + if ( isset($this->ipsclass->input['j_do']) AND $this->ipsclass->input['j_do'] ) { $this->ipsclass->input['code'] = $this->ipsclass->input['j_do']; @@ -100,11 +92,11 @@ class ad_task_manager { $this->ipsclass->input['code'] = $this->ipsclass->input['do']; } - + //----------------------------------------- // What to do... //----------------------------------------- - + switch($this->ipsclass->input['code']) { case 'task_edit': @@ -115,7 +107,7 @@ class ad_task_manager $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); $this->task_form('add'); break; - + case 'task_edit_do': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->task_do_save('edit'); @@ -124,13 +116,13 @@ class ad_task_manager $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); $this->task_do_save('add'); break; - - + + case 'task_delete': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->task_delete_task(); break; - + case 'task_run_now': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':runnow' ); $this->task_run_task(); @@ -139,127 +131,126 @@ class ad_task_manager $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->task_unlock(); break; - + case 'log': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':log' ); $this->task_log_setup(); break; - + case 'showlog': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':log' ); $this->task_log_show(); break; - + case 'deletelog': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->task_log_delete(); break; - + case 'master_xml_export': $this->master_xml_export(); break; - + case 'task_rebuild_xml': $this->task_rebuild_xml(); break; - + default: $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->task_show_tasks(); break; } } - + /*-------------------------------------------------------------------------*/ // Rebuild XML /*-------------------------------------------------------------------------*/ - + function task_rebuild_xml() { //----------------------------------------- // INIT //----------------------------------------- - + $file = ROOT_PATH . 'resources/tasks.xml'; $inserted = 0; $updated = 0; $tasks = array(); - + //----------------------------------------- // Check //----------------------------------------- - + if ( ! file_exists( $file ) ) { - $this->ipsclass->main_msg = "Файл $file не найден."; + $this->ipsclass->main_msg = "$file could not be found. Please check, upload or try again"; $this->show_intro(); } - + //----------------------------------------- // Get current task info //----------------------------------------- - + $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'task_manager' ) ); - + $this->ipsclass->DB->exec_query(); - + while( $row = $this->ipsclass->DB->fetch_row() ) { $tasks[ $row['task_key'] ] = $row; } - + //----------------------------------------- // Get XML //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); - - $xml = new class_xml(); - + + $xml = new class_xml(); + //----------------------------------------- // Get XML file (CSS/WRAPPERS) //----------------------------------------- - + $skin_content = implode( "", file($file) ); - + //----------------------------------------- // Unpack the datafile (TEMPLATES) //----------------------------------------- - - $xml->lite_parser = 1; + $xml->xml_parse_document( $skin_content ); - + //----------------------------------------- // TASKS //----------------------------------------- - + foreach( $xml->xml_array['export']['group']['row'] as $id => $entry ) { $newrow = array(); - + $_key = $entry['task_key']['VALUE']; - + foreach( $entry as $f => $data ) { if ( $f == 'VALUE' or $f == 'task_id' ) { continue; } - + if ( $f == 'task_cronkey' ) { $entry[ $f ]['VALUE'] = $tasks[ $_key ]['task_cronkey'] ? $tasks[ $_key ]['task_cronkey'] : md5( uniqid( microtime() ) ); } - + if ( $f == 'task_next_run' ) { $entry[ $f ]['VALUE'] = $tasks[ $_key ]['task_next_run'] ? $tasks[ $_key ]['task_next_run'] : time(); } - + $newrow[$f] = $entry[ $f ]['VALUE']; } - + if ( $tasks[ $_key ]['task_key'] ) { $updated++; @@ -271,92 +262,92 @@ class ad_task_manager $this->ipsclass->DB->do_insert( 'task_manager', $newrow ); } } - - $this->ipsclass->main_msg = "$inserted задач добалено и $updated обновлено."; + + $this->ipsclass->main_msg = "$inserted tasks added, $updated updated"; $this->task_show_tasks(); } - + /*-------------------------------------------------------------------------*/ // Export Master XML /*-------------------------------------------------------------------------*/ - + function master_xml_export() { //----------------------------------------- // INIT //----------------------------------------- - + $entry = array(); - + //----------------------------------------- // Get XML class //----------------------------------------- - + require_once( KERNEL_PATH.'class_xml.php' ); - + $xml = new class_xml(); - + $xml->doc_type = $this->ipsclass->vars['gb_char_set']; $xml->xml_set_root( 'export', array( 'exported' => time() ) ); - + //----------------------------------------- // Set group //----------------------------------------- - + $xml->xml_add_group( 'group' ); - + //----------------------------------------- // Get templates... //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'task_manager' ) ); - + $this->ipsclass->DB->simple_exec(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { $content = array(); - + //----------------------------------------- // Sort the fields... //----------------------------------------- - + foreach( $r as $k => $v ) { $content[] = $xml->xml_build_simple_tag( $k, $v ); } - + $entry[] = $xml->xml_build_entry( 'row', $content ); } - + $xml->xml_add_entry_to_group( 'group', $entry ); - + $xml->xml_format_document(); - + $doc = $xml->xml_document; - + //----------------------------------------- // Print to browser //----------------------------------------- - + $this->ipsclass->admin->show_download( $doc, 'tasks.xml', '', 0 ); } - + /*-------------------------------------------------------------------------*/ // TASK LOG DELETE /*-------------------------------------------------------------------------*/ - + function task_log_delete() { //----------------------------------------- // SHOW 'EM //----------------------------------------- - + $prune = $this->ipsclass->input['task_prune'] ? $this->ipsclass->input['task_prune'] : 30; $prune = time() - ( $prune * 86400 ); - + if ( $this->ipsclass->input['task_id'] != -1 ) { $where = "log_title='".$this->ipsclass->input['task_id']."' AND log_date < $prune"; @@ -365,28 +356,28 @@ class ad_task_manager { $where = "log_date < $prune"; } - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'task_logs', 'where' => $where ) ); - - $this->ipsclass->main_msg = 'Выбранные записи выполненных задач удалены'; + + $this->ipsclass->main_msg = 'Selected Task Logs Removed'; $this->task_log_setup(); } - + /*-------------------------------------------------------------------------*/ // TASK LOG SHOW /*-------------------------------------------------------------------------*/ - + function task_log_show() { $this->ipsclass->admin->nav[] = array( '', 'Viewing Task Logs' ); - + //----------------------------------------- // SHOW 'EM //----------------------------------------- - + $limit = $this->ipsclass->input['task_count'] ? $this->ipsclass->input['task_count'] : 30; $limit = $limit > 150 ? 150 : intval($limit); - + if ( $this->ipsclass->input['task_id'] != -1 ) { $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'task_logs', 'where' => "log_title='".$this->ipsclass->input['task_id']."'", 'order' => 'log_date DESC', 'limit' => array(0,$limit) ) ); @@ -395,16 +386,16 @@ class ad_task_manager { $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'task_logs', 'order' => 'log_date DESC', 'limit' => array(0,$limit) ) ); } - + $this->ipsclass->DB->simple_exec(); - - $this->ipsclass->adskin->td_header[] = array( "Выполненная задача" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Дата" , "35%" ); - $this->ipsclass->adskin->td_header[] = array( "Информация", "45%" ); - - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Выбранные записи журнала задач" ); - + + $this->ipsclass->adskin->td_header[] = array( "Task Run" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Date Run" , "35%" ); + $this->ipsclass->adskin->td_header[] = array( "Log Info" , "45%" ); + + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Selected Task Logs" ); + if ( $this->ipsclass->DB->get_num_rows() ) { while ( $row = $this->ipsclass->DB->fetch_row() ) @@ -417,53 +408,53 @@ class ad_task_manager } else { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    Нет записей
    "); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    No results
    "); } - - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); - + } - + /*-------------------------------------------------------------------------*/ // TASK LOG START /*-------------------------------------------------------------------------*/ - + function task_log_setup() { - $this->ipsclass->admin->nav[] = array( '', 'Просмотр выполненных задач' ); - + $this->ipsclass->admin->nav[] = array( '', 'Viewing Task Logs' ); + //----------------------------------------- // Some set up //----------------------------------------- - - $tasks = array( 0 => array( -1, 'Все задачи' ) ); - + + $tasks = array( 0 => array( -1, 'All tasks' ) ); + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'task_manager', 'order' => 'task_title' ) ); $this->ipsclass->DB->simple_exec(); - + while ( $pee = $this->ipsclass->DB->fetch_row() ) { $tasks[] = array( $pee['task_title'], $pee['task_title'] ); } - + //----------------------------------------- // LAST FIVE ACTIONS //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'task_logs', 'order' => 'log_date DESC', 'limit' => array(0,5) ) ); $this->ipsclass->DB->simple_exec(); - - $this->ipsclass->adskin->td_header[] = array( "Выполненная задача" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Дата Время" , "35%" ); - $this->ipsclass->adskin->td_header[] = array( "Информация" , "45%" ); - - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "5 последних запущенных задач" ); - + + $this->ipsclass->adskin->td_header[] = array( "Task Run" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Date Run" , "35%" ); + $this->ipsclass->adskin->td_header[] = array( "Log Info" , "45%" ); + + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Last 5 Tasks Run" ); + if ( $this->ipsclass->DB->get_num_rows() ) { while ( $row = $this->ipsclass->DB->fetch_row() ) @@ -476,150 +467,150 @@ class ad_task_manager } else { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    Нет записей
    "); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    No results
    "); } - - - + + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // Show more... //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'task' ), 2 => array( 'code' , 'showlog' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Просмотр выполненных задач" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Задача", + + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "View Task Logs" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "View logs for task:", $this->ipsclass->adskin->form_dropdown( 'task_id', $tasks ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Сколько вывести записей?", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Show how many log entries?", $this->ipsclass->adskin->form_input( 'task_count', '30' ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Просмотр'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('View Logs'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- // Delete... //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'task' ), 2 => array( 'code' , 'deletelog' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); - - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Удаление записей" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Задача", + + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "DELETE Task Logs" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Delete logs for task:", $this->ipsclass->adskin->form_dropdown( 'task_id', $tasks ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Удалить выполненные задачи старше, чем (в днях):", + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Delete logs older than (in days)?", $this->ipsclass->adskin->form_input( 'task_prune', '30' ) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Удалить'); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form('DELETE Logs'); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->output(); - + } - + /*-------------------------------------------------------------------------*/ // UNLOCK TASK /*-------------------------------------------------------------------------*/ - + function task_unlock() { //----------------------------------------- // INIT //----------------------------------------- - + $task_id = intval( $this->ipsclass->input['task_id'] ); - + $this->ipsclass->DB->do_update( 'task_manager', array( 'task_locked' => 0 ), "task_id=".$task_id ); - - $this->ipsclass->main_msg = 'Закрытые задачи удалены'; + + $this->ipsclass->main_msg = 'Task lock removed'; $this->task_show_tasks(); } - + /*-------------------------------------------------------------------------*/ // RUN TASK /*-------------------------------------------------------------------------*/ - + function task_run_task() { //----------------------------------------- // INIT //----------------------------------------- - + $task_id = intval( $this->ipsclass->input['task_id'] ); - + //----------------------------------------- // Check //----------------------------------------- - + if ( ! $task_id ) { - $this->ipsclass->main_msg = 'Не указан ID задачи, действие не выполнено'; + $this->ipsclass->main_msg = 'No ID was passed, cannot save'; $this->task_show_tasks(); } - + $this_task = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'task_manager', 'where' => 'task_id='.$task_id ) ); - + if ( ! $this_task['task_id'] ) { - $this->ipsclass->main_msg = 'Нет задач для выполнения.'; + $this->ipsclass->main_msg = 'No task to run.'; $this->show_tasks(); } - + if ( ! $this_task['task_enabled'] ) { - $this->ipsclass->main_msg = "Эта задача отключена. Пожалуйста, включите ее до запуска."; + $this->ipsclass->main_msg = "This task has been disabled. Please enable the task before running it."; $this->task_show_tasks(); } - + //----------------------------------------- // Get new instance of functions //----------------------------------------- - + $func = new func_taskmanager(); $func->ipsclass =& $this->ipsclass; - + //----------------------------------------- // Locked? //----------------------------------------- - + if ( $this_task['task_locked'] > 0 ) { - $this->ipsclass->main_msg = "Эта задача была закрыта в ". gmdate( 'j M Y - G:i', $this_task['task_locked'] ) ." и не может быть запущена пока Вы ее не откроете снова."; + $this->ipsclass->main_msg = "This task was locked at ". gmdate( 'j M Y - G:i', $this_task['task_locked'] ) ." and cannot be run until unlocked."; $this->task_show_tasks(); } - + $newdate = $func->generate_next_run($this_task); - + $this->ipsclass->DB->do_update( 'task_manager', array( 'task_next_run' => $newdate, 'task_locked' => time() ), "task_id=".$this_task['task_id'] ); - + $func->save_next_run_stamp(); - + $func->root_path = ROOT_PATH; - + if ( file_exists( $func->root_path.'sources/tasks/'.$this_task['task_file'] ) ) { require_once( $func->root_path.'sources/tasks/'.$this_task['task_file'] ); @@ -627,103 +618,103 @@ class ad_task_manager $myobj->register_class( $func ); $myobj->pass_task( $this_task ); $myobj->run_task(); - - $this->ipsclass->main_msg = 'Задача успешно запущена'; + + $this->ipsclass->main_msg = 'Task run successfully'; $this->task_show_tasks(); } else { - $this->ipsclass->main_msg = 'Невозможно найти: '.$func->root_path.'sources/tasks/'.$this_task['task_file']; + $this->ipsclass->main_msg = 'Cannot locate: '.$func->root_path.'sources/tasks/'.$this_task['task_file']; $this->task_show_tasks(); } } - + /*-------------------------------------------------------------------------*/ // DELETE TASK /*-------------------------------------------------------------------------*/ - + function task_delete_task() { //----------------------------------------- // INIT //----------------------------------------- - + $task_id = intval( $this->ipsclass->input['task_id'] ); - + //----------------------------------------- // Check //----------------------------------------- - + $task = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'task_manager', 'where' => "task_id=$task_id" ) ); - + if ( $task['task_safemode'] and ! IN_DEV ) { - $this->ipsclass->main_msg = "Вы не можете удалить эту задачу."; + $this->ipsclass->main_msg = "You are unable to delete this task."; $this->task_show_tasks(); return; } - + //----------------------------------------- // Remove from the DB //----------------------------------------- - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'task_manager', 'where' => 'task_id='.$task_id ) ); - + $this->functions->save_next_run_stamp(); - - $this->ipsclass->main_msg = 'Задача удалена!'; - + + $this->ipsclass->main_msg = 'Task deleted'; + $this->task_show_tasks(); } - + /*-------------------------------------------------------------------------*/ // DO SAVE /*-------------------------------------------------------------------------*/ - + function task_do_save($type='edit') { //----------------------------------------- // INIT //----------------------------------------- - + $task_id = intval($this->ipsclass->input['task_id']); $task_cronkey = $this->ipsclass->input['task_cronkey']; - + //----------------------------------------- // Check... //----------------------------------------- - + if ( $type == 'edit' ) { if ( ! $task_id ) { - $this->ipsclass->main_msg = 'Не указан ID задачи, действие не выполнено'; + $this->ipsclass->main_msg = 'No ID was passed, cannot save'; $this->task_form(); } } - + if ( ! $this->ipsclass->input['task_title'] ) { - $this->ipsclass->main_msg = 'Вы должны ввести название задачи.'; + $this->ipsclass->main_msg = 'You must enter a task title.'; $this->task_form(); } - + if ( ! $this->ipsclass->input['task_file'] ) { - $this->ipsclass->main_msg = 'Вы должны ввести имя файла для исполнения'; + $this->ipsclass->main_msg = 'You must enter a filename for this task to run'; $this->task_form(); } - + //----------------------------------------- // Check the task file... //----------------------------------------- - + $this->ipsclass->input['task_file'] = preg_replace( '#\.{1,}#s', '.', $this->ipsclass->input['task_file'] ); - + //----------------------------------------- // Compile task //----------------------------------------- - + $save = array( 'task_title' => $this->ipsclass->input['task_title'], 'task_description' => $this->ipsclass->input['task_description'], 'task_file' => $this->ipsclass->input['task_file'], @@ -735,100 +726,100 @@ class ad_task_manager 'task_cronkey' => $this->ipsclass->input['task_cronkey'] ? $task_cronkey : md5(microtime()), 'task_enabled' => $this->ipsclass->input['task_enabled'] ); - + if ( IN_DEV ) { $save['task_key'] = $this->ipsclass->input['task_key']; $save['task_safemode'] = $this->ipsclass->input['task_safemode']; } - + //----------------------------------------- // Get next run date... //----------------------------------------- - + $save['task_next_run'] = $this->functions->generate_next_run( $save ); - + if ( $type == 'edit' ) { $this->ipsclass->DB->do_update( 'task_manager', $save, 'task_id='.$task_id ); - $this->ipsclass->main_msg = 'Задача успешно изменена'; + $this->ipsclass->main_msg = 'Task Edited Successfully'; } else { $this->ipsclass->DB->do_insert( 'task_manager', $save ); - $this->ipsclass->main_msg = 'Задача успешно сохранена'; + $this->ipsclass->main_msg = 'Task Saved Successfully'; } - + $this->functions->save_next_run_stamp(); - + $this->task_show_tasks(); } - - + + /*-------------------------------------------------------------------------*/ // Task Manager: Form /*-------------------------------------------------------------------------*/ - + function task_form($type='edit') { - $this->ipsclass->admin->nav[] = array( '', 'Добавление/изменение задачи' ); - + $this->ipsclass->admin->nav[] = array( '', 'Add/Edit Task' ); + //----------------------------------------- // Init Vars //----------------------------------------- - + $form = array(); $task_id = intval( $this->ipsclass->input['task_id'] ); - + # Drop downs $dropdows = array(); - + //----------------------------------------- // Edit or add? //----------------------------------------- - + if ( $type == 'edit' ) { - $button = "Отредактировать задачу"; + $button = "Edit Task"; $formbit = "task_edit_do"; $this->ipsclass->html_help_title = ""; $this->ipsclass->html_help_msg = ""; - + $task = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'task_manager', 'where' => "task_id=$task_id" ) ); - + if ( $task['task_safemode'] and ! IN_DEV ) { - $this->ipsclass->main_msg = "Вы не можете изменить эту задачу."; + $this->ipsclass->main_msg = "You are unable to edit this task."; $this->task_show_tasks(); return; } - - $title = "Изменение задачи: ".$group['cb_group_name']; + + $title = "Editing Task: ".$group['cb_group_name']; } else { - $button = "Добавить эту задачу"; + $button = "Create New Task"; $formbit = "task_add_do"; $this->ipsclass->html_help_title = ""; $this->ipsclass->html_help_msg = ""; $task = array(); - $title = "Добавление задачи"; + $title = "Creating New Task"; } - + //----------------------------------------- // Create drop downs //----------------------------------------- - - $dropdown['_minute'] = array( 0 => array( '-1', 'Каждую минуту' ) ); - $dropdown['_hour'] = array( 0 => array( '-1', 'Каждый час' ), 1 => array( '0', '0 - Полночь' ) ); - $dropdown['_wday'] = array( 0 => array( '-1', 'Каждый день недели' ) ); - $dropdown['_mday'] = array( 0 => array( '-1', 'Каждый день месяца' ) ); - + + $dropdown['_minute'] = array( 0 => array( '-1', 'Every Minute' ) ); + $dropdown['_hour'] = array( 0 => array( '-1', 'Every Hour' ), 1 => array( '0', '0 - Midnight' ) ); + $dropdown['_wday'] = array( 0 => array( '-1', 'Every Week Day' ) ); + $dropdown['_mday'] = array( 0 => array( '-1', 'Every Day of the Month' ) ); + for( $i = 0 ; $i < 60; $i++ ) { $dropdown['_minute'][] = array( $i, $i ); } - + for( $i = 1 ; $i < 24; $i++ ) { if ( $i < 12 ) @@ -837,33 +828,33 @@ class ad_task_manager } else if ( $i == 12 ) { - $ampm = 'Полдень'; + $ampm = 'Midday'; } else { $ampm = $i - 12 . ' pm'; } - + $dropdown['_hour'][] = array( $i, $i. ' - ('.$ampm.')' ); } - + for( $i = 1 ; $i < 32; $i++ ) { $dropdown['_mday'][] = array( $i, $i ); } - - $dropdown['_wday'][] = array( '0', 'Воскресенье' ); - $dropdown['_wday'][] = array( '1', 'Понедельник' ); - $dropdown['_wday'][] = array( '2', 'Вторник' ); - $dropdown['_wday'][] = array( '3', 'Среда' ); - $dropdown['_wday'][] = array( '4', 'Четверг' ); - $dropdown['_wday'][] = array( '5', 'Пятница' ); - $dropdown['_wday'][] = array( '6', 'Суббота' ); - + + $dropdown['_wday'][] = array( '0', 'Sunday' ); + $dropdown['_wday'][] = array( '1', 'Monday' ); + $dropdown['_wday'][] = array( '2', 'Tuesday' ); + $dropdown['_wday'][] = array( '3', 'Wednesday' ); + $dropdown['_wday'][] = array( '4', 'Thursday' ); + $dropdown['_wday'][] = array( '5', 'Friday' ); + $dropdown['_wday'][] = array( '6', 'Saturday' ); + //----------------------------------------- // Form elements //----------------------------------------- - + $form['task_title'] = $this->ipsclass->adskin->form_input( 'task_title' , $_POST['task_title'] ? $_POST['task_title'] : $task['task_title'] ); $form['task_description'] = $this->ipsclass->adskin->form_input( 'task_description', $_POST['task_description'] ? $_POST['task_description'] : $task['task_description'] ); $form['task_file'] = $this->ipsclass->adskin->form_simple_input( 'task_file' , $_POST['task_file'] ? $_POST['task_file'] : $task['task_file'] , '20' ); @@ -873,46 +864,46 @@ class ad_task_manager $form['task_month_day'] = $this->ipsclass->adskin->form_dropdown( 'task_month_day' , $dropdown['_mday'] , $_POST['task_month_day'] ? $_POST['task_month_day'] : $task['task_month_day'], 'onchange="updatepreview()"' ); $form['task_log'] = $this->ipsclass->adskin->form_yes_no( 'task_log' , $_POST['task_log'] ? $_POST['task_log'] : $task['task_log'] ); $form['task_enabled'] = $this->ipsclass->adskin->form_yes_no( 'task_enabled' , $_POST['task_enabled'] ? $_POST['task_enabled'] : $task['task_enabled'] ); - + if ( IN_DEV ) { $form['task_key'] = $this->ipsclass->adskin->form_input( 'task_key' , $_POST['task_key'] ? $_POST['task_key'] : $task['task_key'] ); $form['task_safemode'] = $this->ipsclass->adskin->form_yes_no( 'task_safemode', $_POST['task_safemode'] ? $_POST['task_safemode'] : $task['task_safemode'] ); } - + $this->ipsclass->html .= $this->html->task_manager_form( $form, $button, $formbit, $type, $title, $task ); - + $this->ipsclass->admin->output(); } - - + + /*-------------------------------------------------------------------------*/ // Task Manager: Overview /*-------------------------------------------------------------------------*/ - + function task_show_tasks() { //----------------------------------------- // INIT //----------------------------------------- - + $row = array(); $content = ""; - + //----------------------------------------- // List tasks (pointless comment) //----------------------------------------- - + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'task_manager', 'order' => 'task_safemode, task_next_run' ) ); $this->ipsclass->DB->simple_exec(); - + while ( $row = $this->ipsclass->DB->fetch_row() ) { $row['task_minute'] = $row['task_minute'] != '-1' ? $row['task_minute'] : '-'; $row['task_hour'] = $row['task_hour'] != '-1' ? $row['task_hour'] : '-'; $row['task_month_day'] = $row['task_month_day'] != '-1' ? $row['task_month_day'] : '-'; $row['task_week_day'] = $row['task_week_day'] != '-1' ? $row['task_week_day'] : '-'; - + if ( time() > $row['task_next_run'] ) { $row['_image'] = 'task_run_now.gif'; @@ -921,24 +912,24 @@ class ad_task_manager { $row['_image'] = 'task_run.gif'; } - + $row['_next_run'] = gmdate( 'j M Y - G:i', $row['task_next_run'] ); - + $row['_class'] = $row['task_enabled'] != 1 ? " style='color:gray'" : ''; - $row['_title'] = $row['task_enabled'] != 1 ? " (Отключено)" : ''; + $row['_title'] = $row['task_enabled'] != 1 ? " (Disabled)" : ''; $row['_next_run'] = $row['task_enabled'] != 1 ? "{$row['_next_run']}" : $row['_next_run']; - + $content .= $this->html->task_manager_row( $row ); } - + //------------------------------- // Print it //------------------------------- - + $this->ipsclass->html .= $this->html->task_manager_wrapper( $content, gmdate( 'jS F Y - h:i A' ) ); $this->ipsclass->admin->output(); } - + } ?> \ No newline at end of file diff --git a/upload/sources/action_admin/warnlogs.php b/upload/sources/action_admin/warnlogs.php index 061d82ac..da8ee855 100644 --- a/upload/sources/action_admin/warnlogs.php +++ b/upload/sources/action_admin/warnlogs.php @@ -2,26 +2,18 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ +| > $Date: 2007-05-08 16:35:01 -0400 (Tue, 08 May 2007) $ +| > $Revision: 981 $ +| > $Author: bfarber $ +--------------------------------------------------------------------------- | | > Warn Log functions @@ -36,216 +28,220 @@ if ( ! defined( 'IN_ACP' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } class ad_warnlogs { var $base_url; - + /** * Section title name * * @var string */ var $perm_main = "admin"; - + /** * Section title name * * @var string */ var $perm_child = "warnlog"; - + function auto_run() { - $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Журнал предупреждений' ); - + $this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Warn Logs' ); + //----------------------------------------- switch($this->ipsclass->input['code']) { - + case 'view': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->view(); break; - + case 'viewcontact': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->view_contact(); break; - + case 'viewnote': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' ); $this->view_note(); break; - + case 'remove': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->remove(); break; - - + + //----------------------------------------- default: $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' ); $this->list_current(); break; } - + } - + //----------------------------------------- // View NOTE in da pop up innit //----------------------------------------- - + function view_note() { if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Невозможно получить ID email, попробуйте снова"); + $this->ipsclass->admin->error("Could not resolve the email ID, please try again"); } - + //----------------------------------------- // Load and config the post parser //----------------------------------------- - + require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); $this->parser = new parse_bbcode(); $this->parser->ipsclass = $this->ipsclass; $this->parser->allow_update_caches = 1; - + $this->parser->bypass_badwords = intval($this->ipsclass->member['g_bypass_badwords']); - + $id = intval($this->ipsclass->input['id']); - + $this->ipsclass->DB->cache_add_query( 'warnlogs_view_note', array( 'id' => $id ) ); $this->ipsclass->DB->cache_exec_query(); - + if ( ! $row = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Невозможно получить ID email, попробуйте снова ($id)"); + $this->ipsclass->admin->error("Could not resolve the email ID, please try again ($id)"); } - + $this->ipsclass->adskin->td_header[] = array( " " , "100%" ); - + $content = preg_match( "#(.+?)#is", $row['wlog_notes'], $cont ); - + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Warn Notes" ); - + $row['date'] = $this->ipsclass->admin->get_date( $row['wlog_date'], 'LONG' ); - + + $row['a_name'] = $row['a_name'] ? $row['a_name'] : 'Deleted Member (ID:' . $row['wlog_mid'] . ')'; + $this->parser->parse_html = 0; $this->parser->parse_nl2br = 1; $this->parser->parse_smilies = 1; $this->parser->parse_bbcode = 1; - + $text = $this->parser->pre_display_parse( $this->parser->pre_db_parse($cont[1]) ); - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "От: {$row['p_name']} -
    Кому: {$row['a_name']} -
    Отправлено: {$row['date']} + "From: {$row['p_name']} +
    To: {$row['a_name']} +
    Sent: {$row['date']}

    $text " ) ); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->print_popup(); - - + + } - - + + //----------------------------------------- // View contact in da pop up innit //----------------------------------------- - + function view_contact() { if ($this->ipsclass->input['id'] == "") { - $this->ipsclass->admin->error("Невозможно получить ID email, попробуйте снова"); + $this->ipsclass->admin->error("Could not resolve the email ID, please try again"); } - + $id = intval($this->ipsclass->input['id']); - + $this->ipsclass->DB->cache_add_query( 'warnlogs_view_note', array( 'id' => $id ) ); $this->ipsclass->DB->cache_exec_query(); - + if ( ! $row = $this->ipsclass->DB->fetch_row() ) { - $this->ipsclass->admin->error("Невозможно получить ID email, попробуйте снова ($id)"); + $this->ipsclass->admin->error("Could not resolve the email ID, please try again ($id)"); } - - $type = $row['wlog_contact'] == 'pm' ? "Личное сообщение" : "EMAIL"; - + + $type = $row['wlog_contact'] == 'pm' ? "PM" : "EMAIL"; + $this->ipsclass->adskin->td_header[] = array( " " , "100%" ); - + $subject = preg_match( "#(.+?)#is", $row['wlog_contact_content'], $subj ); $content = preg_match( "#(.+?)#is", $row['wlog_contact_content'], $cont ); - + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( $type.": ".$subj[1] ); - - - + + + $row['date'] = $this->ipsclass->admin->get_date( $row['wlog_date'], 'LONG' ); - + + $row['a_name'] = $row['a_name'] ? $row['a_name'] : 'Deleted Member (ID:' . $row['wlog_mid'] . ')'; + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( - "От: {$row['p_name']} -
    Кому: {$row['a_name']} -
    Отправлено: {$row['date']} -
    Тема: $subj[1] + "From: {$row['p_name']} +
    To: {$row['a_name']} +
    Sent: {$row['date']} +
    Subject: $subj[1]

    $cont[1] " ) ); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + $this->ipsclass->admin->print_popup(); - - + + } - - - - + + + + //----------------------------------------- // Remove archived files //----------------------------------------- - + function view() { $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; - + $this->ipsclass->html .= ""; // removed js popwin - - $this->ipsclass->admin->page_detail = "Просмотр всех записей о предупреждений пользователя"; - $this->ipsclass->admin->page_title = "Журнал предупреждений"; - + + $this->ipsclass->admin->page_detail = "Viewing all warn entries on a member"; + $this->ipsclass->admin->page_title = "Warn Logs Manager"; + if ($this->ipsclass->input['search_string'] == "" and $this->ipsclass->input['mid']) { $this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(wlog_id) as count', 'from' => 'warn_logs', 'where' => "wlog_mid=".intval($this->ipsclass->input['mid']) ) ); $this->ipsclass->DB->simple_exec(); - + $row = $this->ipsclass->DB->fetch_row(); - + $row_count = $row['count']; - + $query = "&{$this->ipsclass->form_code}&mid={$this->ipsclass->input['mid']}&code=view"; - + $this->ipsclass->DB->cache_add_query( 'warnlogs_view', array( 'mid' => intval($this->ipsclass->input['mid']), 'start' => $start ) ); $this->ipsclass->DB->cache_exec_query(); } else { $this->ipsclass->input['search_string'] = urldecode($this->ipsclass->input['search_string']); - + if ( ($this->ipsclass->input['search_type'] == 'notes') ) { $dbq = "l.wlog_notes LIKE '%".$this->ipsclass->input['search_string']."%'"; @@ -254,115 +250,116 @@ class ad_warnlogs { { $dbq = "l.wlog_contact_content LIKE '%".$this->ipsclass->input['search_string']."%'"; } - + $this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(l.wlog_id) as count', 'from' => 'warn_logs l', 'where' => $dbq ) ); $this->ipsclass->DB->simple_exec(); - + $row = $this->ipsclass->DB->fetch_row(); - + $row_count = $row['count']; - + $query = "&{$this->ipsclass->form_code}&code=view&search_type={$this->ipsclass->input['search_type']}&search_string=".urlencode($this->ipsclass->input['search_string']); - + $this->ipsclass->DB->cache_add_query( 'warnlogs_view_two', array( 'dbq' => $dbq, 'start' => $start ) ); $this->ipsclass->DB->cache_exec_query(); } - + $links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $row_count, 'PER_PAGE' => 30, 'CUR_ST_VAL' => $start, - 'L_SINGLE' => "Страница", - 'L_MULTI' => "Страницы: ", + 'L_SINGLE' => "Single Page", + 'L_MULTI' => "Pages: ", 'BASE_URL' => $this->ipsclass->base_url.$query, ) ); - - $this->ipsclass->admin->page_detail = "В этой секции вы можете просматривать и управлять журналом предупреждений"; - $this->ipsclass->admin->page_title = "Журнал предупреждений"; - + + $this->ipsclass->admin->page_detail = "You may view warn entries added by your moderators"; + $this->ipsclass->admin->page_title = "Warn Logs Manager"; + //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( "Тип" , "5%" ); - $this->ipsclass->adskin->td_header[] = array( "Пользователь" , "15%" ); - $this->ipsclass->adskin->td_header[] = array( "Уведомлен?" , "5%" ); - $this->ipsclass->adskin->td_header[] = array( "Проверка сообщений" , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Бан" , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Запрет сообщений" , "10%" ); - $this->ipsclass->adskin->td_header[] = array( "Время" , "15%" ); - $this->ipsclass->adskin->td_header[] = array( "Модератор" , "15%" ); - $this->ipsclass->adskin->td_header[] = array( "Посмотреть заметки" , "10%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Журнал предупреждений" ); + + $this->ipsclass->adskin->td_header[] = array( "Type" , "5%" ); + $this->ipsclass->adskin->td_header[] = array( "Member Name" , "15%" ); + $this->ipsclass->adskin->td_header[] = array( "Contacted" , "5%" ); + $this->ipsclass->adskin->td_header[] = array( "MOD Q" , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "SUSP" , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "NO POST" , "10%" ); + $this->ipsclass->adskin->td_header[] = array( "Date" , "15%" ); + $this->ipsclass->adskin->td_header[] = array( "Warned By" , "15%" ); + $this->ipsclass->adskin->td_header[] = array( "View Note" , "10%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Warn Logs" ); $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader'); - - $days = array( 'd' => "Дней", 'h' => "часов" ); - + + $days = array( 'd' => "Days", 'h' => "Hours" ); + if ( $this->ipsclass->DB->get_num_rows() ) { while ( $row = $this->ipsclass->DB->fetch_row() ) { - + $row['a_name'] = $row['a_name'] ? $row['a_name'] : 'Deleted Member (ID:' . $row['wlog_mid'] . ')'; + $row['wlog_date'] = $this->ipsclass->admin->get_date( $row['wlog_date'], 'LONG' ); - + $type = ( $row['wlog_type'] == 'pos' ) ? '-' : '+'; - $cont = ( $row['wlog_contact'] != 'none' ) ? "
    Просмотр
    " : ' '; - + $cont = ( $row['wlog_contact'] != 'none' ) ? "
    View
    " : ' '; + $mod = preg_match( "#(.+?)#is" , $row['wlog_notes'], $mm ); $post = preg_match( "#(.+?)#is" , $row['wlog_notes'], $pm ); $susp = preg_match( "#(.+?)#is" , $row['wlog_notes'], $sm ); $content = preg_match( "#(.+?)#is", $row['wlog_notes'], $cm ); - + $content = $cm[1]; - + $mod = trim($mm[1]); $post = trim($pm[1]); $susp = trim($sm[1]); - + list($v, $u, $i) = explode(',', $mod); - + if ( $i == 1 ) { - $mod = 'Не определено'; + $mod = 'INDEF'; } else if ( $v == "" ) { - $mod = 'Нет'; + $mod = 'None'; } else { $mod = $v.' '.$days[$u]; } - + //----------------------------------------- - + list($v, $u, $i) = explode(',', $post); - + if ( $i == 1 ) { - $post = 'Не определено'; + $post = 'INDEF'; } else if ( $v == "" ) { - $post = 'Нет'; + $post = 'None'; } else { $post = $v.' '.$days[$u]; } - + list($v, $u) = explode(',', $susp); - + if ( $v == "" ) { - $susp = 'нет'; + $susp = 'None'; } else { $susp = $v.' '.$days[$u]; } - + //----------------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "
    $type
    ", "{$row['a_name']}", @@ -372,83 +369,85 @@ class ad_warnlogs { $post, "{$row['wlog_date']}", "{$row['p_name']}", - "
    Просмотр
    " + "
    View
    " ) ); } } else { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    Нет записей
    "); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    No results
    "); } - + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader'); - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - + + //----------------------------------------- //------------------------------- - + $this->ipsclass->admin->output(); - + } - + //----------------------------------------- // Remove archived files //----------------------------------------- - + function remove() { if ($this->ipsclass->input['mid'] == "") { - $this->ipsclass->admin->error("Вы не выбрали пользователя, которому необходимо удалить предупреждение."); + $this->ipsclass->admin->error("You did not select a member ID to remove by!"); } - + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'warn_logs', 'where' => "wlog_mid=".intval($this->ipsclass->input['mid']) ) ); - - $this->ipsclass->admin->save_log("Предупреждение удалено"); - - $this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}"); + + $this->ipsclass->admin->save_log("Removed Warn Logs"); + + $this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}"); } - - + + //----------------------------------------- // SHOW LOGS //----------------------------------------- - + function list_current() { $form_array = array(); - - $this->ipsclass->admin->page_detail = "В этой секции вы можете просматривать и управлять журналом предупреждений.
    Примечание: удаление записей из журнала не понижает уровень предупреждений пользователя."; - $this->ipsclass->admin->page_title = "Журнал предупреждений"; - + + $this->ipsclass->admin->page_detail = "You may view and remove warn actions performed by your staff.
    Note: Removing the logs does not decrease the member's warn level"; + $this->ipsclass->admin->page_title = "Warn Logs Manager"; + $this->ipsclass->html .= ""; // removed js popwin - + //----------------------------------------- // VIEW LAST 5 //----------------------------------------- - + $this->ipsclass->DB->cache_add_query( 'warnlogs_list_current', array() ); $this->ipsclass->DB->cache_exec_query(); + + $this->ipsclass->adskin->td_header[] = array( "Type" , "5%" ); + $this->ipsclass->adskin->td_header[] = array( "Warned Member" , "25%" ); + $this->ipsclass->adskin->td_header[] = array( "Contacted?" , "5%" ); + $this->ipsclass->adskin->td_header[] = array( "Date" , "25%" ); + $this->ipsclass->adskin->td_header[] = array( "Warned By" , "25%" ); - $this->ipsclass->adskin->td_header[] = array( "Тип" , "5%" ); - $this->ipsclass->adskin->td_header[] = array( "Пользователь" , "25%" ); - $this->ipsclass->adskin->td_header[] = array( "Уведомлен?" , "5%" ); - $this->ipsclass->adskin->td_header[] = array( "Время" , "25%" ); - $this->ipsclass->adskin->td_header[] = array( "Модератор" , "25%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Последние 10 записей" ); + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Last 10 Warn Entries" ); if ( $this->ipsclass->DB->get_num_rows() ) { while ( $row = $this->ipsclass->DB->fetch_row() ) { + $row['a_name'] = $row['a_name'] ? $row['a_name'] : 'Deleted Member (ID:' . $row['wlog_mid'] . ')'; + $row['wlog_date'] = $this->ipsclass->admin->get_date( $row['wlog_date'], 'LONG' ); - + $type = ( $row['wlog_type'] == 'pos' ) ? '-' : '+'; - $cont = ( $row['wlog_contact'] != 'none' ) ? "
    X
    " : ' '; - + $cont = ( $row['wlog_contact'] != 'none' ) ? "
    X
    " : ' '; + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "
    $type
    ", "{$row['a_name']}", @@ -460,79 +459,80 @@ class ad_warnlogs { } else { - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    Нет записей
    "); + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("
    No results
    "); } - + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- - - $this->ipsclass->adskin->td_header[] = array( "Пользователь" , "30%" ); - $this->ipsclass->adskin->td_header[] = array( "Время предупреждения" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Просмотр всех предупреждений" , "20%" ); - $this->ipsclass->adskin->td_header[] = array( "Удаление всех предупреждений" , "30%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Журнал предупреждений" ); - + + $this->ipsclass->adskin->td_header[] = array( "Member Name" , "30%" ); + $this->ipsclass->adskin->td_header[] = array( "Times Warned" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "View all by member" , "20%" ); + $this->ipsclass->adskin->td_header[] = array( "Remove all by member" , "30%" ); + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Warn Logs" ); + $this->ipsclass->DB->cache_add_query( 'warnlogs_list_current_two', array() ); $this->ipsclass->DB->cache_exec_query(); - + while ( $r = $this->ipsclass->DB->fetch_row() ) { - + $r['members_display_name'] = $r['members_display_name'] ? $r['members_display_name'] : 'Deleted Member (ID:' . $r['wlog_mid'] . ')'; + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "{$r['members_display_name']}", "
    {$r['act_count']}
    ", - "
    Просмотр
    ", - "
    Удалить
    ", + "
    View
    ", + "
    Remove
    ", ) ); } - - - + + + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - - + + //----------------------------------------- //------------------------------- - + $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'view' ), 2 => array( 'act' , 'warnlog' ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); - + $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); - - $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Поиск действий в журнале" ); - + + $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Search Warn Logs" ); + $form_array = array( - 0 => array( 'notes' , 'Заметки' ), - 1 => array( 'contact', 'Отправка Email/PM' ), + 0 => array( 'notes' , 'Entry Notes' ), + 1 => array( 'contact', 'Email/PM Sent' ), ); - + //----------------------------------------- - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Искать " , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Search for..." , $this->ipsclass->adskin->form_input( "search_string") ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Искать в " , + + $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Search in..." , $this->ipsclass->adskin->form_dropdown( "search_type", $form_array) ) ); - - $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Искать"); - + + $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Search"); + $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); - + //----------------------------------------- //------------------------------- - + $this->ipsclass->admin->output(); - + } - - - + + + } diff --git a/upload/sources/action_admin/xmlout.php b/upload/sources/action_admin/xmlout.php index ee0f9f1c..d94f7dc6 100644 --- a/upload/sources/action_admin/xmlout.php +++ b/upload/sources/action_admin/xmlout.php @@ -1,384 +1,299 @@ - $Date: 2006-12-13 05:41:32 -0500 (Wed, 13 Dec 2006) $ -| > $Revision: 788 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > XML OUT Functions for XmlHttpRequest functions -| > Module written by Matt Mecham -| > Date started: Friday 18th March 2005 -| -| > Module Version Number: 1.1.0 -+-------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_IPB' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - -class ad_xmlout -{ - # Classes - var $ipsclass; - var $search; - - var $xml_output; - var $xml_header; - - /*-------------------------------------------------------------------------*/ - // Constructor - /*-------------------------------------------------------------------------*/ - - function xmlout() - { - $this->xml_header = ''; - } - - /*-------------------------------------------------------------------------*/ - // Auto run - /*-------------------------------------------------------------------------*/ - - function auto_run() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - if ( isset($this->ipsclass->input['j_do']) AND $this->ipsclass->input['j_do'] ) - { - $this->ipsclass->input['do'] = $this->ipsclass->input['j_do']; - } - - //----------------------------------------- - // What shall we do? - //----------------------------------------- - - switch( $this->ipsclass->input['do'] ) - { - case 'get-template-names': - $this->get_template_names(); - break; - case 'get-member-names': - $this->get_member_names(); - break; - case 'get-dir-size': - $this->get_dir_size(); - break; - case 'post-editorswitch': - $this->post_editorswitch(); - break; - case 'captcha_test': - $this->captcha_test(); - break; - } - } - - /*-------------------------------------------------------------------------*/ - // Switch editors - /*-------------------------------------------------------------------------*/ - - function captcha_test() - { - //----------------------------------------- - // Generate number - //----------------------------------------- - - mt_srand( (double) microtime() * 1000000 ); - $final_rand = md5( uniqid( mt_rand(), TRUE ) ); - mt_srand(); - - for( $i = 0; $i < 6; $i++ ) - { - $captcha_string .= $final_rand{ mt_rand(0, 31) }; - } - - //----------------------------------------- - // Generate image - //----------------------------------------- - - require_once( KERNEL_PATH . 'class_captcha.php' ); - $class_captcha = new class_captcha(); - $class_captcha->ipsclass =& $this->ipsclass; - $class_captcha->path_background = ROOT_PATH . 'style_captcha/captcha_backgrounds'; - $class_captcha->path_fonts = ROOT_PATH . 'style_captcha/captcha_fonts'; - - return $class_captcha->captcha_show_gd_img( $captcha_string ); - } - - /*-------------------------------------------------------------------------*/ - // Switch editors - /*-------------------------------------------------------------------------*/ - - function post_editorswitch() - { - //----------------------------------------- - // Grab public class and do... - //----------------------------------------- - - require_once( ROOT_PATH . 'sources/action_public/xmlout.php' ); - $lib = new xmlout(); - $lib->ipsclass =& $this->ipsclass; - - require_once( KERNEL_PATH . 'class_ajax.php' ); - $class_ajax = new class_ajax(); - $class_ajax->ipsclass =& $this->ipsclass; - $lib->class_ajax =& $class_ajax; - - return $lib->post_editorswitch(); - } - - /*-------------------------------------------------------------------------*/ - // Get uploads size - /*-------------------------------------------------------------------------*/ - - function get_dir_size() - { - //----------------------------------------- - // Make sure the uploads path is correct - //----------------------------------------- - - $uploads_size = 0; - - if ($dh = @opendir( $this->ipsclass->vars['upload_dir'] )) - { - while ( false !== ( $file = @readdir( $dh ) ) ) - { - if ( ! preg_match( "/^..?$|^index/i", $file ) ) - { - if( is_dir( $this->ipsclass->vars['upload_dir'] . "/" . $file ) ) - { - if( $sub_dh = @opendir( $this->ipsclass->vars['upload_dir'] . "/" . $file )) - { - while ( false !== ( $sub_file = @readdir( $sub_dh ) ) ) - { - if ( ! preg_match( "/^..?$|^index/i", $sub_file ) ) - { - $uploads_size += @filesize( $this->ipsclass->vars['upload_dir'] . "/" . $file . "/" . $sub_file ); - } - } - } - } - else - { - $uploads_size += @filesize( $this->ipsclass->vars['upload_dir'] . "/" . $file ); - } - } - } - @closedir( $dh ); - } - - //----------------------------------------- - // This piece of code from Jesse's (jesse@jess.on.ca) contribution - // to the PHP manual @ php.net posted without license - //----------------------------------------- - - if ($uploads_size >= 1048576) - { - $uploads_size = round($uploads_size / 1048576 * 100 ) / 100 . " мб"; - } - else if ($uploads_size >= 1024) - { - $uploads_size = round($uploads_size / 1024 * 100 ) / 100 . " кб"; - } - else - { - $uploads_size = $uploads_size . " байт"; - } - - $this->print_nocache_headers(); - @header( "Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}" ); - print $uploads_size; - exit(); - } - - /*-------------------------------------------------------------------------*/ - // Get new posts - /*-------------------------------------------------------------------------*/ - - function get_member_names() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $name = $this->ipsclass->parse_clean_value( rawurldecode( $_REQUEST['name'] ) ); - - //-------------------------------------------- - // Load extra db cache file - //-------------------------------------------- - - $this->ipsclass->DB->load_cache_file( ROOT_PATH.'sources/sql/'.SQL_DRIVER.'_extra_queries.php', 'sql_extra_queries' ); - - //----------------------------------------- - // Check length - //----------------------------------------- - - if ( strlen( $name ) < 3 ) - { - $this->return_null(); - } - - //----------------------------------------- - // Try query... - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'member_display_name_lookup', array( 'name' => $name, 'field' => 'members_display_name' ), 'sql_extra_queries' ); - $this->ipsclass->DB->cache_exec_query(); - - //----------------------------------------- - // Got any results? - //----------------------------------------- - - if ( ! $this->ipsclass->DB->get_num_rows() ) - { - $this->return_null(); - } - - $names = array(); - $ids = array(); - - while( $r = $this->ipsclass->DB->fetch_row() ) - { - $names[] = '"'.$r['members_display_name'].'"'; - $ids[] = intval($r['id']); - } - - $this->print_nocache_headers(); - @header( "Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}" ); - print "returnSearch( '".str_replace( "'", "", $name )."', new Array(".implode( ",", $names )."), new Array(".implode( ",", $ids ).") );"; - exit(); - } - - /*-------------------------------------------------------------------------*/ - // Get template names - /*-------------------------------------------------------------------------*/ - - function get_template_names() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $name = $this->ipsclass->parse_clean_value( urldecode( $_REQUEST['name'] ) ); - $id = intval( $_REQUEST['id'] ); - - //----------------------------------------- - // Get $skin_names stuff - //----------------------------------------- - - require_once( ROOT_PATH.'sources/lib/skin_info.php' ); - - //----------------------------------------- - // Check length - //----------------------------------------- - - if ( strlen( $name ) < 3 ) - { - $this->return_null(); - } - - //----------------------------------------- - // Try query... - //----------------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => "suid,set_id,group_name,func_name", - 'from' => 'skin_templates', - 'where' => "set_id=1 AND LOWER(func_name) LIKE '{$name}%'", - 'order' => 'LENGTH(func_name) ASC', - 'limit' => array( 0,20 ) ) ); - - $this->ipsclass->DB->exec_query(); - - $names = array(); - $ids = array(); - - while( $r = $this->ipsclass->DB->fetch_row() ) - { - $names[] = '"'.$r['func_name'].' ('.$r['group_name'].')"'; - $ids[] = intval($r['suid']); - } - - $this->print_nocache_headers(); - @header( "Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}" ); - print "returnSearch( '".str_replace( "'", "", $name )."', new Array(".implode( ",", $names )."), new Array(".implode( ",", $ids ).") );"; - exit(); - } - - - /*-------------------------------------------------------------------------*/ - // make string XML safe - /*-------------------------------------------------------------------------*/ - - function _make_safe_for_xml( $t ) - { - return str_replace( '&#39;', ''', htmlspecialchars( $t ) ); - } - - /*-------------------------------------------------------------------------*/ - // Print no cache headers - /*-------------------------------------------------------------------------*/ - - function print_nocache_headers() - { - header("HTTP/1.0 200 OK"); - header("HTTP/1.1 200 OK"); - header("Cache-Control: no-cache, must-revalidate, max-age=0"); - header("Expires: 0"); - header("Pragma: no-cache"); - } - - /*-------------------------------------------------------------------------*/ - // Error handler - /*-------------------------------------------------------------------------*/ - - function error_handler() - { - @header( "Content-type: text/xml;charset={$this->ipsclass->vars['gb_char_set']}" ); - $this->xml_output = $this->xml_header."\r\n\r\n"; - $this->xml_output .= "Вы должны быть авторизованы, чтобы получить доступ\r\n"; - $this->xml_output .= ""; - print $this->xml_output; - exit(); - } - - /*-------------------------------------------------------------------------*/ - // Return NOTHING :o - /*-------------------------------------------------------------------------*/ - - function return_null($val=0) - { - @header( "Content-type: text/xml;charset={$this->ipsclass->vars['gb_char_set']}" ); - print $this->xml_header."\r\n{$val}"; exit(); - } - - - - - - - -} - + $Date: 2008-10-02 15:26:24 -0400 (Thu, 02 Oct 2008) $ +| > $Revision: 2579 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > XML OUT Functions for XmlHttpRequest functions +| > Module written by Matt Mecham +| > Date started: Friday 18th March 2005 +| +| > Module Version Number: 1.1.0 ++-------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class ad_xmlout +{ + # Classes + var $ipsclass; + var $class_ajax; + var $search; + + var $xml_output; + var $xml_header; + + /*-------------------------------------------------------------------------*/ + // Constructor + /*-------------------------------------------------------------------------*/ + + function xmlout() + { + $this->xml_header = ''; + } + + /*-------------------------------------------------------------------------*/ + // Auto run + /*-------------------------------------------------------------------------*/ + + function auto_run() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + if ( isset($this->ipsclass->input['j_do']) AND $this->ipsclass->input['j_do'] ) + { + $this->ipsclass->input['do'] = $this->ipsclass->input['j_do']; + } + + //----------------------------------------- + // Load ajax class + //----------------------------------------- + + require_once( KERNEL_PATH . 'class_ajax.php' ); + + $this->class_ajax = new class_ajax(); + $this->class_ajax->ipsclass =& $this->ipsclass; + $this->class_ajax->class_init(); + + //----------------------------------------- + // What shall we do? + //----------------------------------------- + + switch( $this->ipsclass->input['do'] ) + { + case 'get-template-names': + $this->get_template_names(); + break; + case 'get-member-names': + $this->get_member_names(); + break; + case 'get-dir-size': + $this->get_dir_size(); + break; + case 'post-editorswitch': + $this->post_editorswitch(); + break; + } + } + + /*-------------------------------------------------------------------------*/ + // Switch editors + /*-------------------------------------------------------------------------*/ + + function post_editorswitch() + { + //----------------------------------------- + // Grab public class and do... + //----------------------------------------- + + require_once( ROOT_PATH . 'sources/action_public/xmlout.php' ); + $lib = new xmlout(); + $lib->ipsclass =& $this->ipsclass; + + require_once( KERNEL_PATH . 'class_ajax.php' ); + $class_ajax = new class_ajax(); + $class_ajax->ipsclass =& $this->ipsclass; + $lib->class_ajax =& $class_ajax; + + return $lib->post_editorswitch(); + } + + /*-------------------------------------------------------------------------*/ + // Get uploads size + /*-------------------------------------------------------------------------*/ + + function get_dir_size() + { + //----------------------------------------- + // Make sure the uploads path is correct + //----------------------------------------- + + $uploads_size = 0; + + if ($dh = @opendir( $this->ipsclass->vars['upload_dir'] )) + { + while ( false !== ( $file = @readdir( $dh ) ) ) + { + if ( ! preg_match( "/^..?$|^index/i", $file ) ) + { + if( is_dir( $this->ipsclass->vars['upload_dir'] . "/" . $file ) ) + { + if( $sub_dh = @opendir( $this->ipsclass->vars['upload_dir'] . "/" . $file )) + { + while ( false !== ( $sub_file = @readdir( $sub_dh ) ) ) + { + if ( ! preg_match( "/^..?$|^index/i", $sub_file ) ) + { + $uploads_size += @filesize( $this->ipsclass->vars['upload_dir'] . "/" . $file . "/" . $sub_file ); + } + } + } + } + else + { + $uploads_size += @filesize( $this->ipsclass->vars['upload_dir'] . "/" . $file ); + } + } + } + @closedir( $dh ); + } + + //----------------------------------------- + // This piece of code from Jesse's (jesse@jess.on.ca) contribution + // to the PHP manual @ php.net posted without license + //----------------------------------------- + + if ($uploads_size >= 1048576) + { + $uploads_size = round($uploads_size / 1048576 * 100 ) / 100 . " mb"; + } + else if ($uploads_size >= 1024) + { + $uploads_size = round($uploads_size / 1024 * 100 ) / 100 . " k"; + } + else + { + $uploads_size = $uploads_size . " bytes"; + } + + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( $uploads_size ); + } + + /*-------------------------------------------------------------------------*/ + // Get new posts + /*-------------------------------------------------------------------------*/ + + function get_member_names() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $name = $this->class_ajax->convert_and_make_safe( $this->ipsclass->input['name'], 0 ); + + //-------------------------------------------- + // Load extra db cache file + //-------------------------------------------- + + $this->ipsclass->DB->load_cache_file( ROOT_PATH.'sources/sql/'.SQL_DRIVER.'_extra_queries.php', 'sql_extra_queries' ); + + //----------------------------------------- + // Check length + //----------------------------------------- + + if ( strlen( $name ) < 3 ) + { + $this->class_ajax->return_null(); + } + + //----------------------------------------- + // Try query... + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'member_display_name_lookup', array( 'name' => $name, 'field' => 'members_display_name' ), 'sql_extra_queries' ); + $this->ipsclass->DB->cache_exec_query(); + + //----------------------------------------- + // Got any results? + //----------------------------------------- + + if ( ! $this->ipsclass->DB->get_num_rows() ) + { + $this->class_ajax->return_null(); + } + + $names = array(); + $ids = array(); + + while( $r = $this->ipsclass->DB->fetch_row() ) + { + $names[] = '"'.$r['members_display_name'].'"'; + $ids[] = intval($r['id']); + } + + $this->class_ajax->print_nocache_headers(); + @header( "Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}" ); + print "returnSearch( '".str_replace( "'", "", $name )."', new Array(".implode( ",", $names )."), new Array(".implode( ",", $ids ).") );"; + exit(); + } + + /*-------------------------------------------------------------------------*/ + // Get template names + /*-------------------------------------------------------------------------*/ + + function get_template_names() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $name = $this->class_ajax->convert_and_make_safe( $this->ipsclass->input['name'], 0 ); + $id = intval( $this->ipsclass->input['id'] ); + + //----------------------------------------- + // Get $skin_names stuff + //----------------------------------------- + + require_once( ROOT_PATH.'sources/lib/skin_info.php' ); + + //----------------------------------------- + // Check length + //----------------------------------------- + + if ( strlen( $name ) < 3 ) + { + $this->class_ajax->return_null(); + } + + //----------------------------------------- + // Try query... + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => "suid,set_id,group_name,func_name", + 'from' => 'skin_templates', + 'where' => "set_id=1 AND LOWER(func_name) LIKE '{$name}%'", + 'order' => 'LENGTH(func_name) ASC', + 'limit' => array( 0,20 ) ) ); + + $this->ipsclass->DB->exec_query(); + + $names = array(); + $ids = array(); + + while( $r = $this->ipsclass->DB->fetch_row() ) + { + $names[] = '"'.$r['func_name'].' ('.$r['group_name'].')"'; + $ids[] = intval($r['suid']); + } + + $this->class_ajax->print_nocache_headers(); + @header( "Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}" ); + print "returnSearch( '".str_replace( "'", "", $name )."', new Array(".implode( ",", $names )."), new Array(".implode( ",", $ids ).") );"; + exit(); + } + + + +} + ?> \ No newline at end of file diff --git a/upload/sources/action_public/announcements.php b/upload/sources/action_public/announcements.php index 19666b07..14ac319c 100644 --- a/upload/sources/action_public/announcements.php +++ b/upload/sources/action_public/announcements.php @@ -2,27 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-10-17 16:30:46 -0500 (Tue, 17 Oct 2006) $ -| > $Revision: 652 $ +| > $Date: 2007-07-02 16:26:19 -0400 (Mon, 02 Jul 2007) $ +| > $Revision: 1080 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -38,7 +28,7 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; exit(); } @@ -70,6 +60,9 @@ class announcements $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) ); } + $this->ipsclass->load_language( 'lang_topic' ); + $this->ipsclass->load_template( 'skin_topic' ); + //----------------------------------------- // Get the announcement //----------------------------------------- @@ -119,59 +112,34 @@ class announcements { $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) ); } + + if( !$announce['announce_active'] AND !$this->ipsclass->member['g_is_supmod'] ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) ); + } - //----------------------------------------- - // Mkay, get the require libraries - //----------------------------------------- - - require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); - $parser = new parse_bbcode(); - $parser->ipsclass =& $this->ipsclass; - $parser->allow_update_caches = 1; - $parser->bypass_badwords = intval($this->ipsclass->member['g_bypass_badwords']); - - require_once( ROOT_PATH.'sources/action_public/topics.php' ); - $topic = new topics(); - $topic->ipsclass =& $this->ipsclass; - - $topic->topic_init(); - - $topic->topic['forum_id'] = 0; - $topic->topic['tid'] = 0; - //----------------------------------------- // Parsey parsey! //----------------------------------------- - $member = $topic->parse_member( $announce ); + $member = $this->ipsclass->parse_member( $announce, 0, 'skin_topic' ); if ( $member['id'] ) { $member['_members_display_name'] = "{$member['members_display_name_short']}"; } - //----------------------------------------- - // Parse HTML tag on the fly - //----------------------------------------- - - $parser->parse_smilies = 1; - $parser->parse_html = $announce['announce_html_enabled']; - $parser->parse_bbcode = 1; - $parser->parse_nl2br = 1; - - $announce['announce_post'] = $parser->pre_display_parse( $parser->pre_db_parse( $announce['announce_post'] ) ); - if ( $announce['announce_start'] and $announce['announce_end'] ) { - $announce['running_date'] = sprintf( $this->ipsclass->lang['announce_both'], gmdate( 'd.m.Y', $announce['announce_start'] ), gmdate( 'd.m.Y', $announce['announce_end'] ) ); + $announce['running_date'] = sprintf( $this->ipsclass->lang['announce_both'], gmdate( 'jS F Y', $announce['announce_start'] ), gmdate( 'jS F Y', $announce['announce_end'] ) ); } else if ( $announce['announce_start'] and ! $announce['announce_end'] ) { - $announce['running_date'] = sprintf( $this->ipsclass->lang['announce_start'], gmdate( 'd.m.Y', $announce['announce_start'] ) ); + $announce['running_date'] = sprintf( $this->ipsclass->lang['announce_start'], gmdate( 'jS F Y', $announce['announce_start'] ) ); } else if ( ! $announce['announce_start'] and $announce['announce_end'] ) { - $announce['running_date'] = sprintf( $this->ipsclass->lang['announce_end'], gmdate( 'd.m.Y', $announce['announce_end'] ) ); + $announce['running_date'] = sprintf( $this->ipsclass->lang['announce_end'], gmdate( 'jS F Y', $announce['announce_end'] ) ); } else { @@ -197,8 +165,7 @@ class announcements $this->ipsclass->DB->simple_shutdown_exec(); $this->ipsclass->print->add_output( $this->output ); - $this->ipsclass->print->do_output( array( 'TITLE' => $this->ipsclass->vars['board_name']." -> ".$this->ipsclass->forums->forum_by_id[ $this->ipsclass->input['f'] ]['name'], - 'JS' => 0, + $this->ipsclass->print->do_output( array( 'TITLE' => $this->ipsclass->vars['board_name']." -> ". $announce['announce_title'], 'NAV' => $this->nav, ) ); diff --git a/upload/sources/action_public/attach.php b/upload/sources/action_public/attach.php index 4532c8dc..b11b6a30 100644 --- a/upload/sources/action_public/attach.php +++ b/upload/sources/action_public/attach.php @@ -2,24 +2,14 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license -+--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +--------------------------------------------------------------------------- | > $Date: 2006-05-05 21:58:19 +0100 (Fri, 05 May 2006) $ | > $Revision: 246 $ @@ -37,7 +27,7 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; exit(); } @@ -199,6 +189,27 @@ class attach { function attach_upload_show( $msg="ready", $is_error=0 ) { + //----------------------------------------- + // Force a form action? + //----------------------------------------- + + $is_reset = 0; + + if( $this->ipsclass->vars['upload_domain'] ) + { + $is_reset = 1; + $original = $this->ipsclass->base_url; + + if( $this->ipsclass->session_type == 'cookie' ) + { + $this->ipsclass->base_url = $this->ipsclass->vars['upload_domain'] . '/index.' . $this->ipsclass->vars['php_ext'].'?'; + } + else + { + $this->ipsclass->base_url = $this->ipsclass->vars['upload_domain'] . '/index.' . $this->ipsclass->vars['php_ext'].'?s='.$this->ipsclass->session_id.'&'; + } + } + //----------------------------------------- // INIT //----------------------------------------- @@ -539,7 +550,7 @@ class attach { // Open and display the file.. //----------------------------------------- - $fh = fopen( $file, 'rb' ); // e3790216629e5a2aaf37070b32237f06, Set binary for Win even if it's an ascii file, it won't hurt. + $fh = fopen( $file, 'rb' ); // <{%dyn.down.var.md5p1%}>, Set binary for Win even if it's an ascii file, it won't hurt. fpassthru( $fh ); fclose( $fh ); exit(); diff --git a/upload/sources/action_public/boards.php b/upload/sources/action_public/boards.php index 270ad584..2b8469bb 100644 --- a/upload/sources/action_public/boards.php +++ b/upload/sources/action_public/boards.php @@ -2,27 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-10-20 16:40:37 -0500 (Fri, 20 Oct 2006) $ -| > $Revision: 666 $ +| > $Date: 2008-02-29 18:09:47 -0500 (Fri, 29 Feb 2008) $ +| > $Revision: 1197 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -38,7 +28,7 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; exit(); } @@ -197,7 +187,7 @@ class boards $this->ipsclass->print->add_output( $this->output ); - $cp = " (Работает на Invision Power Board)"; + $cp = " (Powered by Invision Power Board)"; if ($this->ipsclass->vars['ips_cp_purchase']) { @@ -263,7 +253,9 @@ class boards if ( $forum_data['redirect_on'] ) { - $forum_data['redirect_target'] = isset($forum_data['redirect_target']) ? $forum_data['redirect_target'] : '_parent'; + $forum_data['redirect_hits'] = $this->ipsclass->do_number_format( $forum_data['redirect_hits'] ); + + $forum_data['redirect_target'] = isset($forum_data['redirect_target']) ? $forum_data['redirect_target'] : '_parent'; $temp_html .= $this->ipsclass->compiled_templates['skin_boards']->forum_redirect_row( $forum_data ); } @@ -401,7 +393,9 @@ class boards if ( $forum_data['redirect_on'] ) { - $forum_data['redirect_target'] = isset($forum_data['redirect_target']) ? $forum_data['redirect_target'] : '_parent'; + $forum_data['redirect_hits'] = $this->ipsclass->do_number_format( $forum_data['redirect_hits'] ); + + $forum_data['redirect_target'] = isset($forum_data['redirect_target']) ? $forum_data['redirect_target'] : '_parent'; $temp_html .= $this->ipsclass->compiled_templates['skin_boards']->forum_redirect_row( $forum_data ); } diff --git a/upload/sources/action_public/browsebuddy.php b/upload/sources/action_public/browsebuddy.php index c7c663fd..2c550810 100644 --- a/upload/sources/action_public/browsebuddy.php +++ b/upload/sources/action_public/browsebuddy.php @@ -2,28 +2,18 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ +| > $Date: 2007-05-01 14:00:44 -0400 (Tue, 01 May 2007) $ +| > $Revision: 958 $ +| > $Author: bfarber $ +--------------------------------------------------------------------------- | | > Browse Buddy Module @@ -39,7 +29,7 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; exit(); } @@ -201,7 +191,7 @@ class assistant // INIT //----------------------------------------- - $limit = intval( $_REQUEST['limit'] ); + $limit = intval( $this->ipsclass->input['limit'] ); //----------------------------------------- // Check... diff --git a/upload/sources/action_public/calendar.php b/upload/sources/action_public/calendar.php index d2758ca2..b36200f5 100644 --- a/upload/sources/action_public/calendar.php +++ b/upload/sources/action_public/calendar.php @@ -1,3007 +1,2975 @@ - $Date: 2006-11-28 09:33:12 -0600 (Tue, 28 Nov 2006) $ -| > $Revision: 742 $ -| > $Author: bfarber $ -+--------------------------------------------------------------------------- -| -| > Calendar functions library -| > Module written by Matt Mecham -| > Date started: 12th June 2002 -| -| > Module Version Number: 1.0.0 -| > DBA Checked: Wed 19 May 2004 -| > Quality Checked: Wed 15 Sept. 2004 -+-------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_IPB' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - -class calendar -{ - # Classes - var $ipsclass; - var $post; - - # Others - var $output = ""; - var $base_url = ""; - var $html = ""; - var $page_title = ""; - var $nav; - - var $chosen_month = ""; - var $chosen_year = ""; - var $now_date = ""; - var $now = array( 'mday' => '', 'mon' => '', 'year' => '' ); - var $our_datestamp = ""; - var $offset = ""; - var $start_date = ""; - var $first_day_array = ""; - var $month_words = array(); - var $day_words = array(); - var $query_month_cache = array(); - var $query_bday_cache = array(); - - var $event_cache = array(); - var $shown_events = array(); - - var $calendar_id = 1; - var $calendar = array(); - var $calendar_jump = ""; - var $calenar_cache = array(); - - var $parsed_members = array(); - - # Permissions - - var $can_read = 0; - var $can_post = 0; - var $can_avoid_queue = 0; - var $can_moderate = 0; - - /*-------------------------------------------------------------------------*/ - // AUTO-RUN - /*-------------------------------------------------------------------------*/ - - function auto_run() - { - //----------------------------------------- - // Load lang and templs - //----------------------------------------- - - $this->ipsclass->load_language('lang_calendar'); - $this->ipsclass->load_template('skin_calendar'); - - $this->ipsclass->vars['bday_show_cal_max'] = 5; - - //----------------------------------------- - // Get "this" calendar details - //----------------------------------------- - - if ( $this->ipsclass->input['cal_id'] OR $this->ipsclass->input['calendar_id'] ) - { - $this->calendar_id = intval($this->ipsclass->input['cal_id']) ? intval($this->ipsclass->input['cal_id']) : intval($this->ipsclass->input['calendar_id']); - } - else - { - $this->calendar_id = 1; - } - - //----------------------------------------- - // Sneaky cheaty - //----------------------------------------- - - $this->ipsclass->input['_cal_id'] =& $this->calendar_id; - - //----------------------------------------- - // Get all calendar details - //----------------------------------------- - - if( ! count( $this->ipsclass->cache['calendars'] ) ) - { - $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'cal_calendars', 'order' => 'cal_position ASC' ) ); - $this->ipsclass->DB->exec_query(); - - while( $cal = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->cache['calendars'][ $cal['cal_id'] ] = $cal; - } - } - - if ( count( $this->ipsclass->cache['calendars'] ) AND is_array( $this->ipsclass->cache['calendars'] ) ) - { - foreach( $this->ipsclass->cache['calendars'] as $cal_id => $cal ) - { - $selected = ""; - $perms = unserialize( $cal['cal_permissions'] ); - - //----------------------------------------- - // Got a perm? - //----------------------------------------- - - if ( $this->ipsclass->check_perms( $perms['perm_read'] ) != TRUE ) - { - continue; - } - - if ( $cal['cal_id'] == $this->calendar_id ) - { - $this->calendar = array_merge( $cal, $perms); - $selected = " selected='selected'"; - } - - $this->calendar_cache[ $cal['cal_id'] ] = array_merge( $cal, $perms); - - - - $this->calendar_jump .= "\n"; - } - } - - if( ! $this->calendar ) - { - if( count( $this->calendar_cache ) ) - { - $tmp_resort = $this->calendar_cache; - ksort($tmp_resort); - reset($tmp_resort); - $default_calid = key( $tmp_resort ); - $this->calendar_id = $default_calid; - $this->calendar = $tmp_resort[ $default_calid ]; - unset( $tmp_resort ); - } - } - - //----------------------------------------- - // Got viewing perms? - //----------------------------------------- - - $this->build_permissions(); - - if ( ! $this->can_read ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_perm') ); - } - - //----------------------------------------- - // Prep our chosen dates - //----------------------------------------- - - // There is something whacky with getdate and GMT - // This handrolled method seems to take into account - // DST where getdate refuses. - - $a = explode( ',', gmdate( 'Y,n,j,G,i,s', time() + $this->ipsclass->get_time_offset() ) ); - - $this->now_date = array( - 'year' => $a[0], - 'mon' => $a[1], - 'mday' => $a[2], - 'hours' => $a[3], - 'minutes' => $a[4], - 'seconds' => $a[5] - ); - - if ( isset($this->ipsclass->input['year']) ) - { - $this->ipsclass->input['y'] = $this->ipsclass->input['year']; - } - - $this->chosen_month = ( !isset($this->ipsclass->input['m']) OR !intval($this->ipsclass->input['m']) ) ? $this->now_date['mon'] : intval($this->ipsclass->input['m']); - $this->chosen_year = ( !isset($this->ipsclass->input['y']) OR !intval($this->ipsclass->input['y']) ) ? $this->now_date['year'] : intval($this->ipsclass->input['y']); - - //----------------------------------------- - // Make sure the date is in range. - //----------------------------------------- - - if ( ! checkdate( $this->chosen_month, 1 , $this->chosen_year ) ) - { - $this->chosen_month = $this->now_date['mon']; - $this->chosen_year = $this->now_date['year']; - } - - //----------------------------------------- - // Get the timestamp for our chosen date - //----------------------------------------- - - $this->our_datestamp = mktime( 0,0,1, $this->chosen_month, 1, $this->chosen_year); - $this->first_day_array = $this->ipsclass->date_getgmdate($this->our_datestamp); - - //----------------------------------------- - // Finally, build up the lang arrays - //----------------------------------------- - - $this->month_words = array( $this->ipsclass->lang['M_1'] , $this->ipsclass->lang['M_2'] , $this->ipsclass->lang['M_3'] , - $this->ipsclass->lang['M_4'] , $this->ipsclass->lang['M_5'] , $this->ipsclass->lang['M_6'] , - $this->ipsclass->lang['M_7'] , $this->ipsclass->lang['M_8'] , $this->ipsclass->lang['M_9'] , - $this->ipsclass->lang['M_10'], $this->ipsclass->lang['M_11'], $this->ipsclass->lang['M_12'] ); - - if( !$this->ipsclass->vars['ipb_calendar_mon'] ) - { - $this->day_words = array( $this->ipsclass->lang['D_0'], $this->ipsclass->lang['D_1'], $this->ipsclass->lang['D_2'], - $this->ipsclass->lang['D_3'], $this->ipsclass->lang['D_4'], $this->ipsclass->lang['D_5'], - $this->ipsclass->lang['D_6'] ); - } - else - { - $this->day_words = array( $this->ipsclass->lang['D_1'], $this->ipsclass->lang['D_2'], $this->ipsclass->lang['D_3'], - $this->ipsclass->lang['D_4'], $this->ipsclass->lang['D_5'], $this->ipsclass->lang['D_6'], - $this->ipsclass->lang['D_0'] ); - } - - switch( $this->ipsclass->input['code'] ) - { - case 'newevent': - $this->cal_event_form('add'); - break; - case 'addnewevent': - $this->cal_event_save('add'); - break; - case 'edit': - $this->cal_event_form('edit'); - break; - case 'doedit': - $this->cal_event_save('edit'); - break; - - case 'event_approve': - $this->event_approve(); - break; - - case 'showday': - $this->show_day(); - break; - - case 'showevent': - $this->show_event(); - break; - - case 'birthdays': - $this->show_birthdays(); - break; - - case 'showweek': - $this->show_week(); - break; - - case 'delete': - $this->cal_delete(); - break; - - case 'find': - $this->find_date(); - break; - - default: - $this->show_month(); - break; - } - - if ($this->page_title == "") - { - $this->page_title = $this->ipsclass->vars['board_name']." ".$this->ipsclass->lang['page_title']; - } - - if (! is_array($this->nav) ) - { - $this->nav[] = "{$this->ipsclass->lang['page_title']}"; - $this->nav[] = "{$this->calendar['cal_title']}"; - } - - $this->ipsclass->print->add_output("$this->output"); - $this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, 'NAV' => $this->nav ) ); - } - - /*-------------------------------------------------------------------------*/ - // Event Approve - /*-------------------------------------------------------------------------*/ - - function cal_delete() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $cal_id = intval( $this->ipsclass->input['cal_id'] ); - $event_id = intval( $this->ipsclass->input['event_id'] ); - $md5check = trim( $this->ipsclass->input['md5check'] ); - - //----------------------------------------- - // Get permissions - //----------------------------------------- - - $this->build_permissions( $cal_id ); - - //----------------------------------------- - // Check - //----------------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'cal_events', 'where' => "event_id=$event_id AND event_calendar_id=$cal_id" ) ); - $this->ipsclass->DB->exec_query(); - $memcheck = $this->ipsclass->DB->fetch_row(); - - if ( ! $cal_id OR ! $event_id ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); - } - - if ( ! $this->can_moderate && ( $this->ipsclass->member['id'] > 0 && $this->ipsclass->member['id'] <> $memcheck['event_member_id'] ) ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); - } - - //----------------------------------------- - // Check MD5 - //----------------------------------------- - - if ( $md5check != $this->ipsclass->md5_check ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); - } - - //----------------------------------------- - // Delete... - //----------------------------------------- - - $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'cal_events', 'where' => "event_id=$event_id AND event_calendar_id=$cal_id" ) ); - - //----------------------------------------- - // Recache... - //----------------------------------------- - - $this->_call_recache(); - - //----------------------------------------- - // Boing... - //----------------------------------------- - - $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['cal_event_delete'] , "&act=calendar&cal_id={$cal_id}" ); - } - - /*-------------------------------------------------------------------------*/ - // Event Approve - /*-------------------------------------------------------------------------*/ - - function event_approve() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $cal_id = intval( $this->ipsclass->input['cal_id'] ); - $event_id = intval( $this->ipsclass->input['event_id'] ); - $approve = intval( $this->ipsclass->input['approve'] ); - $modfilter = trim( $this->ipsclass->input['modfilter'] ); - $quicktime = trim( $this->ipsclass->input['qt'] ); - $md5check = trim( $this->ipsclass->input['md5check'] ); - - list( $month, $day, $year ) = explode( "-", $quicktime ); - - //----------------------------------------- - // Get permissions - //----------------------------------------- - - $this->build_permissions( $cal_id ); - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! $this->can_moderate ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); - } - - //----------------------------------------- - // Check MD5 - //----------------------------------------- - - if ( $md5check != $this->ipsclass->md5_check ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); - } - - //----------------------------------------- - // Check Dates - //----------------------------------------- - - if ( ! $day OR ! $month OR ! $year ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); - } - - //----------------------------------------- - // Get Event - //----------------------------------------- - - $event = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'cal_events', 'where' => "event_calendar_id={$cal_id} and event_id={$event_id}" ) ); - - if ( ! $event['event_id'] ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); - } - - //----------------------------------------- - // Update event... - //----------------------------------------- - - $this->ipsclass->DB->do_update( 'cal_events', array( 'event_approved' => $event['event_approved'] ? 0 : 1 ), 'event_id='.$event_id ); - - //----------------------------------------- - // Recache... - //----------------------------------------- - - $this->_call_recache(); - - //----------------------------------------- - // Boink... - //----------------------------------------- - - $this->ipsclass->boink_it( $this->ipsclass->base_url."act=calendar&cal_id={$cal_id}&modfilter={$modfilter}&code=showday&y={$year}&m={$month}&d={$day}"); - } - - /*-------------------------------------------------------------------------*/ - // Build Permissions - /*-------------------------------------------------------------------------*/ - - function build_permissions( $cal_id=0 ) - { - $this->can_read = 0; - $this->can_post = 0; - $this->can_avoid_queue = 0; - $this->can_moderate = 0; - - //----------------------------------------- - // Got an idea? - //----------------------------------------- - - if ( ! $cal_id ) - { - $cal_id = $this->calendar_id; - } - - $calendar = $this->calendar_cache[ $cal_id ]; - - //----------------------------------------- - // Read - //----------------------------------------- - - if ( $this->ipsclass->check_perms( $calendar['perm_read'] ) == TRUE ) - { - $this->can_read = 1; - } - - //----------------------------------------- - // Post - //----------------------------------------- - - if ( $this->ipsclass->check_perms( $calendar['perm_post'] ) == TRUE ) - { - $this->can_post = 1; - } - - //----------------------------------------- - // Mod Queue - //----------------------------------------- - - if ( $this->ipsclass->check_perms( $calendar['perm_nomod'] ) == TRUE ) - { - $this->can_avoid_queue = 1; - } - - //----------------------------------------- - // Moderate - //----------------------------------------- - - if ( $this->ipsclass->member['g_is_supmod'] ) - { - $this->can_moderate = 1; - } - - } - - /*-------------------------------------------------------------------------*/ - // Find - /*-------------------------------------------------------------------------*/ - - function find_date() - { - if ( $this->ipsclass->input['what'] ) - { - if ( $this->ipsclass->input['what'] == 'thismonth' ) - { - $this->ipsclass->boink_it( $this->ipsclass->base_url."act=calendar&cal_id={$this->calendar_id}&m={$this->now_date['mon']}&y={$this->now_date['year']}" ); - } - else - { - $time = time() + $this->ipsclass->get_time_offset(); - - $this->ipsclass->boink_it( $this->ipsclass->base_url."act=calendar&cal_id={$this->calendar_id}&code=showweek&week={$time}" ); - } - } - else - { - $this->show_month(); - } - } - - /*-------------------------------------------------------------------------*/ - // Show WEEK - /*-------------------------------------------------------------------------*/ - - function show_week() - { - $in_week = intval($this->ipsclass->input['week']); - - //----------------------------------------- - // Get start of week - //----------------------------------------- - - $startweek = $this->ipsclass->date_getgmdate( $in_week ); - - if( !$this->ipsclass->vars['ipb_calendar_mon'] ) - { - //----------------------------------------- - // Not Sunday? Go back.. - //----------------------------------------- - - $startweek['wday'] = intval($startweek['wday']); - - if ( $startweek['wday'] > 0 ) - { - while ( $startweek['wday'] != 0 ) - { - $startweek['wday']--; - $in_week -= 86400; - } - - $startweek = $this->ipsclass->date_getgmdate( $in_week ); - } - } - else - { - //----------------------------------------- - // Not Monday, rewind... - // date_getgmdate will set weekday start to 1 - // PHP 5.1 allows for 'N' which will fix - // this, but we support earlier versions.. - //----------------------------------------- - - if ( $startweek['wday'] != 1 ) - { - $startweek['wday'] = $startweek['wday'] == 0 ? 7 : $startweek['wday']; - - while ( $startweek['wday'] != 1 ) - { - $startweek['wday']--; - $in_week -= 86400; - } - - $startweek = $this->ipsclass->date_getgmdate( $in_week ); - } - } - - //----------------------------------------- - // Get end of week - //----------------------------------------- - - $endweek = $this->ipsclass->date_getgmdate( $in_week + 604800 ); - $our_datestamp = gmmktime( 0,0,0, $startweek['mon'], $startweek['mday'], $startweek['year']); - $our_timestamp = $in_week; - $seen_days = array(); // Holds yday - $seen_ids = array(); - - //----------------------------------------- - // Figure out the next / previous links - //----------------------------------------- - - $prev_month = $this->get_prev_month($this->chosen_month, $this->chosen_year); - $next_month = $this->get_next_month($this->chosen_month, $this->chosen_year); - - $prev_week = $this->ipsclass->date_getgmdate( $in_week - 604800 ); - $next_week = $this->ipsclass->date_getgmdate( $in_week + 604800 ); - - $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_week_content( $startweek['mday'], $this->month_words[$startweek['mon'] - 1], $startweek['year'], $prev_week, $next_week); - - $last_month_id = -1; - - //----------------------------------------- - // Get the events - //----------------------------------------- - - $this->get_events_sql($startweek['mon'], $startweek['year']); - - //----------------------------------------- - // Print each effing day :D - //----------------------------------------- - - $cal_output = ""; - - for ( $i = 0 ; $i <= 6 ; $i++ ) - { - $year = gmdate('Y', $our_datestamp); - $month = gmdate('n', $our_datestamp); - $day = gmdate('j', $our_datestamp); - $today = $this->ipsclass->date_getgmdate($our_datestamp); - $this_day_events = ""; - - if ( $last_month_id != $today['mon'] ) - { - $last_month_id = $today['mon']; - - $cal_output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_week_monthbar( $this->month_words[$today['mon'] - 1], $today['year'] ); - - //----------------------------------------- - // Get the birthdays from the database - //----------------------------------------- - - if ( $this->ipsclass->vars['show_bday_calendar'] ) - { - $birthdays = array(); - - $this->get_birthday_sql($today['mon']); - - $birthdays = $this->query_bday_cache[ $today['mon'] ]; - } - - //----------------------------------------- - // Get the events - //----------------------------------------- - - $this->get_events_sql($month, $year); - } - - $events = $this->get_day_events( $month, $day, $year ); - - $queued_event = 0; - - if ( is_array( $events ) AND count( $events ) ) - { - foreach( $events as $event ) - { - if ( !isset($this->shown_events[ $month.'-'.$day.'-'.$year ][ $event['event_id'] ]) OR !$this->shown_events[ $month.'-'.$day.'-'.$year ][ $event['event_id'] ] ) - { - //----------------------------------------- - // Recurring - //----------------------------------------- - - if ( $event['recurring'] ) - { - $this_day_events .= $this->ipsclass->compiled_templates['skin_calendar']->cal_events_wrap_recurring( $event ); - } - else if ( $event['single'] ) - { - $this_day_events .= $this->ipsclass->compiled_templates['skin_calendar']->cal_events_wrap( $event ); - } - else - { - $this_day_events .= $this->ipsclass->compiled_templates['skin_calendar']->cal_events_wrap_range( $event ); - } - - $this->shown_events[ $month.'-'.$day.'-'.$year ][ $event['event_id'] ] = 1; - } - - //----------------------------------------- - // Queued events? - //----------------------------------------- - - if ( ! $event['event_approved'] AND $this->can_moderate ) - { - $queued_event = 1; - } - } - } - - //----------------------------------------- - // Birthdays - //----------------------------------------- - - if ( $this->calendar['cal_bday_limit'] ) - { - if ( isset($birthdays[ $today['mday'] ]) and count( $birthdays[ $today['mday'] ] ) > 0 ) - { - $no_bdays = count($birthdays[ $today['mday'] ]); - - if ( $this->calendar['cal_bday_limit'] and $no_bdays <= $this->calendar['cal_bday_limit'] ) - { - foreach( $birthdays[ $today['mday'] ] as $user ) - { - $this_day_events .= $this->ipsclass->compiled_templates['skin_calendar']->cal_week_events_wrap( - "code=birthdays&y=".$today['year']."&m=".$today['mon']."&d=".$today['mday'], - $user['members_display_name'].$this->ipsclass->lang['bd_birthday'] - ); - } - - } - else - { - $this_day_events .= $this->ipsclass->compiled_templates['skin_calendar']->cal_week_events_wrap( - "code=birthdays&y=".$today['year']."&m=".$today['mon']."&d=".$today['mday'], - sprintf( $this->ipsclass->lang['entry_birthdays'], count($birthdays[ $today['mday'] ]) ) - ); - } - } - } - - if ($this_day_events == "") - { - $this_day_events = ' '; - } - - if( $this->ipsclass->vars['ipb_calendar_mon'] ) - { - // Reset if Monday is first day - - $today['wday'] = $today['wday'] == 0 ? 6 : $today['wday'] - 1; - } - - $cal_output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_week_dayentry( $this->day_words[ $today['wday'] ], $today['mday'], $this->month_words[$today['mon'] - 1], $today['mon'], $today['year'], $this_day_events, $queued_event ); - - $our_datestamp += 86400; - - unset($this_day_events); - } - - //----------------------------------------- - // Switch the HTML tags... - //----------------------------------------- - - $this->output = str_replace( "" , $cal_output, $this->output ); - - $this->output = str_replace( "" , $this->get_month_dropdown(), $this->output ); - $this->output = str_replace( "" , $this->get_year_dropdown() , $this->output ); - - //----------------------------------------- - // Get prev / this / next calendars - //----------------------------------------- - - $this->output = str_replace( "", $this->get_mini_calendar( $prev_month['month_id'], $prev_month['year_id'] ), $this->output ); - $this->output = str_replace( "", $this->get_mini_calendar( $this->chosen_month , $this->chosen_year ), $this->output ); - $this->output = str_replace( "", $this->get_mini_calendar( $next_month['month_id'], $next_month['year_id'] ), $this->output ); - - $this->nav[] = "{$this->ipsclass->lang['page_title']}"; - $this->nav[] = "{$this->calendar['cal_title']}"; - $this->nav[] = $this->month_words[$this->chosen_month - 1]." ".$this->chosen_year; - - } - - /*-------------------------------------------------------------------------*/ - // SHOW MONTH - /*-------------------------------------------------------------------------*/ - - function show_month() - { - //----------------------------------------- - // Figure out the next / previous links - //----------------------------------------- - - $prev_month = $this->get_prev_month($this->chosen_month, $this->chosen_year); - $next_month = $this->get_next_month($this->chosen_month, $this->chosen_year); - - $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_main_content($this->month_words[$this->chosen_month - 1], $this->chosen_year, $prev_month, $next_month, $this->calendar_jump, $this->calendar_id); - - //----------------------------------------- - // Print the days table top row - //----------------------------------------- - - $day_output = ""; - $cal_output = ""; - - foreach ($this->day_words as $day) - { - $day_output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_day_bit($day); - } - - $cal_output = $this->get_month_events($this->chosen_month, $this->chosen_year); - - //----------------------------------------- - // Switch the HTML tags... - //----------------------------------------- - - $this->output = str_replace( "", $day_output, $this->output ); - $this->output = str_replace( "" , $cal_output, $this->output ); - - $this->output = str_replace( "" , $this->get_month_dropdown(), $this->output ); - $this->output = str_replace( "" , $this->get_year_dropdown() , $this->output ); - - //----------------------------------------- - // Get prev / this / next calendars - //----------------------------------------- - - $this->output = str_replace( "", $this->get_mini_calendar( $prev_month['month_id'], $prev_month['year_id'] ), $this->output ); - $this->output = str_replace( "", $this->get_mini_calendar( $this->chosen_month , $this->chosen_year ), $this->output ); - $this->output = str_replace( "", $this->get_mini_calendar( $next_month['month_id'], $next_month['year_id'] ), $this->output ); - - $this->nav[] = "{$this->ipsclass->lang['page_title']}"; - $this->nav[] = "{$this->calendar['cal_title']}"; - $this->nav[] = $this->month_words[$this->chosen_month - 1]." ".$this->chosen_year; - } - - /*-------------------------------------------------------------------------*/ - // POST NEW CALENDAR EVENT - /*-------------------------------------------------------------------------*/ - - function cal_event_form( $type='add' ) - { - //----------------------------------------- - // Load post class - //----------------------------------------- - - require_once( ROOT_PATH.'sources/classes/post/class_post.php' ); - $this->post = new class_post(); - $this->post->ipsclass =& $this->ipsclass; - $this->post->load_classes(); - - //----------------------------------------- - // INIT - //----------------------------------------- - - $event_id = isset($this->ipsclass->input['event_id']) ? intval( $this->ipsclass->input['event_id'] ) : 0; - $calendar_id = isset($this->ipsclass->input['calendar_id']) ? intval( $this->ipsclass->input['calendar_id'] ) : 0; - $form_type = $this->ipsclass->input['formtype']; - $recur_menu = ""; - $calendar_jump = ""; - $divhide = "none"; - - //----------------------------------------- - // CHECK - //----------------------------------------- - - if ( ! $this->ipsclass->member['id']) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); - } - - //----------------------------------------- - // Got permission to post to this calendar? - //----------------------------------------- - - $this->build_permissions( $calendar_id ); - - if ( ! $this->can_post ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); - } - - //----------------------------------------- - // Edit calendar option - //----------------------------------------- - - foreach( $this->calendar_cache as $data ) - { - if ( $this->ipsclass->check_perms( $data['perm_post'] ) == TRUE AND $this->ipsclass->check_perms( $data['perm_read'] ) == TRUE ) - { - $selected = $calendar_id == $data['cal_id'] ? ' selected="selected" ' : ''; - $calendar_jump .= "\n"; - } - } - - //----------------------------------------- - // WHICHISIT - //----------------------------------------- - - if ( $type == 'add' ) - { - $tmp = isset($this->ipsclass->input['nd']) ? explode( "-", $this->ipsclass->input['nd'] ) : array(); - - $nd = isset($tmp[2]) ? intval( $tmp[2] ) : 0; - $nm = isset($tmp[1]) ? intval( $tmp[1] ) : 0; - $ny = isset($tmp[0]) ? intval( $tmp[0] ) : 0; - - $public = ""; - $private = ""; - $event = array( 'event_smilies' => 1, 'event_content' => '' ); - - $fd = $nd = $nd ? $nd : $this->now['mday']; - $fm = $nm = $nm ? $nm : $this->now['mon']; - $fy = $ny = $ny ? $ny : $this->now['year']; - - $tz_offset = ( $this->ipsclass->member['time_offset'] != "" ) ? $this->ipsclass->member['time_offset'] : $this->ipsclass->vars['time_offset']; - - $recur_menu = ""; - $code = 'addnewevent'; - $button = $this->ipsclass->lang['calendar_submit']; - - $event['event_timeset'] = ""; - } - else - { - if ( ! $event_id ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_events') ); - } - - //----------------------------------------- - // Get the event - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'cal_events', 'where' => "event_id=$event_id" ) ); - $this->ipsclass->DB->simple_exec(); - - if ( ! $event = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_events') ); - } - - //----------------------------------------- - // Do we have permission to edit this event? - //----------------------------------------- - - if ( $this->ipsclass->member['id'] == $event['event_member_id'] ) - { - $can_edit = 1; - } - else if ( $this->ipsclass->member['g_is_supmod'] == 1 ) - { - $can_edit = 1; - } - else - { - $can_edit = 0; - } - - if ( $can_edit != 1 ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_events') ); - } - - //----------------------------------------- - // Do we have permission to see the event? - //----------------------------------------- - - if ( $event['event_perms'] != '*' ) - { - $this_member_mgroups[] = $this->ipsclass->member['mgroup']; - - if( $this->ipsclass->member['mgroup_others'] ) - { - $this_member_mgroups = array_merge( $this_member_mgroups, explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ) ); - } - - $check = 0; - - foreach( $this_member_mgroups as $this_member_mgroup ) - { - if ( preg_match( "/(^|,)".$this_member_mgroup."(,|$)/", $event['event_perms'] ) ) - { - $check = 1; - } - } - - if( $check == 0 ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_events') ); - } - } - - $tz_offset = $event['event_tz']; - - //----------------------------------------- - // Date stuff - //----------------------------------------- - - $convert_hours = 0; - - if( $event['event_timeset'] ) - { - $divhide = ""; - $hour_min = explode(":", $event['event_timeset']); - $convert_hours = ($hour_min[0] * 3600) + ($hour_min[1] * 60); - } - - if( $tz_offset && $event['event_timeset'] AND !$event['event_all_day'] ) - { - $convert_hours = $tz_offset * 3600 + $convert_hours; - } - - $_unix_from = explode('-', gmdate('n-j-Y', $event['event_unix_from'] - $convert_hours )); - - if( $convert_hours && $event['event_unix_to'] ) - { - $event['event_unix_to'] -= $convert_hours; - } - $_unix_to = explode('-', gmdate('n-j-Y', $event['event_unix_to'] )); - - $nd = $_unix_from[1]; - $nm = $_unix_from[0]; - $ny = $_unix_from[2]; - - $fd = $_unix_to[1]; - $fm = $_unix_to[0]; - $fy = $_unix_to[2]; - - //----------------------------------------- - // Form stuff - //----------------------------------------- - - if ( $event['event_recurring'] ) - { - $form_type = 'recur'; - } - else if ( ! $event['event_recurring'] AND $event['event_unix_to'] ) - { - $form_type = 'range'; - } - else - { - $form_type = 'single'; - } - - //----------------------------------------- - // Private? - //----------------------------------------- - - if ( $event['event_private'] == 1 ) - { - $private = ' selected'; - } - else - { - $public = ' selected'; - } - - //----------------------------------------- - // Recur stuff - //----------------------------------------- - - $recur_menu .= $event['event_recurring'] == '1' ? "" - : ""; - - $recur_menu .= $event['event_recurring'] == '2' ? "" - : ""; - - $recur_menu .= $event['event_recurring'] == '3' ? "" - : ""; - $code = 'doedit'; - $button = $this->ipsclass->lang['calendar_edit_submit']; - } - - //----------------------------------------- - // Do TZ form - //----------------------------------------- - - $this->ipsclass->load_language( 'lang_ucp' ); - - $time_select = ""; - - //----------------------------------------- - // Start off nav - //----------------------------------------- - - $this->nav[] = "{$this->ipsclass->lang['page_title']}"; - $this->nav[] = "{$this->calendar['cal_title']}"; - $this->nav[] = $this->ipsclass->lang['post_new_event']; - - //----------------------------------------- - // Start off form - //----------------------------------------- - - $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->calendar_start_form( $code, $this->calendar_id, $form_type, $event_id ); - - $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->table_top($this->ipsclass->lang['post_new_event']); - $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->calendar_event_title( isset($event['event_title']) ? $event['event_title'] : '' ); - - //----------------------------------------- - // Alright... Which form type? - //----------------------------------------- - - if ( $form_type == 'single' ) - { - $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->calendar_choose_date_single( - $this->get_day_dropdown($nd), $this->get_month_dropdown($nm), $this->get_year_dropdown($ny) ); - } - else if ( $form_type == 'range' ) - { - $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->calendar_choose_date_range( - $this->get_day_dropdown($nd), $this->get_month_dropdown($nm), $this->get_year_dropdown($ny), - $this->get_day_dropdown($fd), $this->get_month_dropdown($fm), $this->get_year_dropdown($fy) ); - } - else - { - $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->calendar_choose_date_recur( - $this->get_day_dropdown($nd), $this->get_month_dropdown($nm), $this->get_year_dropdown($ny), - $recur_menu, - array( - 'd' => $this->get_day_dropdown($fd), - 'm' => $this->get_month_dropdown($fm), - 'y' => $this->get_year_dropdown($fy) - ) ); - } - - $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->calendar_event_type( $public, $private, $time_select, $this->calendar_jump, - array('formtype' => $form_type, 'timestart' => $event['event_timeset'], 'divhide' => $divhide, 'checked' => $divhide == '' ? "checked='checked'" : '' ) ); - - if ($this->ipsclass->member['mgroup'] == $this->ipsclass->vars['admin_group']) - { - //----------------------------------------- - // Get all the group ID's and names from - // the DB and build the selection box - //----------------------------------------- - - $group_choices = ""; - - foreach( $this->ipsclass->cache['group_cache'] as $r ) - { - $selected = ""; - - if ( isset($event['event_perms']) AND preg_match( "/(^|,)".$r['g_id']."(,|$)/", $event['event_perms'] ) ) - { - $selected = ' selected'; - } - - $group_choices .= "\n"; - } - - $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->calendar_admin_group_box($group_choices); - } - - //----------------------------------------- - // Using RTE? Convert BBCode to HTML - //----------------------------------------- - - if ( $event['event_content'] ) - { - if ( $this->post->han_editor->method == 'rte' ) - { - $this->post->parser->parse_html = 0; - $this->post->parser->parse_smilies = intval($event['event_smilies']); - $this->post->parser->parse_bbcode = 1; - $event['event_content'] = $this->post->parser->pre_db_parse( $event['event_content'] ); - $event['event_content'] = $this->post->parser->convert_ipb_html_to_html( $event['event_content'] ); - } - else - { - $event['event_content'] = $this->ipsclass->my_br2nl($event['event_content']); - } - } - - //----------------------------------------- - // Generate text editor - //----------------------------------------- - - $this->output .= $this->post->html_add_smilie_box( $this->post->html_post_body( $event['event_content'] ) ); - - $this->output = str_replace( '' , $this->ipsclass->compiled_templates['skin_post']->get_box_enableemo( $event['event_smilies'] ? 'checked="checked"' : "" ) , $this->output ); - - $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->calendar_end_form( $button ); - } - - - /*-------------------------------------------------------------------------*/ - // ADD NEW CALENDAR EVENT TO THE DB - /*-------------------------------------------------------------------------*/ - - function cal_event_save( $type='add' ) - { - //----------------------------------------- - // Load post class - //----------------------------------------- - - require_once( ROOT_PATH.'sources/classes/post/class_post.php' ); - $this->post = new class_post(); - $this->post->ipsclass =& $this->ipsclass; - $this->post->load_classes(); - - //----------------------------------------- - // INIT - //----------------------------------------- - - $read_perms = '*'; - $end_day = ""; - $end_month = ""; - $end_year = ""; - $end_date = ""; - $event_ranged = 0; - $event_repeat = 0; - $can_edit = 0; - - $form_type = $this->ipsclass->input['formtype']; - $event_id = intval($this->ipsclass->input['event_id']); - $calendar_id = intval( $this->ipsclass->input['calendar_id'] ); - $allow_emoticons = $this->ipsclass->input['enableemo'] == 'yes' ? 1 : 0; - $private_event = $this->ipsclass->input['e_type'] == 'private' ? 1 : 0; - $event_title = trim($this->ipsclass->input['event_title']); - $day = intval($this->ipsclass->input['e_day']); - $month = intval($this->ipsclass->input['e_month']); - $year = intval($this->ipsclass->input['e_year']); - $end_day = intval($this->ipsclass->input['end_day']); - $end_month = intval($this->ipsclass->input['end_month']); - $end_year = intval($this->ipsclass->input['end_year']); - $recur_unit = intval($this->ipsclass->input['recur_unit']); - $event_tz = intval($this->ipsclass->input['event_tz']); - $offset = 0; - $event_all_day = 0; - $event_calendar_id = intval($this->ipsclass->input['event_calendar_id']); - $set_time = intval($this->ipsclass->input['set_times']); - $hour_min = array(); - - if( $set_time ) - { - $hour_min = strstr($this->ipsclass->input['event_timestart'], ":") ? explode(":", $this->ipsclass->input['event_timestart']) : 0; - - if( intval($hour_min[0]) < 0 || intval($hour_min[0]) > 23 ) - { - $hour_min[0] = 0; - } - - if( intval($hour_min[1]) < 0 || intval($hour_min[1]) > 59 ) - { - $hour_min[1] = 0; - } - - if( $hour_min[0] || $hour_min[1] ) - { - $offset = $event_tz * 3600; - } - else - { - $hour_min = array(); - $offset = 0; - } - } - else - { - $event_all_day = 1; - } - - $this->ipsclass->vars['max_post_length'] = $this->ipsclass->vars['max_post_length'] ? $this->ipsclass->vars['max_post_length'] : 2140000; - - //----------------------------------------- - // CHECK - //----------------------------------------- - - if ( ! $this->ipsclass->member['id']) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); - } - - //----------------------------------------- - // Got permission to post to this calendar? - //----------------------------------------- - - $this->build_permissions( $event_calendar_id ); - - if ( ! $this->can_post ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); - } - - //----------------------------------------- - // WHTDOWEDO? - //----------------------------------------- - - if ( $type == 'add' ) - { - - } - else - { - if ( ! $event_id ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_post') ); - } - - //----------------------------------------- - // Get the event - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'cal_events', 'where' => "event_id=$event_id" ) ); - $this->ipsclass->DB->simple_exec(); - - if ( ! $event = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_events') ); - } - - //----------------------------------------- - // Do we have permission to edit this event? - //----------------------------------------- - - if ( $this->ipsclass->member['id'] == $event['event_member_id'] ) - { - $can_edit = 1; - } - else if ( $this->ipsclass->member['g_is_supmod'] == 1 ) - { - $can_edit = 1; - } - - if ( $can_edit != 1 ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_events') ); - } - } - - //----------------------------------------- - // Do we have a valid post? - //----------------------------------------- - - if (strlen( trim($_POST['Post']) ) < 1) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_post') ); - } - - if (strlen( $_POST['Post'] ) > ($this->ipsclass->vars['max_post_length']*1024)) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'post_too_long') ); - } - - //----------------------------------------- - // Fix up the Event Title - //----------------------------------------- - - if ( (strlen($event_title) < 2) or (!$event_title) ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_title_none') ); - } - - if ( strlen($event_title) > 64 ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_title_long') ); - } - - //----------------------------------------- - // Are we an admin, and have we set w/groups - // can see? - //----------------------------------------- - - if ( $this->ipsclass->member['mgroup'] == $this->ipsclass->vars['admin_group'] ) - { - if ( is_array( $_POST['e_groups'] ) ) - { - $read_perms = implode( ",", $_POST['e_groups'] ); - $read_perms .= ",".$this->ipsclass->vars['admin_group']; - } - - if ($read_perms == "") - { - $read_perms = '*'; - } - } - - //----------------------------------------- - // Check dates: Range - //----------------------------------------- - - if ( $form_type == 'range' ) - { - if ( $end_year < $year ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_range_wrong') ); - } - - if ( $end_year == $year ) - { - if ( $end_month < $month ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_range_wrong') ); - } - - if ( $end_month == $month AND $end_day <= $day ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_range_wrong') ); - } - } - - $_final_unix_from = gmmktime(0 , 0, 0 , $month , $day , $year ) + $offset;// + $offset; # Midday - $_final_unix_to = gmmktime(23, 59, 59, $end_month, $end_day, $end_year) + $offset;// + $offset; # End of the day - - $event_ranged = 1; - $set_time = 0; - $hour_min = array(); - } - - //----------------------------------------- - // Check dates: Recur - //----------------------------------------- - - elseif ( $form_type == 'recur' ) - { - if ( $this->ipsclass->input['recur_unit'] ) - { - $event_repeat = 1; - } - - if ( $end_year < $year ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_range_wrong') ); - } - - if ( $end_year == $year ) - { - if ( $end_month < $month ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_range_wrong') ); - } - - if ( $end_month == $month AND $end_day <= $day ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_range_wrong') ); - } - } - - $hour = 0; - $min = 0; - if( $set_time ) - { - if( is_array( $hour_min ) ) - { - $hour = $hour_min[0]; - $min = $hour_min[1]; - } - } - - $_final_unix_from = gmmktime($hour , $min , 0 , $month , $day , $year ) + $offset;// + $offset; - $_final_unix_to = gmmktime($hour, $min, 0, $end_month, $end_day, $end_year) + $offset;// + $offset; # End of the day - $event_recur = 1; - } - - //----------------------------------------- - // Check dates: Single - //----------------------------------------- - - else - { - $hour = 0; - $min = 0; - if( $set_time ) - { - if( is_array( $hour_min ) ) - { - $hour = $hour_min[0]; - $min = $hour_min[1]; - } - } - - $_final_unix_from = gmmktime($hour, $min, 0, $month, $day, $year) + $offset;// + $offset; - $_final_unix_to = 0; - } - - //----------------------------------------- - // Do we have a sensible date? - //----------------------------------------- - - if ( ! checkdate( $month, $day , $year ) ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_date_oor') ); - } - - //----------------------------------------- - // Post process the editor - // Now we have safe HTML and bbcode - //----------------------------------------- - - $this->ipsclass->input['Post'] = $this->post->han_editor->process_raw_post( 'Post' ); - - //----------------------------------------- - // Event approved? - //----------------------------------------- - - $event_approved = $this->can_avoid_queue ? 1 : ( $this->calendar_cache[ $event_calendar_id ]['cal_moderate'] ? 0 : 1 ); - - if( $private_event == 1 ) - { - $event_approved = 1; - } - - if ( $type == 'add' ) - { - //----------------------------------------- - // Add it to the DB - //----------------------------------------- - - $this->ipsclass->DB->do_insert( 'cal_events', array ( - 'event_calendar_id' => $event_calendar_id, - 'event_member_id' => $this->ipsclass->member['id'], - 'event_content' => $this->ipsclass->input['Post'], - 'event_title' => $event_title, - 'event_smilies' => $allow_emoticons, - 'event_perms' => $read_perms, - 'event_private' => $private_event, - 'event_approved' => $event_approved, - 'event_unixstamp' => time(), - 'event_recurring' => $recur_unit, - 'event_tz' => $event_tz, - 'event_timeset' => count($hour_min) > 0 ? intval($hour_min[0]).":".intval($hour_min[1]) : 0, - 'event_unix_from' => $_final_unix_from, - 'event_unix_to' => $_final_unix_to, - 'event_all_day' => $event_all_day ) ); - - $this->_call_recache(); - - if ( $event_approved ) - { - $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['new_event_redirect'] , "&act=calendar&cal_id={$event_calendar_id}" ); - } - else - { - $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['new_event_mod'] , "&act=calendar&cal_id={$event_calendar_id}" ); - } - } - else - { - //----------------------------------------- - // Add it to the DB - //----------------------------------------- - - $this->ipsclass->DB->do_update( 'cal_events', array ( - 'event_calendar_id' => $event_calendar_id, - 'event_content' => $this->ipsclass->input['Post'], - 'event_title' => $event_title, - 'event_smilies' => $allow_emoticons, - 'event_perms' => $read_perms, - 'event_private' => $private_event, - 'event_approved' => $event_approved, - 'event_unixstamp' => time(), - 'event_recurring' => $recur_unit, - 'event_tz' => $event_tz, - 'event_timeset' => count($hour_min) > 0 ? intval($hour_min[0]).":".intval($hour_min[1]) : 0, - 'event_unix_from' => $_final_unix_from, - 'event_unix_to' => $_final_unix_to, - 'event_all_day' => $event_all_day ), 'event_id='.$event_id ); - - $this->_call_recache(); - - if ( $event_approved ) - { - $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['edit_event_redirect'] , "&act=calendar&cal_id={$event_calendar_id}&code=showevent&event_id=$event_id" ); - } - else - { - $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['new_event_mod'] , "&act=calendar&cal_id={$event_calendar_id}" ); - } - } - } - - - /*-------------------------------------------------------------------------*/ - // SHOW DAYS EVENTS - /*-------------------------------------------------------------------------*/ - - function show_day() - { - $day = intval($this->ipsclass->input['d']); - $month = intval($this->ipsclass->input['m']); - $year = intval($this->ipsclass->input['y']); - $seen_ids = array(); - $timenow = gmmktime( 0,0,0, $month, $day, $year); - $day_array = $this->ipsclass->date_getgmdate( $timenow ); - - $printed = 0; - - //----------------------------------------- - // Do we have a sensible date? - //----------------------------------------- - - if ( ! checkdate( $month, $day , $year ) ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_date_oor') ); - } - - $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_page_events_start(); - - //----------------------------------------- - // Get the events - //----------------------------------------- - - $this->get_events_sql($month, $year); - - $events = $this->get_day_events( $month, $day, $year ); - - if ( is_array( $events ) AND count( $events ) ) - { - foreach( $events as $event ) - { - if ( !isset($this->shown_events[ $month.'-'.$day.'-'.$year ][ $event['event_id'] ]) OR !$this->shown_events[ $month.'-'.$day.'-'.$year ][ $event['event_id'] ] ) - { - //----------------------------------------- - // Is it a private event? - //----------------------------------------- - - if ( $event['event_private'] == 1 and $this->ipsclass->member['id'] != $event['event_member_id'] ) - { - continue; - } - - //----------------------------------------- - // Do we have permission to see the event? - //----------------------------------------- - - if ( $event['event_perms'] != '*' ) - { - $this_member_mgroups[] = $this->ipsclass->member['mgroup']; - - if( $this->ipsclass->member['mgroup_others'] ) - { - $this_member_mgroups = array_merge( $this_member_mgroups, explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ) ); - } - - $check = 0; - - foreach( $this_member_mgroups as $this_member_mgroup ) - { - if ( preg_match( "/(^|,)".$this_member_mgroup."(,|$)/", $event['event_perms'] ) ) - { - $check = 1; - } - } - - if( $check == 0 ) - { - continue; - } - } - - if ( !isset($seen_ids[ $event['eventid'] ]) OR !$seen_ids[ $event['eventid'] ] ) - { - $this->output .= $this->make_event_html($event); - - $printed++; - $seen_ids[ $event['event_id'] ] = 1; - } - } - } - } - - //----------------------------------------- - // Do we have any printed events? - //----------------------------------------- - - if ($printed > 0) - { - $switch = 1; - } - else - { - // Error if no birthdays - $switch = 0; - } - - $this->output .= $this->make_birthday_html($month, $day, $switch); - - $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_page_events_end(); - - $this->nav[] = "{$this->ipsclass->lang['page_title']}"; - $this->nav[] = "{$this->calendar['cal_title']}"; - $this->nav[] = $day." ".$this->month_words[$this->chosen_month - 1]." ".$this->chosen_year; - } - - /*-------------------------------------------------------------------------*/ - // SHOW A SINGLE EVENT BASED ON eventid - /*-------------------------------------------------------------------------*/ - - function show_event() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $event_id = intval($this->ipsclass->input['event_id']); - - //----------------------------------------- - // CHECK - //----------------------------------------- - - if ( ! $event_id ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_events') ); - } - - //----------------------------------------- - // Get it from the DB - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'cal_events', 'where' => "event_id=$event_id" ) ); - $this->ipsclass->DB->simple_exec(); - - if ( ! $event = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_events') ); - } - - $set_offset = 0; - if( $event['event_timeset'] ) - { - $set_offset = $this->ipsclass->member['time_offset'] * 3600; - } - - $event['event_unix_from'] = $event['event_unix_from'] - $set_offset; - //$event['event_unix_to'] = $event['event_unix_to'] ? $event['event_unix_to'] + ( $this->ipsclass->member['time_offset'] * 3600 ) : 0; - - //----------------------------------------- - // Is it a private event? - //----------------------------------------- - - if ( $event['event_private'] == 1 and $this->ipsclass->member['id'] != $event['event_member_id'] ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_events') ); - } - - //----------------------------------------- - // Do we have permission to see the event? - //----------------------------------------- - - if ( $event['event_perms'] != '*' ) - { - $this_member_mgroups[] = $this->ipsclass->member['mgroup']; - - if( $this->ipsclass->member['mgroup_others'] ) - { - $this_member_mgroups = array_merge( $this_member_mgroups, explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ) ); - } - - $check = 0; - - foreach( $this_member_mgroups as $this_member_mgroup ) - { - if ( preg_match( "/(^|,)".$this_member_mgroup."(,|$)/", $event['event_perms'] ) ) - { - $check = 1; - } - } - - if( $check == 0 ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_events') ); - } - } - - $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_page_events_start() . $this->make_event_html($event) . $this->ipsclass->compiled_templates['skin_calendar']->cal_page_events_end(); - - $this->nav[] = "{$this->ipsclass->lang['page_title']}"; - $this->nav[] = "{$this->calendar['cal_title']}"; - $this->nav[] = $event['event_title']; - - } - - /*-------------------------------------------------------------------------*/ - // MAKE EVENT HTML (return HTML for bdays) - /*-------------------------------------------------------------------------*/ - - function make_event_html($event) - { - //----------------------------------------- - // Load post class - //----------------------------------------- - - require_once( ROOT_PATH.'sources/classes/post/class_post.php' ); - $this->post = new class_post(); - $this->post->ipsclass =& $this->ipsclass; - $this->post->load_classes(); - - //----------------------------------------- - // Get topic lib - //----------------------------------------- - - require_once( ROOT_PATH . 'sources/action_public/topics.php' ); - $this->topiclib = new topics(); - $this->topiclib->ipsclass =& $this->ipsclass; - $this->topiclib->topic_init(); - $this->topiclib->topic['forum_id'] = 0; - $this->topiclib->topic['tid'] = 0; - - $approve_button = ""; - - //----------------------------------------- - // Parse the text - //----------------------------------------- - - $this->post->parser->parse_smilies = $event['event_smilies']; - $this->post->parser->parse_html = 0; - $this->post->parser->parse_bbcode = 1; - - $event['event_content'] = $this->post->parser->pre_display_parse( $this->post->parser->pre_db_parse( $event['event_content'] ) ); - - //----------------------------------------- - // What kind of event is it? - //----------------------------------------- - - $event_type = $this->ipsclass->lang['public_event']; - - if ($event['event_private'] == 1) - { - $event_type = $this->ipsclass->lang['private_event']; - } - else if ($event['event_perms'] != '*') - { - $event_type = $this->ipsclass->lang['restricted_event']; - } - - //----------------------------------------- - // Do we have an edit button? - //----------------------------------------- - - $edit_button = ""; - - //----------------------------------------- - // Are we a super dooper moderator? - //----------------------------------------- - - if ( $this->ipsclass->member['g_is_supmod'] == 1 ) - { - $edit_button = $this->ipsclass->compiled_templates['skin_calendar']->cal_edit_del_button($event['event_id'], $event['event_calendar_id']); - } - - //----------------------------------------- - // Are we the OP of this event? - //----------------------------------------- - - else if ( $this->ipsclass->member['id'] == $event['event_member_id'] ) - { - $edit_button = $this->ipsclass->compiled_templates['skin_calendar']->cal_edit_del_button($event['event_id'], $event['event_calendar_id']); - } - - //----------------------------------------- - // Get the member details and stuff - //----------------------------------------- - - if( $this->parsed_members[ $event['event_member_id'] ] ) - { - $member = $this->parsed_members[ $event['event_member_id'] ]; - } - else - { - $this->ipsclass->DB->cache_add_query( 'generic_get_all_member', array( 'mid' => $event['event_member_id'] ) ); - $this->ipsclass->DB->cache_exec_query(); - - $member = $this->ipsclass->DB->fetch_row(); - - $member = $this->topiclib->parse_member( $member ); - - $this->parsed_members[ $member['id'] ] = $member; - } - - if ( $member['id'] ) - { - $member['_members_display_name'] = "{$member['members_display_name_short']}"; - } - - //----------------------------------------- - // Date - //----------------------------------------- - - $set_offset = 0; - if( $event['event_timeset'] AND !$event['event_all_day'] ) - { - $set_offset = $this->ipsclass->member['time_offset'] * 3600; - } - - $tmp = explode( ',', gmdate( 'n,j,Y,G,i', $event['event_unix_from'] ) ); - - $event['mday'] = $tmp[1]; - $event['month'] = $tmp[0]; - $event['year'] = $tmp[2]; - $event['month_text'] = $this->month_words[ $tmp[0] - 1 ]; - - $this->ipsclass->input['d'] = $event['mday']; - $this->ipsclass->input['m'] = $event['month']; - $this->ipsclass->input['y'] = $event['year']; - - $type = $this->ipsclass->lang['se_normal']; - $de = ""; - - if ( $event['event_recurring'] == 0 AND $event['event_unix_to'] ) - { - $type = $this->ipsclass->lang['se_range']; - $de = $this->ipsclass->lang['se_ends'].' '.gmdate( $this->ipsclass->vars['clock_joined'], $event['event_unix_to'] ); - } - else if ( $event['event_recurring'] == 1 ) - { - $type = $this->ipsclass->lang['se_recur']; - $de = $this->ipsclass->lang['se_ends'].' '.gmdate( $this->ipsclass->vars['clock_joined'], $event['event_unix_to'] - $set_offset ); - } - - if( $type == $this->ipsclass->lang['se_normal'] ) - { - if( $tmp[3] > 0 ) - { - $event['year'] .= " {$tmp[3]}:{$tmp[4]}"; - } - } - - //----------------------------------------- - // Moderated? - //----------------------------------------- - - $event['_quicktime'] = intval($event['month']).'-'.intval($event['mday']).'-'.intval( $event['year']); - - if ( $this->can_moderate ) - { - if ( ! $event['event_approved'] ) - { - $event['_event_css_1'] = 'row2shaded'; - $event['_event_css_2'] = 'row4shaded'; - $approve_button = $this->ipsclass->compiled_templates['skin_calendar']->cal_approve_button($event['event_id'], $event['event_calendar_id'], $event); - } - else - { - $event['_event_css_1'] = 'row1'; - $event['_event_css_2'] = 'row2'; - $approve_button = $this->ipsclass->compiled_templates['skin_calendar']->cal_unapprove_button($event['event_id'], $event['event_calendar_id'], $event); - } - } - else - { - $event['_event_css_1'] = 'row1'; - $event['_event_css_2'] = 'row2'; - } - - - //----------------------------------------- - // Show - //----------------------------------------- - - return $this->ipsclass->compiled_templates['skin_calendar']->cal_show_event($event, $member, $event_type, $edit_button, $approve_button, $type, $de ); - } - - /*-------------------------------------------------------------------------*/ - // GET MINI CALENDAR - /*-------------------------------------------------------------------------*/ - - function get_mini_calendar($month, $year) - { - $cal_output = ""; - - foreach ($this->day_words as $day) - { - $day = $this->ipsclass->txt_mbsubstr( $day, 0, 1 ); - - $cal_output .= $this->ipsclass->compiled_templates['skin_calendar']->mini_cal_day_bit( $day ); - } - - //----------------------------------------- - // Print the main calendar body - //----------------------------------------- - - $cal_output .= $this->get_month_events( $month, $year, 1 ); - - return $this->ipsclass->compiled_templates['skin_calendar']->mini_cal_mini_wrap($this->month_words[$month - 1], $month, $year, $cal_output); - } - - /*-------------------------------------------------------------------------*/ - // Get BIRTHDAYS - /*-------------------------------------------------------------------------*/ - - function get_birthday_sql($month) - { - if ( !isset($this->query_bday_cache[ $month ]) OR !is_array( $this->query_bday_cache[ $month ] ) ) - { - // We are just going to query next and previous month - // so let's do it in one query and cache it... - - $prev_month = $this->get_prev_month( $month, date("Y") ); - $next_month = $this->get_next_month( $month, date("Y") ); - - $this->query_bday_cache[ $month ] = array(); - $this->query_bday_cache[ $next_month['month_id'] ] = array(); - $this->query_bday_cache[ $prev_month['month_id'] ] = array(); - - $this->ipsclass->DB->simple_construct( array( 'select' => 'bday_day, bday_month, id, members_display_name', 'from' => 'members', 'where' => 'bday_month IN('.$prev_month['month_id'].','.$month.','.$next_month['month_id'].')' ) ); - $this->ipsclass->DB->simple_exec(); - - while ($r = $this->ipsclass->DB->fetch_row()) - { - $this->query_bday_cache[ $r['bday_month'] ][ $r['bday_day'] ][] = $r; - } - } - } - - /*-------------------------------------------------------------------------*/ - // Get EVENTS - /*-------------------------------------------------------------------------*/ - - function get_events_sql( $month=0, $year=0, $get_cached=array() ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - if ( ! count( $get_cached ) ) - { - //----------------------------------------- - // Mini-cal is going to call next month and - // previous month anyways....let's just pull - // it all in one query and cache it - //----------------------------------------- - - $next_month = $this->get_next_month( $month, $year ); - $prev_month = $this->get_prev_month( $month, $year ); - $numberdays = date('t', mktime(0, 0, 0, $next_month['month_id'], 1, $next_month['year_id'] ) ); - $timenow = gmmktime( 0, 0, 1 , $prev_month['month_id'], 1, $prev_month['year_id'] ) - (12 * 3600); - $timethen = gmmktime( 23, 59, 59, $next_month['month_id'], $numberdays, $next_month['year_id']) + (12 * 3600); - $getcached = 0; - } - else - { - $next_month = array( 'month_id' => 0 ); - $prev_month = array( 'month_id' => 0 ); - $timenow = $get_cached['timenow']; - $timethen = $get_cached['timethen']; - list( $month, $day, $year ) = explode( ',', gmdate('n,j,Y', $get_cached['timenow']) ); - $getcached = 1; - } - - //----------------------------------------- - // Get the events - //----------------------------------------- - - if ( !isset($this->event_cache[ $month ]) OR ! is_array( $this->event_cache[ $month ] ) ) - { - //----------------------------------------- - // Get for cache - //----------------------------------------- - - if ( $getcached ) - { - $extra = ( isset($get_cached['cal_id']) AND $get_cached['cal_id'] ) ? "event_calendar_id=".intval($get_cached['cal_id'])." AND " : ''; - - $this->ipsclass->DB->cache_add_query( 'calendar_get_events_cache', array( 'extra' => $extra, - 'timenow' => $timenow, - 'timethen' => $timethen, - 'month' => $month ) - ); - - /*$this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'cal_events', - 'where' => "$extra event_approved=1 - AND ( (event_unix_to >= $timenow AND event_unix_from <= $timethen ) - OR ( event_unix_to=0 AND event_unix_from >= $timenow AND event_unix_from <= $timethen ) - OR ( event_recurring=3 AND FROM_UNIXTIME(event_unix_from,'%c')={$month} AND event_unix_to <= $timethen ) )" ) );*/ - $this->ipsclass->DB->cache_exec_query(); - } - else - { - //----------------------------------------- - // Get for display - //----------------------------------------- - - $approved = $this->can_moderate ? "event_approved IN (0,1)" : "event_approved=1"; - - $this->ipsclass->DB->cache_add_query( 'calendar_get_events', array( 'approved' => $approved, - 'calendar_id' => $this->calendar_id, - 'timenow' => $timenow, - 'timethen' => $timethen, - 'month' => $prev_month['month_id'].','.$month.','.$next_month['month_id'] ) - ); - - /*$this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'cal_events', - 'where' => "event_calendar_id = {$this->calendar_id} AND {$approved} - AND ( (event_unix_to >= $timenow AND event_unix_from <= $timethen ) - OR ( event_unix_to=0 AND event_unix_from >= $timenow AND event_unix_from <= $timethen ) - OR ( event_recurring=3 AND FROM_UNIXTIME(event_unix_from,'%c')={$month} AND event_unix_to <= $timethen ) )" ) );*/ - $this->ipsclass->DB->cache_exec_query(); - } - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - //----------------------------------------- - // Private event? - //----------------------------------------- - - if ( $r['event_private'] == 1 AND ! $getcached ) - { - if ( ! $this->ipsclass->member['id'] ) - { - continue; - } - - if ( $this->ipsclass->member['id'] != $r['event_member_id'] ) - { - continue; - } - } - - //----------------------------------------- - // Got permission? - //----------------------------------------- - - if ( $r['event_perms'] != '*' AND ! $getcached ) - { - $this_member_mgroups[] = $this->ipsclass->member['mgroup']; - - if( $this->ipsclass->member['mgroup_others'] ) - { - $this_member_mgroups = array_merge( $this_member_mgroups, explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ) ); - } - - $check = 0; - - foreach( $this_member_mgroups as $this_member_mgroup ) - { - if ( preg_match( "/(^|,)".$this_member_mgroup."(,|$)/", $r['event_perms'] ) ) - { - $check = 1; - } - } - - if( $check == 0 ) - { - continue; - } - } - - //----------------------------------------- - // Times - //----------------------------------------- - - $set_offset = 0; - if( $r['event_timeset'] AND !$r['event_all_day'] ) - { - $set_offset = $this->ipsclass->member['time_offset'] * 3600; - } - - $r['_unix_from'] = $r['event_unix_from'] ? $r['event_unix_from'] - $set_offset : 0; - $r['_unix_to'] = $r['event_unix_to'] > 0 ? $r['event_unix_to'] - $set_offset : 0; - - - //----------------------------------------- - // Recurring event? - //----------------------------------------- - - if ( $r['event_recurring'] > 0 ) - { - $r['recurring'] = 1; - - // Get recurring months - $r_month = 0; - $r_stamp = $r['event_unix_from']; - $r_month = gmdate('n', $r['_unix_from']); - $r_year = gmdate('Y', $r['_unix_from']); - - if( $r_month == $month && ($r_year == $year OR $r['event_recurring']==3) && $getcached == 0 ) - { - $this->event_cache[ $r_month ]['recurring'][] = $r; - } - - while( $r_stamp < $r['_unix_to'] ) - { - // Stop Duplicates! - $shouldpass = 1; - if ( isset($this->event_cache[ $r_month ]['recurring']) AND count( $this->event_cache[ $r_month ]['recurring'] ) ) - { - foreach ( $this->event_cache[ $r_month ]['recurring'] as $eventarray ) - { - if ( $eventarray['event_id'] == $r['event_id'] ) - { - $shouldpass = 0; - } - } - } - - if( ( ( $r_month != $month AND $r_month != $next_month['month_id'] AND $r_month != $prev_month['month_id'] ) - OR $r_year != $year) AND $getcached == 0 ) - { - $shouldpass = 0; - } - - if ( $shouldpass == 1 ) - { - $this->event_cache[ $r_month ]['recurring'][] = $r; - } - - if ( $r['event_recurring'] == 1 ) - { - $r_stamp += 604800; - } - elseif ( $r['event_recurring'] == 2 ) - { - $r_stamp += 86400 * 30; - } - else - { - // No need to check year, as month would then match anyways - $r_stamp += 31536000; - } - - if ( $r_month != gmdate('n', $r_stamp) ) - { - $r_month = gmdate('n', $r_stamp); - } - - if( $r_year != gmdate('Y', $r_stamp) ) - { - $r_year = gmdate('Y', $r_stamp); - } - } - } - - //----------------------------------------- - // Ranged event? - // OK, this is getting silly..... - // _checkdate -> gmmtime( 0,0,0 $_checkdate.. - // was showing a day earlier than allowed - //----------------------------------------- - - else if ( $r['event_recurring'] == 0 AND $r['_unix_to'] ) - { - $_gotit = array(); - $_begin = gmdate( "z", $r['_unix_from'] ); - $_checkdate = gmdate( "z", $r['_unix_to'] ); - $_checkts = $r['_unix_from']; - - $_cur_mo = $month; // Store to retrieve later if necessary - - $_tmp = ''; - $r['ranged'] = 1; - - // Lapse over a year? - - if( $_checkdate < $_begin ) - { - $tmp_difference = 365 + $_checkdate - $_begin; - - if( $tmp_difference > 0 ) - { - $_checkdate = $_begin + $tmp_difference; - } - - unset( $tmp_difference ); - } - - while ( $_begin <= $_checkdate ) - { - // Did we lapse over the month? - // How about the year? If so, - // let's go ahead and reset ourselves - - $realday = gmdate( "j", $_checkts ); - $month = gmdate( "n", $_checkts ); - - if ( !array_key_exists( $month, $_gotit ) ) - { - $_gotit[ $month ] = array(); - } - if ( !in_array( $realday, $_gotit[ $month ] ) ) - { - $this->event_cache[ $month ]['ranged'][ $realday ][] = $r; - - $_count = count( $this->event_cache[ $month ]['ranged'][ $realday ] ) - 1; - $_tmp = $this->event_cache[ $month ]['ranged'][ $realday ][ $_count ]; - $_gotit[ $month ][] = $realday; - } - else - { - if ( $r['_unix_to'] != $r['event_unix_from'] ) - { - $this->event_cache[ $month ]['ranged'][ $realday ][] = $_tmp; - } - } - $_begin += 1; - $_checkts += 86400; - } - $month = $_cur_mo; - } - - //----------------------------------------- - // Single event - //----------------------------------------- - - else - { - $r['single'] = 1; - - # Make sure correct month is used for cached queries - list( $_month, $_day, $_year ) = explode( ',', gmdate('n,j,Y', $r['_unix_from'] ) ); - - $this->event_cache[ $_month ]['single'][ $_day ][] = $r; - } - } - } - } - - /*-------------------------------------------------------------------------*/ - // Get day's events - /*-------------------------------------------------------------------------*/ - - function get_day_events( $month="", $day="", $year="" ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $return = array(); - - //----------------------------------------- - // Ranged - //----------------------------------------- - - if ( isset($this->event_cache[ $month ]['ranged'][ $day ]) AND is_array( $this->event_cache[ $month ]['ranged'][ $day ] ) and count( $this->event_cache[ $month ]['ranged'][ $day ] ) ) - { - foreach( $this->event_cache[ $month ]['ranged'][ $day ] as $idx => $data ) - { - $return[] = $this->event_cache[ $month ]['ranged'][ $day ][ $idx ]; - } - } - - //----------------------------------------- - // Recurring - //----------------------------------------- - - if ( isset($this->event_cache[ $month ]['recurring']) AND is_array( $this->event_cache[ $month ]['recurring'] ) and count( $this->event_cache[ $month ]['recurring'] ) ) - { - foreach( $this->event_cache[ $month ]['recurring'] as $idx => $data ) - { - if ( $this->get_info_events( $data, $month, $day, $year ) ) - { - $return[] = $this->event_cache[ $month ]['recurring'][ $idx ]; - } - } - } - - //----------------------------------------- - // Single day - //----------------------------------------- - - - if ( isset($this->event_cache[ $month ]['single'][ $day ]) AND is_array( $this->event_cache[ $month ]['single'][ $day ] ) and count( $this->event_cache[ $month ]['single'][ $day ] ) ) - { - foreach( $this->event_cache[ $month ]['single'][ $day ] as $idx => $data ) - { - $return[] = $this->event_cache[ $month ]['single'][ $day ][ $idx ]; - } - } - - return $return; - } - - /*-------------------------------------------------------------------------*/ - // Get event info - /*-------------------------------------------------------------------------*/ - - function get_info_events( $event, $month, $day, $year, $adj=1 ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $_start = gmmktime(0 , 0 , 0 , $month, $day, $year); - $_lunch = gmmktime(12, 0 , 0 , $month, $day, $year); - $_end = gmmktime(23, 59, 59, $month, $day, $year) + 1; - $_month = gmmktime(0 , 0 , 0 , $month, 1 , $year); - $_offset = 0; // - Set at time of save: $event['event_tz'] * 3600; - - //----------------------------------------- - // Already seen it? - //----------------------------------------- - - if ( $event['event_id'] AND isset($this->shown_events[ $month.'-'.$day.'-'.$year ][ $event['event_id'] ]) AND $this->shown_events[ $month.'-'.$day.'-'.$year ][ $event['event_id'] ] ) - { - return FALSE; - } - - //----------------------------------------- - // Check we're in range - //----------------------------------------- - - if ( isset($event['single']) AND $event['single'] ) - { - if ( $month.','.$day.','.$year == gmdate('n,j,Y', $event['_unix_from']) ) - { - $this->shown_events[ $month.'-'.$day.'-'.$year ][ $event['event_id'] ] = 1; - return TRUE; - } - } - - if ( ($event['_unix_to']) < $_start OR ($event['_unix_from'] ) > $_end ) - { - return FALSE; - } - - //----------------------------------------- - // Check recurring - //----------------------------------------- - - if ( $event['event_recurring'] ) - { - if ( $adj AND gmdate('w', $event['_unix_from']) != gmdate('w', $event['event_unix_from']) ) - { - if ( $event['_unix_from'] > $event['event_unix_from']) - { - $_lunch -= 86400; - } - else - { - $_lunch += 86400; - } - } - - //----------------------------------------- - // Weekly - //----------------------------------------- - - if ( $event['event_recurring'] == 1 ) - { - if ( gmdate('w', $event['event_unix_from']) != gmdate('w', $_lunch ) ) - { - return FALSE; - } - else - { - return TRUE; - } - } - - //----------------------------------------- - // Monthly - //----------------------------------------- - - else if ( $event['event_recurring'] == 2 ) - { - if ( gmdate('j', $event['event_unix_from']) == gmdate('j', $_lunch ) ) - { - return TRUE; - } - else - { - return FALSE; - } - } - - //----------------------------------------- - // Yearly - //----------------------------------------- - - else if ( $event['event_recurring'] == 3 ) - { - if ( (gmdate('j', $event['event_unix_from']) == gmdate('j', $_lunch )) AND (gmdate('n', $event['event_unix_from']) == gmdate('n', $_lunch )) ) - { - return TRUE; - } - else - { - return FALSE; - } - } - } - - return TRUE; - } - - /*-------------------------------------------------------------------------*/ - // Get month stuff - /*-------------------------------------------------------------------------*/ - - function get_month_events( $month="", $year="", $minical=0 ) - { - //----------------------------------------- - // Reset shown events - //----------------------------------------- - - $this->shown_events = array(); - - //----------------------------------------- - // Work out timestamps - //----------------------------------------- - - $our_datestamp = gmmktime( 0,0,0, $month, 1, $year); - $first_day_array = $this->ipsclass->date_getgmdate($our_datestamp); - - if( $this->ipsclass->vars['ipb_calendar_mon'] ) - { - $first_day_array['wday'] = $first_day_array['wday'] == 0 ? 7 : $first_day_array['wday']; - } - - //----------------------------------------- - // Get the birthdays from the database - //----------------------------------------- - - if ( $this->ipsclass->vars['show_bday_calendar'] ) - { - $birthdays = array(); - - $this->get_birthday_sql($month); - - $birthdays = $this->query_bday_cache[ $month ]; - } - - //----------------------------------------- - // Get the events - //----------------------------------------- - - $this->get_events_sql($month, $year); - - //----------------------------------------- - // Get events - //----------------------------------------- - - $seen_days = array(); - $seen_ids = array(); - $cal_output = ""; - - for ( $c = 0 ; $c < 42; $c++ ) - { - //----------------------------------------- - // Work out timestamps - //----------------------------------------- - - $_year = gmdate('Y', $our_datestamp); - $_month = gmdate('n', $our_datestamp); - $_day = gmdate('j', $our_datestamp); - $day_array = $this->ipsclass->date_getgmdate($our_datestamp); - - $check_against = $c; - - if( $this->ipsclass->vars['ipb_calendar_mon'] ) - { - $check_against = $c+1; - } - - if ( (($c) % 7 ) == 0 ) - { - //----------------------------------------- - // Kill the loop if we are no longer on our month - //----------------------------------------- - - if ($day_array['mon'] != $month) - { - break; - } - - if ( $minical ) - { - $cal_output .= $this->ipsclass->compiled_templates['skin_calendar']->mini_cal_new_row( $our_datestamp ); - } - else - { - $cal_output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_new_row( $our_datestamp ); - } - } - - //----------------------------------------- - // Run out of legal days for this month? - // Or have we yet to get to the first day? - //----------------------------------------- - - if ( ($check_against < $first_day_array['wday']) or ($day_array['mon'] != $month) ) - { - $cal_output .= $minical ? $this->ipsclass->compiled_templates['skin_calendar']->mini_cal_blank_cell() - : $this->ipsclass->compiled_templates['skin_calendar']->cal_blank_cell(); - } - else - { - if ( isset($seen_days[ $day_array['yday'] ]) AND $seen_days[ $day_array['yday'] ] == 1 ) - { - continue; - } - - $seen_days[ $day_array['yday'] ] = 1; - $tmp_cevents = array(); - $this_day_events = ""; - $cal_date = $day_array['mday']; - $queued_event = 0; - $cal_date_queued = ""; - - //----------------------------------------- - // Get events - //----------------------------------------- - - $events = $this->get_day_events( $_month, $_day, $_year ); - - if ( is_array( $events ) AND count( $events ) ) - { - foreach( $events as $event ) - { - if ( !isset($this->shown_events[ $_month.'-'.$_day.'-'.$_year ][ $event['event_id'] ]) OR !$this->shown_events[ $_month.'-'.$_day.'-'.$_year ][ $event['event_id'] ] ) - { - //----------------------------------------- - // Recurring - //----------------------------------------- - - if ( isset($event['recurring']) ) - { - $tmp_cevents[ $event['event_id'] ] = $this->ipsclass->compiled_templates['skin_calendar']->cal_events_wrap_recurring( $event ); - } - else if ( isset($event['single']) ) - { - $tmp_cevents[ $event['event_id'] ] = $this->ipsclass->compiled_templates['skin_calendar']->cal_events_wrap( $event ); - } - else - { - $tmp_cevents[ $event['event_id'] ] = $this->ipsclass->compiled_templates['skin_calendar']->cal_events_wrap_range( $event ); - } - - $this->shown_events[ $_month.'-'.$_day.'-'.$_year ][ $event['event_id'] ] = 1; - - //----------------------------------------- - // Queued events? - //----------------------------------------- - - if ( ! $event['event_approved'] AND $this->can_moderate ) - { - $queued_event = 1; - } - } - } - - //----------------------------------------- - // How many events? - //----------------------------------------- - - if ( count($tmp_cevents) >= $this->calendar['cal_event_limit'] ) - { - $this_day_events = $this->ipsclass->compiled_templates['skin_calendar']->cal_events_wrap_manual( - "cal_id={$this->calendar_id}&code=showday&y=".$day_array['year']."&m=".$day_array['mon']."&d=".$day_array['mday'], - sprintf( $this->ipsclass->lang['show_n_events'], intval(count($tmp_cevents)) ) ); - } - else if ( count( $tmp_cevents ) ) - { - $this_day_events = implode( "\n", $tmp_cevents ); - } - - $tmp_cevents[] = array(); - } - - //----------------------------------------- - // Birthdays - //----------------------------------------- - - if ( $this->calendar['cal_bday_limit'] ) - { - if ( isset($birthdays[ $day_array['mday'] ]) and count( $birthdays[ $day_array['mday'] ] ) > 0 ) - { - $no_bdays = count($birthdays[ $day_array['mday'] ]); - - if ( $no_bdays ) - { - if ( $this->calendar['cal_bday_limit'] and $no_bdays <= $this->calendar['cal_bday_limit'] ) - { - foreach( $birthdays[ $day_array['mday'] ] as $user ) - { - $this_day_events .= $this->ipsclass->compiled_templates['skin_calendar']->cal_events_wrap_manual( - "cal_id={$this->calendar_id}&code=birthdays&y=".$day_array['year']."&m=".$day_array['mon']."&d=".$day_array['mday'], - $user['members_display_name'].$this->ipsclass->lang['bd_birthday'] ); - } - - } - else - { - $this_day_events .= $this->ipsclass->compiled_templates['skin_calendar']->cal_events_wrap_manual( - "cal_id={$this->calendar_id}&code=birthdays&y=".$day_array['year']."&m=".$day_array['mon']."&d=".$day_array['mday'], - sprintf( $this->ipsclass->lang['entry_birthdays'], $no_bdays ) ); - } - } - } - } - - //----------------------------------------- - // Show it - //----------------------------------------- - - if ($this_day_events != "") - { - $cal_date = "{$day_array['mday']}"; - $cal_date_queued = "{$this->ipsclass->base_url}act=calendar&cal_id={$this->calendar_id}&modfilter=queued&code=showday&y=".$year."&m=".$month."&d=".$day_array['mday']; - - $this_day_events = $this->ipsclass->compiled_templates['skin_calendar']->cal_events_start() . $this_day_events . $this->ipsclass->compiled_templates['skin_calendar']->cal_events_end(); - } - - if ( ($day_array['mday'] == $this->now_date['mday']) and ($this->now_date['mon'] == $day_array['mon']) and ($this->now_date['year'] == $day_array['year'])) - { - $cal_output .= $minical ? $this->ipsclass->compiled_templates['skin_calendar']->mini_cal_date_cell_today($cal_date, $this_day_events) : $this->ipsclass->compiled_templates['skin_calendar']->cal_date_cell_today($cal_date, $this_day_events, $cal_date_queued, $queued_event); - } - else - { - $cal_output .= $minical ? $this->ipsclass->compiled_templates['skin_calendar']->mini_cal_date_cell($cal_date, $this_day_events) : $this->ipsclass->compiled_templates['skin_calendar']->cal_date_cell($cal_date, $this_day_events, $cal_date_queued, $queued_event); - } - - unset($this_day_events); - - $our_datestamp += 86400; - } - } - - return $cal_output; - } - - /*-------------------------------------------------------------------------*/ - // SHOW BIRTHDAYS - /*-------------------------------------------------------------------------*/ - - function show_birthdays() - { - $day = intval($this->ipsclass->input['d']); - $month = intval($this->ipsclass->input['m']); - $year = intval($this->ipsclass->input['y']); - - //----------------------------------------- - // Do we have a sensible date? - //----------------------------------------- - - if ( ! checkdate( $month, $day , $year ) ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_date_oor') ); - } - - $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_page_events_start() . $this->make_birthday_html($month, $day) . $this->ipsclass->compiled_templates['skin_calendar']->cal_page_events_end(); - - $this->nav[] = "{$this->ipsclass->lang['page_title']}"; - $this->nav[] = "{$this->calendar['cal_title']}"; - $this->nav[] = $this->ipsclass->lang['cal_birthdays']." ".$day." ".$this->month_words[$this->chosen_month - 1]." ".$this->chosen_year; - - } - - /*-------------------------------------------------------------------------*/ - // MAKE BIRTHDAY HTML (return HTML for bdays) - /*-------------------------------------------------------------------------*/ - - function make_birthday_html($month, $day, $switch=0) - { - if ( ! $this->ipsclass->vars['show_bday_calendar'] ) - { - return; - } - - //----------------------------------------- - // Is it leapyear? - //----------------------------------------- - - if( !date("L") ) - { - if( $month == "2" AND $day == "28" ) - { - $where_string = "bday_month=".$month." AND (bday_day={$day} OR bday_day=29)"; - } - else - { - $where_string = 'bday_month='.$month . " AND bday_day={$day}"; - } - } - else - { - $where_string = 'bday_month='.$month . " AND bday_day={$day}"; - } - - //----------------------------------------- - // Get the birthdays from the database - //----------------------------------------- - - $birthdays = array(); - - $output = ""; - - $this->ipsclass->DB->simple_construct( array( 'select' => 'bday_day, bday_month, bday_year, id, members_display_name', - 'from' => 'members', - 'where' => $where_string ) ); - $this->ipsclass->DB->simple_exec(); - - if ( ! $this->ipsclass->DB->get_num_rows() ) - { - if ($switch == 1) - { - return; - } - else - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_events') ); - } - } - else - { - $output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_birthday_start(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $age = $this->chosen_year - $r['bday_year']; - - $output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_birthday_entry($r['id'], $r['members_display_name'], $age); - } - - $output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_birthday_end(); - } - - return $output; - } - - /*-------------------------------------------------------------------------*/ - // Internal - /*-------------------------------------------------------------------------*/ - - function get_month_dropdown($month="") - { - $return = ""; - - if ($month == "") - { - $month = $this->chosen_month; - } - - for ( $x = 1 ; $x <= 12 ; $x++ ) - { - $return .= "\t\n"; - } - - return $return; - } - - - /*-------------------------------------------------------------------------*/ - // Internal - /*-------------------------------------------------------------------------*/ - - function get_year_dropdown($year="") - { - $return = ""; - - $this->ipsclass->vars['start_year'] = (isset($this->ipsclass->vars['start_year'])) ? $this->ipsclass->vars['start_year'] : 2001; - $this->ipsclass->vars['year_limit'] = (isset($this->ipsclass->vars['year_limit'])) ? $this->ipsclass->vars['year_limit'] : 5; - - if ($year == "") - { - $year = $this->chosen_year; - } - - for ( $x = $this->ipsclass->vars['start_year'] ; $x <= $this->now_date['year'] + $this->ipsclass->vars['year_limit'] ; $x++ ) - { - $return .= "\t\n"; + } + } + + if( ! $this->calendar ) + { + if( count( $this->calendar_cache ) ) + { + $tmp_resort = $this->calendar_cache; + ksort($tmp_resort); + reset($tmp_resort); + $default_calid = key( $tmp_resort ); + $this->calendar_id = $default_calid; + $this->calendar = $tmp_resort[ $default_calid ]; + unset( $tmp_resort ); + } + } + + //----------------------------------------- + // Got viewing perms? + //----------------------------------------- + + $this->build_permissions(); + + if ( ! $this->can_read ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_perm') ); + } + + //----------------------------------------- + // Prep our chosen dates + //----------------------------------------- + + // There is something whacky with getdate and GMT + // This handrolled method seems to take into account + // DST where getdate refuses. + + $a = explode( ',', gmdate( 'Y,n,j,G,i,s', time() + $this->ipsclass->get_time_offset() ) ); + + $this->now_date = array( + 'year' => $a[0], + 'mon' => $a[1], + 'mday' => $a[2], + 'hours' => $a[3], + 'minutes' => $a[4], + 'seconds' => $a[5] + ); + + if ( isset($this->ipsclass->input['year']) ) + { + $this->ipsclass->input['y'] = $this->ipsclass->input['year']; + } + + $this->chosen_month = ( !isset($this->ipsclass->input['m']) OR !intval($this->ipsclass->input['m']) ) ? $this->now_date['mon'] : intval($this->ipsclass->input['m']); + $this->chosen_year = ( !isset($this->ipsclass->input['y']) OR !intval($this->ipsclass->input['y']) ) ? $this->now_date['year'] : intval($this->ipsclass->input['y']); + + //----------------------------------------- + // Make sure the date is in range. + //----------------------------------------- + + if ( ! checkdate( $this->chosen_month, 1 , $this->chosen_year ) ) + { + $this->chosen_month = $this->now_date['mon']; + $this->chosen_year = $this->now_date['year']; + } + + //----------------------------------------- + // Get the timestamp for our chosen date + //----------------------------------------- + + $this->our_datestamp = mktime( 0,0,1, $this->chosen_month, 1, $this->chosen_year); + $this->first_day_array = $this->ipsclass->date_getgmdate($this->our_datestamp); + + //----------------------------------------- + // Finally, build up the lang arrays + //----------------------------------------- + + $this->month_words = array( $this->ipsclass->lang['M_1'] , $this->ipsclass->lang['M_2'] , $this->ipsclass->lang['M_3'] , + $this->ipsclass->lang['M_4'] , $this->ipsclass->lang['M_5'] , $this->ipsclass->lang['M_6'] , + $this->ipsclass->lang['M_7'] , $this->ipsclass->lang['M_8'] , $this->ipsclass->lang['M_9'] , + $this->ipsclass->lang['M_10'], $this->ipsclass->lang['M_11'], $this->ipsclass->lang['M_12'] ); + + if( !$this->ipsclass->vars['ipb_calendar_mon'] ) + { + $this->day_words = array( $this->ipsclass->lang['D_0'], $this->ipsclass->lang['D_1'], $this->ipsclass->lang['D_2'], + $this->ipsclass->lang['D_3'], $this->ipsclass->lang['D_4'], $this->ipsclass->lang['D_5'], + $this->ipsclass->lang['D_6'] ); + } + else + { + $this->day_words = array( $this->ipsclass->lang['D_1'], $this->ipsclass->lang['D_2'], $this->ipsclass->lang['D_3'], + $this->ipsclass->lang['D_4'], $this->ipsclass->lang['D_5'], $this->ipsclass->lang['D_6'], + $this->ipsclass->lang['D_0'] ); + } + + switch( $this->ipsclass->input['code'] ) + { + case 'newevent': + $this->cal_event_form('add'); + break; + case 'addnewevent': + $this->cal_event_save('add'); + break; + case 'edit': + $this->cal_event_form('edit'); + break; + case 'doedit': + $this->cal_event_save('edit'); + break; + + case 'event_approve': + $this->event_approve(); + break; + + case 'showday': + $this->show_day(); + break; + + case 'showevent': + $this->show_event(); + break; + + case 'birthdays': + $this->show_birthdays(); + break; + + case 'showweek': + $this->show_week(); + break; + + case 'delete': + $this->cal_delete(); + break; + + case 'find': + $this->find_date(); + break; + + default: + $this->show_month(); + break; + } + + if ($this->page_title == "") + { + $this->page_title = $this->ipsclass->vars['board_name']." ".$this->ipsclass->lang['page_title']; + } + + if (! is_array($this->nav) ) + { + $this->nav[] = "{$this->ipsclass->lang['page_title']}"; + $this->nav[] = "{$this->calendar['cal_title']}"; + } + + $this->ipsclass->print->add_output("$this->output"); + $this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, 'NAV' => $this->nav ) ); + } + + /*-------------------------------------------------------------------------*/ + // Event Approve + /*-------------------------------------------------------------------------*/ + + function cal_delete() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $cal_id = intval( $this->ipsclass->input['cal_id'] ); + $event_id = intval( $this->ipsclass->input['event_id'] ); + $md5check = trim( $this->ipsclass->input['md5check'] ); + + //----------------------------------------- + // Get permissions + //----------------------------------------- + + $this->build_permissions( $cal_id ); + + //----------------------------------------- + // Check + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'cal_events', 'where' => "event_id=$event_id AND event_calendar_id=$cal_id" ) ); + $this->ipsclass->DB->exec_query(); + $memcheck = $this->ipsclass->DB->fetch_row(); + + if ( ! $cal_id OR ! $event_id ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); + } + + if ( ! $this->can_moderate && ( $this->ipsclass->member['id'] > 0 && $this->ipsclass->member['id'] <> $memcheck['event_member_id'] ) ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); + } + + //----------------------------------------- + // Check MD5 + //----------------------------------------- + + if ( $md5check != $this->ipsclass->md5_check ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); + } + + //----------------------------------------- + // Delete... + //----------------------------------------- + + $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'cal_events', 'where' => "event_id=$event_id AND event_calendar_id=$cal_id" ) ); + + //----------------------------------------- + // Recache... + //----------------------------------------- + + $this->_call_recache(); + + //----------------------------------------- + // Boing... + //----------------------------------------- + + $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['cal_event_delete'] , "act=calendar&cal_id={$cal_id}" ); + } + + /*-------------------------------------------------------------------------*/ + // Event Approve + /*-------------------------------------------------------------------------*/ + + function event_approve() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $cal_id = intval( $this->ipsclass->input['cal_id'] ); + $event_id = intval( $this->ipsclass->input['event_id'] ); + $approve = intval( $this->ipsclass->input['approve'] ); + $modfilter = trim( $this->ipsclass->input['modfilter'] ); + $quicktime = trim( $this->ipsclass->input['qt'] ); + $md5check = trim( $this->ipsclass->input['md5check'] ); + + list( $month, $day, $year ) = explode( "-", $quicktime ); + + //----------------------------------------- + // Get permissions + //----------------------------------------- + + $this->build_permissions( $cal_id ); + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( ! $this->can_moderate ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); + } + + //----------------------------------------- + // Check MD5 + //----------------------------------------- + + if ( $md5check != $this->ipsclass->md5_check ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); + } + + //----------------------------------------- + // Check Dates + //----------------------------------------- + + if ( ! $day OR ! $month OR ! $year ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); + } + + //----------------------------------------- + // Get Event + //----------------------------------------- + + $event = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'cal_events', 'where' => "event_calendar_id={$cal_id} and event_id={$event_id}" ) ); + + if ( ! $event['event_id'] ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); + } + + //----------------------------------------- + // Update event... + //----------------------------------------- + + $this->ipsclass->DB->do_update( 'cal_events', array( 'event_approved' => $event['event_approved'] ? 0 : 1 ), 'event_id='.$event_id ); + + //----------------------------------------- + // Recache... + //----------------------------------------- + + $this->_call_recache(); + + //----------------------------------------- + // Boink... + //----------------------------------------- + + $this->ipsclass->boink_it( $this->ipsclass->base_url."act=calendar&cal_id={$cal_id}&modfilter={$modfilter}&code=showday&y={$year}&m={$month}&d={$day}"); + } + + /*-------------------------------------------------------------------------*/ + // Build Permissions + /*-------------------------------------------------------------------------*/ + + function build_permissions( $cal_id=0 ) + { + $this->can_read = 0; + $this->can_post = 0; + $this->can_avoid_queue = 0; + $this->can_moderate = 0; + + //----------------------------------------- + // Got an idea? + //----------------------------------------- + + if ( ! $cal_id ) + { + $cal_id = $this->calendar_id; + } + + $calendar = $this->calendar_cache[ $cal_id ]; + + //----------------------------------------- + // Read + //----------------------------------------- + + if ( $this->ipsclass->check_perms( $calendar['perm_read'] ) == TRUE ) + { + $this->can_read = 1; + } + + //----------------------------------------- + // Post + //----------------------------------------- + + if ( $this->ipsclass->check_perms( $calendar['perm_post'] ) == TRUE ) + { + $this->can_post = 1; + } + + //----------------------------------------- + // Mod Queue + //----------------------------------------- + + if ( $this->ipsclass->check_perms( $calendar['perm_nomod'] ) == TRUE ) + { + $this->can_avoid_queue = 1; + } + + //----------------------------------------- + // Moderate + //----------------------------------------- + + if ( $this->ipsclass->member['g_is_supmod'] ) + { + $this->can_moderate = 1; + } + + } + + /*-------------------------------------------------------------------------*/ + // Find + /*-------------------------------------------------------------------------*/ + + function find_date() + { + if ( $this->ipsclass->input['what'] ) + { + if ( $this->ipsclass->input['what'] == 'thismonth' ) + { + $this->ipsclass->boink_it( $this->ipsclass->base_url."act=calendar&cal_id={$this->calendar_id}&m={$this->now_date['mon']}&y={$this->now_date['year']}" ); + } + else + { + $time = time() + $this->ipsclass->get_time_offset(); + + $this->ipsclass->boink_it( $this->ipsclass->base_url."act=calendar&cal_id={$this->calendar_id}&code=showweek&week={$time}" ); + } + } + else + { + $this->show_month(); + } + } + + /*-------------------------------------------------------------------------*/ + // Show WEEK + /*-------------------------------------------------------------------------*/ + + function show_week() + { + $in_week = intval($this->ipsclass->input['week']); + + //----------------------------------------- + // Get start of week + //----------------------------------------- + + $startweek = $this->ipsclass->date_getgmdate( $in_week ); + + if( !$this->ipsclass->vars['ipb_calendar_mon'] ) + { + //----------------------------------------- + // Not Sunday? Go back.. + //----------------------------------------- + + $startweek['wday'] = intval($startweek['wday']); + + if ( $startweek['wday'] > 0 ) + { + while ( $startweek['wday'] != 0 ) + { + $startweek['wday']--; + $in_week -= 86400; + } + + $startweek = $this->ipsclass->date_getgmdate( $in_week ); + } + } + else + { + //----------------------------------------- + // Not Monday, rewind... + // date_getgmdate will set weekday start to 1 + // PHP 5.1 allows for 'N' which will fix + // this, but we support earlier versions.. + //----------------------------------------- + + if ( $startweek['wday'] != 1 ) + { + $startweek['wday'] = $startweek['wday'] == 0 ? 7 : $startweek['wday']; + + while ( $startweek['wday'] != 1 ) + { + $startweek['wday']--; + $in_week -= 86400; + } + + $startweek = $this->ipsclass->date_getgmdate( $in_week ); + } + } + + //----------------------------------------- + // Get end of week + //----------------------------------------- + + $endweek = $this->ipsclass->date_getgmdate( $in_week + 604800 ); + $our_datestamp = gmmktime( 0,0,0, $startweek['mon'], $startweek['mday'], $startweek['year']); + $our_timestamp = $in_week; + $seen_days = array(); // Holds yday + $seen_ids = array(); + + //----------------------------------------- + // Figure out the next / previous links + //----------------------------------------- + + $prev_month = $this->get_prev_month($this->chosen_month, $this->chosen_year); + $next_month = $this->get_next_month($this->chosen_month, $this->chosen_year); + + $prev_week = $this->ipsclass->date_getgmdate( $in_week - 604800 ); + $next_week = $this->ipsclass->date_getgmdate( $in_week + 604800 ); + + $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_week_content( $startweek['mday'], $this->month_words[$startweek['mon'] - 1], $startweek['year'], $prev_week, $next_week); + + $last_month_id = -1; + + //----------------------------------------- + // Get the events + //----------------------------------------- + + $this->get_events_sql($startweek['mon'], $startweek['year']); + + //----------------------------------------- + // Print each effing day :D + //----------------------------------------- + + $cal_output = ""; + + for ( $i = 0 ; $i <= 6 ; $i++ ) + { + $year = gmdate('Y', $our_datestamp); + $month = gmdate('n', $our_datestamp); + $day = gmdate('j', $our_datestamp); + $today = $this->ipsclass->date_getgmdate($our_datestamp); + $this_day_events = ""; + + if ( $last_month_id != $today['mon'] ) + { + $last_month_id = $today['mon']; + + $cal_output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_week_monthbar( $this->month_words[$today['mon'] - 1], $today['year'] ); + + //----------------------------------------- + // Get the birthdays from the database + //----------------------------------------- + + if ( $this->ipsclass->vars['show_bday_calendar'] ) + { + $birthdays = array(); + + $this->get_birthday_sql($today['mon']); + + $birthdays = $this->query_bday_cache[ $today['mon'] ]; + } + + //----------------------------------------- + // Get the events + //----------------------------------------- + + $this->get_events_sql($month, $year); + } + + $events = $this->get_day_events( $month, $day, $year ); + + $queued_event = 0; + + if ( is_array( $events ) AND count( $events ) ) + { + foreach( $events as $event ) + { + if ( !isset($this->shown_events[ $month.'-'.$day.'-'.$year ][ $event['event_id'] ]) OR !$this->shown_events[ $month.'-'.$day.'-'.$year ][ $event['event_id'] ] ) + { + //----------------------------------------- + // Recurring + //----------------------------------------- + + if ( $event['recurring'] ) + { + $this_day_events .= $this->ipsclass->compiled_templates['skin_calendar']->cal_events_wrap_recurring( $event ); + } + else if ( $event['single'] ) + { + $this_day_events .= $this->ipsclass->compiled_templates['skin_calendar']->cal_events_wrap( $event ); + } + else + { + $this_day_events .= $this->ipsclass->compiled_templates['skin_calendar']->cal_events_wrap_range( $event ); + } + + $this->shown_events[ $month.'-'.$day.'-'.$year ][ $event['event_id'] ] = 1; + } + + //----------------------------------------- + // Queued events? + //----------------------------------------- + + if ( ! $event['event_approved'] AND $this->can_moderate ) + { + $queued_event = 1; + } + } + } + + //----------------------------------------- + // Birthdays + //----------------------------------------- + + if ( $this->calendar['cal_bday_limit'] ) + { + if ( isset($birthdays[ $today['mday'] ]) and count( $birthdays[ $today['mday'] ] ) > 0 ) + { + $no_bdays = count($birthdays[ $today['mday'] ]); + + if ( $this->calendar['cal_bday_limit'] and $no_bdays <= $this->calendar['cal_bday_limit'] ) + { + foreach( $birthdays[ $today['mday'] ] as $user ) + { + $this_day_events .= $this->ipsclass->compiled_templates['skin_calendar']->cal_week_events_wrap( + "code=birthdays&y=".$today['year']."&m=".$today['mon']."&d=".$today['mday'], + $user['members_display_name'].$this->ipsclass->lang['bd_birthday'] + ); + } + + } + else + { + $this_day_events .= $this->ipsclass->compiled_templates['skin_calendar']->cal_week_events_wrap( + "code=birthdays&y=".$today['year']."&m=".$today['mon']."&d=".$today['mday'], + sprintf( $this->ipsclass->lang['entry_birthdays'], count($birthdays[ $today['mday'] ]) ) + ); + } + } + } + + if ($this_day_events == "") + { + $this_day_events = ' '; + } + + if( $this->ipsclass->vars['ipb_calendar_mon'] ) + { + // Reset if Monday is first day + + $today['wday'] = $today['wday'] == 0 ? 6 : $today['wday'] - 1; + } + + $cal_output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_week_dayentry( $this->day_words[ $today['wday'] ], $today['mday'], $this->month_words[$today['mon'] - 1], $today['mon'], $today['year'], $this_day_events, $queued_event ); + + $our_datestamp += 86400; + + unset($this_day_events); + } + + //----------------------------------------- + // Switch the HTML tags... + //----------------------------------------- + + $this->output = str_replace( "" , $cal_output, $this->output ); + + $this->output = str_replace( "" , $this->get_month_dropdown(), $this->output ); + $this->output = str_replace( "" , $this->get_year_dropdown() , $this->output ); + + //----------------------------------------- + // Get prev / this / next calendars + //----------------------------------------- + + $this->output = str_replace( "", $this->get_mini_calendar( $prev_month['month_id'], $prev_month['year_id'] ), $this->output ); + $this->output = str_replace( "", $this->get_mini_calendar( $this->chosen_month , $this->chosen_year ), $this->output ); + $this->output = str_replace( "", $this->get_mini_calendar( $next_month['month_id'], $next_month['year_id'] ), $this->output ); + + $this->nav[] = "{$this->ipsclass->lang['page_title']}"; + $this->nav[] = "{$this->calendar['cal_title']}"; + $this->nav[] = $this->month_words[$this->chosen_month - 1]." ".$this->chosen_year; + + } + + /*-------------------------------------------------------------------------*/ + // SHOW MONTH + /*-------------------------------------------------------------------------*/ + + function show_month() + { + //----------------------------------------- + // Figure out the next / previous links + //----------------------------------------- + + $prev_month = $this->get_prev_month($this->chosen_month, $this->chosen_year); + $next_month = $this->get_next_month($this->chosen_month, $this->chosen_year); + + $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_main_content($this->month_words[$this->chosen_month - 1], $this->chosen_year, $prev_month, $next_month, $this->calendar_jump, $this->calendar_id); + + //----------------------------------------- + // Print the days table top row + //----------------------------------------- + + $day_output = ""; + $cal_output = ""; + + foreach ($this->day_words as $day) + { + $day_output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_day_bit($day); + } + + $cal_output = $this->get_month_events($this->chosen_month, $this->chosen_year); + + //----------------------------------------- + // Switch the HTML tags... + //----------------------------------------- + + $this->output = str_replace( "", $day_output, $this->output ); + $this->output = str_replace( "" , $cal_output, $this->output ); + + $this->output = str_replace( "" , $this->get_month_dropdown(), $this->output ); + $this->output = str_replace( "" , $this->get_year_dropdown() , $this->output ); + + //----------------------------------------- + // Get prev / this / next calendars + //----------------------------------------- + + $this->output = str_replace( "", $this->get_mini_calendar( $prev_month['month_id'], $prev_month['year_id'] ), $this->output ); + $this->output = str_replace( "", $this->get_mini_calendar( $this->chosen_month , $this->chosen_year ), $this->output ); + $this->output = str_replace( "", $this->get_mini_calendar( $next_month['month_id'], $next_month['year_id'] ), $this->output ); + + $this->nav[] = "{$this->ipsclass->lang['page_title']}"; + $this->nav[] = "{$this->calendar['cal_title']}"; + $this->nav[] = $this->month_words[$this->chosen_month - 1]." ".$this->chosen_year; + } + + /*-------------------------------------------------------------------------*/ + // POST NEW CALENDAR EVENT + /*-------------------------------------------------------------------------*/ + + function cal_event_form( $type='add' ) + { + //----------------------------------------- + // Load post class + //----------------------------------------- + + require_once( ROOT_PATH.'sources/classes/post/class_post.php' ); + $this->post = new class_post(); + $this->post->ipsclass =& $this->ipsclass; + $this->post->load_classes(); + + //----------------------------------------- + // INIT + //----------------------------------------- + + $event_id = isset($this->ipsclass->input['event_id']) ? intval( $this->ipsclass->input['event_id'] ) : 0; + $calendar_id = isset($this->ipsclass->input['calendar_id']) ? intval( $this->ipsclass->input['calendar_id'] ) : 0; + $form_type = $this->ipsclass->input['formtype']; + $recur_menu = ""; + $calendar_jump = ""; + $divhide = "none"; + + //----------------------------------------- + // CHECK + //----------------------------------------- + + if ( ! $this->ipsclass->member['id']) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); + } + + //----------------------------------------- + // Got permission to post to this calendar? + //----------------------------------------- + + $this->build_permissions( $calendar_id ); + + if ( ! $this->can_post ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); + } + + //----------------------------------------- + // Edit calendar option + //----------------------------------------- + + foreach( $this->calendar_cache as $data ) + { + if ( $this->ipsclass->check_perms( $data['perm_post'] ) == TRUE AND $this->ipsclass->check_perms( $data['perm_read'] ) == TRUE ) + { + $selected = $calendar_id == $data['cal_id'] ? ' selected="selected" ' : ''; + $calendar_jump .= "\n"; + } + } + + //----------------------------------------- + // WHICHISIT + //----------------------------------------- + + if ( $type == 'add' ) + { + $tmp = isset($this->ipsclass->input['nd']) ? explode( "-", $this->ipsclass->input['nd'] ) : array(); + + $nd = isset($tmp[2]) ? intval( $tmp[2] ) : 0; + $nm = isset($tmp[1]) ? intval( $tmp[1] ) : 0; + $ny = isset($tmp[0]) ? intval( $tmp[0] ) : 0; + + $public = ""; + $private = ""; + $event = array( 'event_smilies' => 1, 'event_content' => '' ); + + $fd = $nd = $nd ? $nd : $this->now['mday']; + $fm = $nm = $nm ? $nm : $this->now['mon']; + $fy = $ny = $ny ? $ny : $this->now['year']; + + $tz_offset = ( $this->ipsclass->member['time_offset'] != "" ) ? $this->ipsclass->member['time_offset'] : $this->ipsclass->vars['time_offset']; + + $recur_menu = ""; + $code = 'addnewevent'; + $button = $this->ipsclass->lang['calendar_submit']; + + $event['event_timeset'] = ""; + } + else + { + if ( ! $event_id ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_events') ); + } + + //----------------------------------------- + // Get the event + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'cal_events', 'where' => "event_id=$event_id" ) ); + $this->ipsclass->DB->simple_exec(); + + if ( ! $event = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_events') ); + } + + //----------------------------------------- + // Do we have permission to edit this event? + //----------------------------------------- + + if ( $this->ipsclass->member['id'] == $event['event_member_id'] ) + { + $can_edit = 1; + } + else if ( $this->ipsclass->member['g_is_supmod'] == 1 ) + { + $can_edit = 1; + } + else + { + $can_edit = 0; + } + + if ( $can_edit != 1 ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_events') ); + } + + //----------------------------------------- + // Do we have permission to see the event? + //----------------------------------------- + + if ( $event['event_perms'] != '*' ) + { + $this_member_mgroups[] = $this->ipsclass->member['mgroup']; + + if( $this->ipsclass->member['mgroup_others'] ) + { + $this_member_mgroups = array_merge( $this_member_mgroups, explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ) ); + } + + $check = 0; + + foreach( $this_member_mgroups as $this_member_mgroup ) + { + if ( preg_match( "/(^|,)".$this_member_mgroup."(,|$)/", $event['event_perms'] ) ) + { + $check = 1; + } + } + + if( $check == 0 ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_events') ); + } + } + + $tz_offset = $event['event_tz']; + + //----------------------------------------- + // Date stuff + //----------------------------------------- + + $convert_hours = 0; + + if( $event['event_timeset'] ) + { + $divhide = ""; + $hour_min = explode(":", $event['event_timeset']); + $convert_hours = ($hour_min[0] * 3600) + ($hour_min[1] * 60); + } + + if( $tz_offset && $event['event_timeset'] AND !$event['event_all_day'] ) + { + $convert_hours = $tz_offset * 3600 + $convert_hours; + } + + $_unix_from = explode('-', gmdate('n-j-Y', $event['event_unix_from'] - $convert_hours )); + + if( $convert_hours && $event['event_unix_to'] ) + { + $event['event_unix_to'] -= $convert_hours; + } + $_unix_to = explode('-', gmdate('n-j-Y', $event['event_unix_to'] )); + + $nd = $_unix_from[1]; + $nm = $_unix_from[0]; + $ny = $_unix_from[2]; + + $fd = $_unix_to[1]; + $fm = $_unix_to[0]; + $fy = $_unix_to[2]; + + //----------------------------------------- + // Form stuff + //----------------------------------------- + + if ( $event['event_recurring'] ) + { + $form_type = 'recur'; + } + else if ( ! $event['event_recurring'] AND $event['event_unix_to'] ) + { + $form_type = 'range'; + } + else + { + $form_type = 'single'; + } + + //----------------------------------------- + // Private? + //----------------------------------------- + + if ( $event['event_private'] == 1 ) + { + $private = ' selected'; + } + else + { + $public = ' selected'; + } + + //----------------------------------------- + // Recur stuff + //----------------------------------------- + + $recur_menu .= $event['event_recurring'] == '1' ? "" + : ""; + + $recur_menu .= $event['event_recurring'] == '2' ? "" + : ""; + + $recur_menu .= $event['event_recurring'] == '3' ? "" + : ""; + $code = 'doedit'; + $button = $this->ipsclass->lang['calendar_edit_submit']; + } + + //----------------------------------------- + // Do TZ form + //----------------------------------------- + + $this->ipsclass->load_language( 'lang_ucp' ); + + $time_select = ""; + + //----------------------------------------- + // Start off nav + //----------------------------------------- + + $this->nav[] = "{$this->ipsclass->lang['page_title']}"; + $this->nav[] = "{$this->calendar['cal_title']}"; + $this->nav[] = $this->ipsclass->lang['post_new_event']; + + //----------------------------------------- + // Start off form + //----------------------------------------- + + $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->calendar_start_form( $code, $this->calendar_id, $form_type, $event_id ); + + $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->table_top($this->ipsclass->lang['post_new_event']); + $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->calendar_event_title( isset($event['event_title']) ? $event['event_title'] : '' ); + + //----------------------------------------- + // Alright... Which form type? + //----------------------------------------- + + if ( $form_type == 'single' ) + { + $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->calendar_choose_date_single( + $this->get_day_dropdown($nd), $this->get_month_dropdown($nm), $this->get_year_dropdown($ny) ); + } + else if ( $form_type == 'range' ) + { + $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->calendar_choose_date_range( + $this->get_day_dropdown($nd), $this->get_month_dropdown($nm), $this->get_year_dropdown($ny), + $this->get_day_dropdown($fd), $this->get_month_dropdown($fm), $this->get_year_dropdown($fy) ); + } + else + { + $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->calendar_choose_date_recur( + $this->get_day_dropdown($nd), $this->get_month_dropdown($nm), $this->get_year_dropdown($ny), + $recur_menu, + array( + 'd' => $this->get_day_dropdown($fd), + 'm' => $this->get_month_dropdown($fm), + 'y' => $this->get_year_dropdown($fy) + ) ); + } + + $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->calendar_event_type( $public, $private, $time_select, $this->calendar_jump, + array('formtype' => $form_type, 'timestart' => $event['event_timeset'], 'divhide' => $divhide, 'checked' => $divhide == '' ? "checked='checked'" : '' ) ); + + if ($this->ipsclass->member['mgroup'] == $this->ipsclass->vars['admin_group']) + { + //----------------------------------------- + // Get all the group ID's and names from + // the DB and build the selection box + //----------------------------------------- + + $group_choices = ""; + + foreach( $this->ipsclass->cache['group_cache'] as $r ) + { + $selected = ""; + + if ( isset($event['event_perms']) AND preg_match( "/(^|,)".$r['g_id']."(,|$)/", $event['event_perms'] ) ) + { + $selected = ' selected'; + } + + $group_choices .= "\n"; + } + + $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->calendar_admin_group_box($group_choices); + } + + //----------------------------------------- + // Using RTE? Convert BBCode to HTML + //----------------------------------------- + + if ( $event['event_content'] ) + { + $this->post->parser->parse_html = 0; + $this->post->parser->parse_smilies = intval($event['event_smilies']); + $this->post->parser->parse_bbcode = 1; + + if ( $this->post->han_editor->method == 'rte' ) + { + #$event['event_content'] = $this->post->parser->pre_edit_parse( $event['event_content'] ); + $event['event_content'] = $this->post->parser->convert_ipb_html_to_html( $event['event_content'] ); + } + else + { + $event['event_content'] = $this->post->parser->pre_edit_parse( $event['event_content'] ); + } + } + + //----------------------------------------- + // Generate text editor + //----------------------------------------- + + $this->output .= $this->post->html_add_smilie_box( $this->post->html_post_body( $event['event_content'] ) ); + + $this->output = str_replace( '' , $this->ipsclass->compiled_templates['skin_post']->get_box_enableemo( $event['event_smilies'] ? 'checked="checked"' : "" ) , $this->output ); + + $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->calendar_end_form( $button ); + } + + + /*-------------------------------------------------------------------------*/ + // ADD NEW CALENDAR EVENT TO THE DB + /*-------------------------------------------------------------------------*/ + + function cal_event_save( $type='add' ) + { + //----------------------------------------- + // Load post class + //----------------------------------------- + + require_once( ROOT_PATH.'sources/classes/post/class_post.php' ); + $this->post = new class_post(); + $this->post->ipsclass =& $this->ipsclass; + $this->post->load_classes(); + + //----------------------------------------- + // INIT + //----------------------------------------- + + $read_perms = '*'; + $end_day = ""; + $end_month = ""; + $end_year = ""; + $end_date = ""; + $event_ranged = 0; + $event_repeat = 0; + $can_edit = 0; + + $form_type = $this->ipsclass->input['formtype']; + $event_id = intval($this->ipsclass->input['event_id']); + $calendar_id = intval( $this->ipsclass->input['calendar_id'] ); + $allow_emoticons = $this->ipsclass->input['enableemo'] == 'yes' ? 1 : 0; + $private_event = $this->ipsclass->input['e_type'] == 'private' ? 1 : 0; + $event_title = trim($this->ipsclass->input['event_title']); + $day = intval($this->ipsclass->input['e_day']); + $month = intval($this->ipsclass->input['e_month']); + $year = intval($this->ipsclass->input['e_year']); + $end_day = intval($this->ipsclass->input['end_day']); + $end_month = intval($this->ipsclass->input['end_month']); + $end_year = intval($this->ipsclass->input['end_year']); + $recur_unit = intval($this->ipsclass->input['recur_unit']); + $event_tz = intval($this->ipsclass->input['event_tz']); + $offset = 0; + $event_all_day = 0; + $event_calendar_id = intval($this->ipsclass->input['event_calendar_id']); + $set_time = intval($this->ipsclass->input['set_times']); + $hour_min = array(); + + if( $set_time ) + { + $hour_min = strstr($this->ipsclass->input['event_timestart'], ":") ? explode(":", $this->ipsclass->input['event_timestart']) : 0; + + if( intval($hour_min[0]) < 0 || intval($hour_min[0]) > 23 ) + { + $hour_min[0] = 0; + } + + if( intval($hour_min[1]) < 0 || intval($hour_min[1]) > 59 ) + { + $hour_min[1] = 0; + } + + if( $hour_min[0] || $hour_min[1] ) + { + $offset = $event_tz * 3600; + } + else + { + $hour_min = array(); + $offset = 0; + } + } + else + { + $event_all_day = 1; + } + + $this->ipsclass->vars['max_post_length'] = $this->ipsclass->vars['max_post_length'] ? $this->ipsclass->vars['max_post_length'] : 2140000; + + //----------------------------------------- + // CHECK + //----------------------------------------- + + if ( ! $this->ipsclass->member['id']) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); + } + + //----------------------------------------- + // Got permission to post to this calendar? + //----------------------------------------- + + $this->build_permissions( $event_calendar_id ); + + if ( ! $this->can_post ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); + } + + //----------------------------------------- + // WHATDOWEDO? + //----------------------------------------- + + if ( $type == 'add' ) + { + + } + else + { + if ( ! $event_id ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_post') ); + } + + //----------------------------------------- + // Get the event + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'cal_events', 'where' => "event_id=$event_id" ) ); + $this->ipsclass->DB->simple_exec(); + + if ( ! $event = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_events') ); + } + + //----------------------------------------- + // Do we have permission to edit this event? + //----------------------------------------- + + if ( $this->ipsclass->member['id'] == $event['event_member_id'] ) + { + $can_edit = 1; + } + else if ( $this->ipsclass->member['g_is_supmod'] == 1 ) + { + $can_edit = 1; + } + + if ( $can_edit != 1 ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_events') ); + } + } + + //----------------------------------------- + // Do we have a valid post? + //----------------------------------------- + + if (strlen( trim($_POST['Post']) ) < 1) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_post') ); + } + + if (strlen( $_POST['Post'] ) > ($this->ipsclass->vars['max_post_length']*1024)) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'post_too_long') ); + } + + //----------------------------------------- + // Fix up the Event Title + //----------------------------------------- + + if ( (strlen($event_title) < 2) or (!$event_title) ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_title_none') ); + } + + if ( strlen($event_title) > 64 ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_title_long') ); + } + + //----------------------------------------- + // Are we an admin, and have we set w/groups + // can see? + //----------------------------------------- + + if ( $this->ipsclass->member['mgroup'] == $this->ipsclass->vars['admin_group'] ) + { + if ( is_array( $_POST['e_groups'] ) ) + { + $read_perms = implode( ",", $_POST['e_groups'] ); + $read_perms .= ",".$this->ipsclass->vars['admin_group']; + } + + if ($read_perms == "") + { + $read_perms = '*'; + } + } + + //----------------------------------------- + // Check dates: Range + //----------------------------------------- + + if ( $form_type == 'range' ) + { + if ( $end_year < $year ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_range_wrong') ); + } + + if ( $end_year == $year ) + { + if ( $end_month < $month ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_range_wrong') ); + } + + if ( $end_month == $month AND $end_day <= $day ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_range_wrong') ); + } + } + + $_final_unix_from = gmmktime(0 , 0, 0 , $month , $day , $year ) - $offset;// + $offset; # Midday + $_final_unix_to = gmmktime(23, 59, 59, $end_month, $end_day, $end_year) - $offset;// + $offset; # End of the day + + $event_ranged = 1; + $set_time = 0; + $hour_min = array(); + } + + //----------------------------------------- + // Check dates: Recur + //----------------------------------------- + + elseif ( $form_type == 'recur' ) + { + if ( $this->ipsclass->input['recur_unit'] ) + { + $event_repeat = 1; + } + + if ( $end_year < $year ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_range_wrong') ); + } + + if ( $end_year == $year ) + { + if ( $end_month < $month ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_range_wrong') ); + } + + if ( $end_month == $month AND $end_day <= $day ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_range_wrong') ); + } + } + + $hour = 0; + $min = 0; + if( $set_time ) + { + if( is_array( $hour_min ) ) + { + $hour = $hour_min[0]; + $min = $hour_min[1]; + } + } + + $_final_unix_from = gmmktime($hour , $min , 0 , $month , $day , $year ) - $offset;// + $offset; + $_final_unix_to = gmmktime($hour, $min, 0, $end_month, $end_day, $end_year) - $offset;// + $offset; # End of the day + $event_recur = 1; + } + + //----------------------------------------- + // Check dates: Single + //----------------------------------------- + + else + { + $hour = 0; + $min = 0; + if( $set_time ) + { + if( is_array( $hour_min ) ) + { + $hour = $hour_min[0]; + $min = $hour_min[1]; + } + } + + $_final_unix_from = gmmktime($hour, $min, 0, $month, $day, $year) - $offset;// + $offset; + $_final_unix_to = 0; + } + + //----------------------------------------- + // Do we have a sensible date? + //----------------------------------------- + + if ( ! checkdate( $month, $day , $year ) ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_date_oor') ); + } + + //----------------------------------------- + // Post process the editor + // Now we have safe HTML and bbcode + //----------------------------------------- + + $this->post->parser->parse_html = 0; + $this->post->parser->parse_smilies = intval($allow_emoticons); + $this->post->parser->parse_bbcode = 1; + + $this->ipsclass->input['Post'] = $this->post->han_editor->process_raw_post( 'Post' ); + + $this->ipsclass->input['Post'] = $this->post->parser->pre_db_parse( $this->ipsclass->input['Post'] ); + $this->ipsclass->input['Post'] = $this->post->parser->pre_display_parse( $this->ipsclass->input['Post'] ); + $this->ipsclass->input['Post'] = $this->post->parser->bad_words( $this->ipsclass->input['Post'] ); + + //----------------------------------------- + // Event approved? + //----------------------------------------- + + $event_approved = $this->can_avoid_queue ? 1 : ( $this->calendar_cache[ $event_calendar_id ]['cal_moderate'] ? 0 : 1 ); + + if( $private_event == 1 ) + { + $event_approved = 1; + } + + if ( $type == 'add' ) + { + //----------------------------------------- + // Add it to the DB + //----------------------------------------- + + $this->ipsclass->DB->do_insert( 'cal_events', array ( + 'event_calendar_id' => $event_calendar_id, + 'event_member_id' => $this->ipsclass->member['id'], + 'event_content' => $this->ipsclass->input['Post'], + 'event_title' => $event_title, + 'event_smilies' => $allow_emoticons, + 'event_perms' => $read_perms, + 'event_private' => $private_event, + 'event_approved' => $event_approved, + 'event_unixstamp' => time(), + 'event_recurring' => $recur_unit, + 'event_tz' => $event_tz, + 'event_timeset' => count($hour_min) > 0 ? intval($hour_min[0]).":".intval($hour_min[1]) : 0, + 'event_unix_from' => $_final_unix_from, + 'event_unix_to' => $_final_unix_to, + 'event_all_day' => $event_all_day ) ); + + $this->_call_recache(); + + if ( $event_approved ) + { + $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['new_event_redirect'] , "act=calendar&cal_id={$event_calendar_id}" ); + } + else + { + $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['new_event_mod'] , "act=calendar&cal_id={$event_calendar_id}" ); + } + } + else + { + //----------------------------------------- + // Add it to the DB + //----------------------------------------- + + $this->ipsclass->DB->do_update( 'cal_events', array ( + 'event_calendar_id' => $event_calendar_id, + 'event_content' => $this->ipsclass->input['Post'], + 'event_title' => $event_title, + 'event_smilies' => $allow_emoticons, + 'event_perms' => $read_perms, + 'event_private' => $private_event, + 'event_approved' => $event_approved, + 'event_unixstamp' => time(), + 'event_recurring' => $recur_unit, + 'event_tz' => $event_tz, + 'event_timeset' => count($hour_min) > 0 ? intval($hour_min[0]).":".intval($hour_min[1]) : 0, + 'event_unix_from' => $_final_unix_from, + 'event_unix_to' => $_final_unix_to, + 'event_all_day' => $event_all_day ), 'event_id='.$event_id ); + + $this->_call_recache(); + + if ( $event_approved ) + { + $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['edit_event_redirect'] , "act=calendar&cal_id={$event_calendar_id}&code=showevent&event_id=$event_id" ); + } + else + { + $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['new_event_mod'] , "act=calendar&cal_id={$event_calendar_id}" ); + } + } + } + + + /*-------------------------------------------------------------------------*/ + // SHOW DAYS EVENTS + /*-------------------------------------------------------------------------*/ + + function show_day() + { + $day = intval($this->ipsclass->input['d']); + $month = intval($this->ipsclass->input['m']); + $year = intval($this->ipsclass->input['y']); + $seen_ids = array(); + $timenow = gmmktime( 0,0,0, $month, $day, $year); + $day_array = $this->ipsclass->date_getgmdate( $timenow ); + + $printed = 0; + + //----------------------------------------- + // Do we have a sensible date? + //----------------------------------------- + + if ( ! checkdate( $month, $day , $year ) ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_date_oor') ); + } + + $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_page_events_start(); + + //----------------------------------------- + // Get the events + //----------------------------------------- + + $this->get_events_sql($month, $year); + + $events = $this->get_day_events( $month, $day, $year ); + + if ( is_array( $events ) AND count( $events ) ) + { + foreach( $events as $event ) + { + if ( !isset($this->shown_events[ $month.'-'.$day.'-'.$year ][ $event['event_id'] ]) OR !$this->shown_events[ $month.'-'.$day.'-'.$year ][ $event['event_id'] ] ) + { + //----------------------------------------- + // Is it a private event? + //----------------------------------------- + + if ( $event['event_private'] == 1 and $this->ipsclass->member['id'] != $event['event_member_id'] ) + { + continue; + } + + //----------------------------------------- + // Do we have permission to see the event? + //----------------------------------------- + + if ( $event['event_perms'] != '*' ) + { + $this_member_mgroups[] = $this->ipsclass->member['mgroup']; + + if( $this->ipsclass->member['mgroup_others'] ) + { + $this_member_mgroups = array_merge( $this_member_mgroups, explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ) ); + } + + $check = 0; + + foreach( $this_member_mgroups as $this_member_mgroup ) + { + if ( preg_match( "/(^|,)".$this_member_mgroup."(,|$)/", $event['event_perms'] ) ) + { + $check = 1; + } + } + + if( $check == 0 ) + { + continue; + } + } + + if ( !isset($seen_ids[ $event['eventid'] ]) OR !$seen_ids[ $event['eventid'] ] ) + { + $this->output .= $this->make_event_html($event); + + $printed++; + $seen_ids[ $event['event_id'] ] = 1; + } + } + } + } + + //----------------------------------------- + // Do we have any printed events? + //----------------------------------------- + + if ($printed > 0) + { + $switch = 1; + } + else + { + // Error if no birthdays + $switch = 0; + } + + $this->output .= $this->make_birthday_html($month, $day, $switch); + + $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_page_events_end(); + + $this->nav[] = "{$this->ipsclass->lang['page_title']}"; + $this->nav[] = "{$this->calendar['cal_title']}"; + $this->nav[] = $day." ".$this->month_words[$this->chosen_month - 1]." ".$this->chosen_year; + } + + /*-------------------------------------------------------------------------*/ + // SHOW A SINGLE EVENT BASED ON eventid + /*-------------------------------------------------------------------------*/ + + function show_event() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $event_id = intval($this->ipsclass->input['event_id']); + + //----------------------------------------- + // CHECK + //----------------------------------------- + + if ( ! $event_id ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_events') ); + } + + //----------------------------------------- + // Get it from the DB + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'cal_events', 'where' => "event_id=$event_id" ) ); + $this->ipsclass->DB->simple_exec(); + + if ( ! $event = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_events') ); + } + + $set_offset = 0; + if( $event['event_timeset'] ) + { + $set_offset = $this->ipsclass->member['time_offset'] * 3600; + } + + $event['event_unix_from'] = $event['event_unix_from'] - $set_offset; + //$event['event_unix_to'] = $event['event_unix_to'] ? $event['event_unix_to'] + ( $this->ipsclass->member['time_offset'] * 3600 ) : 0; + + //----------------------------------------- + // Is it a private event? + //----------------------------------------- + + if ( $event['event_private'] == 1 and $this->ipsclass->member['id'] != $event['event_member_id'] ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_events') ); + } + + //----------------------------------------- + // Do we have permission to see the event? + //----------------------------------------- + + if ( $event['event_perms'] != '*' ) + { + $this_member_mgroups[] = $this->ipsclass->member['mgroup']; + + if( $this->ipsclass->member['mgroup_others'] ) + { + $this_member_mgroups = array_merge( $this_member_mgroups, explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ) ); + } + + $check = 0; + + foreach( $this_member_mgroups as $this_member_mgroup ) + { + if ( preg_match( "/(^|,)".$this_member_mgroup."(,|$)/", $event['event_perms'] ) ) + { + $check = 1; + } + } + + if( $check == 0 ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_events') ); + } + } + + $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_page_events_start() . $this->make_event_html($event) . $this->ipsclass->compiled_templates['skin_calendar']->cal_page_events_end(); + + $this->nav[] = "{$this->ipsclass->lang['page_title']}"; + $this->nav[] = "{$this->calendar['cal_title']}"; + $this->nav[] = $event['event_title']; + + } + + /*-------------------------------------------------------------------------*/ + // MAKE EVENT HTML (return HTML for bdays) + /*-------------------------------------------------------------------------*/ + + function make_event_html($event) + { + $approve_button = ""; + + //----------------------------------------- + // What kind of event is it? + //----------------------------------------- + + $event_type = $this->ipsclass->lang['public_event']; + + if ($event['event_private'] == 1) + { + $event_type = $this->ipsclass->lang['private_event']; + } + else if ($event['event_perms'] != '*') + { + $event_type = $this->ipsclass->lang['restricted_event']; + } + + //----------------------------------------- + // Do we have an edit button? + //----------------------------------------- + + $edit_button = ""; + + //----------------------------------------- + // Are we a super dooper moderator? + //----------------------------------------- + + if ( $this->ipsclass->member['g_is_supmod'] == 1 ) + { + $edit_button = $this->ipsclass->compiled_templates['skin_calendar']->cal_edit_del_button($event['event_id'], $event['event_calendar_id']); + } + + //----------------------------------------- + // Are we the OP of this event? + //----------------------------------------- + + else if ( $this->ipsclass->member['id'] == $event['event_member_id'] ) + { + $edit_button = $this->ipsclass->compiled_templates['skin_calendar']->cal_edit_del_button($event['event_id'], $event['event_calendar_id']); + } + + //----------------------------------------- + // Get the member details and stuff + //----------------------------------------- + + if( $this->parsed_members[ $event['event_member_id'] ] ) + { + $member = $this->parsed_members[ $event['event_member_id'] ]; + } + else + { + $this->ipsclass->DB->cache_add_query( 'generic_get_all_member', array( 'mid' => $event['event_member_id'] ) ); + $this->ipsclass->DB->cache_exec_query(); + + $member = $this->ipsclass->DB->fetch_row(); + + $member = $this->ipsclass->parse_member( $member, 0, 'skin_calendar' ); + + $this->parsed_members[ $member['id'] ] = $member; + } + + if ( $member['id'] ) + { + $member['_members_display_name'] = "{$member['members_display_name_short']}"; + } + + //----------------------------------------- + // Date + //----------------------------------------- + + $set_offset = 0; + if( $event['event_timeset'] AND !$event['event_all_day'] ) + { + $set_offset = $this->ipsclass->member['time_offset'] * 3600; + } + + $tmp = explode( ',', gmdate( 'n,j,Y,G,i', $event['event_unix_from'] ) ); + + $event['mday'] = $tmp[1]; + $event['month'] = $tmp[0]; + $event['year'] = $tmp[2]; + $event['month_text'] = $this->month_words[ $tmp[0] - 1 ]; + + $this->ipsclass->input['d'] = $event['mday']; + $this->ipsclass->input['m'] = $event['month']; + $this->ipsclass->input['y'] = $event['year']; + + $type = $this->ipsclass->lang['se_normal']; + $de = ""; + + if ( $event['event_recurring'] == 0 AND $event['event_unix_to'] ) + { + $type = $this->ipsclass->lang['se_range']; + $de = $this->ipsclass->lang['se_ends'].' '.gmdate( $this->ipsclass->vars['clock_joined'], $event['event_unix_to'] ); + } + else if ( $event['event_recurring'] == 1 ) + { + $type = $this->ipsclass->lang['se_recur']; + $de = $this->ipsclass->lang['se_ends'].' '.gmdate( $this->ipsclass->vars['clock_joined'], $event['event_unix_to'] - $set_offset ); + } + + if( $type == $this->ipsclass->lang['se_normal'] ) + { + if( $tmp[3] > 0 ) + { + $event['year'] .= " {$tmp[3]}:{$tmp[4]}"; + } + } + + //----------------------------------------- + // Moderated? + //----------------------------------------- + + $event['_quicktime'] = intval($event['month']).'-'.intval($event['mday']).'-'.intval( $event['year']); + + if ( $this->can_moderate ) + { + if ( ! $event['event_approved'] ) + { + $event['_event_css_1'] = 'row2shaded'; + $event['_event_css_2'] = 'row4shaded'; + $approve_button = $this->ipsclass->compiled_templates['skin_calendar']->cal_approve_button($event['event_id'], $event['event_calendar_id'], $event); + } + else + { + $event['_event_css_1'] = 'row1'; + $event['_event_css_2'] = 'row2'; + $approve_button = $this->ipsclass->compiled_templates['skin_calendar']->cal_unapprove_button($event['event_id'], $event['event_calendar_id'], $event); + } + } + else + { + $event['_event_css_1'] = 'row1'; + $event['_event_css_2'] = 'row2'; + } + + + //----------------------------------------- + // Show + //----------------------------------------- + + return $this->ipsclass->compiled_templates['skin_calendar']->cal_show_event($event, $member, $event_type, $edit_button, $approve_button, $type, $de ); + } + + /*-------------------------------------------------------------------------*/ + // GET MINI CALENDAR + /*-------------------------------------------------------------------------*/ + + function get_mini_calendar($month, $year) + { + $cal_output = ""; + + foreach ($this->day_words as $day) + { + $day = $this->ipsclass->txt_mbsubstr( $day, 0, 1 ); + + $cal_output .= $this->ipsclass->compiled_templates['skin_calendar']->mini_cal_day_bit( $day ); + } + + //----------------------------------------- + // Print the main calendar body + //----------------------------------------- + + $cal_output .= $this->get_month_events( $month, $year, 1 ); + + return $this->ipsclass->compiled_templates['skin_calendar']->mini_cal_mini_wrap($this->month_words[$month - 1], $month, $year, $cal_output); + } + + /*-------------------------------------------------------------------------*/ + // Get BIRTHDAYS + /*-------------------------------------------------------------------------*/ + + function get_birthday_sql($month) + { + if ( !isset($this->query_bday_cache[ $month ]) OR !is_array( $this->query_bday_cache[ $month ] ) ) + { + // We are just going to query next and previous month + // so let's do it in one query and cache it... + + $prev_month = $this->get_prev_month( $month, date("Y") ); + $next_month = $this->get_next_month( $month, date("Y") ); + + $this->query_bday_cache[ $month ] = array(); + $this->query_bday_cache[ $next_month['month_id'] ] = array(); + $this->query_bday_cache[ $prev_month['month_id'] ] = array(); + + $this->ipsclass->DB->simple_construct( array( 'select' => 'bday_day, bday_month, id, members_display_name', 'from' => 'members', 'where' => 'bday_month IN('.$prev_month['month_id'].','.$month.','.$next_month['month_id'].')' ) ); + $this->ipsclass->DB->simple_exec(); + + while ($r = $this->ipsclass->DB->fetch_row()) + { + $this->query_bday_cache[ $r['bday_month'] ][ $r['bday_day'] ][] = $r; + } + } + } + + /*-------------------------------------------------------------------------*/ + // Get EVENTS + /*-------------------------------------------------------------------------*/ + + function get_events_sql( $month=0, $year=0, $get_cached=array() ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + if ( ! count( $get_cached ) ) + { + //----------------------------------------- + // Mini-cal is going to call next month and + // previous month anyways....let's just pull + // it all in one query and cache it + //----------------------------------------- + + $next_month = $this->get_next_month( $month, $year ); + $prev_month = $this->get_prev_month( $month, $year ); + $numberdays = date('t', mktime(0, 0, 0, $next_month['month_id'], 1, $next_month['year_id'] ) ); + $timenow = gmmktime( 0, 0, 1 , $prev_month['month_id'], 1, $prev_month['year_id'] ) - (12 * 3600); + $timethen = gmmktime( 23, 59, 59, $next_month['month_id'], $numberdays, $next_month['year_id']) + (12 * 3600); + $getcached = 0; + } + else + { + $next_month = array( 'month_id' => 0 ); + $prev_month = array( 'month_id' => 0 ); + $timenow = $get_cached['timenow']; + $timethen = $get_cached['timethen']; + list( $month, $day, $year ) = explode( ',', gmdate('n,j,Y', $get_cached['timenow']) ); + $getcached = 1; + } + + //----------------------------------------- + // Get the events + //----------------------------------------- + + if ( !isset($this->event_cache[ $month ]) OR ! is_array( $this->event_cache[ $month ] ) ) + { + //----------------------------------------- + // Get for cache + //----------------------------------------- + + if ( $getcached ) + { + $extra = ( isset($get_cached['cal_id']) AND $get_cached['cal_id'] ) ? "event_calendar_id=".intval($get_cached['cal_id'])." AND " : ''; + + $this->ipsclass->DB->cache_add_query( 'calendar_get_events_cache', array( 'extra' => $extra, + 'timenow' => $timenow, + 'timethen' => $timethen, + 'month' => $month ) + ); + + /*$this->ipsclass->DB->simple_construct( array( 'select' => '*', + 'from' => 'cal_events', + 'where' => "$extra event_approved=1 + AND ( (event_unix_to >= $timenow AND event_unix_from <= $timethen ) + OR ( event_unix_to=0 AND event_unix_from >= $timenow AND event_unix_from <= $timethen ) + OR ( event_recurring=3 AND FROM_UNIXTIME(event_unix_from,'%c')={$month} AND event_unix_to <= $timethen ) )" ) );*/ + $this->ipsclass->DB->cache_exec_query(); + } + else + { + //----------------------------------------- + // Get for display + //----------------------------------------- + + $approved = $this->can_moderate ? "event_approved IN (0,1)" : "event_approved=1"; + + $this->ipsclass->DB->cache_add_query( 'calendar_get_events', array( 'approved' => $approved, + 'calendar_id' => $this->calendar_id, + 'timenow' => $timenow, + 'timethen' => $timethen, + 'month' => $prev_month['month_id'].','.$month.','.$next_month['month_id'] ) + ); + + /*$this->ipsclass->DB->simple_construct( array( 'select' => '*', + 'from' => 'cal_events', + 'where' => "event_calendar_id = {$this->calendar_id} AND {$approved} + AND ( (event_unix_to >= $timenow AND event_unix_from <= $timethen ) + OR ( event_unix_to=0 AND event_unix_from >= $timenow AND event_unix_from <= $timethen ) + OR ( event_recurring=3 AND FROM_UNIXTIME(event_unix_from,'%c')={$month} AND event_unix_to <= $timethen ) )" ) );*/ + $this->ipsclass->DB->cache_exec_query(); + } + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + //----------------------------------------- + // Private event? + //----------------------------------------- + + if ( $r['event_private'] == 1 AND ! $getcached ) + { + if ( ! $this->ipsclass->member['id'] ) + { + continue; + } + + if ( $this->ipsclass->member['id'] != $r['event_member_id'] ) + { + continue; + } + } + + //----------------------------------------- + // Got permission? + //----------------------------------------- + + if ( $r['event_perms'] != '*' AND ! $getcached ) + { + $this_member_mgroups[] = $this->ipsclass->member['mgroup']; + + if( $this->ipsclass->member['mgroup_others'] ) + { + $this_member_mgroups = array_merge( $this_member_mgroups, explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ) ); + } + + $check = 0; + + foreach( $this_member_mgroups as $this_member_mgroup ) + { + if ( preg_match( "/(^|,)".$this_member_mgroup."(,|$)/", $r['event_perms'] ) ) + { + $check = 1; + } + } + + if( $check == 0 ) + { + continue; + } + } + + //----------------------------------------- + // Times + //----------------------------------------- + + $set_offset = 0; + if( $r['event_timeset'] AND !$r['event_all_day'] ) + { + $set_offset = $this->ipsclass->member['time_offset'] * 3600; + } + + $r['_unix_from'] = $r['event_unix_from'] ? $r['event_unix_from'] + $set_offset : 0; + $r['_unix_to'] = $r['event_unix_to'] > 0 ? $r['event_unix_to'] + $set_offset : 0; + + //----------------------------------------- + // Recurring event? + //----------------------------------------- + + if ( $r['event_recurring'] > 0 ) + { + $r['recurring'] = 1; + + // Get recurring months + $r_month = 0; + $r_stamp = $r['event_unix_from']; + $r_month = gmdate('n', $r['_unix_from']); + $r_year = gmdate('Y', $r['_unix_from']); + + if( $r_month == $month && ($r_year == $year OR $r['event_recurring']==3) && $getcached == 0 ) + { + $this->event_cache[ $r_month ]['recurring'][] = $r; + } + + while( $r_stamp < $r['_unix_to'] ) + { + // Stop Duplicates! + $shouldpass = 1; + if ( isset($this->event_cache[ $r_month ]['recurring']) AND count( $this->event_cache[ $r_month ]['recurring'] ) ) + { + foreach ( $this->event_cache[ $r_month ]['recurring'] as $eventarray ) + { + if ( $eventarray['event_id'] == $r['event_id'] ) + { + $shouldpass = 0; + } + } + } + + if( ( ( $r_month != $month AND $r_month != $next_month['month_id'] AND $r_month != $prev_month['month_id'] ) + OR $r_year != $year) AND $getcached == 0 ) + { + $shouldpass = 0; + } + + if ( $shouldpass == 1 ) + { + $this->event_cache[ $r_month ]['recurring'][] = $r; + } + + if ( $r['event_recurring'] == 1 ) + { + $r_stamp += 604800; + } + elseif ( $r['event_recurring'] == 2 ) + { + $r_stamp += 86400 * 30; + } + else + { + // No need to check year, as month would then match anyways + $r_stamp += 31536000; + } + + if ( $r_month != gmdate('n', $r_stamp) ) + { + $r_month = gmdate('n', $r_stamp); + } + + if( $r_year != gmdate('Y', $r_stamp) ) + { + $r_year = gmdate('Y', $r_stamp); + } + } + } + + //----------------------------------------- + // Ranged event? + // OK, this is getting silly..... + // _checkdate -> gmmtime( 0,0,0 $_checkdate.. + // was showing a day earlier than allowed + //----------------------------------------- + + else if ( $r['event_recurring'] == 0 AND $r['_unix_to'] ) + { + $_gotit = array(); + $_begin = gmdate( "z", $r['_unix_from'] ); + $_checkdate = gmdate( "z", $r['_unix_to'] ); + $_checkts = $r['_unix_from']; + + $_cur_mo = $month; // Store to retrieve later if necessary + + $_tmp = ''; + $r['ranged'] = 1; + + // Lapse over a year? + + if( $_checkdate < $_begin ) + { + $tmp_difference = 365 + $_checkdate - $_begin; + + if( $tmp_difference > 0 ) + { + $_checkdate = $_begin + $tmp_difference; + } + + unset( $tmp_difference ); + } + + while ( $_begin <= $_checkdate ) + { + // Did we lapse over the month? + // How about the year? If so, + // let's go ahead and reset ourselves + + $realday = gmdate( "j", $_checkts ); + $month = gmdate( "n", $_checkts ); + + if ( !array_key_exists( $month, $_gotit ) ) + { + $_gotit[ $month ] = array(); + } + if ( !in_array( $realday, $_gotit[ $month ] ) ) + { + $this->event_cache[ $month ]['ranged'][ $realday ][] = $r; + + $_count = count( $this->event_cache[ $month ]['ranged'][ $realday ] ) - 1; + $_tmp = $this->event_cache[ $month ]['ranged'][ $realday ][ $_count ]; + $_gotit[ $month ][] = $realday; + } + else + { + if ( $r['_unix_to'] != $r['event_unix_from'] ) + { + $this->event_cache[ $month ]['ranged'][ $realday ][] = $_tmp; + } + } + $_begin += 1; + $_checkts += 86400; + } + $month = $_cur_mo; + } + + //----------------------------------------- + // Single event + //----------------------------------------- + + else + { + $r['single'] = 1; + + # Make sure correct month is used for cached queries + list( $_month, $_day, $_year ) = explode( ',', gmdate('n,j,Y', $r['_unix_from'] ) ); + + $this->event_cache[ $_month ]['single'][ $_day ][] = $r; + } + } + } + } + + /*-------------------------------------------------------------------------*/ + // Get day's events + /*-------------------------------------------------------------------------*/ + + function get_day_events( $month="", $day="", $year="" ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $return = array(); + + //----------------------------------------- + // Ranged + //----------------------------------------- + + if ( isset($this->event_cache[ $month ]['ranged'][ $day ]) AND is_array( $this->event_cache[ $month ]['ranged'][ $day ] ) and count( $this->event_cache[ $month ]['ranged'][ $day ] ) ) + { + foreach( $this->event_cache[ $month ]['ranged'][ $day ] as $idx => $data ) + { + $return[] = $this->event_cache[ $month ]['ranged'][ $day ][ $idx ]; + } + } + + //----------------------------------------- + // Recurring + //----------------------------------------- + + if ( isset($this->event_cache[ $month ]['recurring']) AND is_array( $this->event_cache[ $month ]['recurring'] ) and count( $this->event_cache[ $month ]['recurring'] ) ) + { + foreach( $this->event_cache[ $month ]['recurring'] as $idx => $data ) + { + if ( $this->get_info_events( $data, $month, $day, $year ) ) + { + $return[] = $this->event_cache[ $month ]['recurring'][ $idx ]; + } + } + } + + //----------------------------------------- + // Single day + //----------------------------------------- + + + if ( isset($this->event_cache[ $month ]['single'][ $day ]) AND is_array( $this->event_cache[ $month ]['single'][ $day ] ) and count( $this->event_cache[ $month ]['single'][ $day ] ) ) + { + foreach( $this->event_cache[ $month ]['single'][ $day ] as $idx => $data ) + { + $return[] = $this->event_cache[ $month ]['single'][ $day ][ $idx ]; + } + } + + return $return; + } + + /*-------------------------------------------------------------------------*/ + // Get event info + /*-------------------------------------------------------------------------*/ + + function get_info_events( $event, $month, $day, $year, $adj=1 ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $_start = gmmktime(0 , 0 , 0 , $month, $day, $year); + $_lunch = gmmktime(12, 0 , 0 , $month, $day, $year); + $_end = gmmktime(23, 59, 59, $month, $day, $year) + 1; + $_month = gmmktime(0 , 0 , 0 , $month, 1 , $year); + $_offset = 0; // - Set at time of save: $event['event_tz'] * 3600; + + //----------------------------------------- + // Already seen it? + //----------------------------------------- + + if ( $event['event_id'] AND isset($this->shown_events[ $month.'-'.$day.'-'.$year ][ $event['event_id'] ]) AND $this->shown_events[ $month.'-'.$day.'-'.$year ][ $event['event_id'] ] ) + { + return FALSE; + } + + //----------------------------------------- + // Check we're in range + //----------------------------------------- + + if ( isset($event['single']) AND $event['single'] ) + { + if ( $month.','.$day.','.$year == gmdate('n,j,Y', $event['_unix_from']) ) + { + $this->shown_events[ $month.'-'.$day.'-'.$year ][ $event['event_id'] ] = 1; + return TRUE; + } + } + + if ( ($event['_unix_to']) < $_start OR ($event['_unix_from'] ) > $_end ) + { + return FALSE; + } + + //----------------------------------------- + // Check recurring + //----------------------------------------- + + if ( $event['event_recurring'] ) + { + if ( $adj AND gmdate('w', $event['_unix_from']) != gmdate('w', $event['event_unix_from']) ) + { + if ( $event['_unix_from'] > $event['event_unix_from']) + { + $_lunch -= 86400; + } + else + { + $_lunch += 86400; + } + } + + //----------------------------------------- + // Weekly + //----------------------------------------- + + if ( $event['event_recurring'] == 1 ) + { + if ( gmdate('w', $event['event_unix_from']) != gmdate('w', $_lunch ) ) + { + return FALSE; + } + else + { + return TRUE; + } + } + + //----------------------------------------- + // Monthly + //----------------------------------------- + + else if ( $event['event_recurring'] == 2 ) + { + if ( gmdate('j', $event['event_unix_from']) == gmdate('j', $_lunch ) ) + { + return TRUE; + } + else + { + return FALSE; + } + } + + //----------------------------------------- + // Yearly + //----------------------------------------- + + else if ( $event['event_recurring'] == 3 ) + { + if ( (gmdate('j', $event['event_unix_from']) == gmdate('j', $_lunch )) AND (gmdate('n', $event['event_unix_from']) == gmdate('n', $_lunch )) ) + { + return TRUE; + } + else + { + return FALSE; + } + } + } + + return TRUE; + } + + /*-------------------------------------------------------------------------*/ + // Get month stuff + /*-------------------------------------------------------------------------*/ + + function get_month_events( $month="", $year="", $minical=0 ) + { + //----------------------------------------- + // Reset shown events + //----------------------------------------- + + $this->shown_events = array(); + + //----------------------------------------- + // Work out timestamps + //----------------------------------------- + + $our_datestamp = gmmktime( 0,0,0, $month, 1, $year); + $first_day_array = $this->ipsclass->date_getgmdate($our_datestamp); + + if( $this->ipsclass->vars['ipb_calendar_mon'] ) + { + $first_day_array['wday'] = $first_day_array['wday'] == 0 ? 7 : $first_day_array['wday']; + } + + //----------------------------------------- + // Get the birthdays from the database + //----------------------------------------- + + if ( $this->ipsclass->vars['show_bday_calendar'] ) + { + $birthdays = array(); + + $this->get_birthday_sql($month); + + $birthdays = $this->query_bday_cache[ $month ]; + } + + //----------------------------------------- + // Get the events + //----------------------------------------- + + $this->get_events_sql($month, $year); + + //----------------------------------------- + // Get events + //----------------------------------------- + + $seen_days = array(); + $seen_ids = array(); + $cal_output = ""; + + for ( $c = 0 ; $c < 42; $c++ ) + { + //----------------------------------------- + // Work out timestamps + //----------------------------------------- + + $_year = gmdate('Y', $our_datestamp); + $_month = gmdate('n', $our_datestamp); + $_day = gmdate('j', $our_datestamp); + $day_array = $this->ipsclass->date_getgmdate($our_datestamp); + + $check_against = $c; + + if( $this->ipsclass->vars['ipb_calendar_mon'] ) + { + $check_against = $c+1; + } + + if ( (($c) % 7 ) == 0 ) + { + //----------------------------------------- + // Kill the loop if we are no longer on our month + //----------------------------------------- + + if ($day_array['mon'] != $month) + { + break; + } + + if ( $minical ) + { + $cal_output .= $this->ipsclass->compiled_templates['skin_calendar']->mini_cal_new_row( $our_datestamp ); + } + else + { + $cal_output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_new_row( $our_datestamp ); + } + } + + //----------------------------------------- + // Run out of legal days for this month? + // Or have we yet to get to the first day? + //----------------------------------------- + + if ( ($check_against < $first_day_array['wday']) or ($day_array['mon'] != $month) ) + { + $cal_output .= $minical ? $this->ipsclass->compiled_templates['skin_calendar']->mini_cal_blank_cell() + : $this->ipsclass->compiled_templates['skin_calendar']->cal_blank_cell(); + } + else + { + if ( isset($seen_days[ $day_array['yday'] ]) AND $seen_days[ $day_array['yday'] ] == 1 ) + { + continue; + } + + $seen_days[ $day_array['yday'] ] = 1; + $tmp_cevents = array(); + $this_day_events = ""; + $cal_date = $day_array['mday']; + $queued_event = 0; + $cal_date_queued = ""; + + //----------------------------------------- + // Get events + //----------------------------------------- + + $events = $this->get_day_events( $_month, $_day, $_year ); + + if ( is_array( $events ) AND count( $events ) ) + { + foreach( $events as $event ) + { + if ( !isset($this->shown_events[ $_month.'-'.$_day.'-'.$_year ][ $event['event_id'] ]) OR !$this->shown_events[ $_month.'-'.$_day.'-'.$_year ][ $event['event_id'] ] ) + { + //----------------------------------------- + // Recurring + //----------------------------------------- + + if ( isset($event['recurring']) ) + { + $tmp_cevents[ $event['event_id'] ] = $this->ipsclass->compiled_templates['skin_calendar']->cal_events_wrap_recurring( $event ); + } + else if ( isset($event['single']) ) + { + $tmp_cevents[ $event['event_id'] ] = $this->ipsclass->compiled_templates['skin_calendar']->cal_events_wrap( $event ); + } + else + { + $tmp_cevents[ $event['event_id'] ] = $this->ipsclass->compiled_templates['skin_calendar']->cal_events_wrap_range( $event ); + } + + $this->shown_events[ $_month.'-'.$_day.'-'.$_year ][ $event['event_id'] ] = 1; + + //----------------------------------------- + // Queued events? + //----------------------------------------- + + if ( ! $event['event_approved'] AND $this->can_moderate ) + { + $queued_event = 1; + } + } + } + + //----------------------------------------- + // How many events? + //----------------------------------------- + + if ( count($tmp_cevents) >= $this->calendar['cal_event_limit'] ) + { + $this_day_events = $this->ipsclass->compiled_templates['skin_calendar']->cal_events_wrap_manual( + "cal_id={$this->calendar_id}&code=showday&y=".$day_array['year']."&m=".$day_array['mon']."&d=".$day_array['mday'], + sprintf( $this->ipsclass->lang['show_n_events'], intval(count($tmp_cevents)) ) ); + } + else if ( count( $tmp_cevents ) ) + { + $this_day_events = implode( "\n", $tmp_cevents ); + } + + $tmp_cevents[] = array(); + } + + //----------------------------------------- + // Birthdays + //----------------------------------------- + + if ( $this->calendar['cal_bday_limit'] ) + { + if ( isset($birthdays[ $day_array['mday'] ]) and count( $birthdays[ $day_array['mday'] ] ) > 0 ) + { + $no_bdays = count($birthdays[ $day_array['mday'] ]); + + if ( $no_bdays ) + { + if ( $this->calendar['cal_bday_limit'] and $no_bdays <= $this->calendar['cal_bday_limit'] ) + { + foreach( $birthdays[ $day_array['mday'] ] as $user ) + { + $this_day_events .= $this->ipsclass->compiled_templates['skin_calendar']->cal_events_wrap_manual( + "cal_id={$this->calendar_id}&code=birthdays&y=".$day_array['year']."&m=".$day_array['mon']."&d=".$day_array['mday'], + $user['members_display_name'].$this->ipsclass->lang['bd_birthday'] ); + } + + } + else + { + $this_day_events .= $this->ipsclass->compiled_templates['skin_calendar']->cal_events_wrap_manual( + "cal_id={$this->calendar_id}&code=birthdays&y=".$day_array['year']."&m=".$day_array['mon']."&d=".$day_array['mday'], + sprintf( $this->ipsclass->lang['entry_birthdays'], $no_bdays ) ); + } + } + } + } + + //----------------------------------------- + // Show it + //----------------------------------------- + + if ($this_day_events != "") + { + $cal_date = "{$day_array['mday']}"; + $cal_date_queued = "{$this->ipsclass->base_url}act=calendar&cal_id={$this->calendar_id}&modfilter=queued&code=showday&y=".$year."&m=".$month."&d=".$day_array['mday']; + + $this_day_events = $this->ipsclass->compiled_templates['skin_calendar']->cal_events_start() . $this_day_events . $this->ipsclass->compiled_templates['skin_calendar']->cal_events_end(); + } + + if ( ($day_array['mday'] == $this->now_date['mday']) and ($this->now_date['mon'] == $day_array['mon']) and ($this->now_date['year'] == $day_array['year'])) + { + $cal_output .= $minical ? $this->ipsclass->compiled_templates['skin_calendar']->mini_cal_date_cell_today($cal_date, $this_day_events) : $this->ipsclass->compiled_templates['skin_calendar']->cal_date_cell_today($cal_date, $this_day_events, $cal_date_queued, $queued_event); + } + else + { + $cal_output .= $minical ? $this->ipsclass->compiled_templates['skin_calendar']->mini_cal_date_cell($cal_date, $this_day_events) : $this->ipsclass->compiled_templates['skin_calendar']->cal_date_cell($cal_date, $this_day_events, $cal_date_queued, $queued_event); + } + + unset($this_day_events); + + $our_datestamp += 86400; + } + } + + return $cal_output; + } + + /*-------------------------------------------------------------------------*/ + // SHOW BIRTHDAYS + /*-------------------------------------------------------------------------*/ + + function show_birthdays() + { + $day = intval($this->ipsclass->input['d']); + $month = intval($this->ipsclass->input['m']); + $year = intval($this->ipsclass->input['y']); + + //----------------------------------------- + // Do we have a sensible date? + //----------------------------------------- + + if ( ! checkdate( $month, $day , $year ) ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_date_oor') ); + } + + $this->output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_page_events_start() . $this->make_birthday_html($month, $day) . $this->ipsclass->compiled_templates['skin_calendar']->cal_page_events_end(); + + $this->nav[] = "{$this->ipsclass->lang['page_title']}"; + $this->nav[] = "{$this->calendar['cal_title']}"; + $this->nav[] = $this->ipsclass->lang['cal_birthdays']." ".$day." ".$this->month_words[$this->chosen_month - 1]." ".$this->chosen_year; + + } + + /*-------------------------------------------------------------------------*/ + // MAKE BIRTHDAY HTML (return HTML for bdays) + /*-------------------------------------------------------------------------*/ + + function make_birthday_html($month, $day, $switch=0) + { + if ( ! $this->ipsclass->vars['show_bday_calendar'] ) + { + return; + } + + //----------------------------------------- + // Is it leapyear? + //----------------------------------------- + + if( !date("L") ) + { + if( $month == "2" AND $day == "28" ) + { + $where_string = "bday_month=".$month." AND (bday_day={$day} OR bday_day=29)"; + } + else + { + $where_string = 'bday_month='.$month . " AND bday_day={$day}"; + } + } + else + { + $where_string = 'bday_month='.$month . " AND bday_day={$day}"; + } + + //----------------------------------------- + // Get the birthdays from the database + //----------------------------------------- + + $birthdays = array(); + + $output = ""; + + $this->ipsclass->DB->simple_construct( array( 'select' => 'bday_day, bday_month, bday_year, id, members_display_name', + 'from' => 'members', + 'where' => $where_string ) ); + $this->ipsclass->DB->simple_exec(); + + if ( ! $this->ipsclass->DB->get_num_rows() ) + { + if ($switch == 1) + { + return; + } + else + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cal_no_events') ); + } + } + else + { + $output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_birthday_start(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $age = $this->chosen_year - $r['bday_year']; + + $output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_birthday_entry($r['id'], $r['members_display_name'], $age); + } + + $output .= $this->ipsclass->compiled_templates['skin_calendar']->cal_birthday_end(); + } + + return $output; + } + + /*-------------------------------------------------------------------------*/ + // Internal + /*-------------------------------------------------------------------------*/ + + function get_month_dropdown($month="") + { + $return = ""; + + if ($month == "") + { + $month = $this->chosen_month; + } + + for ( $x = 1 ; $x <= 12 ; $x++ ) + { + $return .= "\t\n"; + } + + return $return; + } + + + /*-------------------------------------------------------------------------*/ + // Internal + /*-------------------------------------------------------------------------*/ + + function get_year_dropdown($year="") + { + $return = ""; + + $this->ipsclass->vars['start_year'] = (isset($this->ipsclass->vars['start_year'])) ? $this->ipsclass->vars['start_year'] : 2001; + $this->ipsclass->vars['year_limit'] = (isset($this->ipsclass->vars['year_limit'])) ? $this->ipsclass->vars['year_limit'] : 5; + + if ($year == "") + { + $year = $this->chosen_year; + } + + for ( $x = $this->ipsclass->vars['start_year'] ; $x <= $this->now_date['year'] + $this->ipsclass->vars['year_limit'] ; $x++ ) + { + $return .= "\t"; - $member['_pp_setting_notify_friend'] .= ""; - } - - foreach( $yes_no as $key => $lang ) - { - $_comments_selected = ( $key == $member['pp_setting_moderate_comments'] ) ? ' selected="selected" ' : ''; - $_friends_selected = ( $key == $member['pp_setting_moderate_friends'] ) ? ' selected="selected" ' : ''; - $member['_pp_setting_moderate_comments'] .= ""; - $member['_pp_setting_moderate_friends'] .= ""; - } - - //----------------------------------------- - // Get friends pending approval - //----------------------------------------- - - $friends = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as count_friends', - 'from' => 'profile_friends', - 'where' => 'friends_friend_id='.$member['id'].' AND friends_approved=0' ) ); - - //----------------------------------------- - // Photo settings... - //----------------------------------------- - - list( $size, $width, $height ) = explode( ':', $this->ipsclass->member['g_photo_max_vars'] ); - $photo_ext = str_replace( ',', '/', $this->ipsclass->vars['photo_ext'] ); - - $this->ipsclass->lang['pp_photo_desc'] = sprintf( $this->ipsclass->lang['pp_photo_desc'], $width, $height, $size, $photo_ext ); - - # Allow extra for compression - $member['_max_file_size'] = ( $size * 1024 ) * 4; - - //----------------------------------------- - // Personal statement - //----------------------------------------- - - $member['_pp_bio_content'] = $this->ipsclass->my_br2nl( $member['pp_bio_content'] ); - $member['__pp_bio_content'] = $member['pp_bio_content']; - - //----------------------------------------- - // Ok.. show the settings - //----------------------------------------- - - $content = $this->ipsclass->compiled_templates['skin_profile']->personal_portal_iframe_settings( $member, $friends['count_friends'], $error ); - - $this->ipsclass->print->pop_up_window( '', $content ); - } - - /*-------------------------------------------------------------------------*/ - // Builds comments - /*-------------------------------------------------------------------------*/ - - /** - * Builds comments - * - * - * @return void - * @since IPB 2.2.0.2006-08-02 - */ - function personal_build_comments( $member, $new_id=0, $return_msg='' ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $comments = array(); - $member_id = intval( $member['id'] ); - $comment_perpage = intval( $member['pp_setting_count_comments'] ); - $comment_html = 0; - - //----------------------------------------- - // Regenerate comments... - //----------------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => 'pc.*', - 'from' => array( 'profile_comments' => 'pc' ), - 'where' => 'pc.comment_for_member_id='.$member_id.' AND pc.comment_approved=1', - 'order' => 'pc.comment_date DESC', - 'limit' => array( 0, $comment_perpage ), - 'add_join' => array( 0 => array( 'select' => 'm.members_display_name', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.id=pc.comment_by_member_id', - 'type' => 'left' ), - 1 => array( 'select' => 'pp.*', - 'from' => array( 'profile_portal' => 'pp' ), - 'where' => 'pp.pp_member_id=m.id', - 'type' => 'left' ), - 2 => array( 'select' => 'me.*', - 'from' => array( 'member_extra' => 'me' ), - 'where' => 'me.id=pc.comment_by_member_id', - 'type' => 'left' ) ) ) ); - - $this->ipsclass->DB->exec_query(); - - while( $row = $this->ipsclass->DB->fetch_row() ) - { - $row['_comment_date'] = $this->ipsclass->get_date( $row['comment_date'], 'TINY' ); - $row['_avatar'] = $this->ipsclass->get_avatar( $row['avatar_location'] , 1, $row['avatar_size'], $row['avatar_type'] ); - $row['_last_active'] = $this->ipsclass->get_date( $row['last_activity'], 'TINY' ); - - if( $row['login_anonymous']{0} == '1' ) - { - // Member last logged in anonymous - - if( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] OR $this->ipsclass->vars['disable_admin_anon'] ) - { - $row['_last_active'] = $this->ipsclass->lang['private']; - } - } - - $row['comment_content'] = $this->ipsclass->txt_wordwrap( $row['comment_content'], '19', '
    ' ); - - $row = $this->personal_portal_set_information( $row, 0, 0 ); - - $comments[] = $row; - } - - $comment_html = $this->ipsclass->compiled_templates['skin_profile']->personal_portal_show_comment( $comments, $member, $new_id, $return_msg ); - - //----------------------------------------- - // Return it... - //----------------------------------------- - - return $comment_html; - } - - /*-------------------------------------------------------------------------*/ - // Reload comments - /*-------------------------------------------------------------------------*/ - - /** - * Reload comments - * - * - * @return void - * @since IPB 2.2.0.2006-08-15 - */ - function personal_ajax_reload_comments() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $member_id = intval( $this->ipsclass->input['member_id'] ); - $md5check = substr( $this->ipsclass->parse_clean_value( rawurldecode( $_REQUEST['md5check'] ) ), 0, 32 ); - - //----------------------------------------- - // Load XML class - //----------------------------------------- - - require_once( KERNEL_PATH . 'class_ajax.php' ); - $class_ajax = new class_ajax(); - $class_ajax->ipsclass =& $this->ipsclass; - $class_ajax->class_init(); - - //----------------------------------------- - // MD5 check - //----------------------------------------- - - if ( $md5check != $this->ipsclass->return_md5_check() ) - { - @header( "Content-type: text/plain" ); - $class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - //----------------------------------------- - // Load member - //----------------------------------------- - - $member = $this->personal_function_load_member( $member_id ); - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! $member['id'] ) - { - @header( "Content-type: text/plain" ); - $class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - //----------------------------------------- - // Regenerate comments... - //----------------------------------------- - - $class_ajax->return_html( $this->personal_build_comments( $member ) ); - exit(); - } - - /*-------------------------------------------------------------------------*/ - // Delete comment - /*-------------------------------------------------------------------------*/ - - /** - * Deletes a comment on member's profile - * - * - * @return void - * @since IPB 2.2.0.2006-08-02 - */ - function personal_ajax_delete_comment() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $member_id = intval( $this->ipsclass->input['member_id'] ); - $md5check = substr( $this->ipsclass->parse_clean_value( rawurldecode( $_REQUEST['md5check'] ) ), 0, 32 ); - $comment_id = intval( $this->ipsclass->input['comment_id'] ); - $comment_html = ""; - $comment_perpage = 5; - - //----------------------------------------- - // Load XML class - //----------------------------------------- - - require_once( KERNEL_PATH . 'class_ajax.php' ); - $class_ajax = new class_ajax(); - $class_ajax->ipsclass =& $this->ipsclass; - $class_ajax->class_init(); - - //----------------------------------------- - // MD5 check - //----------------------------------------- - - if ( $md5check != $this->ipsclass->return_md5_check() ) - { - @header( "Content-type: text/plain" ); - $class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - //----------------------------------------- - // Load member - //----------------------------------------- - - $member = $this->personal_function_load_member( $member_id ); - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! $member['id'] ) - { - @header( "Content-type: text/plain" ); - $class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - //----------------------------------------- - // Can remove? - //----------------------------------------- - - if ( ( $member['id'] == $this->ipsclass->member['id'] ) OR $this->ipsclass->member['g_is_supmod'] ) - { - $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'profile_comments', - 'where' => 'comment_id='.$comment_id ) ); - } - - //----------------------------------------- - // Regenerate comments... - //----------------------------------------- - - $class_ajax->return_html( $this->personal_build_comments( $member ) ); - exit(); - } - - /*-------------------------------------------------------------------------*/ - // Save comment - /*-------------------------------------------------------------------------*/ - - /** - * Saves a comment on member's profile - * - * - * @return void - * @since IPB 2.2.0.2006-08-02 - */ - function personal_ajax_add_comment() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $member_id = intval( $this->ipsclass->input['member_id'] ); - $md5check = substr( $this->ipsclass->parse_clean_value( rawurldecode( $_REQUEST['md5check'] ) ), 0, 32 ); - $comment = ''; - $comment_approved = 1; - $message = ''; - $subject = ''; - $to = array(); - $from = array(); - $return_msg = ''; - - //----------------------------------------- - // Get the emailer module - //----------------------------------------- - - require_once( ROOT_PATH."sources/classes/class_email.php" ); - - $email = new emailer(); - $email->ipsclass =& $this->ipsclass; - $email->email_init(); - - //----------------------------------------- - // Get MSG library class - //----------------------------------------- - - require_once( ROOT_PATH.'sources/lib/func_msg.php' ); - - $msg_lib = new func_msg(); - $msg_lib->ipsclass =& $this->ipsclass; - $msg_lib->init(); - $this->ipsclass->load_language( 'lang_msg' ); - - //----------------------------------------- - // Load XML class - //----------------------------------------- - - require_once( KERNEL_PATH . 'class_ajax.php' ); - $class_ajax = new class_ajax(); - $class_ajax->ipsclass =& $this->ipsclass; - $class_ajax->class_init(); - - //----------------------------------------- - // Finish up - //----------------------------------------- - - $_POST['comment'] = $class_ajax->convert_unicode( $_POST['comment'] ); - $_POST['comment'] = $class_ajax->convert_html_entities( $_POST['comment'] ); - - $comment = $this->ipsclass->parse_clean_value( $_POST['comment'] ); - $comment = $class_ajax->ipsclass->txt_mbsubstr( $comment, 0, 400 ); - $comment = preg_replace( "#(\r\n|\r|\n|
    |
    ){1,}#s", "\n", $comment ); - - //----------------------------------------- - // Bad words - //----------------------------------------- - - $comment = trim( $this->parser->bad_words( $comment ) ); - - //----------------------------------------- - // MD5 check - //----------------------------------------- - - if ( $md5check != $this->ipsclass->return_md5_check() ) - { - @header( "Content-type: text/plain" ); - $class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - //----------------------------------------- - // Got a comment? - //----------------------------------------- - - if ( ! $comment ) - { - @header( "Content-type: text/plain" ); - $class_ajax->print_nocache_headers(); - print 'error-no-comment'; - exit(); - } - - //----------------------------------------- - // Load member - //----------------------------------------- - - $member = $this->personal_function_load_member( $member_id ); - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! $member['id'] ) - { - @header( "Content-type: text/plain" ); - $class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - //----------------------------------------- - // Friend requires approval? - //----------------------------------------- - - if ( $member['pp_setting_moderate_comments'] AND $member['id'] != $this->ipsclass->member['id'] ) - { - $comment_approved = 0; - } - - //----------------------------------------- - // Member is ignoring you! - //----------------------------------------- - - if ( $comment_approved ) - { - $_you_are_being_ignored = explode( ",", $member['ignored_users'] ); - - if ( is_array( $_you_are_being_ignored ) and count( $_you_are_being_ignored ) ) - { - if ( in_array( $this->ipsclass->member['id'], $_you_are_being_ignored ) ) - { - $comment_approved = 0; - } - } - } - - //----------------------------------------- - // Add comment to the DB... - //----------------------------------------- - - $this->ipsclass->DB->do_insert( 'profile_comments', array( 'comment_for_member_id' => $member_id, - 'comment_by_member_id' => $this->ipsclass->member['id'], - 'comment_date' => time(), - 'comment_ip_address' => $this->ipsclass->ip_address, - 'comment_approved' => $comment_approved, - 'comment_content' => $this->ipsclass->my_nl2br( $comment ) ) ); - - $new_id = $this->ipsclass->DB->get_insert_id(); - - //----------------------------------------- - // What are we doing? Sending out 'mod' or 'yay' - // message? - //----------------------------------------- - - if ( ! $comment_approved AND $member['pp_setting_notify_comments'] AND ( $member['id'] != $this->ipsclass->member['id'] ) ) - { - $email->get_template("new_comment_request"); - - $email->build_message( array( 'MEMBERS_DISPLAY_NAME' => $member['members_display_name'], - 'COMMENT_NAME' => $this->ipsclass->member['members_display_name'], - 'LINK' => $this->ipsclass->vars['board_url'] . '/index.' . $this->ipsclass->vars['php_ext'] . '?act=profile&CODE=personal_portal_view&tab=comments&id='.$member_id ) ); - - $message = $email->message; - $subject = $email->lang_subject; - $to = $member; - $from = $this->ipsclass->member; - $return_msg = 'pp_comment_added_mod'; - } - else if ( $member['pp_setting_notify_comments'] AND ( $member['id'] != $this->ipsclass->member['id'] ) ) - { - $email->get_template("new_comment_added"); - - $email->build_message( array( 'MEMBERS_DISPLAY_NAME' => $member['members_display_name'], - 'COMMENT_NAME' => $this->ipsclass->member['members_display_name'], - 'LINK' => $this->ipsclass->vars['board_url'] . '/index.' . $this->ipsclass->vars['php_ext'] . '?act=profile&CODE=personal_portal_view&tab=comments&id='.$member_id ) ); - - $message = $email->message; - $subject = $email->lang_subject; - $to = $member; - $from = $this->ipsclass->member; - $return_msg = ''; - } - - //----------------------------------------- - // Got anything to send? - //----------------------------------------- - - if ( $message AND $subject ) - { - //----------------------------------------- - // Email? - //----------------------------------------- - - if ( $member['pp_setting_notify_comments'] == 'email' OR ( $member['pp_setting_notify_comments'] AND $member['members_disable_pm'] ) ) - { - $email->subject = $subject; - $email->message = $message; - $email->to = $to['email']; - - $email->send_mail(); - } - - //----------------------------------------- - // PM? - //----------------------------------------- - - else if ( $member['pp_setting_notify_comments'] != 'none' ) - { - $msg_lib->to_by_id = $to['id']; - $msg_lib->from_member = $from; - $msg_lib->msg_title = $subject; - $msg_lib->msg_post = $message; - $msg_lib->force_pm = 1; - - $msg_lib->send_pm(); - } - } - - //----------------------------------------- - // Regenerate comments... - //----------------------------------------- - - $class_ajax->return_html( $this->personal_build_comments( $member, $new_id, $return_msg ) ); - exit(); - } - - /*-------------------------------------------------------------------------*/ - // Load personal portal tab content - /*-------------------------------------------------------------------------*/ - - /** - * Loads the content for the desired tab - * - * - * @return void - * @since IPB 2.2.0.2006-08-02 - */ - function personal_ajax_load_tab() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $member_id = intval( $this->ipsclass->input['member_id'] ); - $tab = substr( $this->ipsclass->txt_alphanumerical_clean( str_replace( '..', '', trim( $this->ipsclass->input['tab'] ) ) ), 0, 20 ); - $md5check = substr( $this->ipsclass->parse_clean_value( rawurldecode( $_REQUEST['md5check'] ) ), 0, 32 ); - - //----------------------------------------- - // Load XML class - //----------------------------------------- - - require_once( KERNEL_PATH . 'class_ajax.php' ); - $class_ajax = new class_ajax(); - $class_ajax->ipsclass =& $this->ipsclass; - $class_ajax->class_init(); - - //----------------------------------------- - // MD5 check - //----------------------------------------- - - if ( $md5check != $this->ipsclass->return_md5_check() ) - { - @header( "Content-type: text/plain" ); - $class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - //----------------------------------------- - // Load member - //----------------------------------------- - - $member = $this->personal_function_load_member( $member_id ); - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! $member['id'] ) - { - @header( "Content-type: text/plain" ); - $class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - //----------------------------------------- - // Load config - //----------------------------------------- - - if( !file_exists( ROOT_PATH . 'sources/components_public/profile/'.$tab.'.conf.php' ) ) - { - @header( "Content-type: text/plain" ); - $class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - require( ROOT_PATH . 'sources/components_public/profile/'.$tab.'.conf.php' ); - - //----------------------------------------- - // Active? - //----------------------------------------- - - if ( ! $CONFIG['plugin_enabled'] ) - { - @header( "Content-type: text/plain" ); - $class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - //----------------------------------------- - // Load main class... - //----------------------------------------- - - if( !file_exists( ROOT_PATH . 'sources/components_public/profile/'.$tab.'.php' ) ) - { - @header( "Content-type: text/plain" ); - $class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - require( ROOT_PATH . 'sources/components_public/profile/'.$tab.'.php' ); - $_func_name = 'profile_'.$tab; - $plugin = new $_func_name; - $plugin->ipsclass =& $this->ipsclass; - - $html = $plugin->return_html_block( $member ); - - //----------------------------------------- - // Return it... - //----------------------------------------- - - //$html = htmlentities( $html ); - - $class_ajax->return_html( $html ); - - exit(); - - } - - /*-------------------------------------------------------------------------*/ - // View personal portal - /*-------------------------------------------------------------------------*/ - - /** - * Show's the personal portal for the member - * - * - * @return void - * @since IPB 2.2.0.2006-7-28 and most likely vB4.0.0-2006-x-x - */ - function personal_portal_view() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $member_id = intval( $this->ipsclass->input['id'] ) ? intval( $this->ipsclass->input['id'] ) : intval( $this->ipsclass->input['MID'] ); - $member_id = $member_id ? $member_id : $this->ipsclass->member['id']; - $tab = substr( $this->ipsclass->txt_alphanumerical_clean( str_replace( '..', '', trim( $this->ipsclass->input['tab'] ) ) ), 0, 20 ); - $tab = $tab ? $tab : 'topics'; - $member = array(); - $comments = array(); - $comments_html = ""; - $friends = array(); - $visitors = array(); - $comment_perpage = 5; - $pips = 0; - $tabs = array(); - $_tabs = array(); - $_positions = array( 0 => 0 ); - $custom_path = ROOT_PATH . 'sources/components_public/profile'; - $_member_ids = array(); - $sql_extra = ''; - $pass = 0; - $mod = 0; - $_todays_date = getdate(); - - $time_adjust = $this->ipsclass->vars['time_adjust'] == "" ? 0 : $this->ipsclass->vars['time_adjust']; - $board_posts = $this->ipsclass->cache['stats']['total_topics'] + $this->ipsclass->cache['stats']['total_replies']; - - //----------------------------------------- - // Load additional lang/skin - //----------------------------------------- - - $this->ipsclass->load_template('skin_topic'); - - //----------------------------------------- - // Do we have permission to view profiles? - //----------------------------------------- - - if ( $this->ipsclass->member['g_mem_info'] != 1 ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); - } - - //----------------------------------------- - // Check input.. - //----------------------------------------- - - if ( ! $member_id ) - { - $this->ipsclass->boink_it( $this->ipsclass->base_url ); - } - - //----------------------------------------- - // Configure tabs - //----------------------------------------- - - $handle = opendir( $custom_path ); - - while ( ( $file = readdir($handle) ) !== FALSE ) - { - if ( preg_match( "#\.conf\.php$#i", $file ) ) - { - $classname = str_replace( ".conf.php", "", $file ); - - require( $custom_path . "/" . $file ); - - //------------------------------- - // Allowed to use? - //------------------------------- - - if ( $CONFIG['plugin_enabled'] ) - { - if ( $classname != 'posts' && $classname != 'topics' ) - { - $CONFIG['plugin_order'] += 10; - } - - $_position = ( in_array( $CONFIG['plugin_order'], $_positions ) ) ? count( $_positions ) + 1 : $CONFIG['plugin_order']; - $_tabs[ $_position ] = $CONFIG; - - $_positions[ $_position ] = $_position; - } - } - } - - closedir( $handle ); - - ksort( $_tabs ); - - foreach( $_tabs as $_pos => $data ) - { - $data['_lang'] = array_key_exists( $data['plugin_lang_bit'], $this->ipsclass->lang ) ? $this->ipsclass->lang[ $data['plugin_lang_bit'] ] : $data['plugin_name']; - $tabs[ $data['plugin_key'] ] = $data; - } - - //----------------------------------------- - // Grab all data... - //----------------------------------------- - - $member = $this->personal_function_load_member( $member_id ); - - //----------------------------------------- - // Got stuff? - //----------------------------------------- - - if ( ! $member['id'] ) - { - $this->ipsclass->boink_it( $this->ipsclass->base_url ); - } - - //----------------------------------------- - // Recent visitor? - //----------------------------------------- - - if ( $member['id'] != $this->ipsclass->member['id'] ) - { - list( $be_anon, $loggedin ) = explode( '&', $this->ipsclass->member['login_anonymous'] ); - - if ( ! $be_anon ) - { - $this->personal_portal_add_recent_visitor( $member, $this->ipsclass->member['id'] ); - } - } - - //----------------------------------------- - // Custom fields - //----------------------------------------- - - require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); - $custom_fields = new custom_fields( $this->ipsclass->DB ); - - $custom_fields->member_id = $this->ipsclass->member['id']; - $custom_fields->cache_data = $this->ipsclass->cache['profilefields']; - $custom_fields->admin = intval($this->ipsclass->member['g_access_cp']); - $custom_fields->supmod = intval($this->ipsclass->member['g_is_supmod']); - - $custom_fields->member_data = $member; - $custom_fields->init_data(); - $custom_fields->parse_to_view( 0 ); - - if ( count( $custom_fields->out_fields ) ) - { - foreach( $custom_fields->out_fields as $id => $data ) - { - if ( ! $data ) - { - $data = $this->ipsclass->lang['no_info']; - } - - $data = $this->ipsclass->txt_wordwrap( $data, '25', '
    ' ); - - $member['custom_fields'][] = array( 'name' => $custom_fields->field_names[ $id ], 'data' => $data ); - } - } - - //----------------------------------------- - // DST? - //----------------------------------------- - - if ( $member['dst_in_use'] == 1 ) - { - $member['time_offset'] += 1; - } - - //----------------------------------------- - // Format extra user data - //----------------------------------------- - - $member['_age'] = ( $member['bday_year'] ) ? date( 'Y' ) - $member['bday_year'] : 0; - - if( $member['bday_month'] > date( 'n' ) ) - { - $member['_age'] -= 1; - } - else if( $member['bday_month'] == date( 'n' ) ) - { - if( $member['bday_day'] > date( 'j' ) ) - { - $member['_age'] -= 1; - } - } - - $member['_bday_month'] = $this->get_month_name( $member['bday_month'] ); - - $member['_last_active'] = $this->ipsclass->get_date( $member['last_activity'], 'SHORT' ); - - if( $member['login_anonymous']{0} == '1' ) - { - // Member last logged in anonymous - - if( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] OR $this->ipsclass->vars['disable_admin_anon'] ) - { - $member['_last_active'] = $this->ipsclass->lang['private']; - } - } - - $member['_local_time'] = $member['time_offset'] != "" ? gmdate( $this->ipsclass->vars['clock_long'], time() + ($member['time_offset']*3600) + ($time_adjust * 60) ) : ''; - $member['_avatar'] = $this->ipsclass->get_avatar( $member['avatar_location'] , 1, $member['avatar_size'], $member['avatar_type'] ); - $member['_email'] = $member['hide_email'] ? $this->ipsclass->lang['private'] : "{$this->ipsclass->lang['email']}"; - $member['_pp_rating_real'] = intval( $member['pp_rating_real'] ); - $member['_interests'] = $this->ipsclass->txt_wordwrap( $member['interests'] ? $member['interests'] : $this->ipsclass->lang['no_info'], '25', '
    ' ); - $member['_posts'] = $this->ipsclass->do_number_format( $member['posts'] ); - $member['_website'] = ( preg_match( "/^http:\/\/\S+$/", $member['website'] ) ) ? $member['website'] : ''; - $member['_title'] = $member['title']; - - //----------------------------------------- - // BIO - //----------------------------------------- - - $member['pp_bio_content'] = preg_replace( "#\[b\](.+?)\[/b\]#is", "\\1", $member['pp_bio_content'] ); - $member['pp_bio_content'] = preg_replace( "#\[i\](.+?)\[/i\]#is", "\\1", $member['pp_bio_content'] ); - $member['pp_bio_content'] = preg_replace( "#\[u\](.+?)\[/u\]#is", "\\1", $member['pp_bio_content'] ); - $member['pp_bio_content'] = $this->ipsclass->txt_wordwrap( $member['pp_bio_content'], '25', '
    ' ); - - //----------------------------------------- - // PHOTO - //----------------------------------------- - - $member = $this->personal_portal_set_information( $member ); - - //----------------------------------------- - // Contact info - //----------------------------------------- - - $member['icq_number'] = $member['icq_number'] > 0 ? $member['icq_number'] : ''; - - $member['_aim_name'] = $member['aim_name'] ? $member['aim_name'] : $this->ipsclass->lang['no_info']; - $member['_icq_number'] = $member['icq_number'] ? $member['icq_number'] : $this->ipsclass->lang['no_info']; - $member['_yahoo'] = $member['yahoo'] ? $member['yahoo'] : $this->ipsclass->lang['no_info']; - $member['_msn_name'] = $member['msnname'] ? $member['msnname'] : $this->ipsclass->lang['no_info']; - $member['_joined'] = $this->ipsclass->get_date( $member['joined'], 'JOINED' ); - $member['_posts_day'] = 0; - $member['_total_pct'] = 0; - - //----------------------------------------- - // Format the birthday drop boxes.. - //----------------------------------------- - - $member['_birthday_day'] = ""; - $member['_birthday_month'] = ""; - $member['_birthday_year'] = ""; - - for ( $i = 1 ; $i < 32 ; $i++ ) - { - $member['_birthday_day'] .= "" : ">$i"; - } - - for ( $i = 1 ; $i < 13 ; $i++ ) - { - $member['_birthday_month'] .= "" : ">" . $this->ipsclass->lang['M_'.$i] .""; - } - - $i = $_todays_date['year'] - 1; - $j = $_todays_date['year'] - 100; - - for ( $i ; $j < $i ; $i-- ) - { - $member['_birthday_year'] .= "" : ">$i"; - } - - //----------------------------------------- - // Total posts - //----------------------------------------- - - if ( $member['posts'] and $board_posts ) - { - $member['_posts_day'] = round( $member['posts'] / (((time() - $member['joined']) / 86400)), 0); - - # Fix the issue when there is less than one day - $member['_posts_day'] = ( $member['_posts_day'] > $member['posts'] ) ? $member['posts'] : $member['_posts_day']; - $member['_total_pct'] = sprintf( '%.2f', ( $member['posts'] / $board_posts * 100 ) ); - } - - //----------------------------------------- - // Pips / Icon - //----------------------------------------- - - if( !count($this->ipsclass->cache['ranks']) ) - { - $this->ipsclass->cache['ranks'] = array(); - } - - foreach( $this->ipsclass->cache['ranks'] as $k => $v ) - { - if ( $member['posts'] >= $v['POSTS'] ) - { - if ( ! $member['title'] ) - { - $member['_title'] = $this->ipsclass->cache['ranks'][ $k ]['TITLE']; - } - - $pips = $v['PIPS']; - break; - } - } - - if ( $this->ipsclass->cache['group_cache'][ $member['mgroup'] ]['g_icon'] ) - { - $member['_member_rank_img'] = $this->ipsclass->compiled_templates['skin_topic']->member_rank_img( $member['g_icon'] ); - } - else if ($pips) - { - if ( is_numeric( $pips ) ) - { - for ($i = 1; $i <= $pips; ++$i) - { - $member['_member_rank_img'] .= "<{A_STAR}>"; - } - } - else - { - $member['_member_rank_img'] = $this->ipsclass->compiled_templates['skin_topic']->member_rank_img('style_images/<#IMG_DIR#>/folder_team_icons/'.$pips); - } - } - - //----------------------------------------- - // Comments - //----------------------------------------- - - $comment_html = $this->personal_build_comments( $member ); - - //----------------------------------------- - // Visitors - //----------------------------------------- - - $_pp_last_visitors = unserialize( $member['pp_last_visitors'] ); - $_visitor_info = array(); - $_count = 0; - - if ( is_array( $_pp_last_visitors ) ) - { - krsort( $_pp_last_visitors ); - $_ids = implode( ',', array_values( $_pp_last_visitors ) ); - - $this->ipsclass->DB->build_query( array( 'select' => 'm.*', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.id IN ('.$_ids.')', - 'add_join' => array( - 0 => array( 'select' => 'pp.*', - 'from' => array( 'profile_portal' => 'pp' ), - 'where' => 'pp.pp_member_id=m.id', - 'type' => 'left' ), - 1 => array( 'select' => 'me.*', - 'from' => array( 'member_extra' => 'me' ), - 'where' => 'me.id=m.id', - 'type' => 'left' ) ) ) ); - - $this->ipsclass->DB->exec_query(); - - while( $row = $this->ipsclass->DB->fetch_row() ) - { - $row['_avatar'] = $this->ipsclass->get_avatar( $row['avatar_location'] , 1, $row['avatar_size'], $row['avatar_type'] ); - $row['_last_active'] = $this->ipsclass->get_date( $row['last_activity'], 'SHORT' ); - - if( $row['login_anonymous']{0} == '1' ) - { - // Member last logged in anonymous - - if( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] OR $this->ipsclass->vars['disable_admin_anon'] ) - { - $row['_last_active'] = $this->ipsclass->lang['private']; - } - } - - $row = $this->personal_portal_set_information( $row ); - - $_visitor_info[ $row['id'] ] = $row; - } - - foreach( $_pp_last_visitors as $_time => $_id ) - { - if ( $_count + 1 > $member['pp_setting_count_visitors'] ) - { - break; - } - - $_count++; - - $_visitor_info[ $_id ]['_visited_date'] = $this->ipsclass->get_date( $_time, 'TINY' ); - $visitors[] = $_visitor_info[ $_id ]; - } - } - - //----------------------------------------- - // Friends - //----------------------------------------- - - # Get random number from member's friend cache... grab 10 random. array_rand( array, no.) - # also fall back on last 10 if no cache - - $member['_cache'] = $this->ipsclass->unpack_member_cache( $member['members_cache'] ); - - if ( is_array( $member['_cache']['friends'] ) AND count( $member['_cache']['friends'] ) ) - { - foreach( $member['_cache']['friends'] as $id => $approved ) - { - $id = intval( $id ); - - if ( $approved AND $id ) - { - $_member_ids[] = $id; - } - } - - if ( is_array( $_member_ids ) AND count( $_member_ids ) ) - { - $_max = count( $_member_ids ) > $member['pp_setting_count_friends'] ? $member['pp_setting_count_friends'] : count( $_member_ids ); - $_rand = array_rand( $_member_ids, $_max ); - $_final = array(); - - if ( is_array( $_rand ) AND count( $_rand ) ) - { - foreach( $_rand as $_id ) - { - $_final[] = $_member_ids[ $_id ]; - } - } - - if ( count( $_final ) ) - { - $sql_extra = ' AND pf.friends_friend_id IN (' . implode( ',', $_final ) . ')'; - } - } - } - - $this->ipsclass->DB->build_query( array( 'select' => 'pf.*', - 'from' => array( 'profile_friends' => 'pf' ), - 'where' => 'pf.friends_member_id='.$member_id. ' AND pf.friends_approved=1' . $sql_extra, - 'limit' => array( 0, 10 ), - 'add_join' => array( 0 => array( 'select' => 'm.*', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.id=pf.friends_friend_id', - 'type' => 'left' ), - 1 => array( 'select' => 'pp.*', - 'from' => array( 'profile_portal' => 'pp' ), - 'where' => 'pp.pp_member_id=m.id', - 'type' => 'left' ), - 2 => array( 'select' => 'me.*', - 'from' => array( 'member_extra' => 'me' ), - 'where' => 'me.id=pf.friends_friend_id', - 'type' => 'left' ) ) ) ); - - $this->ipsclass->DB->exec_query(); - - while( $row = $this->ipsclass->DB->fetch_row() ) - { - $row['_friends_added'] = $this->ipsclass->get_date( $row['friends_added'], 'SHORT' ); - $row['_avatar'] = $this->ipsclass->get_avatar( $row['avatar_location'] , 1, $row['avatar_size'], $row['avatar_type'] ); - $row['_last_active'] = $this->ipsclass->get_date( $row['last_activity'], 'DATE' ); - - if( $row['login_anonymous']{0} == '1' ) - { - // Member last logged in anonymous - - if( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] OR $this->ipsclass->vars['disable_admin_anon'] ) - { - $row['_last_active'] = $this->ipsclass->lang['private']; - } - } - - $row['_location'] = $row['location'] ? $row['location'] : $this->ipsclass->lang['no_info']; - - $row = $this->personal_portal_set_information( $row ); - - $friends[] = $row; - } - - //----------------------------------------- - // Warning stuff - //----------------------------------------- - - if ( $this->ipsclass->vars['warn_on'] and ( ! stristr( ','.$this->ipsclass->vars['warn_protected'].',', ','.$member['mgroup'].',' ) ) ) - { - if ( $this->ipsclass->member['id'] ) - { - if ( $this->ipsclass->member['g_is_supmod'] == 1 ) - { - $pass = 1; - $mod = 1; - } - - if ( $pass == 0 and ( $this->ipsclass->vars['warn_show_own'] and ( $member['id'] == $this->ipsclass->member['id'] ) ) ) - { - $pass = 1; - } - - if ( $pass == 1 ) - { - if ( ! $this->ipsclass->vars['warn_show_rating'] ) - { - if ( $member['warn_level'] < 1 ) - { - $member['warn_img'] = '<{WARN_0}>'; - } - else if ( $member['warn_level'] >= $this->ipsclass->vars['warn_max'] ) - { - $member['warn_img'] = '<{WARN_5}>'; - $member['warn_percent'] = 100; - } - else - { - $member['warn_percent'] = $member['warn_level'] ? sprintf( "%.0f", ( ($member['warn_level'] / $this->ipsclass->vars['warn_max']) * 100) ) : 0; - - if ( $member['warn_percent'] > 100 ) - { - $member['warn_percent'] = 100; - } - - if ( $member['warn_percent'] >= 81 ) - { - $member['warn_img'] = '<{WARN_5}>'; - } - else if ( $member['warn_percent'] >= 61 ) - { - $member['warn_img'] = '<{WARN_4}>'; - } - else if ( $member['warn_percent'] >= 41 ) - { - $member['warn_img'] = '<{WARN_3}>'; - } - else if ( $member['warn_percent'] >= 21 ) - { - $member['warn_img'] = '<{WARN_2}>'; - } - else if ( $member['warn_percent'] >= 1 ) - { - $member['warn_img'] = '<{WARN_1}>'; - } - else - { - $member['warn_img'] = '<{WARN_0}>'; - } - } - - if ( !isset($member['warn_percent']) OR $member['warn_percent'] < 1 ) - { - $member['warn_percent'] = 0; - } - - if ( $mod == 1 ) - { - $member['_warn_data'] = $this->ipsclass->compiled_templates['skin_profile']->warn_level($member['id'], $member['warn_img'], $member['warn_percent']); - } - else - { - $member['_warn_data'] = $this->ipsclass->compiled_templates['skin_profile']->warn_level_no_mod($member['id'], $member['warn_img'], $member['warn_percent']); - } - } - else - { - if ( $mod == 1 ) - { - $member['_warn_data'] = $this->ipsclass->compiled_templates['skin_profile']->warn_level_rating($member['id'], $member['warn_level'], $this->ipsclass->vars['warn_min'], $this->ipsclass->vars['warn_max']); - } - else - { - $member['_warn_data'] = $this->ipsclass->compiled_templates['skin_profile']->warn_level_rating_no_mod($member['id'], $member['warn_level'], $this->ipsclass->vars['warn_min'], $this->ipsclass->vars['warn_max']); - } - } - } - } - } - - //----------------------------------------- - // Online location - //----------------------------------------- - - $member = $this->personal_portal_get_user_location( $member ); - - //----------------------------------------- - // Add profile view (if we've not seen it in - // the last 3 mins) - //----------------------------------------- - - $_test_spam = intval( $this->ipsclass->my_getcookie( 'ipb-profile-view-' . $member['id'] ) ); - - if ( ! $_test_spam OR ( $_test_spam < time() - 180 ) ) - { - $this->ipsclass->my_setcookie( 'ipb-profile-view-' . $member['id'], time(), 0 ); - - $this->ipsclass->DB->do_shutdown_insert( 'profile_portal_views', array( 'views_member_id' => $member['id'] ) ); - } - - //----------------------------------------- - // Add to output - //----------------------------------------- - - $this->nav = array( $this->ipsclass->lang['page_title_pp'] ); - $this->page_title = $member['members_display_name'] . ' - ' . $this->ipsclass->lang['page_title_pp']; - $this->output = $this->ipsclass->compiled_templates['skin_profile']->personal_portal_main( $tabs, $member, $comment_html, $friends, $visitors, $tab ); - } - - /*-------------------------------------------------------------------------*/ - // Add recent visitor to a profile - /*-------------------------------------------------------------------------*/ - - /** - * Adds a recent visitor to ones profile - * - * @return void - * @since IPB 2.2.0.2006-7-31 - */ - function personal_portal_add_recent_visitor( $member=array(), $member_id_to_add=0 ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $member_id_to_add = intval( $member_id_to_add ); - $found = 0; - $_recent_visitors = array(); - - //----------------------------------------- - // Check... - //----------------------------------------- - - if ( ! $member_id_to_add ) - { - return false; - } - - //----------------------------------------- - // Sort out data... - //----------------------------------------- - - $recent_visitors = unserialize( $member['pp_last_visitors'] ); - - if ( ! is_array( $recent_visitors ) OR ! count( $recent_visitors ) ) - { - $recent_visitors = array(); - } - - foreach( $recent_visitors as $_time => $_id ) - { - if ( $_id == $member_id_to_add ) - { - $found = 1; - continue; - } - else - { - $_recent_visitors[ $_time ] = $_id; - } - } - - $recent_visitors = $_recent_visitors; - - krsort( $recent_visitors ); - - //----------------------------------------- - // Pop one off if we didn't update... - //----------------------------------------- - - if ( ! $found ) - { - # Over 10? Pop one off... - if ( count( $recent_visitors ) > 10 ) - { - $_tmp = array_pop( $recent_visitors ); - } - } - - # Add in ours.. - $recent_visitors[ time() ] = $member_id_to_add; - - krsort( $recent_visitors ); - - //----------------------------------------- - // Update profile... - //----------------------------------------- - - if ( $member['pp_member_id'] ) - { - $this->ipsclass->DB->do_update( 'profile_portal ', array( 'pp_last_visitors' => serialize( $recent_visitors ) ), 'pp_member_id='.$member['id'] ); - } - else - { - $this->ipsclass->DB->do_insert( 'profile_portal ', array( 'pp_member_id' => $member['id'], - 'pp_profile_update' => time(), - 'pp_last_visitors' => serialize( $recent_visitors ) ) ); - } - - return true; - } - - /*-------------------------------------------------------------------------*/ - // Set photos - /*-------------------------------------------------------------------------*/ - - /** - * Sets the personal photos up - * - * @return void - * @since IPB 2.2.0.2006-7-31 - */ - function personal_portal_set_information( $member, $noids=0, $use_parsed=1 ) - { - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! is_array( $member ) or ! count( $member ) ) - { - return $member; - } - - if ( $use_parsed ) - { - if ( array_key_exists( $member['id'], $this->parsed_members ) ) - { - return $this->parsed_members[ $member['id'] ]; - } - } - - //----------------------------------------- - // Skin set loaded? - //----------------------------------------- - - if ( ! is_object( $this->ipsclass->compiled_templates['skin_profile'] ) ) - { - $this->ipsclass->load_template( 'skin_profile' ); - } - - //----------------------------------------- - // Check URL - //----------------------------------------- - - $this->ipsclass->vars['img_url'] = ( ! $this->ipsclass->vars['img_url'] ) ? $this->ipsclass->vars['board_url'] . '/style_images/' . $this->ipsclass->skin['_imagedir'] : $this->ipsclass->vars['img_url']; - - //----------------------------------------- - // Main photo - //----------------------------------------- - - if ( ! $member['pp_main_photo'] ) - { - $member['pp_main_photo'] = $this->ipsclass->vars['img_url'].'/folder_profile_portal/pp-blank-large.png';; - $member['pp_main_width'] = 150; - $member['pp_main_height'] = 150; - $member['_has_photo'] = 0; - } - else - { - $member['pp_main_photo'] = $this->ipsclass->vars['upload_url'] . '/' . $member['pp_main_photo']; - $member['_has_photo'] = 1; - } - - //----------------------------------------- - // Thumbie - //----------------------------------------- - - if ( ! $member['pp_thumb_photo'] ) - { - if( $member['_has_photo'] ) - { - $member['pp_thumb_photo'] = $member['pp_main_photo']; - } - else - { - $member['pp_thumb_photo'] = $this->ipsclass->vars['img_url'].'/folder_profile_portal/pp-blank-thumb.png'; - } - - $member['pp_thumb_width'] = 50; - $member['pp_thumb_height'] = 50; - } - else - { - $member['pp_thumb_photo'] = $this->ipsclass->vars['upload_url'] . '/' . $member['pp_thumb_photo']; - } - - //----------------------------------------- - // Mini - //----------------------------------------- - - $_data = $this->ipsclass->scale_image( array( 'max_height' => 25, 'max_width' => 25, 'cur_width' => $member['pp_thumb_width'], 'cur_height' => $member['pp_thumb_height'] ) ); - - $member['pp_mini_photo'] = $member['pp_thumb_photo']; - $member['pp_mini_width'] = $_data['img_width']; - $member['pp_mini_height'] = $_data['img_height']; - - //----------------------------------------- - // Gender... - //----------------------------------------- - - $member['_pp_gender_image'] = $noids ? $this->ipsclass->compiled_templates['skin_profile']->personal_portal_gender_image( $member, 1 ) : $this->ipsclass->compiled_templates['skin_profile']->personal_portal_gender_image( $member ); - $member['_pp_gender_text'] = $member['pp_gender'] == 'male' ? $this->ipsclass->lang['js_gender_male'] : ( $member['pp_gender'] == 'female' ? $this->ipsclass->lang['js_gender_female'] : $this->ipsclass->lang['js_gender_mystery'] ); - - //----------------------------------------- - // Online? - //----------------------------------------- - - $time_limit = time() - $this->ipsclass->vars['au_cutoff'] * 60; - - $member['_online'] = 0; - - list( $be_anon, $loggedin ) = explode( '&', $member['login_anonymous'] ); - - if ( ( $member['last_visit'] > $time_limit or $member['last_activity'] > $time_limit ) AND $be_anon != 1 AND $loggedin == 1 ) - { - $member['_online'] = 1; - } - - $member['_pp_online_image'] = $this->ipsclass->compiled_templates['skin_profile']->personal_portal_online_image( $member ); - - //----------------------------------------- - // Last Active - //----------------------------------------- - - $member['_last_active'] = $this->ipsclass->get_date( $member['last_activity'], 'SHORT' ); - - if( $member['login_anonymous']{0} == '1' ) - { - // Member last logged in anonymous - - if( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] OR $this->ipsclass->vars['disable_admin_anon'] ) - { - $member['_last_active'] = $this->ipsclass->lang['private']; - } - } - - //----------------------------------------- - // Rating - //----------------------------------------- - - $member['_pp_rating_real'] = intval( $member['pp_rating_real'] ); - - //----------------------------------------- - // Long display names - //----------------------------------------- - - $member['members_display_name_short'] = $this->ipsclass->txt_truncate( $member['members_display_name'], 16 ); - - //----------------------------------------- - // Other stuff not worthy of individual comments - //----------------------------------------- - - $member['_pp_profile_views'] = $this->ipsclass->do_number_format( $member['members_profile_views'] ); - - $member['icq_number'] = $member['icq_number'] > 0 ? $member['icq_number'] : ''; - - //----------------------------------------- - // Bye. - //----------------------------------------- - - $this->parsed_members[ $member['id'] ] = $member; - - return $member; - } - - function personal_portal_get_user_location( $member=array() ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $this->ipsclass->load_language( 'lang_online' ); - - //----------------------------------------- - // Build up our language hash - //----------------------------------------- - - $where_lang = array(); - - foreach ($this->ipsclass->lang as $k => $v) - { - if ( preg_match( "/^WHERE_(\w+)$/", $k, $match ) ) - { - $where_lang[ $match[1] ] = $this->ipsclass->lang[$k]; - } - } - - unset($match); - - $bypass_anon = 0; - $our_mgroups = array(); - $where = ""; - $cut_off = ($this->ipsclass->vars['au_cutoff'] != "") ? $this->ipsclass->vars['au_cutoff'] * 60 : 900; - $time_limit = time() - $cut_off; - - list( $be_anon, $loggedin ) = explode( '&', $member['login_anonymous'] ); - $member['_online_location'] = ''; - - //----------------------------------------- - // Get other groups... - //----------------------------------------- - - if ( $this->ipsclass->member['mgroup_others'] ) - { - $our_mgroups = explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ); - } - - $our_mgroups[] = $this->ipsclass->member['mgroup']; - - if ( (in_array( $this->ipsclass->vars['admin_group'], $our_mgroups )) and ($this->ipsclass->vars['disable_admin_anon'] != 1) ) - { - $bypass_anon = 1; - } - - $member['sesslocation'] = strpos( $member['sesslocation'], "," ) ? strtolower( substr( $member['sesslocation'], 0, strpos( $member['sesslocation'], "," ) ) ) : $member['sesslocation']; - - //----------------------------------------- - // DO it - //----------------------------------------- - - if ( ( $member['last_visit'] > $time_limit or $member['last_activity'] > $time_limit ) AND $loggedin == 1 AND ( $be_anon != 1 OR $bypass_anon == 1 ) ) - { - //----------------------------------------- - // Module? - //----------------------------------------- - - if ( strstr( $member['sesslocation'], 'mod:' ) ) - { - $module = str_replace( 'mod:', '', $member['sesslocation'] ); - - $filename = ROOT_PATH.'sources/components_location/'.$this->ipsclass->txt_alphanumerical_clean( $module ).'.php'; - - if ( file_exists( $filename ) ) - { - $real_loc = $member['location']; - $member['location'] = $member['sesslocation']; - - require_once( $filename ); - $toload = 'components_location_'.$module; - $loader = new $toload; - $loader->ipsclass =& $this->ipsclass; - - $tmp = $loader->parse_online_entries( array( 1 => $member ) ); - - if ( is_array( $tmp ) and count( $tmp ) ) - { - $where = "{$tmp[1]['_text']}"; - } - - $member['location'] = $real_loc; - } - } - else if( $member['sesslocation'] == 'post' ) - { - if ( $member['location_1_type'] == 'topic' AND $member['location_1_id'] ) - { - // We have a topic id, must be a topic.. - - $topic = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid='.$member['location_1_id'] ) ); - - if ( $topic['tid'] ) - { - if ( ! $this->ipsclass->forums->forums_quick_check_access( $member['location_2_id'] ) ) - { - $where = $this->ipsclass->lang['WHERE_postrep'].' '."{$topic['title']}"; - } - } - } - else if( $member['location_2_type'] == 'forum' AND $member['location_2_id'] ) - { - if ( ! $this->ipsclass->forums->forums_quick_check_access( $member['location_2_id'] ) ) - { - $where = $this->ipsclass->lang['WHERE_postnew'].' '."{$this->ipsclass->cache['forum_cache'][ $member['location_2_id'] ]['name']}"; - } - } - } - else if ( $member['location_1_type'] == 'topic' AND $member['location_1_id'] ) - { - $topic = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid='.$member['location_1_id'] ) ); - - if ( $topic['tid'] ) - { - if ( ! $this->ipsclass->forums->forums_quick_check_access( $member['location_2_id'] ) ) - { - $where = $this->ipsclass->lang['WHERE_st'].' '."{$topic['title']}"; - } - } - } - else if ( $member['location_2_type'] == 'forum' AND $member['location_2_id'] ) - { - if ( ! $this->ipsclass->forums->forums_quick_check_access( $member['location_2_id'] ) ) - { - $where = $this->ipsclass->lang['WHERE_sf'].' '."{$this->ipsclass->cache['forum_cache'][ $member['location_2_id'] ]['name']}"; - } - } - else if( isset( $where_lang[$member['sesslocation']] ) AND $where_lang[$member['sesslocation']] ) - { - if( in_array( $member['sesslocation'], array( 'members', 'help', 'calendar', 'online', 'boardrules' ) ) ) - { - $where = "{$where_lang[$member['sesslocation']]}"; - } - else - { - $where = $where_lang[$member['sesslocation']]; - } - } - - if ( ! $where ) - { - $where = "{$this->ipsclass->lang['board_index']}"; - } - - $member['_online_location'] = $where; - } - - return $member; - } - - /*-------------------------------------------------------------------------*/ - // VIEW CONTACT CARD: - /*-------------------------------------------------------------------------*/ - - /** - * Display member display name change history - * - * Prints a pop-up window of the member's display name - * history - * - * @return void - * @since IPB 2.1.0.2005-7-5 - */ - function show_display_names() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $id = intval( $this->ipsclass->input['id'] ); - $member = array(); - $html = ""; - $content = ""; - - //----------------------------------------- - // Display name feature on? - //----------------------------------------- - - if ( ! $this->ipsclass->vars['auth_allow_dnames'] ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); - } - - //----------------------------------------- - // Permission check - //----------------------------------------- - - if ( $this->ipsclass->member['g_mem_info'] != 1 ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); - } - - if ( ! $id ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'incorrect_use' ) ); - } - - //----------------------------------------- - // Get member info - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'generic_get_all_member', array( 'mid' => $id ) ); - $this->ipsclass->DB->cache_exec_query(); - - $member = $this->ipsclass->DB->fetch_row(); - - //----------------------------------------- - // Get Dname history - //----------------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => 'd.*', - 'from' => array( 'dnames_change' => 'd' ), - 'where' => 'dname_member_id='.$id, - 'add_join' => array( 0 => array( 'select' => 'm.members_display_name', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.id=d.dname_member_id', - 'type' => 'inner' ) ), - 'order' => 'dname_date DESC' ) ); - $this->ipsclass->DB->exec_query(); - - while( $row = $this->ipsclass->DB->fetch_row() ) - { - //----------------------------------------- - // Format some info - //----------------------------------------- - - $date = $this->ipsclass->get_date( $row['dname_date'], 'SHORT' ); - - //----------------------------------------- - // Compile HTML - //----------------------------------------- - - $content .= $this->ipsclass->compiled_templates['skin_profile']->dname_content_row( $row['dname_previous'], $row['dname_current'], $date ); - } - - //----------------------------------------- - // No changes? Add in a default row - //----------------------------------------- - - if ( ! $content ) - { - $content .= $this->ipsclass->compiled_templates['skin_profile']->dname_content_row( '--', $member['members_display_name'], $this->ipsclass->get_date( $member['joined'], 'SHORT' ) ); - } - - //----------------------------------------- - // Print the pop-up window - //----------------------------------------- - - $html = $this->ipsclass->compiled_templates['skin_profile']->dname_wrapper( $member['members_display_name'], $content ); - - $this->ipsclass->print->pop_up_window( $this->ipsclass->lang['dname_title'], $html ); - } - - /*-------------------------------------------------------------------------*/ - // VIEW CONTACT CARD: - /*-------------------------------------------------------------------------*/ - /** - * @depricated 2006-08-16 - */ - function show_card() - { - $info = array(); - - if ($this->ipsclass->member['g_mem_info'] != 1) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); - } - - //----------------------------------------- - // Check input.. - //----------------------------------------- - - $id = intval($this->ipsclass->input['MID']); - - if ( empty($id) ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'incorrect_use' ) ); - } - - $this->ipsclass->DB->cache_add_query( 'generic_get_all_member', array( 'mid' => $id ) ); - $this->ipsclass->DB->cache_exec_query(); - - $member = $this->ipsclass->DB->fetch_row(); - - $member['website'] = $member['website'] == 'http://' ? '' : $member['website']; - - $info['aim_name'] = $member['aim_name'] ? $member['aim_name'] : $this->ipsclass->lang['no_info']; - $info['icq_number'] = $member['icq_number'] ? $member['icq_number'] : $this->ipsclass->lang['no_info']; - $info['yahoo'] = $member['yahoo'] ? $member['yahoo'] : $this->ipsclass->lang['no_info']; - $info['location'] = $member['location'] ? $member['location'] : $this->ipsclass->lang['no_info']; - $info['interests'] = $member['interests'] ? $member['interests'] : $this->ipsclass->lang['no_info']; - $info['msn_name'] = $member['msnname'] ? $member['msnname'] : $this->ipsclass->lang['no_info']; - $info['website'] = $member['website'] ? "{$member['website']}" : $this->ipsclass->lang['no_info']; - $info['mid'] = $member['id']; - $info['has_blog'] = $member['has_blog']; - $info['has_gallery'] = isset($member['has_gallery']) ? $member['has_gallery'] : 0; - - if (!$member['hide_email']) - { - $info['email'] = "{$this->ipsclass->lang['click_here']}"; - } - else - { - $info['email'] = $this->ipsclass->lang['private']; - } - - $this->load_photo($id); - - if ( $this->show_photo ) - { - $photo = $this->ipsclass->compiled_templates['skin_profile']->get_photo( $this->show_photo, $this->show_width, $this->show_height ); - } - else - { - $photo = "<{NO_PHOTO}>"; - } - - if ( isset($this->ipsclass->input['download']) AND $this->ipsclass->input['download'] ) - { - $photo = str_replace( "<{NO_PHOTO}>", $this->ipsclass->lang['no_photo_avail'], $photo ); - $html = $this->ipsclass->compiled_templates['skin_profile']->show_card_download( $member['members_display_name'], $photo, $info ); - $html = str_replace( "", $this->ipsclass->skin['_css'], $html ); - - //----------------------------------------- - // Macros - //----------------------------------------- - - $macros = unserialize(stripslashes($this->ipsclass->skin['_macro'])); - - if ( is_array( $macros ) ) - { - foreach( $macros as $row ) - { - if ($row['macro_value'] != "") - { - $html = str_replace( "<{".$row['macro_value']."}>", $row['macro_replace'], $html ); - } - } - } - - //----------------------------------------- - // Images - //----------------------------------------- - - $html = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $html ); - - if ( ! $this->ipsclass->vars['ipb_img_url'] ) - { - $this->ipsclass->vars['ipb_img_url'] = preg_replace( "#/$#", "", $this->ipsclass->vars['board_url'] ) . '/'; - } - - $html = preg_replace( "#img\s+?src=[\"']style_(images|avatars|emoticons)(.+?)[\"'](.+?)?".">#is", "img src=\"".$this->ipsclass->vars['ipb_img_url']."style_\\1\\2\"\\3>", $html ); - - //----------------------------------------- - // Download - //----------------------------------------- - - @header("Content-type: unknown/unknown"); - @header("Content-Disposition: attachment; filename={$member['members_display_name']}.html"); - print $html; - exit(); - } - else - { - $html = $this->ipsclass->compiled_templates['skin_profile']->show_card( $member['members_display_name'], $photo, $info ); - - $this->ipsclass->print->pop_up_window( $this->ipsclass->lang['photo_title'], $html ); - } - } - - /*-------------------------------------------------------------------------*/ - // VIEW PHOTO: - /*-------------------------------------------------------------------------*/ - - function show_photo() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $info = array(); - $id = intval($this->ipsclass->input['MID']); - - if ($this->ipsclass->member['g_mem_info'] != 1) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); - } - - //----------------------------------------- - // Check input.. - //----------------------------------------- - - if ( empty($id) ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'incorrect_use' ) ); - } - - $this->load_photo($id); - - $photo = $this->ipsclass->compiled_templates['skin_profile']->get_photo( $this->show_photo, $this->show_width, $this->show_height ); - $html = $this->ipsclass->compiled_templates['skin_profile']->show_photo( $this->photo_member['members_display_name'], $photo ); - - $this->ipsclass->print->pop_up_window( $this->ipsclass->lang['photo_title'], $html ); - } - - /*-------------------------------------------------------------------------*/ - // FUNC: RETURN PHOTO - /*-------------------------------------------------------------------------*/ - - function load_photo($id, $member=array()) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $this->show_photo = ""; - $this->show_height = ""; - $this->show_width = ""; - - if ( ! isset( $member['pp_member_id'] ) ) - { - $this->photo_member = $this->personal_function_load_member( $id ); - } - else - { - $this->photo_member = $member; - } - - //----------------------------------------- - // Set it up... - //----------------------------------------- - - $this->photo_member = $this->personal_portal_set_information( $this->photo_member ); - - //----------------------------------------- - // Return... - //----------------------------------------- - - $this->show_photo = $this->photo_member['pp_main_photo']; - $this->show_width = "width='" . $this->photo_member['pp_main_width'] . "'"; - $this->show_height = "height='" . $this->photo_member['pp_main_height'] . "'"; - } - - /*-------------------------------------------------------------------------*/ - // VIEW MAIN PROFILE: - /*-------------------------------------------------------------------------*/ - - function view_profile() - { - $this->ipsclass->load_template('skin_topic'); - - $info = array(); - - if ($this->ipsclass->member['g_mem_info'] != 1) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); - } - - //----------------------------------------- - // Check input.. - //----------------------------------------- - - $id = intval($this->ipsclass->input['MID']); - - if ( ! $id ) - { - $this->ipsclass->boink_it( $this->ipsclass->base_url ); - } - - //----------------------------------------- - // Get all member information - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'profile_get_all', array( 'mid' => $id ) ); - - $this->ipsclass->DB->cache_exec_query(); - - $member = $this->ipsclass->DB->fetch_row(); - - if ( empty( $member['id'] ) ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'incorrect_use' ) ); - } - - //----------------------------------------- - // Most posted forum - //----------------------------------------- - - $forum_ids = array('0'); - - foreach( $this->ipsclass->forums->forum_by_id as $r ) - { - $r['read_perms'] = isset($r['read_perms']) ? $r['read_perms'] : ''; - - if ( $this->ipsclass->check_perms($r['read_perms']) == TRUE ) - { - $forum_ids[] = $r['id']; - } - } - - $this->ipsclass->DB->cache_add_query( 'profile_get_favourite', array( 'mid' => $member['id'], 'fid_array' => $forum_ids ) ); - - $this->ipsclass->DB->cache_exec_query(); - - $favourite = $this->ipsclass->DB->fetch_row(); - - //----------------------------------------- - // Post count stats - //----------------------------------------- - - $percent = 0; - - $this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(*) as total_posts', - 'from' => 'posts', - 'where' => "author_id={$member['id']}" ) ); - $this->ipsclass->DB->simple_exec(); - - $total_posts = $this->ipsclass->DB->fetch_row(); - - $board_posts = $this->ipsclass->cache['stats']['total_topics'] + $this->ipsclass->cache['stats']['total_replies']; - - if ($total_posts['total_posts'] > 0) - { - $percent = round( $favourite['f_posts'] / $total_posts['total_posts'] * 100 ); - } - - if ($member['posts'] and $board_posts) - { - $info['posts_day'] = round( $member['posts'] / (((time() - $member['joined']) / 86400)), 1); - - $info['total_pct'] = sprintf( '%.2f', ( $member['posts'] / $board_posts * 100 ) ); - } - - if ($info['posts_day'] > $member['posts']) - { - $info['posts_day'] = $member['posts']; - } - - //----------------------------------------- - // Pips / Icon - //----------------------------------------- - - $pips = 0; - - foreach($this->ipsclass->cache['ranks'] as $k => $v) - { - if ($member['posts'] >= $v['POSTS']) - { - if (!$member['title']) - { - $member['title'] = $this->ipsclass->cache['ranks'][ $k ]['TITLE']; - } - - $pips = $v['PIPS']; - break; - } - } - - $member['member_rank_img'] = ""; - - if ($this->ipsclass->cache['group_cache'][ $member['mgroup'] ]['g_icon']) - { - $member['member_rank_img'] = $this->ipsclass->compiled_templates['skin_topic']->member_rank_img($this->ipsclass->cache['group_cache'][ $member['mgroup'] ]['g_icon']); - } - else if ($pips) - { - if ( is_numeric( $pips ) ) - { - for ($i = 1; $i <= $pips; ++$i) - { - $member['member_rank_img'] .= "<{A_STAR}>"; - } - } - else - { - $member['member_rank_img'] = $this->ipsclass->compiled_templates['skin_topic']->member_rank_img('style_images/<#IMG_DIR#>/folder_team_icons/'.$pips); - } - } - - //----------------------------------------- - // More info... - //----------------------------------------- - - $info['posts'] = $member['posts'] ? $member['posts'] : 0; - $info['name'] = $member['members_display_name']; - $info['mid'] = $member['id']; - - if( isset($favourite['forum_id']) ) - { - $info['fav_forum'] = $this->ipsclass->cache['forum_cache'][ $favourite['forum_id'] ]['name'] ? $this->ipsclass->cache['forum_cache'][ $favourite['forum_id'] ]['name'] : $this->ipsclass->lang['no_info']; - } - else - { - $info['fav_forum'] = $this->ipsclass->lang['no_info']; - } - - $info['fav_id'] = intval($favourite['forum_id']); - $info['fav_posts'] = intval($favourite['f_posts']); - $info['percent'] = $percent; - $info['group_title'] = $this->ipsclass->cache['group_cache'][ $member['mgroup'] ]['g_title']; - $info['board_posts'] = $board_posts; - $info['joined'] = $this->ipsclass->get_date( $member['joined'], 'JOINED' ); - $info['last_active'] = $this->ipsclass->get_date( $member['last_activity'], 'SHORT' ); - - if( $info['login_anonymous']{0} == '1' ) - { - // Member last logged in anonymous - - if( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] OR $this->ipsclass->vars['disable_admin_anon'] ) - { - $info['last_active'] = $this->ipsclass->lang['private']; - } - } - - $info['member_title'] = $member['title'] ? $member['title'] : $this->ipsclass->lang['no_info']; - - $info['aim_name'] = $member['aim_name'] ? $member['aim_name'] : $this->ipsclass->lang['no_info']; - $info['icq_number'] = $member['icq_number'] ? $member['icq_number'] : $this->ipsclass->lang['no_info']; - $info['yahoo'] = $member['yahoo'] ? $member['yahoo'] : $this->ipsclass->lang['no_info']; - $info['location'] = $member['location'] ? $member['location'] : $this->ipsclass->lang['no_info']; - $info['interests'] = $this->ipsclass->txt_wordwrap( $member['interests'] ? $member['interests'] : $this->ipsclass->lang['no_info'], '25', '
    ' ); - $info['msn_name'] = $member['msnname'] ? $member['msnname'] : $this->ipsclass->lang['no_info']; - $info['member_rank_img'] = $member['member_rank_img']; - $info['has_blog'] = isset($member['has_blog']) ? $member['has_blog'] : 0; - $info['has_gallery'] = isset($member['has_gallery']) ? $member['has_gallery'] : 0; - $info['members_display_name'] = $member['members_display_name']; - - //----------------------------------------- - // Online, offline? - //----------------------------------------- - - $cut_off = ($this->ipsclass->vars['au_cutoff'] != "") ? $this->ipsclass->vars['au_cutoff'] * 60 : 900; - $time_limit = time() - $cut_off; - - $info['online_status_indicator'] = '<{PB_USER_OFFLINE}>'; - $info['online_extra'] = '('.$this->ipsclass->lang['online_offline'].')'; - - list( $be_anon, $loggedin ) = explode( '&', $member['login_anonymous'] ); - - $bypass_anon = 0; - - $our_mgroups = array(); - - if( $this->ipsclass->member['mgroup_others'] ) - { - $our_mgroups = explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ); - } - - $our_mgroups[] = $this->ipsclass->member['mgroup']; - - if ( (in_array( $this->ipsclass->vars['admin_group'], $our_mgroups )) and ($this->ipsclass->vars['disable_admin_anon'] != 1) ) - { - $bypass_anon = 1; - } - - //----------------------------------------- - // DO it - //----------------------------------------- - - if ( ( $member['last_visit'] > $time_limit or $member['last_activity'] > $time_limit ) AND $loggedin == 1 AND ( $be_anon != 1 OR $bypass_anon == 1 ) ) - { - $info['online_status_indicator'] = '<{PB_USER_ONLINE}>'; - - //----------------------------------------- - // Where? - //----------------------------------------- - - $where = ""; - - //----------------------------------------- - // Module? - //----------------------------------------- - - if ( strstr( $member['sesslocation'], 'mod:' ) ) - { - $module = str_replace( 'mod:', '', $member['sesslocation'] ); - - $filename = ROOT_PATH.'sources/components_location/'.$this->ipsclass->txt_alphanumerical_clean( $module ).'.php'; - - if ( file_exists( $filename ) ) - { - $real_loc = $member['location']; - $member['location'] = $member['sesslocation']; - - require_once( $filename ); - $toload = 'components_location_'.$module; - $loader = new $toload; - $loader->ipsclass =& $this->ipsclass; - - $tmp = $loader->parse_online_entries( array( 1 => $member ) ); - - if ( is_array( $tmp ) and count( $tmp ) ) - { - $where = "{$tmp[1]['_text']}"; - } - - $member['location'] = $real_loc; - } - } - - else if ( $member['location_1_type'] == 'topic' AND $member['location_1_id'] ) - { - $topic = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid='.$member['location_1_id'] ) ); - - if ( $topic['tid'] ) - { - if ( ! $this->ipsclass->forums->forums_quick_check_access( $member['location_2_id'] ) ) - { - $where = $this->ipsclass->lang['wol_topic'].': '."{$topic['title']}"; - } - } - } - else if ( $member['location_2_type'] == 'forum' AND $member['location_2_id'] ) - { - if ( ! $this->ipsclass->forums->forums_quick_check_access( $member['location_2_id'] ) ) - { - $where = $this->ipsclass->lang['wol_forum'].' '.$this->ipsclass->cache['forum_cache'][ $member['location_2_id'] ]['name']; - } - } - else if ( strstr( strtolower($member['sesslocation']), 'usercp' ) or strstr( strtolower($member['sesslocation']), 'msg' ) ) - { - $where = $this->ipsclass->lang['wol_ucp']; - } - else if ( strstr( strtolower($member['sesslocation']), 'profile' ) ) - { - $where = $this->ipsclass->lang['wol_profile']; - } - else if ( strstr( strtolower($member['sesslocation']), 'search' ) ) - { - $where = $this->ipsclass->lang['wol_search']; - } - - if ( ! $where ) - { - $where = $this->ipsclass->lang['wol_index']; - } - - $info['online_extra'] = '('.$where.')'; - } - - //----------------------------------------- - // Time... - //----------------------------------------- - - $this->ipsclass->vars['time_adjust'] = $this->ipsclass->vars['time_adjust'] == "" ? 0 : $this->ipsclass->vars['time_adjust']; - - if ($member['dst_in_use'] == 1) - { - $member['time_offset'] += 1; - } - - $info['local_time'] = $member['time_offset'] != "" ? gmdate( $this->ipsclass->vars['clock_long'], time() + ($member['time_offset']*3600) + ($this->ipsclass->vars['time_adjust'] * 60) ) : $this->ipsclass->lang['no_info']; - - $info['avatar'] = $this->ipsclass->get_avatar( $member['avatar_location'] , 1, $member['avatar_size'], $member['avatar_type'] ); - - //----------------------------------------- - // Siggy - //----------------------------------------- - - $info['signature'] = $member['signature']; - - $this->parser->parse_html = intval($this->ipsclass->vars['sig_allow_html']); - $this->parser->parse_nl2br = 1; - $this->parser->parse_bbcode = intval($this->ipsclass->vars['sig_allow_ibc']); - - $info['signature'] = $this->parser->pre_display_parse($info['signature']); - - //----------------------------------------- - // site - //----------------------------------------- - - if ( $member['website'] and preg_match( "/^http:\/\/\S+$/", $member['website'] ) ) - { - $info['homepage'] = "{$member['website']}"; - } - else - { - $info['homepage'] = $this->ipsclass->lang['no_info']; - } - - //----------------------------------------- - // Birthday - //----------------------------------------- - - if ($member['bday_month']) - { - $info['birthday'] = $member['bday_day']." ".$this->ipsclass->lang[ 'M_'.$member['bday_month'] ]." ".$member['bday_year']; - } - else - { - $info['birthday'] = $this->ipsclass->lang['no_info']; - } - - //----------------------------------------- - // Email - //----------------------------------------- - - if ( ! $member['hide_email'] ) - { - $info['email'] = "{$this->ipsclass->lang['email']}"; - } - else - { - $info['email'] = $this->ipsclass->lang['private']; - } - - //----------------------------------------- - // Get photo and show profile: - //----------------------------------------- - - $this->load_photo( $member['id'], $member ); - - if ( $this->show_photo ) - { - $info['photo'] = $this->ipsclass->compiled_templates['skin_profile']->get_photo( $this->show_photo, $this->show_width, $this->show_height ); - } - else - { - $info['photo'] = ""; - } - - $info['base_url'] = $this->ipsclass->base_url; - - $info['posts'] = $this->ipsclass->do_number_format($info['posts']); - - //----------------------------------------- - // Output - //----------------------------------------- - - $this->output .= $this->ipsclass->compiled_templates['skin_profile']->show_profile( $info, $this->ipsclass->return_md5_check() ); - - //----------------------------------------- - // Is this our profile? - //----------------------------------------- - - if ($member['id'] == $this->ipsclass->member['id']) - { - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_profile']->user_edit($info), $this->output ); - } - - //----------------------------------------- - // Get custom profile information - //----------------------------------------- - - $custom_out = ""; - - require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); - $fields = new custom_fields( $this->ipsclass->DB ); - - $fields->member_id = $this->ipsclass->member['id']; - $fields->mem_data_id = $member['id']; - $fields->cache_data = $this->ipsclass->cache['profilefields']; - $fields->admin = intval($this->ipsclass->member['g_access_cp']); - $fields->supmod = intval($this->ipsclass->member['g_is_supmod']); - - $fields->init_data(); - $fields->parse_to_view(); - - foreach( $fields->out_fields as $id => $data ) - { - if ( ! $data ) - { - $data = $this->ipsclass->lang['no_info']; - } - - $data = $this->ipsclass->txt_wordwrap( $data, '25', '
    ' ); - - $custom_out .= $this->ipsclass->compiled_templates['skin_profile']->custom_field( $fields->field_names[ $id ], $data ); - } - - if ($custom_out != "") - { - $this->output = str_replace( "", $custom_out, $this->output ); - } - else - { - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_profile']->no_custom_information(), $this->output ); - } - - //----------------------------------------- - // Warning stuff!! - //----------------------------------------- - - $pass = 0; - $mod = 0; - - if ( $this->ipsclass->vars['warn_on'] and ( ! stristr( ','.$this->ipsclass->vars['warn_protected'].',', ','.$member['mgroup'].',' ) ) ) - { - if ($this->ipsclass->member['id']) - { - if ( $this->ipsclass->member['g_is_supmod'] == 1 ) - { - $pass = 1; - $mod = 1; - } - - if ( $pass == 0 and ( $this->ipsclass->vars['warn_show_own'] and ( $member['id'] == $this->ipsclass->member['id'] ) ) ) - { - $pass = 1; - } - - if ( $pass == 1 ) - { - // Work out which image to show. - - if ( ! $this->ipsclass->vars['warn_show_rating'] ) - { - if ( $member['warn_level'] < 1 ) - { - $member['warn_img'] = '<{WARN_0}>'; - } - else if ( $member['warn_level'] >= $this->ipsclass->vars['warn_max'] ) - { - $member['warn_img'] = '<{WARN_5}>'; - $member['warn_percent'] = 100; - } - else - { - $member['warn_percent'] = $member['warn_level'] ? sprintf( "%.0f", ( ($member['warn_level'] / $this->ipsclass->vars['warn_max']) * 100) ) : 0; - - if ( $member['warn_percent'] > 100 ) - { - $member['warn_percent'] = 100; - } - - if ( $member['warn_percent'] >= 81 ) - { - $member['warn_img'] = '<{WARN_5}>'; - } - else if ( $member['warn_percent'] >= 61 ) - { - $member['warn_img'] = '<{WARN_4}>'; - } - else if ( $member['warn_percent'] >= 41 ) - { - $member['warn_img'] = '<{WARN_3}>'; - } - else if ( $member['warn_percent'] >= 21 ) - { - $member['warn_img'] = '<{WARN_2}>'; - } - else if ( $member['warn_percent'] >= 1 ) - { - $member['warn_img'] = '<{WARN_1}>'; - } - else - { - $member['warn_img'] = '<{WARN_0}>'; - } - } - - if ( !isset($member['warn_percent']) OR $member['warn_percent'] < 1 ) - { - $member['warn_percent'] = 0; - } - - if ( $mod == 1 ) - { - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_profile']->warn_level($member['id'], $member['warn_img'], $member['warn_percent']), $this->output ); - } - else - { - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_profile']->warn_level_no_mod($member['id'], $member['warn_img'], $member['warn_percent']), $this->output ); - } - } - else - { - // Rating mode: - - if ( $mod == 1 ) - { - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_profile']->warn_level_rating($member['id'], $member['warn_level'], $this->ipsclass->vars['warn_min'], $this->ipsclass->vars['warn_max']), $this->output ); - } - else - { - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_profile']->warn_level_rating_no_mod($member['id'], $member['warn_level'], $this->ipsclass->vars['warn_min'], $this->ipsclass->vars['warn_max']), $this->output ); - } - } - } - } - } - - $this->page_title = $this->ipsclass->lang['page_title_pp']; - $this->nav = array( $this->ipsclass->lang['page_title_pp'] ); - } - - function get_month_name( $month=0 ) - { - if( $month < 1 OR $month > 12 ) - { - return FALSE; - } - - for( $i = 1; $i < 13; $i++ ) - { - if( $i == $month ) - { - return $this->ipsclass->lang['M_'.$i]; - } - } - } - -} - + $Date: 2008-03-28 18:08:02 -0400 (Fri, 28 Mar 2008) $ +| > $Revision: 1232 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > User Profile functions +| > Module written by Matt Mecham +| > Date started: 28th February 2002 +| +| > Module Version Number: 1.0.0 +| > DBA Checked: Thu 20 May 2004 +| > Quality Checked: Wed 15 Sept. 2004 ++-------------------------------------------------------------------------- +*/ + +/** +* Public Action Class: Profile +* +* @package InvisionPowerBoard +* @subpackage Public-Action +* @author Matt Mecham +* @copyright Invision Power Services, Inc. +* @version 2.1 +*/ + +if ( ! defined( 'IN_IPB' ) ) +{ + /** + * Error checking + */ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +/** +* Public Action Class: Profile +* +* @package InvisionPowerBoard +* @subpackage Public-Action +* @author Matt Mecham +* @version 2.1 +*/ + +class profile +{ + var $output = ""; + var $page_title = ""; + var $nav = array(); + var $html = ""; + + var $member = array(); + var $m_group = array(); + + var $jump_html = ""; + var $parser = ""; + + var $links = array(); + + var $bio = ""; + var $notes = ""; + var $size = "m"; + + var $show_photo = ""; + var $show_width = ""; + var $show_height = ""; + var $show_name = ""; + + var $photo_member = ""; + + var $has_photo = FALSE; + + var $lib; + + function auto_run() + { + //----------------------------------------- + // Load and config the post parser + //----------------------------------------- + + require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); + $this->parser = new parse_bbcode(); + $this->parser->ipsclass = $this->ipsclass; + $this->parser->allow_update_caches = 1; + + $this->parser->bypass_badwords = intval($this->ipsclass->member['g_bypass_badwords']); + + //----------------------------------------- + // Require the HTML and language modules + //----------------------------------------- + + $this->ipsclass->load_language('lang_profile'); + $this->ipsclass->load_template('skin_profile'); + + $this->ipsclass->base_url_nosess = "{$this->ipsclass->vars['board_url']}/index.{$this->ipsclass->vars['php_ext']}"; + + //----------------------------------------- + // What to do? + //----------------------------------------- + + switch($this->ipsclass->input['CODE']) + { + case '03': + if ( $this->ipsclass->vars['pp_show_classic'] ) + { + $this->view_profile(); + } + else + { + $this->personal_portal_view(); + } + break; + + case 'showphoto': + $this->show_photo(); + break; + + case 'showcard': + $this->show_card(); + break; + + case 'show-display-names': + $this->show_display_names(); + break; + + case 'personal_ajax_load_tab': + $this->personal_ajax_load_tab(); + break; + + case 'personal_ajax_add_comment': + $this->personal_ajax_add_comment(); + break; + + case 'personal_ajax_delete_comment': + $this->personal_ajax_delete_comment(); + break; + + case 'personal_ajax_reload_comments': + $this->personal_ajax_reload_comments(); + break; + + case 'personal_portal_view': + if ( $this->ipsclass->vars['pp_show_classic'] ) + { + $this->view_profile(); + } + else + { + $this->personal_portal_view(); + } + break; + + case 'personal_iframe_friends': + $this->personal_iframe_friends(); + break; + + case 'personal_iframe_settings': + $this->personal_iframe_settings(); + break; + + case 'personal_iframe_settings_save': + $this->personal_iframe_settings_save(); + break; + + case 'personal_iframe_comments': + $this->personal_iframe_comments(); + break; + case 'personal_iframe_comments_save': + $this->personal_iframe_comments_save(); + break; + + case 'friends_list_popup': + switch( $this->ipsclass->input['do'] ) + { + default: + case 'list': + $this->friends_list_list(); + break; + case 'add': + $this->friends_list_add(); + break; + case 'remove': + $this->friends_list_remove(); + break; + case 'friends_list_moderation': + $this->friends_list_moderation(); + break; + } + break; + + default: + if ( $this->ipsclass->vars['pp_show_classic'] ) + { + $this->view_profile(); + } + else + { + $this->personal_portal_view(); + } + break; + } + + // If we have any HTML to print, do so... + + $this->ipsclass->print->add_output( $this->output ); + $this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 1, 'NAV' => $this->nav ) ); + } + + /*-------------------------------------------------------------------------*/ + // FRIENDS LIST: Remove a friend + /*-------------------------------------------------------------------------*/ + + /** + * Remove a friend + * + * + * @return void + * @since IPB 2.2.0.2006-08-09 + */ + function friends_list_remove() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $friend_id = intval( $this->ipsclass->input['member_id'] ); + $md5check = substr( $this->ipsclass->input['md5check'], 0, 32 ); + $tab = substr( $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['tab'] ), 0, 20 ); + $friend = array(); + $member = array(); + + //----------------------------------------- + // MD5 check + //----------------------------------------- + + if ( $md5check != $this->ipsclass->return_md5_check() ) + { + $this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error&tab='.$tab ); + exit(); + } + + //----------------------------------------- + // Get friend... + //----------------------------------------- + + $friend = $this->personal_function_load_member( $friend_id ); + + //----------------------------------------- + // Get member... + //----------------------------------------- + + $member = $this->personal_function_load_member( $this->ipsclass->member['id'] ); + + //----------------------------------------- + // Check... + //----------------------------------------- + + if ( ! $friend['id'] OR ! $member['id'] ) + { + $this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error&tab='.$tab ); + exit(); + } + + //----------------------------------------- + // NOT PENDING... + //----------------------------------------- + + if ( $tab != 'pending' ) + { + //----------------------------------------- + // Already a friend? + //----------------------------------------- + + $friend_check = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'friends_id', + 'from' => 'profile_friends', + 'where' => "friends_member_id=".$this->ipsclass->member['id']." AND friends_friend_id=".$friend['id'] ) ); + + if ( ! $friend_check['friends_id'] ) + { + $this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error&tab='.$tab ); + exit(); + } + + //----------------------------------------- + // Remove from the DB + //----------------------------------------- + + $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'profile_friends', + 'where' => 'friends_id='.$friend_check['friends_id'] ) ); + } + //----------------------------------------- + // PENDING... + //----------------------------------------- + else + { + //----------------------------------------- + // Already a friend? + //----------------------------------------- + + $friend_check = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'friends_id', + 'from' => 'profile_friends', + 'where' => "friends_member_id=".$friend['id']." AND friends_friend_id=".$this->ipsclass->member['id'] ) ); + + if ( ! $friend_check['friends_id'] ) + { + $this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error&tab='.$tab ); + exit(); + } + + //----------------------------------------- + // Remove from the DB + //----------------------------------------- + + $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'profile_friends', + 'where' => 'friends_id='.$friend_check['friends_id'] ) ); + } + + //----------------------------------------- + // Recache.. + //----------------------------------------- + + $this->personal_function_recache_members_friends( $member ); + $this->personal_function_recache_members_friends( $friend ); + + //----------------------------------------- + // Bounce + //----------------------------------------- + + $this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=pp_friend_removed&tab='.$tab ); + } + + /*-------------------------------------------------------------------------*/ + // FRIENDS LIST: Approve a friend + /*-------------------------------------------------------------------------*/ + + /** + * Moderate pending friends + * + * + * @return void + * @since IPB 2.2.0.2006-08-09 + */ + function friends_list_moderation() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $md5check = substr( $this->ipsclass->input['md5check'], 0, 32 ); + $friends = array(); + $friend_ids = array(); + $friend_member_ids = array(); + $_friend_ids = array(); + $friends_already = array(); + $friends_update = array(); + $member = array(); + $pp_option = trim( $this->ipsclass->input['pp_option'] ); + $message = ''; + $subject = ''; + $msg = 'pp_friend_approved'; + + //----------------------------------------- + // Get the emailer module + //----------------------------------------- + + require_once( ROOT_PATH."sources/classes/class_email.php" ); + + $email = new emailer(); + $email->ipsclass =& $this->ipsclass; + $email->email_init(); + + //----------------------------------------- + // Get MSG library class + //----------------------------------------- + + require_once( ROOT_PATH.'sources/lib/func_msg.php' ); + + $msg_lib = new func_msg(); + $msg_lib->ipsclass =& $this->ipsclass; + $msg_lib->init(); + $this->ipsclass->load_language( 'lang_msg' ); + + //----------------------------------------- + // MD5 check + //----------------------------------------- + + if ( $md5check != $this->ipsclass->return_md5_check() ) + { + $this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error&tab=pending' ); + exit(); + } + + //----------------------------------------- + // Get friends... + //----------------------------------------- + + if ( ! is_array( $_POST['pp_friend_id'] ) OR ! count( $_POST['pp_friend_id'] ) ) + { + $this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error&tab=pending' ); + exit(); + } + + //----------------------------------------- + // Figure IDs + //----------------------------------------- + + foreach( $_POST['pp_friend_id'] as $key => $value ) + { + $_key = intval( $key ); + + if ( $_key ) + { + $_friend_ids[ $_key ] = $_key; + } + } + + if ( ! is_array( $_friend_ids ) OR ! count( $_friend_ids ) ) + { + $this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error&tab=pending' ); + exit(); + } + + //----------------------------------------- + // Check our friends are OK + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => '*', + 'from' => 'profile_friends', + 'where' => 'friends_friend_id='.$this->ipsclass->member['id'].' AND friends_approved=0 AND friends_member_id IN ('.implode(',',$_friend_ids ). ')' ) ); + + $this->ipsclass->DB->exec_query(); + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + $friend_ids[ $row['friends_id'] ] = $row['friends_id']; + $friend_member_ids[ $row['friends_member_id'] ] = $row['friends_member_id']; + } + + if ( ! is_array( $friend_ids ) OR ! count( $friend_ids ) ) + { + $this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error&tab=pending' ); + exit(); + } + + //----------------------------------------- + // Load friends... + //----------------------------------------- + + $friends = $this->personal_function_load_member( $friend_member_ids ); + + //----------------------------------------- + // Get member... + //----------------------------------------- + + $member = $this->personal_function_load_member( $this->ipsclass->member['id'] ); + + //----------------------------------------- + // Check... + //----------------------------------------- + + if ( ! is_array( $friends ) OR ! count( $friends ) OR ! $member['id'] ) + { + $this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error&tab=pending' ); + exit(); + } + + //----------------------------------------- + // What to do? + //----------------------------------------- + + if ( $pp_option == 'delete' ) + { + //----------------------------------------- + // Ok.. delete them in the DB. + //----------------------------------------- + + $this->ipsclass->DB->do_delete( 'profile_friends', 'friends_id IN('.implode(',', $friend_ids ) . ')' ); + + $msg = 'pp_friend_removed'; + } + else + { + //----------------------------------------- + // Ok.. approve them in the DB. + //----------------------------------------- + + $this->ipsclass->DB->do_update( 'profile_friends', array( 'friends_approved' => 1 ), 'friends_id IN('.implode(',', $friend_ids ) . ')' ); + + //----------------------------------------- + // Reciprocal mode? + //----------------------------------------- + + if ( $pp_option == 'add_reciprocal' ) + { + //----------------------------------------- + // Find out who isn't already on your list... + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => '*', + 'from' => 'profile_friends', + 'where' => 'friends_member_id='.$this->ipsclass->member['id'].' AND friends_approved=1 AND friends_friend_id IN ('.implode(',',$_friend_ids ). ')' ) ); + + $this->ipsclass->DB->exec_query(); + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + $friends_already[ $row['friends_friend_id'] ] = $row['friends_friend_id']; + } + + //----------------------------------------- + // Check which aren't already members... + //----------------------------------------- + + foreach( $friend_member_ids as $id => $_id ) + { + if ( in_array( $id, $friends_already ) ) + { + continue; + } + + $friends_update[ $id ] = $id; + } + + //----------------------------------------- + // Gonna do it? + //----------------------------------------- + + if ( is_array( $friends_update ) AND count( $friends_update ) ) + { + foreach( $friends_update as $id => $_id ) + { + $this->ipsclass->DB->do_insert( 'profile_friends', array( 'friends_member_id' => $member['id'], + 'friends_friend_id' => $id, + 'friends_approved' => 1, + 'friends_added' => time() ) ); + } + } + } + + //----------------------------------------- + // Send out message... + //----------------------------------------- + + foreach( $friends as $friend ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $message = ''; + $subject = ''; + + if ( $friend['pp_setting_notify_friend'] ) + { + $email->get_template("new_friend_approved"); + + $email->build_message( array( 'MEMBERS_DISPLAY_NAME' => $friend['members_display_name'], + 'FRIEND_NAME' => $member['members_display_name'], + 'LINK' => $this->ipsclass->vars['board_url'] . '/index.' . $this->ipsclass->vars['php_ext'] . '?act=profile&CODE=personal_portal_view&tab=settings&id='.$friend['id'] ) ); + + $message = $email->message; + $subject = $email->lang_subject; + $return_msg = ''; + } + + //----------------------------------------- + // Got anything to send? + //----------------------------------------- + + if ( $message AND $subject ) + { + //----------------------------------------- + // Email? + //----------------------------------------- + + if ( $friend['pp_setting_notify_friend'] == 'email' OR $friend['members_disable_pm'] ) + { + $email->subject = $subject; + $email->message = $message; + $email->to = $friend['email']; + + $email->send_mail(); + } + + //----------------------------------------- + // PM? + //----------------------------------------- + + else + { + $msg_lib->to_by_id = $friend['id']; + $msg_lib->from_member = $member; + $msg_lib->msg_title = $subject; + + $msg_lib->postlib->parser->parse_bbcode = 1; + $msg_lib->postlib->parser->parse_smilies = 0; + $msg_lib->postlib->parser->parse_html = 0; + $msg_lib->postlib->parser->parse_nl2br = 1; + $msg_lib->msg_post = $msg_lib->postlib->parser->pre_display_parse( $msg_lib->postlib->parser->pre_db_parse( $message ) ); + + $msg_lib->force_pm = 1; + + $msg_lib->send_pm(); + } + } + } + + $this->personal_function_recache_members_friends( $friend ); + } + + //----------------------------------------- + // Recache.. + //----------------------------------------- + + $this->personal_function_recache_members_friends( $member ); + + + //----------------------------------------- + // Return + //----------------------------------------- + + $this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg='.$msg.'&tab=pending' ); + } + + /*-------------------------------------------------------------------------*/ + // FRIENDS LIST: Add a friend + /*-------------------------------------------------------------------------*/ + + /** + * Add a friend + * + * + * @return void + * @since IPB 2.2.0.2006-08-09 + */ + function friends_list_add() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $friend_id = intval( $this->ipsclass->input['member_id'] ); + $md5check = substr( $this->ipsclass->input['md5check'], 0, 32 ); + $friend = array(); + $member = array(); + $friends_approved = 1; + $message = ''; + $subject = ''; + $to = array(); + $from = array(); + $return_msg = ''; + + //----------------------------------------- + // Get the emailer module + //----------------------------------------- + + require_once( ROOT_PATH."sources/classes/class_email.php" ); + + $email = new emailer(); + $email->ipsclass =& $this->ipsclass; + $email->email_init(); + + //----------------------------------------- + // Get MSG library class + //----------------------------------------- + + require_once( ROOT_PATH.'sources/lib/func_msg.php' ); + + $msg_lib = new func_msg(); + $msg_lib->ipsclass =& $this->ipsclass; + $msg_lib->init(); + $this->ipsclass->load_language( 'lang_msg' ); + + //----------------------------------------- + // MD5 check + //----------------------------------------- + + if ( $md5check != $this->ipsclass->return_md5_check() ) + { + $this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error' ); + exit(); + } + + //----------------------------------------- + // Adding yourself? + //----------------------------------------- + + if ( $this->ipsclass->member['id'] == $friend_id ) + { + $this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error' ); + exit(); + } + + //----------------------------------------- + // Get friend... + //----------------------------------------- + + $friend = $this->personal_function_load_member( $friend_id ); + + //----------------------------------------- + // Get member... + //----------------------------------------- + + $member = $this->personal_function_load_member( $this->ipsclass->member['id'] ); + + //----------------------------------------- + // Check... + //----------------------------------------- + + if ( ! $friend['id'] OR ! $member['id'] ) + { + $this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error' ); + exit(); + } + + //----------------------------------------- + // Already a friend? + //----------------------------------------- + + $friend_check = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'friends_id', + 'from' => 'profile_friends', + 'where' => "friends_member_id=".$this->ipsclass->member['id']." AND friends_friend_id=".$friend['id'] ) ); + + if ( $friend_check['friends_id'] ) + { + $this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=pp_friend_already' ); + exit(); + } + + //----------------------------------------- + // Friend requires approval? + //----------------------------------------- + + if ( $friend['pp_setting_moderate_friends'] ) + { + $friends_approved = 0; + } + + //----------------------------------------- + // Add to DB + //----------------------------------------- + + $this->ipsclass->DB->do_insert( 'profile_friends', array( 'friends_member_id' => $member['id'], + 'friends_friend_id' => $friend['id'], + 'friends_approved' => $friends_approved, + 'friends_added' => time() ) ); + + //----------------------------------------- + // What are we doing? Sending out 'mod' or 'yay' + // message? + //----------------------------------------- + + if ( ! $friends_approved AND $friend['pp_setting_notify_friend'] ) + { + $email->get_template("new_friend_request"); + + $email->build_message( array( 'MEMBERS_DISPLAY_NAME' => $friend['members_display_name'], + 'FRIEND_NAME' => $member['members_display_name'], + 'LINK' => $this->ipsclass->vars['board_url'] . '/index.' . $this->ipsclass->vars['php_ext'] . '?act=profile&CODE=personal_portal_view&tab=settings&id='.$friend['id'] ) ); + + $message = $email->message; + $subject = $email->lang_subject; + $to = $friend; + $from = $member; + $return_msg = 'pp_friend_added_mod'; + } + else if ( $friend['pp_setting_notify_friend'] != 'none' ) + { + $email->get_template("new_friend_added"); + + $email->build_message( array( 'MEMBERS_DISPLAY_NAME' => $friend['members_display_name'], + 'FRIEND_NAME' => $member['members_display_name'], + 'LINK' => $this->ipsclass->vars['board_url'] . '/index.' . $this->ipsclass->vars['php_ext'] . '?act=profile&CODE=personal_portal_view&tab=settings&id='.$friend['id'] ) ); + + $message = $email->message; + $subject = $email->lang_subject; + $to = $friend; + $from = $member; + $return_msg = 'pp_friend_added'; + } + + //----------------------------------------- + // Got anything to send? + //----------------------------------------- + + if ( $message AND $subject ) + { + //----------------------------------------- + // Email? + //----------------------------------------- + + if ( $friend['pp_setting_notify_friend'] == 'email' OR ( $friend['pp_setting_notify_friend'] AND $friend['members_disable_pm'] ) ) + { + $email->subject = $subject; + $email->message = $message; + $email->to = $to['email']; + + $email->send_mail(); + } + + //----------------------------------------- + // PM? + //----------------------------------------- + + else if ( $friend['pp_setting_notify_friend'] ) + { + $msg_lib->to_by_id = $to['id']; + $msg_lib->from_member = $from; + $msg_lib->msg_title = $subject; + + $msg_lib->postlib->parser->parse_bbcode = 1; + $msg_lib->postlib->parser->parse_smilies = 0; + $msg_lib->postlib->parser->parse_html = 0; + $msg_lib->postlib->parser->parse_nl2br = 1; + $msg_lib->msg_post = $msg_lib->postlib->parser->pre_display_parse( $msg_lib->postlib->parser->pre_db_parse( $message ) ); + + $msg_lib->force_pm = 1; + + $msg_lib->send_pm(); + } + } + + //----------------------------------------- + // Recache.. + //----------------------------------------- + + $this->personal_function_recache_members_friends( $member ); + $this->personal_function_recache_members_friends( $friend ); + + //----------------------------------------- + // Return + //----------------------------------------- + + $this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg='.$return_msg ); + } + + /*-------------------------------------------------------------------------*/ + // FRIENDS LIST: List all friends + /*-------------------------------------------------------------------------*/ + + /** + * List all current friends. + * + * + * @return void + * @since IPB 2.2.0.2006-08-08 + */ + function friends_list_list() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $content = ''; + $member_id = intval( $this->ipsclass->member['id'] ); + $friends = array(); + $tab = substr( $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['tab'] ), 0, 20 ); + $friends_filter = substr( $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['friends_filter'] ), 0, 20 ); + $_mutual_ids = array( 0 => 0 ); + $query = ''; + $join_field = ''; + $time_limit = time() - $this->ipsclass->vars['au_cutoff'] * 60; + $per_page = 25; + $start = intval( $this->ipsclass->input['st'] ); + + //----------------------------------------- + // Check we're a member + //----------------------------------------- + + if ( ! $member_id ) + { + print ''; + exit(); + } + + //----------------------------------------- + // To what are we doing to whom? + //----------------------------------------- + + if ( $tab == 'pending' ) + { + $query = 'f.friends_friend_id='.$member_id.' AND f.friends_approved=0'; + $join_field = 'f.friends_member_id'; + } + else if ( $tab == 'mutual' AND $friends_filter == 'added' ) + { + $query = 'f.friends_friend_id='.$member_id.' AND f.friends_approved=1'; + $join_field = 'f.friends_member_id'; + } + else if ( $tab == 'mutual' ) + { + # My friends... + $this->ipsclass->DB->build_query( array( 'select' => '*', + 'from' => 'profile_friends', + 'where' => 'friends_member_id='.$member_id.' AND friends_approved=1' ) ); + + $this->ipsclass->DB->exec_query(); + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + $_mutual_ids[] = $row['friends_friend_id']; + } + + $query = 'f.friends_member_id IN ('.implode(',', $_mutual_ids).') AND f.friends_friend_id='.$member_id.' AND f.friends_approved=1'; + $join_field = 'f.friends_member_id'; + } + else + { + $query = 'f.friends_member_id='.$member_id; + $join_field = 'f.friends_friend_id'; + } + + //----------------------------------------- + // Filtered? + //----------------------------------------- + + if ( $friends_filter == 'online' ) + { + $query .= " AND ( ( m.last_visit > $time_limit OR m.last_activity > $time_limit ) AND m.login_anonymous='0&1' )"; + } + else if ( $friends_filter == 'offline' ) + { + $query .= " AND ( m.last_activity < $time_limit OR ( m.login_anonymous='0&0' OR m.login_anonymous='1&0' ) )"; + } + + //----------------------------------------- + // Get count... + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => 'COUNT(*) as count', + 'from' => array( 'profile_friends' => 'f' ), + 'where' => $query, + 'add_join' => array( 0 => array( 'select' => '', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.id='.$join_field, + 'type' => 'inner' ) ) ) ); + $this->ipsclass->DB->exec_query(); + + $count = $this->ipsclass->DB->fetch_row(); + + //----------------------------------------- + // Pages... + //----------------------------------------- + + $pages = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => intval( $count['count'] ), + 'no_dropdown' => 1, + 'PER_PAGE' => $per_page, + 'CUR_ST_VAL' => $start, + 'L_SINGLE' => "", + 'BASE_URL' => $this->ipsclass->base_url . 'act=profile&member_id='.$member_id.'&CODE=friends_list_popup&tab='.$tab.'&friends_filter='.$friends_filter, + ) ); + //----------------------------------------- + // Get current friends... + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => 'f.*', + 'from' => array( 'profile_friends' => 'f' ), + 'where' => $query, + 'order' => 'm.members_l_display_name ASC', + 'limit' => array( $start, $per_page ), + 'add_join' => array( 0 => array( 'select' => 'me.*', + 'from' => array( 'member_extra' => 'me' ), + 'where' => 'me.id='.$join_field, + 'type' => 'left' ), + 1 => array( 'select' => 'pp.*', + 'from' => array( 'profile_portal' => 'pp' ), + 'where' => 'pp.pp_member_id='.$join_field, + 'type' => 'left' ), + 2 => array( 'select' => 'm.*', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.id='.$join_field, + 'type' => 'left' ) ) ) ); + $this->ipsclass->DB->exec_query(); + + //----------------------------------------- + // Get and store... + //----------------------------------------- + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + //----------------------------------------- + // Others... + //----------------------------------------- + + $row['_last_active'] = $this->ipsclass->get_date( $row['last_activity'], 'SHORT' ); + + if( $row['login_anonymous']{0} == '1' ) + { + // Member last logged in anonymous + + if( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] OR $this->ipsclass->vars['disable_admin_anon'] ) + { + $row['_last_active'] = $this->ipsclass->lang['private']; + } + } + + $row['_friends_added'] = $this->ipsclass->get_date( $row['friends_added'], 'SHORT' ); + $row['g_title'] = $this->ipsclass->cache['group_cache'][ $row['mgroup'] ]['g_title']; + + $row = $this->personal_portal_set_information( $row ); + + //----------------------------------------- + // Add row... + //----------------------------------------- + + $friends[] = $row; + } + + //----------------------------------------- + // Show... + //----------------------------------------- + + $content = $this->ipsclass->compiled_templates['skin_profile']->friends_list_list( $friends, $pages ); + + $this->ipsclass->print->pop_up_window( $this->ipsclass->lang['m_title_friends'], $content ); + } + + /*-------------------------------------------------------------------------*/ + // Recaches member's friends + /*-------------------------------------------------------------------------*/ + + /** + * Recaches member's friends + * + * + * @return void + * @since IPB 2.2.0.2006-08-09 + */ + function personal_function_recache_members_friends( $member ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $friends = array(); + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( ! $member['id'] ) + { + return FALSE; + } + + //----------------------------------------- + // Get current friends... + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => '*', + 'from' => 'profile_friends', + 'where' => 'friends_member_id='.$member['id'] ) ); + $this->ipsclass->DB->exec_query(); + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + $friends[ $row['friends_friend_id'] ] = $row['friends_approved']; + } + + //----------------------------------------- + // Update DB + //----------------------------------------- + + $this->ipsclass->pack_and_update_member_cache( $member['id'], array( 'friends' => $friends ) ); + + return TRUE; + } + + /*-------------------------------------------------------------------------*/ + // Load member... + /*-------------------------------------------------------------------------*/ + + /** + * Loads the member + * + * + * @return void + * @since IPB 2.2.0.2006-08-02 + */ + function personal_function_load_member( $member_id=0 ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $query = ''; + + //----------------------------------------- + // What do we have? + //----------------------------------------- + + if ( is_array( $member_id ) ) + { + $query = 'm.id IN ('.implode( ',', $member_id ) . ')'; + } + else + { + $query = 'm.id='.intval($member_id); + } + + //----------------------------------------- + // Load member + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => 'm.*', + 'from' => array( 'members' => 'm' ), + 'where' => $query, + 'add_join' => array( 0 => array( 'select' => 'me.*', + 'from' => array( 'member_extra' => 'me' ), + 'where' => 'me.id=m.id', + 'type' => 'left' ), + 1 => array( 'select' => 'pp.*', + 'from' => array( 'profile_portal' => 'pp' ), + 'where' => 'pp.pp_member_id=m.id', + 'type' => 'left' ), + 2 => array( 'select' => 'g.*', + 'from' => array( 'groups' => 'g' ), + 'where' => 'g.g_id=m.mgroup', + 'type' => 'left' ), + 3 => array( 'select' => 's.location_1_id, s.location_2_id, s.location_1_type, s.location_2_type, s.running_time, s.location as sesslocation', + 'from' => array( 'sessions' => 's' ), + 'where' => "s.member_id=m.id", + 'type' => 'left' ), + 4 => array( 'select' => 'pc.*', + 'from' => array( 'pfields_content' => 'pc' ), + 'where' => 'pc.member_id=m.id', + 'type' => 'left' ) ) ) ); + $this->ipsclass->DB->exec_query(); + + if ( is_array( $member_id ) ) + { + while( $row = $this->ipsclass->DB->fetch_row() ) + { + $member[ $row['id'] ] = $row; + } + } + else + { + $member = $this->ipsclass->DB->fetch_row(); + + $member['pp_setting_count_visitors'] = ( $member['pp_setting_count_visitors'] != 0 ) ? $member['pp_setting_count_visitors'] : 5; + $member['pp_setting_count_comments'] = ( $member['pp_setting_count_comments'] != 0) ? $member['pp_setting_count_comments'] : 5; + $member['pp_setting_count_friends'] = ( $member['pp_setting_count_friends'] != 0 ) ? $member['pp_setting_count_friends'] : 5; + } + + return $member; + } + + /*-------------------------------------------------------------------------*/ + // Updates comments + /*-------------------------------------------------------------------------*/ + + /** + * Updates the comments + * + * + * @return void + * @since IPB 2.2.0.2006-08-15 + */ + function personal_iframe_comments_save() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $member_id = intval( $this->ipsclass->input['member_id'] ); + $md5check = substr( $this->ipsclass->input['md5check'], 0, 32 ); + $content = ''; + $comment_ids = array(); + $final_ids = ''; + + //----------------------------------------- + // MD5 check + //----------------------------------------- + + if ( $md5check != $this->ipsclass->return_md5_check() ) + { + print ''; + exit(); + } + + //----------------------------------------- + // My tab? + //----------------------------------------- + + if ( ( $member_id != $this->ipsclass->member['id'] ) AND ( ! $this->ipsclass->member['g_is_supmod'] ) ) + { + print ''; + exit(); + } + + //----------------------------------------- + // Load member + //----------------------------------------- + + $member = $this->personal_function_load_member( $member_id ); + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( ! $member['id'] ) + { + print ''; + exit(); + } + + //----------------------------------------- + // Grab comment_ids + //----------------------------------------- + + if ( is_array( $_POST['pp-checked'] ) AND count( $_POST['pp-checked'] ) ) + { + foreach( $_POST['pp-checked'] as $key => $value ) + { + $key = intval( $key ); + + if ( $value ) + { + $comment_ids[ $key ] = $key; + } + } + } + + //----------------------------------------- + // Update the database... + //----------------------------------------- + + if ( is_array( $comment_ids ) AND count( $comment_ids ) ) + { + $final_ids = implode( ',', $comment_ids ); + + //----------------------------------------- + // Now update... + //----------------------------------------- + + switch( $this->ipsclass->input['pp-moderation'] ) + { + case 'approve': + $this->ipsclass->DB->do_update( 'profile_comments', array( 'comment_approved' => 1 ), 'comment_id IN('.$final_ids.')' ); + break; + case 'unapprove': + $this->ipsclass->DB->do_update( 'profile_comments', array( 'comment_approved' => 0 ), 'comment_id IN('.$final_ids.')' ); + break; + case 'delete': + $this->ipsclass->DB->do_delete( 'profile_comments', 'comment_id IN('.$final_ids.')' ); + break; + } + } + + //----------------------------------------- + // Bounce... + //----------------------------------------- + + $this->ipsclass->boink_it( $this->ipsclass->base_url . 'act=profile&member_id='.$member_id.'&CODE=personal_iframe_comments&_saved=1&___msg=pp_comments_updated&md5check='.$this->ipsclass->md5_check ); + } + + /*-------------------------------------------------------------------------*/ + // Load friends tab + /*-------------------------------------------------------------------------*/ + + /** + * Loads the content for the friends tab + * + * + * @return void + * @since IPB 2.2.0.2006-08-15 + */ + function personal_iframe_friends() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $member_id = intval( $this->ipsclass->input['member_id'] ); + $md5check = substr( $this->ipsclass->input['md5check'], 0, 32 ); + $content = ''; + $friends_perpage = 10; + $pages = ''; + $start = intval( $this->ipsclass->input['st'] ); + $friends = array(); + + //----------------------------------------- + // MD5 check + //----------------------------------------- + + if ( $md5check != $this->ipsclass->return_md5_check() ) + { + print ''; + exit(); + } + + //----------------------------------------- + // Load member + //----------------------------------------- + + $member = $this->personal_function_load_member( $member_id ); + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( ! $member['id'] ) + { + print ''; + exit(); + } + + //----------------------------------------- + // How many comments must a man write down + // before he is considered a spammer? + //----------------------------------------- + + $friend_count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'count(*) as friend_count', + 'from' => 'profile_friends', + 'where' => 'friends_member_id='.$member_id . ' AND friends_approved=1' ) ); + + //----------------------------------------- + // Pages + //----------------------------------------- + + $pages = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => intval( $friend_count['friend_count'] ), + 'no_dropdown' => 1, + 'PER_PAGE' => $friends_perpage, + 'CUR_ST_VAL' => $start, + 'L_SINGLE' => "", + 'BASE_URL' => $this->ipsclass->base_url . 'act=profile&member_id='.$member_id.'&CODE=personal_iframe_friends&md5check='.$this->ipsclass->md5_check, + ) ); + + //----------------------------------------- + // Grab the friends + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => 'f.*', + 'from' => array( 'profile_friends' => 'f' ), + 'where' => 'f.friends_member_id='.$member_id . ' AND f.friends_approved=1', + 'limit' => array( $start, $friends_perpage ), + 'add_join' => array( 0 => array( 'select' => 'me.*', + 'from' => array( 'member_extra' => 'me' ), + 'where' => 'me.id=f.friends_friend_id', + 'type' => 'left' ), + 1 => array( 'select' => 'pp.*', + 'from' => array( 'profile_portal' => 'pp' ), + 'where' => 'pp.pp_member_id=f.friends_friend_id', + 'type' => 'left' ), + 2 => array( 'select' => 'm.*', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.id=f.friends_friend_id', + 'type' => 'left' ) ) ) ); + $this->ipsclass->DB->exec_query(); + + //----------------------------------------- + // Get and store... + //----------------------------------------- + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + //----------------------------------------- + // Others... + //----------------------------------------- + + $row['_last_active'] = $this->ipsclass->get_date( $row['last_activity'], 'SHORT' ); + + if( $row['login_anonymous']{0} == '1' ) + { + // Member last logged in anonymous + + if( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] OR $this->ipsclass->vars['disable_admin_anon'] ) + { + $row['_last_active'] = $this->ipsclass->lang['private']; + } + } + + $row['_friends_added'] = $this->ipsclass->get_date( $row['friends_added'], 'SHORT' ); + $row['g_title'] = $this->ipsclass->cache['group_cache'][ $row['mgroup'] ]['g_title']; + + //----------------------------------------- + // Add row... + //----------------------------------------- + + $friends[ $row['members_display_name'] ] = $this->personal_portal_set_information( $row ); + } + + //----------------------------------------- + // Sort + //----------------------------------------- + + ksort( $friends ); + + //----------------------------------------- + // Ok.. show the friends + //----------------------------------------- + + $content = $this->ipsclass->compiled_templates['skin_profile']->personal_portal_iframe_friends( $member, $friends, $pages ); + + $this->ipsclass->print->pop_up_window( '', $content ); + + } + + /*-------------------------------------------------------------------------*/ + // Load comments tab + /*-------------------------------------------------------------------------*/ + + /** + * Loads the content for the comments tab + * + * + * @return void + * @since IPB 2.2.0.2006-08-02 + */ + function personal_iframe_comments() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $member_id = intval( $this->ipsclass->input['member_id'] ); + $md5check = substr( $this->ipsclass->input['md5check'], 0, 32 ); + $content = ''; + $comment_perpage = 10; + $pages = ''; + $start = intval( $this->ipsclass->input['st'] ); + $sql_extra = ''; + + //----------------------------------------- + // MD5 check + //----------------------------------------- + + if ( $md5check != $this->ipsclass->return_md5_check() ) + { + print ''; + exit(); + } + + //----------------------------------------- + // Not my tab? So no moderation... + //----------------------------------------- + + if ( ( $member_id != $this->ipsclass->member['id'] ) AND ( ! $this->ipsclass->member['g_is_supmod'] ) ) + { + $sql_extra = ' AND comment_approved=1'; + } + + //----------------------------------------- + // Load member + //----------------------------------------- + + $member = $this->personal_function_load_member( $member_id ); + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( ! $member['id'] ) + { + print ''; + exit(); + } + + //----------------------------------------- + // How many comments must a man write down + // before he is considered a spammer? + //----------------------------------------- + + $comment_count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'count(*) as count_comment', + 'from' => 'profile_comments', + 'where' => 'comment_for_member_id='.$member_id . $sql_extra ) ); + + //----------------------------------------- + // Pages + //----------------------------------------- + + $pages = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => intval( $comment_count['count_comment'] ), + 'PER_PAGE' => $comment_perpage, + 'CUR_ST_VAL' => $start, + 'L_SINGLE' => "", + 'BASE_URL' => $this->ipsclass->base_url . 'act=profile&member_id='.$member_id.'&CODE=personal_iframe_comments&md5check='.$this->ipsclass->md5_check, + ) ); + + //----------------------------------------- + // Regenerate comments... + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => 'pc.*', + 'from' => array( 'profile_comments' => 'pc' ), + 'where' => 'pc.comment_for_member_id='.$member_id . $sql_extra, + 'order' => 'pc.comment_date DESC', + 'limit' => array( $start, $comment_perpage ), + 'add_join' => array( 0 => array( 'select' => 'm.members_display_name, m.login_anonymous', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.id=pc.comment_by_member_id', + 'type' => 'left' ), + 1 => array( 'select' => 'pp.*', + 'from' => array( 'profile_portal' => 'pp' ), + 'where' => 'pp.pp_member_id=m.id', + 'type' => 'left' ), + 2 => array( 'select' => 'me.*', + 'from' => array( 'member_extra' => 'me' ), + 'where' => 'me.id=pc.comment_by_member_id', + 'type' => 'left' ) ) ) ); + + $this->ipsclass->DB->exec_query(); + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + $row['_comment_date'] = $this->ipsclass->get_date( $row['comment_date'], 'SHORT' ); + $row['_avatar'] = $this->ipsclass->get_avatar( $row['avatar_location'], $this->ipsclass->member['view_avs'], $row['avatar_size'], $row['avatar_type'] ); + $row['_last_active'] = $this->ipsclass->get_date( $row['last_activity'], 'SHORT' ); + + if( $row['login_anonymous']{0} == '1' ) + { + // Member last logged in anonymous + + if( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] OR $this->ipsclass->vars['disable_admin_anon'] ) + { + $row['_last_active'] = $this->ipsclass->lang['private']; + } + } + + $row['comment_content'] = $this->ipsclass->txt_wordwrap( $row['comment_content'], '19', ' ' ); + + $row = $this->personal_portal_set_information( $row, 0, 0 ); + + if( !$row['members_display_name_short'] ) + { + $guest = $this->personal_portal_set_information( $this->ipsclass->set_up_guest() ); + $row = array_merge( $row, $guest ); + } + + $comments[] = $row; + } + + //----------------------------------------- + // Ok.. show the settings + //----------------------------------------- + + $content = $this->ipsclass->compiled_templates['skin_profile']->personal_portal_iframe_comments( $member, $comments, $pages ); + + $this->ipsclass->print->pop_up_window( '', $content ); + } + + /*-------------------------------------------------------------------------*/ + // Save settings tab + /*-------------------------------------------------------------------------*/ + + /** + * Saves the content for the settings tab + * + * + * @return void + * @since IPB 2.2.0.2006-08-02 + */ + function personal_iframe_settings_save() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $member_id = intval( $this->ipsclass->input['member_id'] ); + $md5check = substr( $this->ipsclass->input['md5check'], 0, 32 ); + $pp_setting_notify_comments = trim( substr( $this->ipsclass->input['pp_setting_notify_comments'], 0, 10 ) ); + $pp_setting_notify_friend = trim( substr( $this->ipsclass->input['pp_setting_notify_friend'], 0, 10 ) ); + $pp_setting_moderate_comments = intval( $this->ipsclass->input['pp_setting_moderate_comments'] ); + $pp_setting_moderate_friends = intval( $this->ipsclass->input['pp_setting_moderate_friends'] ); + $pp_bio_content = $this->ipsclass->txt_mbsubstr( $this->ipsclass->my_nl2br( $this->ipsclass->input['pp_bio_content'] ), 0, 300 ); + $website = trim( $this->ipsclass->input['website'] ); + + if( !$this->ipsclass->member['g_use_pm'] ) + { + $pp_setting_notify_comments = ( $pp_setting_notify_comments == 'pm' ) ? 'none' : $pp_setting_notify_comments; + $pp_setting_notify_friend = ( $pp_setting_notify_friend == 'pm' ) ? 'none' : $pp_setting_notify_friend; + } + + //----------------------------------------- + // Settings... + //----------------------------------------- + + foreach( array( 'pp_setting_count_friends', 'pp_setting_count_comments', 'pp_setting_count_visitors' ) as $item ) + { + $_val = 0; + + switch( $this->ipsclass->input[ $item ] ) + { + default: + case '3': + $_val = 3; + break; + case '5': + $_val = 5; + break; + case '10': + $_val = 10; + break; + case '0': + $_val = -1; + break; + } + + ${$item} = $_val; + } + + //----------------------------------------- + // Clean website... + //----------------------------------------- + + $website = ( preg_match( "#^http://[a-z0-9\.\-].*$#i", $website ) ) ? $website : ''; + + //----------------------------------------- + // MD5 check + //----------------------------------------- + + if ( $md5check != $this->ipsclass->return_md5_check() ) + { + $this->ipsclass->boink_it( $this->ipsclass->base_url . 'act=profile&member_id='.$member_id.'&CODE=personal_iframe_settings&___msg=no_permission&md5check='.$this->ipsclass->md5_check ); + exit(); + } + + //----------------------------------------- + // Load member + //----------------------------------------- + + $member = $this->personal_function_load_member( $member_id ); + + //----------------------------------------- + // My tab? + //----------------------------------------- + + if ( ( $member_id != $this->ipsclass->member['id'] ) AND ( ! $this->ipsclass->member['g_is_supmod'] OR ( $member['mgroup'] == $this->ipsclass->vars['admin_group'] ) ) ) + { + $this->ipsclass->boink_it( $this->ipsclass->base_url . 'act=profile&member_id='.$member_id.'&CODE=personal_iframe_settings&___msg=no_permission&md5check='.$this->ipsclass->md5_check ); + exit(); + } + + if( !$this->ipsclass->member['g_edit_profile'] ) + { + $website = ''; // Setting to nothing will prevent the query + $pp_bio_content = $member['pp_bio_content']; + } + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( ! $member['id'] ) + { + $this->ipsclass->boink_it( $this->ipsclass->base_url . 'act=profile&member_id='.$member_id.'&CODE=personal_iframe_settings&___msg=no_permission&md5check='.$this->ipsclass->md5_check ); + exit(); + } + + if ( $this->ipsclass->member['g_edit_profile'] ) + { + //----------------------------------------- + // "Do" photo + //----------------------------------------- + + require_once( ROOT_PATH . 'sources/lib/func_usercp.php' ); + $func_70s_style = new func_usercp; + $func_70s_style->ipsclass =& $this->ipsclass; + + $photo = $func_70s_style->lib_upload_photo(); + + if ( $photo['status'] == 'fail' ) + { + //----------------------------------------- + // Save... + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 'pp_member_id', + 'from' => 'profile_portal', + 'where' => "pp_member_id=".$member_id ) ); + $this->ipsclass->DB->simple_exec(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + # Update... + $this->ipsclass->DB->do_update( 'profile_portal', array( 'pp_main_photo' => $photo['final_location'], + 'pp_main_width' => intval( $photo['final_width'] ), + 'pp_main_height' => intval( $photo['final_height'] ), + 'pp_thumb_photo' => $photo['t_final_location'], + 'pp_thumb_width' => intval( $photo['t_final_width'] ), + 'pp_thumb_height' => intval( $photo['t_final_height'] ), + ), 'pp_member_id='.$member_id ); + } + else + { + # Insert + $this->ipsclass->DB->do_insert( 'profile_portal', array( 'pp_main_photo' => $photo['final_location'], + 'pp_main_width' => intval( $photo['final_width'] ), + 'pp_main_height' => intval( $photo['final_height'] ), + 'pp_thumb_photo' => $photo['t_final_location'], + 'pp_thumb_width' => intval( $photo['t_final_width'] ), + 'pp_thumb_height' => intval( $photo['t_final_height'] ), + 'pp_member_id' => $member_id, + ) ); + } + + $this->personal_iframe_settings( $this->ipsclass->lang[ 'pp_' . $photo['error'] ] ); + } + } + + # Preserve old settings? + if ( ! $photo['final_location'] AND $photo['status'] != 'deleted' ) + { + $photo['final_location'] = $member['pp_main_photo']; + $photo['final_width'] = $member['pp_main_width']; + $photo['final_height'] = $member['pp_main_height']; + + $photo['t_final_location'] = $member['pp_thumb_photo']; + $photo['t_final_width'] = $member['pp_thumb_width']; + $photo['t_final_height'] = $member['pp_thumb_height']; + } + + //----------------------------------------- + // Save... + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 'pp_member_id', + 'from' => 'profile_portal', + 'where' => "pp_member_id=".$member_id ) ); + $this->ipsclass->DB->simple_exec(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + # Update... + $this->ipsclass->DB->do_update( 'profile_portal', array( 'pp_main_photo' => $photo['final_location'], + 'pp_main_width' => intval( $photo['final_width'] ), + 'pp_main_height' => intval( $photo['final_height'] ), + 'pp_thumb_photo' => $photo['t_final_location'], + 'pp_thumb_width' => intval( $photo['t_final_width'] ), + 'pp_thumb_height' => intval( $photo['t_final_height'] ), + 'pp_bio_content' => $pp_bio_content, + 'pp_setting_notify_comments' => $pp_setting_notify_comments, + 'pp_setting_notify_friend' => $pp_setting_notify_friend, + 'pp_setting_moderate_comments' => $pp_setting_moderate_comments, + 'pp_setting_moderate_friends' => $pp_setting_moderate_friends, + 'pp_setting_count_friends' => $pp_setting_count_friends, + 'pp_setting_count_comments' => $pp_setting_count_comments, + 'pp_setting_count_visitors' => $pp_setting_count_visitors + ), 'pp_member_id='.$member_id ); + } + else + { + # Insert + $this->ipsclass->DB->do_insert( 'profile_portal', array( 'pp_main_photo' => $photo['final_location'], + 'pp_main_width' => intval( $photo['final_width'] ), + 'pp_main_height' => intval( $photo['final_height'] ), + 'pp_thumb_photo' => $photo['t_final_location'], + 'pp_thumb_width' => intval( $photo['t_final_width'] ), + 'pp_thumb_height' => intval( $photo['t_final_height'] ), + 'pp_bio_content' => $pp_bio_content, + 'pp_member_id' => $member_id, + 'pp_setting_notify_comments' => $pp_setting_notify_comments, + 'pp_setting_notify_friend' => $pp_setting_notify_friend, + 'pp_setting_moderate_comments' => $pp_setting_moderate_comments, + 'pp_setting_moderate_friends' => $pp_setting_moderate_friends, + 'pp_setting_count_friends' => $pp_setting_count_friends, + 'pp_setting_count_comments' => $pp_setting_count_comments, + 'pp_setting_count_visitors' => $pp_setting_count_visitors + ) ); + } + + //----------------------------------------- + // Do website... + //----------------------------------------- + + if ( $this->ipsclass->member['g_edit_profile'] AND $website != 'http://' ) + { + $this->ipsclass->DB->do_update( 'member_extra', array( 'website' => $website ), 'id='. $member_id ); + } + + //----------------------------------------- + // Done... + //----------------------------------------- + + $this->ipsclass->boink_it( $this->ipsclass->base_url . 'act=profile&member_id='.$member_id.'&CODE=personal_iframe_settings&_saved=1&___msg=settings_updated&md5check='.$this->ipsclass->md5_check ); + } + + /*-------------------------------------------------------------------------*/ + // Load settings tab + /*-------------------------------------------------------------------------*/ + + /** + * Loads the content for the settings tab + * + * + * @return void + * @since IPB 2.2.0.2006-08-02 + */ + function personal_iframe_settings( $error='' ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $member_id = intval( $this->ipsclass->input['member_id'] ); + $md5check = substr( $this->ipsclass->input['md5check'], 0, 32 ); + $content = ''; + $types = array( 'none' => $this->ipsclass->lang['op_dd_none'], + 'email' => $this->ipsclass->lang['op_dd_email'], + 'pm' => $this->ipsclass->lang['op_dd_pm'] ); + + if( !$this->ipsclass->member['g_use_pm'] ) + { + unset($types['pm']); + } + + $yes_no = array( '0' => $this->ipsclass->lang['op_dd_disabled'], + '1' => $this->ipsclass->lang['op_dd_enabled'] ); + + //----------------------------------------- + // MD5 check + //----------------------------------------- + + if ( $md5check != $this->ipsclass->return_md5_check() ) + { + print ''; + exit(); + } + + //----------------------------------------- + // Load member + //----------------------------------------- + + $member = $this->personal_function_load_member( $member_id ); + + //----------------------------------------- + // My tab? + //----------------------------------------- + + if ( ( $member_id != $this->ipsclass->member['id'] ) AND ( ! $this->ipsclass->member['g_is_supmod'] OR ( $member['mgroup'] == $this->ipsclass->vars['admin_group'] ) ) ) + { + print ''; + exit(); + } + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( ! $member['id'] ) + { + print ''; + exit(); + } + + //----------------------------------------- + // Format settings... + //----------------------------------------- + + foreach( $types as $key => $lang ) + { + $_comments_selected = ( $key == $member['pp_setting_notify_comments'] ) ? ' selected="selected" ' : ''; + $_friends_selected = ( $key == $member['pp_setting_notify_friend'] ) ? ' selected="selected" ' : ''; + $member['_pp_setting_notify_comments'] .= ""; + $member['_pp_setting_notify_friend'] .= ""; + } + + foreach( $yes_no as $key => $lang ) + { + $_comments_selected = ( $key == $member['pp_setting_moderate_comments'] ) ? ' selected="selected" ' : ''; + $_friends_selected = ( $key == $member['pp_setting_moderate_friends'] ) ? ' selected="selected" ' : ''; + $member['_pp_setting_moderate_comments'] .= ""; + $member['_pp_setting_moderate_friends'] .= ""; + } + + //----------------------------------------- + // Get friends pending approval + //----------------------------------------- + + $friends = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as count_friends', + 'from' => 'profile_friends', + 'where' => 'friends_friend_id='.$member['id'].' AND friends_approved=0' ) ); + + //----------------------------------------- + // Photo settings... + //----------------------------------------- + + list( $size, $width, $height ) = explode( ':', $this->ipsclass->member['g_photo_max_vars'] ); + $photo_ext = str_replace( ',', '/', $this->ipsclass->vars['photo_ext'] ); + + $this->ipsclass->lang['pp_photo_desc'] = sprintf( $this->ipsclass->lang['pp_photo_desc'], $width, $height, $size, $photo_ext ); + + # Allow extra for compression + $member['_max_file_size'] = ( $size * 1024 ) * 4; + + //----------------------------------------- + // Personal statement + //----------------------------------------- + + $member['_pp_bio_content'] = $this->ipsclass->my_br2nl( $member['pp_bio_content'] ); + $member['__pp_bio_content'] = $member['pp_bio_content']; + + //----------------------------------------- + // Force a form action? + //----------------------------------------- + + $is_reset = 0; + + if( $this->ipsclass->vars['upload_domain'] ) + { + $is_reset = 1; + $original = $this->ipsclass->base_url; + + if( $this->ipsclass->session_type == 'cookie' ) + { + $this->ipsclass->base_url = $this->ipsclass->vars['upload_domain'] . '/index.' . $this->ipsclass->vars['php_ext'].'?'; + } + else + { + $this->ipsclass->base_url = $this->ipsclass->vars['upload_domain'] . '/index.' . $this->ipsclass->vars['php_ext'].'?s='.$this->ipsclass->session_id.'&'; + } + } + + //----------------------------------------- + // Ok.. show the settings + //----------------------------------------- + + $content = $this->ipsclass->compiled_templates['skin_profile']->personal_portal_iframe_settings( $member, $friends['count_friends'], $error ); + + //----------------------------------------- + // Reset forced form action? + //----------------------------------------- + + if( $is_reset ) + { + $this->ipsclass->base_url = $original; + } + + $this->ipsclass->print->pop_up_window( '', $content ); + } + + /*-------------------------------------------------------------------------*/ + // Builds comments + /*-------------------------------------------------------------------------*/ + + /** + * Builds comments + * + * + * @return void + * @since IPB 2.2.0.2006-08-02 + */ + function personal_build_comments( $member, $new_id=0, $return_msg='' ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $comments = array(); + $member_id = intval( $member['id'] ); + $comment_perpage = intval( $member['pp_setting_count_comments'] ); + $comment_html = 0; + + //----------------------------------------- + // Choosing to show comments? + //----------------------------------------- + + if ( $comment_perpage < 1 ) + { + return ''; + } + + //----------------------------------------- + // Regenerate comments... + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => 'pc.*', + 'from' => array( 'profile_comments' => 'pc' ), + 'where' => 'pc.comment_for_member_id='.$member_id.' AND pc.comment_approved=1', + 'order' => 'pc.comment_date DESC', + 'limit' => array( 0, $comment_perpage ), + 'add_join' => array( 0 => array( 'select' => 'm.members_display_name, m.posts, m.last_activity', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.id=pc.comment_by_member_id', + 'type' => 'left' ), + 1 => array( 'select' => 'pp.*', + 'from' => array( 'profile_portal' => 'pp' ), + 'where' => 'pp.pp_member_id=m.id', + 'type' => 'left' ), + 2 => array( 'select' => 'me.*', + 'from' => array( 'member_extra' => 'me' ), + 'where' => 'me.id=pc.comment_by_member_id', + 'type' => 'left' ) ) ) ); + + $this->ipsclass->DB->exec_query(); + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + $row['_comment_date'] = $this->ipsclass->get_date( $row['comment_date'], 'TINY' ); + $row['_avatar'] = $this->ipsclass->get_avatar( $row['avatar_location'], $this->ipsclass->member['view_avs'], $row['avatar_size'], $row['avatar_type'] ); + $row['_last_active'] = $this->ipsclass->get_date( $row['last_activity'], 'TINY' ); + + if( $row['login_anonymous']{0} == '1' ) + { + // Member last logged in anonymous + + if( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] OR $this->ipsclass->vars['disable_admin_anon'] ) + { + $row['_last_active'] = $this->ipsclass->lang['private']; + } + } + + $row['comment_content'] = $this->ipsclass->txt_wordwrap( $row['comment_content'], '19', ' ' ); + + $row = $this->personal_portal_set_information( $row, 0, 0 ); + + if( !$row['members_display_name_short'] ) + { + $guest = $this->personal_portal_set_information( $this->ipsclass->set_up_guest() ); + $row = array_merge( $row, $guest ); + } + + $comments[] = $row; + } + + $comment_html = $this->ipsclass->compiled_templates['skin_profile']->personal_portal_show_comment( $comments, $member, $new_id, $return_msg ); + + //----------------------------------------- + // Return it... + //----------------------------------------- + + return $comment_html; + } + + /*-------------------------------------------------------------------------*/ + // Reload comments + /*-------------------------------------------------------------------------*/ + + /** + * Reload comments + * + * + * @return void + * @since IPB 2.2.0.2006-08-15 + */ + function personal_ajax_reload_comments() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $member_id = intval( $this->ipsclass->input['member_id'] ); + $md5check = substr( $this->ipsclass->input['md5check'], 0, 32 ); + + //----------------------------------------- + // Load XML class + //----------------------------------------- + + require_once( KERNEL_PATH . 'class_ajax.php' ); + $class_ajax = new class_ajax(); + $class_ajax->ipsclass =& $this->ipsclass; + $class_ajax->class_init(); + + //----------------------------------------- + // MD5 check + //----------------------------------------- + + if ( $md5check != $this->ipsclass->return_md5_check() ) + { + @header( "Content-type: text/plain" ); + $class_ajax->print_nocache_headers(); + print 'error'; + exit(); + } + + //----------------------------------------- + // Load member + //----------------------------------------- + + $member = $this->personal_function_load_member( $member_id ); + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( ! $member['id'] ) + { + @header( "Content-type: text/plain" ); + $class_ajax->print_nocache_headers(); + print 'error'; + exit(); + } + + //----------------------------------------- + // Regenerate comments... + //----------------------------------------- + + $class_ajax->return_html( $this->personal_build_comments( $member ) ); + exit(); + } + + /*-------------------------------------------------------------------------*/ + // Delete comment + /*-------------------------------------------------------------------------*/ + + /** + * Deletes a comment on member's profile + * + * + * @return void + * @since IPB 2.2.0.2006-08-02 + */ + function personal_ajax_delete_comment() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $member_id = intval( $this->ipsclass->input['member_id'] ); + $md5check = substr( $this->ipsclass->input['md5check'], 0, 32 ); + $comment_id = intval( $this->ipsclass->input['comment_id'] ); + $comment_html = ""; + $comment_perpage = 5; + + //----------------------------------------- + // Load XML class + //----------------------------------------- + + require_once( KERNEL_PATH . 'class_ajax.php' ); + $class_ajax = new class_ajax(); + $class_ajax->ipsclass =& $this->ipsclass; + $class_ajax->class_init(); + + //----------------------------------------- + // MD5 check + //----------------------------------------- + + if ( $md5check != $this->ipsclass->return_md5_check() ) + { + @header( "Content-type: text/plain" ); + $class_ajax->print_nocache_headers(); + print 'error'; + exit(); + } + + //----------------------------------------- + // Load member + //----------------------------------------- + + $member = $this->personal_function_load_member( $member_id ); + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( ! $member['id'] ) + { + @header( "Content-type: text/plain" ); + $class_ajax->print_nocache_headers(); + print 'error'; + exit(); + } + + //----------------------------------------- + // Can remove? + //----------------------------------------- + + if ( ( $member['id'] == $this->ipsclass->member['id'] ) OR $this->ipsclass->member['g_is_supmod'] ) + { + $this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'profile_comments', + 'where' => 'comment_id='.$comment_id ) ); + } + + //----------------------------------------- + // Regenerate comments... + //----------------------------------------- + + $class_ajax->return_html( $this->personal_build_comments( $member ) ); + exit(); + } + + /*-------------------------------------------------------------------------*/ + // Save comment + /*-------------------------------------------------------------------------*/ + + /** + * Saves a comment on member's profile + * + * + * @return void + * @since IPB 2.2.0.2006-08-02 + */ + function personal_ajax_add_comment() + { + //----------------------------------------- + // Load XML class + //----------------------------------------- + + require_once( KERNEL_PATH . 'class_ajax.php' ); + $class_ajax = new class_ajax(); + $class_ajax->ipsclass =& $this->ipsclass; + $class_ajax->class_init(); + + //----------------------------------------- + // INIT + //----------------------------------------- + + $member_id = intval( $this->ipsclass->input['member_id'] ); + $md5check = substr( $this->ipsclass->input['md5check'], 0, 32 ); + $comment = ''; + $comment_approved = 1; + $message = ''; + $subject = ''; + $to = array(); + $from = array(); + $return_msg = ''; + + //----------------------------------------- + // MD5 check + //----------------------------------------- + + if ( $md5check != $this->ipsclass->return_md5_check() ) + { + @header( "Content-type: text/plain" ); + $class_ajax->print_nocache_headers(); + print 'error'; + exit(); + } + + //----------------------------------------- + // Load member + //----------------------------------------- + + $member = $this->personal_function_load_member( $member_id ); + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( ! $member['id'] ) + { + @header( "Content-type: text/plain" ); + $class_ajax->print_nocache_headers(); + print 'nopermission'; + exit(); + } + + //----------------------------------------- + // Member allowed to post at all? + //----------------------------------------- + + if ( ! $this->ipsclass->member['g_reply_other_topics'] ) + { + @header( "Content-type: text/plain" ); + $class_ajax->print_nocache_headers(); + print 'nopermission'; + exit(); + } + + if ( $this->ipsclass->member['restrict_post'] ) + { + if ( $this->ipsclass->member['restrict_post'] == 1 ) + { + @header( "Content-type: text/plain" ); + $class_ajax->print_nocache_headers(); + print 'nopermission'; + exit(); + } + + $post_arr = $this->ipsclass->hdl_ban_line( $this->ipsclass->member['restrict_post'] ); + + if ( time() >= $post_arr['date_end'] ) + { + //----------------------------------------- + // Update this member's profile + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'update' => 'members', + 'set' => 'restrict_post=0', + 'where' => "id=".intval($this->ipsclass->member['id']) + ) ); + $this->ipsclass->DB->simple_exec(); + } + else + { + @header( "Content-type: text/plain" ); + $class_ajax->print_nocache_headers(); + print 'nopermission'; + exit(); + } + } + + //----------------------------------------- + // Does this member have mod_posts enabled? + //----------------------------------------- + + if ( isset($this->ipsclass->member['mod_posts']) AND $this->ipsclass->member['mod_posts'] ) + { + if ( $this->ipsclass->member['mod_posts'] == 1 ) + { + $comment_approved = 0; + } + else + { + $mod_arr = $this->ipsclass->hdl_ban_line( $this->ipsclass->member['mod_posts'] ); + + if ( time() >= $mod_arr['date_end'] ) + { + //----------------------------------------- + // Update this member's profile + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'update' => 'members', + 'set' => 'mod_posts=0', + 'where' => "id=".intval($this->ipsclass->member['id']) + ) ); + $this->ipsclass->DB->simple_exec(); + } + else + { + $comment_approved = 0; + } + } + } + + //----------------------------------------- + // Get the emailer module + //----------------------------------------- + + require_once( ROOT_PATH."sources/classes/class_email.php" ); + + $email = new emailer(); + $email->ipsclass =& $this->ipsclass; + $email->email_init(); + + //----------------------------------------- + // Get MSG library class + //----------------------------------------- + + require_once( ROOT_PATH.'sources/lib/func_msg.php' ); + + $msg_lib = new func_msg(); + $msg_lib->ipsclass =& $this->ipsclass; + $msg_lib->init(); + $this->ipsclass->load_language( 'lang_msg' ); + + //----------------------------------------- + // Finish up + //----------------------------------------- + + $_POST['comment'] = $class_ajax->convert_unicode( $_POST['comment'] ); + $_POST['comment'] = $class_ajax->convert_html_entities( $_POST['comment'] ); + + $comment = $this->ipsclass->parse_clean_value( $_POST['comment'] ); + $comment = $class_ajax->ipsclass->txt_mbsubstr( $comment, 0, 400 ); + $comment = preg_replace( "#(\r\n|\r|\n|
    |
    ){1,}#s", "\n", $comment ); + + //----------------------------------------- + // Bad words + //----------------------------------------- + + $comment = trim( $this->parser->bad_words( $comment ) ); + + //----------------------------------------- + // Got a comment? + //----------------------------------------- + + if ( ! $comment ) + { + @header( "Content-type: text/plain" ); + $class_ajax->print_nocache_headers(); + print 'error-no-comment'; + exit(); + } + + //----------------------------------------- + // Friend requires approval? + //----------------------------------------- + + if ( $member['pp_setting_moderate_comments'] AND $member['id'] != $this->ipsclass->member['id'] ) + { + $comment_approved = 0; + } + + //----------------------------------------- + // Member is ignoring you! + //----------------------------------------- + + if ( $comment_approved ) + { + $_you_are_being_ignored = explode( ",", $member['ignored_users'] ); + + if ( is_array( $_you_are_being_ignored ) and count( $_you_are_being_ignored ) ) + { + if ( in_array( $this->ipsclass->member['id'], $_you_are_being_ignored ) ) + { + $comment_approved = 0; + } + } + } + + //----------------------------------------- + // Add comment to the DB... + //----------------------------------------- + + $this->ipsclass->DB->do_insert( 'profile_comments', array( 'comment_for_member_id' => $member_id, + 'comment_by_member_id' => $this->ipsclass->member['id'], + 'comment_date' => time(), + 'comment_ip_address' => $this->ipsclass->ip_address, + 'comment_approved' => $comment_approved, + 'comment_content' => $this->ipsclass->my_nl2br( $comment ) ) ); + + $new_id = $this->ipsclass->DB->get_insert_id(); + + //----------------------------------------- + // What are we doing? Sending out 'mod' or 'yay' + // message? + //----------------------------------------- + + if ( ! $comment_approved AND $member['pp_setting_notify_comments'] AND ( $member['id'] != $this->ipsclass->member['id'] ) ) + { + $email->get_template("new_comment_request"); + + $email->build_message( array( 'MEMBERS_DISPLAY_NAME' => $member['members_display_name'], + 'COMMENT_NAME' => $this->ipsclass->member['members_display_name'], + 'LINK' => $this->ipsclass->vars['board_url'] . '/index.' . $this->ipsclass->vars['php_ext'] . '?act=profile&CODE=personal_portal_view&tab=comments&id='.$member_id ) ); + + $message = $email->message; + $subject = $email->lang_subject; + $to = $member; + $from = $this->ipsclass->member; + $return_msg = 'pp_comment_added_mod'; + } + else if ( $member['pp_setting_notify_comments'] AND ( $member['id'] != $this->ipsclass->member['id'] ) ) + { + $email->get_template("new_comment_added"); + + $email->build_message( array( 'MEMBERS_DISPLAY_NAME' => $member['members_display_name'], + 'COMMENT_NAME' => $this->ipsclass->member['members_display_name'], + 'LINK' => $this->ipsclass->vars['board_url'] . '/index.' . $this->ipsclass->vars['php_ext'] . '?act=profile&CODE=personal_portal_view&tab=comments&id='.$member_id ) ); + + $message = $email->message; + $subject = $email->lang_subject; + $to = $member; + $from = $this->ipsclass->member; + $return_msg = ''; + } + + //----------------------------------------- + // Got anything to send? + //----------------------------------------- + + if ( $message AND $subject ) + { + //----------------------------------------- + // Email? + //----------------------------------------- + + if ( $member['pp_setting_notify_comments'] == 'email' OR ( $member['pp_setting_notify_comments'] AND $member['members_disable_pm'] ) ) + { + $email->subject = $subject; + $email->message = $message; + $email->to = $to['email']; + + $email->send_mail(); + } + + //----------------------------------------- + // PM? + //----------------------------------------- + + else if ( $member['pp_setting_notify_comments'] != 'none' ) + { + $msg_lib->to_by_id = $to['id']; + $msg_lib->from_member = $from; + $msg_lib->msg_title = $subject; + + $msg_lib->postlib->parser->parse_bbcode = 1; + $msg_lib->postlib->parser->parse_smilies = 0; + $msg_lib->postlib->parser->parse_html = 0; + $msg_lib->postlib->parser->parse_nl2br = 1; + $msg_lib->msg_post = $msg_lib->postlib->parser->pre_display_parse( $msg_lib->postlib->parser->pre_db_parse( $message ) ); + + $msg_lib->force_pm = 1; + + $msg_lib->send_pm(); + } + } + + //----------------------------------------- + // Regenerate comments... + //----------------------------------------- + + $class_ajax->return_html( $this->personal_build_comments( $member, $new_id, $return_msg ) ); + exit(); + } + + /*-------------------------------------------------------------------------*/ + // Load personal portal tab content + /*-------------------------------------------------------------------------*/ + + /** + * Loads the content for the desired tab + * + * + * @return void + * @since IPB 2.2.0.2006-08-02 + */ + function personal_ajax_load_tab() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $member_id = intval( $this->ipsclass->input['member_id'] ); + $tab = substr( $this->ipsclass->txt_alphanumerical_clean( str_replace( '..', '', trim( $this->ipsclass->input['tab'] ) ) ), 0, 20 ); + $md5check = substr( $this->ipsclass->input['md5check'], 0, 32 ); + + //----------------------------------------- + // Load XML class + //----------------------------------------- + + require_once( KERNEL_PATH . 'class_ajax.php' ); + $class_ajax = new class_ajax(); + $class_ajax->ipsclass =& $this->ipsclass; + $class_ajax->class_init(); + + //----------------------------------------- + // MD5 check + //----------------------------------------- + + if ( $md5check != $this->ipsclass->return_md5_check() ) + { + @header( "Content-type: text/plain" ); + $class_ajax->print_nocache_headers(); + print 'error'; + exit(); + } + + //----------------------------------------- + // Load member + //----------------------------------------- + + $member = $this->personal_function_load_member( $member_id ); + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( ! $member['id'] ) + { + @header( "Content-type: text/plain" ); + $class_ajax->print_nocache_headers(); + print 'error'; + exit(); + } + + //----------------------------------------- + // Load config + //----------------------------------------- + + if( !file_exists( ROOT_PATH . 'sources/components_public/profile/'.$tab.'.conf.php' ) ) + { + @header( "Content-type: text/plain" ); + $class_ajax->print_nocache_headers(); + print 'error'; + exit(); + } + + require( ROOT_PATH . 'sources/components_public/profile/'.$tab.'.conf.php' ); + + //----------------------------------------- + // Active? + //----------------------------------------- + + if ( ! $CONFIG['plugin_enabled'] ) + { + @header( "Content-type: text/plain" ); + $class_ajax->print_nocache_headers(); + print 'error'; + exit(); + } + + //----------------------------------------- + // Load main class... + //----------------------------------------- + + if( !file_exists( ROOT_PATH . 'sources/components_public/profile/'.$tab.'.php' ) ) + { + @header( "Content-type: text/plain" ); + $class_ajax->print_nocache_headers(); + print 'error'; + exit(); + } + + require( ROOT_PATH . 'sources/components_public/profile/'.$tab.'.php' ); + $_func_name = 'profile_'.$tab; + $plugin = new $_func_name; + $plugin->ipsclass =& $this->ipsclass; + + $html = $plugin->return_html_block( $member ); + + //----------------------------------------- + // Return it... + //----------------------------------------- + + //$html = htmlentities( $html ); + + $class_ajax->return_html( $html ); + + exit(); + + } + + /*-------------------------------------------------------------------------*/ + // View personal portal + /*-------------------------------------------------------------------------*/ + + /** + * Show's the personal portal for the member + * + * + * @return void + * @since IPB 2.2.0.2006-7-28 and most likely vB4.0.0-2006-x-x + */ + function personal_portal_view() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $member_id = intval( $this->ipsclass->input['id'] ) ? intval( $this->ipsclass->input['id'] ) : intval( $this->ipsclass->input['MID'] ); + $member_id = $member_id ? $member_id : $this->ipsclass->member['id']; + $tab = substr( $this->ipsclass->txt_alphanumerical_clean( str_replace( '..', '', trim( $this->ipsclass->input['tab'] ) ) ), 0, 20 ); + $tab = $tab ? $tab : 'aboutme'; + $member = array(); + $comments = array(); + $comments_html = ""; + $friends = array(); + $visitors = array(); + $comment_perpage = 5; + $pips = 0; + $tabs = array(); + $_tabs = array(); + $_positions = array( 0 => 0 ); + $custom_path = ROOT_PATH . 'sources/components_public/profile'; + $_member_ids = array(); + $sql_extra = ''; + $pass = 0; + $mod = 0; + $_todays_date = getdate(); + + $time_adjust = $this->ipsclass->vars['time_adjust'] == "" ? 0 : $this->ipsclass->vars['time_adjust']; + $board_posts = $this->ipsclass->cache['stats']['total_topics'] + $this->ipsclass->cache['stats']['total_replies']; + + //----------------------------------------- + // Do we have permission to view profiles? + //----------------------------------------- + + if ( $this->ipsclass->member['g_mem_info'] != 1 ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); + } + + //----------------------------------------- + // Check input.. + //----------------------------------------- + + if ( ! $member_id ) + { + $this->ipsclass->boink_it( $this->ipsclass->base_url ); + } + + //----------------------------------------- + // Configure tabs + //----------------------------------------- + + $handle = opendir( $custom_path ); + + while ( ( $file = readdir($handle) ) !== FALSE ) + { + if ( preg_match( "#\.conf\.php$#i", $file ) ) + { + $classname = str_replace( ".conf.php", "", $file ); + + require( $custom_path . "/" . $file ); + + //------------------------------- + // Allowed to use? + //------------------------------- + + if ( $CONFIG['plugin_enabled'] ) + { + if ( $classname != 'posts' && $classname != 'topics' && $classname != 'aboutme' ) + { + $CONFIG['plugin_order'] += 10; + } + + $_position = ( in_array( $CONFIG['plugin_order'], $_positions ) ) ? count( $_positions ) + 1 : $CONFIG['plugin_order']; + $_tabs[ $_position ] = $CONFIG; + + $_positions[ $_position ] = $_position; + } + } + } + + closedir( $handle ); + + ksort( $_tabs ); + + foreach( $_tabs as $_pos => $data ) + { + $data['_lang'] = array_key_exists( $data['plugin_lang_bit'], $this->ipsclass->lang ) ? $this->ipsclass->lang[ $data['plugin_lang_bit'] ] : $data['plugin_name']; + $tabs[ $data['plugin_key'] ] = $data; + } + + if( $tab != 'comments' AND $tab != 'settings' AND !file_exists( ROOT_PATH . 'sources/components_public/profile/'.$tab.'.php' ) ) + { + $tab = 'aboutme'; + } + + //----------------------------------------- + // Grab all data... + //----------------------------------------- + + $member = $this->personal_function_load_member( $member_id ); + + //----------------------------------------- + // Got stuff? + //----------------------------------------- + + if ( ! $member['id'] ) + { + $this->ipsclass->boink_it( $this->ipsclass->base_url ); + } + + //----------------------------------------- + // Recent visitor? + //----------------------------------------- + + if ( $member['id'] != $this->ipsclass->member['id'] ) + { + list( $be_anon, $loggedin ) = explode( '&', $this->ipsclass->member['login_anonymous'] ); + + if ( ! $be_anon ) + { + $this->personal_portal_add_recent_visitor( $member, $this->ipsclass->member['id'] ); + } + } + + //----------------------------------------- + // Custom fields + //----------------------------------------- + + require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); + $custom_fields = new custom_fields( $this->ipsclass->DB ); + + $custom_fields->member_id = $this->ipsclass->member['id']; + $custom_fields->cache_data = $this->ipsclass->cache['profilefields']; + $custom_fields->admin = intval($this->ipsclass->member['g_access_cp']); + $custom_fields->supmod = intval($this->ipsclass->member['g_is_supmod']); + + $custom_fields->member_data = $member; + $custom_fields->init_data(); + $custom_fields->parse_to_view( 0 ); + + if ( count( $custom_fields->out_fields ) ) + { + foreach( $custom_fields->out_fields as $id => $data ) + { + if ( ! $data ) + { + $data = $this->ipsclass->lang['no_info']; + } + + $data = $this->ipsclass->txt_wordwrap( $data, '25', ' ' ); + + $member['custom_fields'][] = array( 'name' => $custom_fields->field_names[ $id ], 'data' => $data ); + } + } + + //----------------------------------------- + // DST? + //----------------------------------------- + + if ( $member['dst_in_use'] == 1 ) + { + $member['time_offset'] += 1; + } + + //----------------------------------------- + // Format extra user data + //----------------------------------------- + + $member['_age'] = ( $member['bday_year'] ) ? date( 'Y' ) - $member['bday_year'] : 0; + + if( $member['bday_month'] > date( 'n' ) ) + { + $member['_age'] -= 1; + } + else if( $member['bday_month'] == date( 'n' ) ) + { + if( $member['bday_day'] > date( 'j' ) ) + { + $member['_age'] -= 1; + } + } + + $member['_bday_month'] = $this->get_month_name( $member['bday_month'] ); + + $member['_last_active'] = $this->ipsclass->get_date( $member['last_activity'], 'SHORT' ); + + if( $member['login_anonymous']{0} == '1' ) + { + // Member last logged in anonymous + + if( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] OR $this->ipsclass->vars['disable_admin_anon'] ) + { + $member['_last_active'] = $this->ipsclass->lang['private']; + } + } + + $member['_local_time'] = $member['time_offset'] != "" ? gmdate( $this->ipsclass->vars['clock_long'], time() + ($member['time_offset']*3600) + ($time_adjust * 60) ) : ''; + $member['_avatar'] = $this->ipsclass->get_avatar( $member['avatar_location'], $this->ipsclass->member['view_avs'], $member['avatar_size'], $member['avatar_type'] ); + $member['_email'] = $member['hide_email'] ? $this->ipsclass->lang['private'] : "{$this->ipsclass->lang['email']}"; + $member['_pp_rating_real'] = intval( $member['pp_rating_real'] ); + $member['_interests'] = $this->ipsclass->txt_wordwrap( $member['interests'] ? $member['interests'] : $this->ipsclass->lang['no_info'], '25', ' ' ); + $member['_posts'] = $this->ipsclass->do_number_format( $member['posts'] ); + $member['_website'] = ( preg_match( "/^http:\/\/\S+$/", $member['website'] ) ) ? $member['website'] : ''; + $member['_title'] = $member['title']; + $member['location'] = $this->ipsclass->txt_wordwrap( $member['location'], 25 ); + + $member['g_title'] = $this->ipsclass->make_name_formatted( $member['g_title'], $member['g_id'], $member['g_prefix'], $member['g_suffix'] ); + + //----------------------------------------- + // BIO + //----------------------------------------- + + $member['pp_bio_content'] = preg_replace( "#\[b\](.+?)\[/b\]#is", "\\1", $member['pp_bio_content'] ); + $member['pp_bio_content'] = preg_replace( "#\[i\](.+?)\[/i\]#is", "\\1", $member['pp_bio_content'] ); + $member['pp_bio_content'] = preg_replace( "#\[u\](.+?)\[/u\]#is", "\\1", $member['pp_bio_content'] ); + $member['pp_bio_content'] = $this->parser->bad_words( $member['pp_bio_content'] ); + $member['pp_bio_content'] = $this->ipsclass->txt_wordwrap( $member['pp_bio_content'], '25', ' ' ); + + //----------------------------------------- + // PHOTO + //----------------------------------------- + + $member = $this->personal_portal_set_information( $member ); + + //----------------------------------------- + // Contact info + //----------------------------------------- + + $member['icq_number'] = $member['icq_number'] > 0 ? $member['icq_number'] : ''; + + $member['_aim_name'] = $member['aim_name'] ? $this->ipsclass->txt_wordwrap( $member['aim_name'], '25' ) : $this->ipsclass->lang['no_info']; + $member['_icq_number'] = $member['icq_number'] ? $this->ipsclass->txt_wordwrap( $member['icq_number'], '25' ) : $this->ipsclass->lang['no_info']; + $member['_yahoo'] = $member['yahoo'] ? $this->ipsclass->txt_wordwrap( $member['yahoo'], '25' ) : $this->ipsclass->lang['no_info']; + $member['_msn_name'] = $member['msnname'] ? $this->ipsclass->txt_wordwrap( $member['msnname'], '25' ) : $this->ipsclass->lang['no_info']; + $member['_joined'] = $this->ipsclass->get_date( $member['joined'], 'JOINED' ); + $member['_posts_day'] = 0; + $member['_total_pct'] = 0; + + //----------------------------------------- + // Format the birthday drop boxes.. + //----------------------------------------- + + $member['_birthday_day'] = ""; + $member['_birthday_month'] = ""; + $member['_birthday_year'] = ""; + + for ( $i = 1 ; $i < 32 ; $i++ ) + { + $member['_birthday_day'] .= "" : ">$i"; + } + + for ( $i = 1 ; $i < 13 ; $i++ ) + { + $member['_birthday_month'] .= "" : ">" . $this->ipsclass->lang['M_'.$i] .""; + } + + $i = $_todays_date['year'] - 1; + $j = $_todays_date['year'] - 100; + + for ( $i ; $j < $i ; $i-- ) + { + $member['_birthday_year'] .= "" : ">$i"; + } + + //----------------------------------------- + // Total posts + //----------------------------------------- + + if ( $member['posts'] and $board_posts ) + { + $member['_posts_day'] = round( $member['posts'] / (((time() - $member['joined']) / 86400)), 2); + + # Fix the issue when there is less than one day + $member['_posts_day'] = ( $member['_posts_day'] > $member['posts'] ) ? $member['posts'] : $member['_posts_day']; + $member['_total_pct'] = sprintf( '%.2f', ( $member['posts'] / $board_posts * 100 ) ); + } + + //----------------------------------------- + // Pips / Icon + //----------------------------------------- + + if( !count($this->ipsclass->cache['ranks']) ) + { + $this->ipsclass->cache['ranks'] = array(); + } + + foreach( $this->ipsclass->cache['ranks'] as $k => $v ) + { + if ( $member['posts'] >= $v['POSTS'] ) + { + if ( ! $member['title'] ) + { + $member['_title'] = $this->ipsclass->cache['ranks'][ $k ]['TITLE']; + } + + $pips = $v['PIPS']; + break; + } + } + + if ( $this->ipsclass->cache['group_cache'][ $member['mgroup'] ]['g_icon'] ) + { + $member['_member_rank_img'] = $this->ipsclass->compiled_templates['skin_profile']->member_rank_img( $member['g_icon'] ); + } + else if ($pips) + { + if ( is_numeric( $pips ) ) + { + for ($i = 1; $i <= $pips; ++$i) + { + $member['_member_rank_img'] .= "<{A_STAR}>"; + } + } + else + { + $member['_member_rank_img'] = $this->ipsclass->compiled_templates['skin_profile']->member_rank_img('style_images/<#IMG_DIR#>/folder_team_icons/'.$pips); + } + } + + //----------------------------------------- + // Comments + //----------------------------------------- + + $comment_html = $this->personal_build_comments( $member ); + + //----------------------------------------- + // Visitors + //----------------------------------------- + + if ( $member['pp_setting_count_visitors'] > 0 ) + { + $_pp_last_visitors = unserialize( $member['pp_last_visitors'] ); + $_visitor_info = array(); + $_count = 0; + + if ( is_array( $_pp_last_visitors ) ) + { + krsort( $_pp_last_visitors ); + $_ids = implode( ',', array_values( $_pp_last_visitors ) ); + + $this->ipsclass->DB->build_query( array( 'select' => 'm.*', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.id IN ('.$_ids.')', + 'add_join' => array( + 0 => array( 'select' => 'pp.*', + 'from' => array( 'profile_portal' => 'pp' ), + 'where' => 'pp.pp_member_id=m.id', + 'type' => 'left' ), + 1 => array( 'select' => 'me.*', + 'from' => array( 'member_extra' => 'me' ), + 'where' => 'me.id=m.id', + 'type' => 'left' ) ) ) ); + + $this->ipsclass->DB->exec_query(); + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + $row['_avatar'] = $this->ipsclass->get_avatar( $row['avatar_location'], $this->ipsclass->member['view_avs'], $row['avatar_size'], $row['avatar_type'] ); + $row['_last_active'] = $this->ipsclass->get_date( $row['last_activity'], 'SHORT' ); + + if( $row['login_anonymous']{0} == '1' ) + { + // Member last logged in anonymous + + if( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] OR $this->ipsclass->vars['disable_admin_anon'] ) + { + $row['_last_active'] = $this->ipsclass->lang['private']; + } + } + + $row = $this->personal_portal_set_information( $row ); + + $row['members_display_name_short'] = $this->ipsclass->txt_truncate( $row['members_display_name'], 13 ); + + $_visitor_info[ $row['id'] ] = $row; + } + + foreach( $_pp_last_visitors as $_time => $_id ) + { + if ( $_count + 1 > $member['pp_setting_count_visitors'] ) + { + break; + } + + $_count++; + + if( !$_visitor_info[ $_id ]['members_display_name_short'] ) + { + $_visitor_info[ $_id ] = $this->ipsclass->member_set_information( $this->ipsclass->set_up_guest() ); + } + + $_visitor_info[ $_id ]['_visited_date'] = $this->ipsclass->get_date( $_time, 'TINY' ); + $_visitor_info[ $_id ]['members_display_name_short'] = $_visitor_info[ $_id ]['members_display_name_short'] ? $_visitor_info[ $_id ]['members_display_name_short'] : $this->ipsclass->lang['global_guestname']; + + $visitors[] = $_visitor_info[ $_id ]; + } + } + } + //----------------------------------------- + // Friends + //----------------------------------------- + + # Get random number from member's friend cache... grab 10 random. array_rand( array, no.) + # also fall back on last 10 if no cache + + if ( $member['pp_setting_count_friends'] > 0 ) + { + $member['_cache'] = $this->ipsclass->unpack_member_cache( $member['members_cache'] ); + + if ( is_array( $member['_cache']['friends'] ) AND count( $member['_cache']['friends'] ) ) + { + foreach( $member['_cache']['friends'] as $id => $approved ) + { + $id = intval( $id ); + + if ( $approved AND $id ) + { + $_member_ids[] = $id; + } + } + + if ( is_array( $_member_ids ) AND count( $_member_ids ) ) + { + $_max = count( $_member_ids ) > $member['pp_setting_count_friends'] ? $member['pp_setting_count_friends'] : count( $_member_ids ); + $_rand = array_rand( $_member_ids, $_max ); + $_final = array(); + + if ( is_array( $_rand ) AND count( $_rand ) ) + { + foreach( $_rand as $_id ) + { + $_final[] = $_member_ids[ $_id ]; + } + } + + if ( count( $_final ) ) + { + $sql_extra = ' AND pf.friends_friend_id IN (' . implode( ',', $_final ) . ')'; + } + } + } + + $this->ipsclass->DB->build_query( array( 'select' => 'pf.*', + 'from' => array( 'profile_friends' => 'pf' ), + 'where' => 'pf.friends_member_id='.$member_id. ' AND pf.friends_approved=1' . $sql_extra, + 'limit' => array( 0, 10 ), + 'add_join' => array( 0 => array( 'select' => 'm.*', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.id=pf.friends_friend_id', + 'type' => 'left' ), + 1 => array( 'select' => 'pp.*', + 'from' => array( 'profile_portal' => 'pp' ), + 'where' => 'pp.pp_member_id=m.id', + 'type' => 'left' ), + 2 => array( 'select' => 'me.*', + 'from' => array( 'member_extra' => 'me' ), + 'where' => 'me.id=pf.friends_friend_id', + 'type' => 'left' ) ) ) ); + + $this->ipsclass->DB->exec_query(); + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + $row['_friends_added'] = $this->ipsclass->get_date( $row['friends_added'], 'SHORT' ); + $row['_avatar'] = $this->ipsclass->get_avatar( $row['avatar_location'], $this->ipsclass->member['view_avs'], $row['avatar_size'], $row['avatar_type'] ); + $row['_last_active'] = $this->ipsclass->get_date( $row['last_activity'], 'DATE' ); + + if( $row['login_anonymous']{0} == '1' ) + { + // Member last logged in anonymous + + if( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] OR $this->ipsclass->vars['disable_admin_anon'] ) + { + $row['_last_active'] = $this->ipsclass->lang['private']; + } + } + + $row['_location'] = $row['location'] ? $row['location'] : $this->ipsclass->lang['no_info']; + + $row = $this->personal_portal_set_information( $row, 0, 0 ); + + $row['members_display_name_short'] = $this->ipsclass->txt_truncate( $row['members_display_name'], 13 ); + + $friends[] = $row; + } + } + + //----------------------------------------- + // Warning stuff + //----------------------------------------- + + if ( $this->ipsclass->vars['warn_on'] and ( ! stristr( ','.$this->ipsclass->vars['warn_protected'].',', ','.$member['mgroup'].',' ) ) ) + { + if ( $this->ipsclass->member['id'] ) + { + if ( $this->ipsclass->member['g_is_supmod'] == 1 ) + { + $pass = 1; + $mod = 1; + } + + if ( $pass == 0 and ( $this->ipsclass->vars['warn_show_own'] and ( $member['id'] == $this->ipsclass->member['id'] ) ) ) + { + $pass = 1; + } + + if ( $pass == 1 ) + { + if ( ! $this->ipsclass->vars['warn_show_rating'] ) + { + if ( $member['warn_level'] < 1 ) + { + $member['warn_img'] = '<{WARN_0}>'; + } + else if ( $member['warn_level'] >= $this->ipsclass->vars['warn_max'] ) + { + $member['warn_img'] = '<{WARN_5}>'; + $member['warn_percent'] = 100; + } + else + { + $member['warn_percent'] = $member['warn_level'] ? sprintf( "%.0f", ( ($member['warn_level'] / $this->ipsclass->vars['warn_max']) * 100) ) : 0; + + if ( $member['warn_percent'] > 100 ) + { + $member['warn_percent'] = 100; + } + + if ( $member['warn_percent'] >= 81 ) + { + $member['warn_img'] = '<{WARN_5}>'; + } + else if ( $member['warn_percent'] >= 61 ) + { + $member['warn_img'] = '<{WARN_4}>'; + } + else if ( $member['warn_percent'] >= 41 ) + { + $member['warn_img'] = '<{WARN_3}>'; + } + else if ( $member['warn_percent'] >= 21 ) + { + $member['warn_img'] = '<{WARN_2}>'; + } + else if ( $member['warn_percent'] >= 1 ) + { + $member['warn_img'] = '<{WARN_1}>'; + } + else + { + $member['warn_img'] = '<{WARN_0}>'; + } + } + + if ( !isset($member['warn_percent']) OR $member['warn_percent'] < 1 ) + { + $member['warn_percent'] = 0; + } + + if ( $mod == 1 ) + { + $member['_warn_data'] = $this->ipsclass->compiled_templates['skin_profile']->warn_level($member['id'], $member['warn_img'], $member['warn_percent']); + } + else + { + $member['_warn_data'] = $this->ipsclass->compiled_templates['skin_profile']->warn_level_no_mod($member['id'], $member['warn_img'], $member['warn_percent']); + } + } + else + { + if ( $mod == 1 ) + { + $member['_warn_data'] = $this->ipsclass->compiled_templates['skin_profile']->warn_level_rating($member['id'], $member['warn_level'], $this->ipsclass->vars['warn_min'], $this->ipsclass->vars['warn_max']); + } + else + { + $member['_warn_data'] = $this->ipsclass->compiled_templates['skin_profile']->warn_level_rating_no_mod($member['id'], $member['warn_level'], $this->ipsclass->vars['warn_min'], $this->ipsclass->vars['warn_max']); + } + } + } + } + } + + //----------------------------------------- + // Online location + //----------------------------------------- + + $member = $this->personal_portal_get_user_location( $member ); + + //----------------------------------------- + // Add profile view (if we've not seen it in + // the last 3 mins) + //----------------------------------------- + + $_test_spam = 0;//intval( $this->ipsclass->my_getcookie( 'ipb-profile-view-' . $member['id'] ) ); + + if ( ! $_test_spam OR ( $_test_spam < time() - 180 ) ) + { + //$this->ipsclass->my_setcookie( 'ipb-profile-view-' . $member['id'], time(), 0 ); + + $this->ipsclass->DB->do_shutdown_insert( 'profile_portal_views', array( 'views_member_id' => $member['id'] ) ); + } + + //----------------------------------------- + // Grab default tab... + //----------------------------------------- + + if ( $tab != 'comments' AND $tab != 'settings' ) + { + if( file_exists( ROOT_PATH . 'sources/components_public/profile/'.$tab.'.php' ) ) + { + require( ROOT_PATH . 'sources/components_public/profile/'.$tab.'.php' ); + $_func_name = 'profile_'.$tab; + $plugin = new $_func_name; + $plugin->ipsclass =& $this->ipsclass; + + $tab_html = $plugin->return_html_block( $member ); + } + else + { + $tab_html = ''; + } + } + else + { + $tab_html = ''; + } + + //----------------------------------------- + // Add to output + //----------------------------------------- + + $this->nav = array( $this->ipsclass->lang['page_title_pp'] ); + $this->page_title = $member['members_display_name'] . ' - ' . $this->ipsclass->lang['page_title_pp']; + $this->output = $this->ipsclass->compiled_templates['skin_profile']->personal_portal_main( $tabs, $member, $comment_html, $friends, $visitors, $tab, $tab_html ); + } + + /*-------------------------------------------------------------------------*/ + // Add recent visitor to a profile + /*-------------------------------------------------------------------------*/ + + /** + * Adds a recent visitor to ones profile + * + * @return void + * @since IPB 2.2.0.2006-7-31 + */ + function personal_portal_add_recent_visitor( $member=array(), $member_id_to_add=0 ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $member_id_to_add = intval( $member_id_to_add ); + $found = 0; + $_recent_visitors = array(); + + //----------------------------------------- + // Check... + //----------------------------------------- + + if ( ! $member_id_to_add ) + { + return false; + } + + //----------------------------------------- + // Sort out data... + //----------------------------------------- + + $recent_visitors = unserialize( $member['pp_last_visitors'] ); + + if ( ! is_array( $recent_visitors ) OR ! count( $recent_visitors ) ) + { + $recent_visitors = array(); + } + + foreach( $recent_visitors as $_time => $_id ) + { + if ( $_id == $member_id_to_add ) + { + $found = 1; + continue; + } + else + { + $_recent_visitors[ $_time ] = $_id; + } + } + + $recent_visitors = $_recent_visitors; + + krsort( $recent_visitors ); + + //----------------------------------------- + // Pop one off if we didn't update... + //----------------------------------------- + + if ( ! $found ) + { + # Over 10? Pop one off... + if ( count( $recent_visitors ) > 10 ) + { + $_tmp = array_pop( $recent_visitors ); + } + } + + # Add in ours.. + $recent_visitors[ time() ] = $member_id_to_add; + + krsort( $recent_visitors ); + + //----------------------------------------- + // Update profile... + //----------------------------------------- + + if ( $member['pp_member_id'] ) + { + $this->ipsclass->DB->do_update( 'profile_portal ', array( 'pp_last_visitors' => serialize( $recent_visitors ) ), 'pp_member_id='.$member['id'] ); + } + else + { + $this->ipsclass->DB->do_insert( 'profile_portal ', array( 'pp_member_id' => $member['id'], + 'pp_profile_update' => time(), + 'pp_last_visitors' => serialize( $recent_visitors ) ) ); + } + + return true; + } + + /*-------------------------------------------------------------------------*/ + // Set photos + /*-------------------------------------------------------------------------*/ + + /** + * Sets the personal photos up + * + * @return void + * @since IPB 2.2.0.2006-7-31 + */ + function personal_portal_set_information( $member, $noids=0, $use_parsed=1 ) + { + return $this->ipsclass->member_set_information( $member, $noids, $use_parsed ); + } + + function personal_portal_get_user_location( $member=array() ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $this->ipsclass->load_language( 'lang_online' ); + + //----------------------------------------- + // Build up our language hash + //----------------------------------------- + + $where_lang = array(); + + foreach ($this->ipsclass->lang as $k => $v) + { + if ( preg_match( "/^WHERE_(\w+)$/", $k, $match ) ) + { + $where_lang[ $match[1] ] = $this->ipsclass->lang[$k]; + } + } + + unset($match); + + $bypass_anon = 0; + $our_mgroups = array(); + $where = ""; + $cut_off = ($this->ipsclass->vars['au_cutoff'] != "") ? $this->ipsclass->vars['au_cutoff'] * 60 : 900; + $time_limit = time() - $cut_off; + + list( $be_anon, $loggedin ) = explode( '&', $member['login_anonymous'] ); + $member['_online_location'] = ''; + + //----------------------------------------- + // Get other groups... + //----------------------------------------- + + if ( $this->ipsclass->member['mgroup_others'] ) + { + $our_mgroups = explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ); + } + + $our_mgroups[] = $this->ipsclass->member['mgroup']; + + if ( (in_array( $this->ipsclass->vars['admin_group'], $our_mgroups )) and ($this->ipsclass->vars['disable_admin_anon'] != 1) ) + { + $bypass_anon = 1; + } + + $member['sesslocation'] = strpos( $member['sesslocation'], "," ) ? strtolower( substr( $member['sesslocation'], 0, strpos( $member['sesslocation'], "," ) ) ) : $member['sesslocation']; + + //----------------------------------------- + // DO it + //----------------------------------------- + + if ( ( $member['last_visit'] > $time_limit or $member['last_activity'] > $time_limit ) AND $loggedin == 1 AND ( $be_anon != 1 OR $bypass_anon == 1 ) ) + { + //----------------------------------------- + // Module? + //----------------------------------------- + + if ( strstr( $member['sesslocation'], 'mod:' ) ) + { + $module = str_replace( 'mod:', '', $member['sesslocation'] ); + + $filename = ROOT_PATH.'sources/components_location/'.$this->ipsclass->txt_alphanumerical_clean( $module ).'.php'; + + if ( file_exists( $filename ) ) + { + $real_loc = $member['location']; + $member['location'] = $member['sesslocation']; + + require_once( $filename ); + $toload = 'components_location_'.$module; + $loader = new $toload; + $loader->ipsclass =& $this->ipsclass; + + $tmp = $loader->parse_online_entries( array( 1 => $member ) ); + + if ( is_array( $tmp ) and count( $tmp ) ) + { + $where = "{$tmp[1]['_text']}"; + } + + $member['location'] = $real_loc; + } + } + else if( $member['sesslocation'] == 'post' ) + { + if ( $member['location_1_type'] == 'topic' AND $member['location_1_id'] ) + { + // We have a topic id, must be a topic.. + + $topic = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid='.$member['location_1_id'] ) ); + + if ( $topic['tid'] ) + { + if ( ! $this->ipsclass->forums->forums_quick_check_access( $member['location_2_id'] ) ) + { + $where = $this->ipsclass->lang['WHERE_postrep'].' '."{$topic['title']}"; + } + } + } + else if( $member['location_2_type'] == 'forum' AND $member['location_2_id'] ) + { + if ( ! $this->ipsclass->forums->forums_quick_check_access( $member['location_2_id'] ) ) + { + $where = $this->ipsclass->lang['WHERE_postnew'].' '."{$this->ipsclass->cache['forum_cache'][ $member['location_2_id'] ]['name']}"; + } + } + } + else if ( $member['location_1_type'] == 'topic' AND $member['location_1_id'] ) + { + $topic = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid='.$member['location_1_id'] ) ); + + if ( $topic['tid'] ) + { + if ( ! $this->ipsclass->forums->forums_quick_check_access( $member['location_2_id'] ) ) + { + $where = $this->ipsclass->lang['WHERE_st'].' '."{$topic['title']}"; + } + } + } + else if ( $member['location_2_type'] == 'forum' AND $member['location_2_id'] ) + { + if ( ! $this->ipsclass->forums->forums_quick_check_access( $member['location_2_id'] ) ) + { + $where = $this->ipsclass->lang['WHERE_sf'].' '."{$this->ipsclass->cache['forum_cache'][ $member['location_2_id'] ]['name']}"; + } + } + else if( isset( $where_lang[$member['sesslocation']] ) AND $where_lang[$member['sesslocation']] ) + { + if( in_array( $member['sesslocation'], array( 'members', 'help', 'calendar', 'online', 'boardrules' ) ) ) + { + $where = "{$where_lang[$member['sesslocation']]}"; + } + else + { + $where = $where_lang[$member['sesslocation']]; + } + } + + if ( ! $where ) + { + $where = "{$this->ipsclass->lang['board_index']}"; + } + + $member['_online_location'] = $where; + } + + return $member; + } + + /*-------------------------------------------------------------------------*/ + // VIEW CONTACT CARD: + /*-------------------------------------------------------------------------*/ + + /** + * Display member display name change history + * + * Prints a pop-up window of the member's display name + * history + * + * @return void + * @since IPB 2.1.0.2005-7-5 + */ + function show_display_names() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $id = intval( $this->ipsclass->input['id'] ); + $member = array(); + $html = ""; + $content = ""; + + //----------------------------------------- + // Display name feature on? + //----------------------------------------- + + if ( ! $this->ipsclass->vars['auth_allow_dnames'] ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); + } + + //----------------------------------------- + // Permission check + //----------------------------------------- + + if ( $this->ipsclass->member['g_mem_info'] != 1 ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); + } + + if ( ! $id ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'incorrect_use' ) ); + } + + //----------------------------------------- + // Get member info + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'generic_get_all_member', array( 'mid' => $id ) ); + $this->ipsclass->DB->cache_exec_query(); + + $member = $this->ipsclass->DB->fetch_row(); + + //----------------------------------------- + // Get Dname history + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => 'd.*', + 'from' => array( 'dnames_change' => 'd' ), + 'where' => 'dname_member_id='.$id, + 'add_join' => array( 0 => array( 'select' => 'm.members_display_name', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.id=d.dname_member_id', + 'type' => 'inner' ) ), + 'order' => 'dname_date DESC' ) ); + $this->ipsclass->DB->exec_query(); + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + //----------------------------------------- + // Format some info + //----------------------------------------- + + $date = $this->ipsclass->get_date( $row['dname_date'], 'SHORT' ); + + //----------------------------------------- + // Compile HTML + //----------------------------------------- + + $content .= $this->ipsclass->compiled_templates['skin_profile']->dname_content_row( $row['dname_previous'], $row['dname_current'], $date ); + } + + //----------------------------------------- + // No changes? Add in a default row + //----------------------------------------- + + if ( ! $content ) + { + $content .= $this->ipsclass->compiled_templates['skin_profile']->dname_content_row( '--', $member['members_display_name'], $this->ipsclass->get_date( $member['joined'], 'SHORT' ) ); + } + + //----------------------------------------- + // Print the pop-up window + //----------------------------------------- + + $html = $this->ipsclass->compiled_templates['skin_profile']->dname_wrapper( $member['members_display_name'], $content ); + + $this->ipsclass->print->pop_up_window( $this->ipsclass->lang['dname_title'], $html ); + } + + /*-------------------------------------------------------------------------*/ + // VIEW CONTACT CARD: + /*-------------------------------------------------------------------------*/ + /** + * @depricated 2006-08-16 + */ + function show_card() + { + $info = array(); + + if ($this->ipsclass->member['g_mem_info'] != 1) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); + } + + //----------------------------------------- + // Check input.. + //----------------------------------------- + + $id = intval($this->ipsclass->input['MID']); + + if ( empty($id) ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'incorrect_use' ) ); + } + + $this->ipsclass->DB->cache_add_query( 'generic_get_all_member', array( 'mid' => $id ) ); + $this->ipsclass->DB->cache_exec_query(); + + $member = $this->ipsclass->DB->fetch_row(); + + $member['website'] = $member['website'] == 'http://' ? '' : $member['website']; + + $info['aim_name'] = $member['aim_name'] ? $member['aim_name'] : $this->ipsclass->lang['no_info']; + $info['icq_number'] = $member['icq_number'] ? $member['icq_number'] : $this->ipsclass->lang['no_info']; + $info['yahoo'] = $member['yahoo'] ? $member['yahoo'] : $this->ipsclass->lang['no_info']; + $info['location'] = $member['location'] ? $member['location'] : $this->ipsclass->lang['no_info']; + $info['interests'] = $member['interests'] ? $member['interests'] : $this->ipsclass->lang['no_info']; + $info['msn_name'] = $member['msnname'] ? $member['msnname'] : $this->ipsclass->lang['no_info']; + $info['website'] = $member['website'] ? "{$member['website']}" : $this->ipsclass->lang['no_info']; + $info['mid'] = $member['id']; + $info['has_blog'] = $member['has_blog']; + $info['has_gallery'] = isset($member['has_gallery']) ? $member['has_gallery'] : 0; + + if (!$member['hide_email']) + { + $info['email'] = "{$this->ipsclass->lang['click_here']}"; + } + else + { + $info['email'] = $this->ipsclass->lang['private']; + } + + $this->load_photo($id); + + if ( $this->show_photo ) + { + $photo = $this->ipsclass->compiled_templates['skin_profile']->get_photo( $this->show_photo, $this->show_width, $this->show_height ); + } + else + { + $photo = "<{NO_PHOTO}>"; + } + + if ( isset($this->ipsclass->input['download']) AND $this->ipsclass->input['download'] ) + { + $photo = str_replace( "<{NO_PHOTO}>", $this->ipsclass->lang['no_photo_avail'], $photo ); + $html = $this->ipsclass->compiled_templates['skin_profile']->show_card_download( $member['members_display_name'], $photo, $info ); + $html = str_replace( "", $this->ipsclass->skin['_css'], $html ); + + //----------------------------------------- + // Macros + //----------------------------------------- + + $macros = unserialize(stripslashes($this->ipsclass->skin['_macro'])); + + if ( is_array( $macros ) ) + { + foreach( $macros as $row ) + { + if ($row['macro_value'] != "") + { + $html = str_replace( "<{".$row['macro_value']."}>", $row['macro_replace'], $html ); + } + } + } + + //----------------------------------------- + // Images + //----------------------------------------- + + $html = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $html ); + + if ( ! $this->ipsclass->vars['ipb_img_url'] ) + { + $this->ipsclass->vars['ipb_img_url'] = preg_replace( "#/$#", "", $this->ipsclass->vars['board_url'] ) . '/'; + } + + $html = preg_replace( "#img\s+?src=[\"']style_(images|avatars|emoticons)(.+?)[\"'](.+?)?".">#is", "img src=\"".$this->ipsclass->vars['ipb_img_url']."style_\\1\\2\"\\3>", $html ); + + //----------------------------------------- + // Download + //----------------------------------------- + + @header("Content-type: unknown/unknown"); + @header("Content-Disposition: attachment; filename={$member['members_display_name']}.html"); + print $html; + exit(); + } + else + { + $html = $this->ipsclass->compiled_templates['skin_profile']->show_card( $member['members_display_name'], $photo, $info ); + + $this->ipsclass->print->pop_up_window( $this->ipsclass->lang['photo_title'], $html ); + } + } + + /*-------------------------------------------------------------------------*/ + // VIEW PHOTO: + /*-------------------------------------------------------------------------*/ + + function show_photo() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $info = array(); + $id = intval($this->ipsclass->input['MID']); + + if ($this->ipsclass->member['g_mem_info'] != 1) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); + } + + //----------------------------------------- + // Check input.. + //----------------------------------------- + + if ( empty($id) ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'incorrect_use' ) ); + } + + $this->load_photo($id); + + $photo = $this->ipsclass->compiled_templates['skin_profile']->get_photo( $this->show_photo, $this->show_width, $this->show_height ); + $html = $this->ipsclass->compiled_templates['skin_profile']->show_photo( $this->photo_member['members_display_name'], $photo ); + + $this->ipsclass->print->pop_up_window( $this->ipsclass->lang['photo_title'], $html ); + } + + /*-------------------------------------------------------------------------*/ + // FUNC: RETURN PHOTO + /*-------------------------------------------------------------------------*/ + + function load_photo($id, $member=array()) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $this->show_photo = ""; + $this->show_height = ""; + $this->show_width = ""; + + if ( ! isset( $member['pp_member_id'] ) ) + { + $this->photo_member = $this->personal_function_load_member( $id ); + } + else + { + $this->photo_member = $member; + } + + //----------------------------------------- + // Set it up... + //----------------------------------------- + + $this->photo_member = $this->personal_portal_set_information( $this->photo_member ); + + //----------------------------------------- + // Return... + //----------------------------------------- + + $this->show_photo = $this->photo_member['pp_main_photo']; + $this->show_width = "width='" . $this->photo_member['pp_main_width'] . "'"; + $this->show_height = "height='" . $this->photo_member['pp_main_height'] . "'"; + } + + /*-------------------------------------------------------------------------*/ + // VIEW MAIN PROFILE: + /*-------------------------------------------------------------------------*/ + + function view_profile() + { + $info = array(); + + if ($this->ipsclass->member['g_mem_info'] != 1) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); + } + + //----------------------------------------- + // Check input.. + //----------------------------------------- + + $id = intval($this->ipsclass->input['MID']); + + if ( ! $id ) + { + $this->ipsclass->boink_it( $this->ipsclass->base_url ); + } + + //----------------------------------------- + // Get all member information + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'profile_get_all', array( 'mid' => $id ) ); + + $this->ipsclass->DB->cache_exec_query(); + + $member = $this->ipsclass->DB->fetch_row(); + + if ( empty( $member['id'] ) ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'incorrect_use' ) ); + } + + //----------------------------------------- + // Most posted forum + //----------------------------------------- + + $forum_ids = array('0'); + + foreach( $this->ipsclass->forums->forum_by_id as $r ) + { + $r['read_perms'] = isset($r['read_perms']) ? $r['read_perms'] : ''; + + if ( $this->ipsclass->check_perms($r['read_perms']) == TRUE ) + { + $forum_ids[] = $r['id']; + } + } + + $this->ipsclass->DB->cache_add_query( 'profile_get_favourite', array( 'mid' => $member['id'], 'fid_array' => $forum_ids ) ); + + $this->ipsclass->DB->cache_exec_query(); + + $favourite = $this->ipsclass->DB->fetch_row(); + + //----------------------------------------- + // Post count stats + //----------------------------------------- + + $percent = 0; + + $this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(*) as total_posts', + 'from' => 'posts', + 'where' => "author_id={$member['id']}" ) ); + $this->ipsclass->DB->simple_exec(); + + $total_posts = $this->ipsclass->DB->fetch_row(); + + $board_posts = $this->ipsclass->cache['stats']['total_topics'] + $this->ipsclass->cache['stats']['total_replies']; + + if ($total_posts['total_posts'] > 0) + { + $percent = round( $favourite['f_posts'] / $total_posts['total_posts'] * 100 ); + } + + if ($member['posts'] and $board_posts) + { + $info['posts_day'] = round( $member['posts'] / (((time() - $member['joined']) / 86400)), 1); + + $info['total_pct'] = sprintf( '%.2f', ( $member['posts'] / $board_posts * 100 ) ); + } + + if ($info['posts_day'] > $member['posts']) + { + $info['posts_day'] = $member['posts']; + } + + //----------------------------------------- + // Pips / Icon + //----------------------------------------- + + $pips = 0; + + foreach($this->ipsclass->cache['ranks'] as $k => $v) + { + if ($member['posts'] >= $v['POSTS']) + { + if (!$member['title']) + { + $member['title'] = $this->ipsclass->cache['ranks'][ $k ]['TITLE']; + } + + $pips = $v['PIPS']; + break; + } + } + + $member['member_rank_img'] = ""; + + if ($this->ipsclass->cache['group_cache'][ $member['mgroup'] ]['g_icon']) + { + $member['member_rank_img'] = $this->ipsclass->compiled_templates['skin_profile']->member_rank_img($this->ipsclass->cache['group_cache'][ $member['mgroup'] ]['g_icon']); + } + else if ($pips) + { + if ( is_numeric( $pips ) ) + { + for ($i = 1; $i <= $pips; ++$i) + { + $member['member_rank_img'] .= "<{A_STAR}>"; + } + } + else + { + $member['member_rank_img'] = $this->ipsclass->compiled_templates['skin_profile']->member_rank_img('style_images/<#IMG_DIR#>/folder_team_icons/'.$pips); + } + } + + //----------------------------------------- + // More info... + //----------------------------------------- + + $info['posts'] = $member['posts'] ? $member['posts'] : 0; + $info['name'] = $member['members_display_name']; + $info['mid'] = $member['id']; + + if( isset($favourite['forum_id']) ) + { + $info['fav_forum'] = $this->ipsclass->cache['forum_cache'][ $favourite['forum_id'] ]['name'] ? $this->ipsclass->cache['forum_cache'][ $favourite['forum_id'] ]['name'] : $this->ipsclass->lang['no_info']; + } + else + { + $info['fav_forum'] = $this->ipsclass->lang['no_info']; + } + + $info['fav_id'] = intval($favourite['forum_id']); + $info['fav_posts'] = intval($favourite['f_posts']); + $info['percent'] = $percent; + $info['group_title'] = $this->ipsclass->cache['group_cache'][ $member['mgroup'] ]['g_title']; + $info['board_posts'] = $board_posts; + $info['joined'] = $this->ipsclass->get_date( $member['joined'], 'JOINED' ); + $info['last_active'] = $this->ipsclass->get_date( $member['last_activity'], 'SHORT' ); + + if( $info['login_anonymous']{0} == '1' ) + { + // Member last logged in anonymous + + if( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] OR $this->ipsclass->vars['disable_admin_anon'] ) + { + $info['last_active'] = $this->ipsclass->lang['private']; + } + } + + $info['member_title'] = $member['title'] ? $member['title'] : $this->ipsclass->lang['no_info']; + + $info['aim_name'] = $member['aim_name'] ? $member['aim_name'] : $this->ipsclass->lang['no_info']; + $info['icq_number'] = $member['icq_number'] ? $member['icq_number'] : $this->ipsclass->lang['no_info']; + $info['yahoo'] = $member['yahoo'] ? $member['yahoo'] : $this->ipsclass->lang['no_info']; + $info['location'] = $member['location'] ? $member['location'] : $this->ipsclass->lang['no_info']; + $info['interests'] = $this->ipsclass->txt_wordwrap( $member['interests'] ? $member['interests'] : $this->ipsclass->lang['no_info'], '25', ' ' ); + $info['msn_name'] = $member['msnname'] ? $member['msnname'] : $this->ipsclass->lang['no_info']; + $info['member_rank_img'] = $member['member_rank_img']; + $info['has_blog'] = isset($member['has_blog']) ? $member['has_blog'] : 0; + $info['has_gallery'] = isset($member['has_gallery']) ? $member['has_gallery'] : 0; + $info['members_display_name'] = $member['members_display_name']; + + //----------------------------------------- + // Online, offline? + //----------------------------------------- + + $cut_off = ($this->ipsclass->vars['au_cutoff'] != "") ? $this->ipsclass->vars['au_cutoff'] * 60 : 900; + $time_limit = time() - $cut_off; + + $info['online_status_indicator'] = '<{PB_USER_OFFLINE}>'; + $info['online_extra'] = '('.$this->ipsclass->lang['online_offline'].')'; + + list( $be_anon, $loggedin ) = explode( '&', $member['login_anonymous'] ); + + $bypass_anon = 0; + + $our_mgroups = array(); + + if( $this->ipsclass->member['mgroup_others'] ) + { + $our_mgroups = explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ); + } + + $our_mgroups[] = $this->ipsclass->member['mgroup']; + + if ( (in_array( $this->ipsclass->vars['admin_group'], $our_mgroups )) and ($this->ipsclass->vars['disable_admin_anon'] != 1) ) + { + $bypass_anon = 1; + } + + //----------------------------------------- + // DO it + //----------------------------------------- + + if ( ( $member['last_visit'] > $time_limit or $member['last_activity'] > $time_limit ) AND $loggedin == 1 AND ( $be_anon != 1 OR $bypass_anon == 1 ) ) + { + $info['online_status_indicator'] = '<{PB_USER_ONLINE}>'; + + //----------------------------------------- + // Where? + //----------------------------------------- + + $where = ""; + + //----------------------------------------- + // Module? + //----------------------------------------- + + if ( strstr( $member['sesslocation'], 'mod:' ) ) + { + $module = str_replace( 'mod:', '', $member['sesslocation'] ); + + $filename = ROOT_PATH.'sources/components_location/'.$this->ipsclass->txt_alphanumerical_clean( $module ).'.php'; + + if ( file_exists( $filename ) ) + { + $real_loc = $member['location']; + $member['location'] = $member['sesslocation']; + + require_once( $filename ); + $toload = 'components_location_'.$module; + $loader = new $toload; + $loader->ipsclass =& $this->ipsclass; + + $tmp = $loader->parse_online_entries( array( 1 => $member ) ); + + if ( is_array( $tmp ) and count( $tmp ) ) + { + $where = "{$tmp[1]['_text']}"; + } + + $member['location'] = $real_loc; + } + } + + else if ( $member['location_1_type'] == 'topic' AND $member['location_1_id'] ) + { + $topic = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid='.$member['location_1_id'] ) ); + + if ( $topic['tid'] ) + { + if ( ! $this->ipsclass->forums->forums_quick_check_access( $member['location_2_id'] ) ) + { + $where = $this->ipsclass->lang['wol_topic'].': '."{$topic['title']}"; + } + } + } + else if ( $member['location_2_type'] == 'forum' AND $member['location_2_id'] ) + { + if ( ! $this->ipsclass->forums->forums_quick_check_access( $member['location_2_id'] ) ) + { + $where = $this->ipsclass->lang['wol_forum'].' '.$this->ipsclass->cache['forum_cache'][ $member['location_2_id'] ]['name']; + } + } + else if ( strstr( strtolower($member['sesslocation']), 'usercp' ) or strstr( strtolower($member['sesslocation']), 'msg' ) ) + { + $where = $this->ipsclass->lang['wol_ucp']; + } + else if ( strstr( strtolower($member['sesslocation']), 'profile' ) ) + { + $where = $this->ipsclass->lang['wol_profile']; + } + else if ( strstr( strtolower($member['sesslocation']), 'search' ) ) + { + $where = $this->ipsclass->lang['wol_search']; + } + + if ( ! $where ) + { + $where = $this->ipsclass->lang['wol_index']; + } + + $info['online_extra'] = '('.$where.')'; + } + + //----------------------------------------- + // Time... + //----------------------------------------- + + $this->ipsclass->vars['time_adjust'] = $this->ipsclass->vars['time_adjust'] == "" ? 0 : $this->ipsclass->vars['time_adjust']; + + if ($member['dst_in_use'] == 1) + { + $member['time_offset'] += 1; + } + + $info['local_time'] = $member['time_offset'] != "" ? gmdate( $this->ipsclass->vars['clock_long'], time() + ($member['time_offset']*3600) + ($this->ipsclass->vars['time_adjust'] * 60) ) : $this->ipsclass->lang['no_info']; + + $info['avatar'] = $this->ipsclass->get_avatar( $member['avatar_location'], $this->ipsclass->member['view_avs'], $member['avatar_size'], $member['avatar_type'] ); + + //----------------------------------------- + // Siggy + //----------------------------------------- + + $info['signature'] = $member['signature']; + + //----------------------------------------- + // site + //----------------------------------------- + + if ( $member['website'] and preg_match( "/^http:\/\/\S+$/", $member['website'] ) ) + { + $info['homepage'] = "{$member['website']}"; + } + else + { + $info['homepage'] = $this->ipsclass->lang['no_info']; + } + + //----------------------------------------- + // Birthday + //----------------------------------------- + + if ($member['bday_month']) + { + $info['birthday'] = $member['bday_day']." ".$this->ipsclass->lang[ 'M_'.$member['bday_month'] ]." ".$member['bday_year']; + } + else + { + $info['birthday'] = $this->ipsclass->lang['no_info']; + } + + //----------------------------------------- + // Email + //----------------------------------------- + + if ( ! $member['hide_email'] ) + { + $info['email'] = "{$this->ipsclass->lang['email']}"; + } + else + { + $info['email'] = $this->ipsclass->lang['private']; + } + + //----------------------------------------- + // Get photo and show profile: + //----------------------------------------- + + $this->load_photo( $member['id'], $member ); + + if ( $this->show_photo ) + { + $info['photo'] = $this->ipsclass->compiled_templates['skin_profile']->get_photo( $this->show_photo, $this->show_width, $this->show_height ); + } + else + { + $info['photo'] = ""; + } + + $info['base_url'] = $this->ipsclass->base_url; + + $info['posts'] = $this->ipsclass->do_number_format($info['posts']); + + //----------------------------------------- + // Output + //----------------------------------------- + + $this->output .= $this->ipsclass->compiled_templates['skin_profile']->show_profile( $info, $this->ipsclass->return_md5_check() ); + + //----------------------------------------- + // Is this our profile? + //----------------------------------------- + + if ($member['id'] == $this->ipsclass->member['id']) + { + $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_profile']->user_edit($info), $this->output ); + } + + //----------------------------------------- + // Get custom profile information + //----------------------------------------- + + $custom_out = ""; + + require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); + $fields = new custom_fields( $this->ipsclass->DB ); + + $fields->member_id = $this->ipsclass->member['id']; + $fields->mem_data_id = $member['id']; + $fields->cache_data = $this->ipsclass->cache['profilefields']; + $fields->admin = intval($this->ipsclass->member['g_access_cp']); + $fields->supmod = intval($this->ipsclass->member['g_is_supmod']); + + $fields->init_data(); + $fields->parse_to_view(); + + foreach( $fields->out_fields as $id => $data ) + { + if ( ! $data ) + { + $data = $this->ipsclass->lang['no_info']; + } + + $data = $this->ipsclass->txt_wordwrap( $data, '25', ' ' ); + + $custom_out .= $this->ipsclass->compiled_templates['skin_profile']->custom_field( $fields->field_names[ $id ], $data ); + } + + if ($custom_out != "") + { + $this->output = str_replace( "", $custom_out, $this->output ); + } + else + { + $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_profile']->no_custom_information(), $this->output ); + } + + //----------------------------------------- + // Warning stuff!! + //----------------------------------------- + + $pass = 0; + $mod = 0; + + if ( $this->ipsclass->vars['warn_on'] and ( ! stristr( ','.$this->ipsclass->vars['warn_protected'].',', ','.$member['mgroup'].',' ) ) ) + { + if ($this->ipsclass->member['id']) + { + if ( $this->ipsclass->member['g_is_supmod'] == 1 ) + { + $pass = 1; + $mod = 1; + } + + if ( $pass == 0 and ( $this->ipsclass->vars['warn_show_own'] and ( $member['id'] == $this->ipsclass->member['id'] ) ) ) + { + $pass = 1; + } + + if ( $pass == 1 ) + { + // Work out which image to show. + + if ( ! $this->ipsclass->vars['warn_show_rating'] ) + { + if ( $member['warn_level'] < 1 ) + { + $member['warn_img'] = '<{WARN_0}>'; + } + else if ( $member['warn_level'] >= $this->ipsclass->vars['warn_max'] ) + { + $member['warn_img'] = '<{WARN_5}>'; + $member['warn_percent'] = 100; + } + else + { + $member['warn_percent'] = $member['warn_level'] ? sprintf( "%.0f", ( ($member['warn_level'] / $this->ipsclass->vars['warn_max']) * 100) ) : 0; + + if ( $member['warn_percent'] > 100 ) + { + $member['warn_percent'] = 100; + } + + if ( $member['warn_percent'] >= 81 ) + { + $member['warn_img'] = '<{WARN_5}>'; + } + else if ( $member['warn_percent'] >= 61 ) + { + $member['warn_img'] = '<{WARN_4}>'; + } + else if ( $member['warn_percent'] >= 41 ) + { + $member['warn_img'] = '<{WARN_3}>'; + } + else if ( $member['warn_percent'] >= 21 ) + { + $member['warn_img'] = '<{WARN_2}>'; + } + else if ( $member['warn_percent'] >= 1 ) + { + $member['warn_img'] = '<{WARN_1}>'; + } + else + { + $member['warn_img'] = '<{WARN_0}>'; + } + } + + if ( !isset($member['warn_percent']) OR $member['warn_percent'] < 1 ) + { + $member['warn_percent'] = 0; + } + + if ( $mod == 1 ) + { + $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_profile']->warn_level($member['id'], $member['warn_img'], $member['warn_percent']), $this->output ); + } + else + { + $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_profile']->warn_level_no_mod($member['id'], $member['warn_img'], $member['warn_percent']), $this->output ); + } + } + else + { + // Rating mode: + + if ( $mod == 1 ) + { + $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_profile']->warn_level_rating($member['id'], $member['warn_level'], $this->ipsclass->vars['warn_min'], $this->ipsclass->vars['warn_max']), $this->output ); + } + else + { + $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_profile']->warn_level_rating_no_mod($member['id'], $member['warn_level'], $this->ipsclass->vars['warn_min'], $this->ipsclass->vars['warn_max']), $this->output ); + } + } + } + } + } + + $this->page_title = $this->ipsclass->lang['page_title_pp']; + $this->nav = array( $this->ipsclass->lang['page_title_pp'] ); + } + + function get_month_name( $month=0 ) + { + $month = intval($month); + + return ( isset($this->ipsclass->lang['M_'.$month]) ) ? $this->ipsclass->lang['M_'.$month] : false; + } + +} + ?> \ No newline at end of file diff --git a/upload/sources/action_public/register.php b/upload/sources/action_public/register.php index bb49075a..659702ec 100644 --- a/upload/sources/action_public/register.php +++ b/upload/sources/action_public/register.php @@ -1,2897 +1,2764 @@ - $Date: 2006-11-09 15:32:37 -0600 (Thu, 09 Nov 2006) $ -| > $Revision: 722 $ -| > $Author: bfarber $ -+--------------------------------------------------------------------------- -| -| > Registration functions -| > Module written by Matt Mecham -| > Date started: 16th February 2002 -| -| > Module Version Number: 1.0.0 -| > Quality Checked: Wed 15 Sept. 2004 -+-------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_IPB' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - -class register { - - var $output = ""; - var $page_title = ""; - var $nav = array(); - var $html = ""; - var $email = ""; - var $modules = ""; - - function auto_run() - { - //----------------------------------------- - // Require the HTML and language modules - //----------------------------------------- - - $this->ipsclass->load_language('lang_register'); - $this->ipsclass->load_template('skin_register'); - - $this->base_url = $this->ipsclass->base_url; - $this->base_url_nosess = "{$this->ipsclass->vars['board_url']}/index.{$this->ipsclass->vars['php_ext']}"; - - //----------------------------------------- - // Fix up languages - //----------------------------------------- - - foreach( array( 'dname_text', 'reg_error_dname_len', 'reg_error_username_none', 'reg_error_no_name', 'user_name_text' ) as $k ) - { - $this->ipsclass->lang[ $k ] = sprintf( $this->ipsclass->lang[ $k ], $this->ipsclass->vars['max_user_name_length'] ); - } - - //----------------------------------------- - // Get the emailer module - //----------------------------------------- - - require ROOT_PATH."sources/classes/class_email.php"; - - $this->email = new emailer(); - $this->email->ipsclass =& $this->ipsclass; - $this->email->email_init(); - - if ( USE_MODULES == 1 ) - { - require ROOT_PATH."modules/ipb_member_sync.php"; - - $this->modules = new ipb_member_sync(); - $this->modules->ipsclass =& $this->ipsclass; - } - - //----------------------------------------- - // Board offline? - //----------------------------------------- - - if ($this->ipsclass->vars['board_offline'] == 1) - { - if ($this->ipsclass->member['g_access_offline'] != 1) - { - $this->ipsclass->vars['no_reg'] = 1; - } - } - - //----------------------------------------- - // What to do? - //----------------------------------------- - - switch($this->ipsclass->input['CODE']) - { - case '02': - $this->create_account(); - break; - - case '03': - $this->validate_user(); - break; - - case '05': - $this->show_manual_form(); - break; - - case '06': - $this->show_manual_form('lostpass'); - break; - - case 'lostpassform': - $this->show_manual_form('lostpass'); - break; - - case '07': - $this->show_manual_form('newemail'); - break; - - case '10': - $this->lost_password_start(); - break; - case '11': - $this->lost_password_end(); - break; - - case '12': - $this->coppa_perms_form(); - break; - - case 'coppa_two': - $this->coppa_two(); - break; - - case 'image': - $this->show_image(); - break; - - case 'reval': - $this->revalidate_one(); - break; - - case 'reval2': - $this->revalidate_two(); - break; - - case 'complete_login': - $this->complete_login_form(); - break; - case 'complete_login_do': - $this->complete_login_save(); - break; - - default: - if ($this->ipsclass->vars['use_coppa'] == 1 and $this->ipsclass->input['coppa_pass'] != 1) - { - $this->coppa_start(); - } - else - { - $this->show_reg_form(); - } - break; - } - - //----------------------------------------- - // If we have any HTML to print, do so... - //----------------------------------------- - - $this->ipsclass->print->add_output("$this->output"); - $this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, 'NAV' => $this->nav ) ); - } - - /*-------------------------------------------------------------------------*/ - // Save login information - /*-------------------------------------------------------------------------*/ - - function complete_login_save() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $mid = intval( $this->ipsclass->input['mid'] ); - $key = intval( $this->ipsclass->input['key'] ); - $in_email = strtolower( trim($this->ipsclass->input['EmailAddress']) ); - $banfilters = array(); - $form_errors = array(); - $members_display_name = trim( $this->ipsclass->input['members_display_name'] ); - $poss_session_id = ""; - - //----------------------------------------- - // Get DB row - //----------------------------------------- - - $reg = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'members_partial', 'where' => "partial_member_id={$mid} AND partial_date={$key}" ) ); - $tmp_member = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'members', 'where' => "id={$mid}" ) ); - - //----------------------------------------- - // Got it? - //----------------------------------------- - - if ( ! $reg['partial_id'] OR ! $tmp_member['id'] ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'data_incorrect' ) ); - } - - //----------------------------------------- - // Load ban filters - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'banfilters' ) ); - $this->ipsclass->DB->simple_exec(); - - while( $r = $this->ipsclass->DB->fetch_row() ) - { - $banfilters[ $r['ban_type'] ][] = $r['ban_content']; - } - - //----------------------------------------- - // Check - //----------------------------------------- - - /*if ( $this->ipsclass->vars['no_reg'] == 1 ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'reg_off' ) ); - }*/ - - //----------------------------------------- - // Custom profile field stuff - //----------------------------------------- - - require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); - $fields = new custom_fields( $this->ipsclass->DB ); - - $fields->cache_data = $this->ipsclass->cache['profilefields']; - - $fields->init_data(); - $fields->parse_to_save( 1 ); - - //----------------------------------------- - // Check... - //----------------------------------------- - - if ( count( $fields->error_fields['empty'] ) ) - { - $form_errors['general'][] = $this->ipsclass->lang['err_complete_form']; - } - - if ( count( $fields->error_fields['invalid'] ) ) - { - $form_errors['general'][] = $this->ipsclass->lang['err_invalid']; - } - - if ( count( $fields->error_fields['toobig'] ) ) - { - $form_errors['general'][] = $this->ipsclass->lang['err_cf_to_long']; - } - - //----------------------------------------- - // Remove 'sneaky' spaces - //----------------------------------------- - - if ( $this->ipsclass->vars['strip_space_chr'] ) - { - $members_display_name = str_replace( chr(160), ' ', $members_display_name ); - $members_display_name = str_replace( chr(173), ' ', $members_display_name ); - if ( $this->ipsclass->vars['gb_char_set'] == 'iso-8859-1' ) { - $members_display_name = str_replace( chr(240), ' ', $members_display_name ); - } - } - - //----------------------------------------- - // Test unicode name too - //----------------------------------------- - - $unicode_dname = preg_replace_callback('/&#([0-9]+);/si', create_function( '$matches', 'return chr($matches[1]);' ), $members_display_name); - - //----------------------------------------- - // Testing email addresses? - //----------------------------------------- - - if ( ! $reg['partial_email_ok'] ) - { - //----------------------------------------- - // Check the email address - //----------------------------------------- - - $in_email = $this->ipsclass->clean_email($in_email); - - //----------------------------------------- - // Test email address - //----------------------------------------- - - $this->ipsclass->input['EmailAddress_two'] = strtolower( trim($this->ipsclass->input['EmailAddress_two']) ); - - if ($this->ipsclass->input['EmailAddress_two'] != $in_email) - { - $form_errors['email'][] = $this->ipsclass->lang['reg_error_email_nm']; - } - - //----------------------------------------- - // Are they banned [EMAIL]? - //----------------------------------------- - - if ( is_array( $banfilters['email'] ) and count( $banfilters['email'] ) ) - { - foreach ( $banfilters['email'] as $email ) - { - $email = str_replace( "\*", '.*' , preg_quote($email, "/") ); - - if ( preg_match( "/^{$email}$/i", $in_email ) ) - { - $form_errors['email'][] = $this->ipsclass->lang['reg_error_email_taken']; - break; - } - } - } - - //----------------------------------------- - // Is this email addy taken? - //----------------------------------------- - - if ( $this->ipsclass->converge->converge_check_for_member_by_email( $in_email ) == TRUE ) - { - $form_errors['email'][] = $this->ipsclass->lang['reg_error_email_taken']; - } - } - - //----------------------------------------- - // More unicode.. - //----------------------------------------- - - $len_d = preg_replace("/&#([0-9]+);/", "-", $members_display_name ); - - //----------------------------------------- - // Test dname - //----------------------------------------- - - if ( $this->ipsclass->vars['auth_allow_dnames'] ) - { - if ( ! $members_display_name OR strlen($len_d) < 3 OR strlen($len_d) > 32 ) - { - $form_errors['dname'][] = $this->ipsclass->lang['reg_error_no_name']; - } - } - - //----------------------------------------- - // CHECK 1: Any errors (missing fields, etc)? - //----------------------------------------- - - if ( count( $form_errors ) ) - { - $this->complete_login_form( $form_errors ); - return; - } - - if ( $this->ipsclass->vars['auth_allow_dnames'] ) - { - //----------------------------------------- - // DNAME: Illegal characters - //----------------------------------------- - - if ( preg_match( "#[\[\];,\|]#", $members_display_name ) ) - { - $form_errors['dname'][] = $this->ipsclass->lang['reg_error_chars']; - } - - //----------------------------------------- - // DNAME: Is this name already taken? - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'general_get_by_display_name', array( 'members_display_name' => strtolower($members_display_name) ) ); - $this->ipsclass->DB->cache_exec_query(); - - $name_check = $this->ipsclass->DB->fetch_row(); - - if ( $name_check['id'] AND $name_check['id'] != $mid ) - { - $form_errors['dname'][] = $this->ipsclass->lang['reg_error_taken']; - } - - //----------------------------------------- - // DNAME: Special chars? - //----------------------------------------- - - if ( $unicode_dname != $members_display_name ) - { - $this->ipsclass->DB->cache_add_query( 'general_get_by_display_name', array( 'members_display_name' => $this->ipsclass->DB->add_slashes(strtolower($unicode_dname) ) )); - $this->ipsclass->DB->cache_exec_query(); - - $name_check = $this->ipsclass->DB->fetch_row(); - - if ( $name_check['id'] AND $name_check['id'] != $mid ) - { - $form_errors['dname'][] = $this->ipsclass->lang['reg_error_taken']; - } - } - - //----------------------------------------- - // DNAME: Banned? - //----------------------------------------- - - if ( is_array( $banfilters['name'] ) and count( $banfilters['name'] ) ) - { - foreach ( $banfilters['name'] as $n ) - { - $n = preg_replace( "/\*/", '.*' , preg_quote($n, "/") ); - - if ( $n AND preg_match( "/^{$n}$/i", $members_display_name ) ) - { - $form_errors['dname'][] = $this->ipsclass->lang['reg_error_taken']; - break; - } - } - } - - //----------------------------------------- - // DNAME: GUEST - //----------------------------------------- - - if (strtolower($members_display_name) == 'guest') - { - $form_errors['dname'][] = $this->ipsclass->lang['reg_error_taken']; - } - } - - //----------------------------------------- - // Are they banned [IP]? - //----------------------------------------- - - if ( is_array( $banfilters['ip'] ) and count( $banfilters['ip'] ) ) - { - foreach ($banfilters['ip'] as $ip) - { - $ip = str_replace( '\*', '.*', preg_quote($ip, "/") ); - - if ( preg_match( "/^{$ip}/", $this->ipsclass->input['IP_ADDRESS'] ) ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'you_are_banned', 'INIT' => 1 ) ); - } - } - } - - //----------------------------------------- - // CHECK 2: Any errors (duplicate names, etc)? - //----------------------------------------- - - if ( count( $form_errors ) ) - { - $this->complete_login_form( $form_errors ); - return; - } - - //----------------------------------------- - // Update: Members - //----------------------------------------- - - $members_display_name = $this->ipsclass->vars['auth_allow_dnames'] ? $members_display_name : $tmp_member['name']; - - if ( ! $reg['partial_email_ok'] ) - { - $this->ipsclass->DB->do_update( 'members', array( 'email' => $in_email, - 'members_display_name' => $members_display_name, - 'members_l_display_name' => strtolower( $members_display_name ) ), 'id='.$mid ); - - //----------------------------------------- - // Update: Converge - //----------------------------------------- - - $this->ipsclass->DB->do_update( 'members_converge', array( 'converge_email' => $in_email ), 'converge_id='.$mid ); - } - else - { - $this->ipsclass->DB->do_update( 'members', array( 'members_display_name' => $members_display_name, - 'members_l_display_name' => strtolower( $members_display_name ) ), 'id='.$mid ); - } - - //----------------------------------------- - // Delete: Partials row - //----------------------------------------- - - $this->ipsclass->DB->do_delete( 'members_partial', 'partial_member_id='.$mid ); - - //----------------------------------------- - // Update: Profile fields - //----------------------------------------- - - if ( is_array($fields->out_fields) and count($fields->out_fields) ) - { - $this->ipsclass->DB->do_update( 'pfields_content', $fields->out_fields, 'member_id='.$mid ); - } - - //----------------------------------------- - // Send out admin email - //----------------------------------------- - - if ( $this->ipsclass->vars['new_reg_notify'] ) - { - $date = $this->ipsclass->get_date( time(), 'LONG', 1 ); - - $this->email->get_template("admin_newuser"); - - $this->email->build_message( array( 'DATE' => $date, - 'MEMBER_NAME' => $members_display_name ) ); - - $this->email->subject = $this->ipsclass->lang['new_registration_email'] . $this->ipsclass->vars['board_name']; - $this->email->to = $this->ipsclass->vars['email_in']; - $this->email->send_mail(); - } - - //----------------------------------------- - // Set cookies - //----------------------------------------- - - $member = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', - 'from' => 'members', - 'where' => "id=$mid" - ) ); - - $this->ipsclass->my_setcookie("member_id" , $member['id'] , 1); - $this->ipsclass->my_setcookie("pass_hash" , $member['member_login_key'], 1); - - //----------------------------------------- - // Create / Update session - //----------------------------------------- - - if ( $cookie_id = $this->ipsclass->my_getcookie('session_id') ) - { - $poss_session_id = $this->ipsclass->my_getcookie('session_id'); - } - else if ( $this->ipsclass->input['s'] ) - { - $poss_session_id = $this->ipsclass->input['s']; - } - - //----------------------------------------- - // Clean... - //----------------------------------------- - - $poss_session_id = preg_replace("/([^a-zA-Z0-9])/", "", $poss_session_id); - - //----------------------------------------- - // Got a valid session ID... - //----------------------------------------- - - if ($poss_session_id) - { - $session_id = $poss_session_id; - - //----------------------------------------- - // Delete any old sessions with this users IP - // addy that doesn't match our session ID. - //----------------------------------------- - - $this->ipsclass->DB->do_delete( 'sessions', "ip_address='".$this->ipsclass->ip_address."' AND id != '$session_id'" ); - - $this->ipsclass->DB->do_shutdown_update( 'sessions', array ( 'member_name' => $member['members_display_name'], - 'member_id' => $member['id'], - 'running_time' => time(), - 'member_group' => $member['mgroup'], - 'login_type' => $this->ipsclass->input['Privacy'] ? 1 : 0 ), "id='".$session_id."'" ); - } - else - { - $session_id = md5( uniqid(microtime()) ); - - if( $this->ipsclass->vars['match_ipaddress'] ) - { - //----------------------------------------- - // Delete any old sessions with this users IP addy. - //----------------------------------------- - - $this->ipsclass->DB->do_delete( 'sessions', "ip_address='".$this->ipsclass->ip_address."'" ); - } - - $this->ipsclass->DB->do_shutdown_insert( 'sessions', array ( 'id' => $session_id, - 'member_name' => $member['members_display_name'], - 'member_id' => $member['id'], - 'running_time' => time(), - 'member_group' => $member['mgroup'], - 'ip_address' => $this->ipsclass->ip_address, - 'browser' => substr($this->ipsclass->clean_value($this->ipsclass->my_getenv('HTTP_USER_AGENT')), 0, 50), - 'login_type' => $this->ipsclass->input['Privacy'] ? 1 : 0 ) ); - } - - $this->ipsclass->member = $member; - $this->ipsclass->session_id = $session_id; - - //----------------------------------------- - // Update Stats - //----------------------------------------- - - $this->ipsclass->cache['stats']['last_mem_name'] = $this->ipsclass->member['members_display_name']; - $this->ipsclass->cache['stats']['last_mem_id'] = $this->ipsclass->member['id']; - $this->ipsclass->cache['stats']['mem_count'] += 1; - - $this->ipsclass->update_cache( array( 'name' => 'stats', 'array' => 1, 'deletefirst' => 0 ) ); - - //----------------------------------------- - // set cookie - //----------------------------------------- - - $this->ipsclass->my_setcookie("session_id", $this->ipsclass->session_id, -1); - - //----------------------------------------- - // Go to the board index - //----------------------------------------- - - $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['clogin_done'], 'act=idx' ); - } - - /*-------------------------------------------------------------------------*/ - // Show "check revalidate form" er.. form. thing. - /*-------------------------------------------------------------------------*/ - - function complete_login_form( $form_errors=array() ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $mid = intval( $this->ipsclass->input['mid'] ); - $key = intval( $this->ipsclass->input['key'] ); - $final_errors = array(); - - //----------------------------------------- - // Get DB row - //----------------------------------------- - - $reg = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', - 'from' => 'members_partial', - 'where' => "partial_member_id={$mid} AND partial_date={$key}" ) ); - - //----------------------------------------- - // Got it? - //----------------------------------------- - - if ( ! $reg['partial_id'] ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'data_incorrect' ) ); - } - - //----------------------------------------- - // Custom profile fields stuff - //----------------------------------------- - - $required_output = ""; - - require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); - $fields = new custom_fields( $this->ipsclass->DB ); - - $fields->cache_data = $this->ipsclass->cache['profilefields']; - - $fields->init_data(); - $fields->parse_to_register(); - - foreach( $fields->out_fields as $id => $data ) - { - if ( $fields->cache_data[ $id ]['pf_not_null'] == 1 ) - { - $ftype = 'required_output'; - } - else - { - continue; - } - - if ( $fields->cache_data[ $id ]['pf_type'] == 'drop' ) - { - $form_element = $this->ipsclass->compiled_templates['skin_register']->field_dropdown( 'field_'.$id, $data ); - } - else if ( $fields->cache_data[ $id ]['pf_type'] == 'area' ) - { - $data = $this->ipsclass->input['field_'.$id] ? $this->ipsclass->input['field_'.$id] : $data; - $form_element = $this->ipsclass->compiled_templates['skin_register']->field_textarea( 'field_'.$id, $data ); - } - else - { - $data = $this->ipsclass->input['field_'.$id] ? $this->ipsclass->input['field_'.$id] : $data; - $form_element = $this->ipsclass->compiled_templates['skin_register']->field_textinput( 'field_'.$id, $data ); - } - - ${$ftype} .= $this->ipsclass->compiled_templates['skin_register']->field_entry( $fields->field_names[ $id ], $fields->field_desc[ $id ], $form_element ); - } - - //----------------------------------------- - // ERROR CHECK - //----------------------------------------- - - if ( is_array( $form_errors['general'] ) AND count( $form_errors['general'] ) ) - { - $this->output .= $this->ipsclass->compiled_templates['skin_register']->errors( implode( "
    ", $form_errors['general'] ) ); - } - - //----------------------------------------- - // Other errors - //----------------------------------------- - - foreach( array( 'username', 'dname', 'password', 'email' ) as $thing ) - { - if ( is_array( $form_errors[ $thing ] ) AND count( $form_errors[ $thing ] ) ) - { - $final_errors[ $thing ] = implode( "
    ", $form_errors[ $thing ] ); - } - } - - //----------------------------------------- - // No display name? - //----------------------------------------- - - if ( ! $this->ipsclass->member['members_display_name'] ) - { - $this->ipsclass->member['members_display_name'] = $this->ipsclass->member['email']; - } - - //----------------------------------------- - // Show the form (email and display name) - //----------------------------------------- - - $this->output .= $this->ipsclass->compiled_templates['skin_register']->reg_complete_login( $mid, $key, $required_output, $final_errors, $reg ); - $this->page_title = $this->ipsclass->lang['clogin_title']; - $this->nav = array( $this->ipsclass->lang['clogin_title'] ); - } - - /*-------------------------------------------------------------------------*/ - // Show "check revalidate form" er.. form. thing. - /*-------------------------------------------------------------------------*/ - - function revalidate_one($errors="") - { - if ($errors != "") - { - $this->output .= $this->ipsclass->compiled_templates['skin_register']->errors( $this->ipsclass->lang[$errors] ); - } - - $name = $this->ipsclass->member['id'] == "" ? '' : - ( $this->ipsclass->vars['ipbli_usertype'] == 'username' ? $this->ipsclass->member['name'] : $this->ipsclass->member['email'] ); - - $this->output .= $this->ipsclass->compiled_templates['skin_register']->show_revalidate_form($name); - $this->page_title = $this->ipsclass->lang['rv_title']; - $this->nav = array( $this->ipsclass->lang['rv_title'] ); - } - - /*-------------------------------------------------------------------------*/ - // Complete revalidation - /*-------------------------------------------------------------------------*/ - - function revalidate_two() - { - //----------------------------------------- - // Check in the DB for entered member name - //----------------------------------------- - - if ( $_POST['username'] == "" ) - { - $this->revalidate_one('err_no_username'); - return; - } - - $username = $this->ipsclass->input['username']; - - if ( $this->ipsclass->vars['ipbli_usertype'] == 'username' ) - { - $this->ipsclass->DB->cache_add_query( 'login_getmember', array( 'username' => $username ) ); - $this->ipsclass->DB->cache_exec_query(); - - $member = $this->ipsclass->DB->fetch_row(); - - //----------------------------------------- - // Got a username? - //----------------------------------------- - - if ( ! $member['id'] ) - { - $this->revalidate_one('err_no_username'); - return; - } - - $this->ipsclass->converge->converge_load_member( $member['email'] ); - - if ( ! $this->ipsclass->converge->member['converge_id'] ) - { - $this->revalidate_one('err_no_username'); - return; - } - } - - //----------------------------------------- - // EMAIL LOG IN - //----------------------------------------- - - else - { - $email = $username; - - $this->ipsclass->converge->converge_load_member( $email ); - - if ( $this->ipsclass->converge->member['converge_id'] ) - { - $this->ipsclass->DB->build_query( array( - 'select' => 'm.*', - 'from' => array( 'members' => 'm' ), - 'where' => "email='".strtolower($username)."'", - 'add_join' => array( 0 => array( 'select' => 'g.*', - 'from' => array( 'groups' => 'g' ), - 'where' => 'g.g_id=m.mgroup', - 'type' => 'inner' - ) - ) - ) ); - - $this->ipsclass->DB->exec_query(); - - $member = $this->ipsclass->DB->fetch_row(); - - if ( ! $member['id'] ) - { - $this->revalidate_one('err_no_username'); - return; - } - } - else - { - $this->revalidate_one('err_no_username'); - return; - } - } - - //----------------------------------------- - // Check in the DB for any validations - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'validating', 'where' => "member_id=".intval($member['id']) ) ); - $this->ipsclass->DB->simple_exec(); - - if ( ! $val = $this->ipsclass->DB->fetch_row() ) - { - $this->revalidate_one('err_no_validations'); - return; - } - - //----------------------------------------- - // Which type is it then? - //----------------------------------------- - - if ( $val['lost_pass'] == 1 ) - { - $this->email->get_template("lost_pass"); - - $this->email->build_message( array( - 'NAME' => $member['members_display_name'], - 'THE_LINK' => $this->base_url_nosess."?act=Reg&CODE=lostpassform&uid=".$member['id']."&aid=".$val['vid'], - 'MAN_LINK' => $this->base_url_nosess."?act=Reg&CODE=lostpassform", - 'EMAIL' => $member['email'], - 'ID' => $member['id'], - 'CODE' => $val['vid'], - 'IP_ADDRESS' => $this->ipsclass->input['IP_ADDRESS'], - ) - ); - - $this->email->subject = $this->ipsclass->lang['lp_subject'].' '.$this->ipsclass->vars['board_name']; - $this->email->to = $member['email']; - - $this->email->send_mail(); - } - else if ( $val['new_reg'] == 1 ) - { - $this->email->get_template("reg_validate"); - - $this->email->build_message( array( - 'THE_LINK' => $this->base_url_nosess."?act=Reg&CODE=03&uid=".$member['id']."&aid=".$val['vid'], - 'NAME' => $member['members_display_name'], - 'MAN_LINK' => $this->base_url_nosess."?act=Reg&CODE=05", - 'EMAIL' => $member['email'], - 'ID' => $member['id'], - 'CODE' => $val['vid'], - ) - ); - - $this->email->subject = $this->ipsclass->lang['email_reg_subj']." ".$this->ipsclass->vars['board_name']; - $this->email->to = $member['email']; - - $this->email->send_mail(); - } - else if ( $val['email_chg'] == 1 ) - { - $this->email->get_template("newemail"); - - $this->email->build_message( array( - 'NAME' => $member['members_display_name'], - 'THE_LINK' => $this->base_url_nosess."?act=Reg&CODE=03&type=newemail&uid=".$member['id']."&aid=".$val['vid'], - 'ID' => $member['id'], - 'MAN_LINK' => $this->base_url_nosess."?act=Reg&CODE=07", - 'CODE' => $val['vid'], - ) - ); - - $this->email->subject = $this->ipsclass->lang['ne_subject'].' '.$this->ipsclass->vars['board_name']; - $this->email->to = $member['email']; - - $this->email->send_mail(); - } - else - { - $this->revalidate_one('err_no_validations'); - return; - } - - $this->output .= $this->ipsclass->compiled_templates['skin_register']->show_revalidated(); - - $this->page_title = $this->ipsclass->lang['rv_title']; - $this->nav = array( $this->ipsclass->lang['rv_title'] ); - } - - - /*-------------------------------------------------------------------------*/ - // Coppa Start - /*-------------------------------------------------------------------------*/ - - function coppa_perms_form() - { - echo($this->ipsclass->compiled_templates['skin_register']->coppa_form()); - exit(); - } - - /*-------------------------------------------------------------------------*/ - // Coppa form - /*-------------------------------------------------------------------------*/ - - function coppa_start() - { - $coppa_date = date( 'j-F y', mktime(0,0,0,date("m"),date("d"),date("Y")-13) ); - - $this->ipsclass->lang['coppa_form_text'] = str_replace( "<#FORM_LINK#>", "{$this->ipsclass->lang['coppa_link_form']}", $this->ipsclass->lang['coppa_form_text']); - - $this->output .= $this->ipsclass->compiled_templates['skin_register']->coppa_start($coppa_date); - - $this->page_title = $this->ipsclass->lang['coppa_title']; - - $this->nav = array( $this->ipsclass->lang['coppa_title'] ); - } - - /*-------------------------------------------------------------------------*/ - // Coppa print - /*-------------------------------------------------------------------------*/ - - function coppa_two() - { - $this->ipsclass->lang['coppa_form_text'] = str_replace( "<#FORM_LINK#>", "{$this->ipsclass->lang['coppa_link_form']}", $this->ipsclass->lang['coppa_form_text']); - - $this->output .= $this->ipsclass->compiled_templates['skin_register']->coppa_two(); - - $this->page_title = $this->ipsclass->lang['coppa_title']; - - $this->nav = array( $this->ipsclass->lang['coppa_title'] ); - } - - /*-------------------------------------------------------------------------*/ - // lost_password_start - /*-------------------------------------------------------------------------*/ - - function lost_password_start($errors="") - { - //----------------------------------------- - // Do we have another URL that one needs - // to visit to reset their password? - //----------------------------------------- - - $this->login_method = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_enabled=1' ) ); - - if ( $this->login_method['login_maintain_url'] ) - { - $this->ipsclass->boink_it( $this->login_method['login_maintain_url'] ); - exit(); - } - - if ($this->ipsclass->vars['bot_antispam']) - { - //----------------------------------------- - // Sort out the security code - //----------------------------------------- - - $r_date = time() - (60*60*6); - - //----------------------------------------- - // Remove old reg requests from the DB - //----------------------------------------- - - $this->ipsclass->DB->do_delete( 'reg_antispam', "ctime < '$r_date'" ); - - //----------------------------------------- - // Set a new ID for this reg request... - //----------------------------------------- - - $regid = md5( uniqid(microtime()) ); - - if( $this->ipsclass->vars['bot_antispam'] == 'gd' ) - { - //----------------------------------------- - // Get 6 random chars - //----------------------------------------- - - $reg_code = strtoupper( substr( md5($regid), 0, 6 ) ); - } - else - { - //----------------------------------------- - // Set a new 6 character numerical string - //----------------------------------------- - - mt_srand ((double) microtime() * 1000000); - - $reg_code = mt_rand(100000,999999); - } - - //----------------------------------------- - // Insert into the DB - //----------------------------------------- - - $this->ipsclass->DB->do_insert( 'reg_antispam', array ( - 'regid' => $regid, - 'regcode' => $reg_code, - 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], - 'ctime' => time(), - ) ); - } - - $this->page_title = $this->ipsclass->lang['lost_pass_form']; - - $this->nav = array( $this->ipsclass->lang['lost_pass_form'] ); - - if ($errors != "") - { - $this->output .= $this->ipsclass->compiled_templates['skin_register']->errors( $this->ipsclass->lang[$errors]); - } - - $this->output .= $this->ipsclass->compiled_templates['skin_register']->lost_pass_form($regid); - - if ($this->ipsclass->vars['bot_antispam'] == 'gd') - { - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_register']->bot_antispam_gd( $regid ), $this->output ); - } - else if ($this->ipsclass->vars['bot_antispam'] == 'gif') - { - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_register']->bot_antispam( $regid ), $this->output ); - } - } - - /*-------------------------------------------------------------------------*/ - // LOST PASSWORD: SEND - /*-------------------------------------------------------------------------*/ - - function lost_password_end() - { - if ($this->ipsclass->vars['bot_antispam']) - { - //----------------------------------------- - // Security code stuff - //----------------------------------------- - - if ($this->ipsclass->input['regid'] == "") - { - $this->lost_password_start('err_reg_code'); - return; - } - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'reg_antispam', - 'where' => "regid='".trim($this->ipsclass->txt_alphanumerical_clean($this->ipsclass->input['regid']))."'" - ) ); - - $this->ipsclass->DB->simple_exec(); - - if ( ! $row = $this->ipsclass->DB->fetch_row() ) - { - $this->show_reg_form('err_reg_code'); - return; - } - - if ( trim( $this->ipsclass->txt_alphanumerical_clean($this->ipsclass->input['reg_code']) ) != $row['regcode'] ) - { - $this->lost_password_start('err_reg_code'); - return; - } - } - - //----------------------------------------- - // Back to the usual programming! :o - //----------------------------------------- - - if ($_POST['member_name'] == "" AND $_POST['email_addy'] == "") - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_username' ) ); - } - - //----------------------------------------- - // Check for input and it's in a valid format. - //----------------------------------------- - - $member_name = trim(strtolower($this->ipsclass->input['member_name'])); - $email_addy = trim(strtolower($this->ipsclass->input['email_addy'])); - - if ($member_name == "" AND $email_addy == "" ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_username' ) ); - } - - //----------------------------------------- - // Attempt to get the user details from the DB - //----------------------------------------- - - if ( $this->ipsclass->vars['ipbli_usertype'] == 'username' ) - { - if( $member_name ) - { - $this->ipsclass->DB->simple_construct( array( 'select' => 'members_display_name, name, id, email, mgroup', 'from' => 'members', 'where' => "members_l_username='{$member_name}'" ) ); - $this->ipsclass->DB->simple_exec(); - } - else if( $email_addy ) - { - $this->ipsclass->DB->simple_construct( array( 'select' => 'members_display_name, name, id, email, mgroup', 'from' => 'members', 'where' => "email='{$email_addy}'" ) ); - $this->ipsclass->DB->simple_exec(); - } - } - else - { - // We don't use the 'email_addy' input if usertype is email - $email_addy = ""; - - $this->ipsclass->DB->simple_construct( array( 'select' => 'members_display_name, name, id, email, mgroup', 'from' => 'members', 'where' => "email='{$member_name}'" ) ); - $this->ipsclass->DB->simple_exec(); - } - - if ( ! $this->ipsclass->DB->get_num_rows() ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_such_user' ) ); - } - else - { - $member = $this->ipsclass->DB->fetch_row(); - - //----------------------------------------- - // Is there a validation key? If so, we'd better not touch it - //----------------------------------------- - - if ($member['id'] == "") - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_such_user' ) ); - } - - $validate_key = md5( $this->ipsclass->make_password() . uniqid( mt_rand(), TRUE ) ); - - //----------------------------------------- - // Get rid of old entries for this member - //----------------------------------------- - - $this->ipsclass->DB->do_delete( 'validating', "member_id={$member['id']} AND lost_pass=1" ); - - //----------------------------------------- - // Update the DB for this member. - //----------------------------------------- - - $db_str = array( - 'vid' => $validate_key, - 'member_id' => $member['id'], - #'real_group' => $member['mgroup'], - 'temp_group' => $member['mgroup'], - 'entry_date' => time(), - 'coppa_user' => 0, - 'lost_pass' => 1, - 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], - ); - - // Are they already in the validating group? - - if( $member['mgroup'] != $this->ipsclass->vars['auth_group'] ) - { - $db_str['real_group'] = $member['mgroup']; - } - - $this->ipsclass->DB->do_insert( 'validating', $db_str ); - - //----------------------------------------- - // Send out the email. - //----------------------------------------- - - $this->email->get_template("lost_pass"); - - $this->email->build_message( array( - 'NAME' => $member['members_display_name'], - 'THE_LINK' => $this->base_url_nosess."?act=Reg&CODE=lostpassform&uid=".$member['id']."&aid=".$validate_key, - 'MAN_LINK' => $this->base_url_nosess."?act=Reg&CODE=lostpassform", - 'EMAIL' => $member['email'], - 'ID' => $member['id'], - 'CODE' => $validate_key, - 'IP_ADDRESS' => $this->ipsclass->input['IP_ADDRESS'], - ) - ); - - $this->email->subject = $this->ipsclass->lang['lp_subject'].' '.$this->ipsclass->vars['board_name']; - $this->email->to = $member['email']; - - $this->email->send_mail(); - - $this->output = $this->ipsclass->compiled_templates['skin_register']->show_lostpasswait( $member ); - } - - $this->page_title = $this->ipsclass->lang['lost_pass_form']; - } - - /*-------------------------------------------------------------------------*/ - // show_reg_form - /*-------------------------------------------------------------------------*/ - - function show_reg_form($form_errors = array()) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $final_errors = array(); - - if ( $this->ipsclass->vars['no_reg'] == 1 ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'reg_off' ) ); - } - - $coppa = (isset($this->ipsclass->input['coppa_user']) AND $this->ipsclass->input['coppa_user'] == 1) ? 1 : 0; - - $this->ipsclass->vars['username_errormsg'] = str_replace( '{chars}', $this->ipsclass->vars['username_characters'], $this->ipsclass->vars['username_errormsg'] ); - - //----------------------------------------- - // Read T&Cs yet? - //----------------------------------------- - - if ( !isset($this->ipsclass->input['termsread']) OR !$this->ipsclass->input['termsread'] ) - { - if ( $this->ipsclass->member['id'] ) - { - //----------------------------------------- - // Log member out - //----------------------------------------- - - require_once( ROOT_PATH.'sources/action_public/login.php' ); - $login = new login(); - $login->ipsclass =& $this->ipsclass; - $login->do_log_out( 0 ); - } - - //----------------------------------------- - // Continue - //----------------------------------------- - - $cache = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'conf_settings', 'where' => "conf_key='reg_rules'" ) ); - - $text = $cache['conf_value'] ? $cache['conf_value'] : $cache['conf_default']; - - $this->page_title = $this->ipsclass->lang['registration_form']; - $this->nav = array( $this->ipsclass->lang['registration_form'] ); - - $this->output .= $this->ipsclass->compiled_templates['skin_register']->show_terms( $this->ipsclass->my_nl2br($text), $coppa ); - return; - } - else - { - //----------------------------------------- - // Did we agree to the t&c? - //----------------------------------------- - - if ( ! $this->ipsclass->input['agree_to_terms'] ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'reg_no_agree', 'EXTRA' => $this->ipsclass->base_url ) ); - } - } - - //----------------------------------------- - // Do we have another URL that one needs - // to visit to register? - //----------------------------------------- - - $this->login_method = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_enabled=1' ) ); - - if ( $this->login_method['login_register_url'] ) - { - $this->ipsclass->boink_it( $this->login_method['login_register_url'] ); - exit(); - } - - //----------------------------------------- - // Continue... - //----------------------------------------- - - if ( $this->ipsclass->vars['reg_auth_type'] ) - { - if ( $this->ipsclass->vars['reg_auth_type'] == 'admin_user' OR $this->ipsclass->vars['reg_auth_type'] == 'user' ) - { - $this->ipsclass->lang['std_text'] .= "
    " . $this->ipsclass->lang['email_validate_text']; - } - - //----------------------------------------- - // User then admin? - //----------------------------------------- - - if ( $this->ipsclass->vars['reg_auth_type'] == 'admin_user' ) - { - $this->ipsclass->lang['std_text'] .= "
    " . $this->ipsclass->lang['user_admin_validation']; - } - - if ( $this->ipsclass->vars['reg_auth_type'] == 'admin' ) - { - $this->ipsclass->lang['std_text'] .= "
    " . $this->ipsclass->lang['just_admin_validation']; - } - } - - //----------------------------------------- - // Clean out anti-spam stuffy - //----------------------------------------- - - if ($this->ipsclass->vars['bot_antispam']) - { - // Set a new ID for this reg request... - - $regid = md5( uniqid(microtime()) ); - - if( $this->ipsclass->vars['bot_antispam'] == 'gd' ) - { - //----------------------------------------- - // Get 6 random chars - //----------------------------------------- - - $reg_code = strtoupper( substr( md5($regid), 0, 6 ) ); - } - else - { - //----------------------------------------- - // Set a new 6 character numerical string - //----------------------------------------- - - mt_srand ((double) microtime() * 1000000); - - $reg_code = mt_rand(100000,999999); - } - - // Insert into the DB - - $this->ipsclass->DB->do_insert( 'reg_antispam', array ( - 'regid' => $regid, - 'regcode' => $reg_code, - 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], - 'ctime' => time(), - ) ); - } - - //----------------------------------------- - // Custom profile fields stuff - //----------------------------------------- - - $required_output = ""; - $optional_output = ""; - - require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); - $fields = new custom_fields( $this->ipsclass->DB ); - - $fields->cache_data = $this->ipsclass->cache['profilefields']; - - $fields->init_data(); - $fields->parse_to_register(); - - foreach( $fields->out_fields as $id => $data ) - { - $error = ""; - - if ( $fields->cache_data[ $id ]['pf_not_null'] == 1 ) - { - $ftype = 'required_output'; - } - else - { - $ftype = 'optional_output'; - } - - if( isset($form_errors['cfield_'.$id]) AND count( $form_errors['cfield_'.$id] ) ) - { - $error = implode( "
    ", $form_errors['cfield_'.$id] ); - } - - if ( $fields->cache_data[ $id ]['pf_type'] == 'drop' ) - { - $form_element = $this->ipsclass->compiled_templates['skin_register']->field_dropdown( 'field_'.$id, $data, $error ); - } - else if ( $fields->cache_data[ $id ]['pf_type'] == 'area' ) - { - $data = $this->ipsclass->input['field_'.$id] ? $this->ipsclass->input['field_'.$id] : $data; - $form_element = $this->ipsclass->compiled_templates['skin_register']->field_textarea( 'field_'.$id, $data, $error ); - } - else - { - $data = isset($this->ipsclass->input['field_'.$id]) ? $this->ipsclass->input['field_'.$id] : $data; - $form_element = $this->ipsclass->compiled_templates['skin_register']->field_textinput( 'field_'.$id, $data, $error ); - } - - ${$ftype} .= $this->ipsclass->compiled_templates['skin_register']->field_entry( $fields->field_names[ $id ], $fields->field_desc[ $id ], $form_element, $id, $error ); - } - - $this->page_title = $this->ipsclass->lang['registration_form']; - $this->nav = array( $this->ipsclass->lang['registration_form'] ); - - //----------------------------------------- - // ERROR CHECK - //----------------------------------------- - - if ( isset($form_errors['general']) AND is_array( $form_errors['general'] ) AND count( $form_errors['general'] ) ) - { - $this->output .= $this->ipsclass->compiled_templates['skin_register']->errors( implode( "
    ", $form_errors['general'] ) ); - } - - //----------------------------------------- - // Other errors - //----------------------------------------- - - $final_errors = array( 'username' => NULL, 'dname' => NULL, 'password' => NULL, 'email' => NULL ); - - foreach( array( 'username', 'dname', 'password', 'email' ) as $thing ) - { - if ( isset($form_errors[ $thing ]) AND is_array( $form_errors[ $thing ] ) AND count( $form_errors[ $thing ] ) ) - { - $final_errors[ $thing ] = implode( "
    ", $form_errors[ $thing ] ); - } - } - - $this->ipsclass->input['UserName'] = isset($this->ipsclass->input['UserName']) ? $this->ipsclass->input['UserName'] : ''; - $this->ipsclass->input['PassWord'] = isset($this->ipsclass->input['PassWord']) ? $this->ipsclass->input['PassWord'] : ''; - $this->ipsclass->input['EmailAddress'] = isset($this->ipsclass->input['EmailAddress']) ? $this->ipsclass->input['EmailAddress'] : ''; - $this->ipsclass->input['EmailAddress_two'] = isset($this->ipsclass->input['EmailAddress_two']) ? $this->ipsclass->input['EmailAddress_two'] : ''; - $this->ipsclass->input['PassWord_Check'] = isset($this->ipsclass->input['PassWord_Check']) ? $this->ipsclass->input['PassWord_Check'] : ''; - $this->ipsclass->input['members_display_name'] = isset($this->ipsclass->input['members_display_name']) ? $this->ipsclass->input['members_display_name'] : ''; - $this->ipsclass->input['time_offset'] = isset($this->ipsclass->input['time_offset']) ? $this->ipsclass->input['time_offset'] : ''; - $this->ipsclass->input['allow_member_mail'] = isset($this->ipsclass->input['allow_member_mail']) ? $this->ipsclass->input['allow_member_mail'] : ''; - $this->ipsclass->input['dst'] = isset($this->ipsclass->input['dst']) ? $this->ipsclass->input['dst'] : ''; - - $this->output .= $this->ipsclass->compiled_templates['skin_register']->ShowForm( array( 'TEXT' => $this->ipsclass->lang['std_text'], 'coppa_user' => $coppa ), $final_errors ); - - //----------------------------------------- - // Replace elements - //----------------------------------------- - - if ($this->ipsclass->vars['bot_antispam'] == 'gd') - { - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_register']->bot_antispam_gd( $regid ), $this->output ); - } - else if ($this->ipsclass->vars['bot_antispam'] == 'gif') - { - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_register']->bot_antispam( $regid ), $this->output ); - } - - if ($required_output != "") - { - $this->output = str_replace( "", "\n".$required_output, $this->output ); - } - - if ($optional_output != "") - { - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_register']->optional_title()."\n".$optional_output, $this->output ); - } - - //----------------------------------------- - // Time zone... - //----------------------------------------- - - $this->ipsclass->load_language('lang_ucp'); - - $offset = ( $this->ipsclass->input['time_offset'] != "" ) ? $this->ipsclass->input['time_offset'] : $this->ipsclass->vars['time_offset']; - - $time_select = ""; - - $this->output = str_replace( "", "\n".$time_select, $this->output ); - - //----------------------------------------- - // Boxes checked? - //----------------------------------------- - - $admin_checked = 'checked="checked"'; - - if ( $this->ipsclass->input['CODE'] == '02' ) - { - //----------------------------------------- - // Form submitted... - //----------------------------------------- - - if ( ! $this->ipsclass->input['allow_admin_mail'] ) - { - $admin_checked = ''; - } - } - - $member_checked = $this->ipsclass->input['allow_member_mail'] ? 'checked="checked"' : ''; - $dst_checked = $this->ipsclass->input['dst'] ? 'checked="checked"' : ''; - - $this->output = str_replace( "" , $admin_checked , $this->output ); - $this->output = str_replace( "", $member_checked, $this->output ); - $this->output = str_replace( "" , $dst_checked , $this->output ); - - //----------------------------------------- - // Subscribe on register? - //----------------------------------------- - - $all_currency = array(); - $def_currency = ""; - $subs = array(); - $subs_output = ""; - $desc_output = ""; - - if ( $this->ipsclass->vars['subsm_show_reg'] ) - { - $this->ipsclass->load_language('lang_subscriptions'); - - //----------------------------------------- - // Get currency buns! - // Ok, we did that joke in another module and it - // wasn't funny then - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'subscription_currency' ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $c = $this->ipsclass->DB->fetch_row() ) - { - $all_currency[ $c['subcurrency_code'] ] = $c; - - if ( $c['subcurrency_default'] ) - { - $def_currency = $c; - } - } - - //----------------------------------------- - // Get subscription packages - //----------------------------------------- - - $sub_output = $this->ipsclass->compiled_templates['skin_register']->subsm_start( $def_currency['subcurrency_code'] ); - - //----------------------------------------- - // Enforcing? - //----------------------------------------- - - if ( ! $this->ipsclass->vars['subsm_enforce'] ) - { - $sub_output .= $this->ipsclass->compiled_templates['skin_register']->subsm_row( '0', $this->ipsclass->lang['subsm_none'], '0.00', $this->ipsclass->lang['subsm_na'] ); - } - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'subscriptions', 'order' => 'sub_cost' ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $row = $this->ipsclass->DB->fetch_row() ) - { - $duration = $row['sub_length']; - - if ( $duration > 1 ) - { - $duration .= ' '.$this->ipsclass->lang[ 'timep_'.$row['sub_unit'] ]; - } - else - { - $duration .= ' '.$this->ipsclass->lang[ 'time_'.$row['sub_unit'] ]; - } - - $duration = ($row['sub_unit'] == 'x') ? $this->ipsclass->lang['no_expire'] : $duration; - - $sub_output .= $this->ipsclass->compiled_templates['skin_register']->subsm_row( $row['sub_id'], - $row['sub_title'], - sprintf( "%.2f", $row['sub_cost'] * $def_currency['subcurrency_exchange'] ), - $duration - ); - $desc_output .= "\n subdesc[{$row['sub_id']}] = '".str_replace( "'", "\\'", str_replace( "\n", '\n',$row['sub_desc'] ) )."';"; - } - - $sub_output .= $this->ipsclass->compiled_templates['skin_register']->subsm_end(); - - //----------------------------------------- - // Parse 'n show - //----------------------------------------- - - if ( $sub_output ) - { - $this->output = str_replace( '', $sub_output , $this->output ); - $this->output = str_replace( '', str_replace( "\r", "", $desc_output ), $this->output ); - } - - } - - if ( USE_MODULES == 1 ) - { - $this->modules->register_class($this); - $this->modules->on_register_form(); - } - } - - /*-------------------------------------------------------------------------*/ - // create_account - /*-------------------------------------------------------------------------*/ - - function create_account() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - if( $this->ipsclass->vars['ipbli_usertype'] == 'email' ) - { - $this->ipsclass->input['UserName'] = $this->ipsclass->input['members_display_name']; - } - - $form_errors = array(); - $coppa = ($this->ipsclass->input['coppa_user'] == 1) ? 1 : 0; - $in_username = str_replace( '|', '|' , $this->ipsclass->input['UserName'] ); - $in_password = trim($this->ipsclass->input['PassWord']); - $in_email = strtolower( trim($this->ipsclass->input['EmailAddress']) ); - $banfilters = array(); - $members_display_name = trim( $this->ipsclass->input['members_display_name'] ); - - //----------------------------------------- - // Load ban filters - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'banfilters' ) ); - $this->ipsclass->DB->simple_exec(); - - while( $r = $this->ipsclass->DB->fetch_row() ) - { - $banfilters[ $r['ban_type'] ][] = $r['ban_content']; - } - - //----------------------------------------- - // Check - //----------------------------------------- - - if ($_POST['act'] == "") - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'complete_form' ) ); - } - - if ($this->ipsclass->vars['no_reg'] == 1) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'reg_off' ) ); - } - - //----------------------------------------- - // Custom profile field stuff - //----------------------------------------- - - require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); - $fields = new custom_fields( $this->ipsclass->DB ); - - $fields->cache_data = $this->ipsclass->cache['profilefields']; - - $fields->init_data(); - $fields->parse_to_save( 1 ); - - //----------------------------------------- - // Check... - //----------------------------------------- - - if ( count( $fields->error_fields['empty'] ) ) - { - foreach( $fields->error_fields['empty'] as $cfield ) - { - $form_errors['cfield_'.$cfield['pf_id']][] = $this->ipsclass->lang['err_complete_form']; - } - } - - if ( count( $fields->error_fields['invalid'] ) ) - { - foreach( $fields->error_fields['invalid'] as $cfield ) - { - $form_errors['cfield_'.$cfield['pf_id']][] = $this->ipsclass->lang['err_invalid']; - } - } - - if ( count( $fields->error_fields['toobig'] ) ) - { - foreach( $fields->error_fields['toobig'] as $cfield ) - { - $form_errors['cfield_'.$cfield['pf_id']][] = $this->ipsclass->lang['err_cf_to_long']; - } - } - - //----------------------------------------- - // Remove multiple spaces in the username - //----------------------------------------- - - $in_username = preg_replace( "/\s{2,}/", " ", $in_username ); - - //----------------------------------------- - // Remove 'sneaky' spaces - //----------------------------------------- - - if ( $this->ipsclass->vars['strip_space_chr'] ) - { - // use hexdec to convert between '0xAD' and chr - $in_username = str_replace( chr(160), ' ', $in_username ); - $in_username = str_replace( chr(173), ' ', $in_username ); - $members_display_name = str_replace( chr(160), ' ', $members_display_name ); - $members_display_name = str_replace( chr(173), ' ', $members_display_name ); - if ( $this->ipsclass->vars['gb_char_set'] == 'iso-8859-1' ) - { - $in_username = str_replace( chr(240), ' ', $in_username ); - $members_display_name = str_replace( chr(240), ' ', $members_display_name ); - } - } - - //----------------------------------------- - // Trim up.. - //----------------------------------------- - - $in_username = trim($in_username); - - //----------------------------------------- - // Test unicode name too - //----------------------------------------- - - $unicode_name = preg_replace_callback('/&#([0-9]+);/si', create_function( '$matches', 'return chr($matches[1]);' ), $in_username); - $unicode_name = str_replace( "'" , ''', $unicode_name ); - $unicode_name = str_replace( "\\", '\', $unicode_name ); - - $unicode_dname = preg_replace_callback('/&#([0-9]+);/si', create_function( '$matches', 'return chr($matches[1]);' ), $members_display_name); - $unicode_dname = str_replace( "'" , ''', $unicode_dname ); - $unicode_dname = str_replace( "\\", '\', $unicode_dname ); - - //----------------------------------------- - // Check the email address - //----------------------------------------- - - $in_email = $this->ipsclass->clean_email($in_email); - - if ( ! $in_email OR strlen($in_email) < 6 ) - { - $form_errors['email'][] = $this->ipsclass->lang['err_invalid_email']; - } - - //----------------------------------------- - // Test email address - //----------------------------------------- - - $this->ipsclass->input['EmailAddress_two'] = strtolower( trim($this->ipsclass->input['EmailAddress_two']) ); - $this->ipsclass->input['EmailAddress'] = strtolower( trim($this->ipsclass->input['EmailAddress']) ); - - if( preg_match( "#[\;\#\n\r\*\'\"<>&\%\!\(\)\{\}\[\]\?\\/\s]#", $this->ipsclass->input['EmailAddress_two']) ) - { - $form_errors['email'][] = $this->ipsclass->lang['reg_error_email_invalid']; - } - else - { - if ( $in_email AND $this->ipsclass->input['EmailAddress_two'] != $in_email) - { - $form_errors['email'][] = $this->ipsclass->lang['reg_error_email_nm']; - } - } - - //----------------------------------------- - // More unicode.. - //----------------------------------------- - - $len_u = preg_replace("/&#([0-9]+);/", "-", $in_username ); - $len_p = preg_replace("/&#([0-9]+);/", "-", $in_password ); - $len_d = preg_replace("/&#([0-9]+);/", "-", $members_display_name ); - - //----------------------------------------- - // Test dname - //----------------------------------------- - - if ( $this->ipsclass->vars['auth_allow_dnames'] ) - { - if ( ! $members_display_name OR strlen($len_d) < 3 OR strlen($len_d) > $this->ipsclass->vars['max_user_name_length'] ) - { - $form_errors['dname'][] = $this->ipsclass->lang['reg_error_no_name']; - } - } - - if( $this->ipsclass->vars['username_characters'] ) - { - $check_against = preg_quote( $this->ipsclass->vars['username_characters'], "/" ); - - if( !preg_match( "/^[".$check_against."]+$/i", $_POST['UserName'] ) && $this->ipsclass->vars['ipbli_usertype'] == 'username' ) - { - $form_errors['username'][] = str_replace( '{chars}', $this->ipsclass->vars['username_characters'], $this->ipsclass->vars['username_errormsg'] ); - } - - if( !preg_match( "/^[".$check_against."]+$/i", $_POST['members_display_name'] ) && $this->ipsclass->vars['auth_allow_dnames'] ) - { - $form_errors['dname'][] = str_replace( '{chars}', $this->ipsclass->vars['username_characters'], $this->ipsclass->vars['username_errormsg'] ); - } - } - - //----------------------------------------- - // Check for errors in the input. - //----------------------------------------- - - if ( ! $in_username OR strlen($len_u) < 3 OR strlen($len_u) > $this->ipsclass->vars['max_user_name_length'] ) - { - $form_errors['username'][] = $this->ipsclass->lang['reg_error_username_none']; - } - - if (! $in_password OR strlen($len_p) < 3 OR strlen($len_p) > $this->ipsclass->vars['max_user_name_length'] ) - { - $form_errors['password'][] = $this->ipsclass->lang['reg_error_no_pass']; - } - - if ($this->ipsclass->input['PassWord_Check'] != $in_password) - { - $form_errors['password'][] = $this->ipsclass->lang['reg_error_pass_nm']; - } - - //----------------------------------------- - // CHECK 1: Any errors (missing fields, etc)? - //----------------------------------------- - - if ( count( $form_errors ) ) - { - $this->show_reg_form( $form_errors ); - return; - } - - //----------------------------------------- - // USERNAME: Is this name already taken? - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'login_getmember', array( 'username' => strtolower($in_username) ) ); - $this->ipsclass->DB->cache_exec_query(); - - $name_check = $this->ipsclass->DB->fetch_row(); - - if ( $name_check['id'] ) - { - $form_errors['username'][] = $this->ipsclass->lang['reg_error_username_taken']; - } - - //----------------------------------------- - // USERNAME: Is this name already taken (display)? - //----------------------------------------- - - if ( $this->ipsclass->vars['auth_allow_dnames'] ) - { - if ( $this->ipsclass->vars['auth_dnames_nologinname'] ) - { - $this->ipsclass->DB->build_query( array( 'select' => "members_display_name, id", - 'from' => 'members', - 'where' => "members_l_display_name='".strtolower($in_username)."'", - 'limit' => array( 0,1 ) ) ); - - $this->ipsclass->DB->exec_query(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - $form_errors['username'][] = $this->ipsclass->lang['reg_error_username_taken']; - } - } - } - - //----------------------------------------- - // USERNAME: Special chars? - //----------------------------------------- - - if ( $unicode_name != $in_username ) - { - $this->ipsclass->DB->cache_add_query( 'login_getmember', array( 'username' => $this->ipsclass->DB->add_slashes(strtolower($unicode_name) ) )); - $this->ipsclass->DB->cache_exec_query(); - - $name_check = $this->ipsclass->DB->fetch_row(); - - if ($name_check['id']) - { - $form_errors['username'][] = $this->ipsclass->lang['reg_error_username_taken']; - } - } - - //----------------------------------------- - // USERNAME: GUEST - //----------------------------------------- - - if (strtolower($in_username) == 'guest') - { - $form_errors['username'][] = $this->ipsclass->lang['reg_error_username_taken']; - } - - //----------------------------------------- - // USERNAME: Banned? - //----------------------------------------- - - if ( is_array( $banfilters['name'] ) and count( $banfilters['name'] ) ) - { - foreach ( $banfilters['name'] as $n ) - { - $n = preg_replace( "/\*/", '.*' , preg_quote($n, "/") ); - - if ( $n AND preg_match( "/^{$n}$/i", $in_username ) ) - { - $form_errors['username'][] = $this->ipsclass->lang['reg_error_username_taken']; - break; - } - } - } - - //----------------------------------------- - // DNAME - //----------------------------------------- - - if ( $this->ipsclass->vars['auth_allow_dnames'] ) - { - //----------------------------------------- - // Illegal characters - //----------------------------------------- - - if ( preg_match( "#[\[\];,\|]#", str_replace(''', "'", str_replace('&', '&', $unicode_dname) ) ) ) - { - $form_errors['dname'][] = $this->ipsclass->lang['reg_error_chars']; - } - - //----------------------------------------- - // DNAME: Is this name already taken? - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'general_get_by_display_name', array( 'members_display_name' => strtolower($members_display_name) ) ); - $this->ipsclass->DB->cache_exec_query(); - - $name_check = $this->ipsclass->DB->fetch_row(); - - if ( $name_check['id'] ) - { - $form_errors['dname'][] = $this->ipsclass->lang['reg_error_taken']; - } - - //----------------------------------------- - // DNAME: Check for existing LOG IN name. - //----------------------------------------- - - if ( $this->ipsclass->vars['auth_dnames_nologinname'] ) - { - $this->ipsclass->DB->build_query( array( 'select' => "members_display_name, id", - 'from' => 'members', - 'where' => "members_l_username='".strtolower($members_display_name)."'", - 'limit' => array( 0,1 ) ) ); - - $this->ipsclass->DB->exec_query(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - $form_errors['dname'][] = $this->ipsclass->lang['reg_error_taken']; - } - } - - //----------------------------------------- - // DNAME: Special chars? - //----------------------------------------- - - if ( $unicode_dname != $members_display_name ) - { - $this->ipsclass->DB->cache_add_query( 'general_get_by_display_name', array( 'members_display_name' => $this->ipsclass->DB->add_slashes(strtolower($unicode_dname) ) )); - $this->ipsclass->DB->cache_exec_query(); - - $name_check = $this->ipsclass->DB->fetch_row(); - - if ( $name_check['id'] ) - { - $form_errors['dname'][] = $this->ipsclass->lang['reg_error_taken']; - } - } - - //----------------------------------------- - // DNAME: Banned? - //----------------------------------------- - - if ( is_array( $banfilters['name'] ) and count( $banfilters['name'] ) ) - { - foreach ( $banfilters['name'] as $n ) - { - $n = preg_replace( "/\*/", '.*' , preg_quote($n, "/") ); - - if ( $n AND preg_match( "/^{$n}$/i", $members_display_name ) ) - { - $form_errors['dname'][] = $this->ipsclass->lang['reg_error_taken']; - break; - } - } - } - - //----------------------------------------- - // DNAME: GUEST - //----------------------------------------- - - if (strtolower($members_display_name) == 'guest') - { - $form_errors['dname'][] = $this->ipsclass->lang['reg_error_taken']; - } - } - - //----------------------------------------- - // Is this email addy taken? CONVERGE THIS?? - //----------------------------------------- - - if ( $this->ipsclass->converge->converge_check_for_member_by_email( $in_email ) == TRUE ) - { - $form_errors['email'][] = $this->ipsclass->lang['reg_error_email_taken']; - } - - //----------------------------------------- - // Are they banned [IP]? - //----------------------------------------- - - if ( is_array( $banfilters['ip'] ) and count( $banfilters['ip'] ) ) - { - foreach ($banfilters['ip'] as $ip) - { - $ip = str_replace( '\*', '.*', preg_quote($ip, "/") ); - - if ( preg_match( "/^{$ip}/", $this->ipsclass->input['IP_ADDRESS'] ) ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'you_are_banned', 'INIT' => 1 ) ); - } - } - } - - //----------------------------------------- - // Are they banned [EMAIL]? - //----------------------------------------- - - if ( is_array( $banfilters['email'] ) and count( $banfilters['email'] ) ) - { - foreach ( $banfilters['email'] as $email ) - { - $email = str_replace( "\*", '.*' , preg_quote($email, "/") ); - - if ( preg_match( "/^{$email}$/i", $in_email ) ) - { - $form_errors['email'][] = $this->ipsclass->lang['reg_error_email_ban']; - break; - } - } - } - - //----------------------------------------- - // Check the reg_code - //----------------------------------------- - - if ($this->ipsclass->vars['bot_antispam']) - { - if ( $this->ipsclass->input['regid'] == "" ) - { - $form_errors['general'][] = $this->ipsclass->lang['err_reg_code']; - } - - $this->ipsclass->DB->build_query( array( 'select' => '*', - 'from' => 'reg_antispam', - 'where' => "regid='".trim($this->ipsclass->txt_alphanumerical_clean($this->ipsclass->input['regid']))."'" - ) ); - - $this->ipsclass->DB->exec_query(); - - if ( ! $row = $this->ipsclass->DB->fetch_row() ) - { - $form_errors['general'][] = $this->ipsclass->lang['err_reg_code']; - } - - if ( trim( $this->ipsclass->txt_alphanumerical_clean($this->ipsclass->input['reg_code']) ) != $row['regcode'] ) - { - $form_errors['general'][] = $this->ipsclass->lang['err_reg_code']; - } - - $this->ipsclass->DB->do_delete( 'reg_antispam', "regid='".trim($this->ipsclass->txt_alphanumerical_clean($this->ipsclass->input['regid']))."'" ); - } - - //----------------------------------------- - // CHECK 2: Any errors (duplicate names, etc)? - //----------------------------------------- - - if ( count( $form_errors ) ) - { - $this->show_reg_form( $form_errors ); - return; - } - - //----------------------------------------- - // Build up the hashes - //----------------------------------------- - - $mem_group = $this->ipsclass->vars['member_group']; - - //----------------------------------------- - // Are we asking the member or admin to preview? - //----------------------------------------- - - if ( $this->ipsclass->vars['reg_auth_type'] ) - { - $mem_group = $this->ipsclass->vars['auth_group']; - } - else if ($coppa == 1) - { - $mem_group = $this->ipsclass->vars['auth_group']; - } - else if ( $this->ipsclass->vars['subsm_enforce'] ) - { - $mem_group = $this->ipsclass->vars['subsm_nopkg_group']; - } - - $member = array( - 'name' => $in_username, - 'members_l_username' => strtolower( $in_username ), - 'members_display_name' => $this->ipsclass->vars['auth_allow_dnames'] ? $members_display_name : $in_username, - 'members_l_display_name' => strtolower( $this->ipsclass->vars['auth_allow_dnames'] ? $members_display_name : $in_username ), - 'member_login_key' => $this->ipsclass->converge->generate_auto_log_in_key(), - 'email' => $in_email, - 'mgroup' => $mem_group, - 'posts' => 0, - 'joined' => time(), - 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], - 'time_offset' => $this->ipsclass->input['time_offset'], - 'view_sigs' => 1, - 'email_pm' => 1, - 'view_img' => 1, - 'view_avs' => 1, - 'restrict_post' => 0, - 'view_pop' => 1, - 'msg_total' => 0, - 'new_msg' => 0, - 'coppa_user' => $coppa, - 'language' => $this->ipsclass->vars['default_language'], - 'members_auto_dst' => 1, - 'members_editor_choice' => $this->ipsclass->vars['ips_default_editor'], - 'allow_admin_mails' => intval( $this->ipsclass->input['allow_admin_mail'] ), - 'hide_email' => $this->ipsclass->input['allow_member_mail'] ? 0 : 1, - 'subs_pkg_chosen' => intval( $this->ipsclass->input['subspackage'] ) - ); - - //----------------------------------------- - // Insert: CONVERGE - //----------------------------------------- - - $salt = $this->ipsclass->converge->generate_password_salt(5); - $passhash = $this->ipsclass->converge->generate_compiled_passhash( $salt, md5($in_password) ); - - $converge = array( 'converge_email' => $in_email, - 'converge_joined' => time(), - 'converge_pass_hash' => $passhash, - 'converge_pass_salt' => str_replace( '\\', "\\\\", $salt ) - ); - - $this->ipsclass->DB->do_insert( 'members_converge', $converge ); - - //----------------------------------------- - // Get converges auto_increment user_id - //----------------------------------------- - - $member_id = $this->ipsclass->DB->get_insert_id(); - $member['id'] = $member_id; - - //----------------------------------------- - // Insert: MEMBERS - //----------------------------------------- - - $this->ipsclass->DB->force_data_type = array( 'name' => 'string', 'members_display_name' => 'string' ); - - $this->ipsclass->DB->do_insert( 'members', $member ); - - //----------------------------------------- - // Insert: MEMBER EXTRA - //----------------------------------------- - - $this->ipsclass->DB->do_insert( 'member_extra', array( 'id' => $member_id, - 'vdirs' => 'in:Входящие|sent:Отправленные', - 'interests' => '', - 'signature' => '' ) ); - - //----------------------------------------- - // Insert into the custom profile fields DB - //----------------------------------------- - - // Ensure deleted members profile fields are removed. - - $this->ipsclass->DB->do_delete( 'pfields_content', 'member_id='.$member['id'] ); - - $fields->out_fields['member_id'] = $member['id']; - - $this->ipsclass->DB->do_insert( 'pfields_content', $fields->out_fields ); - - //----------------------------------------- - // Use modules? - //----------------------------------------- - - if ( USE_MODULES == 1 ) - { - $this->modules->register_class($this); - - $member['password'] = trim($this->ipsclass->input['PassWord']); - - $this->modules->on_create_account($member); - - if ( $this->modules->error == 1 ) - { - return; - } - - $member['password'] = ""; - } - - //----------------------------------------- - // Validation key - //----------------------------------------- - - $validate_key = md5( $this->ipsclass->make_password() . time() ); - $time = time(); - - if ($coppa != 1) - { - if ( ($this->ipsclass->vars['reg_auth_type'] == 'user' ) or - ($this->ipsclass->vars['reg_auth_type'] == 'admin') or - ($this->ipsclass->vars['reg_auth_type'] == 'admin_user') ) - { - //----------------------------------------- - // We want to validate all reg's via email, - // after email verificiation has taken place, - // we restore their previous group and remove the validate_key - //----------------------------------------- - - $this->ipsclass->DB->do_insert( 'validating', array ( - 'vid' => $validate_key, - 'member_id' => $member['id'], - 'real_group' => $this->ipsclass->vars['subsm_enforce'] ? $this->ipsclass->vars['subsm_nopkg_group'] : $this->ipsclass->vars['member_group'], - 'temp_group' => $this->ipsclass->vars['auth_group'], - 'entry_date' => $time, - 'coppa_user' => $coppa, - 'new_reg' => 1, - 'ip_address' => $member['ip_address'] - ) ); - - - if ( $this->ipsclass->vars['reg_auth_type'] == 'user' OR $this->ipsclass->vars['reg_auth_type'] == 'admin_user' ) - { - $this->email->get_template("reg_validate"); - - $this->email->build_message( array( - 'THE_LINK' => $this->base_url_nosess."?act=Reg&CODE=03&uid=".urlencode($member_id)."&aid=".urlencode($validate_key), - 'NAME' => $member['members_display_name'], - 'MAN_LINK' => $this->base_url_nosess."?act=Reg&CODE=05", - 'EMAIL' => $member['email'], - 'ID' => $member_id, - 'CODE' => $validate_key, - ) - ); - - $this->email->subject = $this->ipsclass->lang['new_registration_email'].$this->ipsclass->vars['board_name']; - $this->email->to = $member['email']; - - $this->email->send_mail(); - - $this->output = $this->ipsclass->compiled_templates['skin_register']->show_authorise( $member ); - - } - else if ( $this->ipsclass->vars['reg_auth_type'] == 'admin' ) - { - $this->output = $this->ipsclass->compiled_templates['skin_register']->show_preview( $member ); - } - - if ($this->ipsclass->vars['new_reg_notify']) - { - - $date = $this->ipsclass->get_date( time(), 'LONG', 1 ); - - $this->email->get_template("admin_newuser"); - - $this->email->build_message( array( - 'DATE' => $date, - 'MEMBER_NAME' => $member['members_display_name'], - ) - ); - - $this->email->subject = $this->ipsclass->lang['new_registration_email1'].$this->ipsclass->vars['board_name']; - $this->email->to = $this->ipsclass->vars['email_in']; - $this->email->send_mail(); - } - - $this->page_title = $this->ipsclass->lang['reg_success']; - - $this->nav = array( $this->ipsclass->lang['nav_reg'] ); - } - - else - { - //----------------------------------------- - // We don't want to preview, or get them to validate via email. - //----------------------------------------- - - $this->ipsclass->cache['stats']['last_mem_name'] = $member['members_display_name']; - $this->ipsclass->cache['stats']['last_mem_id'] = $member['id']; - $this->ipsclass->cache['stats']['mem_count'] += 1; - - $this->ipsclass->update_cache( array( 'name' => 'stats', 'array' => 1, 'deletefirst' => 0 ) ); - - if ($this->ipsclass->vars['new_reg_notify']) - { - $date = $this->ipsclass->get_date( time(), 'LONG', 1 ); - - $this->email->get_template("admin_newuser"); - - $this->email->build_message( array( - 'DATE' => $date, - 'MEMBER_NAME' => $member['members_display_name'], - ) - ); - - $this->email->subject = $this->ipsclass->lang['new_registration_email1'].$this->ipsclass->vars['board_name']; - $this->email->to = $this->ipsclass->vars['email_in']; - $this->email->send_mail(); - } - - $this->ipsclass->my_setcookie("member_id" , $member['id'] , 1); - $this->ipsclass->my_setcookie("pass_hash" , $member['member_login_key'], 1); - - $this->ipsclass->boink_it($this->ipsclass->base_url.'&act=login&CODE=autologin&fromreg=1'); - } - } - else - { - // This is a COPPA user, so lets tell them they registered OK and redirect to the form. - - $this->ipsclass->DB->do_insert( 'validating', array ( - 'vid' => $validate_key, - 'member_id' => $member['id'], - 'real_group' => $this->ipsclass->vars['member_group'], - 'temp_group' => $this->ipsclass->vars['auth_group'], - 'entry_date' => $time, - 'coppa_user' => $coppa, - 'new_reg' => 1, - 'ip_address' => $member['ip_address'] - ) ); - - $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['cp_success'], 'act=Reg&CODE=12' ); - } - } - - /*-------------------------------------------------------------------------*/ - // validate_user - /*-------------------------------------------------------------------------*/ - - function validate_user() - { - //----------------------------------------- - // Check for input and it's in a valid format. - //----------------------------------------- - - $in_user_id = intval(trim(urldecode($this->ipsclass->input['uid']))); - $in_validate_key = trim(urldecode($this->ipsclass->input['aid'])); - $in_type = trim($this->ipsclass->input['type']); - - if ($in_type == "") - { - $in_type = 'reg'; - } - - //----------------------------------------- - // check input - //----------------------------------------- - - if (! preg_match( "/^(?:[\d\w]){32}$/", $in_validate_key ) ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'data_incorrect' ) ); - } - - if (! preg_match( "/^(?:\d){1,}$/", $in_user_id ) ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'data_incorrect' ) ); - } - - //----------------------------------------- - // Attempt to get the profile of the requesting user - //----------------------------------------- - - $member = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'members', 'where' => 'id='.$in_user_id ) ); - - if ( ! $member['id'] ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'auth_no_mem' ) ); - } - - //----------------------------------------- - // Get validating info.. - //----------------------------------------- - - if ( $in_type == 'lostpass' ) - { - $validate = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'validating', 'where' => 'member_id='.$in_user_id.' and lost_pass=1' ) ); - } - else if ( $in_type == 'newemail' ) - { - $validate = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'validating', 'where' => 'member_id='.$in_user_id.' and email_chg=1' ) ); - } - else - { - $validate = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'validating', 'where' => 'member_id='.$in_user_id ) ); - } - - if ( ! $validate['member_id'] ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'auth_no_key' ) ); - } - - if ( ($validate['new_reg'] == 1) && ($this->ipsclass->vars['reg_auth_type'] == "admin" ) ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'auth_no_key_not_allow' ) ); - } - - if ($validate['vid'] != $in_validate_key) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'auth_key_wrong' ) ); - } - else - { - //----------------------------------------- - // REGISTER VALIDATE - //----------------------------------------- - - if ($in_type == 'reg') - { - if ( $validate['new_reg'] != 1 ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'auth_no_key' ) ); - } - - if ( empty($validate['real_group']) ) - { - $validate['real_group'] = $this->ipsclass->vars['member_group']; - } - - //----------------------------------------- - // SELF-VERIFICATION... - //----------------------------------------- - - if ( $this->ipsclass->vars['reg_auth_type'] != 'admin_user' ) - { - $this->ipsclass->DB->do_update( 'members', array( 'mgroup' => intval($validate['real_group']) ), 'id='.intval($member['id']) ); - - if ( USE_MODULES == 1 ) - { - $this->modules->register_class($this); - $this->modules->on_group_change( $member['id'], $validate['real_group'] ); - } - - //----------------------------------------- - // Update the stats... - //----------------------------------------- - - $this->ipsclass->cache['stats']['last_mem_name'] = $member['members_display_name']; - $this->ipsclass->cache['stats']['last_mem_id'] = $member['id']; - $this->ipsclass->cache['stats']['mem_count'] += 1; - - $this->ipsclass->update_cache( array( 'name' => 'stats', 'array' => 1, 'deletefirst' => 0 ) ); - - $this->ipsclass->my_setcookie("member_id" , $member['id'] , 1); - $this->ipsclass->my_setcookie("pass_hash" , $member['member_login_key'], 1); - - //----------------------------------------- - // Remove "dead" validation - //----------------------------------------- - - $this->ipsclass->DB->do_delete( 'validating', "vid='".$validate['vid']."' OR (member_id={$member['id']} AND new_reg=1)" ); - - $this->ipsclass->boink_it($this->ipsclass->base_url.'&act=login&CODE=autologin&fromreg=1'); - } - - //----------------------------------------- - // ADMIN-VERIFICATION... - //----------------------------------------- - - else - { - //----------------------------------------- - // Update DB row... - //----------------------------------------- - - $this->ipsclass->DB->do_update( 'validating', array( 'user_verified' => 1 ), "vid='".$validate['vid']."'" ); - - //----------------------------------------- - // Print message - //----------------------------------------- - - $this->output = $this->ipsclass->compiled_templates['skin_register']->show_preview( $member ); - } - - } - - //----------------------------------------- - // LOST PASS VALIDATE - //----------------------------------------- - - else if ($in_type == 'lostpass') - { - //----------------------------------------- - // On the same page? - //----------------------------------------- - - if ($validate['lost_pass'] != 1) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'lp_no_pass' ) ); - } - - //----------------------------------------- - // Test GD image - //----------------------------------------- - - if ( $this->ipsclass->vars['bot_antispam'] != 0 AND $this->ipsclass->input['regid'] != "" ) - { - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'reg_antispam', - 'where' => "regid='".trim($this->ipsclass->txt_alphanumerical_clean($this->ipsclass->input['regid']))."'" - ) ); - - $this->ipsclass->DB->simple_exec(); - - if ( ! $row = $this->ipsclass->DB->fetch_row() ) - { - $this->show_manual_form( 'lostpass', 'err_reg_code' ); - return; - } - - if ( trim( $this->ipsclass->txt_alphanumerical_clean($this->ipsclass->input['reg_code']) ) != $row['regcode'] ) - { - $this->show_manual_form( 'lostpass', 'err_reg_code' ); - return; - } - } - - //----------------------------------------- - // Send a new random password? - //----------------------------------------- - - if ( $this->ipsclass->vars['lp_method'] == 'random' ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $save_array = array(); - - //----------------------------------------- - // Generate a new random password - //----------------------------------------- - - $new_pass = $this->ipsclass->make_password(); - - //----------------------------------------- - // Generate a new salt - //----------------------------------------- - - $salt = $this->ipsclass->converge->generate_password_salt(5); - $salt = str_replace( '\\', "\\\\", $salt ); - - //----------------------------------------- - // New log in key - //----------------------------------------- - - $key = $this->ipsclass->converge->generate_auto_log_in_key(); - - //----------------------------------------- - // Update... - //----------------------------------------- - - $save_array['converge_pass_salt'] = $salt; - $save_array['converge_pass_hash'] = md5( md5($salt) . md5( $new_pass ) ); - - $this->ipsclass->DB->do_update( 'members_converge', $save_array , 'converge_id='.intval( $member['id'] ) ); - $this->ipsclass->DB->do_update( 'members' , array( 'member_login_key' => $key ), 'id='.intval( $member['id'] ) ); - - //----------------------------------------- - // Send out the email... - //----------------------------------------- - - $this->email->get_template("lost_pass_email_pass"); - - $this->email->build_message( array( - 'NAME' => $member['members_display_name'], - 'THE_LINK' => $this->base_url_nosess."?act=usercp&CODE=28", - 'PASSWORD' => $new_pass, - 'LOGIN' => $this->base_url_nosess."?act=login", - 'USERNAME' => $member['name'], - 'EMAIL' => $member['email'], - 'ID' => $member['id'], - ) - ); - - $this->email->subject = $this->ipsclass->lang['lp_random_pass_subject'].' '.$this->ipsclass->vars['board_name']; - $this->email->to = $member['email']; - - $this->email->send_mail(); - - $this->output = $this->ipsclass->compiled_templates['skin_register']->show_lostpasswait_random( $member ); - - - } - //----------------------------------------- - // Allow user to choose... - //----------------------------------------- - else - { - if ( $_POST['pass1'] == "" ) - { - $this->ipsclass->Error( array( LEVEL => 1, MSG => 'pass_blank' ) ); - } - - if ( $_POST['pass2'] == "" ) - { - $this->ipsclass->Error( array( LEVEL => 1, MSG => 'pass_blank' ) ); - } - - if ($this->ipsclass->input['regid'] == "" AND $this->ipsclass->vars['bot_antispam'] != 0) - { - $this->show_manual_form( 'lostpass', 'err_reg_code' ); - return; - } - - $pass_a = trim($this->ipsclass->input['pass1']); - $pass_b = trim($this->ipsclass->input['pass2']); - - if ( strlen($pass_a) < 3 ) - { - $this->ipsclass->Error( array( LEVEL => 1, MSG => 'pass_too_short' ) ); - } - - if ( $pass_a != $pass_b ) - { - $this->ipsclass->Error( array( LEVEL => 1, MSG => 'pass_no_match' ) ); - } - - $new_pass = md5($pass_a); - - $this->ipsclass->converge->converge_update_password( $new_pass, $member['email'] ); - - $this->ipsclass->my_setcookie("member_id" , $member['id'] , 1); - $this->ipsclass->my_setcookie("pass_hash" , $member['member_login_key'], 1); - - //----------------------------------------- - // Remove "dead" validation - //----------------------------------------- - - $this->ipsclass->DB->do_delete( 'validating', "vid='".$validate['vid']."' OR (member_id={$member['id']} AND lost_pass=1)" ); - $this->ipsclass->DB->do_delete( 'reg_antispam', "regid='".trim($this->ipsclass->txt_alphanumerical_clean($this->ipsclass->input['regid']))."'" ); - - $this->ipsclass->boink_it($this->ipsclass->base_url.'&act=login&CODE=autologin&frompass=1'); - } - } - - //----------------------------------------- - // EMAIL ADDY CHANGE - //----------------------------------------- - - else if ($in_type == 'newemail') - { - if ( $validate['email_chg'] != 1 ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'auth_no_key' ) ); - } - - if (empty($validate['real_group'])) - { - $validate['real_group'] = $this->ipsclass->vars['member_group']; - } - - $this->ipsclass->DB->do_update( 'members', array( 'mgroup' => intval($validate['real_group']) ), 'id='.intval($member['id']) ); - - if ( USE_MODULES == 1 ) - { - $this->modules->register_class($this); - $this->modules->on_group_change($member['id'], $validate['real_group']); - } - - $this->ipsclass->my_setcookie("member_id" , $member['id'] , 1); - $this->ipsclass->my_setcookie("pass_hash" , $member['member_login_key'], 1); - - //----------------------------------------- - // Remove "dead" validation - //----------------------------------------- - - $this->ipsclass->DB->do_delete( 'validating', "vid='".$validate['vid']."' OR (member_id={$member['id']} AND email_chg=1)" ); - - $this->ipsclass->boink_it($this->ipsclass->base_url.'&act=login&CODE=autologin&fromemail=1'); - } - } - } - - /*-------------------------------------------------------------------------*/ - // Manual Lost Password Form - /*-------------------------------------------------------------------------*/ - - function show_manual_form($type='reg', $errors="") - { - if ( $type == 'lostpass' ) - { - if ($errors != "") - { - $this->output .= $this->ipsclass->compiled_templates['skin_register']->errors( $this->ipsclass->lang[$errors]); - } - - $this->output .= $this->ipsclass->compiled_templates['skin_register']->show_lostpass_form(); - - //----------------------------------------- - // Check for input and it's in a valid format. - //----------------------------------------- - - if ( $this->ipsclass->input['uid'] AND $this->ipsclass->input['aid'] ) - { - $in_user_id = intval(trim(urldecode($this->ipsclass->input['uid']))); - $in_validate_key = trim(urldecode($this->ipsclass->input['aid'])); - $in_type = trim($this->ipsclass->input['type']); - - if ($in_type == "") - { - $in_type = 'reg'; - } - - //----------------------------------------- - // Check and test input - //----------------------------------------- - - if (! preg_match( "/^(?:[\d\w]){32}$/", $in_validate_key ) ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'data_incorrect' ) ); - } - - if (! preg_match( "/^(?:\d){1,}$/", $in_user_id ) ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'data_incorrect' ) ); - } - - //----------------------------------------- - // Attempt to get the profile of the requesting user - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'members', 'where' => "id=$in_user_id" ) ); - - $this->ipsclass->DB->simple_exec(); - - if ( ! $member = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'auth_no_mem' ) ); - } - - //----------------------------------------- - // Get validating info.. - //----------------------------------------- - - $validate = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'validating', 'where' => "member_id=$in_user_id and vid='$in_validate_key' and lost_pass=1" ) ); - - if ( ! $validate['member_id'] ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'auth_no_key' ) ); - } - - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_register']->show_lostpass_form_auto($in_validate_key, $in_user_id), $this->output ); - } - else - { - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_register']->show_lostpass_form_manual(), $this->output ); - } - - if ($this->ipsclass->vars['bot_antispam']) - { - // Set a new ID for this reg request... - - $regid = md5( uniqid(microtime()) ); - - if( $this->ipsclass->vars['bot_antispam'] == 'gd' ) - { - //----------------------------------------- - // Get 6 random chars - //----------------------------------------- - - $reg_code = strtoupper( substr( md5($regid), 0, 6 ) ); - } - else - { - //----------------------------------------- - // Set a new 6 character numerical string - //----------------------------------------- - - mt_srand ((double) microtime() * 1000000); - - $reg_code = mt_rand(100000,999999); - } - - // Insert into the DB - - $this->ipsclass->DB->do_insert( 'reg_antispam', array ( - 'regid' => $regid, - 'regcode' => $reg_code, - 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], - 'ctime' => time(), - ) ); - } - - if ($this->ipsclass->vars['bot_antispam'] == 'gd') - { - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_register']->bot_antispam_gd( $regid ), $this->output ); - } - else if ($this->ipsclass->vars['bot_antispam'] == 'gif') - { - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_register']->bot_antispam( $regid ), $this->output ); - } - } - else - { - $this->output = $this->ipsclass->compiled_templates['skin_register']->show_dumb_form($type); - } - - $this->page_title = $this->ipsclass->lang['activation_form']; - $this->nav = array( $this->ipsclass->lang['activation_form'] ); - } - - - /*-------------------------------------------------------------------------*/ - // Show reg image - /*-------------------------------------------------------------------------*/ - - function show_image() - { - if ( $this->ipsclass->input['rc'] == "" ) - { - return false; - } - - // Get the info from the db - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'reg_antispam', - 'where' => "regid='".trim($this->ipsclass->txt_alphanumerical_clean($this->ipsclass->input['rc']))."'" - ) ); - - $this->ipsclass->DB->simple_exec(); - - if ( ! $row = $this->ipsclass->DB->fetch_row() ) - { - return false; - } - - //----------------------------------------- - // Using GD? - //----------------------------------------- - - if ( $this->ipsclass->vars['bot_antispam'] == 'gd' ) - { - $this->ipsclass->show_gd_img($row['regcode']); - } - else - { - //----------------------------------------- - // Using normal then, check for "p" - //----------------------------------------- - - if ( $this->ipsclass->input['p'] == "" ) - { - return false; - } - - $p = intval($this->ipsclass->input['p']) - 1; //substr starts from 0, not 1 :p - - $this_number = substr( $row['regcode'], $p, 1 ); - - $this->ipsclass->show_gif_img($this_number); - } - } - - -} - + $Date: 2008-10-02 14:30:24 -0400 (Thu, 02 Oct 2008) $ +| > $Revision: 2578 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > Registration functions +| > Module written by Matt Mecham +| > Date started: 16th February 2002 +| +| > Module Version Number: 1.0.0 +| > Quality Checked: Wed 15 Sept. 2004 ++-------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class register { + + var $output = ""; + var $page_title = ""; + var $nav = array(); + var $html = ""; + var $email = ""; + var $modules = ""; + + function auto_run() + { + //----------------------------------------- + // Require the HTML and language modules + //----------------------------------------- + + $this->ipsclass->load_language('lang_register'); + $this->ipsclass->load_template('skin_register'); + + $this->base_url = $this->ipsclass->base_url; + $this->base_url_nosess = "{$this->ipsclass->vars['board_url']}/index.{$this->ipsclass->vars['php_ext']}"; + + //----------------------------------------- + // Fix up languages + //----------------------------------------- + + foreach( array( 'dname_text', 'reg_error_dname_len', 'reg_error_username_none', 'reg_error_no_name', 'user_name_text' ) as $k ) + { + $this->ipsclass->lang[ $k ] = sprintf( $this->ipsclass->lang[ $k ], $this->ipsclass->vars['max_user_name_length'] ); + } + + //----------------------------------------- + // Get the emailer module + //----------------------------------------- + + require ROOT_PATH."sources/classes/class_email.php"; + + $this->email = new emailer(); + $this->email->ipsclass =& $this->ipsclass; + $this->email->email_init(); + + if ( USE_MODULES == 1 ) + { + require ROOT_PATH."modules/ipb_member_sync.php"; + + $this->modules = new ipb_member_sync(); + $this->modules->ipsclass =& $this->ipsclass; + } + + //----------------------------------------- + // Board offline? + //----------------------------------------- + + if ($this->ipsclass->vars['board_offline'] == 1) + { + if ($this->ipsclass->member['g_access_offline'] != 1) + { + $this->ipsclass->vars['no_reg'] = 1; + } + } + + $this->ipsclass->vars['username_characters'] = str_replace( '"', '\"', $this->ipsclass->vars['username_characters'] ); + + //----------------------------------------- + // What to do? + //----------------------------------------- + + switch($this->ipsclass->input['CODE']) + { + case '02': + $this->create_account(); + break; + + case '03': + $this->validate_user(); + break; + + case '05': + $this->show_manual_form(); + break; + + case '06': + $this->show_manual_form('lostpass'); + break; + + case 'lostpassform': + $this->show_manual_form('lostpass'); + break; + + case '07': + $this->show_manual_form('newemail'); + break; + + case '10': + $this->lost_password_start(); + break; + case '11': + $this->lost_password_end(); + break; + + case '12': + $this->coppa_perms_form(); + break; + + case 'coppa_two': + $this->coppa_two(); + break; + + case 'reval': + $this->revalidate_one(); + break; + + case 'reval2': + $this->revalidate_two(); + break; + + case 'complete_login': + $this->complete_login_form(); + break; + case 'complete_login_do': + $this->complete_login_save(); + break; + + default: + if ($this->ipsclass->vars['use_coppa'] == 1 and $this->ipsclass->input['coppa_pass'] != 1) + { + $this->coppa_start(); + } + else + { + $this->show_reg_form(); + } + break; + } + + //----------------------------------------- + // If we have any HTML to print, do so... + //----------------------------------------- + + $this->ipsclass->print->add_output("$this->output"); + $this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, 'NAV' => $this->nav ) ); + } + + /*-------------------------------------------------------------------------*/ + // Save login information + /*-------------------------------------------------------------------------*/ + + function complete_login_save() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $mid = intval( $this->ipsclass->input['mid'] ); + $key = intval( $this->ipsclass->input['key'] ); + $in_email = strtolower( trim($this->ipsclass->input['EmailAddress']) ); + $banfilters = array(); + $form_errors = array(); + $members_display_name = trim( $this->ipsclass->input['members_display_name'] ); + $poss_session_id = ""; + + //----------------------------------------- + // Get DB row + //----------------------------------------- + + $reg = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'members_partial', 'where' => "partial_member_id={$mid} AND partial_date={$key}" ) ); + $tmp_member = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'members', 'where' => "id={$mid}" ) ); + + //----------------------------------------- + // Got it? + //----------------------------------------- + + if ( ! $reg['partial_id'] OR ! $tmp_member['id'] ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'data_incorrect' ) ); + } + + //----------------------------------------- + // Load ban filters + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'banfilters' ) ); + $this->ipsclass->DB->simple_exec(); + + while( $r = $this->ipsclass->DB->fetch_row() ) + { + $banfilters[ $r['ban_type'] ][] = $r['ban_content']; + } + + //----------------------------------------- + // Check + //----------------------------------------- + + /*if ( $this->ipsclass->vars['no_reg'] == 1 ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'reg_off' ) ); + }*/ + + //----------------------------------------- + // Custom profile field stuff + //----------------------------------------- + + require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); + $fields = new custom_fields( $this->ipsclass->DB ); + + $fields->cache_data = $this->ipsclass->cache['profilefields']; + + $fields->init_data(); + $fields->parse_to_save( 1 ); + + //----------------------------------------- + // Check... + //----------------------------------------- + + if ( count( $fields->error_fields['empty'] ) ) + { + $form_errors['general'][] = $this->ipsclass->lang['err_complete_form']; + } + + if ( count( $fields->error_fields['invalid'] ) ) + { + $form_errors['general'][] = $this->ipsclass->lang['err_invalid']; + } + + if ( count( $fields->error_fields['toobig'] ) ) + { + $form_errors['general'][] = $this->ipsclass->lang['err_cf_to_long']; + } + + //----------------------------------------- + // Remove 'sneaky' spaces + //----------------------------------------- + + if ( $this->ipsclass->vars['strip_space_chr'] ) + { + $members_display_name = str_replace( chr(160), ' ', $members_display_name ); + $members_display_name = str_replace( chr(173), ' ', $members_display_name ); + $members_display_name = str_replace( chr(240), ' ', $members_display_name ); + } + + //----------------------------------------- + // Test unicode name too + //----------------------------------------- + + $unicode_dname = preg_replace_callback('/&#([0-9]+);/si', create_function( '$matches', 'return chr($matches[1]);' ), $members_display_name); + + //----------------------------------------- + // Testing email addresses? + //----------------------------------------- + + if ( ! $reg['partial_email_ok'] ) + { + //----------------------------------------- + // Check the email address + //----------------------------------------- + + $in_email = $this->ipsclass->clean_email($in_email); + + //----------------------------------------- + // Test email address + //----------------------------------------- + + $this->ipsclass->input['EmailAddress_two'] = strtolower( trim($this->ipsclass->input['EmailAddress_two']) ); + + if ($this->ipsclass->input['EmailAddress_two'] != $in_email) + { + $form_errors['email'][] = $this->ipsclass->lang['reg_error_email_nm']; + } + + //----------------------------------------- + // Are they banned [EMAIL]? + //----------------------------------------- + + if ( is_array( $banfilters['email'] ) and count( $banfilters['email'] ) ) + { + foreach ( $banfilters['email'] as $email ) + { + $email = str_replace( '\*', '.*' , preg_quote($email, "/") ); + + if ( preg_match( "/^{$email}$/i", $in_email ) ) + { + $form_errors['email'][] = $this->ipsclass->lang['reg_error_email_taken']; + break; + } + } + } + + //----------------------------------------- + // Is this email addy taken? + //----------------------------------------- + + if ( $this->ipsclass->converge->converge_check_for_member_by_email( $in_email ) == TRUE ) + { + $form_errors['email'][] = $this->ipsclass->lang['reg_error_email_taken']; + } + } + + //----------------------------------------- + // More unicode.. + //----------------------------------------- + + $len_d = preg_replace("/&#([0-9]+);/", "-", $members_display_name ); + + //----------------------------------------- + // Test dname + //----------------------------------------- + + if ( $this->ipsclass->vars['auth_allow_dnames'] ) + { + if ( ! $members_display_name OR strlen($len_d) < 3 OR strlen($len_d) > $this->ipsclass->vars['max_user_name_length'] ) + { + $form_errors['dname'][] = $this->ipsclass->lang['reg_error_no_name']; + } + } + + //----------------------------------------- + // CHECK 1: Any errors (missing fields, etc)? + //----------------------------------------- + + if ( count( $form_errors ) ) + { + $this->complete_login_form( $form_errors ); + return; + } + + if ( $this->ipsclass->vars['auth_allow_dnames'] ) + { + //----------------------------------------- + // DNAME: Illegal characters + //----------------------------------------- + + if ( preg_match( "#[\[\];,\|]#", $members_display_name ) ) + { + $form_errors['dname'][] = $this->ipsclass->lang['reg_error_chars']; + } + + //----------------------------------------- + // DNAME: Is this name already taken? + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'general_get_by_display_name', array( 'members_display_name' => strtolower($members_display_name) ) ); + $this->ipsclass->DB->cache_exec_query(); + + $name_check = $this->ipsclass->DB->fetch_row(); + + if ( $name_check['id'] AND $name_check['id'] != $mid ) + { + $form_errors['dname'][] = $this->ipsclass->lang['reg_error_taken']; + } + + //----------------------------------------- + // DNAME: Special chars? + //----------------------------------------- + + if ( $unicode_dname != $members_display_name ) + { + $this->ipsclass->DB->cache_add_query( 'general_get_by_display_name', array( 'members_display_name' => $this->ipsclass->DB->add_slashes(strtolower($unicode_dname) ) )); + $this->ipsclass->DB->cache_exec_query(); + + $name_check = $this->ipsclass->DB->fetch_row(); + + if ( $name_check['id'] AND $name_check['id'] != $mid ) + { + $form_errors['dname'][] = $this->ipsclass->lang['reg_error_taken']; + } + } + + //----------------------------------------- + // DNAME: Banned? + //----------------------------------------- + + if ( is_array( $banfilters['name'] ) and count( $banfilters['name'] ) ) + { + foreach ( $banfilters['name'] as $n ) + { + $n = str_replace( '\*', '.*' , preg_quote($n, "/") ); + + if ( $n AND preg_match( "/^{$n}$/i", $members_display_name ) ) + { + $form_errors['dname'][] = $this->ipsclass->lang['reg_error_taken']; + break; + } + } + } + + //----------------------------------------- + // DNAME: GUEST + //----------------------------------------- + + if (strtolower($members_display_name) == 'guest') + { + $form_errors['dname'][] = $this->ipsclass->lang['reg_error_taken']; + } + } + + //----------------------------------------- + // CHECK 2: Any errors (duplicate names, etc)? + //----------------------------------------- + + if ( count( $form_errors ) ) + { + $this->complete_login_form( $form_errors ); + return; + } + + //----------------------------------------- + // Update: Members + //----------------------------------------- + + $members_display_name = $this->ipsclass->vars['auth_allow_dnames'] ? $members_display_name : $tmp_member['name']; + + if ( ! $reg['partial_email_ok'] ) + { + $this->ipsclass->DB->do_update( 'members', array( 'email' => $in_email, + 'members_display_name' => $members_display_name, + 'members_l_display_name' => strtolower( $members_display_name ) ), 'id='.$mid ); + + //----------------------------------------- + // Update: Converge + //----------------------------------------- + + $this->ipsclass->DB->do_update( 'members_converge', array( 'converge_email' => $in_email ), 'converge_id='.$mid ); + } + else + { + $this->ipsclass->DB->do_update( 'members', array( 'members_display_name' => $members_display_name, + 'members_l_display_name' => strtolower( $members_display_name ) ), 'id='.$mid ); + } + + //----------------------------------------- + // Delete: Partials row + //----------------------------------------- + + $this->ipsclass->DB->do_delete( 'members_partial', 'partial_member_id='.$mid ); + + //----------------------------------------- + // Update: Profile fields + //----------------------------------------- + + $this->ipsclass->DB->force_data_type = array(); + + foreach( $fields->out_fields as $_field => $_data ) + { + $this->ipsclass->DB->force_data_type[ $_field ] = 'string'; + } + + if ( is_array($fields->out_fields) and count($fields->out_fields) ) + { + $this->ipsclass->DB->do_update( 'pfields_content', $fields->out_fields, 'member_id='.$mid ); + } + + //----------------------------------------- + // Send out admin email + //----------------------------------------- + + if ( $this->ipsclass->vars['new_reg_notify'] ) + { + $date = $this->ipsclass->get_date( time(), 'LONG', 1 ); + + $this->email->get_template("admin_newuser"); + + $this->email->build_message( array( 'DATE' => $date, + 'MEMBER_NAME' => $members_display_name ) ); + + $this->email->subject = $this->ipsclass->lang['new_registration_email'] . $this->ipsclass->vars['board_name']; + $this->email->to = $this->ipsclass->vars['email_in']; + $this->email->send_mail(); + } + + //----------------------------------------- + // Set cookies + //----------------------------------------- + + $member = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', + 'from' => 'members', + 'where' => "id=$mid" + ) ); + + $this->ipsclass->my_setcookie("member_id" , $member['id'] , 1); + $this->ipsclass->my_setcookie("pass_hash" , $member['member_login_key'], 1); + + //----------------------------------------- + // Create / Update session + //----------------------------------------- + + if ( $cookie_id = $this->ipsclass->my_getcookie('session_id') ) + { + $poss_session_id = $this->ipsclass->my_getcookie('session_id'); + } + else if ( $this->ipsclass->input['s'] ) + { + $poss_session_id = $this->ipsclass->input['s']; + } + + //----------------------------------------- + // Clean... + //----------------------------------------- + + $poss_session_id = preg_replace("/([^a-zA-Z0-9])/", "", $poss_session_id); + + //----------------------------------------- + // Got a valid session ID... + //----------------------------------------- + + if ($poss_session_id) + { + $session_id = $poss_session_id; + + //----------------------------------------- + // Delete any old sessions with this users IP + // addy that doesn't match our session ID. + //----------------------------------------- + + $this->ipsclass->DB->do_delete( 'sessions', "ip_address='".$this->ipsclass->ip_address."' AND id != '$session_id'" ); + + $this->ipsclass->DB->do_shutdown_update( 'sessions', array ( 'member_name' => $member['members_display_name'], + 'member_id' => $member['id'], + 'running_time' => time(), + 'member_group' => $member['mgroup'], + 'login_type' => $this->ipsclass->input['Privacy'] ? 1 : 0 ), "id='".$session_id."'" ); + } + else + { + $session_id = md5( uniqid(microtime()) ); + + if( $this->ipsclass->vars['match_ipaddress'] ) + { + //----------------------------------------- + // Delete any old sessions with this users IP addy. + //----------------------------------------- + + $this->ipsclass->DB->do_delete( 'sessions', "ip_address='".$this->ipsclass->ip_address."'" ); + } + + $this->ipsclass->DB->do_shutdown_insert( 'sessions', array ( 'id' => $session_id, + 'member_name' => $member['members_display_name'], + 'member_id' => $member['id'], + 'running_time' => time(), + 'member_group' => $member['mgroup'], + 'ip_address' => $this->ipsclass->ip_address, + 'browser' => substr($this->ipsclass->clean_value($this->ipsclass->my_getenv('HTTP_USER_AGENT')), 0, 50), + 'login_type' => $this->ipsclass->input['Privacy'] ? 1 : 0 ) ); + } + + $this->ipsclass->member = $member; + $this->ipsclass->session_id = $session_id; + + //----------------------------------------- + // Update Stats + //----------------------------------------- + + $this->ipsclass->cache['stats']['last_mem_name'] = $this->ipsclass->member['members_display_name']; + $this->ipsclass->cache['stats']['last_mem_id'] = $this->ipsclass->member['id']; + $this->ipsclass->cache['stats']['mem_count'] += 1; + + $this->ipsclass->update_cache( array( 'name' => 'stats', 'array' => 1, 'deletefirst' => 0 ) ); + + //----------------------------------------- + // set cookie + //----------------------------------------- + + $this->ipsclass->my_setcookie("session_id", $this->ipsclass->session_id, -1); + + //----------------------------------------- + // Go to the board index + //----------------------------------------- + + $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['clogin_done'], 'act=idx' ); + } + + /*-------------------------------------------------------------------------*/ + // Show "check revalidate form" er.. form. thing. + /*-------------------------------------------------------------------------*/ + + function complete_login_form( $form_errors=array() ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $mid = intval( $this->ipsclass->input['mid'] ); + $key = intval( $this->ipsclass->input['key'] ); + $final_errors = array(); + + //----------------------------------------- + // Get DB row + //----------------------------------------- + + $reg = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', + 'from' => 'members_partial', + 'where' => "partial_member_id={$mid} AND partial_date={$key}" ) ); + + //----------------------------------------- + // Got it? + //----------------------------------------- + + if ( ! $reg['partial_id'] ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'data_incorrect' ) ); + } + + //----------------------------------------- + // Custom profile fields stuff + //----------------------------------------- + + $required_output = ""; + + require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); + $fields = new custom_fields( $this->ipsclass->DB ); + + $fields->cache_data = $this->ipsclass->cache['profilefields']; + + $fields->init_data(); + $fields->parse_to_register(); + + foreach( $fields->out_fields as $id => $data ) + { + if ( $fields->cache_data[ $id ]['pf_not_null'] == 1 ) + { + $ftype = 'required_output'; + } + else + { + continue; + } + + if ( $fields->cache_data[ $id ]['pf_type'] == 'drop' ) + { + $form_element = $this->ipsclass->compiled_templates['skin_register']->field_dropdown( 'field_'.$id, $data ); + } + else if ( $fields->cache_data[ $id ]['pf_type'] == 'area' ) + { + $data = $this->ipsclass->input['field_'.$id] ? $this->ipsclass->input['field_'.$id] : $data; + $form_element = $this->ipsclass->compiled_templates['skin_register']->field_textarea( 'field_'.$id, $data ); + } + else + { + $data = $this->ipsclass->input['field_'.$id] ? $this->ipsclass->input['field_'.$id] : $data; + $form_element = $this->ipsclass->compiled_templates['skin_register']->field_textinput( 'field_'.$id, $data ); + } + + ${$ftype} .= $this->ipsclass->compiled_templates['skin_register']->field_entry( $fields->field_names[ $id ], $fields->field_desc[ $id ], $form_element ); + } + + //----------------------------------------- + // ERROR CHECK + //----------------------------------------- + + if ( is_array( $form_errors['general'] ) AND count( $form_errors['general'] ) ) + { + $this->output .= $this->ipsclass->compiled_templates['skin_register']->errors( implode( "
    ", $form_errors['general'] ) ); + } + + //----------------------------------------- + // Other errors + //----------------------------------------- + + foreach( array( 'username', 'dname', 'password', 'email' ) as $thing ) + { + if ( is_array( $form_errors[ $thing ] ) AND count( $form_errors[ $thing ] ) ) + { + $final_errors[ $thing ] = implode( "
    ", $form_errors[ $thing ] ); + } + } + + //----------------------------------------- + // No display name? + //----------------------------------------- + + if ( ! $this->ipsclass->member['members_display_name'] ) + { + $this->ipsclass->member['members_display_name'] = $this->ipsclass->member['email']; + } + + //----------------------------------------- + // Show the form (email and display name) + //----------------------------------------- + + $this->output .= $this->ipsclass->compiled_templates['skin_register']->reg_complete_login( $mid, $key, $required_output, $final_errors, $reg ); + $this->page_title = $this->ipsclass->lang['clogin_title']; + $this->nav = array( $this->ipsclass->lang['clogin_title'] ); + } + + /*-------------------------------------------------------------------------*/ + // Show "check revalidate form" er.. form. thing. + /*-------------------------------------------------------------------------*/ + + function revalidate_one($errors="") + { + if ($errors != "") + { + $this->output .= $this->ipsclass->compiled_templates['skin_register']->errors( $this->ipsclass->lang[$errors] ); + } + + $name = $this->ipsclass->member['id'] == "" ? '' : + ( $this->ipsclass->vars['ipbli_usertype'] == 'username' ? $this->ipsclass->member['name'] : $this->ipsclass->member['email'] ); + + $this->ipsclass->lang['rv_ins'] = sprintf( $this->ipsclass->lang['rv_ins'], strtolower( $this->ipsclass->vars['ipbli_usertype'] == 'username' ? $this->ipsclass->lang['rv_name'] : $this->ipsclass->lang['rv_email'] ) ); + + $this->output .= $this->ipsclass->compiled_templates['skin_register']->show_revalidate_form($name); + $this->page_title = $this->ipsclass->lang['rv_title']; + $this->nav = array( $this->ipsclass->lang['rv_title'] ); + } + + /*-------------------------------------------------------------------------*/ + // Complete revalidation + /*-------------------------------------------------------------------------*/ + + function revalidate_two() + { + //----------------------------------------- + // Check in the DB for entered member name + //----------------------------------------- + + if ( $_POST['username'] == "" ) + { + $this->revalidate_one('err_no_username'); + return; + } + + $username = $this->ipsclass->input['username']; + + if ( $this->ipsclass->vars['ipbli_usertype'] == 'username' ) + { + $this->ipsclass->DB->cache_add_query( 'login_getmember', array( 'username' => $username ) ); + $this->ipsclass->DB->cache_exec_query(); + + $member = $this->ipsclass->DB->fetch_row(); + + //----------------------------------------- + // Got a username? + //----------------------------------------- + + if ( ! $member['id'] ) + { + $this->revalidate_one('err_no_username'); + return; + } + + $this->ipsclass->converge->converge_load_member( $member['email'] ); + + if ( ! $this->ipsclass->converge->member['converge_id'] ) + { + $this->revalidate_one('err_no_username'); + return; + } + } + + //----------------------------------------- + // EMAIL LOG IN + //----------------------------------------- + + else + { + $email = $username; + + $this->ipsclass->converge->converge_load_member( $email ); + + if ( $this->ipsclass->converge->member['converge_id'] ) + { + $this->ipsclass->DB->build_query( array( + 'select' => 'm.*', + 'from' => array( 'members' => 'm' ), + 'where' => "email='".strtolower($username)."'", + 'add_join' => array( 0 => array( 'select' => 'g.*', + 'from' => array( 'groups' => 'g' ), + 'where' => 'g.g_id=m.mgroup', + 'type' => 'inner' + ) + ) + ) ); + + $this->ipsclass->DB->exec_query(); + + $member = $this->ipsclass->DB->fetch_row(); + + if ( ! $member['id'] ) + { + $this->revalidate_one('err_no_username'); + return; + } + } + else + { + $this->revalidate_one('err_no_username'); + return; + } + } + + //----------------------------------------- + // Check in the DB for any validations + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'validating', 'where' => "member_id=".intval($member['id']) ) ); + $this->ipsclass->DB->simple_exec(); + + if ( ! $val = $this->ipsclass->DB->fetch_row() ) + { + $this->revalidate_one('err_no_validations'); + return; + } + + //----------------------------------------- + // Which type is it then? + //----------------------------------------- + + if ( $val['lost_pass'] == 1 ) + { + $this->email->get_template("lost_pass"); + + $this->email->build_message( array( + 'NAME' => $member['members_display_name'], + 'THE_LINK' => $this->base_url_nosess."?act=Reg&CODE=lostpassform&uid=".$member['id']."&aid=".$val['vid'], + 'MAN_LINK' => $this->base_url_nosess."?act=Reg&CODE=lostpassform", + 'EMAIL' => $member['email'], + 'ID' => $member['id'], + 'CODE' => $val['vid'], + 'IP_ADDRESS' => $this->ipsclass->input['IP_ADDRESS'], + ) + ); + + $this->email->subject = $this->ipsclass->lang['lp_subject'].' '.$this->ipsclass->vars['board_name']; + $this->email->to = $member['email']; + + $this->email->send_mail(); + } + else if ( $val['new_reg'] == 1 ) + { + $this->email->get_template("reg_validate"); + + $this->email->build_message( array( + 'THE_LINK' => $this->base_url_nosess."?act=Reg&CODE=03&uid=".$member['id']."&aid=".$val['vid'], + 'NAME' => $member['members_display_name'], + 'MAN_LINK' => $this->base_url_nosess."?act=Reg&CODE=05", + 'EMAIL' => $member['email'], + 'ID' => $member['id'], + 'CODE' => $val['vid'], + ) + ); + + $this->email->subject = $this->ipsclass->lang['email_reg_subj']." ".$this->ipsclass->vars['board_name']; + $this->email->to = $member['email']; + + $this->email->send_mail(); + } + else if ( $val['email_chg'] == 1 ) + { + $this->email->get_template("newemail"); + + $this->email->build_message( array( + 'NAME' => $member['members_display_name'], + 'THE_LINK' => $this->base_url_nosess."?act=Reg&CODE=03&type=newemail&uid=".$member['id']."&aid=".$val['vid'], + 'ID' => $member['id'], + 'MAN_LINK' => $this->base_url_nosess."?act=Reg&CODE=07", + 'CODE' => $val['vid'], + ) + ); + + $this->email->subject = $this->ipsclass->lang['ne_subject'].' '.$this->ipsclass->vars['board_name']; + $this->email->to = $member['email']; + + $this->email->send_mail(); + } + else + { + $this->revalidate_one('err_no_validations'); + return; + } + + $this->output .= $this->ipsclass->compiled_templates['skin_register']->show_revalidated(); + + $this->page_title = $this->ipsclass->lang['rv_title']; + $this->nav = array( $this->ipsclass->lang['rv_title'] ); + } + + + /*-------------------------------------------------------------------------*/ + // Coppa Start + /*-------------------------------------------------------------------------*/ + + function coppa_perms_form() + { + /* Keith said to strip these out - it's all his fault :( */ + $this->ipsclass->vars['coppa_address'] = str_replace( '
    ', '', $this->ipsclass->vars['coppa_address'] ); + $this->ipsclass->vars['coppa_address'] = str_replace( '
    ', '', $this->ipsclass->vars['coppa_address'] ); + + $this->ipsclass->vars['coppa_address'] = nl2br($this->ipsclass->vars['coppa_address']); + + echo($this->ipsclass->compiled_templates['skin_register']->coppa_form()); + exit(); + } + + /*-------------------------------------------------------------------------*/ + // Coppa form + /*-------------------------------------------------------------------------*/ + + function coppa_start() + { + $coppa_date = date( 'j-F y', mktime(0,0,0,date("m"),date("d"),date("Y")-13) ); + + $this->ipsclass->lang['coppa_form_text'] = str_replace( "<#FORM_LINK#>", "{$this->ipsclass->lang['coppa_link_form']}", $this->ipsclass->lang['coppa_form_text']); + + $this->output .= $this->ipsclass->compiled_templates['skin_register']->coppa_start($coppa_date); + + $this->page_title = $this->ipsclass->lang['coppa_title']; + + $this->nav = array( $this->ipsclass->lang['coppa_title'] ); + } + + /*-------------------------------------------------------------------------*/ + // Coppa print + /*-------------------------------------------------------------------------*/ + + function coppa_two() + { + if( !$this->ipsclass->input['m'] OR !$this->ipsclass->input['d'] OR !$this->ipsclass->input['y'] ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'coppa_form_fill' ) ); + } + + $birthday = mktime( 0, 0, 0, intval($this->ipsclass->input['m']), intval($this->ipsclass->input['d']), intval($this->ipsclass->input['y']) ); + $coppa = mktime( 0, 0, 0, date("m"), date("d"), date("Y")-13 ); + + if( $birthday <= $coppa ) + { + $this->show_reg_form(); + return; + } + + + $this->ipsclass->lang['coppa_form_text'] = str_replace( "<#FORM_LINK#>", "{$this->ipsclass->lang['coppa_link_form']}", $this->ipsclass->lang['coppa_form_text']); + + $this->output .= $this->ipsclass->compiled_templates['skin_register']->coppa_two(); + + $this->page_title = $this->ipsclass->lang['coppa_title']; + + $this->nav = array( $this->ipsclass->lang['coppa_title'] ); + } + + /*-------------------------------------------------------------------------*/ + // lost_password_start + /*-------------------------------------------------------------------------*/ + + function lost_password_start($errors="") + { + //----------------------------------------- + // Do we have another URL that one needs + // to visit to reset their password? + //----------------------------------------- + + $this->login_method = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_enabled=1' ) ); + + if ( $this->login_method['login_maintain_url'] ) + { + $this->ipsclass->boink_it( $this->login_method['login_maintain_url'] ); + exit(); + } + + if ( $this->ipsclass->vars['bot_antispam'] ) + { + // Grab CAPTCHA template bit + require_once( KERNEL_PATH . 'class_captcha.php' ); + $captchaClass = new class_captcha( $this->ipsclass, $this->ipsclass->vars['bot_antispam_type'] ); + $captchaHTML = $captchaClass->getTemplate(); + } + + $this->page_title = $this->ipsclass->lang['lost_pass_form']; + + $this->nav = array( $this->ipsclass->lang['lost_pass_form'] ); + + if ($errors != "") + { + $this->output .= $this->ipsclass->compiled_templates['skin_register']->errors( $this->ipsclass->lang[$errors]); + } + + $this->output .= $this->ipsclass->compiled_templates['skin_register']->lost_pass_form($regid); + + if ($this->ipsclass->vars['bot_antispam'] ) + { + $this->output = str_replace( "", $captchaHTML, $this->output ); + } + } + + /*-------------------------------------------------------------------------*/ + // LOST PASSWORD: SEND + /*-------------------------------------------------------------------------*/ + + function lost_password_end() + { + if ($this->ipsclass->vars['bot_antispam']) + { + // Validate CAPTCHA + require_once( KERNEL_PATH . 'class_captcha.php' ); + $captchaClass = new class_captcha( $this->ipsclass, $this->ipsclass->vars['bot_antispam_type'] ); + + if ( $captchaClass->validate() !== TRUE ) + { + $this->lost_password_start('err_reg_code'); + return; + } + } + + //----------------------------------------- + // Back to the usual programming! :o + //----------------------------------------- + + if ($_POST['member_name'] == "" AND $_POST['email_addy'] == "") + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_username' ) ); + } + + //----------------------------------------- + // Check for input and it's in a valid format. + //----------------------------------------- + + $member_name = trim(strtolower($this->ipsclass->input['member_name'])); + $email_addy = trim(strtolower($this->ipsclass->input['email_addy'])); + + if ($member_name == "" AND $email_addy == "" ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_username' ) ); + } + + //----------------------------------------- + // Attempt to get the user details from the DB + //----------------------------------------- + + if ( $this->ipsclass->vars['ipbli_usertype'] == 'username' ) + { + if( $member_name ) + { + $this->ipsclass->DB->simple_construct( array( 'select' => 'members_display_name, name, id, email, mgroup', 'from' => 'members', 'where' => "members_l_username='{$member_name}'" ) ); + $this->ipsclass->DB->simple_exec(); + } + else if( $email_addy ) + { + $this->ipsclass->DB->simple_construct( array( 'select' => 'members_display_name, name, id, email, mgroup', 'from' => 'members', 'where' => "email='{$email_addy}'" ) ); + $this->ipsclass->DB->simple_exec(); + } + } + else + { + // We don't use the 'email_addy' input if usertype is email + $email_addy = ""; + + $this->ipsclass->DB->simple_construct( array( 'select' => 'members_display_name, name, id, email, mgroup', 'from' => 'members', 'where' => "email='{$member_name}'" ) ); + $this->ipsclass->DB->simple_exec(); + } + + if ( ! $this->ipsclass->DB->get_num_rows() ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_such_user' ) ); + } + else + { + $member = $this->ipsclass->DB->fetch_row(); + + //----------------------------------------- + // Is there a validation key? If so, we'd better not touch it + //----------------------------------------- + + if ($member['id'] == "") + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_such_user' ) ); + } + + $validate_key = md5( $this->ipsclass->make_password() . uniqid( mt_rand(), TRUE ) ); + + //----------------------------------------- + // Get rid of old entries for this member + //----------------------------------------- + + $this->ipsclass->DB->do_delete( 'validating', "member_id={$member['id']} AND lost_pass=1" ); + + //----------------------------------------- + // Update the DB for this member. + //----------------------------------------- + + $db_str = array( + 'vid' => $validate_key, + 'member_id' => $member['id'], + #'real_group' => $member['mgroup'], + 'temp_group' => $member['mgroup'], + 'entry_date' => time(), + 'coppa_user' => 0, + 'lost_pass' => 1, + 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], + ); + + // Are they already in the validating group? + + if( $member['mgroup'] != $this->ipsclass->vars['auth_group'] ) + { + $db_str['real_group'] = $member['mgroup']; + } + + $this->ipsclass->DB->do_insert( 'validating', $db_str ); + + //----------------------------------------- + // Send out the email. + //----------------------------------------- + + $this->email->get_template("lost_pass"); + + $this->email->build_message( array( + 'NAME' => $member['members_display_name'], + 'THE_LINK' => $this->base_url_nosess."?act=Reg&CODE=lostpassform&uid=".$member['id']."&aid=".$validate_key, + 'MAN_LINK' => $this->base_url_nosess."?act=Reg&CODE=lostpassform", + 'EMAIL' => $member['email'], + 'ID' => $member['id'], + 'CODE' => $validate_key, + 'IP_ADDRESS' => $this->ipsclass->input['IP_ADDRESS'], + ) + ); + + $this->email->subject = $this->ipsclass->lang['lp_subject'].' '.$this->ipsclass->vars['board_name']; + $this->email->to = $member['email']; + + $this->email->send_mail(); + + $this->output = $this->ipsclass->compiled_templates['skin_register']->show_lostpasswait( $member ); + } + + $this->page_title = $this->ipsclass->lang['lpf_title']; + } + + /*-------------------------------------------------------------------------*/ + // show_reg_form + /*-------------------------------------------------------------------------*/ + + function show_reg_form($form_errors = array()) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $final_errors = array(); + $captchaHTML = ''; + + if ( $this->ipsclass->vars['no_reg'] == 1 ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'reg_off' ) ); + } + + $coppa = $this->ipsclass->my_getcookie( 'coppa' ); + //$coppa = (isset($this->ipsclass->input['coppa_user']) AND $this->ipsclass->input['coppa_user'] == 1) ? 1 : 0; + + if( $coppa == 'yes' ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'awaiting_coppa' ) ); + } + + $this->ipsclass->vars['username_errormsg'] = str_replace( '{chars}', $this->ipsclass->vars['username_characters'], $this->ipsclass->vars['username_errormsg'] ); + + //----------------------------------------- + // Read T&Cs yet? + //----------------------------------------- + + if ( !isset($this->ipsclass->input['termsread']) OR !$this->ipsclass->input['termsread'] ) + { + if ( $this->ipsclass->member['id'] ) + { + //----------------------------------------- + // Log member out + //----------------------------------------- + + require_once( ROOT_PATH.'sources/action_public/login.php' ); + $login = new login(); + $login->ipsclass =& $this->ipsclass; + $login->do_log_out( 0 ); + } + + //----------------------------------------- + // Continue + //----------------------------------------- + + $cache = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'conf_settings', 'where' => "conf_key='reg_rules'" ) ); + + $text = $cache['conf_value'] ? $cache['conf_value'] : $cache['conf_default']; + + $this->page_title = $this->ipsclass->lang['registration_form']; + $this->nav = array( $this->ipsclass->lang['registration_form'] ); + + $this->output .= $this->ipsclass->compiled_templates['skin_register']->show_terms( $this->ipsclass->my_nl2br($text), $coppa ); + return; + } + else + { + //----------------------------------------- + // Did we agree to the t&c? + //----------------------------------------- + + if ( ! $this->ipsclass->input['agree_to_terms'] ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'reg_no_agree', 'EXTRA' => $this->ipsclass->base_url ) ); + } + } + + //----------------------------------------- + // Do we have another URL that one needs + // to visit to register? + //----------------------------------------- + + $this->login_method = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_enabled=1' ) ); + + if ( $this->login_method['login_register_url'] ) + { + $this->ipsclass->boink_it( $this->login_method['login_register_url'] ); + exit(); + } + + //----------------------------------------- + // Continue... + //----------------------------------------- + + if ( $this->ipsclass->vars['reg_auth_type'] ) + { + if ( $this->ipsclass->vars['reg_auth_type'] == 'admin_user' OR $this->ipsclass->vars['reg_auth_type'] == 'user' ) + { + $this->ipsclass->lang['std_text'] .= "
    " . $this->ipsclass->lang['email_validate_text']; + } + + //----------------------------------------- + // User then admin? + //----------------------------------------- + + if ( $this->ipsclass->vars['reg_auth_type'] == 'admin_user' ) + { + $this->ipsclass->lang['std_text'] .= "
    " . $this->ipsclass->lang['user_admin_validation']; + } + + if ( $this->ipsclass->vars['reg_auth_type'] == 'admin' ) + { + $this->ipsclass->lang['std_text'] .= "
    " . $this->ipsclass->lang['just_admin_validation']; + } + } + + //----------------------------------------- + // Clean out anti-spam stuffy + //----------------------------------------- + + if ( $this->ipsclass->vars['bot_antispam'] ) + { + // Grab CAPTCHA template bit + require_once( KERNEL_PATH . 'class_captcha.php' ); + $captchaClass = new class_captcha( $this->ipsclass, $this->ipsclass->vars['bot_antispam_type'] ); + $captchaHTML = $captchaClass->getTemplate(); + } + + //----------------------------------------- + // Custom profile fields stuff + //----------------------------------------- + + $required_output = ""; + $optional_output = ""; + + require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); + $fields = new custom_fields( $this->ipsclass->DB ); + + $fields->cache_data = $this->ipsclass->cache['profilefields']; + + $fields->init_data(); + $fields->parse_to_register(); + + foreach( $fields->out_fields as $id => $data ) + { + $error = ""; + + if ( $fields->cache_data[ $id ]['pf_not_null'] == 1 ) + { + $ftype = 'required_output'; + } + else + { + $ftype = 'optional_output'; + } + + if( isset($form_errors['cfield_'.$id]) AND count( $form_errors['cfield_'.$id] ) ) + { + $error = implode( "
    ", $form_errors['cfield_'.$id] ); + } + + if ( $fields->cache_data[ $id ]['pf_type'] == 'drop' ) + { + $form_element = $this->ipsclass->compiled_templates['skin_register']->field_dropdown( 'field_'.$id, $data, $error ); + } + else if ( $fields->cache_data[ $id ]['pf_type'] == 'area' ) + { + $data = $this->ipsclass->input['field_'.$id] ? $this->ipsclass->input['field_'.$id] : $data; + $data = $this->ipsclass->my_br2nl( $data ); + $form_element = $this->ipsclass->compiled_templates['skin_register']->field_textarea( 'field_'.$id, $data, $error ); + } + else + { + $data = isset($this->ipsclass->input['field_'.$id]) ? $this->ipsclass->input['field_'.$id] : $data; + $form_element = $this->ipsclass->compiled_templates['skin_register']->field_textinput( 'field_'.$id, $data, $error ); + } + + ${$ftype} .= $this->ipsclass->compiled_templates['skin_register']->field_entry( $fields->field_names[ $id ], $fields->field_desc[ $id ], $form_element, $id, $error ); + } + + $this->page_title = $this->ipsclass->lang['registration_form']; + $this->nav = array( $this->ipsclass->lang['registration_form'] ); + + //----------------------------------------- + // ERROR CHECK + //----------------------------------------- + + if ( isset($form_errors['general']) AND is_array( $form_errors['general'] ) AND count( $form_errors['general'] ) ) + { + $this->output .= $this->ipsclass->compiled_templates['skin_register']->errors( implode( "
    ", $form_errors['general'] ) ); + } + + //----------------------------------------- + // Other errors + //----------------------------------------- + + $final_errors = array( 'username' => NULL, 'dname' => NULL, 'password' => NULL, 'email' => NULL ); + + foreach( array( 'username', 'dname', 'password', 'email' ) as $thing ) + { + if ( isset($form_errors[ $thing ]) AND is_array( $form_errors[ $thing ] ) AND count( $form_errors[ $thing ] ) ) + { + $final_errors[ $thing ] = implode( "
    ", $form_errors[ $thing ] ); + } + } + + $this->ipsclass->input['UserName'] = isset($this->ipsclass->input['UserName']) ? $this->ipsclass->input['UserName'] : ''; + $this->ipsclass->input['PassWord'] = isset($this->ipsclass->input['PassWord']) ? $this->ipsclass->input['PassWord'] : ''; + $this->ipsclass->input['EmailAddress'] = isset($this->ipsclass->input['EmailAddress']) ? $this->ipsclass->input['EmailAddress'] : ''; + $this->ipsclass->input['EmailAddress_two'] = isset($this->ipsclass->input['EmailAddress_two']) ? $this->ipsclass->input['EmailAddress_two'] : ''; + $this->ipsclass->input['PassWord_Check'] = isset($this->ipsclass->input['PassWord_Check']) ? $this->ipsclass->input['PassWord_Check'] : ''; + $this->ipsclass->input['members_display_name'] = isset($this->ipsclass->input['members_display_name']) ? $this->ipsclass->input['members_display_name'] : ''; + $this->ipsclass->input['time_offset'] = isset($this->ipsclass->input['time_offset']) ? $this->ipsclass->input['time_offset'] : ''; + $this->ipsclass->input['allow_member_mail'] = isset($this->ipsclass->input['allow_member_mail']) ? $this->ipsclass->input['allow_member_mail'] : ''; + $this->ipsclass->input['dst'] = isset($this->ipsclass->input['dst']) ? $this->ipsclass->input['dst'] : ''; + + $this->output .= $this->ipsclass->compiled_templates['skin_register']->ShowForm( array( 'TEXT' => $this->ipsclass->lang['std_text'], 'coppa_user' => $coppa ), $final_errors ); + + //----------------------------------------- + // Replace elements + //----------------------------------------- + + if ($this->ipsclass->vars['bot_antispam'] ) + { + $this->output = str_replace( "", $captchaHTML, $this->output ); + } + + if ($required_output != "") + { + $this->output = str_replace( "", "\n".$required_output, $this->output ); + } + + if ($optional_output != "") + { + $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_register']->optional_title()."\n".$optional_output, $this->output ); + } + + //----------------------------------------- + // Time zone... + //----------------------------------------- + + $this->ipsclass->load_language('lang_ucp'); + + $offset = ( $this->ipsclass->input['time_offset'] != "" ) ? $this->ipsclass->input['time_offset'] : $this->ipsclass->vars['time_offset']; + + $time_select = ""; + + $this->output = str_replace( "", "\n".$time_select, $this->output ); + + //----------------------------------------- + // Boxes checked? + //----------------------------------------- + + $admin_checked = 'checked="checked"'; + + if ( $this->ipsclass->input['CODE'] == '02' ) + { + //----------------------------------------- + // Form submitted... + //----------------------------------------- + + if ( ! $this->ipsclass->input['allow_admin_mail'] ) + { + $admin_checked = ''; + } + } + + $member_checked = $this->ipsclass->input['allow_member_mail'] ? 'checked="checked"' : ''; + $dst_checked = $this->ipsclass->input['dst'] ? 'checked="checked"' : ''; + + $this->output = str_replace( "" , $admin_checked , $this->output ); + $this->output = str_replace( "", $member_checked, $this->output ); + $this->output = str_replace( "" , $dst_checked , $this->output ); + + //----------------------------------------- + // Subscribe on register? + //----------------------------------------- + + $all_currency = array(); + $def_currency = ""; + $subs = array(); + $subs_output = ""; + $desc_output = ""; + + if ( $this->ipsclass->vars['subsm_show_reg'] ) + { + $this->ipsclass->load_language('lang_subscriptions'); + + //----------------------------------------- + // Get currency buns! + // Ok, we did that joke in another module and it + // wasn't funny then + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'subscription_currency' ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $c = $this->ipsclass->DB->fetch_row() ) + { + $all_currency[ $c['subcurrency_code'] ] = $c; + + if ( $c['subcurrency_default'] ) + { + $def_currency = $c; + } + } + + //----------------------------------------- + // Get subscription packages + //----------------------------------------- + + $sub_output = $this->ipsclass->compiled_templates['skin_register']->subsm_start( $def_currency['subcurrency_code'] ); + + //----------------------------------------- + // Enforcing? + //----------------------------------------- + + if ( ! $this->ipsclass->vars['subsm_enforce'] ) + { + $sub_output .= $this->ipsclass->compiled_templates['skin_register']->subsm_row( '0', $this->ipsclass->lang['subsm_none'], '0.00', $this->ipsclass->lang['subsm_na'] ); + } + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'subscriptions', 'order' => 'sub_cost' ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $row = $this->ipsclass->DB->fetch_row() ) + { + $duration = $row['sub_length']; + + if ( $duration > 1 ) + { + $duration .= ' '.$this->ipsclass->lang[ 'timep_'.$row['sub_unit'] ]; + } + else + { + $duration .= ' '.$this->ipsclass->lang[ 'time_'.$row['sub_unit'] ]; + } + + $duration = ($row['sub_unit'] == 'x') ? $this->ipsclass->lang['no_expire'] : $duration; + + $sub_output .= $this->ipsclass->compiled_templates['skin_register']->subsm_row( $row['sub_id'], + $row['sub_title'], + sprintf( "%.2f", $row['sub_cost'] * $def_currency['subcurrency_exchange'] ), + $duration + ); + $desc_output .= "\n subdesc[{$row['sub_id']}] = '".str_replace( "'", "\\'", str_replace( "\n", '\n',$row['sub_desc'] ) )."';"; + } + + $sub_output .= $this->ipsclass->compiled_templates['skin_register']->subsm_end(); + + //----------------------------------------- + // Parse 'n show + //----------------------------------------- + + if ( $sub_output ) + { + $this->output = str_replace( '', $sub_output , $this->output ); + $this->output = str_replace( '', str_replace( "\r", "", $desc_output ), $this->output ); + } + + } + + if ( USE_MODULES == 1 ) + { + $this->modules->register_class($this); + $this->modules->on_register_form(); + } + } + + /*-------------------------------------------------------------------------*/ + // create_account + /*-------------------------------------------------------------------------*/ + + function create_account() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + if( $this->ipsclass->vars['ipbli_usertype'] == 'email' ) + { + $this->ipsclass->input['UserName'] = $this->ipsclass->input['members_display_name']; + } + + $form_errors = array(); + $coppa = ($this->ipsclass->input['coppa_user'] == 1) ? 1 : 0; + $in_username = str_replace( '|', '|' , $this->ipsclass->input['UserName'] ); + $in_password = trim($this->ipsclass->input['PassWord']); + $in_email = strtolower( trim($this->ipsclass->input['EmailAddress']) ); + $banfilters = array(); + $members_display_name = trim( $this->ipsclass->input['members_display_name'] ); + + //----------------------------------------- + // Load ban filters + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'banfilters' ) ); + $this->ipsclass->DB->simple_exec(); + + while( $r = $this->ipsclass->DB->fetch_row() ) + { + $banfilters[ $r['ban_type'] ][] = $r['ban_content']; + } + + //----------------------------------------- + // Check + //----------------------------------------- + + if ($_POST['act'] == "") + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'complete_form' ) ); + } + + if ($this->ipsclass->vars['no_reg'] == 1) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'reg_off' ) ); + } + + //----------------------------------------- + // Custom profile field stuff + //----------------------------------------- + + require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); + $fields = new custom_fields( $this->ipsclass->DB ); + + $fields->cache_data = $this->ipsclass->cache['profilefields']; + + $fields->init_data(); + $fields->parse_to_save( 1 ); + + //----------------------------------------- + // Check... + //----------------------------------------- + + if ( count( $fields->error_fields['empty'] ) ) + { + foreach( $fields->error_fields['empty'] as $cfield ) + { + $form_errors['cfield_'.$cfield['pf_id']][$this->ipsclass->lang['err_complete_form']] = $this->ipsclass->lang['err_complete_form']; + } + } + + if ( count( $fields->error_fields['invalid'] ) ) + { + foreach( $fields->error_fields['invalid'] as $cfield ) + { + $form_errors['cfield_'.$cfield['pf_id']][$this->ipsclass->lang['err_invalid']] = $this->ipsclass->lang['err_invalid']; + } + } + + if ( count( $fields->error_fields['toobig'] ) ) + { + foreach( $fields->error_fields['toobig'] as $cfield ) + { + $form_errors['cfield_'.$cfield['pf_id']][$this->ipsclass->lang['err_cf_to_long']] = $this->ipsclass->lang['err_cf_to_long']; + } + } + + //----------------------------------------- + // Remove multiple spaces in the username + //----------------------------------------- + + $in_username = preg_replace( "/\s{2,}/", " ", $in_username ); + + //----------------------------------------- + // Remove linebreaks if set to + //----------------------------------------- + + if( $this->ipsclass->vars['usernames_nobr'] ) + { + $in_username = $this->ipsclass->my_br2nl( $in_username ); + $in_username = str_replace( "\n", "", $in_username ); + $in_username = str_replace( "\r", "", $in_username ); + + $members_display_name = $this->ipsclass->my_br2nl( $members_display_name ); + $members_display_name = str_replace( "\n", "", $members_display_name ); + $members_display_name = str_replace( "\r", "", $members_display_name ); + } + + //----------------------------------------- + // Remove 'sneaky' spaces + //----------------------------------------- + + if ( $this->ipsclass->vars['strip_space_chr'] ) + { + // use hexdec to convert between '0xAD' and chr + $in_username = str_replace( chr(160), ' ', $in_username ); + $in_username = str_replace( chr(173), ' ', $in_username ); + $in_username = str_replace( chr(240), ' ', $in_username ); + $members_display_name = str_replace( chr(160), ' ', $members_display_name ); + $members_display_name = str_replace( chr(173), ' ', $members_display_name ); + $members_display_name = str_replace( chr(240), ' ', $members_display_name ); + } + + //----------------------------------------- + // Trim up.. + //----------------------------------------- + + $in_username = trim($in_username); + + //----------------------------------------- + // Test unicode name too + //----------------------------------------- + + $unicode_name = preg_replace_callback('/&#([0-9]+);/si', create_function( '$matches', 'return chr($matches[1]);' ), $in_username); + $unicode_name = str_replace( "'" , ''', $unicode_name ); + $unicode_name = str_replace( "\\", '\', $unicode_name ); + + $unicode_dname = preg_replace_callback('/&#([0-9]+);/si', create_function( '$matches', 'return chr($matches[1]);' ), $members_display_name); + $unicode_dname = str_replace( "'" , ''', $unicode_dname ); + $unicode_dname = str_replace( "\\", '\', $unicode_dname ); + + //----------------------------------------- + // Check the email address + //----------------------------------------- + + $in_email = $this->ipsclass->clean_email($in_email); + + if ( ! $in_email OR strlen($in_email) < 6 ) + { + $form_errors['email'][$this->ipsclass->lang['err_invalid_email']] = $this->ipsclass->lang['err_invalid_email']; + } + + //----------------------------------------- + // Test email address + //----------------------------------------- + + $this->ipsclass->input['EmailAddress_two'] = strtolower( trim($this->ipsclass->input['EmailAddress_two']) ); + $this->ipsclass->input['EmailAddress'] = strtolower( trim($this->ipsclass->input['EmailAddress']) ); + + if( preg_match( "#[\;\#\n\r\*\'\"<>&\%\!\(\)\{\}\[\]\?\\/\s]#", $this->ipsclass->input['EmailAddress_two']) ) + { + $form_errors['email'][$this->ipsclass->lang['reg_error_email_invalid']] = $this->ipsclass->lang['reg_error_email_invalid']; + } + else + { + if ( $in_email AND $this->ipsclass->input['EmailAddress_two'] != $in_email) + { + $form_errors['email'][$this->ipsclass->lang['reg_error_email_nm']] = $this->ipsclass->lang['reg_error_email_nm']; + } + } + + //----------------------------------------- + // More unicode.. + //----------------------------------------- + + $len_u = preg_replace("/&#([0-9]+);/", "-", $in_username ); + $len_p = preg_replace("/&#([0-9]+);/", "-", $in_password ); + $len_d = preg_replace("/&#([0-9]+);/", "-", $members_display_name ); + + //----------------------------------------- + // Test dname + //----------------------------------------- + + if ( $this->ipsclass->vars['auth_allow_dnames'] ) + { + if ( ! $members_display_name OR strlen($len_d) < 3 OR strlen($len_d) > $this->ipsclass->vars['max_user_name_length'] ) + { + $form_errors['dname'][$this->ipsclass->lang['reg_error_no_name']] = $this->ipsclass->lang['reg_error_no_name']; + } + } + + if( $this->ipsclass->vars['username_characters'] ) + { + $check_against = preg_quote( $this->ipsclass->vars['username_characters'], "/" ); + + if( !preg_match( "/^[".$check_against."]+$/i", $_POST['UserName'] ) && $this->ipsclass->vars['ipbli_usertype'] == 'username' ) + { + $msg = str_replace( '{chars}', $this->ipsclass->vars['username_characters'], $this->ipsclass->vars['username_errormsg'] ); + $form_errors['username'][$msg] = $msg; + } + + if( !preg_match( "/^[".$check_against."]+$/i", $_POST['members_display_name'] ) && $this->ipsclass->vars['auth_allow_dnames'] ) + { + $msg = str_replace( '{chars}', $this->ipsclass->vars['username_characters'], $this->ipsclass->vars['username_errormsg'] ); + $form_errors['dname'][$msg] = $msg; + } + } + + //----------------------------------------- + // Check for errors in the input. + //----------------------------------------- + + if ( ! $in_username OR strlen($len_u) < 3 OR strlen($len_u) > $this->ipsclass->vars['max_user_name_length'] ) + { + $form_errors['username'][$this->ipsclass->lang['reg_error_username_none']] = $this->ipsclass->lang['reg_error_username_none']; + } + + if (! $in_password OR strlen($len_p) < 3 ) + { + $form_errors['password'][$this->ipsclass->lang['reg_error_no_pass']] = $this->ipsclass->lang['reg_error_no_pass']; + } + + if ($this->ipsclass->input['PassWord_Check'] != $in_password) + { + $form_errors['password'][$this->ipsclass->lang['reg_error_pass_nm']] = $this->ipsclass->lang['reg_error_pass_nm']; + } + + //----------------------------------------- + // CHECK 1: Any errors (missing fields, etc)? + //----------------------------------------- + + if ( count( $form_errors ) ) + { + $this->show_reg_form( $form_errors ); + return; + } + + //----------------------------------------- + // USERNAME: Is this name already taken? + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'login_getmember', array( 'username' => strtolower($in_username) ) ); + $this->ipsclass->DB->cache_exec_query(); + + $name_check = $this->ipsclass->DB->fetch_row(); + + if ( $name_check['id'] ) + { + $form_errors['username'][$this->ipsclass->lang['reg_error_username_taken']] = $this->ipsclass->lang['reg_error_username_taken']; + } + + //----------------------------------------- + // USERNAME: Is this name already taken (display)? + //----------------------------------------- + + if ( $this->ipsclass->vars['auth_allow_dnames'] ) + { + if ( $this->ipsclass->vars['auth_dnames_nologinname'] ) + { + $this->ipsclass->DB->build_query( array( 'select' => "members_display_name, id", + 'from' => 'members', + 'where' => "members_l_display_name='".strtolower($in_username)."'", + 'limit' => array( 0,1 ) ) ); + + $this->ipsclass->DB->exec_query(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + $form_errors['username'][$this->ipsclass->lang['reg_error_username_taken']] = $this->ipsclass->lang['reg_error_username_taken']; + } + } + } + + //----------------------------------------- + // USERNAME: Special chars? + //----------------------------------------- + + if ( $unicode_name != $in_username ) + { + $this->ipsclass->DB->cache_add_query( 'login_getmember', array( 'username' => $this->ipsclass->DB->add_slashes(strtolower($unicode_name) ) )); + $this->ipsclass->DB->cache_exec_query(); + + $name_check = $this->ipsclass->DB->fetch_row(); + + if ($name_check['id']) + { + $form_errors['username'][$this->ipsclass->lang['reg_error_username_taken']] = $this->ipsclass->lang['reg_error_username_taken']; + } + } + + //----------------------------------------- + // USERNAME: GUEST + //----------------------------------------- + + if (strtolower($in_username) == 'guest') + { + $form_errors['username'][$this->ipsclass->lang['reg_error_username_taken']] = $this->ipsclass->lang['reg_error_username_taken']; + } + + //----------------------------------------- + // USERNAME: Banned? + //----------------------------------------- + + if ( is_array( $banfilters['name'] ) and count( $banfilters['name'] ) ) + { + foreach ( $banfilters['name'] as $n ) + { + $n = str_replace( '\*', '.*' , preg_quote($n, "/") ); + + if ( $n AND preg_match( "/^{$n}$/i", $in_username ) ) + { + $form_errors['username'][$this->ipsclass->lang['reg_error_username_taken']] = $this->ipsclass->lang['reg_error_username_taken']; + break; + } + } + } + + //----------------------------------------- + // DNAME + //----------------------------------------- + + if ( $this->ipsclass->vars['auth_allow_dnames'] ) + { + //----------------------------------------- + // Illegal characters + //----------------------------------------- + + if ( preg_match( "#[\[\];,\|]#", str_replace(''', "'", str_replace('&', '&', $unicode_dname) ) ) ) + { + $form_errors['dname'][$this->ipsclass->lang['reg_error_chars']] = $this->ipsclass->lang['reg_error_chars']; + } + + //----------------------------------------- + // DNAME: Is this name already taken? + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'general_get_by_display_name', array( 'members_display_name' => strtolower($members_display_name) ) ); + $this->ipsclass->DB->cache_exec_query(); + + $name_check = $this->ipsclass->DB->fetch_row(); + + if ( $name_check['id'] ) + { + $form_errors['dname'][$this->ipsclass->lang['reg_error_taken']] = $this->ipsclass->lang['reg_error_taken']; + } + + //----------------------------------------- + // DNAME: Check for existing LOG IN name. + //----------------------------------------- + + if ( $this->ipsclass->vars['auth_dnames_nologinname'] ) + { + $this->ipsclass->DB->build_query( array( 'select' => "members_display_name, id", + 'from' => 'members', + 'where' => "members_l_username='".strtolower($members_display_name)."'", + 'limit' => array( 0,1 ) ) ); + + $this->ipsclass->DB->exec_query(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + $form_errors['dname'][$this->ipsclass->lang['reg_error_taken']] = $this->ipsclass->lang['reg_error_taken']; + } + } + + //----------------------------------------- + // DNAME: Special chars? + //----------------------------------------- + + if ( $unicode_dname != $members_display_name ) + { + $this->ipsclass->DB->cache_add_query( 'general_get_by_display_name', array( 'members_display_name' => $this->ipsclass->DB->add_slashes(strtolower($unicode_dname) ) )); + $this->ipsclass->DB->cache_exec_query(); + + $name_check = $this->ipsclass->DB->fetch_row(); + + if ( $name_check['id'] ) + { + $form_errors['dname'][$this->ipsclass->lang['reg_error_taken']] = $this->ipsclass->lang['reg_error_taken']; + } + } + + //----------------------------------------- + // DNAME: Banned? + //----------------------------------------- + + if ( is_array( $banfilters['name'] ) and count( $banfilters['name'] ) ) + { + foreach ( $banfilters['name'] as $n ) + { + $n = str_replace( '\*', '.*' , preg_quote($n, "/") ); + + if ( $n AND preg_match( "/^{$n}$/i", $members_display_name ) ) + { + $form_errors['dname'][$this->ipsclass->lang['reg_error_taken']] = $this->ipsclass->lang['reg_error_taken']; + break; + } + } + } + + //----------------------------------------- + // DNAME: GUEST + //----------------------------------------- + + if (strtolower($members_display_name) == 'guest') + { + $form_errors['dname'][$this->ipsclass->lang['reg_error_taken']] = $this->ipsclass->lang['reg_error_taken']; + } + } + + //----------------------------------------- + // Is this email addy taken? CONVERGE THIS?? + //----------------------------------------- + + if ( $this->ipsclass->converge->converge_check_for_member_by_email( $in_email ) == TRUE ) + { + $form_errors['email'][$this->ipsclass->lang['reg_error_email_taken']] = $this->ipsclass->lang['reg_error_email_taken']; + } + + //----------------------------------------- + // Load handler... + //----------------------------------------- + + require_once( ROOT_PATH.'sources/handlers/han_login.php' ); + $this->han_login = new han_login(); + $this->han_login->ipsclass =& $this->ipsclass; + $this->han_login->init(); + $this->han_login->email_exists_check( $email ); + + if( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'EMAIL_NOT_IN_USE' ) + { + $form_errors['email'][$this->ipsclass->lang['reg_error_email_taken']] = $this->ipsclass->lang['reg_error_email_taken']; + } + + //----------------------------------------- + // Are they banned [EMAIL]? + //----------------------------------------- + + if ( is_array( $banfilters['email'] ) and count( $banfilters['email'] ) ) + { + foreach ( $banfilters['email'] as $email ) + { + $email = str_replace( '\*', '.*' , preg_quote($email, "/") ); + + if ( preg_match( "/^{$email}$/i", $in_email ) ) + { + $form_errors['email'][$this->ipsclass->lang['reg_error_email_ban']] = $this->ipsclass->lang['reg_error_email_ban']; + break; + } + } + } + + //----------------------------------------- + // Check the reg_code + //----------------------------------------- + + if ($this->ipsclass->vars['bot_antispam']) + { + // Validate CAPTCHA + require_once( KERNEL_PATH . 'class_captcha.php' ); + $captchaClass = new class_captcha( $this->ipsclass, $this->ipsclass->vars['bot_antispam_type'] ); + + if ( $captchaClass->validate() !== TRUE ) + { + $form_errors['general'][$this->ipsclass->lang['err_reg_code']] = $this->ipsclass->lang['err_reg_code']; + } + } + + //----------------------------------------- + // CHECK 2: Any errors (duplicate names, etc)? + //----------------------------------------- + + if ( count( $form_errors ) ) + { + $this->show_reg_form( $form_errors ); + return; + } + + //----------------------------------------- + // Build up the hashes + //----------------------------------------- + + $mem_group = $this->ipsclass->vars['member_group']; + + //----------------------------------------- + // Are we asking the member or admin to preview? + //----------------------------------------- + + if ( $this->ipsclass->vars['reg_auth_type'] ) + { + $mem_group = $this->ipsclass->vars['auth_group']; + } + else if ($coppa == 1) + { + $mem_group = $this->ipsclass->vars['auth_group']; + } + else if ( $this->ipsclass->vars['subsm_enforce'] ) + { + $mem_group = $this->ipsclass->vars['subsm_nopkg_group']; + } + + $_mke_time = ( $this->ipsclass->vars['login_key_expire'] ) ? ( time() + ( intval($this->ipsclass->vars['login_key_expire']) * 86400 ) ) : 0; + + $member = array( + 'name' => $in_username, + 'members_l_username' => strtolower( $in_username ), + 'members_display_name' => $this->ipsclass->vars['auth_allow_dnames'] ? $members_display_name : $in_username, + 'members_l_display_name' => strtolower( $this->ipsclass->vars['auth_allow_dnames'] ? $members_display_name : $in_username ), + 'member_login_key' => $this->ipsclass->converge->generate_auto_log_in_key(), + 'member_login_key_expire' => $_mke_time, + 'email' => $in_email, + 'mgroup' => $mem_group, + 'posts' => 0, + 'joined' => time(), + 'ip_address' => $this->ipsclass->ip_address, + 'time_offset' => $this->ipsclass->input['time_offset'], + 'view_sigs' => 1, + 'email_pm' => 1, + 'view_img' => 1, + 'view_avs' => 1, + 'restrict_post' => 0, + 'view_pop' => 1, + 'msg_total' => 0, + 'new_msg' => 0, + 'coppa_user' => $coppa, + 'language' => $this->ipsclass->vars['default_language'], + 'members_auto_dst' => 1, + 'members_editor_choice' => $this->ipsclass->vars['ips_default_editor'], + 'allow_admin_mails' => intval( $this->ipsclass->input['allow_admin_mail'] ), + 'hide_email' => $this->ipsclass->input['allow_member_mail'] ? 0 : 1, + 'subs_pkg_chosen' => intval( $this->ipsclass->input['subspackage'] ) + ); + + //----------------------------------------- + // Insert: CONVERGE + //----------------------------------------- + + $salt = $this->ipsclass->converge->generate_password_salt(5); + $passhash = $this->ipsclass->converge->generate_compiled_passhash( $salt, md5($in_password) ); + + $converge = array( 'converge_email' => $in_email, + 'converge_joined' => time(), + 'converge_pass_hash' => $passhash, + 'converge_pass_salt' => str_replace( '\\', "\\\\", $salt ) + ); + + //----------------------------------------- + // Add Converge: Member + //----------------------------------------- + + $this->han_login->create_account( array( 'email' => $member['email'], + 'joined' => $member['joined'], + 'password' => $in_password, + 'ip_address' => $this->ipsclass->ip_address + ) ); + + if( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' ) + { + $this->ipsclass->Error( array( 'LEVEL' => 5, 'MSG' => 'han_login_create_failed', 'EXTRA' => $this->han_login->return_details ? $this->han_login->return_details : $this->han_login->return_code ) ); + } + + $this->ipsclass->DB->do_insert( 'members_converge', $converge ); + + //----------------------------------------- + // Get converges auto_increment user_id + //----------------------------------------- + + $member_id = $this->ipsclass->DB->get_insert_id(); + $member['id'] = $member_id; + + //----------------------------------------- + // Insert: MEMBERS + //----------------------------------------- + + $this->ipsclass->DB->force_data_type = array( 'name' => 'string', 'members_display_name' => 'string', 'members_l_username' => 'string', 'members_l_display_name' => 'string' ); + + $this->ipsclass->DB->do_insert( 'members', $member ); + + //----------------------------------------- + // Insert: MEMBER EXTRA + //----------------------------------------- + + $this->ipsclass->DB->do_insert( 'member_extra', array( 'id' => $member_id, + 'vdirs' => "in:{$this->ipsclass->lang['account_inbox']}|sent:{$this->ipsclass->lang['account_sent']}", + 'interests' => '', + 'signature' => '' ) ); + + //----------------------------------------- + // Insert into the custom profile fields DB + //----------------------------------------- + + // Ensure deleted members profile fields are removed. + + $this->ipsclass->DB->do_delete( 'pfields_content', 'member_id='.$member['id'] ); + + $this->ipsclass->DB->force_data_type = array(); + + foreach( $fields->out_fields as $_field => $_data ) + { + $this->ipsclass->DB->force_data_type[ $_field ] = 'string'; + } + + $fields->out_fields['member_id'] = $member['id']; + + $this->ipsclass->DB->do_insert( 'pfields_content', $fields->out_fields ); + + //----------------------------------------- + // Use modules? + //----------------------------------------- + + if ( USE_MODULES == 1 ) + { + $this->modules->register_class($this); + + $member['password'] = trim($this->ipsclass->input['PassWord']); + + $this->modules->on_create_account($member); + + if ( $this->modules->error == 1 ) + { + return; + } + + $member['password'] = ""; + } + + //----------------------------------------- + // Validation key + //----------------------------------------- + + $validate_key = md5( $this->ipsclass->make_password() . time() ); + $time = time(); + + if ($coppa != 1) + { + if ( ($this->ipsclass->vars['reg_auth_type'] == 'user' ) or + ($this->ipsclass->vars['reg_auth_type'] == 'admin') or + ($this->ipsclass->vars['reg_auth_type'] == 'admin_user') ) + { + //----------------------------------------- + // We want to validate all reg's via email, + // after email verificiation has taken place, + // we restore their previous group and remove the validate_key + //----------------------------------------- + + $this->ipsclass->DB->do_insert( 'validating', array ( + 'vid' => $validate_key, + 'member_id' => $member['id'], + 'real_group' => $this->ipsclass->vars['subsm_enforce'] ? $this->ipsclass->vars['subsm_nopkg_group'] : $this->ipsclass->vars['member_group'], + 'temp_group' => $this->ipsclass->vars['auth_group'], + 'entry_date' => $time, + 'coppa_user' => $coppa, + 'new_reg' => 1, + 'ip_address' => $member['ip_address'] + ) ); + + + if ( $this->ipsclass->vars['reg_auth_type'] == 'user' OR $this->ipsclass->vars['reg_auth_type'] == 'admin_user' ) + { + $this->email->get_template("reg_validate"); + + $this->email->build_message( array( + 'THE_LINK' => $this->base_url_nosess."?act=Reg&CODE=03&uid=".urlencode($member_id)."&aid=".urlencode($validate_key), + 'NAME' => $member['members_display_name'], + 'MAN_LINK' => $this->base_url_nosess."?act=Reg&CODE=05", + 'EMAIL' => $member['email'], + 'ID' => $member_id, + 'CODE' => $validate_key, + ) + ); + + $this->email->subject = $this->ipsclass->lang['new_registration_email'].$this->ipsclass->vars['board_name']; + $this->email->to = $member['email']; + + $this->email->send_mail(); + + $this->output = $this->ipsclass->compiled_templates['skin_register']->show_authorise( $member ); + + } + else if ( $this->ipsclass->vars['reg_auth_type'] == 'admin' ) + { + $this->output = $this->ipsclass->compiled_templates['skin_register']->show_preview( $member ); + } + + if ($this->ipsclass->vars['new_reg_notify']) + { + + $date = $this->ipsclass->get_date( time(), 'LONG', 1 ); + + $this->email->get_template("admin_newuser"); + + $this->email->build_message( array( + 'DATE' => $date, + 'MEMBER_NAME' => $member['members_display_name'], + ) + ); + + $this->email->subject = $this->ipsclass->lang['new_registration_email1'].$this->ipsclass->vars['board_name']; + $this->email->to = $this->ipsclass->vars['email_in']; + $this->email->send_mail(); + } + + $this->page_title = $this->ipsclass->lang['reg_success']; + + $this->nav = array( $this->ipsclass->lang['nav_reg'] ); + } + + else + { + //----------------------------------------- + // We don't want to preview, or get them to validate via email. + //----------------------------------------- + + $this->ipsclass->cache['stats']['last_mem_name'] = $member['members_display_name']; + $this->ipsclass->cache['stats']['last_mem_id'] = $member['id']; + $this->ipsclass->cache['stats']['mem_count'] += 1; + + $this->ipsclass->update_cache( array( 'name' => 'stats', 'array' => 1, 'deletefirst' => 0 ) ); + + if ($this->ipsclass->vars['new_reg_notify']) + { + $date = $this->ipsclass->get_date( time(), 'LONG', 1 ); + + $this->email->get_template("admin_newuser"); + + $this->email->build_message( array( + 'DATE' => $date, + 'MEMBER_NAME' => $member['members_display_name'], + ) + ); + + $this->email->subject = $this->ipsclass->lang['new_registration_email1'].$this->ipsclass->vars['board_name']; + $this->email->to = $this->ipsclass->vars['email_in']; + $this->email->send_mail(); + } + + $this->ipsclass->no_print_header = 0; + + $this->ipsclass->my_setcookie("pass_hash" , $member['member_login_key'], 1); + $this->ipsclass->my_setcookie("member_id" , $member['id'] , 1); + $this->ipsclass->my_setcookie('session_id', '0', -1 ); + + $this->ipsclass->stronghold_set_cookie( $member['id'], $member['member_login_key'] ); + + $this->ipsclass->boink_it($this->ipsclass->base_url.'&act=login&CODE=autologin&fromreg=1'); + } + } + else + { + // This is a COPPA user, so lets tell them they registered OK and redirect to the form. + + $this->ipsclass->DB->do_insert( 'validating', array ( + 'vid' => $validate_key, + 'member_id' => $member['id'], + 'real_group' => $this->ipsclass->vars['member_group'], + 'temp_group' => $this->ipsclass->vars['auth_group'], + 'entry_date' => $time, + 'coppa_user' => $coppa, + 'new_reg' => 1, + 'ip_address' => $member['ip_address'] + ) ); + + $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['cp_success'], 'act=Reg&CODE=12' ); + } + } + + /*-------------------------------------------------------------------------*/ + // validate_user + /*-------------------------------------------------------------------------*/ + + function validate_user() + { + //----------------------------------------- + // Check for input and it's in a valid format. + //----------------------------------------- + + $in_user_id = intval(trim(urldecode($this->ipsclass->input['uid']))); + $in_validate_key = trim(urldecode($this->ipsclass->input['aid'])); + $in_type = trim($this->ipsclass->input['type']); + + if ($in_type == "") + { + $in_type = 'reg'; + } + + //----------------------------------------- + // check input + //----------------------------------------- + + if (! preg_match( "/^(?:[\d\w]){32}$/", $in_validate_key ) ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'data_incorrect' ) ); + } + + if (! preg_match( "/^(?:\d){1,}$/", $in_user_id ) ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'data_incorrect' ) ); + } + + //----------------------------------------- + // Attempt to get the profile of the requesting user + //----------------------------------------- + + $member = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'members', 'where' => 'id='.$in_user_id ) ); + + if ( ! $member['id'] ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'auth_no_mem' ) ); + } + + //----------------------------------------- + // Get validating info.. + //----------------------------------------- + + if ( $in_type == 'lostpass' ) + { + $validate = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'validating', 'where' => 'member_id='.$in_user_id.' and lost_pass=1' ) ); + } + else if ( $in_type == 'newemail' ) + { + $validate = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'validating', 'where' => 'member_id='.$in_user_id.' and email_chg=1' ) ); + } + else + { + $validate = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'validating', 'where' => 'member_id='.$in_user_id ) ); + } + + if ( ! $validate['member_id'] ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'auth_no_key' ) ); + } + + if ( ($validate['new_reg'] == 1) && ($this->ipsclass->vars['reg_auth_type'] == "admin" ) ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'auth_no_key_not_allow' ) ); + } + + if ($validate['vid'] != $in_validate_key) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'auth_key_wrong' ) ); + } + else + { + //----------------------------------------- + // REGISTER VALIDATE + //----------------------------------------- + + if ($in_type == 'reg') + { + if ( $validate['new_reg'] != 1 ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'auth_no_key' ) ); + } + + if ( empty($validate['real_group']) ) + { + $validate['real_group'] = $this->ipsclass->vars['member_group']; + } + + //----------------------------------------- + // SELF-VERIFICATION... + //----------------------------------------- + + if ( $this->ipsclass->vars['reg_auth_type'] != 'admin_user' ) + { + if( $validate['real_group'] ) + { + $this->ipsclass->DB->do_update( 'members', array( 'mgroup' => intval($validate['real_group']) ), 'id='.intval($member['id']) ); + } + + if ( USE_MODULES == 1 ) + { + $this->modules->register_class($this); + $this->modules->on_group_change( $member['id'], $validate['real_group'] ); + } + + //----------------------------------------- + // Update the stats... + //----------------------------------------- + + $this->ipsclass->cache['stats']['last_mem_name'] = $member['members_display_name']; + $this->ipsclass->cache['stats']['last_mem_id'] = $member['id']; + $this->ipsclass->cache['stats']['mem_count'] += 1; + + $this->ipsclass->update_cache( array( 'name' => 'stats', 'array' => 1, 'deletefirst' => 0 ) ); + + $this->ipsclass->my_setcookie("member_id" , $member['id'] , 1); + $this->ipsclass->my_setcookie("pass_hash" , $member['member_login_key'], 1); + + //----------------------------------------- + // Remove "dead" validation + //----------------------------------------- + + $this->ipsclass->DB->do_delete( 'validating', "vid='".$validate['vid']."' OR (member_id={$member['id']} AND new_reg=1)" ); + + $this->ipsclass->boink_it($this->ipsclass->base_url.'&act=login&CODE=autologin&fromreg=1'); + } + + //----------------------------------------- + // ADMIN-VERIFICATION... + //----------------------------------------- + + else + { + //----------------------------------------- + // Update DB row... + //----------------------------------------- + + $this->ipsclass->DB->do_update( 'validating', array( 'user_verified' => 1 ), "vid='".$validate['vid']."'" ); + + //----------------------------------------- + // Print message + //----------------------------------------- + + $this->output = $this->ipsclass->compiled_templates['skin_register']->show_preview( $member ); + } + + } + + //----------------------------------------- + // LOST PASS VALIDATE + //----------------------------------------- + + else if ($in_type == 'lostpass') + { + //----------------------------------------- + // On the same page? + //----------------------------------------- + + if ($validate['lost_pass'] != 1) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'lp_no_pass' ) ); + } + + //----------------------------------------- + // Test GD image + //----------------------------------------- + + if ($this->ipsclass->vars['bot_antispam']) + { + // Validate CAPTCHA + require_once( KERNEL_PATH . 'class_captcha.php' ); + $captchaClass = new class_captcha( $this->ipsclass, $this->ipsclass->vars['bot_antispam_type'] ); + + if ( $captchaClass->validate() !== TRUE ) + { + $this->show_manual_form( 'lostpass', 'err_reg_code' ); + return; + } + } + + //----------------------------------------- + // Send a new random password? + //----------------------------------------- + + if ( $this->ipsclass->vars['lp_method'] == 'random' ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $save_array = array(); + + //----------------------------------------- + // Generate a new random password + //----------------------------------------- + + $new_pass = $this->ipsclass->make_password(); + + //----------------------------------------- + // Generate a new salt + //----------------------------------------- + + $salt = $this->ipsclass->converge->generate_password_salt(5); + $salt = str_replace( '\\', "\\\\", $salt ); + + //----------------------------------------- + // New log in key + //----------------------------------------- + + $key = $this->ipsclass->converge->generate_auto_log_in_key(); + + //----------------------------------------- + // Update... + //----------------------------------------- + + $save_array['converge_pass_salt'] = $salt; + $save_array['converge_pass_hash'] = md5( md5($salt) . md5( $new_pass ) ); + + //----------------------------------------- + // Load handler... + //----------------------------------------- + + require_once( ROOT_PATH.'sources/handlers/han_login.php' ); + $this->han_login = new han_login(); + $this->han_login->ipsclass =& $this->ipsclass; + $this->han_login->init(); + $this->han_login->change_pass( $member['email'], md5( $new_pass ) ); + + if( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' ) + { + $this->ipsclass->Error( array( 'LEVEL' => 5, 'MSG' => 'han_login_pass_failed' ) ); + } + + $this->ipsclass->DB->do_update( 'members_converge', $save_array , "converge_email='" . $member['email'] . "'" ); + $this->ipsclass->DB->do_update( 'members' , array( 'member_login_key' => $key ), 'id='.intval( $member['id'] ) ); + + //----------------------------------------- + // Send out the email... + //----------------------------------------- + + $this->email->get_template("lost_pass_email_pass"); + + $this->email->build_message( array( + 'NAME' => $member['members_display_name'], + 'THE_LINK' => $this->base_url_nosess."?act=usercp&CODE=28", + 'PASSWORD' => $new_pass, + 'LOGIN' => $this->base_url_nosess."?act=login", + 'USERNAME' => $member['name'], + 'EMAIL' => $member['email'], + 'ID' => $member['id'], + ) + ); + + $this->email->subject = $this->ipsclass->lang['lp_random_pass_subject'].' '.$this->ipsclass->vars['board_name']; + $this->email->to = $member['email']; + + $this->email->send_mail(); + + $this->output = $this->ipsclass->compiled_templates['skin_register']->show_lostpasswait_random( $member ); + + + } + //----------------------------------------- + // Allow user to choose... + //----------------------------------------- + else + { + if ( $_POST['pass1'] == "" ) + { + $this->ipsclass->Error( array( LEVEL => 1, MSG => 'pass_blank' ) ); + } + + if ( $_POST['pass2'] == "" ) + { + $this->ipsclass->Error( array( LEVEL => 1, MSG => 'pass_blank' ) ); + } + + $pass_a = trim($this->ipsclass->input['pass1']); + $pass_b = trim($this->ipsclass->input['pass2']); + + if ( strlen($pass_a) < 3 ) + { + $this->ipsclass->Error( array( LEVEL => 1, MSG => 'pass_too_short' ) ); + } + + if ( $pass_a != $pass_b ) + { + $this->ipsclass->Error( array( LEVEL => 1, MSG => 'pass_no_match' ) ); + } + + $new_pass = md5($pass_a); + + //----------------------------------------- + // Load handler... + //----------------------------------------- + + require_once( ROOT_PATH.'sources/handlers/han_login.php' ); + $this->han_login = new han_login(); + $this->han_login->ipsclass =& $this->ipsclass; + $this->han_login->init(); + $this->han_login->change_pass( $member['email'], $new_pass ); + + if( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' ) + { + $this->ipsclass->Error( array( 'LEVEL' => 5, 'MSG' => 'han_login_pass_failed' ) ); + } + + $this->ipsclass->converge->converge_update_password( $new_pass, $member['email'] ); + + $this->ipsclass->my_setcookie("member_id" , $member['id'] , 1); + $this->ipsclass->my_setcookie("pass_hash" , $member['member_login_key'], 1); + + //----------------------------------------- + // Remove "dead" validation + //----------------------------------------- + + $this->ipsclass->DB->do_delete( 'validating', "vid='".$validate['vid']."' OR (member_id={$member['id']} AND lost_pass=1)" ); + + $this->ipsclass->boink_it($this->ipsclass->base_url.'&act=login&CODE=autologin&frompass=1'); + } + } + + //----------------------------------------- + // EMAIL ADDY CHANGE + //----------------------------------------- + + else if ($in_type == 'newemail') + { + if ( $validate['email_chg'] != 1 ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'auth_no_key' ) ); + } + + if( $validate['real_group'] ) + { + $this->ipsclass->DB->do_update( 'members', array( 'mgroup' => intval($validate['real_group']) ), 'id='.intval($member['id']) ); + } + + if ( USE_MODULES == 1 ) + { + $this->modules->register_class($this); + $this->modules->on_group_change($member['id'], $validate['real_group']); + } + + $this->ipsclass->my_setcookie("member_id" , $member['id'] , 1); + $this->ipsclass->my_setcookie("pass_hash" , $member['member_login_key'], 1); + + //----------------------------------------- + // Remove "dead" validation + //----------------------------------------- + + $this->ipsclass->DB->do_delete( 'validating', "vid='".$validate['vid']."' OR (member_id={$member['id']} AND email_chg=1)" ); + + $this->ipsclass->boink_it($this->ipsclass->base_url.'&act=login&CODE=autologin&fromemail=1'); + } + } + } + + /*-------------------------------------------------------------------------*/ + // Manual Lost Password Form + /*-------------------------------------------------------------------------*/ + + function show_manual_form($type='reg', $errors="") + { + if ( $type == 'lostpass' ) + { + if ($errors != "") + { + $this->output .= $this->ipsclass->compiled_templates['skin_register']->errors( $this->ipsclass->lang[$errors]); + } + + $this->output .= $this->ipsclass->compiled_templates['skin_register']->show_lostpass_form(); + + //----------------------------------------- + // Check for input and it's in a valid format. + //----------------------------------------- + + if ( $this->ipsclass->input['uid'] AND $this->ipsclass->input['aid'] ) + { + $in_user_id = intval(trim(urldecode($this->ipsclass->input['uid']))); + $in_validate_key = trim(urldecode($this->ipsclass->input['aid'])); + $in_type = trim($this->ipsclass->input['type']); + + if ($in_type == "") + { + $in_type = 'reg'; + } + + //----------------------------------------- + // Check and test input + //----------------------------------------- + + if (! preg_match( "/^(?:[\d\w]){32}$/", $in_validate_key ) ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'data_incorrect' ) ); + } + + if (! preg_match( "/^(?:\d){1,}$/", $in_user_id ) ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'data_incorrect' ) ); + } + + //----------------------------------------- + // Attempt to get the profile of the requesting user + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'members', 'where' => "id=$in_user_id" ) ); + + $this->ipsclass->DB->simple_exec(); + + if ( ! $member = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'auth_no_mem' ) ); + } + + //----------------------------------------- + // Get validating info.. + //----------------------------------------- + + $validate = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'validating', 'where' => "member_id=$in_user_id and vid='$in_validate_key' and lost_pass=1" ) ); + + if ( ! $validate['member_id'] ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'auth_no_key' ) ); + } + + $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_register']->show_lostpass_form_auto($in_validate_key, $in_user_id), $this->output ); + } + else + { + $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_register']->show_lostpass_form_manual(), $this->output ); + } + + if ( $this->ipsclass->vars['bot_antispam'] ) + { + // Grab CAPTCHA template bit + require_once( KERNEL_PATH . 'class_captcha.php' ); + $captchaClass = new class_captcha( $this->ipsclass, $this->ipsclass->vars['bot_antispam_type'] ); + $captchaHTML = $captchaClass->getTemplate(); + } + + if ($this->ipsclass->vars['bot_antispam']) + { + $this->output = str_replace( "", $captchaHTML, $this->output ); + } + } + else + { + $this->output = $this->ipsclass->compiled_templates['skin_register']->show_dumb_form($type); + } + + $this->page_title = $this->ipsclass->lang['activation_form']; + $this->nav = array( $this->ipsclass->lang['activation_form'] ); + } + +} + ?> \ No newline at end of file diff --git a/upload/sources/action_public/rssout.php b/upload/sources/action_public/rssout.php index c4c2f0dd..8dc572aa 100644 --- a/upload/sources/action_public/rssout.php +++ b/upload/sources/action_public/rssout.php @@ -2,28 +2,18 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ +| > $Date: 2007-05-01 14:00:44 -0400 (Tue, 01 May 2007) $ +| > $Revision: 958 $ +| > $Author: bfarber $ +--------------------------------------------------------------------------- | | > XML OUT Functions for XmlHttpRequest functions @@ -36,7 +26,7 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; exit(); } @@ -51,7 +41,7 @@ class rssout function rssout() { - $this->xml_header = ''; + $this->xml_header = ''; } /*-------------------------------------------------------------------------*/ @@ -91,7 +81,7 @@ class rssout // INIT //----------------------------------------- - $cal_id = intval( $_REQUEST['id'] ); + $cal_id = intval( $this->ipsclass->input['id'] ); $rss_data = array(); $to_print = ''; $expires = time(); @@ -165,7 +155,7 @@ class rssout // INIT //----------------------------------------- - $rss_export_id = intval( $_REQUEST['id'] ); + $rss_export_id = intval( $this->ipsclass->input['id'] ); $rss_data = array(); $to_print = ''; $expires = time(); diff --git a/upload/sources/action_public/search.php b/upload/sources/action_public/search.php index 970099d6..19b93872 100644 --- a/upload/sources/action_public/search.php +++ b/upload/sources/action_public/search.php @@ -1,2014 +1,1996 @@ - $Date: 2006-12-05 14:23:51 -0600 (Tue, 05 Dec 2006) $ -| > $Revision: 772 $ -| > $Author: bfarber $ -+--------------------------------------------------------------------------- -| -| > Searching procedures -| > Module written by Matt Mecham -| > Date started: 24th February 2002 -| -| > Module Version Number: 1.1.0 -| > DBA Checked: Thu 20 May 2004 -| > Quality Checked: Wed 15 Sept. 2004 -+-------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_IPB' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - -class search { - - var $output = ""; - var $page_title = ""; - var $nav = array(); - var $html = ""; - - var $first = 0; - var $row_count = 0; - - var $search_type = 'posts'; - var $sort_order = 'desc'; - var $sort_key = 'last_post'; - var $search_in = 'posts'; - var $topic_search_only = ""; - var $prune = '0'; - var $st_time = array(); - var $end_time = array(); - var $st_stamp = ""; - var $end_stamp = ""; - var $result_type = "topics"; - var $parser = ""; - var $load_lib = 'search_mysql_man'; - var $lib = ""; - var $read_array = array(); - - var $mysql_version = ""; - var $true_version = ""; - - // max number of results - - var $resultlimit = 1000; - var $xml_out = 0; - - /*-------------------------------------------------------------------------*/ - // Auto run - /*-------------------------------------------------------------------------*/ - - function auto_run() - { - //----------------------------------------- - // Using XML? - //----------------------------------------- - - $this->xml_out = isset($_REQUEST['xml']) ? intval( $_REQUEST['xml'] ) : 0; - - //----------------------------------------- - // Require the HTML and language modules - //----------------------------------------- - - $this->ipsclass->load_language('lang_search'); - $this->ipsclass->load_language('lang_forum' ); - $this->ipsclass->load_template('skin_search'); - - //----------------------------------------- - // Check - //----------------------------------------- - - if (! $this->ipsclass->vars['allow_search']) - { - if ( $this->xml_out ) - { - @header( "Content-type: text/html;charset={$this->ipsclass->vars['gb_char_set']}" ); - print $this->ipsclass->lang['search_off']; - exit(); - } - else - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'search_off') ); - } - } - - if (! isset($this->ipsclass->member['g_use_search']) OR !$this->ipsclass->member['g_use_search'] ) - { - if ( $this->xml_out ) - { - @header( "Content-type: text/html;charset={$this->ipsclass->vars['gb_char_set']}" ); - print $this->ipsclass->lang['no_xml_permission']; - exit(); - } - else - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); - } - } - - if ( $read = $this->ipsclass->my_getcookie('topicsread') ) - { - $this->read_array = $this->ipsclass->clean_int_array( unserialize(stripslashes($read)) ); - } - - //----------------------------------------- - // Forum jump - //----------------------------------------- - - $this->ipsclass->forum_jump = $this->ipsclass->build_forum_jump(); - - //----------------------------------------- - // Get the SQL version. - //----------------------------------------- - - $this->ipsclass->DB->sql_get_version(); - - $this->true_version = $this->ipsclass->DB->true_version; - $this->mysql_version = $this->ipsclass->DB->mysql_version; - - //----------------------------------------- - // Sort out the required search library - //----------------------------------------- - - $method = isset($this->ipsclass->vars['search_sql_method']) ? $this->ipsclass->vars['search_sql_method'] : 'man'; - $sql = isset($this->ipsclass->vars['sql_driver']) ? $this->ipsclass->vars['sql_driver'] : 'mysql'; - - $this->load_lib = 'search_'.strtolower($sql).'_'.$method.'.php'; - - require ( ROOT_PATH."sources/lib/".$this->load_lib ); - - $this->base_url = $this->ipsclass->base_url; - - //----------------------------------------- - // Suck in libby - //----------------------------------------- - - $this->lib = new search_lib($this); - $this->lib->ipsclass =& $this->ipsclass; - - $this->first = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; - - //----------------------------------------- - // What to do? - //----------------------------------------- - - switch($this->ipsclass->input['CODE']) { - case '01': - $this->do_search(); - break; - case 'getnew': - $this->get_new_posts(); - break; - case 'show': - $this->show_results(); - break; - case 'getreplied': - $this->get_replies(); - break; - case 'lastten': - $this->get_last_ten(); - break; - case 'getalluser': - $this->get_all_user(); - break; - case 'simpleresults': - $this->ipsclass->input['searchsubs'] = 1; - $this->show_simple_results(); - break; - case 'explain': - $this->show_boolean_explain(); - break; - case 'searchtopic': - $this->search_topic(); - break; - case 'gettopicsuser': - $this->get_topics_user(); - break; - case 'getactive': - $this->ipsclass->input['active'] = 1; - $this->get_new_posts(); - break; - default: - $this->show_form(); - break; - } - - // If we have any HTML to print, do so... - - $this->ipsclass->print->add_output("$this->output"); - $this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, 'NAV' => $this->nav ) ); - } - - /*-------------------------------------------------------------------------*/ - // Do simple search - /*-------------------------------------------------------------------------*/ - - function show_simple_results() - { - $result = $this->lib->do_simple_search(); - } - - /*-------------------------------------------------------------------------*/ - // Search topic - /*-------------------------------------------------------------------------*/ - - function search_topic() - { - $this->topic_id = intval($this->ipsclass->input['topic']); - $this->topic_search_only = 1; - $this->result_type = 'posts'; - $this->search_type = 'posts'; - $this->search_in = 'posts'; - - $this->do_search(); - } - - /*-------------------------------------------------------------------------*/ - // Get all posts by a member - /*-------------------------------------------------------------------------*/ - - function get_topics_user() - { - //----------------------------------------- - // Do we have flood control enabled? - //----------------------------------------- - - if ($this->ipsclass->member['g_search_flood'] > 0) - { - $flood_time = time() - $this->ipsclass->member['g_search_flood']; - - //----------------------------------------- - // Get any old search results.. - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => 'id', - 'from' => 'search_results', - 'where' => "(member_id='".$this->ipsclass->member['id']."' OR ip_address='".$this->ipsclass->input['IP_ADDRESS']."') AND search_date > '$flood_time'" ) ); - $this->ipsclass->DB->simple_exec(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'search_flood', 'EXTRA' => $this->ipsclass->member['g_search_flood']) ); - } - } - - $this->ipsclass->input['forums'] = 'all'; - - $forums = $this->get_searchable_forums(); - - $mid = intval($this->ipsclass->input['mid']); - - //----------------------------------------- - // Do we have any forums to search in? - //----------------------------------------- - - if ($forums == "") - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_forum') ); - } - - if ($mid == "") - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); - } - - //----------------------------------------- - // Get the topic ID's to serialize and store into - // the database - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => 'count(*) as count', 'from' => 'topics t', 'where' => "t.approved=1 AND t.forum_id IN($forums) AND t.starter_id=$mid" ) ); - $this->ipsclass->DB->simple_exec(); - - $row = $this->ipsclass->DB->fetch_row(); - - $results = intval($row['count']); - - //----------------------------------------- - // Do we have any results? - //----------------------------------------- - - if ( ! $results ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); - } - - //----------------------------------------- - // Cache query - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => 't.*, t.title as topic_title', - 'from' => 'topics t', - 'where' => "t.approved=1 AND t.forum_id IN($forums) AND t.starter_id=$mid", - 'order' => "t.last_post DESC" ) ); - - - $query_to_cache = $this->ipsclass->DB->cur_query; - $this->ipsclass->DB->flush_query(); - - //----------------------------------------- - // If we are still here, store the data into the database... - //----------------------------------------- - - $unique_id = md5(uniqid(microtime(),1)); - - $this->ipsclass->DB->do_insert( 'search_results', array ( - 'id' => $unique_id, - 'search_date' => time(), - 'post_max' => $results, - 'sort_key' => $this->sort_key, - 'sort_order' => $this->sort_order, - 'member_id' => $this->ipsclass->member['id'], - 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], - 'query_cache' => $query_to_cache - ) ); - - $this->ipsclass->boink_it( $this->ipsclass->base_url."act=Search&nav=au&CODE=show&searchid=$unique_id&search_in=topics&result_type=topics" ); - } - - /*-------------------------------------------------------------------------*/ - // Get all posts by a member - /*-------------------------------------------------------------------------*/ - - function get_all_user() - { - //----------------------------------------- - // Do we have flood control enabled? - //----------------------------------------- - - if ($this->ipsclass->member['g_search_flood'] > 0) - { - $flood_time = time() - $this->ipsclass->member['g_search_flood']; - - // Get any old search results.. - - $this->ipsclass->DB->simple_construct( array( 'select' => 'id', - 'from' => 'search_results', - 'where' => "(member_id='".$this->ipsclass->member['id']."' OR ip_address='".$this->ipsclass->input['IP_ADDRESS']."') AND search_date > '$flood_time'" ) ); - $this->ipsclass->DB->simple_exec(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'search_flood', 'EXTRA' => $this->ipsclass->member['g_search_flood']) ); - } - } - - $this->ipsclass->input['forums'] = 'all'; - - $forums = $this->get_searchable_forums(); - - $mid = intval($this->ipsclass->input['mid']); - - //----------------------------------------- - // Do we have any forums to search in? - //----------------------------------------- - - if ($forums == "") - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_forum') ); - } - - if ($mid == "") - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); - } - - //----------------------------------------- - // Get the topic ID's to serialize and store into - // the database - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'search_get_all_user_count', array( 'mid' => $mid, 'forums' => $forums ) ); - $this->ipsclass->DB->cache_exec_query(); - - $row = $this->ipsclass->DB->fetch_row(); - - $results = intval($row['count']); - - //----------------------------------------- - // Do we have any results? - //----------------------------------------- - - if ( ! $results ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); - } - - //----------------------------------------- - // Cache query - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'search_get_all_user_query', array( 'mid' => $mid, 'forums' => $forums ) ); - - $query_to_cache = $this->ipsclass->DB->cur_query; - $this->ipsclass->DB->flush_query(); - - //----------------------------------------- - // If we are still here, store the data into the database... - //----------------------------------------- - - $unique_id = md5(uniqid(microtime(),1)); - - $this->ipsclass->DB->do_insert( 'search_results', array ( - 'id' => $unique_id, - 'search_date' => time(), - 'post_max' => $results, - 'sort_key' => $this->sort_key, - 'sort_order' => $this->sort_order, - 'member_id' => $this->ipsclass->member['id'], - 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], - 'query_cache' => $query_to_cache - ) ); - - $this->ipsclass->boink_it( $this->ipsclass->base_url."act=Search&nav=au&CODE=show&searchid=$unique_id&search_in=posts&result_type=posts" ); - } - - /*-------------------------------------------------------------------------*/ - // Get new posts - /*-------------------------------------------------------------------------*/ - - function get_new_posts() - { - if ( ! $this->ipsclass->member['id'] and ! $this->ipsclass->input['active'] ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); - } - - //----------------------------------------- - // Do we have flood control enabled? - //----------------------------------------- - - if ($this->ipsclass->member['g_search_flood'] > 0) - { - $flood_time = time() - $this->ipsclass->member['g_search_flood']; - - // Get any old search results.. - - $this->ipsclass->DB->simple_construct( array( 'select' => 'id', - 'from' => 'search_results', - 'where' => "(member_id='".$this->ipsclass->member['id']."' OR ip_address='".$this->ipsclass->input['IP_ADDRESS']."') AND search_date > '$flood_time'" ) ); - $this->ipsclass->DB->simple_exec(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'search_flood', 'EXTRA' => $this->ipsclass->member['g_search_flood']) ); - } - } - - $last_time = $this->ipsclass->member['last_visit']; - - if ( $this->ipsclass->member['members_markers']['board'] > $last_time ) - { - $last_time = $this->ipsclass->member['members_markers']['board']; - } - - $this->ipsclass->input['nav'] = 'lv'; - - //----------------------------------------- - // Are we getting 'active topics'? - //----------------------------------------- - - $this->ipsclass->input['lastdate'] = isset($this->ipsclass->input['lastdate']) ? intval($this->ipsclass->input['lastdate']) : 0; - - if ( isset($this->ipsclass->input['active']) AND $this->ipsclass->input['active'] ) - { - if ( $this->ipsclass->input['lastdate'] ) - { - $last_time = time() - $this->ipsclass->input['lastdate']; - } - else - { - $last_time = time() - 86400; - } - - $this->ipsclass->input['nav'] = 'at'; - } - - $this->ipsclass->input['forums'] = 'all'; - - $forums = $this->get_searchable_forums(); - - //----------------------------------------- - // Do we have any forums to search in? - //----------------------------------------- - - if ($forums == "") - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_forum') ); - } - - //----------------------------------------- - // Get the topic ID's to serialize and store into - // the database - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => 'count(*) as count', 'from' => 'topics', 'where' => "approved=1 AND state != 'link' AND forum_id IN($forums) AND last_post > '".$last_time."'" ) ); - $this->ipsclass->DB->simple_exec(); - - $row = $this->ipsclass->DB->fetch_row(); - - $results = intval($row['count']); - - //----------------------------------------- - // Do we have any results? - //----------------------------------------- - - if ( ! $results ) - { - //$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); - } - - //----------------------------------------- - // Cache query - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => 't.*, t.title as topic_title', - 'from' => 'topics t', - 'where' => "t.approved=1 AND t.state != 'link' AND t.forum_id IN($forums) AND t.last_post > {$last_time}", - 'order' => "t.last_post DESC" ) ); - - - $query_to_cache = $this->ipsclass->DB->cur_query; - $this->ipsclass->DB->flush_query(); - - //----------------------------------------- - // If we are still here, store the data into the database... - //----------------------------------------- - - $unique_id = md5(uniqid(microtime(),1)); - - $this->ipsclass->DB->do_insert( 'search_results', array ( - 'id' => $unique_id, - 'search_date' => time(), - 'post_max' => $results, - 'sort_key' => $this->sort_key, - 'sort_order' => $this->sort_order, - 'member_id' => $this->ipsclass->member['id'], - 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], - 'query_cache' => $query_to_cache - ) ); - - $this->ipsclass->boink_it( $this->ipsclass->base_url."act=Search&nav={$this->ipsclass->input['nav']}&CODE=show&searchid=$unique_id&search_in=topics&result_type=topics&lastdate={$this->ipsclass->input['lastdate']}" ); - } - - /*-------------------------------------------------------------------------*/ - // Last 10 posts - /*-------------------------------------------------------------------------*/ - - function get_last_ten() - { - //----------------------------------------- - // Do we have flood control enabled? - //----------------------------------------- - - if ($this->ipsclass->member['g_search_flood'] > 0) - { - $flood_time = time() - $this->ipsclass->member['g_search_flood']; - - // Get any old search results.. - - $this->ipsclass->DB->simple_construct( array( 'select' => 'id', - 'from' => 'search_results', - 'where' => "(member_id='".$this->ipsclass->member['id']."' OR ip_address='".$this->ipsclass->input['IP_ADDRESS']."') AND search_date > '$flood_time'" ) ); - $this->ipsclass->DB->simple_exec(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'search_flood', 'EXTRA' => $this->ipsclass->member['g_search_flood']) ); - } - } - - $this->ipsclass->input['forums'] = 'all'; - - $forums = $this->get_searchable_forums(); - - $mid = $this->ipsclass->member['id']; - - //----------------------------------------- - // Do we have any forums to search in? - //----------------------------------------- - - if ($forums == "") - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_forum') ); - } - - //----------------------------------------- - // Cache query - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'search_get_last_ten', array( 'mid' => $mid, 'forums' => $forums ) ); - - $query_to_cache = $this->ipsclass->DB->cur_query; - $this->ipsclass->DB->flush_query(); - - //----------------------------------------- - // If we are still here, store the data into the database... - //----------------------------------------- - - $unique_id = md5(uniqid(microtime(),1)); - - $this->ipsclass->DB->do_insert( 'search_results', array ( - 'id' => $unique_id, - 'search_date' => time(), - 'post_max' => 10, - 'sort_key' => $this->sort_key, - 'sort_order' => $this->sort_order, - 'member_id' => $this->ipsclass->member['id'], - 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], - 'query_cache' => $query_to_cache - ) ); - - $this->ipsclass->boink_it( $this->ipsclass->base_url."act=Search&nav=au&CODE=show&searchid=$unique_id&search_in=posts&result_type=posts" ); - } - - /*-------------------------------------------------------------------------*/ - // Get all replies - /*-------------------------------------------------------------------------*/ - - function get_replies() - { - //----------------------------------------- - // Do we have flood control enabled? - //----------------------------------------- - - if ($this->ipsclass->member['g_search_flood'] > 0) - { - $flood_time = time() - $this->ipsclass->member['g_search_flood']; - - // Get any old search results.. - - $this->ipsclass->DB->simple_construct( array( 'select' => 'id', - 'from' => 'search_results', - 'where' => "(member_id='".$this->ipsclass->member['id']."' OR ip_address='".$this->ipsclass->input['IP_ADDRESS']."') AND search_date > '$flood_time'" ) ); - $this->ipsclass->DB->simple_exec(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'search_flood', 'EXTRA' => $this->ipsclass->member['g_search_flood']) ); - } - } - - $this->ipsclass->input['forums'] = 'all'; - $this->ipsclass->input['nav'] = 'lv'; - - $forums = $this->get_searchable_forums(); - - if ( $this->ipsclass->forum_read[0] > $this->ipsclass->member['last_visit'] ) - { - $this->ipsclass->member['last_visit'] = $this->ipsclass->forum_read[0]; - } - - //----------------------------------------- - // Do we have any forums to search in? - //----------------------------------------- - - if ($forums == "") - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_forum') ); - } - - //----------------------------------------- - // Get the topic ID's to serialize and store into - // the database - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => 'tid', - 'from' => 'topics', - 'where' => "starter_id={$this->ipsclass->member['id']} AND last_post > {$this->ipsclass->member['last_visit']} AND forum_id IN($forums) AND approved=1" ) ); - $this->ipsclass->DB->simple_exec(); - - $max_hits = $this->ipsclass->DB->get_num_rows(); - - $topics = ""; - - while ($row = $this->ipsclass->DB->fetch_row() ) - { - $topics .= $row['tid'].","; - } - - $this->ipsclass->DB->free_result(); - - $topics = preg_replace( "/,$/", "", $topics ); - - //----------------------------------------- - // Do we have any results? - //----------------------------------------- - - if ($topics == "") - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); - } - - //----------------------------------------- - // If we are still here, store the data into the database... - //----------------------------------------- - - $unique_id = md5(uniqid(microtime(),1)); - - $this->ipsclass->DB->do_insert( 'search_results', array ( - 'id' => $unique_id, - 'search_date'=> time(), - 'topic_id' => $topics, - 'topic_max' => $max_hits, - 'sort_key' => $this->sort_key, - 'sort_order' => $this->sort_order, - 'member_id' => $this->ipsclass->member['id'], - 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], - ) ); - - $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['search_redirect'] , "act=Search&nav=gr&CODE=show&searchid=$unique_id&search_in=posts&result_type=topics" ); - exit(); - } - - /*-------------------------------------------------------------------------*/ - // Show pop-up window - /*-------------------------------------------------------------------------*/ - - function show_boolean_explain() - { - $this->ipsclass->print->pop_up_window( $this->ipsclass->lang['be_link'], $this->ipsclass->compiled_templates['skin_search']->boolean_explain_page() ); - } - - /*-------------------------------------------------------------------------*/ - // Show main form - /*-------------------------------------------------------------------------*/ - - function show_form() - { - $the_html = $this->ipsclass->forums->forums_forum_jump(1, 1); - - $init_sel = !$this->ipsclass->input['f'] ? ' selected="selected"' : ''; - - $forums = ""; - - if ( $this->ipsclass->input['mode'] == 'simple' ) - { - if ( $this->ipsclass->vars['search_sql_method'] == 'ftext' ) - { - $this->output = $this->ipsclass->compiled_templates['skin_search']->simple_form($forums); - } - else - { - $this->output = $this->ipsclass->compiled_templates['skin_search']->Form($forums); - } - } - else if ( $this->ipsclass->input['mode'] == 'adv' ) - { - $this->output = $this->ipsclass->compiled_templates['skin_search']->Form($forums); - - if ( $this->ipsclass->vars['search_sql_method'] == 'ftext' ) - { - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_search']->form_simple_button(), $this->output ); - } - } - else - { - // No mode specified.. - - if ( $this->ipsclass->vars['search_default_method'] == 'simple' ) - { - if ( $this->ipsclass->vars['search_sql_method'] == 'ftext' ) - { - $this->output = $this->ipsclass->compiled_templates['skin_search']->simple_form($forums); - } - else - { - $this->output = $this->ipsclass->compiled_templates['skin_search']->Form($forums); - } - } - else - { - // Default.. - - $this->output = $this->ipsclass->compiled_templates['skin_search']->Form($forums); - - if ( $this->ipsclass->vars['search_sql_method'] == 'ftext' ) - { - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_search']->form_simple_button(), $this->output ); - } - } - } - - if ( ( $this->ipsclass->DB->sql_can_fulltext_boolean() == TRUE ) AND $this->ipsclass->vars['search_sql_method'] == 'ftext' ) - { - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_search']->boolean_explain_link(), $this->output ); - } - - $this->page_title = $this->ipsclass->lang['search_title']; - $this->nav = array( $this->ipsclass->lang['search_form'] ); - } - - /*-------------------------------------------------------------------------*/ - // DO MAIN SEARCH - /*-------------------------------------------------------------------------*/ - - function do_search() - { - //----------------------------------------- - // Un-urlencode first - //----------------------------------------- - if( isset($this->ipsclass->input['xml']) AND $this->ipsclass->input['xml'] ) - { - require (KERNEL_PATH."class_ajax.php"); - $xml_convert = new class_ajax(); - $xml_convert->ipsclass =& $this->ipsclass; - - $this->ipsclass->input['keywords'] = $xml_convert->convert_and_make_safe($this->ipsclass->input['keywords']); - } - - //----------------------------------------- - // Do we have flood control enabled? - //----------------------------------------- - - if ($this->ipsclass->member['g_search_flood'] > 0) - { - $flood_time = time() - $this->ipsclass->member['g_search_flood']; - - // Get any old search results.. - - $this->ipsclass->DB->simple_construct( array( 'select' => 'id', - 'from' => 'search_results', - 'where' => "(member_id='".$this->ipsclass->member['id']."' OR ip_address='".$this->ipsclass->input['IP_ADDRESS']."') AND search_date > '$flood_time'" ) ); - $this->ipsclass->DB->simple_exec(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - if ( $this->xml_out ) - { - @header( "Content-type: text/html;charset={$this->ipsclass->vars['gb_char_set']}" ); - print sprintf( $this->ipsclass->lang['xml_flood'], $this->ipsclass->member['g_search_flood'] ); - exit(); - } - else - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'search_flood', 'EXTRA' => $this->ipsclass->member['g_search_flood']) ); - } - } - } - - //----------------------------------------- - // init main search - //----------------------------------------- - - $result = $this->lib->do_main_search(); - - //----------------------------------------- - // Do we have any results? - //----------------------------------------- - - if ($result['topic_id'] == "" and $result['post_id'] == "") - { - if ( $this->xml_out ) - { - @header( "Content-type: text/html;charset={$this->ipsclass->vars['gb_char_set']}" ); - print sprintf( $this->ipsclass->lang['xml_nomatches'], $result['keywords'] ); - exit(); - } - else - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); - } - } - - //----------------------------------------- - // If we are still here, store the data into the database... - //----------------------------------------- - - $unique_id = md5(uniqid(microtime(),1)); - $url = "act=Search&CODE=show&searchid=".$unique_id."&search_in=".$this->search_in."&result_type=".$this->result_type."&highlite=".urlencode(trim($result['keywords'])); - - $this->ipsclass->DB->do_insert( 'search_results', array ( - 'id' => $unique_id, - 'search_date' => time(), - 'topic_id' => $result['topic_id'], - 'topic_max' => $result['topic_max'], - 'sort_key' => $this->sort_key, - 'sort_order' => $this->sort_order, - 'member_id' => $this->ipsclass->member['id'], - 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], - 'post_id' => $result['post_id'], - 'post_max' => $result['post_max'], - 'query_cache' => $result['query_cache'], - ) ); - - if ( $this->xml_out ) - { - $result['post_max'] = $result['post_max'] < 1 ? 1 : $result['post_max']; - - @header( "Content-type: text/html;charset={$this->ipsclass->vars['gb_char_set']}" ); - print sprintf( $this->ipsclass->lang['xml_matches'], preg_replace( "#^[\+\-]#", "", $result['keywords'] ), $result['post_max'], $this->ipsclass->base_url.$url ); - exit(); - } - else - { - $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['search_redirect'] , $url ); - } - } - - /*-------------------------------------------------------------------------*/ - // Show Results - // Shows the results of the search - /*-------------------------------------------------------------------------*/ - - function show_results() - { - $this->cached_query = 0; - $this->cached_matches = 0; - - //----------------------------------------- - // Grab forums lib - //----------------------------------------- - - require_once( ROOT_PATH."sources/action_public/forums.php" ); - $this->forums = new forums(); - $this->forums->ipsclass =& $this->ipsclass; - $this->forums->init(); - - //----------------------------------------- - // Start... - //----------------------------------------- - - $this->result_type = $this->ipsclass->input['result_type']; - $this->search_in = $this->ipsclass->input['search_in']; - - //----------------------------------------- - // We have a search ID, so lets get the parsed results. - //----------------------------------------- - - $this->unique_id = $this->ipsclass->input['searchid']; - - if ($this->unique_id == "") - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); - } - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'search_results', - 'where' => "id='{$this->unique_id}'" ) ); - $this->ipsclass->DB->simple_exec(); - - $sr = $this->ipsclass->DB->fetch_row(); - - $this->sort_order = $sr['sort_order']; - $this->sort_key = $sr['sort_key']; - $this->more_results = $sr['query_cache'] == 1 ? 1 : 0; - - //----------------------------------------- - // Cached query or PID/TID list? - // query_cache == 1 if more than 300 results - //----------------------------------------- - - if ( $sr['query_cache'] and $sr['query_cache'] != 1 ) - { - $this->cached_query = $sr['query_cache']; - $this->cached_matches = $sr['post_max']; - } - else - { - $topics = $sr['topic_id']; - $topic_max_hits = $sr['topic_max']; - $posts = $sr['post_id']; - $post_max_hits = $sr['post_max']; - - //----------------------------------------- - // Build array - //----------------------------------------- - - $topic_array = array(); - $post_array = array(); - - if ( $topics ) - { - foreach( explode( ",", $topics ) as $t ) - { - $topic_array[ $t ] = $t; - } - } - - if ( $posts ) - { - foreach( explode( ",", $posts ) as $t ) - { - $post_array[ $t ] = $t; - } - } - - //----------------------------------------- - // Anything left to show? - //----------------------------------------- - - if ( ! $topics and ! $posts ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); - } - } - - $this->ipsclass->input['highlite'] = $this->ipsclass->input['highlite'] ? $this->ipsclass->input['highlite'] : $this->ipsclass->input['hl']; - - $url_words = $this->convert_highlite_words( (isset($this->ipsclass->input['highlite']) AND $this->ipsclass->input['highlite']) ? $this->ipsclass->input['highlite'] : '' ); - - if ( $this->result_type == 'topics' ) - { - //----------------------------------------- - // CACHED QUERY? - //----------------------------------------- - - if ( $this->cached_query ) - { - $this->output .= $this->start_page($this->cached_matches); - - $this->ipsclass->DB->cur_query = $this->cached_query; - $this->ipsclass->DB->simple_limit_with_check($this->first, "25"); - $this->cached_query = $this->ipsclass->DB->cur_query; - - $this->ipsclass->DB->prefix_changed = 1; - $outer = $this->ipsclass->DB->query( $this->cached_query ); - $this->ipsclass->DB->prefix_changed = 0; - $this->ipsclass->DB->flush_query(); - } - //----------------------------------------- - // PID / TID - //----------------------------------------- - - else if ($this->search_in == 'titles') - { - if ($posts AND !$topics) - { - $this->ipsclass->DB->simple_construct( array( 'select' => 'topic_id', 'from' => 'posts', 'where' => "pid IN({$posts})" ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $pr = $this->ipsclass->DB->fetch_row() ) - { - $topic_array[ $pr['topic_id'] ] = $pr['topic_id']; - } - - $topics = implode( ",", $topic_array ); - $topic_max_hits = count( $topic_array ); - } - - if ( ! $topics ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); - } - - $this->output .= $this->start_page($topic_max_hits); - - $this->ipsclass->DB->simple_construct( array( 'select' => 't.*', - 'from' => 'topics t', - 'where' => "t.tid IN({$topics})", - 'order' => "t.pinned DESC, t.".$this->sort_key." ".$this->sort_order, - 'limit' => array( $this->first, 25 ) - ) ); - $outer = $this->ipsclass->DB->simple_exec(); - } - else - { - //----------------------------------------- - // Add posts to the mix - //----------------------------------------- - - if ($posts) - { - $this->ipsclass->DB->simple_construct( array( 'select' => 'topic_id', 'from' => 'posts', 'where' => "pid IN({$posts})" ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $pr = $this->ipsclass->DB->fetch_row() ) - { - $topic_array[ $pr['topic_id'] ] = $pr['topic_id']; - } - - $topics = implode( ",", $topic_array ); - $topic_max_hits = count( $topic_array ); - } - - $this->output .= $this->start_page($topic_max_hits); - - $this->ipsclass->DB->simple_construct( array( 'select' => 't.*', - 'from' => 'topics t', - 'where' => "t.tid IN({$topics})", - 'order' => "t.pinned DESC, t.".$this->sort_key." ".$this->sort_order, - 'limit' => array( $this->first, 25 ) - ) ); - $outer = $this->ipsclass->DB->simple_exec(); - } - - //----------------------------------------- - // PRINT: Any returned rows? - //----------------------------------------- - - if ( $this->ipsclass->DB->get_num_rows($outer) ) - { - $topic_ids = array(); - $the_topics = array(); - - while ( $row = $this->ipsclass->DB->fetch_row($outer) ) - { - $row['keywords'] = $url_words; - - $the_topics[$row['tid']] = $row; - $topic_ids[] = $row['tid']; - } - - if ( ($this->ipsclass->vars['show_user_posted'] == 1) and ($this->ipsclass->member['id']) and ( count($topic_ids) ) ) - { - $this->ipsclass->DB->build_query( array( 'select' => 'author_id, topic_id', - 'from' => 'posts', - 'where' => "author_id=".$this->ipsclass->member['id']." AND topic_id IN(".implode( ",", $topic_ids ).")", - ) ); - - $this->ipsclass->DB->simple_exec(); - - while( $p = $this->ipsclass->DB->fetch_row() ) - { - if ( is_array( $the_topics[ $p['topic_id'] ] ) ) - { - $the_topics[ $p['topic_id'] ]['author_id'] = $p['author_id']; - } - } - } - - foreach( $the_topics as $row ) - { - $this->output .= $this->ipsclass->compiled_templates['skin_search']->RenderRow( $this->parse_entry($row) ); - } - } - else - { - if ( ! $this->ipsclass->input['lastdate'] ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); - } - else - { - $this->output .= $this->ipsclass->compiled_templates['skin_search']->no_results_row(); - } - } - - //----------------------------------------- - // PRINT: End the page - //----------------------------------------- - - $this->output .= $this->ipsclass->compiled_templates['skin_search']->end_results_table(array( 'SHOW_PAGES' => $this->links )); - } - - //----------------------------------------- - // Results as posts... - //----------------------------------------- - - else - { - // When viewing as posts, sort by post date not topic last post - - $this->sort_key = $this->sort_key == 'last_post' ? 'p.post_date' : $this->sort_key; - - $this->sort_key = ( strpos( $this->sort_key, "t." ) === FALSE AND strpos( $this->sort_key, "p." ) === FALSE ) - ? 't.' . $this->sort_key : $this->sort_key; - //----------------------------------------- - // Grab topic lib - //----------------------------------------- - - require_once( ROOT_PATH.'sources/action_public/topics.php' ); - $this->topics = new topics(); - $this->topics->ipsclass =& $this->ipsclass; - $this->topics->topic['tid'] = 0; - $this->topics->topic['forum_id'] = 0; - $this->topics->topic_init(); - - $attach_pids = array(); - - //----------------------------------------- - // CACHED QUERY? - //----------------------------------------- - - if ( $this->cached_query ) - { - $this->output .= $this->start_page($this->cached_matches, 1); - - $this->ipsclass->DB->cur_query = $this->cached_query; - $this->ipsclass->DB->simple_limit_with_check($this->first, "25"); - $this->cached_query = $this->ipsclass->DB->cur_query; - - $outer = $this->ipsclass->DB->query( $this->cached_query ); - $this->ipsclass->DB->flush_query(); - } - //----------------------------------------- - // PID / TID - //----------------------------------------- - - else - { - //----------------------------------------- - // Start... - //----------------------------------------- - - if ($this->search_in == 'titles') - { - if ($posts AND !$topics) - { - $this->ipsclass->DB->simple_construct( array( 'select' => 'topic_id', 'from' => 'posts', 'where' => "pid IN({$posts})" ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $pr = $this->ipsclass->DB->fetch_row() ) - { - $topic_array[ $pr['topic_id'] ] = $pr['topic_id']; - } - - $topics = implode( ",", $topic_array ); - $topic_max_hits = count( $topic_array ); - } - - if ( ! $topics ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); - } - - $this->output .= $this->start_page($topic_max_hits, 1); - - $this->ipsclass->DB->build_query( array( 'select' => 't.*, t.posts as topic_posts, t.title as topic_title', - 'from' => array( 'topics' => 't' ), - 'where' => "t.tid IN({$topics})", - 'limit' => array( $this->first, '25' ), - 'order' => $this->sort_key . ' ' . $this->sort_order, - 'add_join' => array( - array( - 'select' => 'p.pid, p.author_id, p.author_name, p.post_date, p.post, p.post_htmlstate, p.queued', - 'from' => array( 'posts' => 'p' ), - 'where' => 'p.topic_id=t.tid AND p.new_topic=1', - 'type' => 'left' - ), - array( - 'select' => 'm.*', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.id=p.author_id', - 'type' => 'left' - ), - array( - 'select' => 'me.*', - 'from' => array( 'member_extra' => 'me' ), - 'where' => 'me.id=p.author_id', - 'type' => 'left' - ), - array( - 'select' => 'pp.*', - 'from' => array( 'profile_portal' => 'pp' ), - 'where' => 'pp.pp_member_id=p.author_id', - 'type' => 'left' - ), - ) - ) ); - - $outer = $this->ipsclass->DB->exec_query(); - } - else - { - //----------------------------------------- - // Add Topics - //----------------------------------------- - - if ( $topics ) - { - $this->ipsclass->DB->simple_construct( array( 'select' => 'pid', 'from' => 'posts', 'where' => "topic_id IN({$topics}) AND new_topic=1" ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $pr = $this->ipsclass->DB->fetch_row() ) - { - $post_array[ $pr['pid'] ] = $pr['pid']; - } - - $posts = implode( ",", $post_array ); - $post_max_hits = count( $post_array ); - } - - $this->output .= $this->start_page($post_max_hits, 1); - - $this->ipsclass->DB->build_query( array( 'select' => 'p.pid, p.author_id, p.author_name, p.post_date, p.post, p.post_htmlstate, p.queued', - 'from' => array( 'posts' => 'p' ), - 'where' => "p.pid IN({$posts})", - 'limit' => array( $this->first, '25' ), - 'order' => $this->sort_key . ' ' . $this->sort_order, - 'add_join' => array( - array( - 'select' => 't.*, t.posts as topic_posts, t.title as topic_title', - 'from' => array( 'topics' => 't' ), - 'where' => 't.tid=p.topic_id', - 'type' => 'left' - ), - array( - 'select' => 'm.*', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.id=p.author_id', - 'type' => 'left' - ), - array( - 'select' => 'me.*', - 'from' => array( 'member_extra' => 'me' ), - 'where' => 'me.id=p.author_id', - 'type' => 'left' - ), - array( - 'select' => 'pp.*', - 'from' => array( 'profile_portal' => 'pp' ), - 'where' => 'pp.pp_member_id=p.author_id', - 'type' => 'left' - ), - ) - ) ); - - $outer = $this->ipsclass->DB->exec_query(); - } - } - - while ( $row = $this->ipsclass->DB->fetch_row($outer) ) - { - $row['keywords'] = $url_words; - $row['post_date'] = $this->ipsclass->get_date( $row['post_date'],'LONG' ); - - if ( $row['queued'] or ($row['topic_firstpost'] == $row['pid'] and $row['approved'] != 1) ) - { - $row['post_css'] = $this->row_count % 2 ? 'post1shaded' : 'post2shaded'; - } - else - { - $row['post_css'] = $this->row_count % 2 ? 'post1' : 'post2'; - } - //----------------------------------------- - // Parse HTML tag on the fly - //----------------------------------------- - - $row['post_htmlstate'] = isset($row['post_htmlstate']) ? $row['post_htmlstate'] : 0; - - $this->topics->parser->parse_html = ( $this->ipsclass->forums->forum_by_id[$row['forum_id']]['use_html'] and $this->ipsclass->cache['group_cache'][ $row['mgroup'] ]['g_dohtml'] and $row['post_htmlstate'] ) ? 1 : 0; - $this->topics->parser->parse_wordwrap = $this->ipsclass->vars['post_wordwrap']; - $this->topics->parser->parse_nl2br = $row['post_htmlstate'] == 2 ? 1 : 0; - - $row['post'] = $this->topics->parser->pre_display_parse( $row['post'] ); - - //----------------------------------------- - // Attachments? - //----------------------------------------- - - if ( strstr( $row['post'], '[attachment=' ) ) - { - $attach_pids[] = $row['pid']; - } - - //----------------------------------------- - // Parse Member - //----------------------------------------- - - $member = $this->topics->parse_member( $row ); - - if ( $member['id'] ) - { - $member['_members_display_name'] = "{$member['members_display_name_short']}"; - } - - $post = $this->parse_entry($row, 1); - - //----------------------------------------- - // Do word wrap? - //----------------------------------------- - - $this->output .= $this->ipsclass->compiled_templates['skin_search']->RenderPostRow( $post, $member ); - - //----------------------------------------- - // Ignoring member? - //----------------------------------------- - - if ( $this->ipsclass->member['ignored_users'] ) - { - if ( strstr( $this->ipsclass->member['ignored_users'], ','.$member['id'].',' ) and $this->ipsclass->input['p'] != $row['pid'] ) - { - if ( ! strstr( $this->ipsclass->vars['cannot_ignore_groups'], ','.$member['mgroup'].',' ) ) - { - $this->output .= $this->ipsclass->compiled_templates['skin_search']->render_row_hidden( $post, $member ); - continue; - } - } - } - } - - //----------------------------------------- - // Add in attachments? - //----------------------------------------- - - if ( count( $attach_pids ) ) - { - if ( ! is_object( $this->class_attach ) ) - { - //----------------------------------------- - // Grab render attach class - //----------------------------------------- - - require_once( ROOT_PATH . 'sources/classes/attach/class_attach.php' ); - $this->class_attach = new class_attach(); - $this->class_attach->ipsclass =& $this->ipsclass; - - $this->class_attach->type = 'post'; - $this->class_attach->init(); - } - - $this->output = $this->class_attach->render_attachments( $this->output, $attach_pids ); - } - - $this->output .= $this->ipsclass->compiled_templates['skin_search']->end_results_table(array( 'SHOW_PAGES' => $this->links ), 1 ); - } - - $this->page_title = $this->ipsclass->lang['search_results']; - - if ( $this->ipsclass->input['nav'] == 'lv' ) - { - if ( $this->ipsclass->input['lastdate'] ) - { - $this->nav = array( $this->ipsclass->lang['nav_au'] ); - } - else - { - $this->nav = array( $this->ipsclass->lang['nav_since_lv'] ); - } - } - else if ( $this->ipsclass->input['nav'] == 'lt' ) - { - $this->nav = array( $this->ipsclass->lang['nav_lt'] ); - } - else if ( $this->ipsclass->input['nav'] == 'at' ) - { - $this->nav = array( $this->ipsclass->lang['nav_at'] ); - } - else if ( $this->ipsclass->input['nav'] == 'au' ) - { - if( $this->ipsclass->input['result_type'] == 'topics' ) - { - $this->nav = array( $this->ipsclass->lang['nav_aut'] ); - } - else - { - $this->nav = array( $this->ipsclass->lang['nav_au'] ); - } - } - else - { - $this->nav = array( "{$this->ipsclass->lang['search_form']}", $this->ipsclass->lang['search_title'] ); - } - - //----------------------------------------- - // Active topics fing? - //----------------------------------------- - - if ( isset($this->ipsclass->input['lastdate']) ) - { - $this->output = preg_replace( "#(value=[\"']".intval($this->ipsclass->input['lastdate'])."[\"'])#i", "\\1 selected='selected'", $this->output ); - } - } - - /*-------------------------------------------------------------------------*/ - // Start the page functions - /*-------------------------------------------------------------------------*/ - - function start_page($amount, $is_post = 0) - { - $url_words = $this->convert_highlite_words( (isset($this->ipsclass->input['highlite']) AND $this->ipsclass->input['highlite']) ? $this->ipsclass->input['highlite'] : '' ); - $extra = $this->more_results ? str_replace( '%num', $this->resultlimit, $this->ipsclass->lang['too_many_children_for_santa'] ) : ""; - - $this->links = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => $amount, - 'PER_PAGE' => 25, - 'CUR_ST_VAL' => $this->first, - 'L_SINGLE' => "", - 'L_MULTI' => $this->ipsclass->lang['search_pages'], - 'BASE_URL' => $this->base_url."act=Search&nav=".$this->ipsclass->input['nav']."&CODE=show&searchid=".$this->unique_id."&search_in=".$this->search_in."&result_type=".$this->result_type."&hl=".$url_words, - ) ); - - if ($is_post == 0) - { - return $this->ipsclass->compiled_templates['skin_search']->start( array( 'SHOW_PAGES' => $this->links ), $extra ); - } - else - { - return $this->ipsclass->compiled_templates['skin_search']->start_as_post( array( 'SHOW_PAGES' => $this->links ), $extra ); - } - } - - /*-------------------------------------------------------------------------*/ - // Parse search result entry - /*-------------------------------------------------------------------------*/ - - function parse_entry($topic, $view_as_post=0) - { - $this->ipsclass->forum_read[ $topic['forum_id'] ] = isset( $this->ipsclass->forum_read[ $topic['forum_id'] ] ) ? $this->ipsclass->forum_read[ $topic['forum_id'] ] : 0; - $this->ipsclass->forum_read[0] = isset( $this->ipsclass->forum_read[0] ) ? $this->ipsclass->forum_read[0] : 0; - - $this->ipsclass->input['last_visit'] = ( $this->ipsclass->forum_read[ $topic['forum_id'] ] > $this->ipsclass->input['last_visit'] ) - ? $this->ipsclass->forum_read[ $topic['forum_id'] ] : $this->ipsclass->input['last_visit']; - - - - if ( isset($this->ipsclass->member['members_markers']['board']) AND $this->ipsclass->member['members_markers']['board'] > $this->ipsclass->input['last_visit'] ) - { - $this->ipsclass->input['last_visit'] = $this->ipsclass->member['members_markers']['board']; - } - - //----------------------------------------- - // Over ride with 'master' cookie? - //----------------------------------------- - - if ( $this->ipsclass->forum_read[ $topic['forum_id'] ] AND $this->ipsclass->forum_read[0] > $this->ipsclass->forum_read[ $topic['forum_id'] ] ) - { - $this->ipsclass->forum_read[ $topic['forum_id'] ] = $this->ipsclass->forum_read[0]; - } - - //----------------------------------------- - // Disable DB tracking... - // ^^ We'll disable this disabling for now - // as it seems to affect today's active tpx - //----------------------------------------- - - //$tmp = $this->ipsclass->vars['db_topic_read_cutoff']; - //$this->ipsclass->vars['db_topic_read_cutoff'] = 0; - - //----------------------------------------- - // Stop search from marking forum as read - //----------------------------------------- - - $topic['db_read'] = isset($topic['db_read']) ? $topic['db_read'] : 0; - - if ( is_array( $this->read_array ) ) - { - if ( array_key_exists( $topic['tid'], $this->read_array ) ) - { - if ( ! $topic['db_read'] OR $this->read_array[$topic['tid']] > $topic['db_read'] ) - { - $topic['db_read'] = $this->read_array[$topic['tid']]; - } - } - } - - $this->forums->new_posts = 1; - - $topic = $this->forums->parse_data( $topic, 0 ); - - if ($topic['pinned'] == 1) - { - $topic['prefix'] = $this->ipsclass->vars['pre_pinned']; - $topic['topic_icon'] = "<{B_PIN}>"; - } - - $topic['class1'] = "row2"; - $topic['class2'] = "row1"; - $topic['classposts'] = "row2"; - - if ( isset($this->ipsclass->member['is_mod']) AND $this->ipsclass->member['is_mod'] ) - { - if ( ! $topic['approved'] ) - { - $topic['class1'] = 'row4shaded'; - $topic['class2'] = 'row2shaded'; - $topic['classposts'] = 'row4shaded'; - } - else if ( isset($topic['_hasqueued']) AND $topic['_hasqueued'] ) - { - $topic['classposts'] = 'row4shaded'; - } - } - - //----------------------------------------- - // Remove potential [attachmentid= tag in title - //----------------------------------------- - - $topic['title'] = str_replace( '[attachmentid=', '[attachmentid=', $topic['title'] ); - - //----------------------------------------- - // Extra processing for posts.. - //----------------------------------------- - - if ($view_as_post == 1) - { - if ( $this->ipsclass->vars['search_post_cut'] ) - { - //$topic['post'] = substr( strip_tags($topic['post']), 0, $this->ipsclass->vars['search_post_cut']) . '...'; - $topic['post'] = $this->ipsclass->txt_mbsubstr( strip_tags($topic['post']), 0, $this->ipsclass->vars['search_post_cut'] ).'...'; - $topic['post'] = str_replace( "\n", "
    ", $topic['post'] ); - } - - if ($topic['author_id']) - { - $topic['author_name'] = $topic['members_display_name'] ? $topic['members_display_name'] : $topic['author_name']; - $topic['author_name'] = "{$topic['author_name']}"; - } - - //----------------------------------------- - // Highlighting? - //----------------------------------------- - - if ( $topic['keywords']) - { - $topic['post'] = $this->ipsclass->content_search_highlight( $topic['post'], $topic['keywords'] ); - } - } - - if ( ! $this->ipsclass->member['view_img'] ) - { - //----------------------------------------- - // unconvert smilies first, or it looks a bit crap. - //----------------------------------------- - - $topic['post'] = preg_replace( "#.+?#", "\\1" , $topic['post'] ); - - $topic['post'] = preg_replace( "//", "(IMG:\\1) ", $topic['post'] ); - } - - $topic['forum_full_name'] = $this->ipsclass->forums->forum_by_id[ $topic['forum_id'] ]['name']; - - if ( $this->ipsclass->txt_mb_strlen($topic['forum_full_name']) > 50 ) - { - $topic['forum_name'] = $this->ipsclass->txt_truncate( $topic['forum_full_name'], 47 ); - } - else - { - $topic['forum_name'] = $topic['forum_full_name']; - } - - if( $this->ipsclass->forums->forum_by_id[ $topic['forum_id'] ]['forum_allow_rating'] ) - { - if ( $topic['topic_rating_total'] ) - { - $topic['_rate_int'] = round( $topic['topic_rating_total'] / $topic['topic_rating_hits'] ); - } - - //----------------------------------------- - // Show image? - //----------------------------------------- - - if ( ( $topic['topic_rating_hits'] >= $this->ipsclass->vars['topic_rating_needed'] ) AND ( $topic['_rate_int'] ) ) - { - $topic['_rate_img'] = $this->ipsclass->compiled_templates['skin_search']->topic_rating_image( $topic['_rate_int'] ); - } - } - - return $topic; - } - - /*-------------------------------------------------------------------------*/ - // Filter keywords - /*-------------------------------------------------------------------------*/ - - function filter_keywords($words="", $name=0) - { - // force to lowercase and swop % into a safer version - $words = trim( str_replace( "%", "", $words) ); - - // Remove trailing boolean operators - - $words = preg_replace( "/\s+(and|or)$/" , "" , $words ); - - // Swop wildcard into *SQL percent - //$words = str_replace( "*", "%", $words ); - - // Make safe underscores - - if( $name == 0 ) - { - $words = str_replace( "_", "\\_", $words ); - } - - $words = str_replace( '|', "|", $words ); - - // Remove crap - - if ($name == 0) - { - $words = preg_replace( "/[\|\[\]\{\}\(\)\,:\\\\\/\"']|"/", "", $words ); - } - - // Remove common words.. (should be expanded upon in a later release to return 'not searchable word' - - $words = preg_replace( "/^(?:img|quote|code|html|javascript|a href|color|span|div|border|style)$/", "", $words ); - - return " ".preg_quote($words)." "; - } - - /*-------------------------------------------------------------------------*/ - // Filter keywords - /*-------------------------------------------------------------------------*/ - - function filter_ftext_keywords($words="") - { - // force to lowercase and swop % into a safer version - - $words = trim( rawurldecode($words) ); - $words = str_replace( '|', "|", $words ); - - // Remove crap - - $words = str_replace( """, '"', $words ); - $words = str_replace( ">" , ">", $words ); - $words = str_replace( "%" , "" , $words ); - - //----------------------------------------- - // If it's a phrase in quotes.. - //----------------------------------------- - - if ( preg_match( "#^\"(.+?)\"$#", $words ) ) - { - return $words; - } - - // Remove common words.. - - $words = preg_replace( "/^(?:img|quote|code|html|javascript|a href|color|span|div|border|style)$/", "", $words ); - - // OK, lets break up the keywords - - // this or that and this not me - - $words = preg_replace( "/\s+and\s+/i", " ", $words ); - - // this or that this not me - - $words = preg_replace( "/\s+not\s+/i", " -", $words ); - - // this or that this -me - - $words = preg_replace( "/\s+or\s+/i", ' ~', $words ); - - // this ~that this -me - - # Was added as a bug fix but really this causes more problems - # than it solves. Complaint was that it should default to AND - # matching, not OR matching. Problem is that it doesn't then - # give a "true" search as one would expect Google to do. - - //$words = preg_replace( "/\s+(?!-|~)/", " +", $words ); - - - // this ~that +this -me - - $words = str_replace( "~", "", $words ); - - // this that +this -me - - return "+".$words; - } - - /*-------------------------------------------------------------------------*/ - // Make the hl words nice and stuff - /*-------------------------------------------------------------------------*/ - - function convert_highlite_words($words="") - { - $words = $this->ipsclass->parse_clean_value(trim(urldecode($words))); - - // Convert booleans to something easy to match next time around - - $words = preg_replace("/\s+(and|or)(\s+|$)/i", ",\\1,", $words); - - // Convert spaces to plus signs - - $words = preg_replace("/\s/", "+", $words); - - return $words; - } - - /*-------------------------------------------------------------------------*/ - // Get the searchable forums - /*-------------------------------------------------------------------------*/ - - function get_searchable_forums() - { - $forumids = array(); - - //----------------------------------------- - // Check for an array - //----------------------------------------- - - if ( isset($_POST['forums']) AND is_array( $_POST['forums'] ) ) - { - - if ( in_array( 'all', $_POST['forums'] ) ) - { - //----------------------------------------- - // Searching all forums.. - //----------------------------------------- - - foreach( $this->ipsclass->forums->forum_by_id as $data ) - { - $forumids[] = $data['id']; - } - } - else - { - //----------------------------------------- - // Go loopy loo - //----------------------------------------- - - foreach( $_POST['forums'] as $l ) - { - if ( $this->ipsclass->forums->forum_by_id[ $l ] ) - { - $forumids[] = intval($l); - } - } - - //----------------------------------------- - // Do we have cats? Give 'em to Charles! - //----------------------------------------- - - if ( count( $forumids ) ) - { - if ( $this->ipsclass->input['searchsubs'] == 1 ) - { - foreach( $forumids as $f ) - { - $children = $this->ipsclass->forums->forums_get_children( $f ); - - if ( is_array($children) and count($children) ) - { - $forumids = array_merge( $forumids , $children ); - } - } - } - } - else - { - //----------------------------------------- - // No forums selected / we have available - //----------------------------------------- - - return; - } - } - } - else - { - //----------------------------------------- - // Not an array... - //----------------------------------------- - - if ( $this->ipsclass->input['forums'] == 'all' ) - { - foreach( $this->ipsclass->forums->forum_by_id as $data ) - { - $forumids[] = $data['id']; - } - } - else - { - if ( $this->ipsclass->input['forums'] != "" ) - { - $l = intval($this->ipsclass->input['forums']); - - //----------------------------------------- - // Single forum - //----------------------------------------- - - if ( $this->ipsclass->forums->forum_by_id[ $l ] ) - { - $forumids[] = intval($l); - } - - if ( $this->ipsclass->input['searchsubs'] == 1 ) - { - $children = $this->ipsclass->forums->forums_get_children( $l ); - - if ( is_array($children) and count($children) ) - { - $forumids = array_merge( $forumids , $children ); - } - } - } - } - } - - $final = array(); - - foreach( $forumids as $f ) - { - $f = intval($f); - - if ( $this->check_access($this->ipsclass->forums->forum_by_id[ $f ] ) == TRUE ) - { - $final[] = $f; - } - } - - //----------------------------------------- - // Remove blocked forums - //----------------------------------------- - - if ( $this->ipsclass->input['CODE'] == 'getnew' OR $this->ipsclass->input['CODE'] == 'getactive' ) - { - $block_forums = explode( ',', $this->ipsclass->vars['vnp_block_forums'] ); - - if ( is_array( $block_forums ) and count( $block_forums ) ) - { - if ( is_array( $final ) and count( $final ) ) - { - $tmp = $final; - $final = array(); - - foreach( $tmp as $id ) - { - if ( in_array( $id, $block_forums ) ) - { - continue; - } - else - { - $final[] = $id; - } - } - } - } - } - - //----------------------------------------- - // Return - //----------------------------------------- - - return implode( "," , $final ); - } - - /*-------------------------------------------------------------------------*/ - // Check password... - /*-------------------------------------------------------------------------*/ - - function check_access($i) - { - $can_read = FALSE; - - $i['read_perms'] = isset($i['read_perms']) ? $i['read_perms'] : NULL; - - if ( $this->ipsclass->check_perms( $i['read_perms'] ) == TRUE ) - { - $can_read = TRUE; - } - else - { - $can_read = FALSE; - } - - $i['password'] = isset($i['password']) ? $i['password'] : NULL; - - if ( $i['password'] != "" and $can_read == TRUE ) - { - if ( $this->ipsclass->forums->forums_compare_password( $i['id'] ) == TRUE ) - { - $can_read = TRUE; - } - else - { - $can_read = FALSE; - - if( $i['password_override'] ) - { - $bypass_groups = explode( ",", $i['password_override'] ); - - $my_groups = array( $this->ipsclass->member['mgroup'] ); - - if( $this->ipsclass->member['mgroup_others'] ) - { - $my_groups = array_merge( $my_groups, explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ) ); - } - - foreach( $my_groups as $g_id ) - { - if( in_array( $g_id, $bypass_groups ) ) - { - $can_read = TRUE; - } - } - } - } - } - - return $can_read; - } - -} - + $Date: 2007-12-27 14:33:11 -0500 (Thu, 27 Dec 2007) $ +| > $Revision: 1151 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > Searching procedures +| > Module written by Matt Mecham +| > Date started: 24th February 2002 +| +| > Module Version Number: 1.1.0 +| > DBA Checked: Thu 20 May 2004 +| > Quality Checked: Wed 15 Sept. 2004 ++-------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class search { + + var $output = ""; + var $page_title = ""; + var $nav = array(); + var $html = ""; + + var $first = 0; + var $row_count = 0; + + var $search_type = 'posts'; + var $sort_order = 'desc'; + var $sort_key = 'last_post'; + var $search_in = 'posts'; + var $topic_search_only = ""; + var $prune = '0'; + var $st_time = array(); + var $end_time = array(); + var $st_stamp = ""; + var $end_stamp = ""; + var $result_type = "topics"; + var $load_lib = 'search_mysql_man'; + var $lib = ""; + var $read_array = array(); + + var $mysql_version = ""; + var $true_version = ""; + + // max number of results + + var $resultlimit = 1000; + var $xml_out = 0; + + var $searchable_forums = array(); + + /*-------------------------------------------------------------------------*/ + // Auto run + /*-------------------------------------------------------------------------*/ + + function auto_run() + { + //----------------------------------------- + // Using XML? + //----------------------------------------- + + $this->xml_out = isset($this->ipsclass->input['xml']) ? intval( $this->ipsclass->input['xml'] ) : 0; + + //----------------------------------------- + // Require the HTML and language modules + //----------------------------------------- + + $this->ipsclass->load_language('lang_search'); + $this->ipsclass->load_language('lang_forum' ); + $this->ipsclass->load_template('skin_search'); + + //----------------------------------------- + // Check + //----------------------------------------- + + if (! $this->ipsclass->vars['allow_search']) + { + if ( $this->xml_out ) + { + @header( "Content-type: text/html;charset={$this->ipsclass->vars['gb_char_set']}" ); + print $this->ipsclass->lang['search_off']; + exit(); + } + else + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'search_off') ); + } + } + + if (! isset($this->ipsclass->member['g_use_search']) OR !$this->ipsclass->member['g_use_search'] ) + { + if ( $this->xml_out ) + { + @header( "Content-type: text/html;charset={$this->ipsclass->vars['gb_char_set']}" ); + print $this->ipsclass->lang['no_xml_permission']; + exit(); + } + else + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); + } + } + + if ( $read = $this->ipsclass->my_getcookie('topicsread') ) + { + $this->read_array = $this->ipsclass->clean_int_array( unserialize(stripslashes($read)) ); + } + + //----------------------------------------- + // Forum jump + //----------------------------------------- + + $this->ipsclass->forum_jump = $this->ipsclass->build_forum_jump(); + + //----------------------------------------- + // Get the SQL version. + //----------------------------------------- + + $this->ipsclass->DB->sql_get_version(); + + $this->true_version = $this->ipsclass->DB->true_version; + $this->mysql_version = $this->ipsclass->DB->mysql_version; + + //----------------------------------------- + // Sort out the required search library + //----------------------------------------- + + $method = isset($this->ipsclass->vars['search_sql_method']) ? $this->ipsclass->vars['search_sql_method'] : 'man'; + $sql = isset($this->ipsclass->vars['sql_driver']) ? $this->ipsclass->vars['sql_driver'] : 'mysql'; + + $this->load_lib = 'search_'.strtolower($sql).'_'.$method.'.php'; + + require ( ROOT_PATH."sources/lib/".$this->load_lib ); + + $this->base_url = $this->ipsclass->base_url; + + //----------------------------------------- + // Suck in libby + //----------------------------------------- + + $this->lib = new search_lib($this); + $this->lib->ipsclass =& $this->ipsclass; + + $this->first = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; + + //----------------------------------------- + // What to do? + //----------------------------------------- + + switch($this->ipsclass->input['CODE']) { + case '01': + $this->do_search(); + break; + case 'getnew': + $this->get_new_posts(); + break; + case 'show': + $this->show_results(); + break; + case 'getreplied': + $this->get_replies(); + break; + case 'lastten': + $this->get_last_ten(); + break; + case 'getalluser': + $this->get_all_user(); + break; + case 'simpleresults': + $this->ipsclass->input['searchsubs'] = 1; + $this->show_simple_results(); + break; + case 'explain': + $this->show_boolean_explain(); + break; + case 'searchtopic': + $this->search_topic(); + break; + case 'gettopicsuser': + $this->get_topics_user(); + break; + case 'getactive': + $this->ipsclass->input['active'] = 1; + $this->get_new_posts(); + break; + default: + $this->show_form(); + break; + } + + // If we have any HTML to print, do so... + + $this->ipsclass->print->add_output("$this->output"); + $this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, 'NAV' => $this->nav ) ); + } + + /*-------------------------------------------------------------------------*/ + // Do simple search + /*-------------------------------------------------------------------------*/ + + function show_simple_results() + { + $result = $this->lib->do_simple_search(); + } + + /*-------------------------------------------------------------------------*/ + // Search topic + /*-------------------------------------------------------------------------*/ + + function search_topic() + { + $this->topic_id = intval($this->ipsclass->input['topic']); + $this->topic_search_only = 1; + $this->result_type = 'posts'; + $this->search_type = 'posts'; + $this->search_in = 'posts'; + + $this->do_search(); + } + + /*-------------------------------------------------------------------------*/ + // Get all posts by a member + /*-------------------------------------------------------------------------*/ + + function get_topics_user() + { + //----------------------------------------- + // Do we have flood control enabled? + //----------------------------------------- + + if ($this->ipsclass->member['g_search_flood'] > 0) + { + $flood_time = time() - $this->ipsclass->member['g_search_flood']; + + //----------------------------------------- + // Get any old search results.. + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 'id', + 'from' => 'search_results', + 'where' => "(member_id='".$this->ipsclass->member['id']."' OR ip_address='".$this->ipsclass->input['IP_ADDRESS']."') AND search_date > '$flood_time'" ) ); + $this->ipsclass->DB->simple_exec(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'search_flood', 'EXTRA' => $this->ipsclass->member['g_search_flood']) ); + } + } + + $this->ipsclass->input['forums'] = 'all'; + + $forums = $this->get_searchable_forums(); + + $mid = intval($this->ipsclass->input['mid']); + + //----------------------------------------- + // Do we have any forums to search in? + //----------------------------------------- + + if ($forums == "") + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_forum') ); + } + + if ($mid == "") + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); + } + + //----------------------------------------- + // Get the topic ID's to serialize and store into + // the database + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 'count(*) as count', 'from' => 'topics t', 'where' => "t.approved=1 AND t.forum_id IN($forums) AND t.starter_id=$mid" ) ); + $this->ipsclass->DB->simple_exec(); + + $row = $this->ipsclass->DB->fetch_row(); + + $results = intval($row['count']); + + //----------------------------------------- + // Do we have any results? + //----------------------------------------- + + if ( ! $results ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); + } + + //----------------------------------------- + // Cache query + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 't.*, t.title as topic_title', + 'from' => 'topics t', + 'where' => "t.approved=1 AND t.forum_id IN($forums) AND t.starter_id=$mid", + 'order' => "t.last_post DESC" ) ); + + + $query_to_cache = $this->ipsclass->DB->cur_query; + $this->ipsclass->DB->flush_query(); + + //----------------------------------------- + // If we are still here, store the data into the database... + //----------------------------------------- + + $unique_id = md5(uniqid(microtime(),1)); + + $this->ipsclass->DB->do_insert( 'search_results', array ( + 'id' => $unique_id, + 'search_date' => time(), + 'post_max' => $results, + 'sort_key' => $this->sort_key, + 'sort_order' => $this->sort_order, + 'member_id' => $this->ipsclass->member['id'], + 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], + 'query_cache' => $query_to_cache + ) ); + + $this->ipsclass->boink_it( $this->ipsclass->base_url."act=Search&nav=au&CODE=show&searchid=$unique_id&search_in=topics&result_type=topics" ); + } + + /*-------------------------------------------------------------------------*/ + // Get all posts by a member + /*-------------------------------------------------------------------------*/ + + function get_all_user() + { + //----------------------------------------- + // Do we have flood control enabled? + //----------------------------------------- + + if ($this->ipsclass->member['g_search_flood'] > 0) + { + $flood_time = time() - $this->ipsclass->member['g_search_flood']; + + // Get any old search results.. + + $this->ipsclass->DB->simple_construct( array( 'select' => 'id', + 'from' => 'search_results', + 'where' => "(member_id='".$this->ipsclass->member['id']."' OR ip_address='".$this->ipsclass->input['IP_ADDRESS']."') AND search_date > '$flood_time'" ) ); + $this->ipsclass->DB->simple_exec(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'search_flood', 'EXTRA' => $this->ipsclass->member['g_search_flood']) ); + } + } + + $this->ipsclass->input['forums'] = 'all'; + + $forums = $this->get_searchable_forums(); + + $mid = intval($this->ipsclass->input['mid']); + + //----------------------------------------- + // Do we have any forums to search in? + //----------------------------------------- + + if ($forums == "") + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_forum') ); + } + + if ($mid == "") + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); + } + + //----------------------------------------- + // Get the topic ID's to serialize and store into + // the database + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'search_get_all_user_count', array( 'mid' => $mid, 'forums' => $forums ) ); + $this->ipsclass->DB->cache_exec_query(); + + $row = $this->ipsclass->DB->fetch_row(); + + $results = intval($row['count']); + + //----------------------------------------- + // Do we have any results? + //----------------------------------------- + + if ( ! $results ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); + } + + //----------------------------------------- + // Cache query + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'search_get_all_user_query', array( 'mid' => $mid, 'forums' => $forums ) ); + + $query_to_cache = $this->ipsclass->DB->cur_query; + $this->ipsclass->DB->flush_query(); + + //----------------------------------------- + // If we are still here, store the data into the database... + //----------------------------------------- + + $unique_id = md5(uniqid(microtime(),1)); + + $this->ipsclass->DB->do_insert( 'search_results', array ( + 'id' => $unique_id, + 'search_date' => time(), + 'post_max' => $results, + 'sort_key' => $this->sort_key, + 'sort_order' => $this->sort_order, + 'member_id' => $this->ipsclass->member['id'], + 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], + 'query_cache' => $query_to_cache + ) ); + + $this->ipsclass->boink_it( $this->ipsclass->base_url."act=Search&nav=au&CODE=show&searchid=$unique_id&search_in=posts&result_type=posts" ); + } + + /*-------------------------------------------------------------------------*/ + // Get new posts + /*-------------------------------------------------------------------------*/ + + function get_new_posts() + { + if ( ! $this->ipsclass->member['id'] and ! $this->ipsclass->input['active'] ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); + } + + //----------------------------------------- + // Do we have flood control enabled? + //----------------------------------------- + + if ($this->ipsclass->member['g_search_flood'] > 0) + { + $flood_time = time() - $this->ipsclass->member['g_search_flood']; + + // Get any old search results.. + + $this->ipsclass->DB->simple_construct( array( 'select' => 'id', + 'from' => 'search_results', + 'where' => "(member_id='".$this->ipsclass->member['id']."' OR ip_address='".$this->ipsclass->input['IP_ADDRESS']."') AND search_date > '$flood_time'" ) ); + $this->ipsclass->DB->simple_exec(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'search_flood', 'EXTRA' => $this->ipsclass->member['g_search_flood']) ); + } + } + + $last_time = $this->ipsclass->member['last_visit']; + + if ( $this->ipsclass->member['members_markers']['board'] > $last_time ) + { + $last_time = $this->ipsclass->member['members_markers']['board']; + } + + $this->ipsclass->input['nav'] = 'lv'; + + //----------------------------------------- + // Are we getting 'active topics'? + //----------------------------------------- + + $this->ipsclass->input['lastdate'] = isset($this->ipsclass->input['lastdate']) ? intval($this->ipsclass->input['lastdate']) : 0; + + if ( isset($this->ipsclass->input['active']) AND $this->ipsclass->input['active'] ) + { + if ( $this->ipsclass->input['lastdate'] ) + { + $last_time = time() - $this->ipsclass->input['lastdate']; + } + else + { + $last_time = time() - 86400; + } + + $this->ipsclass->input['nav'] = 'at'; + } + + $this->ipsclass->input['forums'] = 'all'; + + $forums = $this->get_searchable_forums(); + + //----------------------------------------- + // Do we have any forums to search in? + //----------------------------------------- + + if ($forums == "") + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_forum') ); + } + + //----------------------------------------- + // Get the topic ID's to serialize and store into + // the database + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 'count(*) as count', 'from' => 'topics', 'where' => "approved=1 AND state != 'link' AND forum_id IN($forums) AND last_post > '".$last_time."'" ) ); + $this->ipsclass->DB->simple_exec(); + + $row = $this->ipsclass->DB->fetch_row(); + + $results = intval($row['count']); + + //----------------------------------------- + // Do we have any results? + //----------------------------------------- + + if ( ! $results ) + { + //$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); + } + + //----------------------------------------- + // Cache query + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 't.*, t.title as topic_title', + 'from' => 'topics t', + 'where' => "t.approved=1 AND t.state != 'link' AND t.forum_id IN($forums) AND t.last_post > {$last_time}", + 'order' => "t.last_post DESC" ) ); + + + $query_to_cache = $this->ipsclass->DB->cur_query; + $this->ipsclass->DB->flush_query(); + + //----------------------------------------- + // If we are still here, store the data into the database... + //----------------------------------------- + + $unique_id = md5(uniqid(microtime(),1)); + + $this->ipsclass->DB->do_insert( 'search_results', array ( + 'id' => $unique_id, + 'search_date' => time(), + 'post_max' => $results, + 'sort_key' => $this->sort_key, + 'sort_order' => $this->sort_order, + 'member_id' => $this->ipsclass->member['id'], + 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], + 'query_cache' => $query_to_cache + ) ); + + $this->ipsclass->boink_it( $this->ipsclass->base_url."act=Search&nav={$this->ipsclass->input['nav']}&CODE=show&searchid=$unique_id&search_in=topics&result_type=topics&lastdate={$this->ipsclass->input['lastdate']}" ); + } + + /*-------------------------------------------------------------------------*/ + // Last 10 posts + /*-------------------------------------------------------------------------*/ + + function get_last_ten() + { + //----------------------------------------- + // Do we have flood control enabled? + //----------------------------------------- + + if ($this->ipsclass->member['g_search_flood'] > 0) + { + $flood_time = time() - $this->ipsclass->member['g_search_flood']; + + // Get any old search results.. + + $this->ipsclass->DB->simple_construct( array( 'select' => 'id', + 'from' => 'search_results', + 'where' => "(member_id='".$this->ipsclass->member['id']."' OR ip_address='".$this->ipsclass->input['IP_ADDRESS']."') AND search_date > '$flood_time'" ) ); + $this->ipsclass->DB->simple_exec(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'search_flood', 'EXTRA' => $this->ipsclass->member['g_search_flood']) ); + } + } + + $this->ipsclass->input['forums'] = 'all'; + + $forums = $this->get_searchable_forums(); + + $mid = $this->ipsclass->member['id']; + + //----------------------------------------- + // Do we have any forums to search in? + //----------------------------------------- + + if ($forums == "") + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_forum') ); + } + + //----------------------------------------- + // Cache query + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'search_get_last_ten', array( 'mid' => $mid, 'forums' => $forums ) ); + + $query_to_cache = $this->ipsclass->DB->cur_query; + $this->ipsclass->DB->flush_query(); + + //----------------------------------------- + // If we are still here, store the data into the database... + //----------------------------------------- + + $unique_id = md5(uniqid(microtime(),1)); + + $this->ipsclass->DB->do_insert( 'search_results', array ( + 'id' => $unique_id, + 'search_date' => time(), + 'post_max' => 10, + 'sort_key' => $this->sort_key, + 'sort_order' => $this->sort_order, + 'member_id' => $this->ipsclass->member['id'], + 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], + 'query_cache' => $query_to_cache + ) ); + + $this->ipsclass->boink_it( $this->ipsclass->base_url."act=Search&nav=au&CODE=show&searchid=$unique_id&search_in=posts&result_type=posts" ); + } + + /*-------------------------------------------------------------------------*/ + // Get all replies + /*-------------------------------------------------------------------------*/ + + function get_replies() + { + //----------------------------------------- + // Do we have flood control enabled? + //----------------------------------------- + + if ($this->ipsclass->member['g_search_flood'] > 0) + { + $flood_time = time() - $this->ipsclass->member['g_search_flood']; + + // Get any old search results.. + + $this->ipsclass->DB->simple_construct( array( 'select' => 'id', + 'from' => 'search_results', + 'where' => "(member_id='".$this->ipsclass->member['id']."' OR ip_address='".$this->ipsclass->input['IP_ADDRESS']."') AND search_date > '$flood_time'" ) ); + $this->ipsclass->DB->simple_exec(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'search_flood', 'EXTRA' => $this->ipsclass->member['g_search_flood']) ); + } + } + + $this->ipsclass->input['forums'] = 'all'; + $this->ipsclass->input['nav'] = 'lv'; + + $forums = $this->get_searchable_forums(); + + if ( $this->ipsclass->forum_read[0] > $this->ipsclass->member['last_visit'] ) + { + $this->ipsclass->member['last_visit'] = $this->ipsclass->forum_read[0]; + } + + //----------------------------------------- + // Do we have any forums to search in? + //----------------------------------------- + + if ($forums == "") + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_forum') ); + } + + //----------------------------------------- + // Get the topic ID's to serialize and store into + // the database + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 'tid', + 'from' => 'topics', + 'where' => "starter_id={$this->ipsclass->member['id']} AND last_post > {$this->ipsclass->member['last_visit']} AND forum_id IN($forums) AND approved=1" ) ); + $this->ipsclass->DB->simple_exec(); + + $max_hits = $this->ipsclass->DB->get_num_rows(); + + $topics = ""; + + while ($row = $this->ipsclass->DB->fetch_row() ) + { + $topics .= $row['tid'].","; + } + + $this->ipsclass->DB->free_result(); + + $topics = preg_replace( "/,$/", "", $topics ); + + //----------------------------------------- + // Do we have any results? + //----------------------------------------- + + if ($topics == "") + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); + } + + //----------------------------------------- + // If we are still here, store the data into the database... + //----------------------------------------- + + $unique_id = md5(uniqid(microtime(),1)); + + $this->ipsclass->DB->do_insert( 'search_results', array ( + 'id' => $unique_id, + 'search_date'=> time(), + 'topic_id' => $topics, + 'topic_max' => $max_hits, + 'sort_key' => $this->sort_key, + 'sort_order' => $this->sort_order, + 'member_id' => $this->ipsclass->member['id'], + 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], + ) ); + + $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['search_redirect'] , "act=Search&nav=gr&CODE=show&searchid=$unique_id&search_in=posts&result_type=topics" ); + exit(); + } + + /*-------------------------------------------------------------------------*/ + // Show pop-up window + /*-------------------------------------------------------------------------*/ + + function show_boolean_explain() + { + $this->ipsclass->print->pop_up_window( $this->ipsclass->lang['be_link'], $this->ipsclass->compiled_templates['skin_search']->boolean_explain_page() ); + } + + /*-------------------------------------------------------------------------*/ + // Show main form + /*-------------------------------------------------------------------------*/ + + function show_form() + { + $the_html = $this->ipsclass->forums->forums_forum_jump(1, 1); + + $init_sel = !$this->ipsclass->input['f'] ? ' selected="selected"' : ''; + + $forums = ""; + + if ( $this->ipsclass->input['mode'] == 'simple' ) + { + if ( $this->ipsclass->vars['search_sql_method'] == 'ftext' ) + { + $this->output = $this->ipsclass->compiled_templates['skin_search']->simple_form($forums); + } + else + { + $this->output = $this->ipsclass->compiled_templates['skin_search']->Form($forums); + } + } + else if ( $this->ipsclass->input['mode'] == 'adv' ) + { + $this->output = $this->ipsclass->compiled_templates['skin_search']->Form($forums); + + if ( $this->ipsclass->vars['search_sql_method'] == 'ftext' ) + { + $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_search']->form_simple_button(), $this->output ); + } + } + else + { + // No mode specified.. + + if ( $this->ipsclass->vars['search_default_method'] == 'simple' ) + { + if ( $this->ipsclass->vars['search_sql_method'] == 'ftext' ) + { + $this->output = $this->ipsclass->compiled_templates['skin_search']->simple_form($forums); + } + else + { + $this->output = $this->ipsclass->compiled_templates['skin_search']->Form($forums); + } + } + else + { + // Default.. + + $this->output = $this->ipsclass->compiled_templates['skin_search']->Form($forums); + + if ( $this->ipsclass->vars['search_sql_method'] == 'ftext' ) + { + $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_search']->form_simple_button(), $this->output ); + } + } + } + + if ( ( $this->ipsclass->DB->sql_can_fulltext_boolean() == TRUE ) AND $this->ipsclass->vars['search_sql_method'] == 'ftext' ) + { + $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_search']->boolean_explain_link(), $this->output ); + } + + $this->page_title = $this->ipsclass->lang['search_title']; + $this->nav = array( $this->ipsclass->lang['search_form'] ); + } + + /*-------------------------------------------------------------------------*/ + // DO MAIN SEARCH + /*-------------------------------------------------------------------------*/ + + function do_search() + { + //----------------------------------------- + // Un-urlencode first + //----------------------------------------- + if( isset($this->ipsclass->input['xml']) AND $this->ipsclass->input['xml'] ) + { + require (KERNEL_PATH."class_ajax.php"); + $xml_convert = new class_ajax(); + $xml_convert->ipsclass =& $this->ipsclass; + + $this->ipsclass->input['keywords'] = $xml_convert->convert_and_make_safe($this->ipsclass->input['keywords']); + } + + //----------------------------------------- + // Do we have flood control enabled? + //----------------------------------------- + + if ($this->ipsclass->member['g_search_flood'] > 0) + { + $flood_time = time() - $this->ipsclass->member['g_search_flood']; + + // Get any old search results.. + + $this->ipsclass->DB->simple_construct( array( 'select' => 'id', + 'from' => 'search_results', + 'where' => "(member_id='".$this->ipsclass->member['id']."' OR ip_address='".$this->ipsclass->input['IP_ADDRESS']."') AND search_date > '$flood_time'" ) ); + $this->ipsclass->DB->simple_exec(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + if ( $this->xml_out ) + { + @header( "Content-type: text/html;charset={$this->ipsclass->vars['gb_char_set']}" ); + print sprintf( $this->ipsclass->lang['xml_flood'], $this->ipsclass->member['g_search_flood'] ); + exit(); + } + else + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'search_flood', 'EXTRA' => $this->ipsclass->member['g_search_flood']) ); + } + } + } + + //----------------------------------------- + // init main search + //----------------------------------------- + + $result = $this->lib->do_main_search(); + + //----------------------------------------- + // Do we have any results? + //----------------------------------------- + + if ($result['topic_id'] == "" and $result['post_id'] == "") + { + if ( $this->xml_out ) + { + @header( "Content-type: text/html;charset={$this->ipsclass->vars['gb_char_set']}" ); + print sprintf( $this->ipsclass->lang['xml_nomatches'], $result['keywords'] ); + exit(); + } + else + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); + } + } + + //----------------------------------------- + // If we are still here, store the data into the database... + //----------------------------------------- + + $unique_id = md5(uniqid(microtime(),1)); + $url = "act=Search&CODE=show&searchid=".$unique_id."&search_in=".$this->search_in."&result_type=".$this->result_type."&highlite=".urlencode(trim($result['keywords'])); + + $this->ipsclass->DB->do_insert( 'search_results', array ( + 'id' => $unique_id, + 'search_date' => time(), + 'topic_id' => $result['topic_id'], + 'topic_max' => $result['topic_max'], + 'sort_key' => $this->sort_key, + 'sort_order' => $this->sort_order, + 'member_id' => $this->ipsclass->member['id'], + 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], + 'post_id' => $result['post_id'], + 'post_max' => $result['post_max'], + 'query_cache' => $result['query_cache'], + ) ); + + if ( $this->xml_out ) + { + $result['post_max'] = $result['post_max'] < 1 ? 1 : $result['post_max']; + + @header( "Content-type: text/html;charset={$this->ipsclass->vars['gb_char_set']}" ); + print sprintf( $this->ipsclass->lang['xml_matches'], preg_replace( "#^[\+\-]#", "", $result['keywords'] ), $result['post_max'], $this->ipsclass->base_url.$url ); + exit(); + } + else + { + $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['search_redirect'] , $url ); + } + } + + /*-------------------------------------------------------------------------*/ + // Show Results + // Shows the results of the search + /*-------------------------------------------------------------------------*/ + + function show_results() + { + $this->cached_query = 0; + $this->cached_matches = 0; + + //----------------------------------------- + // Grab forums lib + //----------------------------------------- + + require_once( ROOT_PATH."sources/action_public/forums.php" ); + $this->forums = new forums(); + $this->forums->ipsclass =& $this->ipsclass; + $this->forums->init(); + + //----------------------------------------- + // Start... + //----------------------------------------- + + $this->result_type = $this->ipsclass->input['result_type']; + $this->search_in = $this->ipsclass->input['search_in']; + + //----------------------------------------- + // We have a search ID, so lets get the parsed results. + //----------------------------------------- + + $this->unique_id = $this->ipsclass->input['searchid']; + + if ($this->unique_id == "") + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); + } + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', + 'from' => 'search_results', + 'where' => "id='{$this->unique_id}'" ) ); + $this->ipsclass->DB->simple_exec(); + + $sr = $this->ipsclass->DB->fetch_row(); + + $this->sort_order = $sr['sort_order']; + $this->sort_key = $sr['sort_key']; + $this->more_results = $sr['query_cache'] == 1 ? 1 : 0; + + //----------------------------------------- + // Cached query or PID/TID list? + // query_cache == 1 if more than 300 results + //----------------------------------------- + + if ( $sr['query_cache'] and $sr['query_cache'] != 1 ) + { + $this->cached_query = $sr['query_cache']; + $this->cached_matches = $sr['post_max']; + } + else + { + $topics = $sr['topic_id']; + $topic_max_hits = $sr['topic_max']; + $posts = $sr['post_id']; + $post_max_hits = $sr['post_max']; + + //----------------------------------------- + // Build array + //----------------------------------------- + + $topic_array = array(); + $post_array = array(); + + if ( $topics ) + { + foreach( explode( ",", $topics ) as $t ) + { + $topic_array[ $t ] = $t; + } + } + + if ( $posts ) + { + foreach( explode( ",", $posts ) as $t ) + { + $post_array[ $t ] = $t; + } + } + + //----------------------------------------- + // Anything left to show? + //----------------------------------------- + + if ( ! $topics and ! $posts ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); + } + } + + $this->ipsclass->input['highlite'] = $this->ipsclass->input['highlite'] ? $this->ipsclass->input['highlite'] : $this->ipsclass->input['hl']; + + $url_words = $this->convert_highlite_words( (isset($this->ipsclass->input['highlite']) AND $this->ipsclass->input['highlite']) ? $this->ipsclass->input['highlite'] : '' ); + + if ( $this->result_type == 'topics' ) + { + //----------------------------------------- + // CACHED QUERY? + //----------------------------------------- + + if ( $this->cached_query ) + { + $this->output .= $this->start_page($this->cached_matches); + + $this->ipsclass->DB->cur_query = $this->cached_query; + $this->ipsclass->DB->simple_limit_with_check($this->first, "25"); + $this->cached_query = $this->ipsclass->DB->cur_query; + + $this->ipsclass->DB->prefix_changed = 1; + $outer = $this->ipsclass->DB->query( $this->cached_query ); + $this->ipsclass->DB->prefix_changed = 0; + $this->ipsclass->DB->flush_query(); + } + //----------------------------------------- + // PID / TID + //----------------------------------------- + + else if ($this->search_in == 'titles') + { + /*if ($posts AND !$topics) + { + $this->ipsclass->DB->simple_construct( array( 'select' => 'topic_id', 'from' => 'posts', 'where' => "pid IN({$posts})" ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $pr = $this->ipsclass->DB->fetch_row() ) + { + $topic_array[ $pr['topic_id'] ] = $pr['topic_id']; + } + + $topics = implode( ",", $topic_array ); + $topic_max_hits = count( $topic_array ); + }*/ + + if ( ! $topics ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); + } + + $this->output .= $this->start_page($topic_max_hits); + + $this->ipsclass->DB->simple_construct( array( 'select' => 't.*', + 'from' => 'topics t', + 'where' => "t.tid IN({$topics})", + 'order' => "t.pinned DESC, t.".$this->sort_key." ".$this->sort_order, + 'limit' => array( $this->first, 25 ) + ) ); + $outer = $this->ipsclass->DB->simple_exec(); + } + else + { + //----------------------------------------- + // Add posts to the mix + //----------------------------------------- + + if ($posts) + { + $this->ipsclass->DB->simple_construct( array( 'select' => 'topic_id', 'from' => 'posts', 'where' => "pid IN({$posts})" ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $pr = $this->ipsclass->DB->fetch_row() ) + { + $topic_array[ $pr['topic_id'] ] = $pr['topic_id']; + } + + $topics = implode( ",", $topic_array ); + $topic_max_hits = count( $topic_array ); + } + + $this->output .= $this->start_page($topic_max_hits); + + $this->ipsclass->DB->simple_construct( array( 'select' => 't.*', + 'from' => 'topics t', + 'where' => "t.tid IN({$topics})", + 'order' => "t.pinned DESC, t.".$this->sort_key." ".$this->sort_order, + 'limit' => array( $this->first, 25 ) + ) ); + $outer = $this->ipsclass->DB->simple_exec(); + } + + //----------------------------------------- + // PRINT: Any returned rows? + //----------------------------------------- + + if ( $this->ipsclass->DB->get_num_rows($outer) ) + { + $topic_ids = array(); + $the_topics = array(); + + while ( $row = $this->ipsclass->DB->fetch_row($outer) ) + { + $row['keywords'] = $url_words; + + $the_topics[$row['tid']] = $row; + $topic_ids[] = $row['tid']; + } + + if ( ($this->ipsclass->vars['show_user_posted'] == 1) and ($this->ipsclass->member['id']) and ( count($topic_ids) ) ) + { + $this->ipsclass->DB->build_query( array( 'select' => 'author_id, topic_id', + 'from' => 'posts', + 'where' => "author_id=".$this->ipsclass->member['id']." AND topic_id IN(".implode( ",", $topic_ids ).")", + ) ); + + $this->ipsclass->DB->simple_exec(); + + while( $p = $this->ipsclass->DB->fetch_row() ) + { + if ( is_array( $the_topics[ $p['topic_id'] ] ) ) + { + $the_topics[ $p['topic_id'] ]['author_id'] = $p['author_id']; + } + } + } + + foreach( $the_topics as $row ) + { + $this->output .= $this->ipsclass->compiled_templates['skin_search']->RenderRow( $this->parse_entry($row) ); + } + } + else + { + if ( ! $this->ipsclass->input['lastdate'] ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); + } + else + { + $this->output .= $this->ipsclass->compiled_templates['skin_search']->no_results_row(); + } + } + + //----------------------------------------- + // PRINT: End the page + //----------------------------------------- + + $this->output .= $this->ipsclass->compiled_templates['skin_search']->end_results_table(array( 'SHOW_PAGES' => $this->links )); + } + + //----------------------------------------- + // Results as posts... + //----------------------------------------- + + else + { + // When viewing as posts, sort by post date not topic last post + + $this->sort_key = $this->sort_key == 'last_post' ? 'p.post_date' : $this->sort_key; + + $this->sort_key = ( strpos( $this->sort_key, "t." ) === FALSE AND strpos( $this->sort_key, "p." ) === FALSE ) + ? 't.' . $this->sort_key : $this->sort_key; + //----------------------------------------- + // Grab topic lib + //----------------------------------------- + + require_once( ROOT_PATH.'sources/action_public/topics.php' ); + $this->topics = new topics(); + $this->topics->ipsclass =& $this->ipsclass; + $this->topics->topic['tid'] = 0; + $this->topics->topic['forum_id'] = 0; + $this->topics->topic_init(); + + $attach_pids = array(); + + //----------------------------------------- + // CACHED QUERY? + //----------------------------------------- + + if ( $this->cached_query ) + { + $this->output .= $this->start_page($this->cached_matches, 1); + + $this->ipsclass->DB->cur_query = $this->cached_query; + $this->ipsclass->DB->simple_limit_with_check($this->first, "25"); + $this->cached_query = $this->ipsclass->DB->cur_query; + + $outer = $this->ipsclass->DB->query( $this->cached_query ); + $this->ipsclass->DB->flush_query(); + } + //----------------------------------------- + // PID / TID + //----------------------------------------- + + else + { + //----------------------------------------- + // Start... + //----------------------------------------- + + if ($this->search_in == 'titles') + { + if ($posts AND !$topics) + { + $this->ipsclass->DB->simple_construct( array( 'select' => 'topic_id', 'from' => 'posts', 'where' => "pid IN({$posts})" ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $pr = $this->ipsclass->DB->fetch_row() ) + { + $topic_array[ $pr['topic_id'] ] = $pr['topic_id']; + } + + $topics = implode( ",", $topic_array ); + $topic_max_hits = count( $topic_array ); + } + + if ( ! $topics ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_search_results' ) ); + } + + $this->output .= $this->start_page($topic_max_hits, 1); + + $this->ipsclass->DB->build_query( array( 'select' => 't.*, t.posts as topic_posts, t.title as topic_title', + 'from' => array( 'topics' => 't' ), + 'where' => "t.tid IN({$topics})", + 'limit' => array( $this->first, '25' ), + 'order' => $this->sort_key . ' ' . $this->sort_order, + 'add_join' => array( + array( + 'select' => 'p.pid, p.author_id, p.author_name, p.post_date, p.post, p.post_htmlstate, p.queued', + 'from' => array( 'posts' => 'p' ), + 'where' => 'p.topic_id=t.tid AND p.new_topic=1', + 'type' => 'left' + ), + array( + 'select' => 'm.*', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.id=p.author_id', + 'type' => 'left' + ), + array( + 'select' => 'me.*', + 'from' => array( 'member_extra' => 'me' ), + 'where' => 'me.id=p.author_id', + 'type' => 'left' + ), + array( + 'select' => 'pp.*', + 'from' => array( 'profile_portal' => 'pp' ), + 'where' => 'pp.pp_member_id=p.author_id', + 'type' => 'left' + ), + ) + ) ); + + $outer = $this->ipsclass->DB->exec_query(); + } + else + { + //----------------------------------------- + // Add Topics + //----------------------------------------- + + if ( $topics ) + { + $this->ipsclass->DB->simple_construct( array( 'select' => 'pid', 'from' => 'posts', 'where' => "topic_id IN({$topics}) AND new_topic=1" ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $pr = $this->ipsclass->DB->fetch_row() ) + { + $post_array[ $pr['pid'] ] = $pr['pid']; + } + + $posts = implode( ",", $post_array ); + $post_max_hits = count( $post_array ); + } + + $this->output .= $this->start_page($post_max_hits, 1); + + $this->ipsclass->DB->build_query( array( 'select' => 'p.pid, p.author_id, p.author_name, p.post_date, p.post, p.post_htmlstate, p.queued', + 'from' => array( 'posts' => 'p' ), + 'where' => "p.pid IN({$posts})", + 'limit' => array( $this->first, '25' ), + 'order' => $this->sort_key . ' ' . $this->sort_order, + 'add_join' => array( + array( + 'select' => 't.*, t.posts as topic_posts, t.title as topic_title', + 'from' => array( 'topics' => 't' ), + 'where' => 't.tid=p.topic_id', + 'type' => 'left' + ), + array( + 'select' => 'm.*', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.id=p.author_id', + 'type' => 'left' + ), + array( + 'select' => 'me.*', + 'from' => array( 'member_extra' => 'me' ), + 'where' => 'me.id=p.author_id', + 'type' => 'left' + ), + array( + 'select' => 'pp.*', + 'from' => array( 'profile_portal' => 'pp' ), + 'where' => 'pp.pp_member_id=p.author_id', + 'type' => 'left' + ), + ) + ) ); + + $outer = $this->ipsclass->DB->exec_query(); + } + } + + while ( $row = $this->ipsclass->DB->fetch_row($outer) ) + { + $row['keywords'] = $url_words; + $row['post_date'] = $this->ipsclass->get_date( $row['post_date'],'LONG' ); + + if ( $row['queued'] or ($row['topic_firstpost'] == $row['pid'] and $row['approved'] != 1) ) + { + $row['post_css'] = $this->row_count % 2 ? 'post1shaded' : 'post2shaded'; + } + else + { + $row['post_css'] = $this->row_count % 2 ? 'post1' : 'post2'; + } + + //----------------------------------------- + // Attachments? + //----------------------------------------- + + //if ( strstr( $row['post'], '[attachment=' ) ) + //{ + $attach_pids[] = $row['pid']; + //} + + //----------------------------------------- + // Parse Member + //----------------------------------------- + + $member = $this->ipsclass->parse_member( $row, 0, 'skin_search' ); + + if ( $member['id'] ) + { + $member['_members_display_name'] = "{$member['members_display_name_short']}"; + } + + $post = $this->parse_entry($row, 1); + + //----------------------------------------- + // Do word wrap? + //----------------------------------------- + + $this->output .= $this->ipsclass->compiled_templates['skin_search']->RenderPostRow( $post, $member ); + + //----------------------------------------- + // Ignoring member? + //----------------------------------------- + + if ( $this->ipsclass->member['ignored_users'] ) + { + if ( strstr( $this->ipsclass->member['ignored_users'], ','.$member['id'].',' ) and $this->ipsclass->input['p'] != $row['pid'] ) + { + if ( ! strstr( $this->ipsclass->vars['cannot_ignore_groups'], ','.$member['mgroup'].',' ) ) + { + $this->output .= $this->ipsclass->compiled_templates['skin_search']->render_row_hidden( $post, $member ); + continue; + } + } + } + } + + //----------------------------------------- + // Add in attachments? + //----------------------------------------- + + if ( count( $attach_pids ) ) + { + if ( ! is_object( $this->class_attach ) ) + { + //----------------------------------------- + // Grab render attach class + //----------------------------------------- + + require_once( ROOT_PATH . 'sources/classes/attach/class_attach.php' ); + $this->class_attach = new class_attach(); + $this->class_attach->ipsclass =& $this->ipsclass; + + $this->class_attach->type = 'post'; + $this->class_attach->init(); + } + + $this->output = $this->class_attach->render_attachments( $this->output, $attach_pids ); + } + + $this->output .= $this->ipsclass->compiled_templates['skin_search']->end_results_table(array( 'SHOW_PAGES' => $this->links ), 1 ); + } + + $this->page_title = $this->ipsclass->lang['search_results']; + + if ( $this->ipsclass->input['nav'] == 'lv' ) + { + if ( $this->ipsclass->input['lastdate'] ) + { + $this->nav = array( $this->ipsclass->lang['nav_au'] ); + } + else + { + $this->nav = array( $this->ipsclass->lang['nav_since_lv'] ); + } + } + else if ( $this->ipsclass->input['nav'] == 'lt' ) + { + $this->nav = array( $this->ipsclass->lang['nav_lt'] ); + } + else if ( $this->ipsclass->input['nav'] == 'at' ) + { + $this->nav = array( $this->ipsclass->lang['nav_at'] ); + } + else if ( $this->ipsclass->input['nav'] == 'au' ) + { + if( $this->ipsclass->input['result_type'] == 'topics' ) + { + $this->nav = array( $this->ipsclass->lang['nav_aut'] ); + } + else + { + $this->nav = array( $this->ipsclass->lang['nav_au'] ); + } + } + else + { + $this->nav = array( "{$this->ipsclass->lang['search_form']}", $this->ipsclass->lang['search_title'] ); + } + + //----------------------------------------- + // Active topics fing? + //----------------------------------------- + + if ( isset($this->ipsclass->input['lastdate']) ) + { + $this->output = preg_replace( "#(value=[\"']".intval($this->ipsclass->input['lastdate'])."[\"'])#i", "\\1 selected='selected'", $this->output ); + } + } + + /*-------------------------------------------------------------------------*/ + // Start the page functions + /*-------------------------------------------------------------------------*/ + + function start_page($amount, $is_post = 0) + { + $url_words = $this->convert_highlite_words( (isset($this->ipsclass->input['highlite']) AND $this->ipsclass->input['highlite']) ? $this->ipsclass->input['highlite'] : '' ); + $extra = $this->more_results ? str_replace( '%num', $this->resultlimit, $this->ipsclass->lang['too_many_children_for_santa'] ) : ""; + + $this->links = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => $amount, + 'PER_PAGE' => 25, + 'CUR_ST_VAL' => $this->first, + 'L_SINGLE' => "", + 'L_MULTI' => $this->ipsclass->lang['search_pages'], + 'BASE_URL' => $this->base_url."act=Search&nav=".$this->ipsclass->input['nav']."&CODE=show&searchid=".$this->unique_id."&search_in=".$this->search_in."&result_type=".$this->result_type."&hl=".$url_words, + ) ); + + if ($is_post == 0) + { + return $this->ipsclass->compiled_templates['skin_search']->start( array( 'SHOW_PAGES' => $this->links ), $extra ); + } + else + { + return $this->ipsclass->compiled_templates['skin_search']->start_as_post( array( 'SHOW_PAGES' => $this->links ), $extra ); + } + } + + /*-------------------------------------------------------------------------*/ + // Parse search result entry + /*-------------------------------------------------------------------------*/ + + function parse_entry($topic, $view_as_post=0) + { + $this->ipsclass->forum_read[ $topic['forum_id'] ] = isset( $this->ipsclass->forum_read[ $topic['forum_id'] ] ) ? $this->ipsclass->forum_read[ $topic['forum_id'] ] : 0; + $this->ipsclass->forum_read[0] = isset( $this->ipsclass->forum_read[0] ) ? $this->ipsclass->forum_read[0] : 0; + + $this->ipsclass->input['last_visit'] = ( $this->ipsclass->forum_read[ $topic['forum_id'] ] > $this->ipsclass->input['last_visit'] ) + ? $this->ipsclass->forum_read[ $topic['forum_id'] ] : $this->ipsclass->input['last_visit']; + + + + if ( isset($this->ipsclass->member['members_markers']['board']) AND $this->ipsclass->member['members_markers']['board'] > $this->ipsclass->input['last_visit'] ) + { + $this->ipsclass->input['last_visit'] = $this->ipsclass->member['members_markers']['board']; + } + + //----------------------------------------- + // Over ride with 'master' cookie? + //----------------------------------------- + + if ( $this->ipsclass->forum_read[ $topic['forum_id'] ] AND $this->ipsclass->forum_read[0] > $this->ipsclass->forum_read[ $topic['forum_id'] ] ) + { + $this->ipsclass->forum_read[ $topic['forum_id'] ] = $this->ipsclass->forum_read[0]; + } + + //----------------------------------------- + // Disable DB tracking... + // ^^ We'll disable this disabling for now + // as it seems to affect today's active tpx + //----------------------------------------- + + //$tmp = $this->ipsclass->vars['db_topic_read_cutoff']; + //$this->ipsclass->vars['db_topic_read_cutoff'] = 0; + + //----------------------------------------- + // Stop search from marking forum as read + //----------------------------------------- + + $topic['db_read'] = isset($topic['db_read']) ? $topic['db_read'] : 0; + + if ( is_array( $this->read_array ) ) + { + if ( array_key_exists( $topic['tid'], $this->read_array ) ) + { + if ( ! $topic['db_read'] OR $this->read_array[$topic['tid']] > $topic['db_read'] ) + { + $topic['db_read'] = $this->read_array[$topic['tid']]; + } + } + } + + $this->forums->new_posts = 1; + + $topic = $this->forums->parse_data( $topic, 0 ); + + if ($topic['pinned'] == 1) + { + $topic['prefix'] = $this->ipsclass->vars['pre_pinned']; + $topic['topic_icon'] = "<{B_PIN}>"; + } + + $topic['class1'] = "row2"; + $topic['class2'] = "row1"; + $topic['classposts'] = "row2"; + + if ( isset($this->ipsclass->member['is_mod']) AND $this->ipsclass->member['is_mod'] ) + { + if ( ! $topic['approved'] ) + { + $topic['class1'] = 'row4shaded'; + $topic['class2'] = 'row2shaded'; + $topic['classposts'] = 'row4shaded'; + } + else if ( isset($topic['queued']) AND $topic['queued'] ) + { + $topic['classposts'] = 'row4shaded'; + } + } + + //----------------------------------------- + // Remove potential [attachmentid= tag in title + //----------------------------------------- + + $topic['title'] = str_replace( '[attachmentid=', '[attachmentid=', $topic['title'] ); + + //----------------------------------------- + // Extra processing for posts.. + //----------------------------------------- + + if ($view_as_post == 1) + { + if ( $this->ipsclass->vars['search_post_cut'] ) + { + //$topic['post'] = substr( strip_tags($topic['post']), 0, $this->ipsclass->vars['search_post_cut']) . '...'; + $topic['post'] = $this->ipsclass->txt_mbsubstr( strip_tags($topic['post']), 0, $this->ipsclass->vars['search_post_cut'] ).'...'; + $topic['post'] = str_replace( "\n", "
    ", $topic['post'] ); + } + + if ($topic['author_id']) + { + $topic['author_name'] = $topic['members_display_name'] ? $topic['members_display_name'] : $topic['author_name']; + $topic['author_name'] = "{$topic['author_name']}"; + } + + //----------------------------------------- + // Highlighting? + //----------------------------------------- + + if ( $topic['keywords']) + { + $topic['post'] = $this->ipsclass->content_search_highlight( $topic['post'], $topic['keywords'] ); + } + } + + if ( ! $this->ipsclass->member['view_img'] ) + { + //----------------------------------------- + // unconvert smilies first, or it looks a bit crap. + //----------------------------------------- + + $topic['post'] = preg_replace( "#.+?#", "\\1" , $topic['post'] ); + + $topic['post'] = preg_replace( "//", "(IMG:\\1) ", $topic['post'] ); + } + + $topic['forum_full_name'] = $this->ipsclass->forums->forum_by_id[ $topic['forum_id'] ]['name']; + + if ( $this->ipsclass->txt_mb_strlen($topic['forum_full_name']) > 50 ) + { + $topic['forum_name'] = $this->ipsclass->txt_truncate( $topic['forum_full_name'], 47 ); + } + else + { + $topic['forum_name'] = $topic['forum_full_name']; + } + + if( $this->ipsclass->forums->forum_by_id[ $topic['forum_id'] ]['forum_allow_rating'] ) + { + if ( $topic['topic_rating_total'] ) + { + $topic['_rate_int'] = round( $topic['topic_rating_total'] / $topic['topic_rating_hits'] ); + } + + //----------------------------------------- + // Show image? + //----------------------------------------- + + if ( ( $topic['topic_rating_hits'] >= $this->ipsclass->vars['topic_rating_needed'] ) AND ( $topic['_rate_int'] ) ) + { + $topic['_rate_img'] = $this->ipsclass->compiled_templates['skin_search']->topic_rating_image( $topic['_rate_int'] ); + } + } + + return $topic; + } + + /*-------------------------------------------------------------------------*/ + // Filter keywords + /*-------------------------------------------------------------------------*/ + + function filter_keywords($words="", $name=0) + { + // force to lowercase and swop % into a safer version + $words = trim( str_replace( "%", "", $words) ); + + // Remove trailing boolean operators + + $words = preg_replace( "/\s+(and|or)$/" , "" , $words ); + + // Swop wildcard into *SQL percent + //$words = str_replace( "*", "%", $words ); + + // Make safe underscores + + if( $name == 0 ) + { + $words = str_replace( "_", "\\_", $words ); + } + + $words = str_replace( '|', "|", $words ); + + // Remove crap + + if ($name == 0) + { + $words = preg_replace( "/[\|\[\]\{\}\(\)\,:\\\\\/\"']|"/", "", $words ); + } + + // Remove common words.. (should be expanded upon in a later release to return 'not searchable word' + + $words = preg_replace( "/^(?:img|quote|code|html|javascript|a href|color|span|div|border|style)$/", "", $words ); + + return " ".preg_quote($words)." "; + } + + /*-------------------------------------------------------------------------*/ + // Filter keywords + /*-------------------------------------------------------------------------*/ + + function filter_ftext_keywords($words="") + { + // force to lowercase and swop % into a safer version + + $words = trim( rawurldecode($words) ); + $words = str_replace( '|', "|", $words ); + + // Remove crap + + $words = str_replace( """, '"', $words ); + $words = str_replace( ">" , ">", $words ); + $words = str_replace( "%" , "" , $words ); + + //----------------------------------------- + // If it's a phrase in quotes.. + //----------------------------------------- + + if ( preg_match( "#^\"(.+?)\"$#", $words ) ) + { + return $words; + } + + // Remove common words.. + + $words = preg_replace( "/^(?:img|quote|code|html|javascript|a href|color|span|div|border|style)$/", "", $words ); + + // OK, lets break up the keywords + + // this or that and this not me + + $words = preg_replace( "/\s+and\s+/i", " ", $words ); + + // this or that this not me + + $words = preg_replace( "/\s+not\s+/i", " -", $words ); + + // this or that this -me + + $words = preg_replace( "/\s+or\s+/i", ' ~', $words ); + + // this ~that this -me + + # Was added as a bug fix but really this causes more problems + # than it solves. Complaint was that it should default to AND + # matching, not OR matching. Problem is that it doesn't then + # give a "true" search as one would expect Google to do. + + //$words = preg_replace( "/\s+(?!-|~)/", " +", $words ); + + + // this ~that +this -me + + $words = str_replace( "~", "", $words ); + + // this that +this -me + + return "+".$words; + } + + /*-------------------------------------------------------------------------*/ + // Make the hl words nice and stuff + /*-------------------------------------------------------------------------*/ + + function convert_highlite_words($words="") + { + $words = $this->ipsclass->parse_clean_value(trim(urldecode($words))); + + // Convert booleans to something easy to match next time around + + $words = preg_replace("/\s+(and|or)(\s+|$)/i", ",\\1,", $words); + + // Convert spaces to plus signs + + $words = preg_replace("/\s/", "+", $words); + + return $words; + } + + /*-------------------------------------------------------------------------*/ + // Get the searchable forums + /*-------------------------------------------------------------------------*/ + + function get_searchable_forums() + { + $forumids = array(); + + //----------------------------------------- + // Check for an array + //----------------------------------------- + + if ( isset($_POST['forums']) AND is_array( $_POST['forums'] ) ) + { + + if ( in_array( 'all', $_POST['forums'] ) ) + { + //----------------------------------------- + // Searching all forums.. + //----------------------------------------- + + foreach( $this->ipsclass->forums->forum_by_id as $data ) + { + $forumids[] = $data['id']; + } + } + else + { + //----------------------------------------- + // Go loopy loo + //----------------------------------------- + + foreach( $_POST['forums'] as $l ) + { + if ( $this->ipsclass->forums->forum_by_id[ $l ] ) + { + $forumids[] = intval($l); + } + } + + //----------------------------------------- + // Do we have cats? Give 'em to Charles! + //----------------------------------------- + + if ( count( $forumids ) ) + { + if ( $this->ipsclass->input['searchsubs'] == 1 ) + { + foreach( $forumids as $f ) + { + $children = $this->ipsclass->forums->forums_get_children( $f ); + + if ( is_array($children) and count($children) ) + { + $forumids = array_merge( $forumids , $children ); + } + } + } + } + else + { + //----------------------------------------- + // No forums selected / we have available + //----------------------------------------- + + return; + } + } + } + else + { + //----------------------------------------- + // Not an array... + //----------------------------------------- + + if ( $this->ipsclass->input['forums'] == 'all' ) + { + foreach( $this->ipsclass->forums->forum_by_id as $data ) + { + $forumids[] = $data['id']; + } + } + else + { + if ( $this->ipsclass->input['forums'] != "" ) + { + $l = intval($this->ipsclass->input['forums']); + + //----------------------------------------- + // Single forum + //----------------------------------------- + + if ( $this->ipsclass->forums->forum_by_id[ $l ] ) + { + $forumids[] = intval($l); + } + + if ( $this->ipsclass->input['searchsubs'] == 1 ) + { + $children = $this->ipsclass->forums->forums_get_children( $l ); + + if ( is_array($children) and count($children) ) + { + $forumids = array_merge( $forumids , $children ); + } + } + } + } + } + + $final = array(); + + foreach( $forumids as $f ) + { + $f = intval($f); + + if ( $this->check_access($this->ipsclass->forums->forum_by_id[ $f ] ) == TRUE ) + { + $final[] = $f; + } + } + + //----------------------------------------- + // Remove blocked forums + //----------------------------------------- + + if ( $this->ipsclass->input['CODE'] == 'getnew' OR $this->ipsclass->input['CODE'] == 'getactive' ) + { + $block_forums = explode( ',', $this->ipsclass->vars['vnp_block_forums'] ); + + if ( is_array( $block_forums ) and count( $block_forums ) ) + { + if ( is_array( $final ) and count( $final ) ) + { + $tmp = $final; + $final = array(); + + foreach( $tmp as $id ) + { + if ( in_array( $id, $block_forums ) ) + { + continue; + } + else + { + $final[] = $id; + } + } + } + } + } + + //----------------------------------------- + // Return + //----------------------------------------- + + $this->searchable_forums = $final; + + return implode( "," , $final ); + } + + /*-------------------------------------------------------------------------*/ + // Check password... + /*-------------------------------------------------------------------------*/ + + function check_access($i) + { + $can_read = FALSE; + + $i['read_perms'] = isset($i['read_perms']) ? $i['read_perms'] : NULL; + + if ( $this->ipsclass->check_perms( $i['read_perms'] ) == TRUE ) + { + $can_read = TRUE; + } + else + { + $can_read = FALSE; + } + + $i['password'] = isset($i['password']) ? $i['password'] : NULL; + + if ( $i['password'] != "" and $can_read == TRUE ) + { + if ( $this->ipsclass->forums->forums_compare_password( $i['id'] ) == TRUE ) + { + $can_read = TRUE; + } + else + { + $can_read = FALSE; + + if( $i['password_override'] ) + { + $bypass_groups = explode( ",", $i['password_override'] ); + + $my_groups = array( $this->ipsclass->member['mgroup'] ); + + if( $this->ipsclass->member['mgroup_others'] ) + { + $my_groups = array_merge( $my_groups, explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ) ); + } + + foreach( $my_groups as $g_id ) + { + if( in_array( $g_id, $bypass_groups ) ) + { + $can_read = TRUE; + } + } + } + } + } + + return $can_read; + } + +} + ?> \ No newline at end of file diff --git a/upload/sources/action_public/taskloader.php b/upload/sources/action_public/taskloader.php index 72354e7f..162f8d38 100644 --- a/upload/sources/action_public/taskloader.php +++ b/upload/sources/action_public/taskloader.php @@ -2,26 +2,16 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ +| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ | > $Revision: 567 $ | > $Author: matt $ +--------------------------------------------------------------------------- @@ -38,7 +28,7 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; exit(); } diff --git a/upload/sources/action_public/topics.php b/upload/sources/action_public/topics.php index 3d120a4e..4f49f77c 100644 --- a/upload/sources/action_public/topics.php +++ b/upload/sources/action_public/topics.php @@ -1,2882 +1,2601 @@ - $Date: 2006-11-27 17:07:12 -0600 (Mon, 27 Nov 2006) $ -| > $Revision: 741 $ -| > $Author: bfarber $ -+--------------------------------------------------------------------------- -| -| > Topic display module -| > Module written by Matt Mecham -| > Date started: 18th February 2002 -| -| > Module Version Number: 1.1.0 -| > DBA Checked: Thu 20 May 2004 -| > Quality Checked: Wed 15 Sept. 2004 -+-------------------------------------------------------------------------- -*/ - - -if ( ! defined( 'IN_IPB' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - -class topics -{ - # Global - var $ipsclass; - - var $output = ""; - var $base_url = ""; - var $html = ""; - var $moderator = array(); - var $forum = array(); - var $topic = array(); - var $mem_titles = array(); - var $mod_action = array(); - var $poll_html = ""; - var $parser = ""; - var $mimetypes = ""; - var $nav_extra = ""; - var $read_array = array(); - var $mod_panel_html = ""; - var $warn_range = 0; - var $warn_done = 0; - - var $md5_check = ""; - var $post_count = 0; - var $cached_members = array(); - var $first_printed = 0; - var $pids = array(); - var $attach_pids = array(); - var $first = ""; - var $qpids = ""; - var $custom_fields = ""; - var $last_read_tid = ""; - - # Permissions - var $can_vote = 0; - var $can_rate = 0; - var $poll_only = 0; - - # Stop E_ALL moaning like an old fish wife - var $class_attach = ''; - - # Profile module. Eventually, we'll need to - # abstract all member stuff into one file... - var $lib_profile = ''; - - /*-------------------------------------------------------------------------*/ - // - // Our constructor, load words, load skin, print the topic listing - // - /*-------------------------------------------------------------------------*/ - - function auto_run() - { - //----------------------------------------- - // Build all permissions - //----------------------------------------- - - $this->build_permissions(); - - //----------------------------------------- - // Are we just adding a poll vote? - //----------------------------------------- - - if ( isset($this->ipsclass->input['addpoll']) AND $this->ipsclass->input['addpoll'] ) - { - $this->topic_add_vote_to_poll(); - } - - //----------------------------------------- - // INIT module - //----------------------------------------- - - $this->init(); - - //----------------------------------------- - // Are we just adding a rating vote? - //----------------------------------------- - - if ( isset($this->ipsclass->input['addrating']) AND $this->ipsclass->input['addrating'] ) - { - $this->topic_add_vote_to_rating(); - } - - //----------------------------------------- - // Process the topic - //----------------------------------------- - - $this->topic_set_up(); - - //----------------------------------------- - // Which view are we using? - //----------------------------------------- - - if ( $this->ipsclass->input['mode'] ) - { - $this->topic_view_mode = $this->ipsclass->input['mode']; - $this->ipsclass->my_setcookie( 'topicmode', $this->ipsclass->input['mode'], 1 ); - } - else - { - $this->topic_view_mode = $this->ipsclass->my_getcookie('topicmode'); - } - - if ( ! $this->topic_view_mode ) - { - //----------------------------------------- - // No cookie and no URL - //----------------------------------------- - - $this->topic_view_mode = $this->ipsclass->vars['topicmode_default'] ? $this->ipsclass->vars['topicmode_default'] : 'linear'; - } - - //----------------------------------------- - // VIEWS - //----------------------------------------- - - $mode = $this->ipsclass->my_getcookie( 'topicmode' ); - - $pre = $mode != 'threaded' ? 'st' : 'start'; - - if( $mode == 'threaded' ) - { - $this->ipsclass->vars['display_max_posts'] = $this->ipsclass->vars['threaded_per_page']; - $this->ipsclass->input['st'] = $this->ipsclass->input['start']; - } - - if ( isset($this->ipsclass->input['view']) ) - { - if ($this->ipsclass->input['view'] == 'new') - { - //----------------------------------------- - // Newer - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => 'tid', - 'from' => 'topics', - 'where' => "forum_id=".$this->forum['id']." AND approved=1 AND state <> 'link' AND last_post > ".$this->topic['last_post'], - 'order' => 'last_post', - 'limit' => array( 0,1 ) - ) ); - - $this->ipsclass->DB->simple_exec(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - $this->topic = $this->ipsclass->DB->fetch_row(); - - $this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$this->topic['tid']); - } - else - { - $this->ipsclass->Error( array( LEVEL => 1, MSG => 'no_newer') ); - } - } - else if ($this->ipsclass->input['view'] == 'old') - { - //----------------------------------------- - // Older - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => 'tid', - 'from' => 'topics', - 'where' => "forum_id=".$this->forum['id']." AND approved=1 AND state <> 'link' AND last_post < ".$this->topic['last_post'], - 'order' => 'last_post DESC', - 'limit' => array( 0,1 ) - ) ); - - $this->ipsclass->DB->simple_exec(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - $this->topic = $this->ipsclass->DB->fetch_row(); - - $this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$this->topic['tid']); - } - else - { - $this->ipsclass->Error( array( LEVEL => 1, MSG => 'no_older') ); - } - } - else if ($this->ipsclass->input['view'] == 'getlastpost') - { - //----------------------------------------- - // Last post - //----------------------------------------- - - $this->return_last_post(); - } - else if ($this->ipsclass->input['view'] == 'getnewpost') - { - //----------------------------------------- - // Newest post - //----------------------------------------- - - $st = 0; - $pid = ""; - - if ( $this->ipsclass->vars['db_topic_read_cutoff'] and $this->ipsclass->member['id'] ) - { - $last_time = (isset($this->my_topics_read[ $this->topic['tid'] ]) AND intval( $this->my_topics_read[ $this->topic['tid'] ] )) ? intval( $this->my_topics_read[ $this->topic['tid'] ] ) : ( (isset($this->db_row['marker_last_cleared']) AND intval( $this->db_row['marker_last_cleared'] )) ? intval( $this->db_row['marker_last_cleared'] ) : 0); - } - - $last_time = $last_time ? $last_time : $this->ipsclass->input['last_visit']; - - $this->ipsclass->DB->simple_construct( array( 'select' => 'MIN(pid) as pid', - 'from' => 'posts', - 'where' => "queued=0 AND topic_id=".$this->topic['tid']." AND post_date > ".intval($last_time), - 'limit' => array( 0,1 ) - ) ); - - $this->ipsclass->DB->simple_exec(); - - $post = $this->ipsclass->DB->fetch_row(); - - if ( $post['pid'] ) - { - $pid = "&#entry".$post['pid']; - - $this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(*) as posts', - 'from' => 'posts', - 'where' => "topic_id=".$this->topic['tid']." AND pid <= ".$post['pid'], - ) ); - - $this->ipsclass->DB->simple_exec(); - - $cposts = $this->ipsclass->DB->fetch_row(); - - if ( (($cposts['posts']) % $this->ipsclass->vars['display_max_posts']) == 0 ) - { - $pages = ($cposts['posts']) / $this->ipsclass->vars['display_max_posts']; - } - else - { - $number = ( ($cposts['posts']) / $this->ipsclass->vars['display_max_posts'] ); - $pages = ceil( $number); - } - - $st = ($pages - 1) * $this->ipsclass->vars['display_max_posts']; - - if( $this->ipsclass->vars['post_order_sort'] == 'desc' ) - { - $st = (ceil(($this->topic['posts']/$this->ipsclass->vars['display_max_posts'])) - $pages) * $this->ipsclass->vars['display_max_posts']; - } - - $this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$this->topic['tid']."&{$pre}={$st}".$pid); - } - else - { - $this->return_last_post(); - } - } - else if ($this->ipsclass->input['view'] == 'findpost') - { - //----------------------------------------- - // Find a post - //----------------------------------------- - - $pid = intval($this->ipsclass->input['p']); - - if ( $pid > 0 ) - { - $sort_value = $pid; - $sort_field = ($this->ipsclass->vars['post_order_column'] == 'pid') ? 'pid' : 'post_date'; - - if($sort_field == 'post_date') - { - $date = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'post_date', - 'from' => 'posts', - 'where' => 'pid=' . $pid, - ) ); - - $sort_value = $date['post_date']; - } - - $this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(*) as posts', - 'from' => 'posts', - 'where' => "topic_id=".$this->topic['tid']." AND {$sort_field} <=" . $sort_value, - ) ); - - $this->ipsclass->DB->simple_exec(); - - $cposts = $this->ipsclass->DB->fetch_row(); - - if ( (($cposts['posts']) % $this->ipsclass->vars['display_max_posts']) == 0 ) - { - $pages = ($cposts['posts']) / $this->ipsclass->vars['display_max_posts']; - } - else - { - $number = ( ($cposts['posts']) / $this->ipsclass->vars['display_max_posts'] ); - $pages = ceil($number); - } - - $st = ($pages - 1) * $this->ipsclass->vars['display_max_posts']; - - if( $this->ipsclass->vars['post_order_sort'] == 'desc' ) - { - $st = (ceil(($this->topic['posts']/$this->ipsclass->vars['display_max_posts'])) - $pages) * $this->ipsclass->vars['display_max_posts']; - } - - $this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$this->topic['tid']."&{$pre}={$st}&p={$pid}"."&#entry".$pid); - } - else - { - $this->return_last_post(); - } - } - } - - //----------------------------------------- - // UPDATE TOPIC? - //----------------------------------------- - - if ( ! $this->ipsclass->input['b'] ) - { - if ( $this->topic['topic_firstpost'] < 1 ) - { - //-------------------------------------- - // No first topic set - old topic, update - //-------------------------------------- - - $this->ipsclass->DB->simple_construct( array ( - 'select' => 'pid', - 'from' => 'posts', - 'where' => 'topic_id='.$this->topic['tid'].' AND new_topic=1' - ) ); - - $this->ipsclass->DB->simple_exec(); - - $post = $this->ipsclass->DB->fetch_row(); - - if ( ! $post['pid'] ) - { - //----------------------------------------- - // Get first post info - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => 'pid', - 'from' => 'posts', - 'where' => "topic_id={$this->topic['tid']}", - 'order' => 'pid ASC', - 'limit' => array(0,1) ) ); - $this->ipsclass->DB->simple_exec(); - - $first_post = $this->ipsclass->DB->fetch_row(); - $post['pid'] = $first_post['pid']; - } - - if ( $post['pid'] ) - { - $this->ipsclass->DB->simple_construct( array ( - 'update' => 'topics', - 'set' => 'topic_firstpost='.$post['pid'], - 'where' => 'tid='.$this->topic['tid'] - ) ); - - $this->ipsclass->DB->simple_exec(); - } - - //-------------------------------------- - // Reload "fixed" topic - //-------------------------------------- - - $this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$this->topic['tid']."&b=1&{$pre}={$this->ipsclass->input['st']}&p={$this->ipsclass->input['p']}"."&#entry".$this->ipsclass->input['p']); - } - } - - $find_pid = $this->ipsclass->input['pid'] == "" ? $this->ipsclass->input['p'] : $this->ipsclass->input['pid']; - - $threaded_pid = $find_pid ? '&pid='.$find_pid : ''; - $linear_pid = $find_pid ? '&view=findpost&p='.$find_pid : ''; - - if ( $this->topic_view_mode == 'threaded' ) - { - $require = 'topic_threaded.php'; - - $this->topic['to_button_threaded'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_on( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=threaded".$threaded_pid, $this->ipsclass->lang['tom_outline'] ); - $this->topic['to_button_standard'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_off( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=linear".$linear_pid, $this->ipsclass->lang['tom_standard'] ); - $this->topic['to_button_linearpl'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_off( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=linearplus".$linear_pid, $this->ipsclass->lang['tom_linear'] ); - - } - else - { - $require = 'topic_linear.php'; - - $this->topic['to_button_threaded'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_off( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=threaded".$threaded_pid, $this->ipsclass->lang['tom_outline'] ); - - if ( $this->topic_view_mode == 'linearplus' ) - { - $this->topic['to_button_standard'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_off( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=linear".$linear_pid, $this->ipsclass->lang['tom_standard'] ); - $this->topic['to_button_linearpl'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_on( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=linearplus".$linear_pid, $this->ipsclass->lang['tom_linear'] ); - } - else - { - $this->topic['to_button_standard'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_on( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=linear".$linear_pid, $this->ipsclass->lang['tom_standard'] ); - $this->topic['to_button_linearpl'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_off( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=linearplus".$linear_pid, $this->ipsclass->lang['tom_linear'] ); - } - } - - //----------------------------------------- - // Remove potential [attachmentid= tag in title - //----------------------------------------- - - $this->topic['title'] = str_replace( '[attachmentid=', '[attachmentid=', $this->topic['title'] ); - - //----------------------------------------- - // Load and run lib - //----------------------------------------- - - $this->func = $this->ipsclass->load_class( ROOT_PATH . 'sources/lib/func_'.$require, 'topic_display' ); - - $this->func->register_class( $this ); - $this->func->display_topic(); - - $this->output .= $this->func->output; - - //----------------------------------------- - // ATTACHMENTS!!! - //----------------------------------------- - - if ( $this->topic['topic_hasattach'] ) - { - if ( ! is_object( $this->class_attach ) ) - { - //----------------------------------------- - // Grab render attach class - //----------------------------------------- - - require_once( ROOT_PATH . 'sources/classes/attach/class_attach.php' ); - $this->class_attach = new class_attach(); - $this->class_attach->ipsclass =& $this->ipsclass; - } - - //----------------------------------------- - // Not got permission to view downloads? - //----------------------------------------- - - if ( $this->ipsclass->check_perms($this->ipsclass->forums->forum_by_id[ $this->topic['forum_id'] ]['download_perms']) === FALSE ) - { - $this->ipsclass->vars['show_img_upload'] = 0; - } - - //----------------------------------------- - // Continue... - //----------------------------------------- - - $this->class_attach->type = 'post'; - $this->class_attach->init(); - - $this->output = $this->class_attach->render_attachments( $this->output, $this->attach_pids ); - } - - //----------------------------------------- - // Do we have a poll? - //----------------------------------------- - - if ( $this->topic['poll_state'] ) - { - $this->output = str_replace( "", $this->parse_poll(), $this->output ); - } - else - { - // Can we start a poll? Is this our topic and is it still open? - - if ( $this->topic['state'] != "closed" AND $this->ipsclass->member['id'] AND $this->ipsclass->member['g_post_polls'] AND $this->forum['allow_poll'] ) - { - if ( - ( ($this->topic['starter_id'] == $this->ipsclass->member['id']) AND ($this->ipsclass->vars['startpoll_cutoff'] > 0) AND ( $this->topic['start_date'] + ($this->ipsclass->vars['startpoll_cutoff'] * 3600) > time() ) ) - OR ( $this->ipsclass->member['g_is_supmod'] == 1 ) - ) - { - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_topic']->start_poll_link($this->forum['id'], $this->topic['tid']), $this->output ); - } - } - } - - // Still seeing attachment tags? - if ( stristr( $this->output, "[attachmentid=" ) ) - { - $this->output = preg_replace( "#\[attachmentid=(\d+)\]#is", "", $this->output ); - } - - //----------------------------------------- - // Process users active in this forum - //----------------------------------------- - - if ($this->ipsclass->vars['no_au_topic'] != 1) - { - //----------------------------------------- - // Get the users - //----------------------------------------- - - $cut_off = ($this->ipsclass->vars['au_cutoff'] != "") ? $this->ipsclass->vars['au_cutoff'] * 60 : 900; - - $this->ipsclass->DB->cache_add_query( 'topics_get_active_users', - array( 'tid' => $this->topic['tid'], - 'time' => time() - $cut_off, - ) ); - - $this->ipsclass->DB->simple_exec(); - - //----------------------------------------- - // ACTIVE USERS - //----------------------------------------- - - $ar_time = time(); - $cached = array(); - $active = array( 'guests' => 0, 'anon' => 0, 'members' => 0, 'names' => ""); - $rows = array( $ar_time => array( 'login_type' => substr($this->ipsclass->member['login_anonymous'],0, 1), - 'running_time' => $ar_time, - 'id' => 0, - 'location' => 'st', - 'member_id' => $this->ipsclass->member['id'], - 'member_name' => $this->ipsclass->member['members_display_name'], - 'member_group' => $this->ipsclass->member['mgroup'] ) ); - - //----------------------------------------- - // FETCH... - //----------------------------------------- - - while ($r = $this->ipsclass->DB->fetch_row() ) - { - $rows[ $r['running_time'].'.'.$r['id'] ] = $r; - } - - krsort( $rows ); - - //----------------------------------------- - // Is this a root admin in disguise? - // Is that kinda like a diamond in the rough? - //----------------------------------------- - - $our_mgroups = array(); - - if( $this->ipsclass->member['mgroup_others'] ) - { - $our_mgroups = explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ); - } - - $our_mgroups[] = $this->ipsclass->member['mgroup']; - - //----------------------------------------- - // PRINT... - //----------------------------------------- - - foreach( $rows as $result ) - { - $result['member_name'] = $this->ipsclass->make_name_formatted( $result['member_name'], $result['member_group'] ); - - $last_date = $this->ipsclass->get_time( $result['running_time'] ); - - if ($result['member_id'] == 0) - { - $active['guests']++; - } - else - { - if (empty( $cached[ $result['member_id'] ] ) ) - { - $cached[ $result['member_id'] ] = 1; - - $p_start = ""; - $p_end = ""; - $p_title = " title='".sprintf( $this->ipsclass->lang['au_reading'], $last_date )."' "; - - if ( strstr( $result['location'], 'post' ) and $result['member_id'] != $this->ipsclass->member['id'] ) - { - $p_start = ""; - $p_end = ""; - $p_title = " title='".sprintf( $this->ipsclass->lang['au_posting'], $last_date )."' "; - } - - if ($result['login_type'] == 1) - { - if ( (in_array( $this->ipsclass->vars['admin_group'], $our_mgroups )) and ($this->ipsclass->vars['disable_admin_anon'] != 1) ) - { - $active['names'] .= "{$p_start}{$result['member_name']}*{$p_end}, "; - $active['anon']++; - } - else - { - $active['anon']++; - } - } - else - { - $active['members']++; - $active['names'] .= "{$p_start}{$result['member_name']}{$p_end}, "; - } - } - } - } - - $active['names'] = preg_replace( "/,\s+$/", "" , $active['names'] ); - - $this->ipsclass->lang['active_users_title'] = sprintf( $this->ipsclass->lang['active_users_title'] , ($active['members'] + $active['guests'] + $active['anon'] ) ); - $this->ipsclass->lang['active_users_detail'] = sprintf( $this->ipsclass->lang['active_users_detail'] , $active['guests'],$active['anon'] ); - $this->ipsclass->lang['active_users_members'] = sprintf( $this->ipsclass->lang['active_users_members'], $active['members'] ); - - - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_topic']->topic_active_users($active), $this->output ); - - } - - //----------------------------------------- - // Print it - //----------------------------------------- - - if ( $this->ipsclass->member['is_mod'] ) - { - if( $mod_panel = $this->moderation_panel() ) - { - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_topic']->mod_panel_wrapper( array( 'TOPIC' => $this->topic, 'FORUM' => $this->forum ), $this->ipsclass->return_md5_check() ), $this->output ); - $this->output = str_replace( "", $mod_panel, $this->output ); - } - } - else - { - $this->output = str_replace( "", $this->moderation_panel(), $this->output ); - } - - //----------------------------------------- - // Get the reply, and posting buttons - //----------------------------------------- - - $this->topic['REPLY_BUTTON'] = $this->reply_button(); - - //----------------------------------------- - // Enable quick reply box? - //----------------------------------------- - - if ( ( $this->forum['quick_reply'] == 1 ) - and ( $this->ipsclass->check_perms( $this->forum['reply_perms']) == TRUE ) - and ( $this->topic['state'] != 'closed' ) - and ( ! $this->poll_only ) ) - { - $show = "none"; - - $sqr = isset($this->ipsclass->member['_cache']['qr_open']) ? $this->ipsclass->member['_cache']['qr_open'] : 0; - - if ( $sqr == 1 ) - { - $show = "show"; - } - - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_topic']->quick_reply_box_closed(), $this->output ); - $this->output = str_replace( "" , $this->ipsclass->compiled_templates['skin_topic']->quick_reply_box_open($this->topic['forum_id'], $this->topic['tid'], $show, $this->md5_check), $this->output ); - } - - $this->topic['id'] = $this->topic['forum_id']; - - $this->output = str_replace( "", $this->ipsclass->print_forum_rules($this->forum), $this->output ); - - //----------------------------------------- - // Topic multi-moderation - yay! - //----------------------------------------- - - $this->output = str_replace( "", $this->multi_moderation(), $this->output ); - - // Pass it to our print routine - - $this->ipsclass->print->add_output( $this->output ); - $this->ipsclass->print->do_output( array( 'TITLE' => $this->topic['title'] . ' - ' . $this->ipsclass->vars['board_name'], - 'JS' => $this->ipsclass->compiled_templates['skin_global']->get_rte_css(), - 'NAV' => $this->nav, - ) ); - - } - - /*-------------------------------------------------------------------------*/ - // ATTACHMENTS - /*-------------------------------------------------------------------------*/ - - function ___parse_attachments_DEPRECATED( $html, $attach_pids, $type='attach_pid', $from='pid', $method='post' ) - { - $final_attachments = array(); - - if ( count( $attach_pids ) ) - { - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'attachments', - 'where' => "$type IN (".implode(",", $attach_pids).")" - ) ); - - $this->ipsclass->DB->simple_exec(); - - while ( $a = $this->ipsclass->DB->fetch_row() ) - { - $final_attachments[ $a[ $type ] ][ $a['attach_id'] ] = $a; - } - - foreach ( $final_attachments as $pid => $data ) - { - $temp_out = ""; - $temp_hold = array( 'attach' => '', 'thumb' => '', 'image' => '' ); - - foreach( $final_attachments[$pid] as $aid => $row ) - { - //----------------------------------------- - // Is it an image, and are we viewing the image in the post? - //----------------------------------------- - - if ( $this->ipsclass->vars['show_img_upload'] and $row['attach_is_image'] ) - { - if ( $this->ipsclass->vars['siu_thumb'] AND $row['attach_thumb_location'] AND $row['attach_thumb_width'] ) - { - $tmp = $this->ipsclass->compiled_templates['skin_topic']->Show_attachments_img_thumb( $row['attach_thumb_location'], - $row['attach_thumb_width'], - $row['attach_thumb_height'], - $row['attach_id'], - $this->ipsclass->size_format( $row['attach_filesize'] ), - $row['attach_hits'], - $row['attach_file'], - $method - ); - - if ( strstr( $html, '[attachmentid='.$row['attach_id'].']' ) ) - { - $html = str_replace( '[attachmentid='.$row['attach_id'].']', $tmp, $html ); - } - else - { - $temp_hold['thumb'] .= $tmp . ' '; - } - } - else - { - //----------------------------------------- - // Standard size.. - //----------------------------------------- - - $tmp = $this->ipsclass->compiled_templates['skin_topic']->Show_attachments_img( $row['attach_location'] ); - - if ( strstr( $html, '[attachmentid='.$row['attach_id'].']' ) ) - { - $html = str_replace( '[attachmentid='.$row['attach_id'].']', $tmp, $html ); - } - else - { - $temp_hold['image'] .= $tmp . ' '; - } - } - } - else - { - //----------------------------------------- - // Full attachment thingy - //----------------------------------------- - - $tmp = $this->ipsclass->compiled_templates['skin_topic']->Show_attachments( array ( - 'hits' => $row['attach_hits'], - 'image' => $this->ipsclass->cache['attachtypes'][ $row['attach_ext'] ]['atype_img'], - 'name' => $row['attach_file'], - $from => $row[$type], - 'id' => $row['attach_id'], - 'method'=> $method, - 'size' => $this->ipsclass->size_format( $row['attach_filesize'] ), - ) ); - - if ( strstr( $html, '[attachmentid='.$row['attach_id'].']' ) ) - { - $html = str_replace( '[attachmentid='.$row['attach_id'].']', $tmp, $html ); - } - else - { - $temp_hold['attach'] .= $tmp; - } - } - } - - //----------------------------------------- - // Anyfink to show? - //----------------------------------------- - - if ( $temp_hold['thumb'] ) - { - $temp_out = $this->ipsclass->compiled_templates['skin_topic']->show_attachment_title($this->ipsclass->lang['attach_thumbs']) . $temp_hold['thumb']; - } - - if ( $temp_hold['image'] ) - { - $temp_out .= $this->ipsclass->compiled_templates['skin_topic']->show_attachment_title($this->ipsclass->lang['attach_images']) . $temp_hold['image']; - } - - if ( $temp_hold['attach'] ) - { - $temp_out .= $this->ipsclass->compiled_templates['skin_topic']->show_attachment_title($this->ipsclass->lang['attach_normal']) . $temp_hold['attach']; - } - - if ( $temp_out ) - { - $html = str_replace( "", $temp_out, $html ); - } - } - } - - return $html; - } - - /*-------------------------------------------------------------------------*/ - // Parse post - /*-------------------------------------------------------------------------*/ - - function parse_row( $row = array() ) - { - $poster = array(); - - //----------------------------------------- - // Cache member - //----------------------------------------- - - if ($row['author_id'] != 0) - { - //----------------------------------------- - // Is it in the hash? - //----------------------------------------- - - if ( isset($this->cached_members[ $row['author_id'] ]) ) - { - //----------------------------------------- - // Ok, it's already cached, read from it - //----------------------------------------- - - $poster = $this->cached_members[ $row['author_id'] ]; - $row['name_css'] = 'normalname'; - } - else - { - $row['name_css'] = 'normalname'; - $poster = $this->parse_member( $row ); - - //----------------------------------------- - // Add it to the cached list - //----------------------------------------- - - $this->cached_members[ $row['author_id'] ] = $poster; - } - } - else - { - //----------------------------------------- - // It's definitely a guest... - //----------------------------------------- - - $poster = $this->ipsclass->set_up_guest( $row['author_name'] ); - $poster['members_display_name'] = $row['author_name']; - $poster['custom_fields'] = ""; - $poster['warn_text'] = ""; - $poster['warn_minus'] = ""; - $poster['warn_img'] = ""; - $poster['warn_add'] = ""; - $poster['addresscard'] = ""; - $poster['message_icon'] = ""; - $poster['email_icon'] = ""; - $row['name_css'] = 'unreg'; - } - - //----------------------------------------- - // Queued - //----------------------------------------- - - if ( $row['queued'] or ($this->topic['topic_firstpost'] == $row['pid'] and $this->topic['approved'] != 1) ) - { - $row['post_css'] = $this->post_count % 2 ? 'post1shaded' : 'post2shaded'; - $row['altrow'] = 'row4shaded'; - } - else - { - $row['post_css'] = $this->post_count % 2 ? 'post1' : 'post2'; - $row['altrow'] = 'row4'; - } - - //----------------------------------------- - // Edit... - //----------------------------------------- - - $row['edit_by'] = ""; - - if ( ($row['append_edit'] == 1) and ($row['edit_time'] != "") and ($row['edit_name'] != "") ) - { - $e_time = $this->ipsclass->get_date( $row['edit_time'] , 'LONG' ); - - $row['edit_by'] = $this->ipsclass->compiled_templates['skin_topic']->edited_by( sprintf($this->ipsclass->lang['edited_by'], $row['edit_name'], $e_time) ); - } - - //----------------------------------------- - // View image... - //----------------------------------------- - - if ( ! $this->ipsclass->member['view_img'] ) - { - //----------------------------------------- - // unconvert smilies first, or it looks a bit crap. - //----------------------------------------- - - $row['post'] = preg_replace( "#.+?#", "\\1" , $row['post'] ); - - $row['post'] = preg_replace( "//", "(IMG:\\1) ", $row['post'] ); - } - - //----------------------------------------- - // Highlight... - //----------------------------------------- - - if ( isset($this->ipsclass->input['hl']) AND $this->ipsclass->input['hl'] ) - { - $row['post'] = $this->ipsclass->content_search_highlight( $row['post'], $this->ipsclass->input['hl'] ); - } - - //----------------------------------------- - // Multi Quoting? - //----------------------------------------- - - $row['mq_start_image'] = $this->ipsclass->compiled_templates['skin_topic']->mq_image_add($row['pid']); - - if ( $this->qpids ) - { - if ( strstr( ','.$this->qpids.',', ','.$row['pid'].',' ) ) - { - $row['mq_start_image'] = $this->ipsclass->compiled_templates['skin_topic']->mq_image_remove($row['pid']); - } - } - - //----------------------------------------- - // Multi PIDS? - //----------------------------------------- - - if ( $this->ipsclass->member['is_mod'] ) - { - $row['pid_start_image'] = $this->ipsclass->compiled_templates['skin_topic']->pid_image_unselected($row['pid']); - - if ( $this->ipsclass->input['selectedpids'] ) - { - if ( strstr( ','.$this->ipsclass->input['selectedpids'].',', ','.$row['pid'].',' ) ) - { - $row['pid_start_image'] = $this->ipsclass->compiled_templates['skin_topic']->pid_image_selected($row['pid']); - } - - $this->ipsclass->input['selectedpidcount'] = count( explode( ",", $this->ipsclass->input['selectedpids'] ) ); - - } - } - - //----------------------------------------- - // Delete button.. - //----------------------------------------- - - $row['delete_button'] = $row['pid'] != $this->topic['topic_firstpost'] - ? $this->delete_button($row['pid'], $poster) - : ''; - - $row['edit_button'] = $this->edit_button($row['pid'], $poster, $row['post_date']); - - $row['post_date'] = $this->ipsclass->get_date( $row['post_date'], 'LONG' ); - - $row['post_icon'] = $row['icon_id'] - ? $this->ipsclass->compiled_templates['skin_topic']->post_icon( $row['icon_id'] ) - : ''; - - $row['ip_address'] = $this->view_ip($row, $poster); - - $row['report_link'] = (($this->ipsclass->vars['disable_reportpost'] != 1) and ( $this->ipsclass->member['id'] )) - ? $this->ipsclass->compiled_templates['skin_topic']->report_link($row) - : ''; - - //----------------------------------------- - // Siggie stuff - //----------------------------------------- - - $row['signature'] = ""; - - if (isset($poster['signature']) AND $poster['signature'] AND $this->ipsclass->member['view_sigs']) - { - if ($row['use_sig'] == 1) - { - $row['signature'] = $this->ipsclass->compiled_templates['skin_global']->signature_separator( $poster['signature'] ); - } - } - - //----------------------------------------- - // Fix up the membername so it links to the members profile - //----------------------------------------- - - if ( $poster['id'] ) - { - $poster['_members_display_name'] = "{$poster['members_display_name_short']}"; - } - - //----------------------------------------- - // Parse HTML tag on the fly - //----------------------------------------- - - $this->parser->parse_html = ( $this->forum['use_html'] and $this->ipsclass->cache['group_cache'][ $poster['mgroup'] ]['g_dohtml'] and $row['post_htmlstate'] ) ? 1 : 0; - $this->parser->parse_nl2br = $row['post_htmlstate'] == 2 ? 1 : 0; - - $row['post'] = $this->parser->pre_display_parse( $row['post'] ); - - //----------------------------------------- - // Post number - //----------------------------------------- - - if ( $this->topic_view_mode == 'linearplus' and $this->topic['topic_firstpost'] == $row['pid']) - { - $row['post_count'] = 1; - - if ( ! $this->first ) - { - $this->post_count++; - } - } - else - { - $this->post_count++; - - $row['post_count'] = intval($this->ipsclass->input['st']) + $this->post_count; - } - - $row['forum_id'] = $this->topic['forum_id']; - - return array( 'row' => $row, 'poster' => $poster ); - } - - /*-------------------------------------------------------------------------*/ - // Parse the member info - /*-------------------------------------------------------------------------*/ - - function parse_member( $member=array() ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $group_name = $this->ipsclass->make_name_formatted( $this->ipsclass->cache['group_cache'][ $member['mgroup'] ]['g_title'], $member['mgroup'] ); - $pips = 0; - $member['member_rank_img'] = ""; - - //----------------------------------------- - // Avatar - //----------------------------------------- - - $member['avatar'] = $this->ipsclass->get_avatar( $member['avatar_location'], $this->ipsclass->member['view_avs'], $member['avatar_size'], $member['avatar_type'] ); - - //----------------------------------------- - // Ranks - //----------------------------------------- - - foreach($this->ipsclass->cache['ranks'] as $k => $v) - { - if ($member['posts'] >= $v['POSTS']) - { - if (!$member['title']) - { - $member['title'] = $this->ipsclass->cache['ranks'][ $k ]['TITLE']; - } - - $pips = $v['PIPS']; - break; - } - } - - //----------------------------------------- - // Group image - //----------------------------------------- - - if ( $this->ipsclass->cache['group_cache'][ $member['mgroup'] ]['g_icon'] ) - { - $member['member_rank_img'] = $this->ipsclass->compiled_templates['skin_topic']->member_rank_img($this->ipsclass->cache['group_cache'][ $member['mgroup'] ]['g_icon']); - } - else if ( $pips ) - { - if ( is_numeric( $pips ) ) - { - for ($i = 1; $i <= $pips; ++$i) - { - $member['member_rank_img'] .= "<{A_STAR}>"; - } - } - else - { - $member['member_rank_img'] = $this->ipsclass->compiled_templates['skin_topic']->member_rank_img( 'style_images/<#IMG_DIR#>/folder_team_icons/'.$pips ); - } - } - - $member['member_joined'] = $this->ipsclass->compiled_templates['skin_topic']->member_joined( $this->ipsclass->get_date( $member['joined'], 'JOINED' ) ); - $member['member_group'] = $this->ipsclass->compiled_templates['skin_topic']->member_group( $group_name ); - $member['member_posts'] = $this->ipsclass->compiled_templates['skin_topic']->member_posts( $this->ipsclass->do_number_format( intval( $member['posts'] ) ) ); - $member['member_number'] = $this->ipsclass->compiled_templates['skin_topic']->member_number( $this->ipsclass->do_number_format($member['id']) ); - $member['profile_icon'] = $this->ipsclass->compiled_templates['skin_topic']->member_icon_profile( $member['id'] ); - $member['message_icon'] = $this->ipsclass->compiled_templates['skin_topic']->member_icon_msg( $member['id'] ); - $member['member_location'] = $member['location'] ? $this->ipsclass->compiled_templates['skin_topic']->member_location( $member['location'] ) : ''; - $member['email_icon'] = ! $member['hide_email'] ? $this->ipsclass->compiled_templates['skin_topic']->member_icon_email( $member['id'] ) : ''; - $member['addresscard'] = $member['id'] ? $this->ipsclass->compiled_templates['skin_topic']->member_icon_vcard( $member['id'] ) : ''; - - $this->parser->parse_html = intval($this->ipsclass->vars['sig_allow_html']); - $this->parser->parse_nl2br = 1; - $this->parser->parsing_signature = 1; - $this->parser->parse_bbcode = intval($this->ipsclass->vars['sig_allow_ibc']); - - $member['signature'] = $this->parser->pre_display_parse($member['signature']); - - //----------------------------------------- - // Warny porny? - //----------------------------------------- - - $member['warn_percent'] = NULL; - $member['warn_img'] = NULL; - $member['warn_text'] = NULL; - $member['warn_add'] = NULL; - $member['warn_minus'] = NULL; - - if ( $this->ipsclass->vars['warn_on'] and ( ! strstr( ','.$this->ipsclass->vars['warn_protected'].',', ','.$member['mgroup'].',' ) ) ) - { - if ( ( isset($this->ipsclass->member['_moderator'][ $this->topic['forum_id'] ]['allow_warn']) - AND $this->ipsclass->member['_moderator'][ $this->topic['forum_id'] ]['allow_warn'] ) - OR ( $this->ipsclass->member['g_is_supmod'] == 1 ) - OR ( $this->ipsclass->vars['warn_show_own'] and ( $this->ipsclass->member['id'] == $member['id'] ) ) - ) - { - // Work out which image to show. - - if ( ! $this->ipsclass->vars['warn_show_rating'] ) - { - if ( $member['warn_level'] <= $this->ipsclass->vars['warn_min'] ) - { - $member['warn_img'] = '<{WARN_0}>'; - $member['warn_percent'] = 0; - } - else if ( $member['warn_level'] >= $this->ipsclass->vars['warn_max'] ) - { - $member['warn_img'] = '<{WARN_5}>'; - $member['warn_percent'] = 100; - } - else - { - - $member['warn_percent'] = $member['warn_level'] ? sprintf( "%.0f", ( ($member['warn_level'] / $this->ipsclass->vars['warn_max']) * 100) ) : 0; - - if ( $member['warn_percent'] > 100 ) - { - $member['warn_percent'] = 100; - } - - if ( $member['warn_percent'] >= 81 ) - { - $member['warn_img'] = '<{WARN_5}>'; - } - else if ( $member['warn_percent'] >= 61 ) - { - $member['warn_img'] = '<{WARN_4}>'; - } - else if ( $member['warn_percent'] >= 41 ) - { - $member['warn_img'] = '<{WARN_3}>'; - } - else if ( $member['warn_percent'] >= 21 ) - { - $member['warn_img'] = '<{WARN_2}>'; - } - else if ( $member['warn_percent'] >= 1 ) - { - $member['warn_img'] = '<{WARN_1}>'; - } - else - { - $member['warn_img'] = '<{WARN_0}>'; - } - } - - if ( $member['warn_percent'] < 1 ) - { - $member['warn_percent'] = 0; - } - - $member['warn_text'] = $this->ipsclass->compiled_templates['skin_topic']->warn_level_warn($member['id'], $member['warn_percent'] ); - } - else - { - // Ratings mode.. - - $member['warn_text'] = $this->ipsclass->lang['tt_rating']; - $member['warn_img'] = $this->ipsclass->compiled_templates['skin_topic']->warn_level_rating($member['id'], $member['warn_level'], $this->ipsclass->vars['warn_min'], $this->ipsclass->vars['warn_max']); - } - - if ( ( isset($this->ipsclass->member['_moderator'][ $this->topic['forum_id'] ]['allow_warn']) AND $this->ipsclass->member['_moderator'][ $this->topic['forum_id'] ]['allow_warn'] ) or $this->ipsclass->member['g_is_supmod'] == 1 ) - { - $member['warn_add'] = "topic['tid']}&st=".intval($this->ipsclass->input['st'])."' title='{$this->ipsclass->lang['tt_warn_add']}'><{WARN_ADD}>"; - $member['warn_minus'] = "topic['tid']}&st=".intval($this->ipsclass->input['st'])."' title='{$this->ipsclass->lang['tt_warn_minus']}'><{WARN_MINUS}>"; - } - } - } - - //----------------------------------------- - // Profile fields stuff - //----------------------------------------- - - $member['custom_fields'] = ""; - - if ( $this->ipsclass->vars['custom_profile_topic'] == 1 ) - { - if ( $this->custom_fields ) - { - $this->custom_fields->member_data = $member; - $this->custom_fields->admin = intval($this->ipsclass->member['g_access_cp']); - $this->custom_fields->supmod = intval($this->ipsclass->member['g_is_supmod']); - $this->custom_fields->member_id = $this->ipsclass->member['id']; - $this->custom_fields->init_data(); - $this->custom_fields->parse_to_view( 1 ); - - if ( count( $this->custom_fields->out_fields ) ) - { - foreach( $this->custom_fields->out_fields as $i => $data ) - { - if ( $data ) - { - $member['custom_fields'] .= "\n".$this->custom_fields->method_format_field_for_topic_view( $i ); - } - } - } - } - } - - //----------------------------------------- - // Photo and such - //----------------------------------------- - - $member = $this->lib_profile->personal_portal_set_information( $member ); - - return $member; - } - - /*-------------------------------------------------------------------------*/ - // Render the delete button - /*-------------------------------------------------------------------------*/ - - function delete_button($post_id, $poster) - { - if ($this->ipsclass->member['id'] == "" or $this->ipsclass->member['id'] == 0) - { - return ""; - } - - $button = $this->ipsclass->compiled_templates['skin_topic']->button_delete($this->forum['id'],$this->topic['tid'],$post_id,$this->md5_check ); - - if ($this->ipsclass->member['g_is_supmod']) return $button; - if ($this->moderator['delete_post']) return $button; - if ($poster['id'] == $this->ipsclass->member['id'] and ($this->ipsclass->member['g_delete_own_posts'])) return $button; - return ""; - } - - /*-------------------------------------------------------------------------*/ - // Render the edit button - /*-------------------------------------------------------------------------*/ - - function edit_button($post_id, $poster, $post_date) - { - if ($this->ipsclass->member['id'] == "" or $this->ipsclass->member['id'] == 0) - { - return ""; - } - - $button = $this->ipsclass->compiled_templates['skin_topic']->button_edit( $this->forum['id'],$this->topic['tid'],$post_id ); - - if ($this->ipsclass->member['g_is_supmod']) return $button; - - if ($this->moderator['edit_post']) return $button; - - if ($poster['id'] == $this->ipsclass->member['id'] and ($this->ipsclass->member['g_edit_posts'])) - { - // Have we set a time limit? - - if ($this->ipsclass->member['g_edit_cutoff'] > 0) - { - if ( $post_date > ( time() - ( intval($this->ipsclass->member['g_edit_cutoff']) * 60 ) ) ) - { - return $button; - } - else - { - return ""; - } - } - else - { - return $button; - } - } - - return ""; - } - - /*-------------------------------------------------------------------------*/ - // Render the reply button - /*-------------------------------------------------------------------------*/ - - function reply_button() - { - if ($this->topic['state'] == 'closed' OR ($this->topic['poll_state'] AND $this->poll_only ) ) - { - // Do we have the ability to post in - // closed topics or is this a poll only? - - if ($this->ipsclass->member['g_post_closed'] == 1) - { - $replace = $this->ipsclass->compiled_templates['skin_topic']->button_posting( "{$this->ipsclass->base_url}act=post&do=reply_post&f=".$this->forum['id']."&t=".$this->topic['tid'], "<{A_LOCKED_B}>" ); - } - else - { - $replace = "<{A_LOCKED_B}>"; - } - } - else - { - if ( $this->topic['state'] == 'moved' ) - { - $replace = "<{A_MOVED_B}>"; - } - else - { - $replace = $this->ipsclass->compiled_templates['skin_topic']->button_posting( "{$this->ipsclass->base_url}act=post&do=reply_post&f=".$this->forum['id']."&t=".$this->topic['tid'], "<{A_REPLY}>" ); - } - } - - $this->output = str_replace( "", $replace, $this->output ); - } - - /*-------------------------------------------------------------------------*/ - // Render the IP address - /*-------------------------------------------------------------------------*/ - - function view_ip($row, $poster) - { - if ($this->ipsclass->member['g_is_supmod'] != 1 && ( !isset($this->moderator['view_ip']) OR $this->moderator['view_ip'] != 1 ) ) - { - return ""; - } - else - { - $row['ip_address'] = $poster['mgroup'] == $this->ipsclass->vars['admin_group'] - ? $this->ipsclass->compiled_templates['skin_topic']->ip_admin_hide() - : $this->ipsclass->compiled_templates['skin_topic']->ip_admin_show( $row['ip_address'] ); - return $this->ipsclass->compiled_templates['skin_topic']->ip_show($row['ip_address']); - } - } - - /*-------------------------------------------------------------------------*/ - // Render the topic multi-moderation - /*-------------------------------------------------------------------------*/ - - function multi_moderation() - { - $mm_html = ""; - - $mm_array = $this->ipsclass->get_multimod( $this->forum['id'] ); - - //----------------------------------------- - // Print and show - //----------------------------------------- - - if ( is_array( $mm_array ) and count( $mm_array ) ) - { - foreach( $mm_array as $m ) - { - $mm_html .= $this->ipsclass->compiled_templates['skin_topic']->mm_entry( $m[0], $m[1] ); - } - } - - if ( $mm_html ) - { - $mm_html = $this->ipsclass->compiled_templates['skin_topic']->mm_start($this->topic['tid']) . $mm_html . $this->ipsclass->compiled_templates['skin_topic']->mm_end(); - } - - return $mm_html; - } - - /*-------------------------------------------------------------------------*/ - // Render the moderator links - /*-------------------------------------------------------------------------*/ - - function moderation_panel() - { - $mod_links = ""; - - if (!isset($this->ipsclass->member['id'])) return ""; - - $skcusgej = 0; - - if ($this->ipsclass->member['id'] == $this->topic['starter_id']) - { - $skcusgej = 1; - } - - if ($this->ipsclass->member['g_is_supmod'] == 1) - { - $skcusgej = 1; - } - - if ( isset($this->moderator['mid']) AND $this->moderator['mid'] != "" ) - { - $skcusgej = 1; - } - - if ( $skcusgej == 0 ) - { - return ""; - } - - //----------------------------------------- - // Add on approve/unapprove topic fing - //----------------------------------------- - - if ( $this->ipsclass->can_queue_posts( $this->forum['id'] ) ) - { - if ( $this->topic['approved'] != 1 ) - { - $mod_links .= $this->ipsclass->compiled_templates['skin_topic']->mod_wrapper('topic_approve', $this->ipsclass->lang[ 'cpt_approvet' ]); - } - else - { - $mod_links .= $this->ipsclass->compiled_templates['skin_topic']->mod_wrapper('topic_unapprove', $this->ipsclass->lang[ 'cpt_unapprovet' ]); - } - } - - $actions = array( 'MOVE_TOPIC', 'CLOSE_TOPIC', 'OPEN_TOPIC', 'DELETE_TOPIC', 'EDIT_TOPIC', 'PIN_TOPIC', 'UNPIN_TOPIC', 'MERGE_TOPIC', 'UNSUBBIT' ); - - foreach( $actions as $key ) - { - if ($this->ipsclass->member['g_is_supmod']) - { - $mod_links .= $this->append_link($key); - } - elseif ( isset($this->moderator['mid']) AND $this->moderator['mid']) - { - if ($key == 'MERGE_TOPIC' or $key == 'SPLIT_TOPIC') - { - if ($this->moderator['split_merge'] == 1) - { - $mod_links .= $this->append_link($key); - } - } - else if ( isset($this->moderator[ strtolower($key) ]) AND $this->moderator[ strtolower($key) ] ) - { - $mod_links .= $this->append_link($key); - } - - // What if member is a mod, but doesn't have these perms as a mod? - - elseif ($key == 'OPEN_TOPIC' or $key == 'CLOSE_TOPIC') - { - if ($this->ipsclass->member['g_open_close_posts']) - { - $mod_links .= $this->append_link($key); - } - } - elseif ($key == 'DELETE_TOPIC') - { - if ($this->ipsclass->member['g_delete_own_topics']) - { - $mod_links .= $this->append_link($key); - } - } - } - elseif ($key == 'OPEN_TOPIC' or $key == 'CLOSE_TOPIC') - { - if ($this->ipsclass->member['g_open_close_posts']) - { - $mod_links .= $this->append_link($key); - } - } - elseif ($key == 'DELETE_TOPIC') - { - if ($this->ipsclass->member['g_delete_own_topics']) - { - $mod_links .= $this->append_link($key); - } - } - } - - if ($this->ipsclass->member['g_access_cp'] == 1) - { - $mod_links .= $this->append_link('TOPIC_HISTORY'); - } - - if ($mod_links != "") - { - return $this->ipsclass->compiled_templates['skin_topic']->Mod_Panel($mod_links, $this->forum['id'], $this->topic['tid'], $this->md5_check); - - } - else - { - return ""; - } - - } - - /*-------------------------------------------------------------------------*/ - // Append mod links - /*-------------------------------------------------------------------------*/ - - function append_link( $key="" ) - { - if ($key == "") return ""; - - if ($this->topic['state'] == 'open' and $key == 'OPEN_TOPIC') return ""; - if ($this->topic['state'] == 'closed' and $key == 'CLOSE_TOPIC') return ""; - if ($this->topic['state'] == 'moved' and ($key == 'CLOSE_TOPIC' or $key == 'MOVE_TOPIC')) return ""; - if ($this->topic['pinned'] == 1 and $key == 'PIN_TOPIC') return ""; - if ($this->topic['pinned'] == 0 and $key == 'UNPIN_TOPIC') return ""; - - ++$this->colspan; - - return $this->ipsclass->compiled_templates['skin_topic']->mod_wrapper($this->mod_action[$key], $this->ipsclass->lang[ $key ]); - } - - /*-------------------------------------------------------------------------*/ - // Process and parse the poll - /*-------------------------------------------------------------------------*/ - - function parse_poll() - { - $html = ""; - $check = 0; - $poll_footer = ""; - - $this->ipsclass->load_template('skin_poll'); - - //----------------------------------------- - // Get the poll information... - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'polls', - 'where' => "tid=".$this->topic['tid'] - ) ); - - $this->ipsclass->DB->simple_exec(); - - $poll_data = $this->ipsclass->DB->fetch_row(); - - //----------------------------------------- - // check we have a poll - //----------------------------------------- - - if ( ! $poll_data['pid'] ) - { - return; - } - - //----------------------------------------- - // Do we have a poll question? - //----------------------------------------- - - if ( ! $poll_data['poll_question'] ) - { - $poll_data['poll_question'] = $this->topic['title']; - } - - //----------------------------------------- - // Poll only? - //----------------------------------------- - - if( $poll_data['poll_only'] == 1 ) - { - $this->poll_only = 1; - } - - //----------------------------------------- - // Show the poll - //----------------------------------------- - - $member_voted = 0; - $total_votes = 0; - - //----------------------------------------- - // Have we voted in this poll? - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => 'member_id', - 'from' => 'voters', - 'where' => "tid=".$this->topic['tid'] - ) ); - - $this->ipsclass->DB->simple_exec(); - - while( $voter = $this->ipsclass->DB->fetch_row() ) - { - $total_votes++; - - if( $voter['member_id'] == $this->ipsclass->member['id'] ) - { - $member_voted = 1; - } - } - - //----------------------------------------- - // Can we vote again? - //----------------------------------------- - - if ( $member_voted ) - { - $check = 1; - $poll_footer = $this->ipsclass->lang['poll_you_voted']; - } - - if ( ($poll_data['starter_id'] == $this->ipsclass->member['id']) and ($this->ipsclass->vars['allow_creator_vote'] != 1) ) - { - $check = 1; - $poll_footer = $this->ipsclass->lang['poll_you_created']; - } - - if ( ! $this->ipsclass->member['id'] ) - { - if ( !$this->ipsclass->vars['allow_result_view'] ) - { - $check = 2; - } - else - { - $check = 1; - } - - $poll_footer = $this->ipsclass->lang['poll_no_guests']; - } - - //----------------------------------------- - // is the topic locked? - //----------------------------------------- - - if ( $this->topic['state'] == 'closed' ) - { - $check = 1; - $poll_footer = ' '; - } - - //----------------------------------------- - // Can we see the poll before voting? - //----------------------------------------- - - if ( $this->ipsclass->vars['allow_result_view'] == 1 ) - { - if ( $this->ipsclass->input['mode'] == 'show' ) - { - $check = 1; - $poll_footer = ""; - } - } - - //----------------------------------------- - // Stop the parser killing images - // 'cos there are too many - //----------------------------------------- - - $tmp_max_images = $this->ipsclass->vars['max_images']; - $this->ipsclass->vars['max_images'] = 0; - - if ( $check == 1 ) - { - //----------------------------------------- - // Show the results - //----------------------------------------- - - $html = $this->ipsclass->compiled_templates['skin_poll']->poll_header( $this->topic['tid'], $poll_data['poll_question'] ); - $poll_answers = unserialize(stripslashes($poll_data['choices'])); - - reset($poll_answers); - - foreach ( $poll_answers as $id => $data ) - { - //----------------------------------------- - // Get the question - //----------------------------------------- - - $question = $data['question']; - $choice_html = ""; - $tv_poll = 0; - - # Get total votes for this question - foreach( $poll_answers[ $id ]['votes'] as $number) - { - $tv_poll += intval( $number ); - } - - //----------------------------------------- - // Get the choices for this question - //----------------------------------------- - - foreach( $data['choice'] as $choice_id => $text ) - { - $choice = $text; - - # Get total votes for this question -> choice - $votes = intval($data['votes'][ $choice_id ]); - - if ( strlen($choice) < 1 ) - { - continue; - } - - if ( $this->ipsclass->vars['poll_tags'] ) - { - $choice = $this->parser->parse_poll_tags($choice); - } - - $percent = $votes == 0 ? 0 : $votes / $tv_poll * 100; - $percent = sprintf( '%.2f' , $percent ); - $width = $percent > 0 ? intval($percent * 2) : 0; - - $choice_html .= $this->ipsclass->compiled_templates['skin_poll']->poll_show_rendered_choice($choice_id, $votes, $id, $choice, $percent, $width); - } - - //----------------------------------------- - // Add HTML together - //----------------------------------------- - - $html .= $this->ipsclass->compiled_templates['skin_poll']->poll_show_rendered_question( $id, $question, $choice_html ); - } - - $html .= $this->ipsclass->compiled_templates['skin_poll']->show_total_votes($total_votes); - } - else if ( $check == 2 ) - { - // Guest viewing poll results, but show results before voting is not allowed - - $html = $this->ipsclass->compiled_templates['skin_poll']->poll_header($this->topic['tid'], $poll_data['poll_question']); - $html .= $this->ipsclass->compiled_templates['skin_poll']->poll_show_no_guest_view( ); - $html .= $this->ipsclass->compiled_templates['skin_poll']->show_total_votes($total_votes); - } - else - { - $poll_answers = unserialize(stripslashes($poll_data['choices'])); - reset($poll_answers); - - //----------------------------------------- - // Show poll form - //----------------------------------------- - - $html = $this->ipsclass->compiled_templates['skin_poll']->poll_header($this->topic['tid'], $poll_data['poll_question']); - - foreach ( $poll_answers as $id => $data ) - { - //----------------------------------------- - // Get the question - //----------------------------------------- - - $question = $data['question']; - $choice_html = ""; - - //----------------------------------------- - // Get the choices for this question - //----------------------------------------- - - foreach( $data['choice'] as $choice_id => $text ) - { - $choice = $text; - $votes = intval($data['votes'][ $choice_id ]); - - //$total_votes += $votes; - - if ( strlen($choice) < 1 ) - { - continue; - } - - if ($this->ipsclass->vars['poll_tags']) - { - $choice = $this->parser->parse_poll_tags($choice); - } - - if( isset($data['multi']) AND $data['multi'] == 1 ) - { - $choice_html .= $this->ipsclass->compiled_templates['skin_poll']->poll_show_form_choice_multi($choice_id, $votes, $id, $choice); - } - else - { - $choice_html .= $this->ipsclass->compiled_templates['skin_poll']->poll_show_form_choice($choice_id, $votes, $id, $choice); - } - } - - //----------------------------------------- - // Add HTML together - //----------------------------------------- - - $html .= $this->ipsclass->compiled_templates['skin_poll']->poll_show_form_question( $id, $question, $choice_html ); - } - - $html .= $this->ipsclass->compiled_templates['skin_poll']->show_total_votes($total_votes); - } - - $html .= $this->ipsclass->compiled_templates['skin_poll']->poll_footer(); - - if ( $poll_footer != "" ) - { - //----------------------------------------- - // Already defined.. - //----------------------------------------- - - $html = str_replace( "", $poll_footer, $html ); - } - else - { - //----------------------------------------- - // Not defined.. - //----------------------------------------- - - if ( $this->ipsclass->vars['allow_result_view'] == 1 ) - { - if ( $this->ipsclass->input['mode'] == 'show' ) - { - // We are looking at results.. - - $html = str_replace( "", $this->ipsclass->compiled_templates['skin_poll']->button_show_voteable(), $html ); - } - else - { - $html = str_replace( "", $this->ipsclass->compiled_templates['skin_poll']->button_show_results(), $html ); - $html = str_replace( "", $this->ipsclass->compiled_templates['skin_poll']->button_vote(), $html ); - } - } - else - { - //----------------------------------------- - // Do not allow result viewing - //----------------------------------------- - - $html = str_replace( "", $this->ipsclass->compiled_templates['skin_poll']->button_vote(), $html ); - $html = str_replace( "", $this->ipsclass->compiled_templates['skin_poll']->button_null_vote(), $html ); - } - } - - $this->ipsclass->vars['max_images'] = $tmp_max_images; - - return $html; - } - - /*-------------------------------------------------------------------------*/ - // Build topic permissions - /*-------------------------------------------------------------------------*/ - - function build_permissions() - { - //----------------------------------------- - // Polls - //----------------------------------------- - - $this->can_vote = intval( $this->ipsclass->member['g_vote_polls'] ); - - //----------------------------------------- - // Topic rating: Rating - //----------------------------------------- - - if ( $this->ipsclass->member['id'] ) - { - $this->can_rate = intval( $this->ipsclass->member['g_topic_rate_setting'] ); - } - else - { - $this->can_rate = 0; - } - } - - /*-------------------------------------------------------------------------*/ - // Add vote to rating - /*-------------------------------------------------------------------------*/ - - function topic_add_vote_to_rating() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $topic_id = intval($this->ipsclass->input['t']); - $rating_id = intval($this->ipsclass->input['rating']); - $vote_cast = array(); - - $this->ipsclass->load_language('lang_topic'); - - //----------------------------------------- - // Permissions check - //----------------------------------------- - - if ( ! $this->forum['forum_allow_rating'] ) - { - $this->can_rate = 0; - } - - if ( ! $this->can_rate ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'topic_rate_no_perm') ); - } - - //----------------------------------------- - // Make sure we have a valid poll id - //----------------------------------------- - - if ( ! $topic_id ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files') ); - } - - //----------------------------------------- - // No topic? - //----------------------------------------- - - if ( ! $this->topic['tid'] ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'topic_rate_no_perm') ); - } - - //----------------------------------------- - // Locked topic? - //----------------------------------------- - - if ( $this->topic['state'] != 'open' ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'locked_topic') ); - } - - //----------------------------------------- - // Sneaky members rating topic more than 5? - //----------------------------------------- - - if( $rating_id > 5 ) - { - $rating_id = 5; - } - - if( $rating_id < 0 ) - { - $rating_id = 0; - } - - //----------------------------------------- - // Have we rated before? - //----------------------------------------- - - $rating = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'topic_ratings', 'where' => "rating_tid={$this->topic['tid']} and rating_member_id=".$this->ipsclass->member['id'] ) ); - - //----------------------------------------- - // Already rated? - //----------------------------------------- - - if ( $rating['rating_id'] ) - { - //----------------------------------------- - // Do we allow re-ratings? - //----------------------------------------- - - if ( $this->ipsclass->member['g_topic_rate_setting'] == 2 ) - { - if ( $rating_id != $rating['rating_value'] ) - { - $new_rating = $rating_id - $rating['rating_value']; - - $this->ipsclass->DB->do_update( 'topic_ratings', array( 'rating_value' => $rating_id ), 'rating_id='.$rating['rating_id'] ); - - $this->ipsclass->DB->do_update( 'topics', array( 'topic_rating_total' => intval($this->topic['topic_rating_total']) + $new_rating ), 'tid='.$this->topic['tid'] ); - } - - $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['topic_rating_changed'] , "showtopic={$this->topic['tid']}&st={$this->ipsclass->input['st']}" ); - } - else - { - $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['topic_rated_already'] , "showtopic={$this->topic['tid']}&st={$this->ipsclass->input['st']}" ); - exit(); - } - } - - //----------------------------------------- - // NEW RATING! - //----------------------------------------- - - else - { - $this->ipsclass->DB->do_insert( 'topic_ratings', array( 'rating_tid' => $this->topic['tid'], - 'rating_member_id' => $this->ipsclass->member['id'], - 'rating_value' => $rating_id, - 'rating_ip_address' => $this->ipsclass->ip_address ) ); - - $this->ipsclass->DB->do_update( 'topics', array( 'topic_rating_hits' => intval($this->topic['topic_rating_hits']) + 1, - 'topic_rating_total' => intval($this->topic['topic_rating_total']) + $rating_id ), 'tid='.$this->topic['tid'] ); - } - - $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['topic_rating_done'] , "showtopic={$this->topic['tid']}&st={$this->ipsclass->input['st']}" ); - } - - /*-------------------------------------------------------------------------*/ - // Add vote to poll - /*-------------------------------------------------------------------------*/ - - function topic_add_vote_to_poll() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $topic_id = intval($this->ipsclass->input['t']); - $vote_cast = array(); - - $this->ipsclass->load_language('lang_topic'); - - //----------------------------------------- - // Permissions check - //----------------------------------------- - - if ( ! $this->can_vote ) - { - $this->ipsclass->Error( array( LEVEL => 1, MSG => 'no_reply_polls') ); - } - - //----------------------------------------- - // Make sure we have a valid poll id - //----------------------------------------- - - if ( ! $topic_id ) - { - $this->ipsclass->Error( array( LEVEL => 1, MSG => 'missing_files') ); - } - - //----------------------------------------- - // Load the topic and poll - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'poll_get_poll_with_topic', array( 'tid' => $topic_id ) ); - $this->ipsclass->DB->cache_exec_query(); - - $this->topic = $this->ipsclass->DB->fetch_row(); - - //----------------------------------------- - // No topic? - //----------------------------------------- - - if ( ! $this->topic['tid'] ) - { - $this->ipsclass->Error( array( LEVEL => 1, MSG => 'poll_none_found') ); - } - - //----------------------------------------- - // Locked topic? - //----------------------------------------- - - if ( $this->topic['state'] != 'open' ) - { - $this->ipsclass->Error( array( LEVEL => 1, MSG => 'locked_topic') ); - } - - //----------------------------------------- - // Have reply permissions?? - //----------------------------------------- - - if ( $this->ipsclass->check_perms( $this->ipsclass->cache['forum_cache'][ $this->topic['forum_id'] ]['reply_perms'] ) == FALSE ) - { - $this->ipsclass->Error( array( 'LEVEL' => '1', 'MSG' => 'no_replies') ); - } - - //----------------------------------------- - // Have we voted before? - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => 'member_id', 'from' => 'voters', 'where' => "tid={$this->topic['tid']} and member_id=".$this->ipsclass->member['id'] ) ); - $this->ipsclass->DB->simple_exec(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - $this->ipsclass->Error( array( LEVEL => 1, MSG => 'poll_you_voted') ); - } - - //----------------------------------------- - // Sort out the new array - //----------------------------------------- - - $this->ipsclass->input['nullvote'] = isset($this->ipsclass->input['nullvote']) ? $this->ipsclass->input['nullvote'] : 0; - - if ( !$this->ipsclass->input['nullvote'] ) - { - //----------------------------------------- - // First, which choices and ID did we choose? - // Single option poll... - //----------------------------------------- - - if ( is_array( $_POST['choice'] ) and count( $_POST['choice'] ) ) - { - foreach( $_POST['choice'] as $question_id => $choice_id ) - { - if ( ! $question_id or ! isset($choice_id) ) - { - continue; - } - - $vote_cast[ $question_id ][] = $choice_id; - } - } - - //----------------------------------------- - // Multi vote poll - //----------------------------------------- - - foreach( $this->ipsclass->input as $k => $v ) - { - if( preg_match( "#^choice_(\d+)_(\d+)$#", $k, $matches ) ) - { - if( $this->ipsclass->input[$k] == 1 ) - { - $vote_cast[ $matches[1] ][] = $matches[2]; - } - } - } - - //----------------------------------------- - // Unparse the choices - //----------------------------------------- - - $poll_answers = unserialize( stripslashes( $this->topic['choices'] ) ); - reset($poll_answers); - - //----------------------------------------- - // Got enough votes? - //----------------------------------------- - - if ( count( $vote_cast ) < count( $poll_answers ) ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_vote') ); - } - - //----------------------------------------- - // Add voter - //----------------------------------------- - - $this->ipsclass->DB->do_insert( 'voters', array( 'member_id' => $this->ipsclass->member['id'], - 'ip_address' => $this->ipsclass->ip_address, - 'tid' => $this->topic['tid'], - 'forum_id' => $this->topic['forum_id'], - 'vote_date' => time(), - ) ); - - //----------------------------------------- - // Loop - //----------------------------------------- - - foreach ( $vote_cast as $question_id => $choice_array ) - { - foreach( $choice_array as $choice_id ) - { - $poll_answers[ $question_id ]['votes'][ $choice_id ]++; - - if ( $poll_answers[ $question_id ]['votes'][ $choice_id ] < 1 ) - { - $poll_answers[ $question_id ]['votes'][ $choice_id ] = 1; - } - } - } - - //----------------------------------------- - // Save... - //----------------------------------------- - - $this->topic['choices'] = addslashes( serialize( $poll_answers ) ); - - $this->ipsclass->DB->simple_exec_query( array( 'update' => 'polls', - 'set' => "votes=votes+1,choices='{$this->topic['choices']}'", - 'where' => "pid={$this->topic['poll_id']}" ) ); - - //----------------------------------------- - // Go bump in the night? - //----------------------------------------- - - if ($this->topic['allow_pollbump']) - { - $this->topic['last_vote'] = time(); - $this->topic['last_post'] = time(); - - $this->ipsclass->DB->do_update( 'topics', array( 'last_vote' => $this->topic['last_vote'], 'last_post' => $this->topic['last_post'] ), 'tid='.$this->topic['tid'] ); - } - else - { - $this->topic['last_vote'] = time(); - - $this->ipsclass->DB->do_update( 'topics', array( 'last_vote' => $this->topic['last_vote'], 'last_post' => $this->topic['last_post'] ), 'tid='.$this->topic['tid'] ); - } - } - else - { - //----------------------------------------- - // Add null vote - //----------------------------------------- - - $this->ipsclass->DB->do_insert( 'voters', array( 'member_id' => $this->ipsclass->member['id'], - 'ip_address' => $this->ipsclass->ip_address, - 'tid' => $this->topic['tid'], - 'forum_id' => $this->topic['forum_id'], - 'vote_date' => time(), - ) ); - } - - $lang = $this->ipsclass->input['nullvote'] ? $this->ipsclass->lang['poll_viewing_results'] : $this->ipsclass->lang['poll_vote_added']; - - $this->ipsclass->print->redirect_screen( $lang , "showtopic={$this->topic['tid']}&st={$this->ipsclass->input['st']}" ); - } - - /*-------------------------------------------------------------------------*/ - // Return last post - /*-------------------------------------------------------------------------*/ - - function return_last_post() - { - $st = 0; - - $mode = $this->ipsclass->my_getcookie( 'topicmode' ); - - $pre = $mode != 'threaded' ? 'st' : 'start'; - - if( $mode == 'threaded' ) - { - $this->ipsclass->vars['display_max_posts'] = $this->ipsclass->vars['threaded_per_page']; - $this->ipsclass->input['st'] = $this->ipsclass->input['start']; - } - - if ($this->topic['posts']) - { - if ( (($this->topic['posts'] + 1) % $this->ipsclass->vars['display_max_posts']) == 0 ) - { - $pages = ($this->topic['posts'] + 1) / $this->ipsclass->vars['display_max_posts']; - } - else - { - $number = ( ($this->topic['posts'] + 1) / $this->ipsclass->vars['display_max_posts'] ); - $pages = ceil( $number); - } - - $st = ($pages - 1) * $this->ipsclass->vars['display_max_posts']; - - if( $this->ipsclass->vars['post_order_sort'] == 'desc' ) - { - $st = (ceil(($this->topic['posts']/$this->ipsclass->vars['display_max_posts'])) - $pages) * $this->ipsclass->vars['display_max_posts']; - } - } - - $this->ipsclass->DB->simple_construct( array( 'select' => 'MAX(pid) as pid', - 'from' => 'posts', - 'where' => "queued=0 AND topic_id=".$this->topic['tid'], - 'limit' => array( 0,1 ) - ) ); - - $this->ipsclass->DB->simple_exec(); - - $post = $this->ipsclass->DB->fetch_row(); - - $this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$this->topic['tid']."&pid={$post['pid']}&{$pre}={$st}&"."#entry".$post['pid']); - } - - /*-------------------------------------------------------------------------*/ - // INIT, innit? IS IT? - /*-------------------------------------------------------------------------*/ - - function topic_init( $load_modules=0 ) - { - //----------------------------------------- - // Compile the language file - //----------------------------------------- - - $this->ipsclass->load_language('lang_topic'); - $this->ipsclass->load_language('lang_editors'); - $this->ipsclass->load_template('skin_topic'); - - //----------------------------------------- - // Load and config the post parser - //----------------------------------------- - - require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); - $this->parser = new parse_bbcode(); - $this->parser->ipsclass = $this->ipsclass; - $this->parser->allow_update_caches = 1; - - $this->parser->bypass_badwords = intval($this->ipsclass->member['g_bypass_badwords']); - - //----------------------------------------- - // Load profile lib - //----------------------------------------- - - require_once( ROOT_PATH . 'sources/action_public/profile.php' ); - $this->lib_profile = new profile(); - $this->lib_profile->ipsclass =& $this->ipsclass; - - //----------------------------------------- - // Custom Profile fields - //----------------------------------------- - - if ( $this->ipsclass->vars['custom_profile_topic'] == 1 or $load_modules ) - { - require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); - $this->custom_fields = new custom_fields( $this->ipsclass->DB ); - - $this->custom_fields->member_id = $this->ipsclass->member['id']; - $this->custom_fields->cache_data = $this->ipsclass->cache['profilefields']; - $this->custom_fields->admin = intval($this->ipsclass->member['g_access_cp']); - $this->custom_fields->supmod = intval($this->ipsclass->member['g_is_supmod']); - } - - //----------------------------------------- - // Get all the member groups and - // member title info - //----------------------------------------- - - if ( ! is_array( $this->ipsclass->cache['ranks'] ) ) - { - $this->ipsclass->cache['ranks'] = array(); - - $this->ipsclass->DB->simple_construct( array( 'select' => 'id, title, pips, posts', - 'from' => 'titles', - 'order' => "posts DESC", - ) ); - - $this->ipsclass->DB->simple_exec(); - - while ($i = $this->ipsclass->DB->fetch_row()) - { - $this->ipsclass->cache['ranks'][ $i['id'] ] = array( - 'TITLE' => $i['title'], - 'PIPS' => $i['pips'], - 'POSTS' => $i['posts'], - ); - } - - $this->ipsclass->update_cache( array( 'name' => 'ranks', 'array' => 1, 'deletefirst' => 1 ) ); - } - } - - /*-------------------------------------------------------------------------*/ - // MAIN init - /*-------------------------------------------------------------------------*/ - - function init($topic="") - { - $this->md5_check = $this->ipsclass->return_md5_check(); - - if ( ! is_array($topic) ) - { - //----------------------------------------- - // Check the input - //----------------------------------------- - - $this->ipsclass->input['t'] = intval($this->ipsclass->input['t']); - - if ( $this->ipsclass->input['t'] < 0 ) - { - $this->ipsclass->Error( array( LEVEL => 1, MSG => 'missing_files') ); - } - - //----------------------------------------- - // Get the forum info based on the forum ID, - // get the category name, ID, and get the topic details - //----------------------------------------- - - if ( !isset( $this->ipsclass->topic_cache['tid']) OR !$this->ipsclass->topic_cache['tid'] ) - { - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'topics', - 'where' => "tid=".$this->ipsclass->input['t'], - ) ); - - $this->ipsclass->DB->simple_exec(); - - $this->topic = $this->ipsclass->DB->fetch_row(); - } - else - { - $this->topic = $this->ipsclass->topic_cache; - } - } - else - { - $this->topic = $topic; - } - - $this->topic['forum_id'] = isset($this->topic['forum_id']) ? $this->topic['forum_id'] : 0; - - $this->forum = $this->ipsclass->forums->forum_by_id[ $this->topic['forum_id'] ]; - - $this->ipsclass->input['f'] = $this->forum['id']; - - //----------------------------------------- - // Error out if we can not find the forum - //----------------------------------------- - - if ( ! $this->forum['id'] ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'is_broken_link') ); - } - - //----------------------------------------- - // Error out if we can not find the topic - //----------------------------------------- - - if ( ! $this->topic['tid'] ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'is_broken_link') ); - } - - //----------------------------------------- - // Error out if the topic is not approved - //----------------------------------------- - - if ( ! $this->ipsclass->can_queue_posts($this->forum['id']) ) - { - if ($this->topic['approved'] != 1) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files') ); - } - } - - $this->ipsclass->forums->forums_check_access( $this->forum['id'], 1, 'topic' ); - - //----------------------------------------- - // Unserialize the read array and parse into - // array - //----------------------------------------- - - if ( $read = $this->ipsclass->my_getcookie('topicsread') ) - { - if( $read != "-1" ) - { - $this->read_array = $this->ipsclass->clean_int_array( unserialize(stripslashes($read)) ); - } - else - { - $this->read_array = array(); - } - } - - $this->last_read_tid = isset($this->read_array[$this->topic['tid']]) ? $this->read_array[$this->topic['tid']] : 0; - - //----------------------------------------- - // Are we actually a moderator for this forum? - //----------------------------------------- - - if ( ! $this->ipsclass->member['g_is_supmod'] AND ! $this->ipsclass->member['g_access_cp'] ) - { - if ( !isset($this->ipsclass->member['_moderator'][ $this->forum['id'] ]) OR !is_array( $this->ipsclass->member['_moderator'][ $this->forum['id'] ] ) ) - { - $this->ipsclass->member['is_mod'] = 0; - } - } - } - - /*-------------------------------------------------------------------------*/ - // Topic set up ya'll - /*-------------------------------------------------------------------------*/ - - function topic_set_up() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $this->ipsclass->input['show'] = intval( $this->ipsclass->input['show'] ); - $this->ipsclass->input['st'] = intval( $this->ipsclass->input['st'] ); - - $this->topic_init(); - - $this->base_url = $this->ipsclass->base_url; - $this->forum['JUMP'] = $this->ipsclass->build_forum_jump(); - $this->first = intval($this->ipsclass->input['st']) > 0 ? intval($this->ipsclass->input['st']) : 0; - $this->ipsclass->input['view'] = isset($this->ipsclass->input['view']) ? $this->ipsclass->input['view'] : NULL; - - //----------------------------------------- - // Check viewing permissions, private forums, - // password forums, etc - //----------------------------------------- - - if ( ( ! $this->ipsclass->member['g_other_topics'] ) AND ( $this->topic['starter_id'] != $this->ipsclass->member['id'] ) ) - { - $this->ipsclass->Error( array( LEVEL => 1, MSG => 'no_view_topic') ); - } - - //----------------------------------------- - // Update the topic views counter - //----------------------------------------- - - if ( ! $this->ipsclass->input['view'] AND $this->topic['state'] != 'link' ) - { - if ( $this->ipsclass->vars['update_topic_views_immediately'] ) - { - $this->ipsclass->DB->simple_construct( array( 'update' => 'topics', - 'set' => 'views=views+1', - 'where' => "tid=".$this->topic['tid'], - #'lowpro' => 1, - ) ); - - $this->ipsclass->DB->simple_shutdown_exec(); - } - else - { - $this->ipsclass->DB->do_shutdown_insert( 'topic_views', array( 'views_tid' => $this->topic['tid'] ) ); - } - } - - //----------------------------------------- - // Need to update this topic? - //----------------------------------------- - - if ( $this->topic['state'] == 'open' ) - { - if( !$this->topic['topic_open_time'] OR $this->topic['topic_open_time'] < $this->topic['topic_close_time'] ) - { - if ( $this->topic['topic_close_time'] AND ( $this->topic['topic_close_time'] <= time() AND ( time() >= $this->topic['topic_open_time'] OR !$this->topic['topic_open_time'] ) ) ) - { - $this->topic['state'] = 'closed'; - - $this->ipsclass->DB->do_shutdown_update( 'topics', array( 'state' => 'closed' ), 'tid='.$this->topic['tid'] ); - } - } - else if( $this->topic['topic_open_time'] OR $this->topic['topic_open_time'] > $this->topic['topic_close_time'] ) - { - if ( $this->topic['topic_close_time'] AND ( $this->topic['topic_close_time'] <= time() AND time() <= $this->topic['topic_open_time'] ) ) - { - $this->topic['state'] = 'closed'; - - $this->ipsclass->DB->do_shutdown_update( 'topics', array( 'state' => 'closed' ), 'tid='.$this->topic['tid'] ); - } - } - } - else if ( $this->topic['state'] == 'closed' ) - { - if( !$this->topic['topic_close_time'] OR $this->topic['topic_close_time'] < $this->topic['topic_open_time'] ) - { - if ( $this->topic['topic_open_time'] AND ( $this->topic['topic_open_time'] <= time() AND ( time() >= $this->topic['topic_close_time'] OR !$this->topic['topic_close_time'] ) ) ) - { - $this->topic['state'] = 'open'; - - $this->ipsclass->DB->do_shutdown_update( 'topics', array( 'state' => 'open' ), 'tid='.$this->topic['tid'] ); - } - } - else if( $this->topic['topic_close_time'] OR $this->topic['topic_close_time'] > $this->topic['topic_open_time'] ) - { - - if ( $this->topic['topic_open_time'] AND ( $this->topic['topic_open_time'] <= time() AND time() <= $this->topic['topic_close_time'] ) ) - { - $this->topic['state'] = 'open'; - - $this->ipsclass->DB->do_shutdown_update( 'topics', array( 'state' => 'open' ), 'tid='.$this->topic['tid'] ); - } - } - } - - //----------------------------------------- - // Current topic rating value - //----------------------------------------- - - $this->topic['_rate_show'] = 0; - $this->topic['_rate_int'] = 0; - $this->topic['_rate_img'] = ''; - - if ( $this->topic['state'] != 'open' ) - { - $this->topic['_allow_rate'] = 0; - } - else - { - $this->topic['_allow_rate'] = $this->can_rate; - } - - if ( $this->forum['forum_allow_rating'] ) - { - $rating = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'topic_ratings', 'where' => "rating_tid={$this->topic['tid']} and rating_member_id=".$this->ipsclass->member['id'] ) ); - - if ( $rating['rating_value'] AND $this->ipsclass->member['g_topic_rate_setting'] != 2 ) - { - $this->topic['_allow_rate'] = 0; - } - - $this->topic['_rate_img'] = $this->ipsclass->compiled_templates['skin_topic']->topic_rating_image( 0 ); - $this->topic['_rating_value'] = $rating['rating_value'] ? $rating['rating_value'] : $this->ipsclass->lang['you_have_not_rated']; - - if ( $this->topic['topic_rating_total'] ) - { - $this->topic['_rate_int'] = round( $this->topic['topic_rating_total'] / $this->topic['topic_rating_hits'] ); - } - - //----------------------------------------- - // Show image? - //----------------------------------------- - - if ( ( $this->topic['topic_rating_hits'] >= $this->ipsclass->vars['topic_rating_needed'] ) AND ( $this->topic['_rate_int'] ) ) - { - $this->topic['_rate_img'] = $this->ipsclass->compiled_templates['skin_topic']->topic_rating_image($this->topic['_rate_int'] ); - $this->topic['_rate_show'] = 1; - } - } - else - { - $this->topic['_allow_rate'] = 0; - } - - //----------------------------------------- - // Update the topic read cookie / counters - //----------------------------------------- - - if ( !$this->ipsclass->input['view'] ) - { - $this->read_array[ $this->topic['tid'] ] = time(); - - $this->ipsclass->my_setcookie('topicsread', serialize($this->read_array), -1 ); - } - - if ( $this->ipsclass->vars['db_topic_read_cutoff'] AND $this->ipsclass->member['id'] ) - { - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'topic_markers', - 'where' => "marker_forum_id=".$this->forum['id']." AND marker_member_id=".$this->ipsclass->member['id'], - ) ); - - $this->ipsclass->DB->simple_exec(); - - $this->db_row = $this->ipsclass->DB->fetch_row(); - $this->my_topics_read = unserialize($this->db_row['marker_topics_read'] ); - $time_check = isset($this->my_topics_read[ $this->topic['tid'] ]) AND $this->my_topics_read[ $this->topic['tid'] ] > $this->db_row['marker_last_cleared'] ? $this->my_topics_read[ $this->topic['tid'] ] : $this->db_row['marker_last_cleared']; - $save_array = array(); - $read_topics_tid = array( 0 => $this->topic['tid'] ); - - $time_check = $time_check > $this->ipsclass->member['members_markers']['board'] ? $time_check : $this->ipsclass->member['members_markers']['board']; - - //----------------------------------------- - // Work out topics we've read and that haven't - // been updated - //----------------------------------------- - - if ( is_array( $this->my_topics_read ) ) - { - foreach( $this->my_topics_read as $tid => $date ) - { - if ( $date > $this->db_row['marker_last_cleared'] ) - { - $read_topics_tid[] = $tid; - } - } - } - - //----------------------------------------- - // New post since last read / not read? - // Yes: Update. No: Ignore - //----------------------------------------- - - if ( ( $this->ipsclass->input['view'] != 'getnewpost' ) AND ( ( $time_check <= $this->topic['last_post'] ) OR ( $this->forum['forum_last_deletion'] > $this->db_row['marker_last_update'] ) ) ) - { - $save_array['marker_unread'] = $this->db_row['marker_unread'] - 1; - - $db_time = $this->db_row['marker_last_cleared'] > $this->ipsclass->member['members_markers']['board'] ? $this->db_row['marker_last_cleared'] : $this->ipsclass->member['members_markers']['board']; - - $this->my_topics_read[ $this->topic['tid'] ] = time(); - - //----------------------------------------- - // All read? Recount and check - //----------------------------------------- - - if ( $save_array['marker_unread'] <= 0 ) - { - $approved = $this->ipsclass->member['is_mod'] ? ' AND approved IN (0,1) ' : ' AND approved=1 '; - - $count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as cnt, MIN(last_post) as min_last_post', - 'from' => 'topics', - 'where' => "forum_id={$this->forum['id']} {$approved} AND tid NOT IN(0,".implode(",",$read_topics_tid).") AND last_post > ".intval($db_time) ) ); - - $save_array['marker_unread'] = intval($count['cnt']); - - if ( $save_array['marker_unread'] > 0 AND ( is_array( $this->my_topics_read ) and count( $this->my_topics_read ) ) ) - { - $this->ipsclass->vars['db_topic_read_cutoff'] = $count['min_last_post'] - 1; - $this->my_topics_read = array_filter( $this->my_topics_read, array( 'ipsclass', "array_filter_clean_read_topics" ) ); - $save_array['marker_topics_read'] = serialize( $this->my_topics_read ); - } - - //----------------------------------------- - // Else, mark as read - //----------------------------------------- - - else - { - $save_array['marker_topics_read'] = serialize( array() ); - $save_array['marker_last_cleared'] = time(); - $save_array['marker_unread'] = 0; - } - } - else - { - $save_array['marker_topics_read'] = serialize($this->my_topics_read); - } - - //----------------------------------------- - // Update this topic... - //----------------------------------------- - - $save_array['marker_last_update'] = time(); - - if ( $this->db_row['marker_forum_id'] ) - { - $this->ipsclass->DB->do_shutdown_update( 'topic_markers', $save_array, 'marker_member_id='.$this->ipsclass->member['id'].' AND marker_forum_id='.$this->forum['id'] ); - } - else - { - // Better safe than sorry - been seeing a lot of SQL errors popping up about the dup unique key - - $check = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'marker_forum_id', 'from' => 'topic_markers', 'where' => 'marker_member_id='.$this->ipsclass->member['id'].' AND marker_forum_id='.$this->forum['id'] ) ); - - if( !$check['marker_forum_id'] ) - { - $save_array['marker_member_id'] = $this->ipsclass->member['id']; - $save_array['marker_forum_id'] = $this->forum['id']; - - $this->ipsclass->DB->do_shutdown_insert( 'topic_markers', $save_array ); - } - else - { - $this->ipsclass->DB->do_shutdown_update( 'topic_markers', $save_array, 'marker_member_id='.$this->ipsclass->member['id'].' AND marker_forum_id='.$this->forum['id'] ); - } - } - } - } - - //----------------------------------------- - // If this forum is a link, then - // redirect them to the new location - //----------------------------------------- - - if ( $this->topic['state'] == 'link' ) - { - $f_stuff = explode("&", $this->topic['moved_to']); - $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['topic_moved'], "showtopic={$f_stuff[0]}" ); - } - - //----------------------------------------- - // If this is a sub forum, we need to get - // the cat details, and parent details - //----------------------------------------- - - $this->nav = $this->ipsclass->forums->forums_breadcrumb_nav( $this->forum['id'] ); - - //----------------------------------------- - // Are we a moderator? - //----------------------------------------- - - if ( ($this->ipsclass->member['id']) and ($this->ipsclass->member['g_is_supmod'] != 1) ) - { - $other_mgroups = array(); - - if( $this->ipsclass->member['mgroup_others'] ) - { - $other_mgroups = explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ); - } - - $other_mgroups[] = $this->ipsclass->member['mgroup']; - - $mgroups = implode( ",", $other_mgroups ); - - $this->ipsclass->DB->cache_add_query('topics_check_for_mod', array( 'fid' => $this->forum['id'], 'mid' => $this->ipsclass->member['id'], 'gid' => $mgroups ) ); - $this->ipsclass->DB->simple_exec(); - - $this->moderator = $this->ipsclass->DB->fetch_row(); - } - - $this->mod_action = array( 'CLOSE_TOPIC' => '00', - 'OPEN_TOPIC' => '01', - 'MOVE_TOPIC' => '02', - 'DELETE_TOPIC' => '03', - 'EDIT_TOPIC' => '05', - 'PIN_TOPIC' => '15', - 'UNPIN_TOPIC' => '16', - 'UNSUBBIT' => '30', - 'MERGE_TOPIC' => '60', - 'TOPIC_HISTORY' => '90', - ); - - - //----------------------------------------- - // Hi! Light? - //----------------------------------------- - - $hl = (isset($this->ipsclass->input['hl']) AND $this->ipsclass->input['hl']) ? '&hl='.$this->ipsclass->input['hl'] : ''; - - //----------------------------------------- - // If we can see queued topics, add count - //----------------------------------------- - - if ( $this->ipsclass->can_queue_posts($this->forum['id']) ) - { - $this->topic['posts'] += intval( $this->topic['topic_queuedposts'] ); - } - - //----------------------------------------- - // Generate the forum page span links - //----------------------------------------- - - $this->topic['SHOW_PAGES'] - = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => ($this->topic['posts']+1), - 'PER_PAGE' => $this->ipsclass->vars['display_max_posts'], - 'CUR_ST_VAL' => $this->first, - 'L_SINGLE' => "", - 'BASE_URL' => $this->base_url."showtopic=".$this->topic['tid'].$hl, - ) - ); - - if ( ($this->topic['posts'] + 1) > $this->ipsclass->vars['display_max_posts']) - { - $this->topic['go_new'] = $this->ipsclass->compiled_templates['skin_topic']->golastpost_link($this->forum['id'], $this->topic['tid'] ); - } - - - //----------------------------------------- - // Fix up some of the words - //----------------------------------------- - - $this->topic['TOPIC_START_DATE'] = $this->ipsclass->get_date( $this->topic['start_date'], 'LONG' ); - - $this->ipsclass->lang['topic_stats'] = str_replace( "<#START#>", $this->topic['TOPIC_START_DATE'], $this->ipsclass->lang['topic_stats']); - $this->ipsclass->lang['topic_stats'] = str_replace( "<#POSTS#>", $this->topic['posts'] , $this->ipsclass->lang['topic_stats']); - - if ($this->topic['description']) - { - $this->topic['description'] = ', '.$this->topic['description']; - } - - //----------------------------------------- - // Multi Quoting? - //----------------------------------------- - - $this->qpids = $this->ipsclass->my_getcookie('mqtids'); - - //----------------------------------------- - // Multi PIDS? - //----------------------------------------- - - $this->ipsclass->input['selectedpids'] = $this->ipsclass->my_getcookie('modpids'); - $this->ipsclass->input['selectedpidcount'] = 0; - - $this->ipsclass->my_setcookie('modpids', '', 0); - } - -} - + $Date: 2008-03-28 18:08:02 -0400 (Fri, 28 Mar 2008) $ +| > $Revision: 1232 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > Topic display module +| > Module written by Matt Mecham +| > Date started: 18th February 2002 +| +| > Module Version Number: 1.1.0 +| > DBA Checked: Thu 20 May 2004 +| > Quality Checked: Wed 15 Sept. 2004 ++-------------------------------------------------------------------------- +*/ + + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class topics +{ + # Global + var $ipsclass; + + var $output = ""; + var $base_url = ""; + var $html = ""; + var $moderator = array(); + var $forum = array(); + var $topic = array(); + var $mem_titles = array(); + var $mod_action = array(); + var $poll_html = ""; + var $parser = ""; + var $mimetypes = ""; + var $nav_extra = ""; + var $read_array = array(); + var $mod_panel_html = ""; + var $warn_range = 0; + var $warn_done = 0; + + var $md5_check = ""; + var $post_count = 0; + var $cached_members = array(); + var $first_printed = 0; + var $pids = array(); + var $attach_pids = array(); + var $first = ""; + var $qpids = ""; + var $custom_fields = ""; + var $last_read_tid = ""; + + # Permissions + var $can_vote = 0; + var $can_rate = 0; + var $poll_only = 0; + + # Stop E_ALL moaning like an old fish wife + var $class_attach = ''; + + /*-------------------------------------------------------------------------*/ + // + // Our constructor, load words, load skin, print the topic listing + // + /*-------------------------------------------------------------------------*/ + + function auto_run() + { + //----------------------------------------- + // Build all permissions + //----------------------------------------- + + $this->build_permissions(); + + //----------------------------------------- + // Are we just adding a poll vote? + //----------------------------------------- + + if ( isset($this->ipsclass->input['addpoll']) AND $this->ipsclass->input['addpoll'] ) + { + $this->topic_add_vote_to_poll(); + } + + //----------------------------------------- + // INIT module + //----------------------------------------- + + $this->init(); + + //----------------------------------------- + // Are we just adding a rating vote? + //----------------------------------------- + + if ( isset($this->ipsclass->input['addrating']) AND $this->ipsclass->input['addrating'] ) + { + $this->topic_add_vote_to_rating(); + } + + //----------------------------------------- + // Process the topic + //----------------------------------------- + + $this->topic_set_up(); + + //----------------------------------------- + // Which view are we using? + // If mode='show' we're viewing poll results, don't change view mode + //----------------------------------------- + + if ( isset($this->ipsclass->input['mode']) AND $this->ipsclass->input['mode'] AND $this->ipsclass->input['mode'] != 'show' ) + { + $this->topic_view_mode = $this->ipsclass->input['mode']; + $this->ipsclass->my_setcookie( 'topicmode', $this->ipsclass->input['mode'], 1 ); + } + else + { + $this->topic_view_mode = $this->ipsclass->my_getcookie('topicmode'); + } + + if ( ! $this->topic_view_mode ) + { + //----------------------------------------- + // No cookie and no URL + //----------------------------------------- + + $this->topic_view_mode = $this->ipsclass->vars['topicmode_default'] ? $this->ipsclass->vars['topicmode_default'] : 'linear'; + } + + //----------------------------------------- + // VIEWS + //----------------------------------------- + + $mode = $this->ipsclass->my_getcookie( 'topicmode' ); + + $pre = $mode != 'threaded' ? 'st' : 'start'; + + if( $mode == 'threaded' ) + { + $this->ipsclass->vars['display_max_posts'] = $this->ipsclass->vars['threaded_per_page']; + $this->ipsclass->input['st'] = $this->ipsclass->input['start']; + } + + if ( isset($this->ipsclass->input['view']) ) + { + if ($this->ipsclass->input['view'] == 'new') + { + //----------------------------------------- + // Newer + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 'tid', + 'from' => 'topics', + 'where' => "forum_id=".$this->forum['id']." AND approved=1 AND state <> 'link' AND last_post > ".$this->topic['last_post'], + 'order' => 'last_post', + 'limit' => array( 0,1 ) + ) ); + + $this->ipsclass->DB->simple_exec(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + $this->topic = $this->ipsclass->DB->fetch_row(); + + $this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$this->topic['tid']); + } + else + { + $this->ipsclass->Error( array( LEVEL => 1, MSG => 'no_newer') ); + } + } + else if ($this->ipsclass->input['view'] == 'old') + { + //----------------------------------------- + // Older + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 'tid', + 'from' => 'topics', + 'where' => "forum_id=".$this->forum['id']." AND approved=1 AND state <> 'link' AND last_post < ".$this->topic['last_post'], + 'order' => 'last_post DESC', + 'limit' => array( 0,1 ) + ) ); + + $this->ipsclass->DB->simple_exec(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + $this->topic = $this->ipsclass->DB->fetch_row(); + + $this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$this->topic['tid']); + } + else + { + $this->ipsclass->Error( array( LEVEL => 1, MSG => 'no_older') ); + } + } + else if ($this->ipsclass->input['view'] == 'getlastpost') + { + //----------------------------------------- + // Last post + //----------------------------------------- + + $this->return_last_post(); + } + else if ($this->ipsclass->input['view'] == 'getnewpost') + { + //----------------------------------------- + // Newest post + //----------------------------------------- + + $st = 0; + $pid = ""; + + if ( $this->ipsclass->vars['db_topic_read_cutoff'] and $this->ipsclass->member['id'] ) + { + $last_time = (isset($this->my_topics_read[ $this->topic['tid'] ]) AND intval( $this->my_topics_read[ $this->topic['tid'] ] )) ? intval( $this->my_topics_read[ $this->topic['tid'] ] ) : + ( (isset($this->db_row['marker_last_cleared']) AND intval($this->db_row['marker_last_cleared']) ) ? intval( $this->db_row['marker_last_cleared'] ) : + ( (isset( $this->ipsclass->member['members_markers']['board']) AND intval($this->ipsclass->member['members_markers']['board']) ) ? intval($this->ipsclass->member['members_markers']['board']) : 0 ) ); + } + + $last_time = $last_time ? $last_time : $this->ipsclass->input['last_visit']; + + $this->ipsclass->DB->simple_construct( array( 'select' => 'MIN(pid) as pid', + 'from' => 'posts', + 'where' => "queued=0 AND topic_id=".$this->topic['tid']." AND post_date > ".intval($last_time), + 'limit' => array( 0,1 ) + ) ); + + $this->ipsclass->DB->simple_exec(); + + $post = $this->ipsclass->DB->fetch_row(); + + if ( $post['pid'] ) + { + $pid = "&#entry".$post['pid']; + + $query_extra = $this->ipsclass->member['is_mod'] ? '' : ' AND queued=0'; + + $this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(*) as posts', + 'from' => 'posts', + 'where' => "topic_id=".$this->topic['tid']." AND pid <= ".$post['pid'] . $query_extra, + ) ); + + $this->ipsclass->DB->simple_exec(); + + $cposts = $this->ipsclass->DB->fetch_row(); + + if ( (($cposts['posts']) % $this->ipsclass->vars['display_max_posts']) == 0 ) + { + $pages = ($cposts['posts']) / $this->ipsclass->vars['display_max_posts']; + } + else + { + $number = ( ($cposts['posts']) / $this->ipsclass->vars['display_max_posts'] ); + $pages = ceil( $number); + } + + $st = ($pages - 1) * $this->ipsclass->vars['display_max_posts']; + + if( $this->ipsclass->vars['post_order_sort'] == 'desc' ) + { + $st = (ceil(($this->topic['posts']/$this->ipsclass->vars['display_max_posts'])) - $pages) * $this->ipsclass->vars['display_max_posts']; + } + + $this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$this->topic['tid']."&{$pre}={$st}".$pid); + } + else + { + $this->return_last_post(); + } + } + else if ($this->ipsclass->input['view'] == 'findpost') + { + //----------------------------------------- + // Find a post + //----------------------------------------- + + $pid = intval($this->ipsclass->input['p']); + + if ( $pid > 0 ) + { + $sort_value = $pid; + $sort_field = ($this->ipsclass->vars['post_order_column'] == 'pid') ? 'pid' : 'post_date'; + + if($sort_field == 'post_date') + { + $date = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'post_date', + 'from' => 'posts', + 'where' => 'pid=' . $pid, + ) ); + + $sort_value = $date['post_date']; + } + + $query_extra = $this->ipsclass->member['is_mod'] ? '' : ' AND queued=0'; + + $this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(*) as posts', + 'from' => 'posts', + 'where' => "topic_id=".$this->topic['tid']." AND {$sort_field} <=" . intval($sort_value) . $query_extra, + ) ); + + $this->ipsclass->DB->simple_exec(); + + $cposts = $this->ipsclass->DB->fetch_row(); + + if ( (($cposts['posts']) % $this->ipsclass->vars['display_max_posts']) == 0 ) + { + $pages = ($cposts['posts']) / $this->ipsclass->vars['display_max_posts']; + } + else + { + $number = ( ($cposts['posts']) / $this->ipsclass->vars['display_max_posts'] ); + $pages = ceil($number); + } + + $st = ($pages - 1) * $this->ipsclass->vars['display_max_posts']; + + if( $this->ipsclass->vars['post_order_sort'] == 'desc' ) + { + $st = (ceil(($this->topic['posts']/$this->ipsclass->vars['display_max_posts'])) - $pages) * $this->ipsclass->vars['display_max_posts']; + } + + $this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$this->topic['tid']."&{$pre}={$st}&p={$pid}"."&#entry".$pid); + } + else + { + $this->return_last_post(); + } + } + } + + //----------------------------------------- + // UPDATE TOPIC? + //----------------------------------------- + + if ( !isset($this->ipsclass->input['b']) OR !$this->ipsclass->input['b'] ) + { + if ( $this->topic['topic_firstpost'] < 1 ) + { + //-------------------------------------- + // No first topic set - old topic, update + //-------------------------------------- + + $this->ipsclass->DB->simple_construct( array ( + 'select' => 'pid', + 'from' => 'posts', + 'where' => 'topic_id='.$this->topic['tid'].' AND new_topic=1' + ) ); + + $this->ipsclass->DB->simple_exec(); + + $post = $this->ipsclass->DB->fetch_row(); + + if ( ! $post['pid'] ) + { + //----------------------------------------- + // Get first post info + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 'pid', + 'from' => 'posts', + 'where' => "topic_id={$this->topic['tid']}", + 'order' => 'pid ASC', + 'limit' => array(0,1) ) ); + $this->ipsclass->DB->simple_exec(); + + $first_post = $this->ipsclass->DB->fetch_row(); + $post['pid'] = $first_post['pid']; + } + + if ( $post['pid'] ) + { + $this->ipsclass->DB->simple_construct( array ( + 'update' => 'topics', + 'set' => 'topic_firstpost='.$post['pid'], + 'where' => 'tid='.$this->topic['tid'] + ) ); + + $this->ipsclass->DB->simple_exec(); + } + + //-------------------------------------- + // Reload "fixed" topic + //-------------------------------------- + + $this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$this->topic['tid']."&b=1&{$pre}={$this->ipsclass->input['st']}&p={$this->ipsclass->input['p']}"."&#entry".$this->ipsclass->input['p']); + } + } + + $find_pid = $this->ipsclass->input['pid'] == "" ? $this->ipsclass->input['p'] : $this->ipsclass->input['pid']; + + $threaded_pid = $find_pid ? '&pid='.$find_pid : ''; + $linear_pid = $find_pid ? '&view=findpost&p='.$find_pid : ''; + + if ( $this->topic_view_mode == 'threaded' ) + { + $require = 'topic_threaded.php'; + + $this->topic['to_button_threaded'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_on( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=threaded".$threaded_pid, $this->ipsclass->lang['tom_outline'] ); + $this->topic['to_button_standard'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_off( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=linear".$linear_pid, $this->ipsclass->lang['tom_standard'] ); + $this->topic['to_button_linearpl'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_off( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=linearplus".$linear_pid, $this->ipsclass->lang['tom_linear'] ); + + } + else + { + $require = 'topic_linear.php'; + + $this->topic['to_button_threaded'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_off( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=threaded".$threaded_pid, $this->ipsclass->lang['tom_outline'] ); + + if ( $this->topic_view_mode == 'linearplus' ) + { + $this->topic['to_button_standard'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_off( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=linear".$linear_pid, $this->ipsclass->lang['tom_standard'] ); + $this->topic['to_button_linearpl'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_on( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=linearplus".$linear_pid, $this->ipsclass->lang['tom_linear'] ); + } + else + { + $this->topic['to_button_standard'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_on( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=linear".$linear_pid, $this->ipsclass->lang['tom_standard'] ); + $this->topic['to_button_linearpl'] = $this->ipsclass->compiled_templates['skin_topic']->toutline_mode_choice_off( "{$this->ipsclass->base_url}showtopic={$this->topic['tid']}&mode=linearplus".$linear_pid, $this->ipsclass->lang['tom_linear'] ); + } + } + + //----------------------------------------- + // Remove potential [attachmentid= tag in title + //----------------------------------------- + + $this->topic['title'] = str_replace( '[attachmentid=', '[attachmentid=', $this->topic['title'] ); + + //----------------------------------------- + // Load and run lib + //----------------------------------------- + + $_NOW = $this->ipsclass->memory_debug_make_flag(); + + $this->func = $this->ipsclass->load_class( ROOT_PATH . 'sources/lib/func_'.$require, 'topic_display' ); + + $this->func->register_class( $this ); + $this->func->display_topic(); + + unset( $this->cached_members ); + + $this->ipsclass->memory_debug_add( "TOPICS: Parsed Posts - Completed", $_NOW ); + + $this->output .= $this->func->output; + + //----------------------------------------- + // ATTACHMENTS!!! + //----------------------------------------- + + if ( $this->topic['topic_hasattach'] ) + { + if ( ! is_object( $this->class_attach ) ) + { + //----------------------------------------- + // Grab render attach class + //----------------------------------------- + + require_once( ROOT_PATH . 'sources/classes/attach/class_attach.php' ); + $this->class_attach = new class_attach(); + $this->class_attach->ipsclass =& $this->ipsclass; + } + + //----------------------------------------- + // Not got permission to view downloads? + //----------------------------------------- + + if ( $this->ipsclass->check_perms($this->ipsclass->forums->forum_by_id[ $this->topic['forum_id'] ]['download_perms']) === FALSE ) + { + $this->ipsclass->vars['show_img_upload'] = 0; + } + + //----------------------------------------- + // Continue... + //----------------------------------------- + + $this->class_attach->type = 'post'; + $this->class_attach->init(); + + $this->output = $this->class_attach->render_attachments( $this->output, $this->attach_pids ); + } + + //----------------------------------------- + // Do we have a poll? + //----------------------------------------- + + if ( $this->topic['poll_state'] ) + { + $this->output = str_replace( "", $this->parse_poll(), $this->output ); + } + else + { + // Can we start a poll? Is this our topic and is it still open? + + if ( $this->topic['state'] != "closed" AND $this->ipsclass->member['id'] AND $this->ipsclass->member['g_post_polls'] AND $this->forum['allow_poll'] ) + { + if ( + ( ($this->topic['starter_id'] == $this->ipsclass->member['id']) AND ($this->ipsclass->vars['startpoll_cutoff'] > 0) AND ( $this->topic['start_date'] + ($this->ipsclass->vars['startpoll_cutoff'] * 3600) > time() ) ) + OR ( $this->ipsclass->member['g_is_supmod'] == 1 ) + ) + { + $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_topic']->start_poll_link($this->forum['id'], $this->topic['tid']), $this->output ); + } + } + } + + // Still seeing attachment tags? + if ( stristr( $this->output, "[attachmentid=" ) ) + { + $this->output = preg_replace( "#\[attachmentid=(\d+)\]#is", "", $this->output ); + } + + //----------------------------------------- + // Process users active in this forum + //----------------------------------------- + + if ($this->ipsclass->vars['no_au_topic'] != 1) + { + //----------------------------------------- + // Get the users + //----------------------------------------- + + $cut_off = ($this->ipsclass->vars['au_cutoff'] != "") ? $this->ipsclass->vars['au_cutoff'] * 60 : 900; + + $this->ipsclass->DB->cache_add_query( 'topics_get_active_users', + array( 'tid' => $this->topic['tid'], + 'time' => time() - $cut_off, + ) ); + + $this->ipsclass->DB->simple_exec(); + + //----------------------------------------- + // ACTIVE USERS + //----------------------------------------- + + $ar_time = time(); + $cached = array(); + $guests = array(); + $active = array( 'guests' => 0, 'anon' => 0, 'members' => 0, 'names' => ""); + $rows = array( $ar_time => array( 'login_type' => substr($this->ipsclass->member['login_anonymous'],0, 1), + 'running_time' => $ar_time, + 'id' => $this->ipsclass->sess->session_id, + 'location' => 'st', + 'member_id' => $this->ipsclass->member['id'], + 'member_name' => $this->ipsclass->member['members_display_name'], + 'member_group' => $this->ipsclass->member['mgroup'] ) ); + + //----------------------------------------- + // FETCH... + //----------------------------------------- + + while ($r = $this->ipsclass->DB->fetch_row() ) + { + $rows[ $r['running_time'].'.'.$r['id'] ] = $r; + } + + krsort( $rows ); + + //----------------------------------------- + // Is this a root admin in disguise? + // Is that kinda like a diamond in the rough? + //----------------------------------------- + + $our_mgroups = array(); + + if( $this->ipsclass->member['mgroup_others'] ) + { + $our_mgroups = explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ); + } + + $our_mgroups[] = $this->ipsclass->member['mgroup']; + + //----------------------------------------- + // PRINT... + //----------------------------------------- + + foreach( $rows as $result ) + { + $result['member_name'] = $this->ipsclass->make_name_formatted( $result['member_name'], $result['member_group'] ); + + $last_date = $this->ipsclass->get_time( $result['running_time'] ); + + if ($result['member_id'] == 0) + { + if( in_array( $result['id'], $guests ) ) + { + continue; + } + + $active['guests']++; + + $guests[] = $result['id']; + } + else + { + if (empty( $cached[ $result['member_id'] ] ) ) + { + $cached[ $result['member_id'] ] = 1; + + $p_start = ""; + $p_end = ""; + $p_title = " title='".sprintf( $this->ipsclass->lang['au_reading'], $last_date )."' "; + + if ( strstr( $result['location'], 'post' ) and $result['member_id'] != $this->ipsclass->member['id'] ) + { + $p_start = ""; + $p_end = ""; + $p_title = " title='".sprintf( $this->ipsclass->lang['au_posting'], $last_date )."' "; + } + + if ($result['login_type'] == 1) + { + if ( (in_array( $this->ipsclass->vars['admin_group'], $our_mgroups )) and ($this->ipsclass->vars['disable_admin_anon'] != 1) ) + { + $active['names'] .= "{$p_start}{$result['member_name']}*{$p_end}, "; + $active['anon']++; + } + else + { + $active['anon']++; + } + } + else + { + $active['members']++; + $active['names'] .= "{$p_start}{$result['member_name']}{$p_end}, "; + } + } + } + } + + $active['names'] = preg_replace( "/,\s+$/", "" , $active['names'] ); + + $this->ipsclass->lang['active_users_title'] = sprintf( $this->ipsclass->lang['active_users_title'] , ($active['members'] + $active['guests'] + $active['anon'] ) ); + $this->ipsclass->lang['active_users_detail'] = sprintf( $this->ipsclass->lang['active_users_detail'] , $active['guests'],$active['anon'] ); + $this->ipsclass->lang['active_users_members'] = sprintf( $this->ipsclass->lang['active_users_members'], $active['members'] ); + + + $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_topic']->topic_active_users($active), $this->output ); + } + + //----------------------------------------- + // Print it + //----------------------------------------- + + if ( $this->ipsclass->member['is_mod'] ) + { + if( $mod_panel = $this->moderation_panel() ) + { + $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_topic']->mod_panel_wrapper( array( 'TOPIC' => $this->topic, 'FORUM' => $this->forum ), $this->ipsclass->return_md5_check() ), $this->output ); + $this->output = str_replace( "", $mod_panel, $this->output ); + } + } + else + { + $this->output = str_replace( "", $this->moderation_panel(), $this->output ); + } + + //----------------------------------------- + // Get the reply, and posting buttons + //----------------------------------------- + + $this->topic['REPLY_BUTTON'] = $this->reply_button(); + + //----------------------------------------- + // Enable quick reply box? + //----------------------------------------- + + if ( ( $this->forum['quick_reply'] == 1 ) + and ( $this->ipsclass->check_perms( $this->forum['reply_perms']) == TRUE ) + and ( $this->topic['state'] != 'closed' ) + and ( ! $this->poll_only ) ) + { + $show = "none"; + + $sqr = isset($this->ipsclass->member['_cache']['qr_open']) ? $this->ipsclass->member['_cache']['qr_open'] : 0; + + if ( $sqr == 1 ) + { + $show = "show"; + } + + $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_topic']->quick_reply_box_closed(), $this->output ); + $this->output = str_replace( "" , $this->ipsclass->compiled_templates['skin_topic']->quick_reply_box_open($this->topic['forum_id'], $this->topic['tid'], $show, $this->md5_check), $this->output ); + } + + $this->topic['id'] = $this->topic['forum_id']; + + $this->output = str_replace( "", $this->ipsclass->print_forum_rules($this->forum), $this->output ); + + //----------------------------------------- + // Topic multi-moderation - yay! + //----------------------------------------- + + $this->output = str_replace( "", $this->multi_moderation(), $this->output ); + + // Pass it to our print routine + + $this->ipsclass->print->add_output( $this->output ); + $this->ipsclass->print->do_output( array( 'TITLE' => $this->topic['title'] . ' - ' . $this->ipsclass->vars['board_name'], + 'JS' => $this->ipsclass->compiled_templates['skin_global']->get_rte_css(), + 'NAV' => $this->nav, + ) ); + + } + + /*-------------------------------------------------------------------------*/ + // Parse post + /*-------------------------------------------------------------------------*/ + + function parse_row( $row = array() ) + { + //----------------------------------------- + // Memory Debug + //----------------------------------------- + + $_NOW = $this->ipsclass->memory_debug_make_flag(); + $poster = array(); + + //----------------------------------------- + // Cache member + //----------------------------------------- + + if ($row['author_id'] != 0) + { + //----------------------------------------- + // Is it in the hash? + //----------------------------------------- + + if ( isset($this->cached_members[ $row['author_id'] ]) ) + { + //----------------------------------------- + // Ok, it's already cached, read from it + //----------------------------------------- + + $poster = $this->cached_members[ $row['author_id'] ]; + $row['name_css'] = 'normalname'; + } + else + { + $row['name_css'] = 'normalname'; + + $this->ipsclass->topic =& $this->topic; + $poster = $this->ipsclass->parse_member( $row, 1, 'skin_topic' ); + + //----------------------------------------- + // Add it to the cached list + //----------------------------------------- + + $this->cached_members[ $row['author_id'] ] = $poster; + } + } + else + { + //----------------------------------------- + // It's definitely a guest... + //----------------------------------------- + + $poster = $this->ipsclass->set_up_guest( $row['author_name'] ); + $poster['members_display_name'] = $this->ipsclass->vars['guest_name_pre'] . $row['author_name'] . $this->ipsclass->vars['guest_name_suf']; + $poster['_members_display_name'] = $this->ipsclass->vars['guest_name_pre'] . $row['author_name'] . $this->ipsclass->vars['guest_name_suf']; + $poster['custom_fields'] = ""; + $poster['warn_text'] = ""; + $poster['warn_minus'] = ""; + $poster['warn_img'] = ""; + $poster['warn_add'] = ""; + $poster['addresscard'] = ""; + $poster['message_icon'] = ""; + $poster['email_icon'] = ""; + $row['name_css'] = 'unreg'; + } + + # Memory Debug + $this->ipsclass->memory_debug_add( "PID: ".$row['pid'] . " - Member Parsed", $_NOW ); + + //----------------------------------------- + // Queued + //----------------------------------------- + + if ( $row['queued'] or ($this->topic['topic_firstpost'] == $row['pid'] and $this->topic['approved'] != 1) ) + { + $row['post_css'] = $this->post_count % 2 ? 'post1shaded' : 'post2shaded'; + $row['altrow'] = 'row4shaded'; + } + else + { + $row['post_css'] = $this->post_count % 2 ? 'post1' : 'post2'; + $row['altrow'] = 'row4'; + } + + //----------------------------------------- + // Edit... + //----------------------------------------- + + $row['edit_by'] = ""; + + if ( ($row['append_edit'] == 1) and ($row['edit_time'] != "") and ($row['edit_name'] != "") ) + { + $e_time = $this->ipsclass->get_date( $row['edit_time'] , 'LONG' ); + + $row['edit_by'] = $this->ipsclass->compiled_templates['skin_topic']->edited_by( sprintf($this->ipsclass->lang['edited_by'], $row['edit_name'], $e_time) ); + } + + //----------------------------------------- + // View image... + //----------------------------------------- + + if ( ! $this->ipsclass->member['view_img'] ) + { + //----------------------------------------- + // unconvert smilies first, or it looks a bit crap. + //----------------------------------------- + + $row['post'] = preg_replace( "#.+?#", "\\1" , $row['post'] ); + + $row['post'] = preg_replace( "//", "(IMG:\\1) ", $row['post'] ); + } + + //----------------------------------------- + // Highlight... + //----------------------------------------- + + if ( isset($this->ipsclass->input['hl']) AND $this->ipsclass->input['hl'] ) + { + $row['post'] = $this->ipsclass->content_search_highlight( $row['post'], $this->ipsclass->input['hl'] ); + } + + //----------------------------------------- + // Multi Quoting? + //----------------------------------------- + + $row['mq_start_image'] = $this->ipsclass->compiled_templates['skin_topic']->mq_image_add($row['pid']); + + if ( $this->qpids ) + { + if ( strstr( ','.$this->qpids.',', ','.$row['pid'].',' ) ) + { + $row['mq_start_image'] = $this->ipsclass->compiled_templates['skin_topic']->mq_image_remove($row['pid']); + } + } + + //----------------------------------------- + // Multi PIDS? + //----------------------------------------- + + if ( $this->ipsclass->member['is_mod'] ) + { + $row['pid_start_image'] = $this->ipsclass->compiled_templates['skin_topic']->pid_image_unselected($row['pid']); + + if ( $this->ipsclass->input['selectedpids'] ) + { + if ( strstr( ','.$this->ipsclass->input['selectedpids'].',', ','.$row['pid'].',' ) ) + { + $row['pid_start_image'] = $this->ipsclass->compiled_templates['skin_topic']->pid_image_selected($row['pid']); + } + + $this->ipsclass->input['selectedpidcount'] = count( explode( ",", $this->ipsclass->input['selectedpids'] ) ); + + } + } + + //----------------------------------------- + // Delete button.. + //----------------------------------------- + + $row['delete_button'] = $row['pid'] != $this->topic['topic_firstpost'] + ? $this->delete_button($row['pid'], $poster) + : ''; + + $row['edit_button'] = $this->edit_button($row['pid'], $poster, $row['post_date']); + + $row['post_date'] = $this->ipsclass->get_date( $row['post_date'], 'LONG' ); + + $row['post_icon'] = $row['icon_id'] + ? $this->ipsclass->compiled_templates['skin_topic']->post_icon( $row['icon_id'] ) + : ''; + + $row['ip_address'] = $this->view_ip($row, $poster); + + $row['report_link'] = (($this->ipsclass->vars['disable_reportpost'] != 1) and ( $this->ipsclass->member['id'] )) + ? $this->ipsclass->compiled_templates['skin_topic']->report_link($row) + : ''; + + //----------------------------------------- + // Siggie stuff + //----------------------------------------- + + $row['signature'] = ""; + + if (isset($poster['signature']) AND $poster['signature'] AND $this->ipsclass->member['view_sigs']) + { + if ($row['use_sig'] == 1) + { + $row['signature'] = $this->ipsclass->compiled_templates['skin_global']->signature_separator( $poster['signature'] ); + } + } + + //----------------------------------------- + // Fix up the membername so it links to the members profile + //----------------------------------------- + + if ( $poster['id'] ) + { + $poster['_members_display_name'] = "{$poster['members_display_name_short']}"; + } + + //----------------------------------------- + // Post number + //----------------------------------------- + + if ( $this->topic_view_mode == 'linearplus' and $this->topic['topic_firstpost'] == $row['pid']) + { + $row['post_count'] = 1; + + if ( ! $this->first ) + { + $this->post_count++; + } + } + else + { + $this->post_count++; + + $row['post_count'] = intval($this->ipsclass->input['st']) + $this->post_count; + } + + $row['forum_id'] = $this->topic['forum_id']; + + //----------------------------------------- + // Memory Debug + //----------------------------------------- + + $this->ipsclass->memory_debug_add( "PID: ".$row['pid']. " - Completed", $_NOW ); + + return array( 'row' => $row, 'poster' => $poster ); + } + + /*-------------------------------------------------------------------------*/ + // Parse the member info + /*-------------------------------------------------------------------------*/ + + function parse_member( $member=array() ) + { + return $this->ipsclass->parse_member( $member, 'skin_topic' ); + } + + /*-------------------------------------------------------------------------*/ + // Render the delete button + /*-------------------------------------------------------------------------*/ + + function delete_button($post_id, $poster) + { + if ($this->ipsclass->member['id'] == "" or $this->ipsclass->member['id'] == 0) + { + return ""; + } + + $button = $this->ipsclass->compiled_templates['skin_topic']->button_delete($this->forum['id'],$this->topic['tid'],$post_id,$this->md5_check ); + + if ($this->ipsclass->member['g_is_supmod']) return $button; + if ($this->moderator['delete_post']) return $button; + if ($poster['id'] == $this->ipsclass->member['id'] and ($this->ipsclass->member['g_delete_own_posts'])) return $button; + return ""; + } + + /*-------------------------------------------------------------------------*/ + // Render the edit button + /*-------------------------------------------------------------------------*/ + + function edit_button($post_id, $poster, $post_date) + { + if ($this->ipsclass->member['id'] == "" or $this->ipsclass->member['id'] == 0) + { + return ""; + } + + $button = $this->ipsclass->compiled_templates['skin_topic']->button_edit( $this->forum['id'],$this->topic['tid'],$post_id ); + + if ($this->ipsclass->member['g_is_supmod']) return $button; + + if ($this->moderator['edit_post']) return $button; + + if ($poster['id'] == $this->ipsclass->member['id'] and ($this->ipsclass->member['g_edit_posts'])) + { + // Have we set a time limit? + + if ($this->ipsclass->member['g_edit_cutoff'] > 0) + { + if ( $post_date > ( time() - ( intval($this->ipsclass->member['g_edit_cutoff']) * 60 ) ) ) + { + return $button; + } + else + { + return ""; + } + } + else + { + return $button; + } + } + + return ""; + } + + /*-------------------------------------------------------------------------*/ + // Render the reply button + /*-------------------------------------------------------------------------*/ + + function reply_button() + { + if ($this->topic['state'] == 'closed' OR ($this->topic['poll_state'] AND $this->poll_only ) ) + { + // Do we have the ability to post in + // closed topics or is this a poll only? + + if ($this->ipsclass->member['g_post_closed'] == 1) + { + $replace = $this->ipsclass->compiled_templates['skin_topic']->button_posting( "{$this->ipsclass->base_url}act=post&do=reply_post&f=".$this->forum['id']."&t=".$this->topic['tid'], "<{A_LOCKED_B}>" ); + } + else + { + $replace = "<{A_LOCKED_B}>"; + } + } + else + { + if ( $this->topic['state'] == 'moved' ) + { + $replace = "<{A_MOVED_B}>"; + } + else + { + $replace = $this->ipsclass->compiled_templates['skin_topic']->button_posting( "{$this->ipsclass->base_url}act=post&do=reply_post&f=".$this->forum['id']."&t=".$this->topic['tid'], "<{A_REPLY}>" ); + } + } + + $this->output = str_replace( "", $replace, $this->output ); + } + + /*-------------------------------------------------------------------------*/ + // Render the IP address + /*-------------------------------------------------------------------------*/ + + function view_ip($row, $poster) + { + if ($this->ipsclass->member['g_is_supmod'] != 1 && ( !isset($this->moderator['view_ip']) OR $this->moderator['view_ip'] != 1 ) ) + { + return ""; + } + else + { + $row['ip_address'] = $poster['mgroup'] == $this->ipsclass->vars['admin_group'] + ? $this->ipsclass->compiled_templates['skin_topic']->ip_admin_hide() + : $this->ipsclass->compiled_templates['skin_topic']->ip_admin_show( $row['ip_address'] ); + return $this->ipsclass->compiled_templates['skin_topic']->ip_show($row['ip_address']); + } + } + + /*-------------------------------------------------------------------------*/ + // Render the topic multi-moderation + /*-------------------------------------------------------------------------*/ + + function multi_moderation() + { + $mm_html = ""; + + $mm_array = $this->ipsclass->get_multimod( $this->forum['id'] ); + + //----------------------------------------- + // Print and show + //----------------------------------------- + + if ( is_array( $mm_array ) and count( $mm_array ) ) + { + foreach( $mm_array as $m ) + { + $mm_html .= $this->ipsclass->compiled_templates['skin_topic']->mm_entry( $m[0], $m[1] ); + } + } + + if ( $mm_html ) + { + $mm_html = $this->ipsclass->compiled_templates['skin_topic']->mm_start($this->topic['tid']) . $mm_html . $this->ipsclass->compiled_templates['skin_topic']->mm_end(); + } + + return $mm_html; + } + + /*-------------------------------------------------------------------------*/ + // Render the moderator links + /*-------------------------------------------------------------------------*/ + + function moderation_panel() + { + $mod_links = ""; + + if (!isset($this->ipsclass->member['id'])) return ""; + + $skcusgej = 0; + + if ($this->ipsclass->member['id'] == $this->topic['starter_id']) + { + $skcusgej = 1; + } + + if ($this->ipsclass->member['g_is_supmod'] == 1) + { + $skcusgej = 1; + } + + if ( isset($this->moderator['mid']) AND $this->moderator['mid'] != "" ) + { + $skcusgej = 1; + } + + if ( $skcusgej == 0 ) + { + return ""; + } + + //----------------------------------------- + // Add on approve/unapprove topic fing + //----------------------------------------- + + if ( $this->ipsclass->can_queue_posts( $this->forum['id'] ) ) + { + if ( $this->topic['approved'] != 1 ) + { + $mod_links .= $this->ipsclass->compiled_templates['skin_topic']->mod_wrapper('topic_approve', $this->ipsclass->lang[ 'cpt_approvet' ]); + } + else + { + $mod_links .= $this->ipsclass->compiled_templates['skin_topic']->mod_wrapper('topic_unapprove', $this->ipsclass->lang[ 'cpt_unapprovet' ]); + } + } + + $actions = array( 'MOVE_TOPIC', 'CLOSE_TOPIC', 'OPEN_TOPIC', 'DELETE_TOPIC', 'EDIT_TOPIC', 'PIN_TOPIC', 'UNPIN_TOPIC', 'MERGE_TOPIC', 'UNSUBBIT' ); + + foreach( $actions as $key ) + { + if ($this->ipsclass->member['g_is_supmod']) + { + $mod_links .= $this->append_link($key); + } + elseif ( isset($this->moderator['mid']) AND $this->moderator['mid']) + { + if ($key == 'MERGE_TOPIC' or $key == 'SPLIT_TOPIC') + { + if ($this->moderator['split_merge'] == 1) + { + $mod_links .= $this->append_link($key); + } + } + else if ( isset($this->moderator[ strtolower($key) ]) AND $this->moderator[ strtolower($key) ] ) + { + $mod_links .= $this->append_link($key); + } + + // What if member is a mod, but doesn't have these perms as a mod? + + elseif ($key == 'OPEN_TOPIC' or $key == 'CLOSE_TOPIC') + { + if ($this->ipsclass->member['g_open_close_posts']) + { + $mod_links .= $this->append_link($key); + } + } + elseif ($key == 'DELETE_TOPIC') + { + if ($this->ipsclass->member['g_delete_own_topics']) + { + $mod_links .= $this->append_link($key); + } + } + } + elseif ($key == 'OPEN_TOPIC' or $key == 'CLOSE_TOPIC') + { + if ($this->ipsclass->member['g_open_close_posts']) + { + $mod_links .= $this->append_link($key); + } + } + elseif ($key == 'DELETE_TOPIC') + { + if ($this->ipsclass->member['g_delete_own_topics']) + { + $mod_links .= $this->append_link($key); + } + } + } + + if ($this->ipsclass->member['g_access_cp'] == 1) + { + $mod_links .= $this->append_link('TOPIC_HISTORY'); + } + + if ($mod_links != "") + { + return $this->ipsclass->compiled_templates['skin_topic']->Mod_Panel($mod_links, $this->forum['id'], $this->topic['tid'], $this->md5_check); + + } + else + { + return ""; + } + + } + + /*-------------------------------------------------------------------------*/ + // Append mod links + /*-------------------------------------------------------------------------*/ + + function append_link( $key="" ) + { + if ($key == "") return ""; + + if ($this->topic['state'] == 'open' and $key == 'OPEN_TOPIC') return ""; + if ($this->topic['state'] == 'closed' and $key == 'CLOSE_TOPIC') return ""; + if ($this->topic['state'] == 'moved' and ($key == 'CLOSE_TOPIC' or $key == 'MOVE_TOPIC')) return ""; + if ($this->topic['pinned'] == 1 and $key == 'PIN_TOPIC') return ""; + if ($this->topic['pinned'] == 0 and $key == 'UNPIN_TOPIC') return ""; + + ++$this->colspan; + + return $this->ipsclass->compiled_templates['skin_topic']->mod_wrapper($this->mod_action[$key], $this->ipsclass->lang[ $key ]); + } + + /*-------------------------------------------------------------------------*/ + // Process and parse the poll + /*-------------------------------------------------------------------------*/ + + function parse_poll() + { + $html = ""; + $check = 0; + $poll_footer = ""; + + $this->ipsclass->load_template('skin_poll'); + + //----------------------------------------- + // Get the poll information... + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', + 'from' => 'polls', + 'where' => "tid=".$this->topic['tid'] + ) ); + + $this->ipsclass->DB->simple_exec(); + + $poll_data = $this->ipsclass->DB->fetch_row(); + + //----------------------------------------- + // check we have a poll + //----------------------------------------- + + if ( ! $poll_data['pid'] ) + { + return; + } + + //----------------------------------------- + // Do we have a poll question? + //----------------------------------------- + + if ( ! $poll_data['poll_question'] ) + { + $poll_data['poll_question'] = $this->topic['title']; + } + + //----------------------------------------- + // Poll only? + //----------------------------------------- + + if( $poll_data['poll_only'] == 1 ) + { + $this->poll_only = 1; + } + + //----------------------------------------- + // Show the poll + //----------------------------------------- + + $member_voted = 0; + $total_votes = 0; + + //----------------------------------------- + // Have we voted in this poll? + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 'member_id', + 'from' => 'voters', + 'where' => "tid=".$this->topic['tid'] + ) ); + + $this->ipsclass->DB->simple_exec(); + + while( $voter = $this->ipsclass->DB->fetch_row() ) + { + $total_votes++; + + if( $voter['member_id'] == $this->ipsclass->member['id'] ) + { + $member_voted = 1; + } + } + + //----------------------------------------- + // Can we vote again? + //----------------------------------------- + + if ( $member_voted ) + { + $check = 1; + $poll_footer = $this->ipsclass->lang['poll_you_voted']; + } + + if ( ($poll_data['starter_id'] == $this->ipsclass->member['id']) and ($this->ipsclass->vars['allow_creator_vote'] != 1) ) + { + $check = 1; + $poll_footer = $this->ipsclass->lang['poll_you_created']; + } + + if ( ! $this->ipsclass->member['id'] ) + { + if ( !$this->ipsclass->vars['allow_result_view'] ) + { + $check = 2; + } + else + { + $check = 1; + } + + $poll_footer = $this->ipsclass->lang['poll_no_guests']; + } + + //----------------------------------------- + // is the topic locked? + //----------------------------------------- + + if ( $this->topic['state'] == 'closed' ) + { + $check = 1; + $poll_footer = ' '; + } + + //----------------------------------------- + // Can we see the poll before voting? + //----------------------------------------- + + if ( $this->ipsclass->vars['allow_result_view'] == 1 ) + { + if ( $this->ipsclass->input['mode'] == 'show' ) + { + $check = 1; + $poll_footer = ""; + } + } + + //----------------------------------------- + // Stop the parser killing images + // 'cos there are too many + //----------------------------------------- + + $tmp_max_images = $this->ipsclass->vars['max_images']; + $this->ipsclass->vars['max_images'] = 0; + + if ( $check == 1 ) + { + if( !is_object( $this->parser ) ) + { + //----------------------------------------- + // Load and config the post parser + //----------------------------------------- + + $_load = $this->ipsclass->memory_debug_make_flag(); + + require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); + $this->parser = new parse_bbcode(); + $this->parser->ipsclass = $this->ipsclass; + $this->parser->allow_update_caches = 1; + + $this->parser->bypass_badwords = intval($this->ipsclass->member['g_bypass_badwords']); + + $this->ipsclass->memory_debug_add( "TOPIC: Loaded han_parse_bbcode.php", $_load ); + } + + //----------------------------------------- + // Show the results + //----------------------------------------- + + $html = $this->ipsclass->compiled_templates['skin_poll']->poll_header( $this->topic['tid'], $poll_data['poll_question'] ); + $poll_answers = unserialize(stripslashes($poll_data['choices'])); + + reset($poll_answers); + + foreach ( $poll_answers as $id => $data ) + { + //----------------------------------------- + // Get the question + //----------------------------------------- + + $question = $data['question']; + $choice_html = ""; + $tv_poll = 0; + + # Get total votes for this question + foreach( $poll_answers[ $id ]['votes'] as $number) + { + $tv_poll += intval( $number ); + } + + //----------------------------------------- + // Get the choices for this question + //----------------------------------------- + + foreach( $data['choice'] as $choice_id => $text ) + { + $choice = $text; + + # Get total votes for this question -> choice + $votes = intval($data['votes'][ $choice_id ]); + + if ( strlen($choice) < 1 ) + { + continue; + } + + if ( $this->ipsclass->vars['poll_tags'] ) + { + $choice = $this->parser->parse_poll_tags($choice); + } + + $percent = $votes == 0 ? 0 : $votes / $tv_poll * 100; + $percent = sprintf( '%.2f' , $percent ); + $width = $percent > 0 ? intval($percent * 2) : 0; + + $choice_html .= $this->ipsclass->compiled_templates['skin_poll']->poll_show_rendered_choice($choice_id, $votes, $id, $choice, $percent, $width); + } + + //----------------------------------------- + // Add HTML together + //----------------------------------------- + + $html .= $this->ipsclass->compiled_templates['skin_poll']->poll_show_rendered_question( $id, $question, $choice_html ); + } + + $html .= $this->ipsclass->compiled_templates['skin_poll']->show_total_votes($total_votes); + } + else if ( $check == 2 ) + { + // Guest viewing poll results, but show results before voting is not allowed + + $html = $this->ipsclass->compiled_templates['skin_poll']->poll_header($this->topic['tid'], $poll_data['poll_question']); + $html .= $this->ipsclass->compiled_templates['skin_poll']->poll_show_no_guest_view( ); + $html .= $this->ipsclass->compiled_templates['skin_poll']->show_total_votes($total_votes); + } + else + { + //----------------------------------------- + // Load and config the post parser + //----------------------------------------- + + $_load = $this->ipsclass->memory_debug_make_flag(); + + require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); + $this->parser = new parse_bbcode(); + $this->parser->ipsclass = $this->ipsclass; + $this->parser->allow_update_caches = 1; + + $this->parser->bypass_badwords = intval($this->ipsclass->member['g_bypass_badwords']); + + $this->ipsclass->memory_debug_add( "TOPIC: Loaded han_parse_bbcode.php", $_load ); + + $poll_answers = unserialize(stripslashes($poll_data['choices'])); + reset($poll_answers); + + //----------------------------------------- + // Show poll form + //----------------------------------------- + + $html = $this->ipsclass->compiled_templates['skin_poll']->poll_header($this->topic['tid'], $poll_data['poll_question']); + + foreach ( $poll_answers as $id => $data ) + { + //----------------------------------------- + // Get the question + //----------------------------------------- + + $question = $data['question']; + $choice_html = ""; + + //----------------------------------------- + // Get the choices for this question + //----------------------------------------- + + foreach( $data['choice'] as $choice_id => $text ) + { + $choice = $text; + $votes = intval($data['votes'][ $choice_id ]); + + //$total_votes += $votes; + + if ( strlen($choice) < 1 ) + { + continue; + } + + if ($this->ipsclass->vars['poll_tags']) + { + $choice = $this->parser->parse_poll_tags($choice); + } + + if( isset($data['multi']) AND $data['multi'] == 1 ) + { + $choice_html .= $this->ipsclass->compiled_templates['skin_poll']->poll_show_form_choice_multi($choice_id, $votes, $id, $choice); + } + else + { + $choice_html .= $this->ipsclass->compiled_templates['skin_poll']->poll_show_form_choice($choice_id, $votes, $id, $choice); + } + } + + //----------------------------------------- + // Add HTML together + //----------------------------------------- + + $html .= $this->ipsclass->compiled_templates['skin_poll']->poll_show_form_question( $id, $question, $choice_html ); + } + + $html .= $this->ipsclass->compiled_templates['skin_poll']->show_total_votes($total_votes); + } + + $html .= $this->ipsclass->compiled_templates['skin_poll']->poll_footer(); + + if ( $poll_footer != "" ) + { + //----------------------------------------- + // Already defined.. + //----------------------------------------- + + $html = str_replace( "", $poll_footer, $html ); + } + else + { + //----------------------------------------- + // Not defined.. + //----------------------------------------- + + if ( $this->ipsclass->vars['allow_result_view'] == 1 ) + { + if ( $this->ipsclass->input['mode'] == 'show' ) + { + // We are looking at results.. + + $html = str_replace( "", $this->ipsclass->compiled_templates['skin_poll']->button_show_voteable(), $html ); + } + else + { + $html = str_replace( "", $this->ipsclass->compiled_templates['skin_poll']->button_show_results(), $html ); + $html = str_replace( "", $this->ipsclass->compiled_templates['skin_poll']->button_vote(), $html ); + } + } + else + { + //----------------------------------------- + // Do not allow result viewing + //----------------------------------------- + + $html = str_replace( "", $this->ipsclass->compiled_templates['skin_poll']->button_vote(), $html ); + $html = str_replace( "", $this->ipsclass->compiled_templates['skin_poll']->button_null_vote(), $html ); + } + } + + $this->ipsclass->vars['max_images'] = $tmp_max_images; + + return $html; + } + + /*-------------------------------------------------------------------------*/ + // Build topic permissions + /*-------------------------------------------------------------------------*/ + + function build_permissions() + { + //----------------------------------------- + // Polls + //----------------------------------------- + + $this->can_vote = intval( $this->ipsclass->member['g_vote_polls'] ); + + //----------------------------------------- + // Topic rating: Rating + //----------------------------------------- + + if ( $this->ipsclass->member['id'] ) + { + $this->can_rate = intval( $this->ipsclass->member['g_topic_rate_setting'] ); + } + else + { + $this->can_rate = 0; + } + } + + /*-------------------------------------------------------------------------*/ + // Add vote to rating + /*-------------------------------------------------------------------------*/ + + function topic_add_vote_to_rating() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $topic_id = intval($this->ipsclass->input['t']); + $rating_id = intval($this->ipsclass->input['rating']); + $vote_cast = array(); + + $this->ipsclass->load_language('lang_topic'); + + //----------------------------------------- + // Permissions check + //----------------------------------------- + + if ( ! $this->forum['forum_allow_rating'] ) + { + $this->can_rate = 0; + } + + if ( ! $this->can_rate ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'topic_rate_no_perm') ); + } + + //----------------------------------------- + // Make sure we have a valid poll id + //----------------------------------------- + + if ( ! $topic_id ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files') ); + } + + //----------------------------------------- + // No topic? + //----------------------------------------- + + if ( ! $this->topic['tid'] ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'topic_rate_no_perm') ); + } + + //----------------------------------------- + // Locked topic? + //----------------------------------------- + + if ( $this->topic['state'] != 'open' ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'locked_topic') ); + } + + //----------------------------------------- + // Sneaky members rating topic more than 5? + //----------------------------------------- + + if( $rating_id > 5 ) + { + $rating_id = 5; + } + + if( $rating_id < 0 ) + { + $rating_id = 0; + } + + //----------------------------------------- + // Have we rated before? + //----------------------------------------- + + $rating = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'topic_ratings', 'where' => "rating_tid={$this->topic['tid']} and rating_member_id=".$this->ipsclass->member['id'] ) ); + + //----------------------------------------- + // Already rated? + //----------------------------------------- + + if ( $rating['rating_id'] ) + { + //----------------------------------------- + // Do we allow re-ratings? + //----------------------------------------- + + if ( $this->ipsclass->member['g_topic_rate_setting'] == 2 ) + { + if ( $rating_id != $rating['rating_value'] ) + { + $new_rating = $rating_id - $rating['rating_value']; + + $this->ipsclass->DB->do_update( 'topic_ratings', array( 'rating_value' => $rating_id ), 'rating_id='.$rating['rating_id'] ); + + $this->ipsclass->DB->do_update( 'topics', array( 'topic_rating_total' => intval($this->topic['topic_rating_total']) + $new_rating ), 'tid='.$this->topic['tid'] ); + } + + $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['topic_rating_changed'] , "showtopic={$this->topic['tid']}&st={$this->ipsclass->input['st']}" ); + } + else + { + $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['topic_rated_already'] , "showtopic={$this->topic['tid']}&st={$this->ipsclass->input['st']}" ); + exit(); + } + } + + //----------------------------------------- + // NEW RATING! + //----------------------------------------- + + else + { + $this->ipsclass->DB->do_insert( 'topic_ratings', array( 'rating_tid' => $this->topic['tid'], + 'rating_member_id' => $this->ipsclass->member['id'], + 'rating_value' => $rating_id, + 'rating_ip_address' => $this->ipsclass->ip_address ) ); + + $this->ipsclass->DB->do_update( 'topics', array( 'topic_rating_hits' => intval($this->topic['topic_rating_hits']) + 1, + 'topic_rating_total' => intval($this->topic['topic_rating_total']) + $rating_id ), 'tid='.$this->topic['tid'] ); + } + + $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['topic_rating_done'] , "showtopic={$this->topic['tid']}&st={$this->ipsclass->input['st']}" ); + } + + /*-------------------------------------------------------------------------*/ + // Add vote to poll + /*-------------------------------------------------------------------------*/ + + function topic_add_vote_to_poll() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $topic_id = intval($this->ipsclass->input['t']); + $vote_cast = array(); + + $this->ipsclass->load_language('lang_topic'); + + //----------------------------------------- + // Permissions check + //----------------------------------------- + + if ( ! $this->can_vote ) + { + $this->ipsclass->Error( array( LEVEL => 1, MSG => 'no_reply_polls') ); + } + + //----------------------------------------- + // Make sure we have a valid poll id + //----------------------------------------- + + if ( ! $topic_id ) + { + $this->ipsclass->Error( array( LEVEL => 1, MSG => 'missing_files') ); + } + + //----------------------------------------- + // Load the topic and poll + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'poll_get_poll_with_topic', array( 'tid' => $topic_id ) ); + $this->ipsclass->DB->cache_exec_query(); + + $this->topic = $this->ipsclass->DB->fetch_row(); + + //----------------------------------------- + // No topic? + //----------------------------------------- + + if ( ! $this->topic['tid'] ) + { + $this->ipsclass->Error( array( LEVEL => 1, MSG => 'poll_none_found') ); + } + + //----------------------------------------- + // Locked topic? + //----------------------------------------- + + if ( $this->topic['state'] != 'open' ) + { + $this->ipsclass->Error( array( LEVEL => 1, MSG => 'locked_topic') ); + } + + //----------------------------------------- + // Have reply permissions?? + //----------------------------------------- + + if ( $this->ipsclass->check_perms( $this->ipsclass->cache['forum_cache'][ $this->topic['forum_id'] ]['reply_perms'] ) == FALSE ) + { + $this->ipsclass->Error( array( 'LEVEL' => '1', 'MSG' => 'no_replies') ); + } + + //----------------------------------------- + // Have we voted before? + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 'member_id', 'from' => 'voters', 'where' => "tid={$this->topic['tid']} and member_id=".$this->ipsclass->member['id'] ) ); + $this->ipsclass->DB->simple_exec(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + $this->ipsclass->Error( array( LEVEL => 1, MSG => 'poll_you_voted') ); + } + + //----------------------------------------- + // Sort out the new array + //----------------------------------------- + + $this->ipsclass->input['nullvote'] = isset($this->ipsclass->input['nullvote']) ? $this->ipsclass->input['nullvote'] : 0; + + if ( !$this->ipsclass->input['nullvote'] ) + { + //----------------------------------------- + // First, which choices and ID did we choose? + // Single option poll... + //----------------------------------------- + + if ( is_array( $_POST['choice'] ) and count( $_POST['choice'] ) ) + { + foreach( $_POST['choice'] as $question_id => $choice_id ) + { + if ( ! $question_id or ! isset($choice_id) ) + { + continue; + } + + $vote_cast[ $question_id ][] = $choice_id; + } + } + + //----------------------------------------- + // Multi vote poll + //----------------------------------------- + + foreach( $this->ipsclass->input as $k => $v ) + { + if( preg_match( "#^choice_(\d+)_(\d+)$#", $k, $matches ) ) + { + if( $this->ipsclass->input[$k] == 1 ) + { + $vote_cast[ $matches[1] ][] = $matches[2]; + } + } + } + + //----------------------------------------- + // Unparse the choices + //----------------------------------------- + + $poll_answers = unserialize( stripslashes( $this->topic['choices'] ) ); + reset($poll_answers); + + //----------------------------------------- + // Got enough votes? + //----------------------------------------- + + if ( count( $vote_cast ) < count( $poll_answers ) ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_vote') ); + } + + //----------------------------------------- + // Add voter + //----------------------------------------- + + $this->ipsclass->DB->do_insert( 'voters', array( 'member_id' => $this->ipsclass->member['id'], + 'ip_address' => $this->ipsclass->ip_address, + 'tid' => $this->topic['tid'], + 'forum_id' => $this->topic['forum_id'], + 'vote_date' => time(), + ) ); + + //----------------------------------------- + // Loop + //----------------------------------------- + + foreach ( $vote_cast as $question_id => $choice_array ) + { + foreach( $choice_array as $choice_id ) + { + $poll_answers[ $question_id ]['votes'][ $choice_id ]++; + + if ( $poll_answers[ $question_id ]['votes'][ $choice_id ] < 1 ) + { + $poll_answers[ $question_id ]['votes'][ $choice_id ] = 1; + } + } + } + + //----------------------------------------- + // Save... + //----------------------------------------- + + $this->topic['choices'] = addslashes( serialize( $poll_answers ) ); + + $this->ipsclass->DB->simple_exec_query( array( 'update' => 'polls', + 'set' => "votes=votes+1,choices='{$this->topic['choices']}'", + 'where' => "pid={$this->topic['poll_id']}" ) ); + + //----------------------------------------- + // Go bump in the night? + //----------------------------------------- + + if ($this->topic['allow_pollbump']) + { + $this->topic['last_vote'] = time(); + $this->topic['last_post'] = time(); + + $this->ipsclass->DB->do_update( 'topics', array( 'last_vote' => $this->topic['last_vote'], 'last_post' => $this->topic['last_post'] ), 'tid='.$this->topic['tid'] ); + } + else + { + $this->topic['last_vote'] = time(); + + $this->ipsclass->DB->do_update( 'topics', array( 'last_vote' => $this->topic['last_vote'], 'last_post' => $this->topic['last_post'] ), 'tid='.$this->topic['tid'] ); + } + } + else + { + //----------------------------------------- + // Add null vote + //----------------------------------------- + + $this->ipsclass->DB->do_insert( 'voters', array( 'member_id' => $this->ipsclass->member['id'], + 'ip_address' => $this->ipsclass->ip_address, + 'tid' => $this->topic['tid'], + 'forum_id' => $this->topic['forum_id'], + 'vote_date' => time(), + ) ); + } + + $lang = $this->ipsclass->input['nullvote'] ? $this->ipsclass->lang['poll_viewing_results'] : $this->ipsclass->lang['poll_vote_added']; + + $this->ipsclass->print->redirect_screen( $lang , "showtopic={$this->topic['tid']}&st={$this->ipsclass->input['st']}" ); + } + + /*-------------------------------------------------------------------------*/ + // Return last post + /*-------------------------------------------------------------------------*/ + + function return_last_post() + { + $st = 0; + + $mode = $this->ipsclass->my_getcookie( 'topicmode' ); + + $pre = $mode != 'threaded' ? 'st' : 'start'; + + if( $mode == 'threaded' ) + { + $this->ipsclass->vars['display_max_posts'] = $this->ipsclass->vars['threaded_per_page']; + $this->ipsclass->input['st'] = $this->ipsclass->input['start']; + } + + if ($this->topic['posts']) + { + if ( (($this->topic['posts'] + 1) % $this->ipsclass->vars['display_max_posts']) == 0 ) + { + $pages = ($this->topic['posts'] + 1) / $this->ipsclass->vars['display_max_posts']; + } + else + { + $number = ( ($this->topic['posts'] + 1) / $this->ipsclass->vars['display_max_posts'] ); + $pages = ceil( $number); + } + + $st = ($pages - 1) * $this->ipsclass->vars['display_max_posts']; + + if( $this->ipsclass->vars['post_order_sort'] == 'desc' ) + { + $st = (ceil(($this->topic['posts']/$this->ipsclass->vars['display_max_posts'])) - $pages) * $this->ipsclass->vars['display_max_posts']; + } + } + + $query_extra = $this->ipsclass->member['is_mod'] ? '' : ' AND queued=0'; + + $this->ipsclass->DB->simple_construct( array( 'select' => 'pid', + 'from' => 'posts', + 'where' => "topic_id=".$this->topic['tid'] . $query_extra, + 'order' => $this->ipsclass->vars['post_order_column'].' DESC', + 'limit' => array( 0,1 ) + ) ); + + $this->ipsclass->DB->simple_exec(); + + $post = $this->ipsclass->DB->fetch_row(); + + $this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$this->topic['tid']."&pid={$post['pid']}&{$pre}={$st}&"."#entry".$post['pid']); + } + + /*-------------------------------------------------------------------------*/ + // INIT, innit? IS IT? + /*-------------------------------------------------------------------------*/ + + function topic_init( $load_modules=0 ) + { + //----------------------------------------- + // Memory... + //----------------------------------------- + + $_before = $this->ipsclass->memory_debug_make_flag(); + + //----------------------------------------- + // Compile the language file + //----------------------------------------- + + $this->ipsclass->load_language('lang_topic'); + $this->ipsclass->load_language('lang_editors'); + $this->ipsclass->load_template('skin_topic'); + + //----------------------------------------- + // Custom Profile fields + //----------------------------------------- + + /*if ( $this->ipsclass->vars['custom_profile_topic'] == 1 or $load_modules ) + { + require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); + $this->custom_fields = new custom_fields( $this->ipsclass->DB ); + + $this->custom_fields->member_id = $this->ipsclass->member['id']; + $this->custom_fields->cache_data = $this->ipsclass->cache['profilefields']; + $this->custom_fields->admin = intval($this->ipsclass->member['g_access_cp']); + $this->custom_fields->supmod = intval($this->ipsclass->member['g_is_supmod']); + }*/ + + //----------------------------------------- + // Get all the member groups and + // member title info + //----------------------------------------- + + if ( ! is_array( $this->ipsclass->cache['ranks'] ) ) + { + $this->ipsclass->cache['ranks'] = array(); + + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, title, pips, posts', + 'from' => 'titles', + 'order' => "posts DESC", + ) ); + + $this->ipsclass->DB->simple_exec(); + + while ($i = $this->ipsclass->DB->fetch_row()) + { + $this->ipsclass->cache['ranks'][ $i['id'] ] = array( + 'TITLE' => $i['title'], + 'PIPS' => $i['pips'], + 'POSTS' => $i['posts'], + ); + } + + $this->ipsclass->update_cache( array( 'name' => 'ranks', 'array' => 1, 'deletefirst' => 1 ) ); + } + + //----------------------------------------- + // Memory debug + //----------------------------------------- + + $this->ipsclass->memory_debug_add( 'TOPIC: Classes loaded (topics.php::topic_init)', $_before ); + } + + /*-------------------------------------------------------------------------*/ + // MAIN init + /*-------------------------------------------------------------------------*/ + + function init($topic="") + { + $this->md5_check = $this->ipsclass->return_md5_check(); + + if ( ! is_array($topic) ) + { + //----------------------------------------- + // Check the input + //----------------------------------------- + + $this->ipsclass->input['t'] = intval($this->ipsclass->input['t']); + + if ( $this->ipsclass->input['t'] < 0 ) + { + $this->ipsclass->Error( array( LEVEL => 1, MSG => 'missing_files') ); + } + + //----------------------------------------- + // Get the forum info based on the forum ID, + // get the category name, ID, and get the topic details + //----------------------------------------- + + if ( !isset( $this->ipsclass->topic_cache['tid']) OR !$this->ipsclass->topic_cache['tid'] ) + { + $this->ipsclass->DB->simple_construct( array( 'select' => '*', + 'from' => 'topics', + 'where' => "tid=".$this->ipsclass->input['t'], + ) ); + + $this->ipsclass->DB->simple_exec(); + + $this->topic = $this->ipsclass->DB->fetch_row(); + } + else + { + $this->topic = $this->ipsclass->topic_cache; + } + } + else + { + $this->topic = $topic; + } + + $this->topic['forum_id'] = isset($this->topic['forum_id']) ? $this->topic['forum_id'] : 0; + + $this->forum = $this->ipsclass->forums->forum_by_id[ $this->topic['forum_id'] ]; + + $this->ipsclass->input['f'] = $this->forum['id']; + + //----------------------------------------- + // Error out if we can not find the forum + //----------------------------------------- + + if ( ! $this->forum['id'] ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'is_broken_link') ); + } + + //----------------------------------------- + // Error out if we can not find the topic + //----------------------------------------- + + if ( ! $this->topic['tid'] ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'is_broken_link') ); + } + + //----------------------------------------- + // Error out if the topic is not approved + //----------------------------------------- + + if ( ! $this->ipsclass->can_queue_posts($this->forum['id']) ) + { + if ($this->topic['approved'] != 1) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files') ); + } + } + + $this->ipsclass->forums->forums_check_access( $this->forum['id'], 1, 'topic' ); + + //----------------------------------------- + // Unserialize the read array and parse into + // array + //----------------------------------------- + + if ( $read = $this->ipsclass->my_getcookie('topicsread') ) + { + if( $read != "-1" ) + { + $this->read_array = $this->ipsclass->clean_int_array( unserialize(stripslashes($read)) ); + } + else + { + $this->read_array = array(); + } + } + + $this->last_read_tid = isset($this->read_array[$this->topic['tid']]) ? $this->read_array[$this->topic['tid']] : 0; + + //----------------------------------------- + // Are we actually a moderator for this forum? + //----------------------------------------- + + if ( ! $this->ipsclass->member['g_is_supmod'] AND ! $this->ipsclass->member['g_access_cp'] ) + { + if ( !isset($this->ipsclass->member['_moderator'][ $this->forum['id'] ]) OR !is_array( $this->ipsclass->member['_moderator'][ $this->forum['id'] ] ) ) + { + $this->ipsclass->member['is_mod'] = 0; + } + } + } + + /*-------------------------------------------------------------------------*/ + // Topic set up ya'll + /*-------------------------------------------------------------------------*/ + + function topic_set_up() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $this->ipsclass->input['show'] = isset($this->ipsclass->input['show']) ? intval( $this->ipsclass->input['show'] ) : 0; + $this->ipsclass->input['st'] = intval( $this->ipsclass->input['st'] ); + + $this->topic_init(); + + //----------------------------------------- + // Memory... + //----------------------------------------- + + $_before = $this->ipsclass->memory_debug_make_flag(); + + $this->base_url = $this->ipsclass->base_url; + $this->forum['JUMP'] = $this->ipsclass->build_forum_jump(); + $this->first = intval($this->ipsclass->input['st']) > 0 ? intval($this->ipsclass->input['st']) : 0; + $this->ipsclass->input['view'] = isset($this->ipsclass->input['view']) ? $this->ipsclass->input['view'] : NULL; + + //----------------------------------------- + // Check viewing permissions, private forums, + // password forums, etc + //----------------------------------------- + + if ( ( ! $this->ipsclass->member['g_other_topics'] ) AND ( $this->topic['starter_id'] != $this->ipsclass->member['id'] ) ) + { + $this->ipsclass->Error( array( LEVEL => 1, MSG => 'no_view_topic') ); + } + + //----------------------------------------- + // Update the topic views counter + //----------------------------------------- + + if ( ! $this->ipsclass->input['view'] AND $this->topic['state'] != 'link' ) + { + if ( $this->ipsclass->vars['update_topic_views_immediately'] ) + { + $this->ipsclass->DB->simple_construct( array( 'update' => 'topics', + 'set' => 'views=views+1', + 'where' => "tid=".$this->topic['tid'], + #'lowpro' => 1, + ) ); + + $this->ipsclass->DB->simple_shutdown_exec(); + } + else + { + $this->ipsclass->DB->do_shutdown_insert( 'topic_views', array( 'views_tid' => $this->topic['tid'] ) ); + } + } + + //----------------------------------------- + // Need to update this topic? + //----------------------------------------- + + if ( $this->topic['state'] == 'open' ) + { + if( !$this->topic['topic_open_time'] OR $this->topic['topic_open_time'] < $this->topic['topic_close_time'] ) + { + if ( $this->topic['topic_close_time'] AND ( $this->topic['topic_close_time'] <= time() AND ( time() >= $this->topic['topic_open_time'] OR !$this->topic['topic_open_time'] ) ) ) + { + $this->topic['state'] = 'closed'; + + $this->ipsclass->DB->do_shutdown_update( 'topics', array( 'state' => 'closed' ), 'tid='.$this->topic['tid'] ); + } + } + else if( $this->topic['topic_open_time'] OR $this->topic['topic_open_time'] > $this->topic['topic_close_time'] ) + { + if ( $this->topic['topic_close_time'] AND ( $this->topic['topic_close_time'] <= time() AND time() <= $this->topic['topic_open_time'] ) ) + { + $this->topic['state'] = 'closed'; + + $this->ipsclass->DB->do_shutdown_update( 'topics', array( 'state' => 'closed' ), 'tid='.$this->topic['tid'] ); + } + } + } + else if ( $this->topic['state'] == 'closed' ) + { + if( !$this->topic['topic_close_time'] OR $this->topic['topic_close_time'] < $this->topic['topic_open_time'] ) + { + if ( $this->topic['topic_open_time'] AND ( $this->topic['topic_open_time'] <= time() AND ( time() >= $this->topic['topic_close_time'] OR !$this->topic['topic_close_time'] ) ) ) + { + $this->topic['state'] = 'open'; + + $this->ipsclass->DB->do_shutdown_update( 'topics', array( 'state' => 'open' ), 'tid='.$this->topic['tid'] ); + } + } + else if( $this->topic['topic_close_time'] OR $this->topic['topic_close_time'] > $this->topic['topic_open_time'] ) + { + + if ( $this->topic['topic_open_time'] AND ( $this->topic['topic_open_time'] <= time() AND time() <= $this->topic['topic_close_time'] ) ) + { + $this->topic['state'] = 'open'; + + $this->ipsclass->DB->do_shutdown_update( 'topics', array( 'state' => 'open' ), 'tid='.$this->topic['tid'] ); + } + } + } + + //----------------------------------------- + // Current topic rating value + //----------------------------------------- + + $this->topic['_rate_show'] = 0; + $this->topic['_rate_int'] = 0; + $this->topic['_rate_img'] = ''; + + if ( $this->topic['state'] != 'open' ) + { + $this->topic['_allow_rate'] = 0; + } + else + { + $this->topic['_allow_rate'] = $this->can_rate; + } + + if ( $this->forum['forum_allow_rating'] ) + { + $rating = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'topic_ratings', 'where' => "rating_tid={$this->topic['tid']} and rating_member_id=".$this->ipsclass->member['id'] ) ); + + if ( $rating['rating_value'] AND $this->ipsclass->member['g_topic_rate_setting'] != 2 ) + { + $this->topic['_allow_rate'] = 0; + } + + $this->topic['_rate_img'] = $this->ipsclass->compiled_templates['skin_topic']->topic_rating_image( 0 ); + $this->topic['_rating_value'] = $rating['rating_value'] ? $rating['rating_value'] : $this->ipsclass->lang['you_have_not_rated']; + + if ( $this->topic['topic_rating_total'] ) + { + $this->topic['_rate_int'] = round( $this->topic['topic_rating_total'] / $this->topic['topic_rating_hits'] ); + } + + //----------------------------------------- + // Show image? + //----------------------------------------- + + if ( ( $this->topic['topic_rating_hits'] >= $this->ipsclass->vars['topic_rating_needed'] ) AND ( $this->topic['_rate_int'] ) ) + { + $this->topic['_rate_img'] = $this->ipsclass->compiled_templates['skin_topic']->topic_rating_image($this->topic['_rate_int'] ); + $this->topic['_rate_show'] = 1; + } + } + else + { + $this->topic['_allow_rate'] = 0; + } + + //----------------------------------------- + // Update the topic read cookie / counters + //----------------------------------------- + + if ( !$this->ipsclass->input['view'] ) + { + $this->read_array[ $this->topic['tid'] ] = time(); + + $this->ipsclass->my_setcookie('topicsread', serialize($this->read_array), -1 ); + } + + if ( $this->ipsclass->vars['db_topic_read_cutoff'] AND $this->ipsclass->member['id'] ) + { + $this->ipsclass->DB->simple_construct( array( 'select' => '*', + 'from' => 'topic_markers', + 'where' => "marker_forum_id=".$this->forum['id']." AND marker_member_id=".$this->ipsclass->member['id'], + ) ); + + $this->ipsclass->DB->simple_exec(); + + $this->db_row = $this->ipsclass->DB->fetch_row(); + $this->my_topics_read = unserialize($this->db_row['marker_topics_read'] ); + $time_check = ((isset($this->my_topics_read[ $this->topic['tid'] ]) AND $this->my_topics_read[ $this->topic['tid'] ]) > $this->db_row['marker_last_cleared']) ? $this->my_topics_read[ $this->topic['tid'] ] : $this->db_row['marker_last_cleared']; + $save_array = array(); + $read_topics_tid = array( 0 => $this->topic['tid'] ); + + $time_check = $time_check > $this->ipsclass->member['members_markers']['board'] ? $time_check : $this->ipsclass->member['members_markers']['board']; + + //----------------------------------------- + // Work out topics we've read and that haven't + // been updated + //----------------------------------------- + + if ( is_array( $this->my_topics_read ) ) + { + foreach( $this->my_topics_read as $tid => $date ) + { + if ( $date > $this->db_row['marker_last_cleared'] ) + { + $read_topics_tid[] = $tid; + } + } + } + + //----------------------------------------- + // New post since last read / not read? + // Yes: Update. No: Ignore + //----------------------------------------- + + if ( ( $this->ipsclass->input['view'] != 'getnewpost' ) AND ( ( $time_check <= $this->topic['last_post'] ) OR ( $this->forum['forum_last_deletion'] > $this->db_row['marker_last_update'] ) ) ) + { + $save_array['marker_unread'] = $this->db_row['marker_unread'] - 1; + $save_array['marker_last_cleared'] = $this->db_row['marker_last_cleared']; + + $db_time = $this->db_row['marker_last_cleared'] > $this->ipsclass->member['members_markers']['board'] ? $this->db_row['marker_last_cleared'] : $this->ipsclass->member['members_markers']['board']; + + $this->my_topics_read[ $this->topic['tid'] ] = time(); + $read_topics_tid[] = $this->topic['tid']; + + //----------------------------------------- + // All read? Recount and check + //----------------------------------------- + + if ( $save_array['marker_unread'] <= 0 ) + { + $approved = $this->ipsclass->member['is_mod'] ? ' AND approved IN (0,1) ' : ' AND approved=1 '; + + $count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as cnt, MIN(last_post) as min_last_post', + 'from' => 'topics', + 'where' => "forum_id={$this->forum['id']} {$approved} AND tid NOT IN(0,".implode(",",$read_topics_tid).") AND last_post > ".intval($db_time) ) ); + + $save_array['marker_unread'] = intval($count['cnt']); + + if ( $save_array['marker_unread'] > 0 AND ( is_array( $this->my_topics_read ) and count( $this->my_topics_read ) ) ) + { + $this->ipsclass->vars['db_topic_read_cutoff'] = $count['min_last_post'] - 1; + $this->my_topics_read = array_filter( $this->my_topics_read, array( 'ipsclass', "array_filter_clean_read_topics" ) ); + $save_array['marker_topics_read'] = serialize( $this->my_topics_read ); + } + + //----------------------------------------- + // Else, mark as read + //----------------------------------------- + + else + { + $save_array['marker_topics_read'] = serialize( array() ); + $save_array['marker_last_cleared'] = time(); + $save_array['marker_unread'] = 0; + } + } + else + { + $save_array['marker_topics_read'] = serialize($this->my_topics_read); + } + + //----------------------------------------- + // Update this topic... + //----------------------------------------- + + $save_array['marker_last_update'] = time(); + $save_array['marker_member_id'] = $this->ipsclass->member['id']; + $save_array['marker_forum_id'] = $this->forum['id']; + $save_array['marker_last_cleared'] = intval($save_array['marker_last_cleared']); + + $this->ipsclass->DB->do_replace_into( 'topic_markers', $save_array, array('marker_member_id','marker_forum_id'), TRUE ); + } + } + + //----------------------------------------- + // Clean up + //----------------------------------------- + + unset( $save_array, $read_topics_tid ); + + //----------------------------------------- + // If this forum is a link, then + // redirect them to the new location + //----------------------------------------- + + if ( $this->topic['state'] == 'link' ) + { + $f_stuff = explode("&", $this->topic['moved_to']); + $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['topic_moved'], "showtopic={$f_stuff[0]}" ); + } + + //----------------------------------------- + // If this is a sub forum, we need to get + // the cat details, and parent details + //----------------------------------------- + + $this->nav = $this->ipsclass->forums->forums_breadcrumb_nav( $this->forum['id'] ); + + //----------------------------------------- + // Are we a moderator? + //----------------------------------------- + + if ( ($this->ipsclass->member['id']) and ($this->ipsclass->member['g_is_supmod'] != 1) ) + { + $other_mgroups = array(); + + if( $this->ipsclass->member['mgroup_others'] ) + { + $other_mgroups = explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ); + } + + $other_mgroups[] = $this->ipsclass->member['mgroup']; + + $mgroups = implode( ",", $other_mgroups ); + + $this->ipsclass->DB->cache_add_query('topics_check_for_mod', array( 'fid' => $this->forum['id'], 'mid' => $this->ipsclass->member['id'], 'gid' => $mgroups ) ); + $this->ipsclass->DB->simple_exec(); + + $this->moderator = $this->ipsclass->DB->fetch_row(); + } + + $this->mod_action = array( 'CLOSE_TOPIC' => '00', + 'OPEN_TOPIC' => '01', + 'MOVE_TOPIC' => '02', + 'DELETE_TOPIC' => '03', + 'EDIT_TOPIC' => '05', + 'PIN_TOPIC' => '15', + 'UNPIN_TOPIC' => '16', + 'UNSUBBIT' => '30', + 'MERGE_TOPIC' => '60', + 'TOPIC_HISTORY' => '90', + ); + + + //----------------------------------------- + // Hi! Light? + //----------------------------------------- + + $hl = (isset($this->ipsclass->input['hl']) AND $this->ipsclass->input['hl']) ? '&hl='.$this->ipsclass->input['hl'] : ''; + + //----------------------------------------- + // If we can see queued topics, add count + //----------------------------------------- + + if ( $this->ipsclass->can_queue_posts($this->forum['id']) ) + { + if( $this->ipsclass->input['modfilter'] == 'invisible_posts' ) + { + $this->topic['posts'] = intval( $this->topic['topic_queuedposts'] ); + } + else + { + $this->topic['posts'] += intval( $this->topic['topic_queuedposts'] ); + } + } + + //----------------------------------------- + // Generate the forum page span links + //----------------------------------------- + + $this->topic['SHOW_PAGES'] + = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => ($this->topic['posts']+1), + 'PER_PAGE' => $this->ipsclass->vars['display_max_posts'], + 'CUR_ST_VAL' => $this->first, + 'L_SINGLE' => "", + 'BASE_URL' => $this->base_url."showtopic=".$this->topic['tid'].$hl, + ) + ); + + if ( ($this->topic['posts'] + 1) > $this->ipsclass->vars['display_max_posts']) + { + $this->topic['go_new'] = $this->ipsclass->compiled_templates['skin_topic']->golastpost_link($this->forum['id'], $this->topic['tid'] ); + } + + + //----------------------------------------- + // Fix up some of the words + //----------------------------------------- + + $this->topic['TOPIC_START_DATE'] = $this->ipsclass->get_date( $this->topic['start_date'], 'LONG' ); + + $this->ipsclass->lang['topic_stats'] = str_replace( "<#START#>", $this->topic['TOPIC_START_DATE'], $this->ipsclass->lang['topic_stats']); + $this->ipsclass->lang['topic_stats'] = str_replace( "<#POSTS#>", $this->topic['posts'] , $this->ipsclass->lang['topic_stats']); + + if ($this->topic['description']) + { + $this->topic['description'] = ', '.$this->topic['description']; + } + + //----------------------------------------- + // Multi Quoting? + //----------------------------------------- + + $this->qpids = $this->ipsclass->my_getcookie('mqtids'); + + //----------------------------------------- + // Multi PIDS? + //----------------------------------------- + + $this->ipsclass->input['selectedpids'] = $this->ipsclass->my_getcookie('modpids'); + $this->ipsclass->input['selectedpidcount'] = 0; + + $this->ipsclass->my_setcookie('modpids', '', 0); + + $this->ipsclass->memory_debug_add( "TOPIC: topics.php::topic_set_up", $_before ); + } + +} + ?> \ No newline at end of file diff --git a/upload/sources/action_public/usercp.php b/upload/sources/action_public/usercp.php index 30c02d34..54f1466a 100644 --- a/upload/sources/action_public/usercp.php +++ b/upload/sources/action_public/usercp.php @@ -1,3937 +1,4132 @@ - $Date: 2006-11-15 17:05:32 -0600 (Wed, 15 Nov 2006) $ -| > $Revision: 731 $ -| > $Author: bfarber $ -+--------------------------------------------------------------------------- -| -| > UserCP functions -| > Module written by Matt Mecham -| > Date started: 14th February 2002 -| -| > Module Version Number: 1.0.0 -| > DBA Checked: Thu 20 May 2004 -| > Quality Checked: Wed 15 Sept. 2004 -+-------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_IPB' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - -class usercp -{ - var $ipsclass; - var $han_editor = ""; - - var $output = ""; - var $page_title = ""; - var $nav = array(); - var $html = ""; - - var $member = array(); - var $m_group = array(); - - var $jump_html = ""; - var $parser = ""; - - var $links = array(); - - var $bio = ""; - var $notes = ""; - var $size = "m"; - - var $email = ""; - var $md5_check = ""; - - var $modules = ""; - - var $lib; - - /*-------------------------------------------------------------------------*/ - // Init Editor & Parser - /*-------------------------------------------------------------------------*/ - - function init_parser() - { - if ( ! is_object( $this->han_editor ) ) - { - //----------------------------------------- - // Load and config the std/rte editors - //----------------------------------------- - - require_once( ROOT_PATH."sources/handlers/han_editor.php" ); - $this->han_editor = new han_editor(); - $this->han_editor->ipsclass =& $this->ipsclass; - $this->han_editor->init(); - } - - if ( ! is_object( $this->parser ) ) - { - //----------------------------------------- - // Load parser - //----------------------------------------- - - require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); - $this->parser = new parse_bbcode(); - $this->parser->ipsclass =& $this->ipsclass; - $this->parser->allow_update_caches = 1; - - $this->parser->bypass_badwords = intval($this->ipsclass->member['g_bypass_badwords']); - } - } - - /*-------------------------------------------------------------------------*/ - // Run! - /*-------------------------------------------------------------------------*/ - - function auto_run() - { - //----------------------------------------- - // Prep form check - //----------------------------------------- - - $this->md5_check = $this->ipsclass->return_md5_check(); - - //----------------------------------------- - // Get the sync module - //----------------------------------------- - - if ( USE_MODULES == 1 ) - { - require ROOT_PATH."modules/ipb_member_sync.php"; - - $this->modules = new ipb_member_sync(); - $this->modules->ipsclass =& $this->ipsclass; - } - - //----------------------------------------- - // Require the HTML and language modules - //----------------------------------------- - - $this->ipsclass->load_language('lang_post'); - $this->ipsclass->load_language('lang_ucp'); - $this->ipsclass->load_template('skin_ucp'); - - $this->ipsclass->base_url_nosess = "{$this->ipsclass->vars['board_url']}/index.{$this->ipsclass->vars['php_ext']}"; - - //----------------------------------------- - // Check viewing permissions, etc - //----------------------------------------- - - if ( ! $this->ipsclass->member['id'] ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_guests' ) ); - } - - //----------------------------------------- - // INIT da func - //----------------------------------------- - - require ROOT_PATH."sources/lib/func_usercp.php"; - $this->lib = new func_usercp(); - $this->lib->class =& $this; - $this->lib->ipsclass =& $this->ipsclass; - - //----------------------------------------- - // Print menu - //----------------------------------------- - - $this->ipsclass->print->add_output( $this->lib->ucp_generate_menu() ); - - //----------------------------------------- - // Set sizes - //----------------------------------------- - - $this->links = $this->ipsclass->member['links']; - $this->notes = $this->ipsclass->member['notes']; - $this->size = $this->ipsclass->member['ta_size'] ? $this->ipsclass->member['ta_size'] : $this->size; - - //----------------------------------------- - // What to do? - //----------------------------------------- - - switch($this->ipsclass->input['CODE']) - { - case '00': - $this->splash(); - break; - case '01': - $this->personal(); - break; - //----------------------------------------- - case '02': - $this->email_settings(); - break; - case '03': - $this->lib->do_email_settings(); - break; - //----------------------------------------- - case '04': - $this->board_prefs(); - break; - case '05': - $this->lib->do_board_prefs(); - break; - //----------------------------------------- - case '08': - $this->email_change(); - break; - case '09': - $this->do_email_change(); - break; - //----------------------------------------- - case '21': - $this->lib->do_profile(); - break; - case '20': - $this->update_notepad(); - break; - //----------------------------------------- - case '22': - $this->signature(); - break; - case '23': - $this->lib->do_signature(); - break; - //----------------------------------------- - case '24': - $this->avatar(); - break; - case '25': - $this->lib->do_avatar(); - break; - //----------------------------------------- - case '26': - $this->tracker(); - break; - case '27': - $this->do_update_tracker(); - break; - //----------------------------------------- - case '28': - $this->pass_change(); - break; - case '29': - $this->do_pass_change(); - break; - //----------------------------------------- - case '50': - $this->forum_tracker(); - break; - case '51': - $this->remove_forum_tracker(); - break; - //----------------------------------------- - case 'ignore': - $this->ignore_user_splash(); - break; - case 'ignoreadd': - $this->lib->ignore_user_add(); - break; - case 'ignoreremove': - $this->lib->ignore_user_remove(); - break; - //----------------------------------------- - case 'show_image': - $this->show_image(); - break; - case 'photo': - $this->photo(); - break; - case 'dophoto': - $this->lib->do_photo(); - break; - case 'getgallery': - $this->avatar_gallery(); - break; - case 'setinternalavatar': - $this->lib->set_internal_avatar(); - break; - case 'attach': - $this->attachments(); - break; - //----------------------------------------- - // Mod tools - //----------------------------------------- - case 'iptool': - $this->mod_ip_tool_start(); - break; - case 'doiptool': - $this->mod_ip_tool_complete(); - break; - case 'memtool': - $this->mod_find_user_start(); - break; - case 'domemtool': - $this->mod_find_user_complete(); - break; - case 'announce_start': - $this->mod_announce_start(); - break; - case 'announce_add': - $this->mod_announce_form('add'); - break; - case 'announce_save': - $this->mod_announce_save(); - break; - case 'announce_edit': - $this->mod_announce_form('edit'); - break; - case 'announce_delete': - $this->mod_announce_delete(); - break; - //----------------------------------------- - // Subs(ways)? - //----------------------------------------- - case 'start_subs': - $this->lib->subs_choose(); - break; - case 'end_subs': - $this->lib->subs_choose('save'); - break; - //----------------------------------------- - // Display name change - //----------------------------------------- - case 'dname_start': - $this->display_name_change(); - break; - case 'dname_complete': - $this->display_name_complete(); - break; - //----------------------------------------- - // Personal portal form.. - //----------------------------------------- - case 'personal_portal_form': - $this->personal_portal_form(); - break; - case 'personal_portal_save': - $this->personal_portal_save(); - break; - case 'manage_friends': - $this->manage_friends(); - break; - default: - $this->splash(); - break; - } - - //----------------------------------------- - // If we have any HTML to print, do so... - //----------------------------------------- - - $fj = $this->ipsclass->build_forum_jump(); - $fj = str_replace( "#Forum Jump#", $this->ipsclass->lang['forum_jump'], $fj); - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->CP_end(); - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->forum_jump( $fj ); - - $this->ipsclass->print->add_output( $this->output ); - $this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 1, 'NAV' => $this->nav ) ); - } - - /*-------------------------------------------------------------------------*/ - // Manage friends - /*-------------------------------------------------------------------------*/ - - /** - * Manage friends - * - * @return void - * @since IPB 2.2.0.2006-08-17 - */ - function manage_friends() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $member_id = intval( $this->ipsclass->member['id'] ); - - //----------------------------------------- - // Get friends pending approval - //----------------------------------------- - - $friends = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as count', - 'from' => 'profile_friends', - 'where' => 'friends_friend_id='.$member_id.' AND friends_approved=0' ) ); - - //----------------------------------------- - // Ok.. show the settings - //----------------------------------------- - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->personal_manage_friends( intval( $friends['count'] ) ); - - $this->page_title = $this->ipsclass->lang['m_manage_friends']; - $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); - } - - /*-------------------------------------------------------------------------*/ - // Personal portal save - /*-------------------------------------------------------------------------*/ - - /** - * Personal portal save - * - * @return void - * @since IPB 2.2.0.2006-08-17 - */ - function personal_portal_save() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $member_id = intval( $this->ipsclass->member['id'] ); - $md5check = substr( $this->ipsclass->parse_clean_value( rawurldecode( $_REQUEST['md5check'] ) ), 0, 32 ); - $pp_setting_notify_comments = trim( substr( $this->ipsclass->input['pp_setting_notify_comments'], 0, 10 ) ); - $pp_setting_notify_friend = trim( substr( $this->ipsclass->input['pp_setting_notify_friend'], 0, 10 ) ); - $pp_setting_moderate_comments = intval( $this->ipsclass->input['pp_setting_moderate_comments'] ); - $pp_setting_moderate_friends = intval( $this->ipsclass->input['pp_setting_moderate_friends'] ); - - if( $this->ipsclass->member['g_edit_profile'] ) - { - $pp_bio_content = $this->ipsclass->txt_mbsubstr( $this->ipsclass->my_nl2br( $this->ipsclass->input['pp_bio_content'] ), 0, 300 ); - } - - //----------------------------------------- - // Load profile lib - //----------------------------------------- - - require_once( ROOT_PATH . 'sources/action_public/profile.php' ); - $lib_profile = new profile; - $lib_profile->ipsclass =& $this->ipsclass; - - //----------------------------------------- - // MD5 check - //----------------------------------------- - - if ( $md5check != $this->ipsclass->return_md5_check() ) - { - $this->ipsclass->boink_it( $this->ipsclass->base_url . 'act=usercp&member_id='.$member_id.'&CODE=personal_portal_form&___msg=no_permission&md5check='.$this->ipsclass->md5_check ); - exit(); - } - - //----------------------------------------- - // Load member - //----------------------------------------- - - $member = $lib_profile->personal_function_load_member( $member_id ); - - - if( !$this->ipsclass->member['g_edit_profile'] ) - { - $pp_bio_content = $member['pp_bio_content']; - } - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! $member['id'] ) - { - $this->ipsclass->boink_it( $this->ipsclass->base_url . 'act=usercp&member_id='.$member_id.'&CODE=personal_portal_form&___msg=no_permission&md5check='.$this->ipsclass->md5_check ); - exit(); - } - - //----------------------------------------- - // Save... - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => 'pp_member_id', - 'from' => 'profile_portal', - 'where' => "pp_member_id=".$member_id ) ); - $this->ipsclass->DB->simple_exec(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - # Update... - $this->ipsclass->DB->do_update( 'profile_portal', array( - 'pp_bio_content' => $pp_bio_content, - 'pp_setting_notify_comments' => $pp_setting_notify_comments, - 'pp_setting_notify_friend' => $pp_setting_notify_friend, - 'pp_setting_moderate_comments' => $pp_setting_moderate_comments, - 'pp_setting_moderate_friends' => $pp_setting_moderate_friends - ), 'pp_member_id='.$member_id ); - } - else - { - # Insert - $this->ipsclass->DB->do_insert( 'profile_portal', array( - 'pp_bio_content' => $pp_bio_content, - 'pp_member_id' => $member_id, - 'pp_setting_notify_comments' => $pp_setting_notify_comments, - 'pp_setting_notify_friend' => $pp_setting_notify_friend, - 'pp_setting_moderate_comments' => $pp_setting_moderate_comments, - 'pp_setting_moderate_friends' => $pp_setting_moderate_friends - ) ); - } - - //----------------------------------------- - // Done... - //----------------------------------------- - - $this->ipsclass->boink_it( $this->ipsclass->base_url . 'act=usercp&member_id='.$member_id.'&CODE=personal_portal_form&_saved=1&___msg=settings_updated&md5check='.$this->ipsclass->md5_check ); - - } - - /*-------------------------------------------------------------------------*/ - // Personal portal form - /*-------------------------------------------------------------------------*/ - - /** - * Personal portal form - * - * @return void - * @since IPB 2.2.0.2006-08-17 - */ - function personal_portal_form() - { - //----------------------------------------- - // Load language - //----------------------------------------- - - $this->ipsclass->load_language( 'lang_profile' ); - - //----------------------------------------- - // INIT - //----------------------------------------- - - $member_id = intval( $this->ipsclass->member['id'] ); - $content = ''; - $types = array( 'none' => $this->ipsclass->lang['op_dd_none'], - 'email' => $this->ipsclass->lang['op_dd_email'], - 'pm' => $this->ipsclass->lang['op_dd_pm'] ); - - $yes_no = array( '0' => $this->ipsclass->lang['op_dd_disabled'], - '1' => $this->ipsclass->lang['op_dd_enabled'] ); - - //----------------------------------------- - // Load profile lib - //----------------------------------------- - - require_once( ROOT_PATH . 'sources/action_public/profile.php' ); - $lib_profile = new profile; - $lib_profile->ipsclass =& $this->ipsclass; - - //----------------------------------------- - // Load member - //----------------------------------------- - - $member = $lib_profile->personal_function_load_member( $member_id ); - - //----------------------------------------- - // Format settings... - //----------------------------------------- - - foreach( $types as $key => $lang ) - { - $_comments_selected = ( $key == $member['pp_setting_notify_comments'] ) ? ' selected="selected" ' : ''; - $_friends_selected = ( $key == $member['pp_setting_notify_comments'] ) ? ' selected="selected" ' : ''; - $member['_pp_setting_notify_comments'] .= ""; - $member['_pp_setting_notify_friend'] .= ""; - } - - foreach( $yes_no as $key => $lang ) - { - $_comments_selected = ( $key == $member['pp_setting_moderate_comments'] ) ? ' selected="selected" ' : ''; - $_friends_selected = ( $key == $member['pp_setting_moderate_friends'] ) ? ' selected="selected" ' : ''; - $member['_pp_setting_moderate_comments'] .= ""; - $member['_pp_setting_moderate_friends'] .= ""; - } - - //----------------------------------------- - // Personal statement - //----------------------------------------- - - $member['_pp_bio_content'] = $this->ipsclass->my_br2nl( $member['pp_bio_content'] ); - $member['__pp_bio_content'] = $member['pp_bio_content']; - - //----------------------------------------- - // Ok.. show the settings - //----------------------------------------- - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->personal_portal_settings( $member ); - - $this->page_title = $this->ipsclass->lang['m_personal_portal']; - $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); - } - - /*-------------------------------------------------------------------------*/ - // DISPLAY NAME: CHANGE COMPLETE - /*-------------------------------------------------------------------------*/ - - function display_name_complete() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $display_name = trim( $this->ipsclass->input['display_name'] ); - $display_pass = $this->ipsclass->input['display_password']; - $error = ""; - $found_name = 0; - $banfilters = array(); - - //----------------------------------------- - // CHECK (please) - //----------------------------------------- - - if ( ! $this->ipsclass->vars['auth_allow_dnames'] OR $this->ipsclass->member['g_dname_changes'] < 1 OR $this->ipsclass->member['g_dname_date'] < 1 ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); - } - - //----------------------------------------- - // Remove 'sneaky' spaces - //----------------------------------------- - - if ( $this->ipsclass->vars['strip_space_chr'] ) - { - // Use hexdec to convert between '0xAD' and chr - $display_name = str_replace( chr(160), ' ', $display_name ); - $display_name = str_replace( chr(173), ' ', $display_name ); - if ( $this->ipsclass->vars['gb_char_set'] == 'iso-8859-1' ) { - $members_display_name = str_replace( chr(240), ' ', $members_display_name ); - } - $display_name = trim($display_name); - } - - //----------------------------------------- - // Test unicode name too - //----------------------------------------- - - $unicode_name = preg_replace_callback('/&#([0-9]+);/si', create_function( '$matches', 'return chr($matches[1]);' ), $display_name); - $unicode_name = str_replace( "'" , ''', $unicode_name ); - $unicode_name = str_replace( "\\", '\', $unicode_name ); - - //----------------------------------------- - // Password Check: Load handler... - //----------------------------------------- - - require_once( ROOT_PATH.'sources/handlers/han_login.php' ); - $this->han_login = new han_login(); - $this->han_login->ipsclass =& $this->ipsclass; - $this->han_login->init(); - - //----------------------------------------- - // Check for current password. - //----------------------------------------- - - if ( $this->ipsclass->vars['ipbli_usertype'] == 'username' ) - { - $this->han_login->login_password_check( $this->ipsclass->member['name'], $display_pass ); - } - else - { - $this->han_login->login_password_check( $this->ipsclass->member['email'], $display_pass ); - } - - if ( $this->han_login->return_code != 'SUCCESS' ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'wrong_pass' ) ); - } - - //----------------------------------------- - // Load ban filters - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'banfilters' ) ); - $this->ipsclass->DB->simple_exec(); - - while( $r = $this->ipsclass->DB->fetch_row() ) - { - $banfilters[ $r['ban_type'] ][] = $r['ban_content']; - } - - //----------------------------------------- - // Grab # changes > 24 hours - //----------------------------------------- - - $time_check = time() - 86400 * $this->ipsclass->member['g_dname_date']; - - $name_count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as count, MIN(dname_date) as min_date', 'from' => 'dnames_change', 'where' => "dname_member_id={$this->ipsclass->member['id']} AND dname_date > $time_check" ) ); - - $name_count['count'] = intval( $name_count['count'] ); - $name_count['min_date'] = intval( $name_count['min_date'] ) ? intval( $name_count['min_date'] ) : $time_check; - - if ( intval( $name_count['count'] ) >= $this->ipsclass->member['g_dname_changes'] ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); - } - - //----------------------------------------- - // Check for missing fields / chars. - //----------------------------------------- - - if ( ! $display_name OR strlen( $display_name ) < 3 AND strlen( $display_name ) > $this->ipsclass->vars['max_user_name_length'] ) - { - $error .= $this->ipsclass->lang['dname_error_no_name']."
    "; - } - - if ( ! $display_pass ) - { - $error .= $this->ipsclass->lang['dname_error_no_pass']."
    "; - } - - if ( preg_match( "#[\[\];,\|]#", str_replace(''', "'", $unicode_name ) ) ) - { - $error .= $this->ipsclass->lang['dname_error_chars']."
    "; - } - - if( $this->ipsclass->vars['username_characters'] ) - { - $check_against = preg_quote( $this->ipsclass->vars['username_characters'], "/" ); - - if( !preg_match( "/^[".$check_against."]+$/i", str_replace(''', "'", $unicode_name ) ) ) - { - $error .= $this->ipsclass->lang['dname_error_chars']."
    "; - } - } - - //----------------------------------------- - // Are they banned [NAMES]? - //----------------------------------------- - - if ( is_array( $banfilters['name'] ) and count( $banfilters['name'] ) ) - { - foreach ( $banfilters['name'] as $n ) - { - if ( $n == "" ) - { - continue; - } - - if ( preg_match( "/^".preg_quote($n, '/' )."$/i", $display_name ) ) - { - $found_name = 1; - break; - } - } - } - - //----------------------------------------- - // Check for existing name. - //----------------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => "members_display_name, id", - 'from' => 'members', - 'where' => "members_l_display_name='".strtolower($display_name)."' AND id != ".$this->ipsclass->member['id'], - 'limit' => array( 0,1 ) ) ); - - $this->ipsclass->DB->exec_query(); - - //----------------------------------------- - // Got any results? - //----------------------------------------- - - if ( $this->ipsclass->DB->get_num_rows() ) - { - $found_name = 1; - } - - //----------------------------------------- - // Check for existing LOG IN name. - //----------------------------------------- - - if ( $this->ipsclass->vars['auth_dnames_nologinname'] ) - { - $this->ipsclass->DB->build_query( array( 'select' => "members_display_name, id", - 'from' => 'members', - 'where' => "members_l_username='".strtolower($display_name)."' AND id != ".$this->ipsclass->member['id'], - 'limit' => array( 0,1 ) ) ); - - $this->ipsclass->DB->exec_query(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - $found_name = 1; - } - } - - //----------------------------------------- - // Test for unicode name - //----------------------------------------- - - if ( $unicode_name != $display_name ) - { - //----------------------------------------- - // Check for existing name. - //----------------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => "members_display_name, id, email", - 'from' => 'members', - 'where' => "members_l_display_name='".strtolower($unicode_name)."' AND id != ".$this->ipsclass->member['id'], - 'limit' => array( 0,1 ) ) ); - - $this->ipsclass->DB->exec_query(); - - //----------------------------------------- - // Got any results? - //----------------------------------------- - - if ( $this->ipsclass->DB->get_num_rows() ) - { - $found_name = 1; - } - - //----------------------------------------- - // Check for existing LOG IN name. - //----------------------------------------- - - if ( $this->ipsclass->vars['auth_dnames_nologinname'] ) - { - $this->ipsclass->DB->build_query( array( 'select' => "members_display_name, id", - 'from' => 'members', - 'where' => "members_l_username='".strtolower($unicode_name)."' AND id != ".$this->ipsclass->member['id'], - 'limit' => array( 0,1 ) ) ); - - $this->ipsclass->DB->exec_query(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - $found_name = 1; - } - } - } - - //----------------------------------------- - // Got a name? - //----------------------------------------- - - if ( $found_name ) - { - $error .= $this->ipsclass->lang['dname_error_taken']."
    "; - } - - //----------------------------------------- - // Got an error? - //----------------------------------------- - - if ( $error ) - { - $this->display_name_change( $error ); - return; - } - - //----------------------------------------- - // Insert into change log - //----------------------------------------- - - $this->ipsclass->DB->force_data_type = array( 'dname_previous' => 'string', - 'dname_current' => 'string' ); - - $this->ipsclass->DB->do_insert( 'dnames_change', array( 'dname_member_id' => $this->ipsclass->member['id'], - 'dname_date' => time(), - 'dname_ip_address' => $this->ipsclass->ip_address, - 'dname_previous' => $this->ipsclass->member['members_display_name'], - 'dname_current' => $display_name ) ); - - //----------------------------------------- - // Still here? Change it then - //----------------------------------------- - - $this->ipsclass->DB->force_data_type = array( 'members_display_name' => 'string' ); - $this->ipsclass->DB->do_update( 'members' , array( 'members_display_name' => $display_name ), "id=" .$this->ipsclass->member['id'] ); - $this->ipsclass->DB->do_update( 'members' , array( 'members_l_display_name' => strtolower( $display_name ) ), "id=" .$this->ipsclass->member['id'] ); - - $this->ipsclass->DB->force_data_type = array( 'contact_name' => 'string' ); - $this->ipsclass->DB->do_update( 'contacts' , array( 'contact_name' => $display_name ), "contact_id=" .$this->ipsclass->member['id'] ); - - $this->ipsclass->DB->force_data_type = array( 'last_poster_name' => 'string' ); - $this->ipsclass->DB->do_update( 'forums' , array( 'last_poster_name' => $display_name ), "last_poster_id=".$this->ipsclass->member['id'] ); - - $this->ipsclass->DB->force_data_type = array( 'member_name' => 'string' ); - $this->ipsclass->DB->do_update( 'sessions' , array( 'member_name' => $display_name ), "member_id=" .$this->ipsclass->member['id'] ); - - $this->ipsclass->DB->force_data_type = array( 'starter_name' => 'string' ); - $this->ipsclass->DB->do_update( 'topics' , array( 'starter_name' => $display_name ), "starter_id=" .$this->ipsclass->member['id'] ); - - $this->ipsclass->DB->force_data_type = array( 'last_poster_name' => 'string' ); - $this->ipsclass->DB->do_update( 'topics' , array( 'last_poster_name' => $display_name ), "last_poster_id=".$this->ipsclass->member['id'] ); - - //----------------------------------------- - // Recache moderators - //----------------------------------------- - - if ( $this->ipsclass->member['is_mod'] ) - { - require_once( ROOT_PATH .'sources/action_admin/moderator.php' ); - $admod = new ad_moderator(); - $admod->ipsclass =& $this->ipsclass; - - $admod->rebuild_moderator_cache(); - } - - //----------------------------------------- - // Recache announcements - //----------------------------------------- - - require_once( ROOT_PATH.'sources/action_public/announcements.php' ); - $announcements = new announcements(); - $announcements->ipsclass =& $this->ipsclass; - $announcements->announce_recache(); - - //----------------------------------------- - // Recache forums - //----------------------------------------- - - $this->ipsclass->update_forum_cache(); - - //----------------------------------------- - // Bounce back - //----------------------------------------- - - $this->display_name_change( "", $this->ipsclass->lang['dname_change_ok'] ); - return; - } - - - /*-------------------------------------------------------------------------*/ - // DISPLAY NAME: CHANGE START - /*-------------------------------------------------------------------------*/ - - function display_name_change( $error="", $okmessage="" ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $form = array(); - - //----------------------------------------- - // CHECK (please) - //----------------------------------------- - - if ( ! $this->ipsclass->vars['auth_allow_dnames'] OR $this->ipsclass->member['g_dname_changes'] < 1 OR $this->ipsclass->member['g_dname_date'] < 1 ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); - } - - $this->ipsclass->input['display_name'] = isset($this->ipsclass->input['display_name']) ? $this->ipsclass->input['display_name'] : ''; - - $this->ipsclass->vars['username_errormsg'] = str_replace( '{chars}', $this->ipsclass->vars['username_characters'], $this->ipsclass->vars['username_errormsg'] ); - - //----------------------------------------- - // Grab # changes > 24 hours - //----------------------------------------- - - $time_check = time() - 86400 * $this->ipsclass->member['g_dname_date']; - - $name_count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as count, MIN(dname_date) as min_date', 'from' => 'dnames_change', 'where' => "dname_member_id={$this->ipsclass->member['id']} AND dname_date > $time_check" ) ); - - $name_count['count'] = intval( $name_count['count'] ); - $name_count['min_date'] = intval( $name_count['min_date'] ) ? intval( $name_count['min_date'] ) : $time_check; - - //----------------------------------------- - // Calculate # left - //----------------------------------------- - - $form['_changes_left'] = $this->ipsclass->member['g_dname_changes'] - $name_count['count']; - $form['_changes_done'] = $name_count['count']; - - # Make sure changes done isn't larger than allowed - # This happens when changing via ACP - - if ( $form['_changes_done'] > $this->ipsclass->member['g_dname_changes'] ) - { - $form['_changes_done'] = $this->ipsclass->member['g_dname_changes']; - } - - $form['_first_change'] = $this->ipsclass->get_date( $name_count['min_date'], 'SHORT', 1 ); - $form['_lang_string'] = sprintf( $this->ipsclass->lang['dname_string'], - $form['_changes_done'], $this->ipsclass->member['g_dname_changes'], - $form['_first_change'], $this->ipsclass->member['g_dname_changes'], - $this->ipsclass->member['g_dname_date'] ); - - //----------------------------------------- - // Print - //----------------------------------------- - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->ucp_dname_change( $form, $error, $okmessage ); - - $this->page_title = $this->ipsclass->lang['m_dname_change']; - $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); - $this->nav[] = $this->ipsclass->lang['m_dname_change']; - } - - /*-------------------------------------------------------------------------*/ - // ANNOUNCEMENTS: DELETE - /*-------------------------------------------------------------------------*/ - - function mod_announce_delete() - { - if ( ! $this->ipsclass->member['g_is_supmod'] ) - { - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->dead_section(); - return; - } - - $id = intval( $this->ipsclass->input['id'] ); - - if ( $id ) - { - $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'announcements', 'where' => 'announce_id='.$id ) ); - } - - //----------------------------------------- - // Update cache - //----------------------------------------- - - require_once( ROOT_PATH.'sources/action_public/announcements.php' ); - $announcements = new announcements(); - $announcements->ipsclass =& $this->ipsclass; - $announcements->announce_recache(); - - $this->mod_announce_start(); - } - - /*-------------------------------------------------------------------------*/ - // ANNOUNCEMENTS: SAVE (new/edit) - /*-------------------------------------------------------------------------*/ - - function mod_announce_save() - { - $type = $this->ipsclass->input['type']; - $forums_to_save = ""; - - if ( ! $this->ipsclass->member['g_is_supmod'] ) - { - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->dead_section(); - return; - } - - //----------------------------------------- - // check... - //----------------------------------------- - - if ( ! $this->ipsclass->input['announce_title'] or ! $this->ipsclass->input['announce_post'] ) - { - $this->mod_announce_form( $type, $this->ipsclass->lang['announce_error_title'] ); - return; - } - - //----------------------------------------- - // Get forums to add announce in - //----------------------------------------- - - if ( is_array( $_POST['announce_forum'] ) and count( $_POST['announce_forum'] ) ) - { - if ( in_array( '*', $_POST['announce_forum'] ) ) - { - $forums_to_save = '*'; - } - else - { - $forums_to_save = implode( ",", $_POST['announce_forum'] ); - } - } - - if ( ! $forums_to_save ) - { - $this->mod_announce_form( $type, $this->ipsclass->lang['announce_error_forums'] ); - return; - } - - //----------------------------------------- - // check dates - //----------------------------------------- - - $start_date = 0; - $end_date = 0; - - if ( strstr( $this->ipsclass->input['announce_start'], '.' ) ) - { - $start_array = explode( '.', $this->ipsclass->input['announce_start'] ); - - if ( $start_array[0] and $start_array[1] and $start_array[2] ) - { - if ( ! checkdate( $start_array[1], $start_array[0], $start_array[2] ) ) - { - $this->mod_announce_form( $type, $this->ipsclass->lang['announce_error_date'] ); - return; - } - } - - $start_date = $this->ipsclass->date_gmmktime( 0, 0, 1, $start_array[1], $start_array[0], $start_array[2] ); - } - - if ( strstr( $this->ipsclass->input['announce_end'], '.' ) ) - { - $end_array = explode( '.', $this->ipsclass->input['announce_end'] ); - - if ( $end_array[0] and $end_array[1] and $end_array[2] ) - { - if ( ! checkdate( $end_array[1], $end_array[0], $end_array[2] ) ) - { - $this->mod_announce_form( $type, $this->ipsclass->lang['announce_error_date'] ); - return; - } - } - - $end_date = $this->ipsclass->date_gmmktime( 23, 59, 59, $end_array[1], $end_array[0], $end_array[2] ); - } - - $this->init_parser(); - - $this->ipsclass->input['announce_post'] = $this->han_editor->process_raw_post( 'announce_post' ); - - //----------------------------------------- - // Build save array - //----------------------------------------- - - $save_array = array( 'announce_title' => $this->ipsclass->input['announce_title'], - 'announce_post' => $this->ipsclass->input['announce_post'], - 'announce_active' => isset($this->ipsclass->input['announce_active']) ? $this->ipsclass->input['announce_active'] : 0, - 'announce_forum' => $forums_to_save, - 'announce_html_enabled' => isset($this->ipsclass->input['announce_html_enabled']) ? $this->ipsclass->input['announce_html_enabled'] : 0, - 'announce_start' => $start_date, - 'announce_end' => $end_date - ); - - //----------------------------------------- - // Save.. - //----------------------------------------- - - if ( $type == 'add' ) - { - $save_array['announce_member_id'] = $this->ipsclass->member['id']; - - $this->ipsclass->DB->do_insert( 'announcements', $save_array ); - } - else - { - if ( $this->ipsclass->input['id'] ) - { - $this->ipsclass->DB->do_update( 'announcements', $save_array, 'announce_id='.intval($this->ipsclass->input['id']) ); - } - } - - //----------------------------------------- - // Update cache - //----------------------------------------- - - require_once( ROOT_PATH.'sources/action_public/announcements.php' ); - $announcements = new announcements(); - $announcements->ipsclass =& $this->ipsclass; - - $announcements->announce_recache(); - - $this->mod_announce_start(); - return; - } - - /*-------------------------------------------------------------------------*/ - // ANNOUNCEMENTS: FORM (new/edit) - /*-------------------------------------------------------------------------*/ - - function mod_announce_form($type='add', $msg="") - { - $this->init_parser(); - - if ( ! $this->ipsclass->member['g_is_supmod'] ) - { - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->dead_section(); - return; - } - - $this->han_editor->remove_side_panel = 1; - - //----------------------------------------- - // Set up - //----------------------------------------- - - if ( $type == 'add' ) - { - $button = $this->ipsclass->lang['announce_button_add']; - $announce = array( 'announce_active' => 1, 'announce_id' => 0 ); - - } - else - { - $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); - $button = $this->ipsclass->lang['announce_button_edit']; - $announce = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'announcements', 'where' => 'announce_id='.$this->ipsclass->input['id'] ) ); - $announce['announce_forum'] = explode( ",", $announce['announce_forum'] ); - $announce['announce_start'] = $announce['announce_start'] ? gmdate( 'd.m.Y', $announce['announce_start'] ) : ''; - $announce['announce_end'] = $announce['announce_end'] ? gmdate( 'd.m.Y', $announce['announce_end'] ) : ''; - } - - //----------------------------------------- - // Do we have _POST? - //----------------------------------------- - - foreach( array( 'announce_html_enabled', 'announce_title', 'announce_post', 'announce_start', 'announce_end', 'announce_forum', 'announce_active' ) as $bit ) - { - if ( isset($_POST[$bit]) AND $_POST[$bit] ) - { - $announce[$bit] = $_POST[$bit]; - } - else if( !isset($announce[$bit]) ) - { - $announce[$bit] = NULL; - } - } - - //print_r($_POST);exit; - - if( $announce['announce_post'] ) - { - if ( $this->han_editor->method == 'rte' ) - { - $announce['announce_post'] = $this->parser->pre_display_parse( $this->parser->pre_db_parse( $announce['announce_post'] ) ); - $announce['announce_post'] = $this->parser->convert_ipb_html_to_html( $announce['announce_post'] ); - } - else - { - $this->parser->parse_html = $announce['announce_html_enabled'] ? $announce['announce_html_enabled'] : 0; - $this->parser->parse_nl2br = 1; - $this->parser->parse_smilies = 1; - $this->parser->parse_bbcode = 1; - - $announce['announce_post'] = $this->parser->pre_edit_parse( $announce['announce_post'] ); - } - } - - //----------------------------------------- - // Forums - //----------------------------------------- - - $forum_html = "" . $this->ipsclass->forums->forums_forum_jump(0,1,1); - - //----------------------------------------- - // Save forums? - //----------------------------------------- - - if ( is_array( $announce['announce_forum'] ) and count( $announce['announce_forum'] ) ) - { - foreach( $announce['announce_forum'] as $f ) - { - $forum_html = preg_replace( "#option\s+value=[\"'](".preg_quote($f,'#').")[\"']#i", "option value='\\1' selected='selected'", $forum_html ); - } - } - - $announce['announce_active_checked'] = $announce['announce_active'] ? 'checked="checked"' : ''; - $announce['html_checkbox'] = $announce['announce_html_enabled'] ? "checked='checked' " : ''; - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->ucp_announce_form($announce, $button, $forum_html, $type, $this->han_editor->show_editor( $announce['announce_post'], 'announce_post' ), $msg); - - $this->page_title = $this->ipsclass->lang['menu_announcements']; - $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); - $this->nav[] = $this->ipsclass->lang['menu_announcements']; - } - - /*-------------------------------------------------------------------------*/ - // ANNOUNCEMENTS: START (Show current) - /*-------------------------------------------------------------------------*/ - - function mod_announce_start() - { - if ( ! $this->ipsclass->member['g_is_supmod'] ) - { - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->dead_section(); - return; - } - - //----------------------------------------- - // Get announcements - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'ucp_get_all_announcements', array() ); - $this->ipsclass->DB->cache_exec_query(); - - $content = ""; - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - if ( $r['announce_start'] ) - { - $r['announce_starts_converted'] = gmdate( 'd.m.Y', $r['announce_start'] ); - } - else - { - $r['announce_starts_converted'] = '-'; - } - - if ( $r['announce_end'] ) - { - $r['announce_end_converted'] = gmdate( 'd.m.Y', $r['announce_end'] ); - } - else - { - $r['announce_end_converted'] = '-'; - } - - if ( $r['announce_forum'] == '*' ) - { - $r['announce_forum_show'] = $this->ipsclass->lang['announce_page_allforums']; - } - else - { - $tmp_forums = explode(",",$r['announce_forum']); - - if ( is_array( $tmp_forums ) and count($tmp_forums) ) - { - if ( count($tmp_forums) > 5 ) - { - $r['announce_forum_show'] = count($tmp_forums).' '.$this->ipsclass->lang['announce_page_numforums']; - } - else - { - $tmp2 = array(); - - foreach( $tmp_forums as $id ) - { - $tmp2[] = "{$this->ipsclass->forums->forum_by_id[ $id ]['name']}"; - } - - $r['announce_forum_show'] = implode( "
    ", $tmp2 ); - } - } - } - - $r['announce_inactive'] = !$r['announce_active'] ? "{$this->ipsclass->lang['announce_page_disabled']}" : ''; - - $content .= $this->ipsclass->compiled_templates['skin_ucp']->ucp_announce_manage_row( $r ); - } - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->ucp_announce_manage($content); - - $this->page_title = $this->ipsclass->lang['menu_announcements']; - $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); - $this->nav[] = $this->ipsclass->lang['menu_announcements']; - } - - /*-------------------------------------------------------------------------*/ - // MEMBER TOOL: START - /*-------------------------------------------------------------------------*/ - - function mod_find_user_start($msg="") - { - if ( ! $this->ipsclass->member['g_is_supmod'] ) - { - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->dead_section(); - return; - } - - $this->ipsclass->input['name'] = isset($this->ipsclass->input['name']) ? $this->ipsclass->input['name'] : NULL; - - $this->page_title = $this->ipsclass->lang['cp_edit_user']; - $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); - $this->nav[] = $this->ipsclass->lang['cp_edit_user']; - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->mod_find_user($msg); - } - - /*-------------------------------------------------------------------------*/ - // MEMBER TOOL: COMPLETE - /*-------------------------------------------------------------------------*/ - - function mod_find_user_complete() - { - $this->ipsclass->input['name'] = trim(strtolower($this->ipsclass->input['name'])); - - if ( $this->ipsclass->input['name'] == "" ) - { - $this->mod_find_user_start($this->ipsclass->lang['cp_no_matches']); - return; - } - - //----------------------------------------- - // Query the DB for possible matches - //----------------------------------------- - - $this->start_val = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; - - $sql = "members_l_username LIKE '{$this->ipsclass->input['name']}%' OR members_l_display_name LIKE '%{$this->ipsclass->input['name']}%'"; - - $this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(id) as max', 'from' => 'members', 'where' => $sql ) ); - $this->ipsclass->DB->simple_exec(); - - $total_possible = $this->ipsclass->DB->fetch_row(); - - if ($total_possible['max'] < 1) - { - $this->mod_find_user_start( $this->ipsclass->lang['cp_no_matches'] ); - return; - } - - $pages = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => $total_possible['max'], - 'PER_PAGE' => 20, - 'CUR_ST_VAL' => $this->start_val, - 'L_SINGLE' => ' ', - 'L_MULTI' => $this->ipsclass->lang['tpl_pages'], - 'BASE_URL' => $this->ipsclass->base_url."act=usercp&CODE=domemtool&name={$this->ipsclass->input['name']}", - ) - ); - - $content = ""; - - $this->ipsclass->DB->simple_construct( array( 'select' => 'name, members_display_name, id, ip_address, posts, joined, mgroup', - 'from' => 'members', - 'where' => $sql, - 'order' => "joined DESC", - 'limit' => array( $this->start_val,20 ) ) ); - $this->ipsclass->DB->simple_exec(); - - while( $row = $this->ipsclass->DB->fetch_row() ) - { - $row['joined'] = $this->ipsclass->get_date( $row['joined'], 'JOINED' ); - $row['groupname'] = $this->ipsclass->make_name_formatted( $this->ipsclass->cache['group_cache'][ $row['mgroup'] ]['g_title'], $row['mgroup'] ); - - if ( ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group']) and ($row['mgroup'] == $this->ipsclass->vars['admin_group']) ) - { - $row['ip_address'] = '--'; - } - - $content .= $this->ipsclass->compiled_templates['skin_ucp']->mod_ip_member_row( $row, $this->ipsclass->return_md5_check() ); - } - - - $this->page_title = $this->ipsclass->lang['cp_edit_user']; - $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); - $this->nav[] = $this->ipsclass->lang['cp_edit_user']; - $this->mod_find_user_start( $this->ipsclass->compiled_templates['skin_ucp']->mod_ip_member_results($pages, $content) ); - } - - /*-------------------------------------------------------------------------*/ - // IP TOOL: Start - /*-------------------------------------------------------------------------*/ - - function mod_ip_tool_start($msg="") - { - if ( ! $this->ipsclass->member['g_is_supmod'] ) - { - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->dead_section(); - return; - } - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->mod_ip_start_form($this->ipsclass->input['ip'], $msg); - - $this->page_title = $this->ipsclass->lang['menu_ipsearch']; - $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); - $this->nav[] = $this->ipsclass->lang['menu_ipsearch']; - } - - /*-------------------------------------------------------------------------*/ - // IP TOOL: Complete - /*-------------------------------------------------------------------------*/ - - function mod_ip_tool_complete() - { - if ( ! $this->ipsclass->member['g_is_supmod'] ) - { - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->dead_section(); - return; - } - - //----------------------------------------- - // Remove trailing periods - //----------------------------------------- - - $exact_match = 1; - $final_ip_string = trim( $this->ipsclass->input['ip'] ); - $this->start_val = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; - - if ( strstr( $final_ip_string, '*' ) ) - { - $exact_match = 0; - - $final_ip_string = preg_replace( "/^(.+?)\*(.+?)?$/", "\\1", $final_ip_string ).'%'; - } - - //----------------------------------------- - // H'okay, what have we been asked to do? - // (that's a metaphorical "we" in a rhetorical question) - //----------------------------------------- - - if ($this->ipsclass->input['iptool'] == 'resolve') - { - $resolved = @gethostbyaddr($final_ip_string); - - if ($resolved == "") - { - $this->mod_ip_tool_start( $this->ipsclass->lang['cp_safe_fail'] ); - return; - } - else - { - $this->mod_ip_tool_start( sprintf($this->ipsclass->lang['ip_resolve_result'], $final_ip_string, $resolved) ); - } - } - else if ($this->ipsclass->input['iptool'] == 'members') - { - if ($exact_match == 0) - { - $sql = "ip_address LIKE '$final_ip_string'"; - } - else - { - $sql = "ip_address='$final_ip_string'"; - } - - $this->ipsclass->DB->simple_construct( array( 'select' => 'count(id) as max', 'from' => 'members', 'where' => $sql ) ); - $this->ipsclass->DB->simple_exec(); - - $total_possible = $this->ipsclass->DB->fetch_row(); - - if ($total_possible['max'] < 1) - { - $this->mod_ip_tool_start( $this->ipsclass->lang['cp_no_matches'] ); - return; - } - - $pages = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => $total_possible['max'], - 'PER_PAGE' => 20, - 'CUR_ST_VAL' => $this->start_val, - 'L_SINGLE' => ' ', - 'L_MULTI' => $this->ipsclass->lang['tpl_pages'], - 'BASE_URL' => $this->ipsclass->base_url."act=usercp&CODE=doiptool&iptool=members&ip={$this->ipsclass->input['ip']}", - ) - ); - - $content = ""; - - if ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) - { - $sql .= "AND mgroup != {$this->ipsclass->vars['admin_group']}"; - } - - $this->ipsclass->DB->simple_construct( array( 'select' => 'name, members_display_name,id, ip_address, posts, joined, mgroup', - 'from' => 'members', - 'where' => $sql, - 'order' => "joined DESC", - 'limit' => array( $this->start_val,20 ) ) ); - $this->ipsclass->DB->simple_exec(); - - while( $row = $this->ipsclass->DB->fetch_row() ) - { - $row['joined'] = $this->ipsclass->get_date( $row['joined'], 'JOINED' ); - $row['groupname'] = $this->ipsclass->make_name_formatted( $this->ipsclass->cache['group_cache'][ $row['mgroup'] ]['g_title'], $row['mgroup'] ); - - $content .= $this->ipsclass->compiled_templates['skin_ucp']->mod_ip_member_row( $row, $this->ipsclass->return_md5_check() ); - } - - $this->mod_ip_tool_start( $this->ipsclass->compiled_templates['skin_ucp']->mod_ip_member_results($pages, $content) ); - } - else - { - // Find posts then! - - if ($exact_match == 0) - { - $sql = "ip_address LIKE '$final_ip_string'"; - } - else - { - $sql = "ip_address='$final_ip_string'"; - } - - // Get forums we're allowed to view - - $aforum = array(); - - foreach( $this->ipsclass->forums->forum_by_id as $data ) - { - $data['read_perms'] = isset($data['read_perms']) ? $data['read_perms'] : NULL; - - if ( $this->ipsclass->check_perms($data['read_perms']) == TRUE ) - { - $aforum[] = $data['id']; - } - } - - if ( count($aforum) < 1) - { - $this->mod_ip_tool_start( $this->ipsclass->lang['cp_no_matches'] ); - return; - } - - $the_forums = implode( ",", $aforum); - - $this->ipsclass->DB->build_query( array( 'select' => 'p.pid', - 'from' => array( 'posts' => 'p' ), - 'where' => "t.forum_id IN({$the_forums}) AND {$sql}", - 'limit' => array( 0,500 ), - 'order' => 'pid DESC', - 'add_join' => array( - array( - 'select' => 't.forum_id', - 'from' => array( 'topics' => 't' ), - 'where' => 't.tid=p.topic_id', - 'type' => 'left' - ) - ) - ) ); - - $this->ipsclass->DB->exec_query(); - - $max_hits = $this->ipsclass->DB->get_num_rows(); - - $posts = ""; - - while ($row = $this->ipsclass->DB->fetch_row() ) - { - $posts .= $row['pid'].","; - } - - $posts = preg_replace( "/,$/", "", $posts ); - - //----------------------------------------- - // Do we have any results? - //----------------------------------------- - - if ($posts == "") - { - $this->mod_ip_tool_start( $this->ipsclass->lang['cp_no_matches'] ); - return; - } - - //----------------------------------------- - // If we are still here, store the data into the database... - //----------------------------------------- - - $unique_id = md5(uniqid(microtime(),1)); - - $this->ipsclass->DB->do_insert( 'search_results', array ( - 'id' => $unique_id, - 'search_date'=> time(), - 'post_id' => $posts, - 'post_max' => $max_hits, - 'sort_key' => 'p.post_date', - 'sort_order' => 'desc', - 'member_id' => $this->ipsclass->member['id'], - 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], - ) ); - - $this->mod_ip_tool_start( $this->ipsclass->compiled_templates['skin_ucp']->mod_ip_post_results($unique_id, $max_hits) ); - - return TRUE; - } - } - - /*-------------------------------------------------------------------------*/ - // Attachments - /*-------------------------------------------------------------------------*/ - - function attachments() - { - $info = array(); - $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; - $perpage = 15; - - $sort_key = ""; - - switch ($this->ipsclass->input['sort']) - { - case 'date': - $sort_key = 'a.attach_date ASC'; - $info['date_order'] = 'rdate'; - $info['size_order'] = 'size'; - break; - case 'rdate': - $sort_key = 'a.attach_date DESC'; - $info['date_order'] = 'date'; - $info['size_order'] = 'size'; - break; - case 'size': - $sort_key = 'a.attach_filesize DESC'; - $info['date_order'] = 'date'; - $info['size_order'] = 'rsize'; - break; - case 'rsize': - $sort_key = 'a.attach_filesize ASC'; - $info['date_order'] = 'date'; - $info['size_order'] = 'size'; - break; - default: - $sort_key = 'a.attach_date DESC'; - $info['date_order'] = 'date'; - $info['size_order'] = 'size'; - break; - } - - $this->page_title = $this->ipsclass->lang['m_attach']; - $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); - - //----------------------------------------- - // Get the ID's to delete - //----------------------------------------- - - $ids = array(); - - foreach ($this->ipsclass->input as $key => $value) - { - if ( preg_match( "/^attach_(\d+)$/", $key, $match ) ) - { - if ($this->ipsclass->input[$match[0]]) - { - $ids[] = $match[1]; - } - } - } - - $ids = $this->ipsclass->clean_int_array( $ids ); - - $affected_ids = count($ids); - - if ( $affected_ids > 0 ) - { - $this->ipsclass->DB->cache_add_query( 'usercp_get_to_delete', array( 'mid' => $this->ipsclass->member['id'], 'aid_array' => $ids ) ); - - $o = $this->ipsclass->DB->cache_exec_query(); - - while ( $killmeh = $this->ipsclass->DB->fetch_row( $o ) ) - { - if ( $killmeh['attach_location'] ) - { - @unlink( $this->ipsclass->vars['upload_dir']."/".$killmeh['attach_location'] ); - } - if ( $killmeh['attach_thumb_location'] ) - { - @unlink( $this->ipsclass->vars['upload_dir']."/".$killmeh['attach_thumb_location'] ); - } - - if ( $killmeh['topic_id'] ) - { - $this->ipsclass->DB->simple_construct( array( 'update' => 'topics', 'set' => 'topic_hasattach=topic_hasattach-1', 'where' => 'tid='.$killmeh['topic_id'] ) ); - $this->ipsclass->DB->simple_shutdown_exec(); - } - } - - $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'attachments', 'where' => 'attach_id IN ('.implode(",",$ids).') and attach_member_id='.$this->ipsclass->member['id'] ) ); - } - - //----------------------------------------- - // Get some stats... - //----------------------------------------- - - $maxspace = intval($this->ipsclass->member['g_attach_max']); - - if ( $this->ipsclass->member['g_attach_max'] == -1 ) - { - $this->ipsclass->Error( array( 'MSG' => 'no_permission', 'LEVEL' => 1 ) ); - } - - //----------------------------------------- - // Limit by forums - //----------------------------------------- - - $stats = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as count, sum(attach_filesize) as sum', - 'from' => 'attachments', - 'where' => 'attach_member_id='.$this->ipsclass->member['id'] ) ); - - if ( $maxspace > 0 ) - { - //----------------------------------------- - // Figure out percentage used - //----------------------------------------- - - $info['has_limit'] = 1; - $info['full_percent'] = $stats['sum'] ? sprintf( "%.0f", ( ( $stats['sum'] / ($maxspace * 1024) ) * 100) ) : 0; - - if ( $info['full_percent'] > 100 ) - { - $info['full_percent'] = 100; - } - - $info['img_width'] = $info['full_percent'] > 0 ? intval($info['full_percent']) - 4 . "%" : 1;// * 2.4 : 1; - - //if ($info['img_width'] > 235) - //{ - // $info['img_width'] = 235; - //} - - $this->ipsclass->lang['attach_space_count'] = sprintf( $this->ipsclass->lang['attach_space_count'], $stats['count'], $info['full_percent'] ); - $this->ipsclass->lang['attach_space_used'] = sprintf( $this->ipsclass->lang['attach_space_used'] , $this->ipsclass->size_format(intval($stats['sum'])), $this->ipsclass->size_format($maxspace * 1024) ); - } - else - { - $info['has_limit'] = 0; - $this->ipsclass->lang['attach_space_used'] = sprintf( $this->ipsclass->lang['attach_space_unl'] , $this->ipsclass->size_format(intval($stats['sum'])) ); - } - - //----------------------------------------- - // Pages - //----------------------------------------- - - $pages = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => $stats['count'], - 'PER_PAGE' => $perpage, - 'CUR_ST_VAL' => $start, - 'L_SINGLE' => "", - 'L_MULTI' => $this->ipsclass->lang['tpl_pages'], - 'BASE_URL' => $this->ipsclass->base_url."act=usercp&CODE=attach&sort={$this->ipsclass->input['sort']}", - ) ); - - //----------------------------------------- - // Get attachments... - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'usercp_get_attachments', array( 'mid' => $this->ipsclass->member['id'], 'order' => $sort_key, 'limit_a' => $start, 'limit_b' => $perpage ) ); - - $this->ipsclass->DB->cache_exec_query(); - - $temp_html = ""; - - $this->ipsclass->load_language('lang_topic'); - - while ( $row = $this->ipsclass->DB->fetch_row() ) - { - if ( $this->ipsclass->check_perms($this->ipsclass->forums->forum_by_id[ $row['forum_id'] ]['read_perms']) != TRUE ) - { - $row['title'] = $this->ipsclass->lang['attach_topicmoved']; - } - - //----------------------------------------- - // Full attachment thingy - //----------------------------------------- - - if ( $row['attach_rel_module'] == 'post' ) - { - $row['_type'] = 'post'; - } - else if ( $row['attach_rel_module'] == 'msg' ) - { - $row['_type'] = 'msg'; - $row['title'] = $this->ipsclass->lang['attach_inpm']; - } - - $row['image'] = $this->ipsclass->cache['attachtypes'][ $row['attach_ext'] ]['atype_img']; - - $row['short_name'] = $this->ipsclass->txt_truncate( $row['attach_file'], 30 ); - - $row['attach_date'] = $this->ipsclass->get_date( $row['attach_date'], 'SHORT' ); - - $row['real_size'] = $this->ipsclass->size_format( $row['attach_filesize'] ); - - $temp_html .= $this->ipsclass->compiled_templates['skin_ucp']->attachments_row( $row ); - } - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->attachments_top($info, $pages, $temp_html); - - } - - /*-------------------------------------------------------------------------*/ - // Ignore user. - /*-------------------------------------------------------------------------*/ - - function ignore_user_splash($msg="") - { - $this->page_title = $this->ipsclass->lang['t_welcome']; - $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); - - $final_users = array(); - $temp_users = array(); - - //----------------------------------------- - // Do we have a MESSAGE FRROM GAWD???!@ - //----------------------------------------- - - if ( $msg ) - { - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->ucp_message( $this->ipsclass->lang['mi5_error'], $msg ); - } - - //----------------------------------------- - // Do we have incoming? - //----------------------------------------- - - if ( intval($this->ipsclass->input['uid']) ) - { - $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, members_display_name', 'from' => 'members', 'where' => "id=".intval($this->ipsclass->input['uid']) ) ); - $this->ipsclass->DB->simple_exec(); - - $newmem = $this->ipsclass->DB->fetch_row(); - - $this->ipsclass->input['newbox_1'] = $newmem['members_display_name']; - } - - //----------------------------------------- - // Stored as userid,userid,userid - //----------------------------------------- - - $ignored_users = explode( ',', $this->ipsclass->member['ignored_users'] ); - - //----------------------------------------- - // Get members and check to see if they've - // since been moved into a group that cannot - // be ignored - //----------------------------------------- - - foreach( $ignored_users as $id ) - { - if ( intval($id) ) - { - $temp_users[] = $id; - } - } - - if ( count($temp_users) ) - { - $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, members_display_name, mgroup, posts', - 'from' => 'members', - 'where' => "id IN (".implode(",",$temp_users).")" - ) ); - - $this->ipsclass->DB->simple_exec(); - - while ( $m = $this->ipsclass->DB->fetch_row() ) - { - $m['g_title'] = $this->ipsclass->make_name_formatted( $this->ipsclass->cache['group_cache'][ $m['mgroup'] ]['g_title'], $m['mgroup'] ); - - if ( $this->ipsclass->vars['cannot_ignore_groups'] ) - { - if ( strstr( $this->ipsclass->vars['cannot_ignore_groups'], ','.$m['mgroup'].',' ) ) - { - continue; - } - } - - $final_users[ $m['id'] ] = $m; - } - } - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->iu_start(); - - foreach( $final_users as $member ) - { - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->iu_populated_row($member); - } - - - $this->ipsclass->input['newbox_1'] = isset($this->ipsclass->input['newbox_1']) ? $this->ipsclass->input['newbox_1'] : NULL; - $this->ipsclass->input['newbox_2'] = isset($this->ipsclass->input['newbox_2']) ? $this->ipsclass->input['newbox_2'] : NULL; - $this->ipsclass->input['newbox_3'] = isset($this->ipsclass->input['newbox_3']) ? $this->ipsclass->input['newbox_3'] : NULL; - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->iu_add_new(); - - } - - - /*-------------------------------------------------------------------------*/ - // Photo: - // - // Change / Add / Edit Users Photo - /*-------------------------------------------------------------------------*/ - - function photo( $error='' ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $member_id = intval( $this->ipsclass->member['id'] ); - list($p_max, $p_width, $p_height) = explode( ":", $this->ipsclass->member['g_photo_max_vars'] ); - $p_w = ""; - $p_h = ""; - $cur_photo = ""; - $member = array(); - $rand = urlencode( microtime() ); - - //----------------------------------------- - // Check to make sure that we can edit profiles.. - //----------------------------------------- - - if ( empty($this->ipsclass->member['g_edit_profile']) ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cant_use_feature' ) ); - } - - //----------------------------------------- - // Set up page title - //----------------------------------------- - - $this->page_title = $this->ipsclass->lang['t_welcome']; - $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); - - //----------------------------------------- - // Not allowed a photo - //----------------------------------------- - - if ( $this->ipsclass->member['g_photo_max_vars'] == "" or $this->ipsclass->member['g_photo_max_vars'] == "::" ) - { - // Nothing set up yet... - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->dead_section(); - return; - } - - //----------------------------------------- - // Get profile as lib - //----------------------------------------- - - require_once( ROOT_PATH . 'sources/action_public/profile.php' ); - $lib_profile = new profile(); - $lib_profile->ipsclass =& $this->ipsclass; - - //----------------------------------------- - // Get all member information - //----------------------------------------- - - $member = $lib_profile->personal_portal_set_information( $lib_profile->personal_function_load_member( $member_id ) ); - - //----------------------------------------- - // SET DIMENSIONS - //----------------------------------------- - - if ( $p_max ) - { - $this->ipsclass->lang['pph_max'] = sprintf( $this->ipsclass->lang['pph_max'], $p_max ); - $this->ipsclass->lang['pph_max'] .= sprintf( $this->ipsclass->lang['pph_max2'], $p_width, $p_height ); - } - else - { - $this->ipsclass->lang['pph_max'] = sprintf( $this->ipsclass->lang['pph_max2'], $p_width, $p_height ); - } - - $show_size = "(".$member['pp_main_width'] .' x ' . $member['pp_main_height'].")"; - - //----------------------------------------- - // TYPE? - //----------------------------------------- - - if ( $member['pp_main_photo'] ) - { - $cur_photo = "{$this->ipsclass->lang["; - } - - //----------------------------------------- - // SHOW THE FORM - //----------------------------------------- - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->photo_page( $error, $cur_photo, $show_size, $this->md5_check, $p_max, 500000, $rand ); - - //----------------------------------------- - // Print it... - //----------------------------------------- - - $fj = $this->ipsclass->build_forum_jump(); - $fj = str_replace( "#Forum Jump#", $this->ipsclass->lang['forum_jump'], $fj); - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->CP_end(); - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->forum_jump( $fj ); - - $this->ipsclass->print->add_output( $this->output ); - $this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 1, 'NAV' => $this->nav ) ); - } - - /*-------------------------------------------------------------------------*/ - // Forum tracker - // - // What, you need a definition with that title? - // What are you doing poking around in the code for anyway? - /*-------------------------------------------------------------------------*/ - - function remove_forum_tracker() - { - $ids = array(); - - foreach ($this->ipsclass->input as $key => $value) - { - if ( preg_match( "/^id-(\d+)$/", $key, $match ) ) - { - if ($this->ipsclass->input[$match[0]]) - { - $ids[] = $match[1]; - } - } - } - - $ids = $this->ipsclass->clean_int_array( $ids ); - - $allowed = array( 'none', 'immediate', 'delayed', 'daily', 'weekly' ); - - //----------------------------------------- - // what we doing? - //----------------------------------------- - - if ( count($ids) > 0 ) - { - if ( $this->ipsclass->input['trackchoice'] == 'unsubscribe' ) - { - $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'forum_tracker', 'where' => "member_id={$this->ipsclass->member['id']} and forum_id IN (".implode( ",", $ids ).")" ) ); - } - else if ( in_array( $this->ipsclass->input['trackchoice'], $allowed ) ) - { - $this->ipsclass->DB->do_update( 'forum_tracker', array( 'forum_track_type' => $this->ipsclass->input['trackchoice'] ), "member_id={$this->ipsclass->member['id']} and forum_id IN (".implode( ",", $ids ).")" ); - } - } - - $this->ipsclass->boink_it($this->ipsclass->base_url."act=UserCP&CODE=50"); - - } - - function forum_tracker() - { - //----------------------------------------- - // Remap... - //----------------------------------------- - - $remap = array( 'none' => 'subs_none_title', - 'immediate' => 'subs_immediate', - 'delayed' => 'subs_delayed', - 'daily' => 'subs_daily', - 'weekly' => 'subs_weekly' - ); - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->forum_subs_header(); - - //----------------------------------------- - // Query the DB for the subby toppy-ics - at the same time - // we get the forum and topic info, 'cos we rule. - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'ucp_get_forum_tracker', array( 'mid' => $this->ipsclass->member['id'] ) ); - $this->ipsclass->DB->cache_exec_query(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - while( $forum = $this->ipsclass->DB->fetch_row() ) - { - //----------------------------------------- - // Got perms to see this forum? - //----------------------------------------- - - if ( ! $this->ipsclass->forums->forum_by_id[ $forum['id'] ] ) - { - continue; - } - - $forum['folder_icon'] = $this->ipsclass->forums->forums_new_posts($forum); - - $forum['last_post'] = $this->ipsclass->get_date($forum['last_post'], 'LONG'); - - $forum['last_topic'] = $this->ipsclass->lang['f_none']; - - $forum['last_title'] = str_replace( "!" , "!", $forum['last_title'] ); - $forum['last_title'] = str_replace( """, "\"", $forum['last_title'] ); - - if ( strlen($forum['last_title']) > 30 ) - { - $forum['last_title'] = $this->ipsclass->txt_truncate( $forum['last_title'], 30 ); - } - - if ($forum['password'] != "") - { - $forum['last_topic'] = $this->ipsclass->lang['f_none']; - } - else - { - $forum['last_topic'] = "{$forum['last_title']}"; - } - - - if ( isset($forum['last_poster_name'])) - { - $forum['last_poster'] = $forum['last_poster_id'] ? "{$forum['last_poster_name']}" - : $forum['last_poster_name']; - } - else - { - $forum['last_poster'] = $this->ipsclass->lang['f_none']; - } - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->forum_subs_row($forum, $remap[ $forum['forum_track_type'] ]); - } - - } - else - { - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->forum_subs_none(); - } - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->forum_subs_end(); - - $this->page_title = $this->ipsclass->lang['t_welcome']; - $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); - - } - - - /*-------------------------------------------------------------------------*/ - // pass change: - // - // Change the users password. - /*-------------------------------------------------------------------------*/ - - function pass_change() - { - //----------------------------------------- - // Do we have another URL that one needs - // to visit to register? - //----------------------------------------- - - $this->login_method = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_enabled=1' ) ); - - if ( $this->login_method['login_maintain_url'] ) - { - $this->ipsclass->boink_it( $this->login_method['login_maintain_url'] ); - exit(); - } - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->pass_change(); - $this->page_title = $this->ipsclass->lang['t_welcome']; - $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); - - } - - /*-------------------------------------------------------------------------*/ - // PASSWORD CHAGE COMPLETE - /*-------------------------------------------------------------------------*/ - - function do_pass_change() - { - if ( $_POST['current_pass'] == "" or empty($_POST['current_pass']) ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'complete_form' ) ); - } - - //----------------------------------------- - // Check and trim - //----------------------------------------- - - $cur_pass = trim($this->ipsclass->input['current_pass']); - $new_pass = trim($this->ipsclass->input['new_pass_1']); - $chk_pass = trim($this->ipsclass->input['new_pass_2']); - - if ( ( empty($new_pass) ) or ( empty($chk_pass) ) ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'complete_form' ) ); - } - - if ($new_pass != $chk_pass) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'pass_no_match' ) ); - } - - //----------------------------------------- - // Check password... - //----------------------------------------- - - $this->ipsclass->converge->converge_load_member($this->ipsclass->member['email']); - - if ( $this->ipsclass->converge->converge_authenticate_member( md5($cur_pass) ) != TRUE ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'wrong_pass' ) ); - } - - //----------------------------------------- - // Create new password... - //----------------------------------------- - - $md5_pass = md5($new_pass); - - //----------------------------------------- - // Update the DB - //----------------------------------------- - - $this->ipsclass->converge->converge_update_password( $md5_pass, $this->ipsclass->member['email'] ); - - //----------------------------------------- - // Update members log in key... - //----------------------------------------- - - $key = $this->ipsclass->converge->generate_auto_log_in_key(); - $this->ipsclass->DB->do_update( 'members', array( 'member_login_key' => $key ), 'id='.$this->ipsclass->member['id'] ); - - //----------------------------------------- - // Use sync module? - //----------------------------------------- - - if ( USE_MODULES == 1 ) - { - $this->modules->register_class($this); - $this->modules->on_pass_change($this->ipsclass->member['id'], $new_pass); - } - - //----------------------------------------- - // Redirect... - //----------------------------------------- - - $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['pass_redirect'], 'act=UserCP&CODE=00' ); - } - - - /*-------------------------------------------------------------------------*/ - // email change: - // - // Change the users email address - /*-------------------------------------------------------------------------*/ - - function email_change($msg="") - { - //----------------------------------------- - // Do we have another URL that one needs - // to visit to register? - //----------------------------------------- - - $this->login_method = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_enabled=1' ) ); - - if ( $this->login_method['login_maintain_url'] ) - { - $this->ipsclass->boink_it( $this->login_method['login_maintain_url'] ); - exit(); - } - - $txt = $this->ipsclass->lang['ce_current'].$this->ipsclass->member['email']; - - if ($this->ipsclass->vars['reg_auth_type']) - { - $txt .= $this->ipsclass->lang['ce_auth']; - } - - if ($this->ipsclass->vars['bot_antispam']) - { - //----------------------------------------- - // Set up security code - //----------------------------------------- - - // Set a new ID for this reg request... - - $regid = md5( uniqid(microtime()) ); - - if( $this->ipsclass->vars['bot_antispam'] == 'gd' ) - { - //----------------------------------------- - // Get 6 random chars - //----------------------------------------- - - $reg_code = strtoupper( substr( md5($regid), 0, 6 ) ); - } - else - { - //----------------------------------------- - // Set a new 6 character numerical string - //----------------------------------------- - - mt_srand ((double) microtime() * 1000000); - - $reg_code = mt_rand(100000,999999); - } - - // Insert into the DB - - $this->ipsclass->DB->do_insert( 'reg_antispam', array ( - 'regid' => $regid, - 'regcode' => $reg_code, - 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], - 'ctime' => time(), - ) ); - } - - $msg = $msg ? $this->ipsclass->lang[$msg] : ''; - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->email_change($txt, $msg); - - if ($this->ipsclass->vars['bot_antispam']) - { - - if ($this->ipsclass->vars['bot_antispam'] == 'gd') - { - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_ucp']->email_change_gd($regid), $this->output ); - } - else - { - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_ucp']->email_change_img($regid), $this->output ); - } - - } - - $this->page_title = $this->ipsclass->lang['t_welcome']; - $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); - } - - /*-------------------------------------------------------------------------*/ - // COMPLETE EMAIL ADDRESS CHANGE - /*-------------------------------------------------------------------------*/ - - function do_email_change() - { - //----------------------------------------- - // Check input - //----------------------------------------- - - if ($_POST['in_email_1'] == "") - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'complete_form' ) ); - } - - if ($_POST['in_email_2'] == "") - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_guests' ) ); - } - - //----------------------------------------- - // Authorizing? - //----------------------------------------- - - /*if ($this->ipsclass->member['mgroup'] == $this->ipsclass->vars['auth_group']) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'email_change_v' ) ); - }*/ - - //----------------------------------------- - // Check password... - //----------------------------------------- - - $this->ipsclass->converge->converge_load_member($this->ipsclass->member['email']); - - if ( $this->ipsclass->converge->converge_authenticate_member( md5($this->ipsclass->input['password']) ) != TRUE ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'wrong_pass' ) ); - } - - //----------------------------------------- - // Test email addresses - //----------------------------------------- - - $email_one = strtolower( trim($this->ipsclass->input['in_email_1']) ); - $email_two = strtolower( trim($this->ipsclass->input['in_email_2']) ); - - if ($email_one != $email_two) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'email_addy_mismatch' ) ); - } - - $email_one = $this->ipsclass->clean_email($email_one); - - if ( $email_one == "" ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'invalid_email' ) ); - } - - //----------------------------------------- - // Is this email addy taken? - //----------------------------------------- - - if ( $this->ipsclass->converge->converge_check_for_member_by_email( $email_one ) == TRUE ) - { - $this->ipsclass->Error( array( LEVEL => 1, MSG => 'email_exists' ) ); - } - - //----------------------------------------- - // Load ban filters - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'banfilters' ) ); - $this->ipsclass->DB->simple_exec(); - - while( $r = $this->ipsclass->DB->fetch_row() ) - { - $banfilters[ $r['ban_type'] ][] = $r['ban_content']; - } - - //----------------------------------------- - // Check in banned list - //----------------------------------------- - - if ( isset($banfilters['email']) AND is_array( $banfilters['email'] ) and count( $banfilters['email'] ) ) - { - foreach ( $banfilters['email'] as $email ) - { - $email = str_replace( "\*", '.*' , preg_quote($email, "/") ); - - if ( preg_match( "/^{$email}$/i", $email_one ) ) - { - $this->ipsclass->Error( array( LEVEL => 1, MSG => 'email_exists' ) ); - } - } - } - - //----------------------------------------- - // Anti bot flood... - //----------------------------------------- - - if ($this->ipsclass->vars['bot_antispam']) - { - //----------------------------------------- - // Check the security code: - //----------------------------------------- - - if ($this->ipsclass->input['regid'] == "") - { - $this->email_change('err_security_code'); - return ""; - } - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'reg_antispam', - 'where' => "regid='".trim($this->ipsclass->txt_alphanumerical_clean($this->ipsclass->input['regid']))."'" - ) ); - - $this->ipsclass->DB->simple_exec(); - - if ( ! $row = $this->ipsclass->DB->fetch_row() ) - { - $this->email_change('err_security_code'); - return ""; - } - - if ( trim( $this->ipsclass->txt_alphanumerical_clean($this->ipsclass->input['reg_code']) ) != $row['regcode'] ) - { - $this->email_change('err_security_code'); - return ""; - } - - $this->ipsclass->DB->do_delete( 'reg_antispam', "regid='".trim($this->ipsclass->txt_alphanumerical_clean($this->ipsclass->input['regid']))."'" ); - } - - //----------------------------------------- - // Update converge... - //----------------------------------------- - - $this->ipsclass->converge->converge_update_member( $this->ipsclass->member['email'], $email_one ); - - //----------------------------------------- - // Update dupemail - //----------------------------------------- - - if ( $this->ipsclass->member['bio'] == 'dupemail' ) - { - $this->ipsclass->DB->do_update( 'member_extra', array( 'bio' => '' ), 'id='.$this->ipsclass->member['id'] ); - } - - //----------------------------------------- - // Use sync module? - //----------------------------------------- - - if ( USE_MODULES == 1 ) - { - $this->modules->register_class($this); - $this->modules->on_email_change($this->ipsclass->member['id'], $email_one); - } - - //----------------------------------------- - // Require new validation? NON ADMINS ONLY - //----------------------------------------- - - if ($this->ipsclass->vars['reg_auth_type'] AND ! $this->ipsclass->member['g_access_cp'] ) - { - $validate_key = md5( $this->ipsclass->make_password() . time() ); - - //----------------------------------------- - // Update the new email, but enter a validation key - // and put the member in "awaiting authorisation" - // and send an email.. - //----------------------------------------- - - $db_str = array( - 'vid' => $validate_key, - 'member_id' => $this->ipsclass->member['id'], - #'real_group' => $this->ipsclass->member['mgroup'], - 'temp_group' => $this->ipsclass->vars['auth_group'], - 'entry_date' => time(), - 'coppa_user' => 0, - 'email_chg' => 1, - 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], - 'prev_email' => $this->ipsclass->member['email'], - ); - - $this->ipsclass->DB->do_insert( 'validating', $db_str ); - - $this->ipsclass->DB->do_update( 'members' , array( - 'mgroup' => $this->ipsclass->vars['auth_group'], - 'email' => $email_one, - ), 'id='.$this->ipsclass->member['id'] - ); - - //----------------------------------------- - // Update their session with the new member group - //----------------------------------------- - - if ( $this->ipsclass->session_id ) - { - $this->ipsclass->DB->do_update( 'sessions', array( 'member_name' => '', - 'member_id' => 0, - 'member_group' => $this->ipsclass->vars['guest_group'] - ), "member_id=".$this->ipsclass->member['id']." and id='".$this->ipsclass->session_id."'" - ); - } - - //----------------------------------------- - // Kill the cookies to stop auto log in - //----------------------------------------- - - $this->ipsclass->my_setcookie( 'pass_hash' , '-1', 0 ); - $this->ipsclass->my_setcookie( 'member_id' , '-1', 0 ); - $this->ipsclass->my_setcookie( 'session_id' , '-1', 0 ); - - //----------------------------------------- - // Get the emailer module - //----------------------------------------- - - require ROOT_PATH."sources/classes/class_email.php"; - - $this->email = new emailer(); - $this->email->ipsclass =& $this->ipsclass; - $this->email->email_init(); - - //----------------------------------------- - // Dispatch the mail, and return to the activate form. - //----------------------------------------- - - $this->email->get_template("newemail"); - - $this->email->build_message( array( - 'NAME' => $this->ipsclass->member['members_display_name'], - 'THE_LINK' => $this->ipsclass->base_url_nosess."?act=Reg&CODE=03&type=newemail&uid=".$this->ipsclass->member['id']."&aid=".$validate_key, - 'ID' => $this->ipsclass->member['id'], - 'MAN_LINK' => $this->ipsclass->base_url_nosess."?act=Reg&CODE=07", - 'CODE' => $validate_key, - ) - ); - - $this->email->subject = $this->ipsclass->lang['lp_subject'].' '.$this->ipsclass->vars['board_name']; - $this->email->to = $email_one; - - $this->email->send_mail(); - - $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['ce_redirect'], 'act=Reg&CODE=07' ); - } - else - { - //----------------------------------------- - // No authorisation needed, change email addy and return - //----------------------------------------- - - $this->ipsclass->DB->do_update( 'members', array( 'email' => $email_one ), 'id='.$this->ipsclass->member['id'] ); - - $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['email_changed_now'], 'act=UserCP&CODE=00' ); - } - } - - /*-------------------------------------------------------------------------*/ - // tracker: - // - // Print the subscribed topics listings - /*-------------------------------------------------------------------------*/ - - function tracker() - { - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->subs_header(); - - //----------------------------------------- - // Remap... - //----------------------------------------- - - $remap = array( 'none' => 'subs_none_title', - 'immediate' => 'subs_immediate', - 'delayed' => 'subs_delayed', - 'daily' => 'subs_daily', - 'weekly' => 'subs_weekly' - ); - - //----------------------------------------- - // Get forums module - //----------------------------------------- - - require_once( ROOT_PATH.'sources/action_public/forums.php' ); - $this->forums = new forums(); - $this->forums->ipsclass =& $this->ipsclass; - - $this->forums->init(); - - //----------------------------------------- - // Are we checking for auto-prune? - //----------------------------------------- - - $auto_explain = $this->ipsclass->lang['no_auto_prune']; - - if ($this->ipsclass->vars['subs_autoprune'] > 0) - { - $auto_explain = sprintf( $this->ipsclass->lang['auto_prune'], $this->ipsclass->vars['subs_autoprune'] ); - } - - //----------------------------------------- - // Do we have an incoming date cut? - //----------------------------------------- - - $this->ipsclass->input['datecut'] = isset($this->ipsclass->input['datecut']) ? intval($this->ipsclass->input['datecut']) : 0; - - $date_cut = $this->ipsclass->input['datecut'] ? $this->ipsclass->input['datecut'] : 30; - - $date_query = $date_cut != 1000 ? " AND t.last_post > '".(time() - ($date_cut*86400))."' " : ""; - - //----------------------------------------- - // Get read topic markers - //----------------------------------------- - - if ( $this->ipsclass->vars['db_topic_read_cutoff'] ) - { - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'topic_markers', - 'where' => "marker_member_id=".$this->ipsclass->member['id'], - ) ); - - $this->ipsclass->DB->simple_exec(); - - $topic_array = array(); - $forum_array = array(); - - while( $db_row = $this->ipsclass->DB->fetch_row() ) - { - $markers_read = ""; - $markers_read = unserialize(stripslashes($db_row['marker_topics_read']) ); - - //----------------------------------------- - // Got read topics? - //----------------------------------------- - - if ( is_array( $markers_read ) and count( $markers_read ) ) - { - foreach( $markers_read as $tid => $date ) - { - $topic_array[ $tid ]['db_read'] = $date > $db_row['marker_last_cleared'] ? $date : $db_row['marker_last_cleared']; - } - } - else if( is_array( $markers_read ) and !count ( $markers_read ) ) - { - $forum_array[] = $db_row['marker_forum_id']; - } - } - } - - //----------------------------------------- - // Query the DB for the subby toppy-ics - at the same time - // we get the forum and topic info, 'cos we rule. - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'ucp_get_topic_tracker', array( 'mid' => $this->ipsclass->member['id'], 'date_query' => $date_query ) ); - $this->ipsclass->DB->cache_exec_query(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - $last_forum_id = -1; - - while( $topic = $this->ipsclass->DB->fetch_row() ) - { - $topic['db_read'] = $topic_array[$topic['tid']]['db_read'] ? $topic_array[$topic['tid']]['db_read'] : 0; - - if( $topic['db_read'] == 0 ) - { - $topic['db_read'] = in_array($topic['forum_id'], $forum_array ) ? time() : 0; - } - - //----------------------------------------- - // Got perms to see this forum? - //----------------------------------------- - - if ( ! $this->ipsclass->forums->forum_by_id[ $topic['forum_id'] ] ) - { - continue; - } - - if ( $last_forum_id != $topic['forum_id'] ) - { - $last_forum_id = $topic['forum_id']; - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->subs_forum_row($topic['forum_id'], $topic['forum_name']); - } - - $topic['last_post_date'] = $this->ipsclass->get_date( $topic['last_post'], 'LONG' ); - - if ( $topic['description'] ) - { - $topic['description'] .= "
    "; - } - - $topic['track_started'] = $this->ipsclass->get_date( $topic['track_started'], 'LONG' ); - - $topic = $this->forums->parse_data($topic); - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->subs_row($topic, $remap[ $topic['topic_track_type'] ]); - } - - } - else - { - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->subs_none(); - } - - // Build date box - - $date_box = "\n"; - - foreach( array( 1,7,14,21,30,60,90,365 ) as $day ) - { - $selected = $day == $date_cut ? ' selected="selected"' : ''; - - $date_box .= "\n"; - } - - if ( $date_cut == 1000 ) - { - $date_box .= "\n"; - } - else - { - $date_box .= "\n"; - } - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->subs_end($auto_explain, $date_box); - - $this->page_title = $this->ipsclass->lang['t_welcome']; - $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); - - } - - /*-------------------------------------------------------------------------*/ - // UPDATE TRACKER - /*-------------------------------------------------------------------------*/ - - function do_update_tracker() - { - //----------------------------------------- - // Get the ID's to delete - //----------------------------------------- - - if ($this->ipsclass->input['request_method'] != 'post') - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'poss_hack_attempt' ) ); - } - - $ids = array(); - - foreach ($this->ipsclass->input as $key => $value) - { - if ( preg_match( "/^id-(\d+)$/", $key, $match ) ) - { - if ($this->ipsclass->input[$match[0]]) - { - $ids[] = $match[1]; - } - } - } - - $ids = $this->ipsclass->clean_int_array( $ids ); - - $allowed = array( 'none', 'immediate', 'delayed', 'daily', 'weekly' ); - - //----------------------------------------- - // what we doing? - //----------------------------------------- - - if ( count($ids) > 0 ) - { - if ( $this->ipsclass->input['trackchoice'] == 'unsubscribe' ) - { - $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'tracker', 'where' => "member_id='".$this->ipsclass->member['id']."' and trid IN (".implode( ",", $ids ).")" ) ); - } - else if ( in_array( $this->ipsclass->input['trackchoice'], $allowed ) ) - { - $this->ipsclass->DB->do_update( 'tracker', array( 'topic_track_type' => $this->ipsclass->input['trackchoice'] ), "trid IN (".implode( ",", $ids ).")" ); - } - } - - $this->ipsclass->boink_it($this->ipsclass->base_url."act=UserCP&CODE=26"); - - } - - - /*-------------------------------------------------------------------------*/ - // BOARD PREFS: - // - // Set up view avatar, sig, time zone, etc. - /*-------------------------------------------------------------------------*/ - - function board_prefs() - { - $time = $this->ipsclass->get_date( time(), 'LONG', 1 ); - - //----------------------------------------- - // Do we have a user stored offset, or use the board default: - //----------------------------------------- - - $offset = ( $this->ipsclass->member['time_offset'] != "" ) ? $this->ipsclass->member['time_offset'] : $this->ipsclass->vars['time_offset']; - - $time_select = ""; - - //----------------------------------------- - // DST IN USE? - //----------------------------------------- - - if ($this->ipsclass->member['dst_in_use']) - { - $dst_check = 'checked="checked"'; - } - else - { - $dst_check = ''; - } - - //----------------------------------------- - // DST CORRECTION IN USE? - //----------------------------------------- - - if ($this->ipsclass->member['members_auto_dst']) - { - $dst_correction = 'checked="checked"'; - } - else - { - $dst_correction = ''; - } - - //----------------------------------------- - // Post page contents - //----------------------------------------- - - if ($this->ipsclass->vars['postpage_contents'] == "") - { - $this->ipsclass->vars['postpage_contents'] = '5,10,15,20,25,30,35,40'; - } - - if ($this->ipsclass->vars['topicpage_contents'] == "") - { - $this->ipsclass->vars['topicpage_contents'] = '5,10,15,20,25,30,35,40'; - } - - list($post_page, $topic_page) = explode( "&", $this->ipsclass->member['view_prefs'] ); - - if ($post_page == "") - { - $post_page = -1; - } - if ($topic_page == "") - { - $topic_page = -1; - } - - $pp_a = array(); - $tp_a = array(); - $post_select = ""; - $topic_select = ""; - - $pp_a[] = array( '-1', $this->ipsclass->lang['pp_use_default'] ); - $tp_a[] = array( '-1', $this->ipsclass->lang['pp_use_default'] ); - - foreach( explode( ',', $this->ipsclass->vars['postpage_contents'] ) as $n ) - { - $n = intval(trim($n)); - $pp_a[] = array( $n, $n ); - } - - foreach( explode( ',', $this->ipsclass->vars['topicpage_contents'] ) as $n ) - { - $n = intval(trim($n)); - $tp_a[] = array( $n, $n ); - } - - //----------------------------------------- - // Select boxes - //----------------------------------------- - - foreach( $pp_a as $data ) - { - $post_select .= ($data[0] == $post_page) ? "\n" : "\n"; - } - - foreach( $tp_a as $data ) - { - $topic_select .= ($data[0] == $topic_page) ? "\n" : "\n"; - } - - //----------------------------------------- - // Print header - //----------------------------------------- - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->settings_header($this->member, $time_select, $time, $dst_check, $this->md5_check, $dst_correction); - - //----------------------------------------- - // Cookie settings - //----------------------------------------- - - $hide_sess = $this->ipsclass->my_getcookie('hide_sess'); - $open_qreply = $this->ipsclass->member['_cache']['qr_open']; - - if ( $open_qreply == FALSE ) - { - $open_qreply = 0; - } - - //----------------------------------------- - // RTE : STD - //----------------------------------------- - - $editor_choice = ""; - - //----------------------------------------- - // View avatars, signatures and images.. - //----------------------------------------- - - $view_ava = ""; - $view_img = ""; - $html_sess = ""; - $disable_pm = "", - 'SIG' => $view_sig."", - 'AVA' => $view_ava."", - 'POP' => $view_pop."", - 'SESS' => $html_sess."", - 'QR' => $html_qr."", - 'PMS' => $disable_pm."", - 'TPS' => $topic_select, - 'PPS' => $post_select, - 'editor' => $editor_choice, - ) ); - - $this->page_title = $this->ipsclass->lang['t_welcome']; - $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); - - } - - - /*-------------------------------------------------------------------------*/ - // EMAIL SETTINGS: - // - // Set up the email stuff. - /*-------------------------------------------------------------------------*/ - - function email_settings() - { - // PM_REMINDER: First byte = Email PM when received new - // Second byte= Show pop-up when new PM received - - - $info = array(); - - foreach ( array('hide_email', 'allow_admin_mails', 'email_full', 'email_pm', 'auto_track') as $k ) - { - if (!empty($this->ipsclass->member[ $k ])) - { - $info[$k] = 'checked="checked"'; - } - else - { - $info[$k] = ''; - } - } - - $info['key'] = $this->md5_check; - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->email($info); - - //----------------------------------------- - // Update select box - //----------------------------------------- - - $this->output = str_replace( ""; - $mon = ""; - $year = ""; - - for ( $i = 1 ; $i < 32 ; $i++ ) - { - $day .= "" : ">$i"; - } - - for ( $i = 1 ; $i < 13 ; $i++ ) - { - $mon .= "" : ">{$this->ipsclass->lang['month'.$i]}"; - } - - $i = $date['year'] - 1; - $j = $date['year'] - 100; - - for ( $i ; $j < $i ; $i-- ) - { - $year .= "" : ">$i"; - } - - //----------------------------------------- - // Get custom profile information - //----------------------------------------- - - require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); - $fields = new custom_fields( $this->ipsclass->DB ); - - $fields->member_id = $this->ipsclass->member['id']; - $fields->mem_data_id = $this->ipsclass->member['id']; - $fields->cache_data = $this->ipsclass->cache['profilefields']; - $fields->admin = intval($this->ipsclass->member['g_access_cp']); - $fields->supmod = intval($this->ipsclass->member['g_is_supmod']); - - $fields->init_data(); - $fields->parse_to_edit(); - - foreach( $fields->out_fields as $id => $data ) - { - if ( $fields->cache_data[ $id ]['pf_not_null'] == 1 ) - { - $ftype = 'required_output'; - } - else - { - $ftype = 'optional_output'; - } - - if ( $fields->cache_data[ $id ]['pf_type'] == 'drop' ) - { - $form_element = $this->ipsclass->compiled_templates['skin_ucp']->field_dropdown( 'field_'.$id, $data ); - } - else if ( $fields->cache_data[ $id ]['pf_type'] == 'area' ) - { - $form_element = $this->ipsclass->compiled_templates['skin_ucp']->field_textarea( 'field_'.$id, $data ); - } - else - { - $form_element = $this->ipsclass->compiled_templates['skin_ucp']->field_textinput( 'field_'.$id, $data ); - } - - ${$ftype} .= $this->ipsclass->compiled_templates['skin_ucp']->field_entry( $fields->field_names[ $id ], $fields->field_desc[ $id ], $form_element ); - } - - //----------------------------------------- - // Format the interest / location boxes - //----------------------------------------- - - $this->ipsclass->member['location'] = $this->parser->pre_edit_parse( $this->ipsclass->member['location'] ); - $this->ipsclass->member['interests'] = $this->parser->pre_edit_parse( $this->ipsclass->member['interests'] ); - $this->ipsclass->member['key'] = $this->md5_check; - - $this->ipsclass->member['icq_number'] = $this->ipsclass->member['icq_number'] > 0 ? $this->ipsclass->member['icq_number'] : ''; - - //----------------------------------------- - // Suck up the HTML and swop some tags if need be - //----------------------------------------- - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->personal_panel( $this->ipsclass->member, $required_output, $optional_output, $day, $mon, $year ); - - $this->page_title = $this->ipsclass->lang['t_welcome']; - $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); - } - - - /*-------------------------------------------------------------------------*/ - // SPLASH (no, not the movie starring Tom Hanks) - /*-------------------------------------------------------------------------*/ - - function splash() - { - //----------------------------------------- - // Format the basic data - //----------------------------------------- - - $info['member_email'] = $this->ipsclass->member['email']; - $info['date_registered'] = $this->ipsclass->get_date( $this->ipsclass->member['joined'], 'LONG' ); - $info['member_posts'] = $this->ipsclass->member['posts']; - $info['topic_html'] = ""; - $info['attach_html'] = ""; - - $info['daily_average'] = $this->ipsclass->lang['no_posts']; - - if ($this->ipsclass->member['posts'] > 0 ) - { - $diff = time() - $this->ipsclass->member['joined']; - $days = ($diff / 3600) / 24; - $days = $days < 1 ? 1 : $days; - $info['daily_average'] = sprintf('%.2f', ($this->ipsclass->member['posts'] / $days) ); - } - - //----------------------------------------- - // Grab the last 5 read topics - //----------------------------------------- - - $topic_array = array(); - $final_array = array(); - - $topics = $this->ipsclass->my_getcookie( 'topicsread' ); - $topics = unserialize(stripslashes( $topics ) ); - - $tmp = $this->ipsclass->vars['db_topic_read_cutoff']; - $this->ipsclass->vars['db_topic_read_cutoff'] = 0; - - if ( is_array( $topics ) and count( $topics ) ) - { - arsort($topics); - - $topic_array = array_slice( array_keys( $topics ), 0, 5 ); - $topic_array = $this->ipsclass->clean_int_array( $topic_array ); - - if ( count( $topic_array ) ) - { - $this->ipsclass->member['is_mod'] = isset($this->ipsclass->member['is_mod']) ? $this->ipsclass->member['is_mod'] : 0; - - //----------------------------------------- - // Grab libraries - //----------------------------------------- - - require_once( ROOT_PATH."sources/action_public/forums.php" ); - $this->forums = new forums(); - $this->forums->ipsclass =& $this->ipsclass; - - $this->forums->init(); - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'topics', - 'where' => 'tid IN ('.implode(",",$topic_array).')', - 'limit' => array(0,5) ) ); - - $this->ipsclass->DB->simple_exec(); - - while ( $row = $this->ipsclass->DB->fetch_row() ) - { - if ( isset($this->ipsclass->forums->forum_by_id[ $row['forum_id'] ]) AND $this->ipsclass->forums->forum_by_id[ $row['forum_id'] ] ) - { - $topic = $this->forums->parse_data( $row ); - $final_array[ $row['tid'] ] = $this->ipsclass->compiled_templates['skin_forum']->render_forum_row( $topic ); - } - } - - foreach( $topic_array as $tid ) - { - $info['topic_html'] .= isset($final_array[ $tid ]) ? $final_array[ $tid ] : ''; - } - } - } - - $this->ipsclass->vars['db_topic_read_cutoff'] = $tmp; - - //----------------------------------------- - // Grab the last 5 attachments - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'attachments', - 'where' => 'attach_member_id='.$this->ipsclass->member['id'], - 'order' => 'attach_date desc', - 'limit' => array( 0, 5 ) ) ); - - $this->ipsclass->DB->simple_exec(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - $this->ipsclass->load_template( 'skin_topic' ); - - $this->ipsclass->load_language('lang_topic'); - - while ( $row = $this->ipsclass->DB->fetch_row() ) - { - //----------------------------------------- - // Full attachment thingy - //----------------------------------------- - - $info['attach_html'] .= $this->ipsclass->compiled_templates['skin_topic']->Show_attachments( array ( - 'attach_hits' => $row['attach_hits'], - 'mime_image' => $this->ipsclass->cache['attachtypes'][ $row['attach_ext'] ]['atype_img'], - 'attach_file' => $row['attach_file'], - 'attach_id' => $row['attach_id'], - 'type' => $row['attach_rel_module'], - 'file_size' => $this->ipsclass->size_format( $row['attach_filesize'] ), - ) ); - } - } - - //----------------------------------------- - // Write the data.. - //----------------------------------------- - - $s_array = array( 's' => 5 , - 'm' => 7 , - 'l' => 15 - ); - - $info['NOTES'] = $this->notes ? $this->notes : $this->ipsclass->lang['note_pad_empty']; - - $info['SIZE'] = $s_array[$this->size]; - - $info['SIZE_CHOICE'] = ""; - - //----------------------------------------- - // If someone has cheated, fix it now. - //----------------------------------------- - - if ( empty($info['SIZE']) ) - { - $info['SIZE'] = '5'; - } - - //----------------------------------------- - // Make the choice HTML. - //----------------------------------------- - - foreach ($s_array as $k => $v) - { - if ($v == $info['SIZE']) - { - $info['SIZE_CHOICE'] .= ""; - } - else - { - $info['SIZE_CHOICE'] .= ""; - } - } - - $info['NOTES'] = $this->ipsclass->my_br2nl( $info['NOTES'] ); - - $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->splash($info); - - $this->page_title = $this->ipsclass->lang['t_welcome']; - $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); - } - - - - /*-------------------------------------------------------------------------*/ - // UPDATE_NOTEPAD: - // - // Displays the intro screen - /*-------------------------------------------------------------------------*/ - - function update_notepad() - { - // Do we have an entry for this member? - - if ($_POST['act'] == "") - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'complete_form' ) ); - } - - - $this->ipsclass->DB->simple_construct( array( 'select' => 'id', 'from' => 'member_extra', 'where' => "id=".$this->ipsclass->member['id'] ) ); - $this->ipsclass->DB->simple_exec(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - $this->ipsclass->DB->do_update( 'member_extra', array( 'notes' => $this->ipsclass->input['notes'], 'ta_size' => $this->ipsclass->input['ta_size'] ), 'id='.$this->ipsclass->member['id'] ); - } - else - { - $this->ipsclass->DB->do_insert( 'member_extra', array( 'notes' => $this->ipsclass->input['notes'], 'ta_size' => $this->ipsclass->input['ta_size'], 'id' => $this->ipsclass->member['id'] ) ); - } - - $this->ipsclass->boink_it($this->ipsclass->base_url."act=UserCP&CODE=00"); - } - - - function show_image() - { - if ( $this->ipsclass->input['rc'] == "" ) - { - return false; - } - - // Get the info from the db - - $row = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'reg_antispam', 'where' => "regid='".trim($this->ipsclass->txt_alphanumerical_clean($this->ipsclass->input['rc']))."'" ) ); - - if ( ! $row['regid'] ) - { - return false; - } - - //----------------------------------------- - // Using GD? - //----------------------------------------- - - if ( $this->ipsclass->vars['bot_antispam'] == 'gd' ) - { - $this->ipsclass->show_gd_img($row['regcode']); - } - else - { - - //----------------------------------------- - // Using normal then, check for "p" - //----------------------------------------- - - if ( $this->ipsclass->input['p'] == "" ) - { - return false; - } - - $p = intval($this->ipsclass->input['p']) - 1; //substr starts from 0, not 1 :p - - $this_number = substr( $row['regcode'], $p, 1 ); - - $this->ipsclass->show_gif_img($this_number); - } - - } - -} - + $Date: 2008-10-02 12:04:59 -0400 (Thu, 02 Oct 2008) $ +| > $Revision: 2573 $ +| > $Author: matt $ ++--------------------------------------------------------------------------- +| +| > UserCP functions +| > Module written by Matt Mecham +| > Date started: 14th February 2002 +| +| > Module Version Number: 1.0.0 +| > DBA Checked: Thu 20 May 2004 +| > Quality Checked: Wed 15 Sept. 2004 ++-------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class usercp +{ + var $ipsclass; + var $han_editor = ""; + + var $output = ""; + var $page_title = ""; + var $nav = array(); + var $html = ""; + + var $member = array(); + var $m_group = array(); + + var $jump_html = ""; + var $parser = ""; + + var $links = array(); + + var $bio = ""; + var $notes = ""; + var $size = "m"; + + var $email = ""; + var $md5_check = ""; + + var $modules = ""; + + var $lib; + + /*-------------------------------------------------------------------------*/ + // Init Editor & Parser + /*-------------------------------------------------------------------------*/ + + function init_parser() + { + if ( ! is_object( $this->han_editor ) ) + { + //----------------------------------------- + // Load and config the std/rte editors + //----------------------------------------- + + require_once( ROOT_PATH."sources/handlers/han_editor.php" ); + $this->han_editor = new han_editor(); + $this->han_editor->ipsclass =& $this->ipsclass; + $this->han_editor->init(); + } + + if ( ! is_object( $this->parser ) ) + { + //----------------------------------------- + // Load parser + //----------------------------------------- + + require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); + $this->parser = new parse_bbcode(); + $this->parser->ipsclass =& $this->ipsclass; + $this->parser->allow_update_caches = 1; + + $this->parser->bypass_badwords = intval($this->ipsclass->member['g_bypass_badwords']); + } + } + + /*-------------------------------------------------------------------------*/ + // Run! + /*-------------------------------------------------------------------------*/ + + function auto_run() + { + //----------------------------------------- + // Prep form check + //----------------------------------------- + + $this->md5_check = $this->ipsclass->return_md5_check(); + + //----------------------------------------- + // Get the sync module + //----------------------------------------- + + if ( USE_MODULES == 1 ) + { + require ROOT_PATH."modules/ipb_member_sync.php"; + + $this->modules = new ipb_member_sync(); + $this->modules->ipsclass =& $this->ipsclass; + } + + //----------------------------------------- + // Require the HTML and language modules + //----------------------------------------- + + $this->ipsclass->load_language('lang_post'); + $this->ipsclass->load_language('lang_ucp'); + $this->ipsclass->load_template('skin_ucp'); + + $this->ipsclass->base_url_nosess = "{$this->ipsclass->vars['board_url']}/index.{$this->ipsclass->vars['php_ext']}"; + + //----------------------------------------- + // Check viewing permissions, etc + //----------------------------------------- + + if ( ! $this->ipsclass->member['id'] ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_guests' ) ); + } + + //----------------------------------------- + // INIT da func + //----------------------------------------- + + require ROOT_PATH."sources/lib/func_usercp.php"; + $this->lib = new func_usercp(); + $this->lib->class =& $this; + $this->lib->ipsclass =& $this->ipsclass; + + //----------------------------------------- + // Print menu + //----------------------------------------- + + $this->ipsclass->print->add_output( $this->lib->ucp_generate_menu() ); + + //----------------------------------------- + // Set sizes + //----------------------------------------- + + $this->links = $this->ipsclass->member['links']; + $this->notes = $this->ipsclass->member['notes']; + $this->size = $this->ipsclass->member['ta_size'] ? $this->ipsclass->member['ta_size'] : $this->size; + + //----------------------------------------- + // What to do? + //----------------------------------------- + + switch($this->ipsclass->input['CODE']) + { + case '00': + $this->splash(); + break; + case '01': + $this->personal(); + break; + //----------------------------------------- + case '02': + $this->email_settings(); + break; + case '03': + $this->lib->do_email_settings(); + break; + //----------------------------------------- + case '04': + $this->board_prefs(); + break; + case '05': + $this->lib->do_board_prefs(); + break; + //----------------------------------------- + case '08': + $this->email_change(); + break; + case '09': + $this->do_email_change(); + break; + //----------------------------------------- + case '21': + $this->lib->do_profile(); + break; + case '20': + $this->update_notepad(); + break; + //----------------------------------------- + case '22': + $this->signature(); + break; + case '23': + $this->lib->do_signature(); + break; + //----------------------------------------- + case '24': + $this->avatar(); + break; + case '25': + $this->lib->do_avatar(); + break; + //----------------------------------------- + case '26': + $this->tracker(); + break; + case '27': + $this->do_update_tracker(); + break; + //----------------------------------------- + case '28': + $this->pass_change(); + break; + case '29': + $this->do_pass_change(); + break; + //----------------------------------------- + case '50': + $this->forum_tracker(); + break; + case '51': + $this->remove_forum_tracker(); + break; + //----------------------------------------- + case 'ignore': + $this->ignore_user_splash(); + break; + case 'ignoreadd': + $this->lib->ignore_user_add(); + break; + case 'ignoreremove': + $this->lib->ignore_user_remove(); + break; + //----------------------------------------- + case 'show_image': + $this->show_image(); + break; + case 'photo': + $this->photo(); + break; + case 'dophoto': + $this->lib->do_photo(); + break; + case 'getgallery': + $this->avatar_gallery(); + break; + case 'setinternalavatar': + $this->lib->set_internal_avatar(); + break; + case 'attach': + $this->attachments(); + break; + //----------------------------------------- + // Mod tools + //----------------------------------------- + case 'iptool': + $this->mod_ip_tool_start(); + break; + case 'doiptool': + $this->mod_ip_tool_complete(); + break; + case 'memtool': + $this->mod_find_user_start(); + break; + case 'domemtool': + $this->mod_find_user_complete(); + break; + case 'announce_start': + $this->mod_announce_start(); + break; + case 'announce_add': + $this->mod_announce_form('add'); + break; + case 'announce_save': + $this->mod_announce_save(); + break; + case 'announce_edit': + $this->mod_announce_form('edit'); + break; + case 'announce_delete': + $this->mod_announce_delete(); + break; + //----------------------------------------- + // Subs(ways)? + //----------------------------------------- + case 'start_subs': + $this->lib->subs_choose(); + break; + case 'end_subs': + $this->lib->subs_choose('save'); + break; + //----------------------------------------- + // Display name change + //----------------------------------------- + case 'dname_start': + $this->display_name_change(); + break; + case 'dname_complete': + $this->display_name_complete(); + break; + //----------------------------------------- + // Personal portal form.. + //----------------------------------------- + case 'personal_portal_form': + $this->personal_portal_form(); + break; + case 'personal_portal_save': + $this->personal_portal_save(); + break; + + case 'about_me_form': + $this->about_me_form(); + break; + case 'about_me_save': + $this->about_me_save(); + break; + + case 'manage_friends': + $this->manage_friends(); + break; + default: + $this->splash(); + break; + } + + //----------------------------------------- + // If we have any HTML to print, do so... + //----------------------------------------- + + $fj = $this->ipsclass->build_forum_jump(); + $fj = str_replace( "#Forum Jump#", $this->ipsclass->lang['forum_jump'], $fj); + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->CP_end(); + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->forum_jump( $fj ); + + $this->ipsclass->print->add_output( $this->output ); + $this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 1, 'NAV' => $this->nav ) ); + } + + + /*-------------------------------------------------------------------------*/ + // "About Me" form + /*-------------------------------------------------------------------------*/ + + /** + * About me form + * + * @return void + * @since IPB 2.3.5.2007-01-16 + */ + function about_me_form() + { + //----------------------------------------- + // Check to make sure that we can edit profiles.. + //----------------------------------------- + + if ( empty($this->ipsclass->member['g_edit_profile']) ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cant_use_feature' ) ); + } + + $this->init_parser(); + + $aboutme = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'pp_about_me', 'from' => 'profile_portal', 'where' => 'pp_member_id=' . $this->ipsclass->member['id'] ) ); + + //----------------------------------------- + // Unconvert for editing + //----------------------------------------- + + if ( $this->han_editor->method == 'rte' ) + { + $am_text = $this->parser->convert_ipb_html_to_html( $aboutme['pp_about_me'] ); + } + else + { + $this->parser->parse_html = intval($this->ipsclass->vars['aboutme_html']); + $this->parser->parse_nl2br = 1; + $this->parser->parse_smilies = $this->ipsclass->vars['aboutme_emoticons']; + $this->parser->parse_bbcode = $this->ipsclass->vars['aboutme_bbcode']; + + $am_text = $this->parser->pre_edit_parse( $aboutme['pp_about_me'] ); + } + + //----------------------------------------- + // Remove side panel + //----------------------------------------- + + $this->han_editor->remove_side_panel = 1; + $this->han_editor->remove_emoticons = 1; + + //----------------------------------------- + // Show + //----------------------------------------- + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->aboutme( $aboutme['pp_about_me'], $this->han_editor->show_editor( $am_text, 'Post' ), $this->ipsclass->return_md5_check()); + + $this->page_title = $this->ipsclass->lang['t_welcome']; + $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); + } + + + /*-------------------------------------------------------------------------*/ + // Personal portal save + /*-------------------------------------------------------------------------*/ + + /** + * Personal portal save + * + * @return void + * @since IPB 2.2.0.2006-08-17 + */ + function about_me_save() + { + //----------------------------------------- + // Check to make sure that we can edit profiles.. + //----------------------------------------- + + if ( empty($this->ipsclass->member['g_edit_profile']) ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cant_use_feature' ) ); + } + + $this->init_parser(); + + $aboutme = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'pp_member_id, pp_about_me', 'from' => 'profile_portal', 'where' => 'pp_member_id=' . $this->ipsclass->member['id'] ) ); + + //----------------------------------------- + // Check key + //----------------------------------------- + + if ( $this->ipsclass->input['key'] != $this->ipsclass->return_md5_check() ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'del_post' ) ); + } + + //----------------------------------------- + // Remove board tags + //----------------------------------------- + + $this->ipsclass->input['Post'] = $this->ipsclass->remove_tags( $this->ipsclass->input['Post'] ); + + //----------------------------------------- + // Post process the editor + // Now we have safe HTML and bbcode + //----------------------------------------- + + $this->ipsclass->input['Post'] = $this->han_editor->process_raw_post( 'Post' ); + + //----------------------------------------- + // Parse post + //----------------------------------------- + + $this->parser->parse_smilies = intval($this->ipsclass->vars['aboutme_emoticons']); + $this->parser->parse_html = intval($this->ipsclass->vars['aboutme_html']); + $this->parser->parse_bbcode = intval($this->ipsclass->vars['aboutme_bbcode']); + $this->parser->parsing_signature = 1; + + $this->ipsclass->input['Post'] = $this->parser->bad_words( $this->parser->pre_display_parse( $this->parser->pre_db_parse( $this->ipsclass->input['Post'] ) ) ); + + if ($this->parser->error != "") + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => $this->parser->error) ); + } + + //----------------------------------------- + // Write it to the DB. + //----------------------------------------- + + if ( $aboutme['pp_member_id'] ) + { + $this->ipsclass->DB->do_update( 'profile_portal', array( 'pp_about_me' => $this->ipsclass->input['Post'] ), 'pp_member_id='.$this->ipsclass->member['id'] ); + } + else + { + $this->ipsclass->DB->do_insert( 'profile_portal', array( 'pp_member_id' => $this->ipsclass->member['id'], 'pp_about_me' => $this->ipsclass->input['Post'] ) ); + } + + //----------------------------------------- + // Buh BYE: + //----------------------------------------- + + $this->ipsclass->boink_it($this->ipsclass->base_url."act=UserCP&CODE=about_me_form&_saved=1&___msg=settings_updated"); + } + + + /*-------------------------------------------------------------------------*/ + // Manage friends + /*-------------------------------------------------------------------------*/ + + /** + * Manage friends + * + * @return void + * @since IPB 2.2.0.2006-08-17 + */ + function manage_friends() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $member_id = intval( $this->ipsclass->member['id'] ); + + //----------------------------------------- + // Get friends pending approval + //----------------------------------------- + + $friends = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as count', + 'from' => 'profile_friends', + 'where' => 'friends_friend_id='.$member_id.' AND friends_approved=0' ) ); + + //----------------------------------------- + // Ok.. show the settings + //----------------------------------------- + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->personal_manage_friends( intval( $friends['count'] ) ); + + $this->page_title = $this->ipsclass->lang['m_manage_friends']; + $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); + } + + /*-------------------------------------------------------------------------*/ + // Personal portal save + /*-------------------------------------------------------------------------*/ + + /** + * Personal portal save + * + * @return void + * @since IPB 2.2.0.2006-08-17 + */ + function personal_portal_save() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $member_id = intval( $this->ipsclass->member['id'] ); + $md5check = substr( $this->ipsclass->input['md5check'], 0, 32 ); + $pp_setting_notify_comments = trim( substr( $this->ipsclass->input['pp_setting_notify_comments'], 0, 10 ) ); + $pp_setting_notify_friend = trim( substr( $this->ipsclass->input['pp_setting_notify_friend'], 0, 10 ) ); + $pp_setting_moderate_comments = intval( $this->ipsclass->input['pp_setting_moderate_comments'] ); + $pp_setting_moderate_friends = intval( $this->ipsclass->input['pp_setting_moderate_friends'] ); + + if( !$this->ipsclass->member['g_use_pm'] ) + { + $pp_setting_notify_comments = ( $pp_setting_notify_comments == 'pm' ) ? 'none' : $pp_setting_notify_comments; + $pp_setting_notify_friend = ( $pp_setting_notify_friend == 'pm' ) ? 'none' : $pp_setting_notify_friend; + } + + if( $this->ipsclass->member['g_edit_profile'] ) + { + $pp_bio_content = $this->ipsclass->txt_mbsubstr( $this->ipsclass->my_nl2br( $this->ipsclass->input['pp_bio_content'] ), 0, 300 ); + } + + //----------------------------------------- + // Load profile lib + //----------------------------------------- + + require_once( ROOT_PATH . 'sources/action_public/profile.php' ); + $lib_profile = new profile; + $lib_profile->ipsclass =& $this->ipsclass; + + //----------------------------------------- + // MD5 check + //----------------------------------------- + + if ( $md5check != $this->ipsclass->return_md5_check() ) + { + $this->ipsclass->boink_it( $this->ipsclass->base_url . 'act=usercp&member_id='.$member_id.'&CODE=personal_portal_form&___msg=no_permission&md5check='.$this->ipsclass->md5_check ); + exit(); + } + + //----------------------------------------- + // Load member + //----------------------------------------- + + $member = $lib_profile->personal_function_load_member( $member_id ); + + + if( !$this->ipsclass->member['g_edit_profile'] ) + { + $pp_bio_content = $member['pp_bio_content']; + } + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( ! $member['id'] ) + { + $this->ipsclass->boink_it( $this->ipsclass->base_url . 'act=usercp&member_id='.$member_id.'&CODE=personal_portal_form&___msg=no_permission&md5check='.$this->ipsclass->md5_check ); + exit(); + } + + //----------------------------------------- + // Save... + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 'pp_member_id', + 'from' => 'profile_portal', + 'where' => "pp_member_id=".$member_id ) ); + $this->ipsclass->DB->simple_exec(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + # Update... + $this->ipsclass->DB->do_update( 'profile_portal', array( + 'pp_bio_content' => $pp_bio_content, + 'pp_setting_notify_comments' => $pp_setting_notify_comments, + 'pp_setting_notify_friend' => $pp_setting_notify_friend, + 'pp_setting_moderate_comments' => $pp_setting_moderate_comments, + 'pp_setting_moderate_friends' => $pp_setting_moderate_friends + ), 'pp_member_id='.$member_id ); + } + else + { + # Insert + $this->ipsclass->DB->do_insert( 'profile_portal', array( + 'pp_bio_content' => $pp_bio_content, + 'pp_member_id' => $member_id, + 'pp_setting_notify_comments' => $pp_setting_notify_comments, + 'pp_setting_notify_friend' => $pp_setting_notify_friend, + 'pp_setting_moderate_comments' => $pp_setting_moderate_comments, + 'pp_setting_moderate_friends' => $pp_setting_moderate_friends + ) ); + } + + //----------------------------------------- + // Done... + //----------------------------------------- + + $this->ipsclass->boink_it( $this->ipsclass->base_url . 'act=usercp&member_id='.$member_id.'&CODE=personal_portal_form&_saved=1&___msg=settings_updated&md5check='.$this->ipsclass->md5_check ); + + } + + /*-------------------------------------------------------------------------*/ + // Personal portal form + /*-------------------------------------------------------------------------*/ + + /** + * Personal portal form + * + * @return void + * @since IPB 2.2.0.2006-08-17 + */ + function personal_portal_form() + { + //----------------------------------------- + // Load language + //----------------------------------------- + + $this->ipsclass->load_language( 'lang_profile' ); + + //----------------------------------------- + // INIT + //----------------------------------------- + + $member_id = intval( $this->ipsclass->member['id'] ); + $content = ''; + $types = array( 'none' => $this->ipsclass->lang['op_dd_none'], + 'email' => $this->ipsclass->lang['op_dd_email'], + 'pm' => $this->ipsclass->lang['op_dd_pm'] ); + + if( !$this->ipsclass->member['g_use_pm'] ) + { + unset($types['pm']); + } + + $yes_no = array( '0' => $this->ipsclass->lang['op_dd_disabled'], + '1' => $this->ipsclass->lang['op_dd_enabled'] ); + + //----------------------------------------- + // Load profile lib + //----------------------------------------- + + require_once( ROOT_PATH . 'sources/action_public/profile.php' ); + $lib_profile = new profile; + $lib_profile->ipsclass =& $this->ipsclass; + + //----------------------------------------- + // Load member + //----------------------------------------- + + $member = $lib_profile->personal_function_load_member( $member_id ); + + //----------------------------------------- + // Format settings... + //----------------------------------------- + + foreach( $types as $key => $lang ) + { + $_comments_selected = ( $key == $member['pp_setting_notify_comments'] ) ? ' selected="selected" ' : ''; + $_friends_selected = ( $key == $member['pp_setting_notify_comments'] ) ? ' selected="selected" ' : ''; + $member['_pp_setting_notify_comments'] .= ""; + $member['_pp_setting_notify_friend'] .= ""; + } + + foreach( $yes_no as $key => $lang ) + { + $_comments_selected = ( $key == $member['pp_setting_moderate_comments'] ) ? ' selected="selected" ' : ''; + $_friends_selected = ( $key == $member['pp_setting_moderate_friends'] ) ? ' selected="selected" ' : ''; + $member['_pp_setting_moderate_comments'] .= ""; + $member['_pp_setting_moderate_friends'] .= ""; + } + + //----------------------------------------- + // Personal statement + //----------------------------------------- + + $member['_pp_bio_content'] = $this->ipsclass->my_br2nl( $member['pp_bio_content'] ); + $member['__pp_bio_content'] = $member['pp_bio_content']; + + //----------------------------------------- + // Ok.. show the settings + //----------------------------------------- + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->personal_portal_settings( $member ); + + $this->page_title = $this->ipsclass->lang['m_personal_portal']; + $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); + } + + /*-------------------------------------------------------------------------*/ + // DISPLAY NAME: CHANGE COMPLETE + /*-------------------------------------------------------------------------*/ + + function display_name_complete() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $display_name = trim( $this->ipsclass->input['display_name'] ); + $display_pass = $this->ipsclass->input['display_password']; + $error = ""; + $found_name = 0; + $banfilters = array(); + + //----------------------------------------- + // CHECK (please) + //----------------------------------------- + + if ( ! $this->ipsclass->vars['auth_allow_dnames'] OR $this->ipsclass->member['g_dname_changes'] < 1 OR $this->ipsclass->member['g_dname_date'] < 1 ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); + } + + //----------------------------------------- + // Remove 'sneaky' spaces + //----------------------------------------- + + if ( $this->ipsclass->vars['strip_space_chr'] ) + { + // Use hexdec to convert between '0xAD' and chr + $display_name = str_replace( chr(160), ' ', $display_name ); + $display_name = str_replace( chr(173), ' ', $display_name ); + $display_name = str_replace( chr(240), ' ', $display_name ); + + $display_name = trim($display_name); + } + + //----------------------------------------- + // Test unicode name too + //----------------------------------------- + + $unicode_name = preg_replace_callback('/&#([0-9]+);/si', create_function( '$matches', 'return chr($matches[1]);' ), $display_name); + $unicode_name = str_replace( "'" , ''', $unicode_name ); + $unicode_name = str_replace( "\\", '\', $unicode_name ); + + //----------------------------------------- + // Password Check: Load handler... + //----------------------------------------- + + require_once( ROOT_PATH.'sources/handlers/han_login.php' ); + $this->han_login = new han_login(); + $this->han_login->ipsclass =& $this->ipsclass; + $this->han_login->init(); + + //----------------------------------------- + // Check for current password. + //----------------------------------------- + + if ( $this->ipsclass->vars['ipbli_usertype'] == 'username' ) + { + $this->han_login->login_password_check( $this->ipsclass->member['name'], $display_pass ); + } + else + { + $this->han_login->login_password_check( $this->ipsclass->member['email'], $display_pass ); + } + + if ( $this->han_login->return_code != 'SUCCESS' ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'wrong_pass' ) ); + } + + //----------------------------------------- + // Load ban filters + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'banfilters' ) ); + $this->ipsclass->DB->simple_exec(); + + while( $r = $this->ipsclass->DB->fetch_row() ) + { + $banfilters[ $r['ban_type'] ][] = $r['ban_content']; + } + + //----------------------------------------- + // Grab # changes > 24 hours + //----------------------------------------- + + $time_check = time() - 86400 * $this->ipsclass->member['g_dname_date']; + + $name_count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as count, MIN(dname_date) as min_date', 'from' => 'dnames_change', 'where' => "dname_member_id={$this->ipsclass->member['id']} AND dname_date > $time_check" ) ); + + $name_count['count'] = intval( $name_count['count'] ); + $name_count['min_date'] = intval( $name_count['min_date'] ) ? intval( $name_count['min_date'] ) : $time_check; + + if ( intval( $name_count['count'] ) >= $this->ipsclass->member['g_dname_changes'] ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); + } + + //----------------------------------------- + // Check for missing fields / chars. + //----------------------------------------- + + if ( ! $display_name OR strlen( $display_name ) < 3 AND strlen( $display_name ) > $this->ipsclass->vars['max_user_name_length'] ) + { + $error .= $this->ipsclass->lang['dname_error_no_name']."
    "; + } + + if ( ! $display_pass ) + { + $error .= $this->ipsclass->lang['dname_error_no_pass']."
    "; + } + + if ( preg_match( "#[\[\];,\|]#", str_replace(''', "'", $unicode_name ) ) ) + { + $error .= $this->ipsclass->lang['dname_error_chars']."
    "; + } + + if( $this->ipsclass->vars['username_characters'] ) + { + $check_against = preg_quote( $this->ipsclass->vars['username_characters'], "/" ); + + if( !preg_match( "/^[".$check_against."]+$/i", str_replace(''', "'", $unicode_name ) ) ) + { + $error .= $this->ipsclass->lang['dname_error_chars']."
    "; + } + } + + //----------------------------------------- + // Are they banned [NAMES]? + //----------------------------------------- + + if ( is_array( $banfilters['name'] ) and count( $banfilters['name'] ) ) + { + foreach ( $banfilters['name'] as $n ) + { + if ( $n == "" ) + { + continue; + } + + $n = str_replace( '\*', '.*' , preg_quote($n, "/") ); + + if ( preg_match( "/^{$n}$/i", $display_name ) ) + { + $found_name = 1; + break; + } + } + } + + //----------------------------------------- + // Check for existing name. + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => "members_display_name, id", + 'from' => 'members', + 'where' => "members_l_display_name='".strtolower($display_name)."' AND id != ".$this->ipsclass->member['id'], + 'limit' => array( 0,1 ) ) ); + + $this->ipsclass->DB->exec_query(); + + //----------------------------------------- + // Got any results? + //----------------------------------------- + + if ( $this->ipsclass->DB->get_num_rows() ) + { + $found_name = 1; + } + + //----------------------------------------- + // Check for existing LOG IN name. + //----------------------------------------- + + if ( $this->ipsclass->vars['auth_dnames_nologinname'] ) + { + $this->ipsclass->DB->build_query( array( 'select' => "members_display_name, id", + 'from' => 'members', + 'where' => "members_l_username='".strtolower($display_name)."' AND id != ".$this->ipsclass->member['id'], + 'limit' => array( 0,1 ) ) ); + + $this->ipsclass->DB->exec_query(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + $found_name = 1; + } + } + + //----------------------------------------- + // Test for unicode name + //----------------------------------------- + + if ( $unicode_name != $display_name ) + { + //----------------------------------------- + // Check for existing name. + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => "members_display_name, id, email", + 'from' => 'members', + 'where' => "members_l_display_name='".strtolower($unicode_name)."' AND id != ".$this->ipsclass->member['id'], + 'limit' => array( 0,1 ) ) ); + + $this->ipsclass->DB->exec_query(); + + //----------------------------------------- + // Got any results? + //----------------------------------------- + + if ( $this->ipsclass->DB->get_num_rows() ) + { + $found_name = 1; + } + + //----------------------------------------- + // Check for existing LOG IN name. + //----------------------------------------- + + if ( $this->ipsclass->vars['auth_dnames_nologinname'] ) + { + $this->ipsclass->DB->build_query( array( 'select' => "members_display_name, id", + 'from' => 'members', + 'where' => "members_l_username='".strtolower($unicode_name)."' AND id != ".$this->ipsclass->member['id'], + 'limit' => array( 0,1 ) ) ); + + $this->ipsclass->DB->exec_query(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + $found_name = 1; + } + } + } + + //----------------------------------------- + // Got a name? + //----------------------------------------- + + if ( $found_name ) + { + $error .= $this->ipsclass->lang['dname_error_taken']."
    "; + } + + //----------------------------------------- + // Got an error? + //----------------------------------------- + + if ( $error ) + { + $this->display_name_change( $error ); + return; + } + + //----------------------------------------- + // Insert into change log + //----------------------------------------- + + $this->ipsclass->DB->force_data_type = array( 'dname_previous' => 'string', + 'dname_current' => 'string' ); + + $this->ipsclass->DB->do_insert( 'dnames_change', array( 'dname_member_id' => $this->ipsclass->member['id'], + 'dname_date' => time(), + 'dname_ip_address' => $this->ipsclass->ip_address, + 'dname_previous' => $this->ipsclass->member['members_display_name'], + 'dname_current' => $display_name ) ); + + //----------------------------------------- + // Still here? Change it then + //----------------------------------------- + + $this->ipsclass->DB->force_data_type = array( 'members_display_name' => 'string', 'members_l_display_name' => 'string' ); + $this->ipsclass->DB->do_update( 'members' , array( 'members_display_name' => $display_name, + 'members_l_display_name' => strtolower( $display_name ) ), "id=" . $this->ipsclass->member['id'] ); + + $this->ipsclass->DB->force_data_type = array( 'contact_name' => 'string' ); + $this->ipsclass->DB->do_update( 'contacts' , array( 'contact_name' => $display_name ), "contact_id=" .$this->ipsclass->member['id'] ); + + $this->ipsclass->DB->force_data_type = array( 'last_poster_name' => 'string' ); + $this->ipsclass->DB->do_update( 'forums' , array( 'last_poster_name' => $display_name ), "last_poster_id=".$this->ipsclass->member['id'] ); + + $this->ipsclass->DB->force_data_type = array( 'member_name' => 'string' ); + $this->ipsclass->DB->do_update( 'sessions' , array( 'member_name' => $display_name ), "member_id=" .$this->ipsclass->member['id'] ); + + $this->ipsclass->DB->force_data_type = array( 'starter_name' => 'string' ); + $this->ipsclass->DB->do_update( 'topics' , array( 'starter_name' => $display_name ), "starter_id=" .$this->ipsclass->member['id'] ); + + $this->ipsclass->DB->force_data_type = array( 'last_poster_name' => 'string' ); + $this->ipsclass->DB->do_update( 'topics' , array( 'last_poster_name' => $display_name ), "last_poster_id=".$this->ipsclass->member['id'] ); + + //----------------------------------------- + // Recache moderators + //----------------------------------------- + + if ( $this->ipsclass->member['is_mod'] ) + { + require_once( ROOT_PATH .'sources/action_admin/moderator.php' ); + $admod = new ad_moderator(); + $admod->ipsclass =& $this->ipsclass; + + $admod->rebuild_moderator_cache(); + } + + //----------------------------------------- + // Recache announcements + //----------------------------------------- + + require_once( ROOT_PATH.'sources/action_public/announcements.php' ); + $announcements = new announcements(); + $announcements->ipsclass =& $this->ipsclass; + $announcements->announce_recache(); + + //----------------------------------------- + // Recache forums + //----------------------------------------- + + $this->ipsclass->update_forum_cache(); + + //----------------------------------------- + // Bounce back + //----------------------------------------- + + $this->display_name_change( "", $this->ipsclass->lang['dname_change_ok'] ); + return; + } + + + /*-------------------------------------------------------------------------*/ + // DISPLAY NAME: CHANGE START + /*-------------------------------------------------------------------------*/ + + function display_name_change( $error="", $okmessage="" ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $form = array(); + + //----------------------------------------- + // CHECK (please) + //----------------------------------------- + + if ( ! $this->ipsclass->vars['auth_allow_dnames'] OR $this->ipsclass->member['g_dname_changes'] < 1 OR $this->ipsclass->member['g_dname_date'] < 1 ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); + } + + $this->ipsclass->input['display_name'] = isset($this->ipsclass->input['display_name']) ? $this->ipsclass->input['display_name'] : ''; + + $this->ipsclass->vars['username_errormsg'] = str_replace( '{chars}', $this->ipsclass->vars['username_characters'], $this->ipsclass->vars['username_errormsg'] ); + + //----------------------------------------- + // Grab # changes > 24 hours + //----------------------------------------- + + $time_check = time() - 86400 * $this->ipsclass->member['g_dname_date']; + + $name_count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as count, MIN(dname_date) as min_date', 'from' => 'dnames_change', 'where' => "dname_member_id={$this->ipsclass->member['id']} AND dname_date > $time_check" ) ); + + $name_count['count'] = intval( $name_count['count'] ); + $name_count['min_date'] = intval( $name_count['min_date'] ) ? intval( $name_count['min_date'] ) : $time_check; + + //----------------------------------------- + // Calculate # left + //----------------------------------------- + + $form['_changes_left'] = $this->ipsclass->member['g_dname_changes'] - $name_count['count']; + $form['_changes_done'] = $name_count['count']; + + # Make sure changes done isn't larger than allowed + # This happens when changing via ACP + + if ( $form['_changes_done'] > $this->ipsclass->member['g_dname_changes'] ) + { + $form['_changes_done'] = $this->ipsclass->member['g_dname_changes']; + } + + $form['_first_change'] = $this->ipsclass->get_date( $name_count['min_date'], 'SHORT', 1 ); + $form['_lang_string'] = sprintf( $this->ipsclass->lang['dname_string'], + $form['_changes_done'], $this->ipsclass->member['g_dname_changes'], + $form['_first_change'], $this->ipsclass->member['g_dname_changes'], + $this->ipsclass->member['g_dname_date'] ); + + //----------------------------------------- + // Print + //----------------------------------------- + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->ucp_dname_change( $form, $error, $okmessage ); + + $this->page_title = $this->ipsclass->lang['m_dname_change']; + $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); + $this->nav[] = $this->ipsclass->lang['m_dname_change']; + } + + /*-------------------------------------------------------------------------*/ + // ANNOUNCEMENTS: DELETE + /*-------------------------------------------------------------------------*/ + + function mod_announce_delete() + { + if ( ! $this->ipsclass->member['g_is_supmod'] ) + { + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->dead_section(); + return; + } + + $id = intval( $this->ipsclass->input['id'] ); + + if ( $id ) + { + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'announcements', 'where' => 'announce_id='.$id ) ); + } + + //----------------------------------------- + // Update cache + //----------------------------------------- + + require_once( ROOT_PATH.'sources/action_public/announcements.php' ); + $announcements = new announcements(); + $announcements->ipsclass =& $this->ipsclass; + $announcements->announce_recache(); + + $this->mod_announce_start(); + } + + /*-------------------------------------------------------------------------*/ + // ANNOUNCEMENTS: SAVE (new/edit) + /*-------------------------------------------------------------------------*/ + + function mod_announce_save() + { + $type = $this->ipsclass->input['type']; + $forums_to_save = ""; + + if ( ! $this->ipsclass->member['g_is_supmod'] ) + { + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->dead_section(); + return; + } + + //----------------------------------------- + // check... + //----------------------------------------- + + if ( ! $this->ipsclass->input['announce_title'] or ! $this->ipsclass->input['announce_post'] ) + { + $this->mod_announce_form( $type, $this->ipsclass->lang['announce_error_title'] ); + return; + } + + //----------------------------------------- + // Get forums to add announce in + //----------------------------------------- + + if ( is_array( $_POST['announce_forum'] ) and count( $_POST['announce_forum'] ) ) + { + if ( in_array( '*', $_POST['announce_forum'] ) ) + { + $forums_to_save = '*'; + } + else + { + $forums_to_save = implode( ",", $_POST['announce_forum'] ); + } + } + + if ( ! $forums_to_save ) + { + $this->mod_announce_form( $type, $this->ipsclass->lang['announce_error_forums'] ); + return; + } + + //----------------------------------------- + // check dates + //----------------------------------------- + + $start_date = 0; + $end_date = 0; + + if ( strstr( $this->ipsclass->input['announce_start'], '-' ) ) + { + $start_array = explode( '-', $this->ipsclass->input['announce_start'] ); + + if ( $start_array[0] and $start_array[1] and $start_array[2] ) + { + if ( ! checkdate( $start_array[0], $start_array[1], $start_array[2] ) ) + { + $this->mod_announce_form( $type, $this->ipsclass->lang['announce_error_date'] ); + return; + } + } + + $start_date = $this->ipsclass->date_gmmktime( 0, 0, 1, $start_array[0], $start_array[1], $start_array[2] ); + } + + if ( strstr( $this->ipsclass->input['announce_end'], '-' ) ) + { + $end_array = explode( '-', $this->ipsclass->input['announce_end'] ); + + if ( $end_array[0] and $end_array[1] and $end_array[2] ) + { + if ( ! checkdate( $end_array[0], $end_array[1], $end_array[2] ) ) + { + $this->mod_announce_form( $type, $this->ipsclass->lang['announce_error_date'] ); + return; + } + } + + $end_date = $this->ipsclass->date_gmmktime( 23, 59, 59, $end_array[0], $end_array[1], $end_array[2] ); + } + + $this->init_parser(); + + $this->ipsclass->input['announce_post'] = $this->han_editor->process_raw_post( 'announce_post' ); + + $this->parser->parse_html = isset($this->ipsclass->input['announce_html_enabled']) ? $this->ipsclass->input['announce_html_enabled'] : 0; + $this->parser->parse_nl2br = isset($this->ipsclass->input['announce_nlbr_enabled']) ? $this->ipsclass->input['announce_nlbr_enabled'] : 0; + $this->parser->parse_bbcode = 1; + $this->parser->parse_smilies = 1; + + //----------------------------------------- + // Build save array + //----------------------------------------- + + $save_array = array( 'announce_title' => $this->ipsclass->input['announce_title'], + 'announce_post' => $this->parser->pre_display_parse( $this->parser->pre_db_parse( $this->ipsclass->input['announce_post'] ) ), + 'announce_active' => isset($this->ipsclass->input['announce_active']) ? $this->ipsclass->input['announce_active'] : 0, + 'announce_forum' => $forums_to_save, + 'announce_html_enabled' => isset($this->ipsclass->input['announce_html_enabled']) ? $this->ipsclass->input['announce_html_enabled'] : 0, + 'announce_nlbr_enabled' => isset($this->ipsclass->input['announce_nlbr_enabled']) ? $this->ipsclass->input['announce_nlbr_enabled'] : 0, + 'announce_start' => $start_date, + 'announce_end' => $end_date + ); + + //----------------------------------------- + // Save.. + //----------------------------------------- + + if ( $type == 'add' ) + { + $save_array['announce_member_id'] = $this->ipsclass->member['id']; + + $this->ipsclass->DB->do_insert( 'announcements', $save_array ); + } + else + { + if ( $this->ipsclass->input['id'] ) + { + $this->ipsclass->DB->do_update( 'announcements', $save_array, 'announce_id='.intval($this->ipsclass->input['id']) ); + } + } + + //----------------------------------------- + // Update cache + //----------------------------------------- + + require_once( ROOT_PATH.'sources/action_public/announcements.php' ); + $announcements = new announcements(); + $announcements->ipsclass =& $this->ipsclass; + + $announcements->announce_recache(); + + $this->mod_announce_start(); + return; + } + + /*-------------------------------------------------------------------------*/ + // ANNOUNCEMENTS: FORM (new/edit) + /*-------------------------------------------------------------------------*/ + + function mod_announce_form($type='add', $msg="") + { + $this->init_parser(); + + if ( ! $this->ipsclass->member['g_is_supmod'] ) + { + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->dead_section(); + return; + } + + $this->han_editor->remove_side_panel = 1; + + //----------------------------------------- + // Set up + //----------------------------------------- + + if ( $type == 'add' ) + { + $button = $this->ipsclass->lang['announce_button_add']; + $announce = array( 'announce_active' => 1, 'announce_id' => 0 ); + + } + else + { + $this->ipsclass->input['id'] = intval($this->ipsclass->input['id']); + $button = $this->ipsclass->lang['announce_button_edit']; + $announce = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'announcements', 'where' => 'announce_id='.$this->ipsclass->input['id'] ) ); + $announce['announce_forum'] = explode( ",", $announce['announce_forum'] ); + $announce['announce_start'] = $announce['announce_start'] ? gmdate( 'm-d-Y', $announce['announce_start'] ) : ''; + $announce['announce_end'] = $announce['announce_end'] ? gmdate( 'm-d-Y', $announce['announce_end'] ) : ''; + } + + //----------------------------------------- + // Do we have _POST? + //----------------------------------------- + + foreach( array( 'announce_html_enabled', 'announce_title', 'announce_post', 'announce_start', 'announce_end', 'announce_forum', 'announce_active' ) as $bit ) + { + if ( isset($_POST[$bit]) AND $_POST[$bit] ) + { + $announce[$bit] = $_POST[$bit]; + } + else if( !isset($announce[$bit]) ) + { + $announce[$bit] = NULL; + } + } + + //print_r($_POST);exit; + + if( $announce['announce_post'] ) + { + if ( $this->han_editor->method == 'rte' ) + { + #$announce['announce_post'] = $this->parser->pre_display_parse( $this->parser->pre_db_parse( $announce['announce_post'] ) ); + $announce['announce_post'] = $this->parser->convert_ipb_html_to_html( $announce['announce_post'] ); + } + else + { + $this->parser->parse_html = $announce['announce_html_enabled'] ? $announce['announce_html_enabled'] : 0; + $this->parser->parse_nl2br = $announce['announce_nlbr_enabled'] ? $announce['announce_nlbr_enabled'] : 0; + $this->parser->parse_smilies = 1; + $this->parser->parse_bbcode = 1; + + $announce['announce_post'] = $this->parser->pre_edit_parse( $announce['announce_post'] ); + } + } + + //----------------------------------------- + // Forums + //----------------------------------------- + + $forum_html = "" . $this->ipsclass->forums->forums_forum_jump(0,1,1); + + //----------------------------------------- + // Save forums? + //----------------------------------------- + + if ( is_array( $announce['announce_forum'] ) and count( $announce['announce_forum'] ) ) + { + foreach( $announce['announce_forum'] as $f ) + { + $forum_html = preg_replace( "#option\s+value=[\"'](".preg_quote($f,'#').")[\"']#i", "option value='\\1' selected='selected'", $forum_html ); + } + } + + $announce['announce_active_checked'] = $announce['announce_active'] ? 'checked="checked"' : ''; + $announce['html_checkbox'] = $announce['announce_html_enabled'] ? "checked='checked' " : ''; + $announce['nlbr_checkbox'] = $announce['announce_nlbr_enabled'] ? "checked='checked' " : ''; + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->ucp_announce_form($announce, $button, $forum_html, $type, $this->han_editor->show_editor( $announce['announce_post'], 'announce_post' ), $msg); + + $this->page_title = $this->ipsclass->lang['menu_announcements']; + $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); + $this->nav[] = $this->ipsclass->lang['menu_announcements']; + } + + /*-------------------------------------------------------------------------*/ + // ANNOUNCEMENTS: START (Show current) + /*-------------------------------------------------------------------------*/ + + function mod_announce_start() + { + if ( ! $this->ipsclass->member['g_is_supmod'] ) + { + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->dead_section(); + return; + } + + //----------------------------------------- + // Get announcements + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'ucp_get_all_announcements', array() ); + $this->ipsclass->DB->cache_exec_query(); + + $content = ""; + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + if ( $r['announce_start'] ) + { + $r['announce_starts_converted'] = gmdate( 'M-d-Y', $r['announce_start'] ); + } + else + { + $r['announce_starts_converted'] = '-'; + } + + if ( $r['announce_end'] ) + { + $r['announce_end_converted'] = gmdate( 'M-d-Y', $r['announce_end'] ); + } + else + { + $r['announce_end_converted'] = '-'; + } + + if ( $r['announce_forum'] == '*' ) + { + $r['announce_forum_show'] = $this->ipsclass->lang['announce_page_allforums']; + } + else + { + $tmp_forums = explode(",",$r['announce_forum']); + + if ( is_array( $tmp_forums ) and count($tmp_forums) ) + { + if ( count($tmp_forums) > 5 ) + { + $r['announce_forum_show'] = count($tmp_forums).' '.$this->ipsclass->lang['announce_page_numforums']; + } + else + { + $tmp2 = array(); + + foreach( $tmp_forums as $id ) + { + $tmp2[] = "{$this->ipsclass->forums->forum_by_id[ $id ]['name']}"; + } + + $r['announce_forum_show'] = implode( "
    ", $tmp2 ); + } + } + } + + $r['announce_inactive'] = !$r['announce_active'] ? "{$this->ipsclass->lang['announce_page_disabled']}" : ''; + + $content .= $this->ipsclass->compiled_templates['skin_ucp']->ucp_announce_manage_row( $r ); + } + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->ucp_announce_manage($content); + + $this->page_title = $this->ipsclass->lang['menu_announcements']; + $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); + $this->nav[] = $this->ipsclass->lang['menu_announcements']; + } + + /*-------------------------------------------------------------------------*/ + // MEMBER TOOL: START + /*-------------------------------------------------------------------------*/ + + function mod_find_user_start($msg="") + { + if ( ! $this->ipsclass->member['g_is_supmod'] ) + { + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->dead_section(); + return; + } + + $this->ipsclass->input['name'] = isset($this->ipsclass->input['name']) ? $this->ipsclass->input['name'] : NULL; + + $this->page_title = $this->ipsclass->lang['cp_edit_user']; + $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); + $this->nav[] = $this->ipsclass->lang['cp_edit_user']; + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->mod_find_user($msg); + } + + /*-------------------------------------------------------------------------*/ + // MEMBER TOOL: COMPLETE + /*-------------------------------------------------------------------------*/ + + function mod_find_user_complete() + { + $this->ipsclass->input['name'] = trim(strtolower($this->ipsclass->input['name'])); + + if ( $this->ipsclass->input['name'] == "" ) + { + $this->mod_find_user_start($this->ipsclass->lang['cp_no_matches']); + return; + } + + //----------------------------------------- + // Query the DB for possible matches + //----------------------------------------- + + $this->start_val = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; + + $sql = "members_l_username LIKE '{$this->ipsclass->input['name']}%' OR members_l_display_name LIKE '%{$this->ipsclass->input['name']}%'"; + + $this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(id) as max', 'from' => 'members', 'where' => $sql ) ); + $this->ipsclass->DB->simple_exec(); + + $total_possible = $this->ipsclass->DB->fetch_row(); + + if ($total_possible['max'] < 1) + { + $this->mod_find_user_start( $this->ipsclass->lang['cp_no_matches'] ); + return; + } + + $pages = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => $total_possible['max'], + 'PER_PAGE' => 20, + 'CUR_ST_VAL' => $this->start_val, + 'L_SINGLE' => ' ', + 'L_MULTI' => $this->ipsclass->lang['tpl_pages'], + 'BASE_URL' => $this->ipsclass->base_url."act=usercp&CODE=domemtool&name={$this->ipsclass->input['name']}", + ) + ); + + $content = ""; + + $this->ipsclass->DB->simple_construct( array( 'select' => 'name, members_display_name, id, ip_address, posts, joined, mgroup', + 'from' => 'members', + 'where' => $sql, + 'order' => "joined DESC", + 'limit' => array( $this->start_val,20 ) ) ); + $this->ipsclass->DB->simple_exec(); + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + $row['joined'] = $this->ipsclass->get_date( $row['joined'], 'JOINED' ); + $row['groupname'] = $this->ipsclass->make_name_formatted( $this->ipsclass->cache['group_cache'][ $row['mgroup'] ]['g_title'], $row['mgroup'] ); + + if ( ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group']) and ($row['mgroup'] == $this->ipsclass->vars['admin_group']) ) + { + $row['ip_address'] = '--'; + } + + $content .= $this->ipsclass->compiled_templates['skin_ucp']->mod_ip_member_row( $row, $this->ipsclass->return_md5_check() ); + } + + + $this->page_title = $this->ipsclass->lang['cp_edit_user']; + $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); + $this->nav[] = $this->ipsclass->lang['cp_edit_user']; + $this->mod_find_user_start( $this->ipsclass->compiled_templates['skin_ucp']->mod_ip_member_results($pages, $content) ); + } + + /*-------------------------------------------------------------------------*/ + // IP TOOL: Start + /*-------------------------------------------------------------------------*/ + + function mod_ip_tool_start($msg="") + { + if ( ! $this->ipsclass->member['g_is_supmod'] ) + { + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->dead_section(); + return; + } + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->mod_ip_start_form($this->ipsclass->input['ip'], $msg); + + $this->page_title = $this->ipsclass->lang['menu_ipsearch']; + $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); + $this->nav[] = $this->ipsclass->lang['menu_ipsearch']; + } + + /*-------------------------------------------------------------------------*/ + // IP TOOL: Complete + /*-------------------------------------------------------------------------*/ + + function mod_ip_tool_complete() + { + if ( ! $this->ipsclass->member['g_is_supmod'] ) + { + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->dead_section(); + return; + } + + //----------------------------------------- + // Remove trailing periods + //----------------------------------------- + + $exact_match = 1; + $final_ip_string = trim( $this->ipsclass->input['ip'] ); + $this->start_val = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; + + if ( strstr( $final_ip_string, '*' ) ) + { + $exact_match = 0; + + $final_ip_string = preg_replace( "/^(.+?)\*(.+?)?$/", "\\1", $final_ip_string ).'%'; + } + + //----------------------------------------- + // H'okay, what have we been asked to do? + // (that's a metaphorical "we" in a rhetorical question) + //----------------------------------------- + + if ($this->ipsclass->input['iptool'] == 'resolve') + { + $resolved = @gethostbyaddr($final_ip_string); + + if ($resolved == "") + { + $this->mod_ip_tool_start( $this->ipsclass->lang['cp_safe_fail'] ); + return; + } + else + { + $this->mod_ip_tool_start( sprintf($this->ipsclass->lang['ip_resolve_result'], $final_ip_string, $resolved) ); + } + } + else if ($this->ipsclass->input['iptool'] == 'members') + { + if ($exact_match == 0) + { + $sql = "ip_address LIKE '$final_ip_string'"; + } + else + { + $sql = "ip_address='$final_ip_string'"; + } + + $this->ipsclass->DB->simple_construct( array( 'select' => 'count(id) as max', 'from' => 'members', 'where' => $sql ) ); + $this->ipsclass->DB->simple_exec(); + + $total_possible = $this->ipsclass->DB->fetch_row(); + + if ($total_possible['max'] < 1) + { + $this->mod_ip_tool_start( $this->ipsclass->lang['cp_no_matches'] ); + return; + } + + $pages = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => $total_possible['max'], + 'PER_PAGE' => 20, + 'CUR_ST_VAL' => $this->start_val, + 'L_SINGLE' => ' ', + 'L_MULTI' => $this->ipsclass->lang['tpl_pages'], + 'BASE_URL' => $this->ipsclass->base_url."act=usercp&CODE=doiptool&iptool=members&ip={$this->ipsclass->input['ip']}", + ) + ); + + $content = ""; + + if ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] ) + { + $sql .= "AND mgroup != {$this->ipsclass->vars['admin_group']}"; + } + + $this->ipsclass->DB->simple_construct( array( 'select' => 'name, members_display_name,id, ip_address, posts, joined, mgroup', + 'from' => 'members', + 'where' => $sql, + 'order' => "joined DESC", + 'limit' => array( $this->start_val,20 ) ) ); + $this->ipsclass->DB->simple_exec(); + + while( $row = $this->ipsclass->DB->fetch_row() ) + { + $row['joined'] = $this->ipsclass->get_date( $row['joined'], 'JOINED' ); + $row['groupname'] = $this->ipsclass->make_name_formatted( $this->ipsclass->cache['group_cache'][ $row['mgroup'] ]['g_title'], $row['mgroup'] ); + + $content .= $this->ipsclass->compiled_templates['skin_ucp']->mod_ip_member_row( $row, $this->ipsclass->return_md5_check() ); + } + + $this->mod_ip_tool_start( $this->ipsclass->compiled_templates['skin_ucp']->mod_ip_member_results($pages, $content) ); + } + else + { + // Find posts then! + + if ($exact_match == 0) + { + $sql = "ip_address LIKE '$final_ip_string'"; + } + else + { + $sql = "ip_address='$final_ip_string'"; + } + + // Get forums we're allowed to view + + $aforum = array(); + + foreach( $this->ipsclass->forums->forum_by_id as $data ) + { + $data['read_perms'] = isset($data['read_perms']) ? $data['read_perms'] : NULL; + + if ( $this->ipsclass->check_perms($data['read_perms']) == TRUE ) + { + $aforum[] = $data['id']; + } + } + + if ( count($aforum) < 1) + { + $this->mod_ip_tool_start( $this->ipsclass->lang['cp_no_matches'] ); + return; + } + + $the_forums = implode( ",", $aforum); + + $this->ipsclass->DB->build_query( array( 'select' => 'p.pid', + 'from' => array( 'posts' => 'p' ), + 'where' => "t.forum_id IN({$the_forums}) AND {$sql}", + 'limit' => array( 0,500 ), + 'order' => 'pid DESC', + 'add_join' => array( + array( + 'select' => 't.forum_id', + 'from' => array( 'topics' => 't' ), + 'where' => 't.tid=p.topic_id', + 'type' => 'left' + ) + ) + ) ); + + $this->ipsclass->DB->exec_query(); + + $max_hits = $this->ipsclass->DB->get_num_rows(); + + $posts = ""; + + while ($row = $this->ipsclass->DB->fetch_row() ) + { + $posts .= $row['pid'].","; + } + + $posts = preg_replace( "/,$/", "", $posts ); + + //----------------------------------------- + // Do we have any results? + //----------------------------------------- + + if ($posts == "") + { + $this->mod_ip_tool_start( $this->ipsclass->lang['cp_no_matches'] ); + return; + } + + //----------------------------------------- + // If we are still here, store the data into the database... + //----------------------------------------- + + $unique_id = md5(uniqid(microtime(),1)); + + $this->ipsclass->DB->do_insert( 'search_results', array ( + 'id' => $unique_id, + 'search_date'=> time(), + 'post_id' => $posts, + 'post_max' => $max_hits, + 'sort_key' => 'p.post_date', + 'sort_order' => 'desc', + 'member_id' => $this->ipsclass->member['id'], + 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], + ) ); + + $this->mod_ip_tool_start( $this->ipsclass->compiled_templates['skin_ucp']->mod_ip_post_results($unique_id, $max_hits) ); + + return TRUE; + } + } + + /*-------------------------------------------------------------------------*/ + // Attachments + /*-------------------------------------------------------------------------*/ + + function attachments() + { + $info = array(); + $start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0; + $perpage = 15; + + $sort_key = ""; + + switch ($this->ipsclass->input['sort']) + { + case 'date': + $sort_key = 'a.attach_date ASC'; + $info['date_order'] = 'rdate'; + $info['size_order'] = 'size'; + break; + case 'rdate': + $sort_key = 'a.attach_date DESC'; + $info['date_order'] = 'date'; + $info['size_order'] = 'size'; + break; + case 'size': + $sort_key = 'a.attach_filesize DESC'; + $info['date_order'] = 'date'; + $info['size_order'] = 'rsize'; + break; + case 'rsize': + $sort_key = 'a.attach_filesize ASC'; + $info['date_order'] = 'date'; + $info['size_order'] = 'size'; + break; + default: + $sort_key = 'a.attach_date DESC'; + $info['date_order'] = 'date'; + $info['size_order'] = 'size'; + break; + } + + $this->page_title = $this->ipsclass->lang['m_attach']; + $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); + + //----------------------------------------- + // Get the ID's to delete + //----------------------------------------- + + $ids = array(); + + foreach ($this->ipsclass->input as $key => $value) + { + if ( preg_match( "/^attach_(\d+)$/", $key, $match ) ) + { + if ($this->ipsclass->input[$match[0]]) + { + $ids[] = $match[1]; + } + } + } + + $ids = $this->ipsclass->clean_int_array( $ids ); + + $affected_ids = count($ids); + + if ( $affected_ids > 0 ) + { + $this->ipsclass->DB->cache_add_query( 'usercp_get_to_delete', array( 'mid' => $this->ipsclass->member['id'], 'aid_array' => $ids ) ); + + $o = $this->ipsclass->DB->cache_exec_query(); + + while ( $killmeh = $this->ipsclass->DB->fetch_row( $o ) ) + { + if ( $killmeh['attach_location'] ) + { + @unlink( $this->ipsclass->vars['upload_dir']."/".$killmeh['attach_location'] ); + } + if ( $killmeh['attach_thumb_location'] ) + { + @unlink( $this->ipsclass->vars['upload_dir']."/".$killmeh['attach_thumb_location'] ); + } + + if ( $killmeh['topic_id'] ) + { + $this->ipsclass->DB->simple_construct( array( 'update' => 'topics', 'set' => 'topic_hasattach=topic_hasattach-1', 'where' => 'tid='.$killmeh['topic_id'] ) ); + $this->ipsclass->DB->simple_shutdown_exec(); + } + else if( $killmeh['mt_id'] ) + { + $this->ipsclass->DB->simple_construct( array( 'update' => 'message_topics', 'set' => 'mt_hasattach=mt_hasattach-1', 'where' => 'mt_id='.$killmeh['mt_id'] ) ); + $this->ipsclass->DB->simple_shutdown_exec(); + } + } + + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'attachments', 'where' => 'attach_id IN ('.implode(",",$ids).') and attach_member_id='.$this->ipsclass->member['id'] ) ); + } + + //----------------------------------------- + // Get some stats... + //----------------------------------------- + + $maxspace = intval($this->ipsclass->member['g_attach_max']); + + if ( $this->ipsclass->member['g_attach_max'] == -1 ) + { + $this->ipsclass->Error( array( 'MSG' => 'no_permission', 'LEVEL' => 1 ) ); + } + + //----------------------------------------- + // Limit by forums + //----------------------------------------- + + $stats = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as count, sum(attach_filesize) as sum', + 'from' => 'attachments', + 'where' => 'attach_member_id='.$this->ipsclass->member['id'] . " AND attach_rel_module IN( 'post', 'msg' )" ) ); + + if ( $maxspace > 0 ) + { + //----------------------------------------- + // Figure out percentage used + //----------------------------------------- + + $info['has_limit'] = 1; + $info['full_percent'] = $stats['sum'] ? sprintf( "%.0f", ( ( $stats['sum'] / ($maxspace * 1024) ) * 100) ) : 0; + + if ( $info['full_percent'] > 100 ) + { + $info['full_percent'] = 100; + } + + $info['img_width'] = $info['full_percent'] > 0 ? intval($info['full_percent']) - 4 . "%" : 1;// * 2.4 : 1; + + //if ($info['img_width'] > 235) + //{ + // $info['img_width'] = 235; + //} + + $this->ipsclass->lang['attach_space_count'] = sprintf( $this->ipsclass->lang['attach_space_count'], intval($stats['count']), intval($info['full_percent']) ); + $this->ipsclass->lang['attach_space_used'] = sprintf( $this->ipsclass->lang['attach_space_used'] , $this->ipsclass->size_format(intval($stats['sum'])), $this->ipsclass->size_format($maxspace * 1024) ); + } + else + { + $info['has_limit'] = 0; + $this->ipsclass->lang['attach_space_used'] = sprintf( $this->ipsclass->lang['attach_space_unl'] , $this->ipsclass->size_format(intval($stats['sum'])) ); + } + + //----------------------------------------- + // Pages + //----------------------------------------- + + $pages = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => $stats['count'], + 'PER_PAGE' => $perpage, + 'CUR_ST_VAL' => $start, + 'L_SINGLE' => "", + 'L_MULTI' => $this->ipsclass->lang['tpl_pages'], + 'BASE_URL' => $this->ipsclass->base_url."act=usercp&CODE=attach&sort={$this->ipsclass->input['sort']}", + ) ); + + //----------------------------------------- + // Get attachments... + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'usercp_get_attachments', array( 'mid' => $this->ipsclass->member['id'], 'order' => $sort_key, 'limit_a' => $start, 'limit_b' => $perpage ) ); + + $this->ipsclass->DB->cache_exec_query(); + + $temp_html = ""; + + $this->ipsclass->load_language('lang_topic'); + + while ( $row = $this->ipsclass->DB->fetch_row() ) + { + if ( $this->ipsclass->check_perms($this->ipsclass->forums->forum_by_id[ $row['forum_id'] ]['read_perms']) != TRUE ) + { + $row['title'] = $this->ipsclass->lang['attach_topicmoved']; + } + + //----------------------------------------- + // Full attachment thingy + //----------------------------------------- + + if ( $row['attach_rel_module'] == 'post' ) + { + $row['_type'] = 'post'; + } + else if ( $row['attach_rel_module'] == 'msg' ) + { + $row['_type'] = 'msg'; + $row['title'] = $this->ipsclass->lang['attach_inpm']; + } + + $row['image'] = $this->ipsclass->cache['attachtypes'][ $row['attach_ext'] ]['atype_img']; + + $row['short_name'] = $this->ipsclass->txt_truncate( $row['attach_file'], 30 ); + + $row['attach_date'] = $this->ipsclass->get_date( $row['attach_date'], 'SHORT' ); + + $row['real_size'] = $this->ipsclass->size_format( $row['attach_filesize'] ); + + $temp_html .= $this->ipsclass->compiled_templates['skin_ucp']->attachments_row( $row ); + } + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->attachments_top($info, $pages, $temp_html); + + } + + /*-------------------------------------------------------------------------*/ + // Ignore user. + /*-------------------------------------------------------------------------*/ + + function ignore_user_splash($msg="") + { + $this->page_title = $this->ipsclass->lang['t_welcome']; + $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); + + $final_users = array(); + $temp_users = array(); + + //----------------------------------------- + // Do we have a MESSAGE FRROM GAWD???!@ + //----------------------------------------- + + if ( $msg ) + { + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->ucp_message( $this->ipsclass->lang['mi5_error'], $msg ); + } + + //----------------------------------------- + // Do we have incoming? + //----------------------------------------- + + if ( intval($this->ipsclass->input['uid']) ) + { + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, members_display_name', 'from' => 'members', 'where' => "id=".intval($this->ipsclass->input['uid']) ) ); + $this->ipsclass->DB->simple_exec(); + + $newmem = $this->ipsclass->DB->fetch_row(); + + $this->ipsclass->input['newbox_1'] = $newmem['members_display_name']; + } + + //----------------------------------------- + // Stored as userid,userid,userid + //----------------------------------------- + + $ignored_users = explode( ',', $this->ipsclass->member['ignored_users'] ); + + //----------------------------------------- + // Get members and check to see if they've + // since been moved into a group that cannot + // be ignored + //----------------------------------------- + + foreach( $ignored_users as $id ) + { + if ( intval($id) ) + { + $temp_users[] = $id; + } + } + + if ( count($temp_users) ) + { + $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, members_display_name, mgroup, posts', + 'from' => 'members', + 'where' => "id IN (".implode(",",$temp_users).")" + ) ); + + $this->ipsclass->DB->simple_exec(); + + while ( $m = $this->ipsclass->DB->fetch_row() ) + { + $m['g_title'] = $this->ipsclass->make_name_formatted( $this->ipsclass->cache['group_cache'][ $m['mgroup'] ]['g_title'], $m['mgroup'] ); + + if ( $this->ipsclass->vars['cannot_ignore_groups'] ) + { + if ( strstr( $this->ipsclass->vars['cannot_ignore_groups'], ','.$m['mgroup'].',' ) ) + { + continue; + } + } + + $final_users[ $m['id'] ] = $m; + } + } + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->iu_start(); + + foreach( $final_users as $member ) + { + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->iu_populated_row($member); + } + + + $this->ipsclass->input['newbox_1'] = isset($this->ipsclass->input['newbox_1']) ? $this->ipsclass->input['newbox_1'] : NULL; + $this->ipsclass->input['newbox_2'] = isset($this->ipsclass->input['newbox_2']) ? $this->ipsclass->input['newbox_2'] : NULL; + $this->ipsclass->input['newbox_3'] = isset($this->ipsclass->input['newbox_3']) ? $this->ipsclass->input['newbox_3'] : NULL; + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->iu_add_new(); + + } + + + /*-------------------------------------------------------------------------*/ + // Photo: + // + // Change / Add / Edit Users Photo + /*-------------------------------------------------------------------------*/ + + function photo( $error='' ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $member_id = intval( $this->ipsclass->member['id'] ); + list($p_max, $p_width, $p_height) = explode( ":", $this->ipsclass->member['g_photo_max_vars'] ); + $p_w = ""; + $p_h = ""; + $cur_photo = ""; + $member = array(); + $rand = urlencode( microtime() ); + + //----------------------------------------- + // Check to make sure that we can edit profiles.. + //----------------------------------------- + + if ( empty($this->ipsclass->member['g_edit_profile']) ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cant_use_feature' ) ); + } + + //----------------------------------------- + // Set up page title + //----------------------------------------- + + $this->page_title = $this->ipsclass->lang['t_welcome']; + $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); + + //----------------------------------------- + // Not allowed a photo + //----------------------------------------- + + if ( $this->ipsclass->member['g_photo_max_vars'] == "" or $this->ipsclass->member['g_photo_max_vars'] == "::" ) + { + // Nothing set up yet... + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->dead_section(); + return; + } + + //----------------------------------------- + // Get profile as lib + //----------------------------------------- + + require_once( ROOT_PATH . 'sources/action_public/profile.php' ); + $lib_profile = new profile(); + $lib_profile->ipsclass =& $this->ipsclass; + + //----------------------------------------- + // Get all member information + //----------------------------------------- + + $member = $lib_profile->personal_portal_set_information( $lib_profile->personal_function_load_member( $member_id ) ); + + //----------------------------------------- + // SET DIMENSIONS + //----------------------------------------- + + if ( $p_max ) + { + $this->ipsclass->lang['pph_max'] = sprintf( $this->ipsclass->lang['pph_max'], $p_max ); + $this->ipsclass->lang['pph_max'] .= sprintf( $this->ipsclass->lang['pph_max2'], $p_width, $p_height ); + } + else + { + $this->ipsclass->lang['pph_max'] = sprintf( $this->ipsclass->lang['pph_max2'], $p_width, $p_height ); + } + + $show_size = "(".$member['pp_main_width'] .' x ' . $member['pp_main_height'].")"; + + //----------------------------------------- + // TYPE? + //----------------------------------------- + + if ( $member['pp_main_photo'] ) + { + $cur_photo = "{$this->ipsclass->lang["; + } + + //----------------------------------------- + // Force a form action? + //----------------------------------------- + + $is_reset = 0; + + if( $this->ipsclass->vars['upload_domain'] ) + { + $is_reset = 1; + $original = $this->ipsclass->base_url; + + if( $this->ipsclass->session_type == 'cookie' ) + { + $this->ipsclass->base_url = $this->ipsclass->vars['upload_domain'] . '/index.' . $this->ipsclass->vars['php_ext'].'?'; + } + else + { + $this->ipsclass->base_url = $this->ipsclass->vars['upload_domain'] . '/index.' . $this->ipsclass->vars['php_ext'].'?s='.$this->ipsclass->session_id.'&'; + } + } + + //----------------------------------------- + // SHOW THE FORM + //----------------------------------------- + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->photo_page( $error, $cur_photo, $show_size, $this->md5_check, $p_max, 500000, $rand ); + + //----------------------------------------- + // Reset forced form action? + //----------------------------------------- + + if( $is_reset ) + { + $this->ipsclass->base_url = $original; + } + + //----------------------------------------- + // Print it... + //----------------------------------------- + + $fj = $this->ipsclass->build_forum_jump(); + $fj = str_replace( "#Forum Jump#", $this->ipsclass->lang['forum_jump'], $fj); + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->CP_end(); + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->forum_jump( $fj ); + + $this->ipsclass->print->add_output( $this->output ); + $this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 1, 'NAV' => $this->nav ) ); + } + + /*-------------------------------------------------------------------------*/ + // Forum tracker + // + // What, you need a definition with that title? + // What are you doing poking around in the code for anyway? + /*-------------------------------------------------------------------------*/ + + function remove_forum_tracker() + { + $ids = array(); + + foreach ($this->ipsclass->input as $key => $value) + { + if ( preg_match( "/^id-(\d+)$/", $key, $match ) ) + { + if ($this->ipsclass->input[$match[0]]) + { + $ids[] = $match[1]; + } + } + } + + $ids = $this->ipsclass->clean_int_array( $ids ); + + $allowed = array( 'none', 'immediate', 'delayed', 'daily', 'weekly' ); + + //----------------------------------------- + // what we doing? + //----------------------------------------- + + if ( count($ids) > 0 ) + { + if ( $this->ipsclass->input['trackchoice'] == 'unsubscribe' ) + { + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'forum_tracker', 'where' => "member_id={$this->ipsclass->member['id']} and forum_id IN (".implode( ",", $ids ).")" ) ); + } + else if ( in_array( $this->ipsclass->input['trackchoice'], $allowed ) ) + { + $this->ipsclass->DB->do_update( 'forum_tracker', array( 'forum_track_type' => $this->ipsclass->input['trackchoice'] ), "member_id={$this->ipsclass->member['id']} and forum_id IN (".implode( ",", $ids ).")" ); + } + } + + $this->ipsclass->boink_it($this->ipsclass->base_url."act=UserCP&CODE=50"); + + } + + function forum_tracker() + { + //----------------------------------------- + // Remap... + //----------------------------------------- + + $remap = array( 'none' => 'subs_none_title', + 'immediate' => 'subs_immediate', + 'delayed' => 'subs_delayed', + 'daily' => 'subs_daily', + 'weekly' => 'subs_weekly' + ); + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->forum_subs_header(); + + //----------------------------------------- + // Query the DB for the subby toppy-ics - at the same time + // we get the forum and topic info, 'cos we rule. + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'ucp_get_forum_tracker', array( 'mid' => $this->ipsclass->member['id'] ) ); + $this->ipsclass->DB->cache_exec_query(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + while( $forum = $this->ipsclass->DB->fetch_row() ) + { + //----------------------------------------- + // Got perms to see this forum? + //----------------------------------------- + + if ( ! $this->ipsclass->forums->forum_by_id[ $forum['id'] ] ) + { + continue; + } + + $forum['folder_icon'] = $this->ipsclass->forums->forums_new_posts($forum); + + $forum['last_post'] = $this->ipsclass->get_date($forum['last_post'], 'LONG'); + + $forum['last_topic'] = $this->ipsclass->lang['f_none']; + + $forum['last_title'] = str_replace( "!" , "!", $forum['last_title'] ); + $forum['last_title'] = str_replace( """, '"', $forum['last_title'] ); + + if ( strlen($forum['last_title']) > 30 ) + { + $forum['last_title'] = $this->ipsclass->txt_truncate( $forum['last_title'], 30 ); + } + + if ($forum['password'] != "") + { + $forum['last_topic'] = $this->ipsclass->lang['f_none']; + } + else + { + $forum['last_topic'] = "{$forum['last_title']}"; + } + + + if ( isset($forum['last_poster_name'])) + { + $forum['last_poster'] = $forum['last_poster_id'] ? "{$forum['last_poster_name']}" + : $forum['last_poster_name']; + } + else + { + $forum['last_poster'] = $this->ipsclass->lang['f_none']; + } + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->forum_subs_row($forum, $remap[ $forum['forum_track_type'] ]); + } + + } + else + { + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->forum_subs_none(); + } + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->forum_subs_end(); + + $this->page_title = $this->ipsclass->lang['t_welcome']; + $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); + + } + + + /*-------------------------------------------------------------------------*/ + // pass change: + // + // Change the users password. + /*-------------------------------------------------------------------------*/ + + function pass_change() + { + //----------------------------------------- + // Do we have another URL that one needs + // to visit to register? + //----------------------------------------- + + $this->login_method = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_enabled=1' ) ); + + if ( $this->login_method['login_maintain_url'] ) + { + $this->ipsclass->boink_it( $this->login_method['login_maintain_url'] ); + exit(); + } + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->pass_change(); + $this->page_title = $this->ipsclass->lang['t_welcome']; + $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); + + } + + /*-------------------------------------------------------------------------*/ + // PASSWORD CHAGE COMPLETE + /*-------------------------------------------------------------------------*/ + + function do_pass_change() + { + if ( $_POST['current_pass'] == "" or empty($_POST['current_pass']) ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'complete_form' ) ); + } + + //----------------------------------------- + // Check and trim + //----------------------------------------- + + $cur_pass = trim($this->ipsclass->input['current_pass']); + $new_pass = trim($this->ipsclass->input['new_pass_1']); + $chk_pass = trim($this->ipsclass->input['new_pass_2']); + + if ( ( empty($new_pass) ) or ( empty($chk_pass) ) ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'complete_form' ) ); + } + + if ($new_pass != $chk_pass) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'pass_no_match' ) ); + } + + //----------------------------------------- + // Check password... + //----------------------------------------- + + $this->ipsclass->converge->converge_load_member($this->ipsclass->member['email']); + + if ( $this->ipsclass->converge->converge_authenticate_member( md5($cur_pass) ) != TRUE ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'wrong_pass' ) ); + } + + /* + I see no reason to limit how long the password can be... + + if ( $this->ipsclass->txt_mb_strlen( $_POST['PassWord'] ) > 32) + { + $this->ipsclass->Error( array( LEVEL => 1, MSG => 'pass_too_long' ) ); + }*/ + + //----------------------------------------- + // Create new password... + //----------------------------------------- + + $md5_pass = md5($new_pass); + + //----------------------------------------- + // Load handler... + //----------------------------------------- + + require_once( ROOT_PATH.'sources/handlers/han_login.php' ); + $this->han_login = new han_login(); + $this->han_login->ipsclass =& $this->ipsclass; + $this->han_login->init(); + $this->han_login->change_pass( $this->ipsclass->member['email'], $md5_pass ); + + if( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' ) + { + $this->ipsclass->Error( array( 'LEVEL' => 5, 'MSG' => 'han_login_pass_failed' ) ); + } + + //----------------------------------------- + // Update the DB + //----------------------------------------- + + $this->ipsclass->converge->converge_update_password( $md5_pass, $this->ipsclass->member['email'] ); + + //----------------------------------------- + // Update members log in key... + //----------------------------------------- + + $key = $this->ipsclass->converge->generate_auto_log_in_key(); + $this->ipsclass->DB->do_update( 'members', array( 'member_login_key' => $key ), 'id='.$this->ipsclass->member['id'] ); + + //----------------------------------------- + // Use sync module? + //----------------------------------------- + + if ( USE_MODULES == 1 ) + { + $this->modules->register_class($this); + $this->modules->on_pass_change($this->ipsclass->member['id'], $new_pass); + } + + //----------------------------------------- + // Redirect... + //----------------------------------------- + + $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['pass_redirect'], 'act=UserCP&CODE=00' ); + } + + + /*-------------------------------------------------------------------------*/ + // email change: + // + // Change the users email address + /*-------------------------------------------------------------------------*/ + + function email_change($msg="") + { + //----------------------------------------- + // Do we have another URL that one needs + // to visit to register? + //----------------------------------------- + + $this->login_method = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_enabled=1' ) ); + + if ( $this->login_method['login_maintain_url'] ) + { + $this->ipsclass->boink_it( $this->login_method['login_maintain_url'] ); + exit(); + } + + $txt = $this->ipsclass->lang['ce_current'].$this->ipsclass->member['email']; + + if ($this->ipsclass->vars['reg_auth_type']) + { + $txt .= $this->ipsclass->lang['ce_auth']; + } + + if ( $this->ipsclass->vars['bot_antispam'] ) + { + // Grab CAPTCHA template bit + require_once( KERNEL_PATH . 'class_captcha.php' ); + $captchaClass = new class_captcha( $this->ipsclass, $this->ipsclass->vars['bot_antispam_type'] ); + $captchaHTML = $captchaClass->getTemplate(); + } + + $msg = $msg ? $this->ipsclass->lang[$msg] : ''; + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->email_change($txt, $msg); + + if ($this->ipsclass->vars['bot_antispam']) + { + $this->output = str_replace( "", $captchaHTML, $this->output ); + } + + $this->page_title = $this->ipsclass->lang['t_welcome']; + $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); + } + + /*-------------------------------------------------------------------------*/ + // COMPLETE EMAIL ADDRESS CHANGE + /*-------------------------------------------------------------------------*/ + + function do_email_change() + { + //----------------------------------------- + // Check input + //----------------------------------------- + + if ($_POST['in_email_1'] == "") + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'complete_form' ) ); + } + + if ($_POST['in_email_2'] == "") + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'complete_form' ) ); + } + + //----------------------------------------- + // Authorizing? + //----------------------------------------- + + /*if ($this->ipsclass->member['mgroup'] == $this->ipsclass->vars['auth_group']) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'email_change_v' ) ); + }*/ + + //----------------------------------------- + // Check password... + //----------------------------------------- + + $this->ipsclass->converge->converge_load_member($this->ipsclass->member['email']); + + if ( $this->ipsclass->converge->converge_authenticate_member( md5($this->ipsclass->input['password']) ) != TRUE ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'wrong_pass' ) ); + } + + //----------------------------------------- + // Test email addresses + //----------------------------------------- + + $email_one = strtolower( trim($this->ipsclass->input['in_email_1']) ); + $email_two = strtolower( trim($this->ipsclass->input['in_email_2']) ); + + if ($email_one != $email_two) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'email_addy_mismatch' ) ); + } + + $email_one = $this->ipsclass->clean_email($email_one); + + if ( $email_one == "" ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'invalid_email' ) ); + } + + //----------------------------------------- + // Is this email addy taken? + //----------------------------------------- + + if ( $this->ipsclass->converge->converge_check_for_member_by_email( $email_one ) == TRUE ) + { + $this->ipsclass->Error( array( LEVEL => 1, MSG => 'email_exists' ) ); + } + + //----------------------------------------- + // Load ban filters + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'banfilters' ) ); + $this->ipsclass->DB->simple_exec(); + + while( $r = $this->ipsclass->DB->fetch_row() ) + { + $banfilters[ $r['ban_type'] ][] = $r['ban_content']; + } + + //----------------------------------------- + // Check in banned list + //----------------------------------------- + + if ( isset($banfilters['email']) AND is_array( $banfilters['email'] ) and count( $banfilters['email'] ) ) + { + foreach ( $banfilters['email'] as $email ) + { + $email = str_replace( '\*', '.*' , preg_quote($email, "/") ); + + if ( preg_match( "/^{$email}$/i", $email_one ) ) + { + $this->ipsclass->Error( array( LEVEL => 1, MSG => 'banned_email' ) ); + } + } + } + + //----------------------------------------- + // Anti bot flood... + //----------------------------------------- + + if ($this->ipsclass->vars['bot_antispam']) + { + // Validate CAPTCHA + require_once( KERNEL_PATH . 'class_captcha.php' ); + $captchaClass = new class_captcha( $this->ipsclass, $this->ipsclass->vars['bot_antispam_type'] ); + + if ( $captchaClass->validate() !== TRUE ) + { + $this->email_change('err_security_code'); + return ""; + } + } + + //----------------------------------------- + // Load handler... + //----------------------------------------- + + require_once( ROOT_PATH.'sources/handlers/han_login.php' ); + $this->han_login = new han_login(); + $this->han_login->ipsclass =& $this->ipsclass; + $this->han_login->init(); + $this->han_login->change_email( $this->ipsclass->member['email'], $email_one ); + + if( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' ) + { + $this->ipsclass->Error( array( LEVEL => 1, MSG => 'email_exists' ) ); + } + + //----------------------------------------- + // Update converge... + //----------------------------------------- + + $this->ipsclass->converge->converge_update_member( $this->ipsclass->member['email'], $email_one ); + + //----------------------------------------- + // Update dupemail + //----------------------------------------- + + if ( $this->ipsclass->member['bio'] == 'dupemail' ) + { + $this->ipsclass->DB->do_update( 'member_extra', array( 'bio' => '' ), 'id='.$this->ipsclass->member['id'] ); + } + + //----------------------------------------- + // Use sync module? + //----------------------------------------- + + if ( USE_MODULES == 1 ) + { + $this->modules->register_class($this); + $this->modules->on_email_change($this->ipsclass->member['id'], $email_one); + } + + //----------------------------------------- + // Require new validation? NON ADMINS ONLY + //----------------------------------------- + + if ($this->ipsclass->vars['reg_auth_type'] AND ! $this->ipsclass->member['g_access_cp'] ) + { + $validate_key = md5( $this->ipsclass->make_password() . time() ); + + //----------------------------------------- + // Update the new email, but enter a validation key + // and put the member in "awaiting authorisation" + // and send an email.. + //----------------------------------------- + + $db_str = array( + 'vid' => $validate_key, + 'member_id' => $this->ipsclass->member['id'], + #'real_group' => $this->ipsclass->member['mgroup'], + 'temp_group' => $this->ipsclass->vars['auth_group'], + 'entry_date' => time(), + 'coppa_user' => 0, + 'email_chg' => 1, + 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], + 'prev_email' => $this->ipsclass->member['email'], + ); + + if( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['auth_group'] ) + { + $db_str['real_group'] = $this->ipsclass->member['mgroup']; + } + + $this->ipsclass->DB->do_insert( 'validating', $db_str ); + + $this->ipsclass->DB->do_update( 'members' , array( + 'mgroup' => $this->ipsclass->vars['auth_group'], + 'email' => $email_one, + ), 'id='.$this->ipsclass->member['id'] + ); + + //----------------------------------------- + // Update their session with the new member group + //----------------------------------------- + + if ( $this->ipsclass->session_id ) + { + $this->ipsclass->DB->do_update( 'sessions', array( 'member_name' => '', + 'member_id' => 0, + 'member_group' => $this->ipsclass->vars['guest_group'] + ), "member_id=".$this->ipsclass->member['id']." and id='".$this->ipsclass->session_id."'" + ); + } + + //----------------------------------------- + // Kill the cookies to stop auto log in + //----------------------------------------- + + $this->ipsclass->my_setcookie( 'pass_hash' , '-1', 0 ); + $this->ipsclass->my_setcookie( 'member_id' , '-1', 0 ); + $this->ipsclass->my_setcookie( 'session_id' , '-1', 0 ); + + //----------------------------------------- + // Get the emailer module + //----------------------------------------- + + require ROOT_PATH."sources/classes/class_email.php"; + + $this->email = new emailer(); + $this->email->ipsclass =& $this->ipsclass; + $this->email->email_init(); + + //----------------------------------------- + // Dispatch the mail, and return to the activate form. + //----------------------------------------- + + $this->email->get_template("newemail"); + + $this->email->build_message( array( + 'NAME' => $this->ipsclass->member['members_display_name'], + 'THE_LINK' => $this->ipsclass->base_url_nosess."?act=Reg&CODE=03&type=newemail&uid=".$this->ipsclass->member['id']."&aid=".$validate_key, + 'ID' => $this->ipsclass->member['id'], + 'MAN_LINK' => $this->ipsclass->base_url_nosess."?act=Reg&CODE=07", + 'CODE' => $validate_key, + ) + ); + + $this->email->subject = $this->ipsclass->lang['lp_subject'].' '.$this->ipsclass->vars['board_name']; + $this->email->to = $email_one; + + $this->email->send_mail(); + + $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['ce_redirect'], 'act=Reg&CODE=07' ); + } + else + { + //----------------------------------------- + // No authorisation needed, change email addy and return + //----------------------------------------- + + $this->ipsclass->DB->do_update( 'members', array( 'email' => $email_one ), 'id='.$this->ipsclass->member['id'] ); + + $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['email_changed_now'], 'act=UserCP&CODE=00' ); + } + } + + /*-------------------------------------------------------------------------*/ + // tracker: + // + // Print the subscribed topics listings + /*-------------------------------------------------------------------------*/ + + function tracker() + { + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->subs_header(); + + //----------------------------------------- + // Remap... + //----------------------------------------- + + $remap = array( 'none' => 'subs_none_title', + 'immediate' => 'subs_immediate', + 'delayed' => 'subs_delayed', + 'daily' => 'subs_daily', + 'weekly' => 'subs_weekly' + ); + + //----------------------------------------- + // Get forums module + //----------------------------------------- + + require_once( ROOT_PATH.'sources/action_public/forums.php' ); + $this->forums = new forums(); + $this->forums->ipsclass =& $this->ipsclass; + + $this->forums->init(); + + //----------------------------------------- + // Are we checking for auto-prune? + //----------------------------------------- + + $auto_explain = $this->ipsclass->lang['no_auto_prune']; + + if ($this->ipsclass->vars['subs_autoprune'] > 0) + { + $auto_explain = sprintf( $this->ipsclass->lang['auto_prune'], $this->ipsclass->vars['subs_autoprune'] ); + } + + //----------------------------------------- + // Do we have an incoming date cut? + //----------------------------------------- + + $this->ipsclass->input['datecut'] = isset($this->ipsclass->input['datecut']) ? intval($this->ipsclass->input['datecut']) : 0; + + $date_cut = $this->ipsclass->input['datecut'] ? $this->ipsclass->input['datecut'] : 30; + + $date_query = $date_cut != 1000 ? " AND t.last_post > '".(time() - ($date_cut*86400))."' " : ""; + + //----------------------------------------- + // Get read topic markers + //----------------------------------------- + + $topic_array = array(); + $forum_array = array(); + + if ( $this->ipsclass->vars['db_topic_read_cutoff'] ) + { + $this->ipsclass->DB->simple_construct( array( 'select' => '*', + 'from' => 'topic_markers', + 'where' => "marker_member_id=".$this->ipsclass->member['id'], + ) ); + + $this->ipsclass->DB->simple_exec(); + + while( $db_row = $this->ipsclass->DB->fetch_row() ) + { + $markers_read = ""; + $markers_read = unserialize(stripslashes($db_row['marker_topics_read']) ); + + //----------------------------------------- + // Got read topics? + //----------------------------------------- + + if ( is_array( $markers_read ) and count( $markers_read ) ) + { + foreach( $markers_read as $tid => $date ) + { + $topic_array[ $tid ]['db_read'] = $date > $db_row['marker_last_cleared'] ? $date : $db_row['marker_last_cleared']; + } + } + else if( is_array( $markers_read ) and !count ( $markers_read ) ) + { + $forum_array[] = $db_row['marker_forum_id']; + } + } + } + + //----------------------------------------- + // Query the DB for the subby toppy-ics - at the same time + // we get the forum and topic info, 'cos we rule. + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'ucp_get_topic_tracker', array( 'mid' => $this->ipsclass->member['id'], 'date_query' => $date_query ) ); + $this->ipsclass->DB->cache_exec_query(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + $last_forum_id = -1; + + while( $topic = $this->ipsclass->DB->fetch_row() ) + { + $topic['db_read'] = $topic_array[$topic['tid']]['db_read'] ? $topic_array[$topic['tid']]['db_read'] : 0; + + if( $topic['db_read'] == 0 ) + { + $topic['db_read'] = in_array($topic['forum_id'], $forum_array ) ? time() : 0; + } + + //----------------------------------------- + // Got perms to see this forum? + //----------------------------------------- + + if ( ! $this->ipsclass->forums->forum_by_id[ $topic['forum_id'] ] ) + { + continue; + } + + if ( $last_forum_id != $topic['forum_id'] ) + { + $last_forum_id = $topic['forum_id']; + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->subs_forum_row($topic['forum_id'], $topic['forum_name']); + } + + $topic['last_post_date'] = $this->ipsclass->get_date( $topic['last_post'], 'LONG' ); + + if ( $topic['description'] ) + { + $topic['description'] .= "
    "; + } + + $topic['track_started'] = $this->ipsclass->get_date( $topic['track_started'], 'LONG' ); + + $topic = $this->forums->parse_data($topic); + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->subs_row($topic, $remap[ $topic['topic_track_type'] ]); + } + + } + else + { + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->subs_none(); + } + + // Build date box + + $date_box = "\n"; + + foreach( array( 1,7,14,21,30,60,90,365 ) as $day ) + { + $selected = $day == $date_cut ? ' selected="selected"' : ''; + + $date_box .= "\n"; + } + + if ( $date_cut == 1000 ) + { + $date_box .= "\n"; + } + else + { + $date_box .= "\n"; + } + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->subs_end($auto_explain, $date_box); + + $this->page_title = $this->ipsclass->lang['t_welcome']; + $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); + + } + + /*-------------------------------------------------------------------------*/ + // UPDATE TRACKER + /*-------------------------------------------------------------------------*/ + + function do_update_tracker() + { + //----------------------------------------- + // Get the ID's to delete + //----------------------------------------- + + if ($this->ipsclass->input['request_method'] != 'post') + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'poss_hack_attempt' ) ); + } + + $ids = array(); + + foreach ($this->ipsclass->input as $key => $value) + { + if ( preg_match( "/^id-(\d+)$/", $key, $match ) ) + { + if ($this->ipsclass->input[$match[0]]) + { + $ids[] = $match[1]; + } + } + } + + $ids = $this->ipsclass->clean_int_array( $ids ); + + $allowed = array( 'none', 'immediate', 'delayed', 'daily', 'weekly' ); + + //----------------------------------------- + // what we doing? + //----------------------------------------- + + if ( count($ids) > 0 ) + { + if ( $this->ipsclass->input['trackchoice'] == 'unsubscribe' ) + { + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'tracker', 'where' => "member_id='".$this->ipsclass->member['id']."' and trid IN (".implode( ",", $ids ).")" ) ); + } + else if ( in_array( $this->ipsclass->input['trackchoice'], $allowed ) ) + { + $this->ipsclass->DB->do_update( 'tracker', array( 'topic_track_type' => $this->ipsclass->input['trackchoice'] ), "trid IN (".implode( ",", $ids ).")" ); + } + } + + $this->ipsclass->boink_it($this->ipsclass->base_url."act=UserCP&CODE=26"); + + } + + + /*-------------------------------------------------------------------------*/ + // BOARD PREFS: + // + // Set up view avatar, sig, time zone, etc. + /*-------------------------------------------------------------------------*/ + + function board_prefs() + { + $time = $this->ipsclass->get_date( time(), 'LONG', 1 ); + + //----------------------------------------- + // Do we have a user stored offset, or use the board default: + //----------------------------------------- + + $offset = ( $this->ipsclass->member['time_offset'] != "" ) ? $this->ipsclass->member['time_offset'] : $this->ipsclass->vars['time_offset']; + + $time_select = ""; + + //----------------------------------------- + // DST IN USE? + //----------------------------------------- + + if ($this->ipsclass->member['dst_in_use']) + { + $dst_check = 'checked="checked"'; + } + else + { + $dst_check = ''; + } + + //----------------------------------------- + // DST CORRECTION IN USE? + //----------------------------------------- + + if ($this->ipsclass->member['members_auto_dst']) + { + $dst_correction = 'checked="checked"'; + } + else + { + $dst_correction = ''; + } + + //----------------------------------------- + // Post page contents + //----------------------------------------- + + if ($this->ipsclass->vars['postpage_contents'] == "") + { + $this->ipsclass->vars['postpage_contents'] = '5,10,15,20,25,30,35,40'; + } + + if ($this->ipsclass->vars['topicpage_contents'] == "") + { + $this->ipsclass->vars['topicpage_contents'] = '5,10,15,20,25,30,35,40'; + } + + list($post_page, $topic_page) = explode( "&", $this->ipsclass->member['view_prefs'] ); + + if ($post_page == "") + { + $post_page = -1; + } + if ($topic_page == "") + { + $topic_page = -1; + } + + $pp_a = array(); + $tp_a = array(); + $post_select = ""; + $topic_select = ""; + + $pp_a[] = array( '-1', $this->ipsclass->lang['pp_use_default'] ); + $tp_a[] = array( '-1', $this->ipsclass->lang['pp_use_default'] ); + + foreach( explode( ',', $this->ipsclass->vars['postpage_contents'] ) as $n ) + { + $n = intval(trim($n)); + $pp_a[] = array( $n, $n ); + } + + foreach( explode( ',', $this->ipsclass->vars['topicpage_contents'] ) as $n ) + { + $n = intval(trim($n)); + $tp_a[] = array( $n, $n ); + } + + //----------------------------------------- + // Select boxes + //----------------------------------------- + + foreach( $pp_a as $data ) + { + $post_select .= ($data[0] == $post_page) ? "\n" : "\n"; + } + + foreach( $tp_a as $data ) + { + $topic_select .= ($data[0] == $topic_page) ? "\n" : "\n"; + } + + //----------------------------------------- + // Print header + //----------------------------------------- + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->settings_header($this->member, $time_select, $time, $dst_check, $this->md5_check, $dst_correction); + + //----------------------------------------- + // Cookie settings + //----------------------------------------- + + $hide_sess = $this->ipsclass->my_getcookie('hide_sess'); + $open_qreply = $this->ipsclass->member['_cache']['qr_open']; + + if ( $open_qreply == FALSE ) + { + $open_qreply = 0; + } + + //----------------------------------------- + // RTE : STD + //----------------------------------------- + + $editor_choice = ""; + + //----------------------------------------- + // View avatars, signatures and images.. + //----------------------------------------- + + $view_ava = ""; + $view_img = ""; + $html_sess = ""; + $disable_pm = "", + 'SIG' => $view_sig."", + 'AVA' => $view_ava."", + 'POP' => $view_pop."", + 'SESS' => $html_sess."", + 'QR' => $html_qr."", + 'PMS' => $disable_pm."", + 'TPS' => $topic_select, + 'PPS' => $post_select, + 'editor' => $editor_choice, + ) ); + + $this->page_title = $this->ipsclass->lang['t_welcome']; + $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); + + } + + + /*-------------------------------------------------------------------------*/ + // EMAIL SETTINGS: + // + // Set up the email stuff. + /*-------------------------------------------------------------------------*/ + + function email_settings() + { + // PM_REMINDER: First byte = Email PM when received new + // Second byte= Show pop-up when new PM received + + + $info = array(); + + foreach ( array('hide_email', 'allow_admin_mails', 'email_full', 'email_pm', 'auto_track') as $k ) + { + if (!empty($this->ipsclass->member[ $k ])) + { + $info[$k] = 'checked="checked"'; + } + else + { + $info[$k] = ''; + } + } + + $info['key'] = $this->md5_check; + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->email($info); + + //----------------------------------------- + // Update select box + //----------------------------------------- + + $this->output = str_replace( ""; + $mon = ""; + $year = ""; + + for ( $i = 1 ; $i < 32 ; $i++ ) + { + $day .= "" : ">$i"; + } + + for ( $i = 1 ; $i < 13 ; $i++ ) + { + $mon .= "" : ">{$this->ipsclass->lang['month'.$i]}"; + } + + $i = $date['year'] - 1; + $j = $date['year'] - 100; + + for ( $i ; $j < $i ; $i-- ) + { + $year .= "" : ">$i"; + } + + //----------------------------------------- + // Get custom profile information + //----------------------------------------- + + require_once( ROOT_PATH.'sources/classes/class_custom_fields.php' ); + $fields = new custom_fields( $this->ipsclass->DB ); + + $fields->member_id = $this->ipsclass->member['id']; + $fields->mem_data_id = $this->ipsclass->member['id']; + $fields->cache_data = $this->ipsclass->cache['profilefields']; + $fields->admin = intval($this->ipsclass->member['g_access_cp']); + $fields->supmod = intval($this->ipsclass->member['g_is_supmod']); + + $fields->init_data(); + $fields->parse_to_edit(); + + foreach( $fields->out_fields as $id => $data ) + { + if ( $fields->cache_data[ $id ]['pf_not_null'] == 1 ) + { + $ftype = 'required_output'; + } + else + { + $ftype = 'optional_output'; + } + + if ( $fields->cache_data[ $id ]['pf_type'] == 'drop' ) + { + $form_element = $this->ipsclass->compiled_templates['skin_ucp']->field_dropdown( 'field_'.$id, $data ); + } + else if ( $fields->cache_data[ $id ]['pf_type'] == 'area' ) + { + $form_element = $this->ipsclass->compiled_templates['skin_ucp']->field_textarea( 'field_'.$id, $data ); + } + else + { + $form_element = $this->ipsclass->compiled_templates['skin_ucp']->field_textinput( 'field_'.$id, $data ); + } + + ${$ftype} .= $this->ipsclass->compiled_templates['skin_ucp']->field_entry( $fields->field_names[ $id ], $fields->field_desc[ $id ], $form_element ); + } + + //----------------------------------------- + // Format the interest / location boxes + //----------------------------------------- + + $this->ipsclass->member['location'] = $this->parser->pre_edit_parse( $this->ipsclass->member['location'] ); + $this->ipsclass->member['interests'] = $this->parser->pre_edit_parse( $this->ipsclass->member['interests'] ); + $this->ipsclass->member['key'] = $this->md5_check; + + $this->ipsclass->member['icq_number'] = $this->ipsclass->member['icq_number'] > 0 ? $this->ipsclass->member['icq_number'] : ''; + + //----------------------------------------- + // Suck up the HTML and swop some tags if need be + //----------------------------------------- + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->personal_panel( $this->ipsclass->member, $required_output, $optional_output, $day, $mon, $year ); + + $this->page_title = $this->ipsclass->lang['t_welcome']; + $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); + } + + + /*-------------------------------------------------------------------------*/ + // SPLASH (no, not the movie starring Tom Hanks) + /*-------------------------------------------------------------------------*/ + + function splash() + { + //----------------------------------------- + // Format the basic data + //----------------------------------------- + + $info['member_email'] = $this->ipsclass->member['email']; + $info['date_registered'] = $this->ipsclass->get_date( $this->ipsclass->member['joined'], 'LONG' ); + $info['member_posts'] = $this->ipsclass->member['posts']; + $info['topic_html'] = ""; + $info['attach_html'] = ""; + + $info['daily_average'] = $this->ipsclass->lang['no_posts']; + + if ($this->ipsclass->member['posts'] > 0 ) + { + $diff = time() - $this->ipsclass->member['joined']; + $days = ($diff / 3600) / 24; + $days = $days < 1 ? 1 : $days; + $info['daily_average'] = sprintf('%.2f', ($this->ipsclass->member['posts'] / $days) ); + } + + //----------------------------------------- + // Grab the last 5 read topics + //----------------------------------------- + + $topic_array = array(); + $final_array = array(); + + $topics = $this->ipsclass->my_getcookie( 'topicsread' ); + $topics = unserialize(stripslashes( $topics ) ); + + $tmp = $this->ipsclass->vars['db_topic_read_cutoff']; + $this->ipsclass->vars['db_topic_read_cutoff'] = 0; + + if ( is_array( $topics ) and count( $topics ) ) + { + arsort($topics); + + $topic_array = array_slice( array_keys( $topics ), 0, 5 ); + $topic_array = $this->ipsclass->clean_int_array( $topic_array ); + + if ( count( $topic_array ) ) + { + $this->ipsclass->member['is_mod'] = isset($this->ipsclass->member['is_mod']) ? $this->ipsclass->member['is_mod'] : 0; + + //----------------------------------------- + // Grab libraries + //----------------------------------------- + + require_once( ROOT_PATH."sources/action_public/forums.php" ); + $this->forums = new forums(); + $this->forums->ipsclass =& $this->ipsclass; + + $this->forums->init( 1 ); + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', + 'from' => 'topics', + 'where' => 'tid IN ('.implode(",",$topic_array).')', + 'limit' => array(0,5) ) ); + + $this->ipsclass->DB->simple_exec(); + + while ( $row = $this->ipsclass->DB->fetch_row() ) + { + if ( isset($this->ipsclass->forums->forum_by_id[ $row['forum_id'] ]) AND $this->ipsclass->forums->forum_by_id[ $row['forum_id'] ] ) + { + $topic = $this->forums->parse_data( $row ); + $final_array[ $row['tid'] ] = $this->ipsclass->compiled_templates['skin_ucp']->render_forum_row( $topic ); + } + } + + foreach( $topic_array as $tid ) + { + $info['topic_html'] .= isset($final_array[ $tid ]) ? $final_array[ $tid ] : ''; + } + } + } + + $this->ipsclass->vars['db_topic_read_cutoff'] = $tmp; + + //----------------------------------------- + // Grab the last 5 attachments + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', + 'from' => 'attachments', + 'where' => 'attach_member_id='.$this->ipsclass->member['id'], + 'order' => 'attach_date desc', + 'limit' => array( 0, 5 ) ) ); + + $this->ipsclass->DB->simple_exec(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + $this->ipsclass->load_language('lang_topic'); + + while ( $row = $this->ipsclass->DB->fetch_row() ) + { + //----------------------------------------- + // Full attachment thingy + //----------------------------------------- + + $info['attach_html'] .= $this->ipsclass->compiled_templates['skin_ucp']->Show_attachments( array ( + 'attach_hits' => $row['attach_hits'], + 'mime_image' => $this->ipsclass->cache['attachtypes'][ $row['attach_ext'] ]['atype_img'], + 'attach_file' => $row['attach_file'], + 'attach_id' => $row['attach_id'], + 'type' => $row['attach_rel_module'], + 'file_size' => $this->ipsclass->size_format( $row['attach_filesize'] ), + ) ); + } + } + + //----------------------------------------- + // Write the data.. + //----------------------------------------- + + $s_array = array( 's' => 5 , + 'm' => 7 , + 'l' => 15 + ); + + $info['NOTES'] = $this->notes ? $this->notes : $this->ipsclass->lang['note_pad_empty']; + + $info['SIZE'] = $s_array[$this->size]; + + $info['SIZE_CHOICE'] = ""; + + //----------------------------------------- + // If someone has cheated, fix it now. + //----------------------------------------- + + if ( empty($info['SIZE']) ) + { + $info['SIZE'] = '5'; + } + + //----------------------------------------- + // Make the choice HTML. + //----------------------------------------- + + foreach ($s_array as $k => $v) + { + if ($v == $info['SIZE']) + { + $info['SIZE_CHOICE'] .= ""; + } + else + { + $info['SIZE_CHOICE'] .= ""; + } + } + + $info['NOTES'] = $this->ipsclass->my_br2nl( $info['NOTES'] ); + + $this->output .= $this->ipsclass->compiled_templates['skin_ucp']->splash($info); + + $this->page_title = $this->ipsclass->lang['t_welcome']; + $this->nav = array( "".$this->ipsclass->lang['t_title']."" ); + } + + + + /*-------------------------------------------------------------------------*/ + // UPDATE_NOTEPAD: + // + // Displays the intro screen + /*-------------------------------------------------------------------------*/ + + function update_notepad() + { + // Do we have an entry for this member? + + if ($_POST['act'] == "") + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'complete_form' ) ); + } + + + $this->ipsclass->DB->simple_construct( array( 'select' => 'id', 'from' => 'member_extra', 'where' => "id=".$this->ipsclass->member['id'] ) ); + $this->ipsclass->DB->simple_exec(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + $this->ipsclass->DB->do_update( 'member_extra', array( 'notes' => $this->ipsclass->input['notes'], 'ta_size' => $this->ipsclass->input['ta_size'] ), 'id='.$this->ipsclass->member['id'] ); + } + else + { + $this->ipsclass->DB->do_insert( 'member_extra', array( 'notes' => $this->ipsclass->input['notes'], 'ta_size' => $this->ipsclass->input['ta_size'], 'id' => $this->ipsclass->member['id'] ) ); + } + + $this->ipsclass->boink_it($this->ipsclass->base_url."act=UserCP&CODE=00"); + } + + + function show_image() + { + if ( $this->ipsclass->input['rc'] == "" ) + { + return false; + } + + // Get the info from the db + + $row = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'reg_antispam', 'where' => "regid='".trim($this->ipsclass->txt_alphanumerical_clean($this->ipsclass->input['rc']))."'" ) ); + + if ( ! $row['regid'] ) + { + return false; + } + + //----------------------------------------- + // Using GD? + //----------------------------------------- + + if ( $this->ipsclass->vars['bot_antispam'] == 'gd' ) + { + $this->ipsclass->show_gd_img($row['regcode']); + } + else + { + + //----------------------------------------- + // Using normal then, check for "p" + //----------------------------------------- + + if ( $this->ipsclass->input['p'] == "" ) + { + return false; + } + + $p = intval($this->ipsclass->input['p']) - 1; //substr starts from 0, not 1 :p + + $this_number = substr( $row['regcode'], $p, 1 ); + + $this->ipsclass->show_gif_img($this_number); + } + + } + +} + ?> \ No newline at end of file diff --git a/upload/sources/action_public/xmlout.php b/upload/sources/action_public/xmlout.php index dc77197c..4e147767 100644 --- a/upload/sources/action_public/xmlout.php +++ b/upload/sources/action_public/xmlout.php @@ -1,2353 +1,2291 @@ - $Date: 2006-12-05 04:29:07 -0600 (Tue, 05 Dec 2006) $ -| > $Revision: 762 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > XML OUT Functions for XmlHttpRequest functions -| > Module written by Matt Mecham -| > Date started: Friday 18th March 2005 -| -| > Module Version Number: 1.1.0 -+-------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_IPB' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - -class xmlout -{ - # Classes - var $ipsclass; - var $search; - - var $xml_output; - var $xml_header; - - var $post_init = 0; - - /** - * Post object - * - * @var object - */ - var $post; - - /* - * Ajax main class - */ - var $class_ajax; - - var $decode_charsets = array( 'iso-8859-1' => 'ISO-8859-1', - 'iso8859-1' => 'ISO-8859-1', - 'iso-8859-15' => 'ISO-8859-15', - 'iso8859-15' => 'ISO-8859-15', - 'utf-8' => 'UTF-8', - 'cp866' => 'cp866', - 'ibm866' => 'cp866', - 'cp1251' => 'windows-1251', - 'windows-1251' => 'windows-1251', - 'win-1251' => 'windows-1251', - 'cp1252' => 'windows-1252', - 'windows-1252' => 'windows-1252', - 'koi8-r' => 'KOI8-R', - 'koi8-ru' => 'KOI8-R', - 'koi8r' => 'KOI8-R', - 'big5' => 'BIG5', - 'gb2312' => 'GB2312', - 'big5-hkscs' => 'BIG5-HKSCS', - 'shift_jis' => 'Shift_JIS', - 'sjis' => 'Shift_JIS', - 'euc-jp' => 'EUC-JP', - 'eucjp' => 'EUC-JP' ); - - - /*-------------------------------------------------------------------------*/ - // Auto run - /*-------------------------------------------------------------------------*/ - - function auto_run() - { - $this->xml_header = "ipsclass->vars['gb_char_set']}\"?".'>'; - - //----------------------------------------- - // INIT - //----------------------------------------- - - if ( isset($this->ipsclass->input['j_do']) AND $this->ipsclass->input['j_do'] ) - { - $this->ipsclass->input['do'] = $this->ipsclass->input['j_do']; - } - - //----------------------------------------- - // Load ajax class - //----------------------------------------- - - require_once( KERNEL_PATH . 'class_ajax.php' ); - - $this->class_ajax = new class_ajax(); - $this->class_ajax->ipsclass =& $this->ipsclass; - $this->class_ajax->class_init(); - - //----------------------------------------- - // What shall we do? - //----------------------------------------- - - switch( $this->ipsclass->input['do'] ) - { - case 'get-new-posts': - $this->get_new_posts(); - break; - case 'get-new-msgs': - $this->get_new_messages(); - break; - case 'mark-forum': - $this->mark_forum_as_read(); - break; - case 'get-member-names': - $this->get_member_names(); - break; - case 'get-msg-preview': - $this->get_msg_preview(); - break; - case 'save-topic': - $this->save_topic(); - break; - case 'dst-autocorrection': - $this->dst_autocorrection(); - break; - case 'check-display-name': - $this->check_display_name('members_display_name'); - break; - case 'check-user-name': - $this->check_display_name('name'); - break; - case 'check-email-address': - $this->check_email_address(); - break; - - case 'post-edit-show': - $this->post_edit_show(); - break; - case 'post-edit-save': - $this->post_edit_save(); - break; - - case 'topic_rate': - $this->save_topic_rate(); - break; - - case 'member-rate': - $this->save_member_rate(); - break; - case 'profile-save-settings': - $this->profile_save_settings(); - break; - - case 'change-gd-img': - $this->change_gd_img(); - break; - - case 'post-editorswitch': - $this->post_editorswitch(); - break; - } - } - - /*-------------------------------------------------------------------------*/ - // Save profile settings - /*-------------------------------------------------------------------------*/ - - function profile_save_settings() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $member_id = intval($this->ipsclass->input['member_id']); - $member = array(); - $command = trim( $this->ipsclass->input['cmd'] ); - $value = $this->class_ajax->convert_and_make_safe( $_REQUEST['value'] ); - $md5_check = substr( $this->ipsclass->parse_clean_value( rawurldecode( $_REQUEST['md5check'] ) ), 0, 32 ); - $return_string = ''; - $pp_b_day = intval( $this->ipsclass->input['pp_b_day'] ); - $pp_b_month = intval( $this->ipsclass->input['pp_b_month'] ); - $pp_b_year = intval( $this->ipsclass->input['pp_b_year'] ); - - //----------------------------------------- - // MD5 check - //----------------------------------------- - - if ( $md5_check != $this->ipsclass->return_md5_check() ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! $member_id OR ! $this->ipsclass->member['id'] ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - if( !$this->ipsclass->member['g_edit_profile'] ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - //----------------------------------------- - // Load member - //----------------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => 'm.*', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.id='.$member_id, - 'add_join' => array( 0 => array( 'select' => 'me.*', - 'from' => array( 'member_extra' => 'me' ), - 'where' => 'me.id=m.id', - 'type' => 'left' ), - 1 => array( 'select' => 'pp.*', - 'from' => array( 'profile_portal' => 'pp' ), - 'where' => 'pp.pp_member_id=m.id', - 'type' => 'left' ), - 2 => array( 'select' => 'g.*', - 'from' => array( 'groups' => 'g' ), - 'where' => 'g.g_id=m.mgroup', - 'type' => 'left' ) ) ) ); - $this->ipsclass->DB->exec_query(); - - $member = $this->ipsclass->DB->fetch_row(); - - if ( ! $member['id'] ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - //----------------------------------------- - // Alright.. what are we doing? - //----------------------------------------- - - switch( $command ) - { - case 'gender': - $_gender = ( $this->ipsclass->input['pp_gender'] == 'male' ) ? 'male' : ( $this->ipsclass->input['pp_gender'] == 'female' ? 'female' : '' ); - - $this->ipsclass->DB->simple_construct( array( 'select' => 'pp_member_id', - 'from' => 'profile_portal', - 'where' => "pp_member_id=".$member_id ) ); - $this->ipsclass->DB->simple_exec(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - $this->ipsclass->DB->do_update( 'profile_portal', array( 'pp_gender' => $_gender ), 'pp_member_id='.$member_id ); - } - else - { - $this->ipsclass->DB->do_insert( 'profile_portal', array( 'pp_gender' => $_gender, - 'pp_member_id' => $member_id ) ); - } - - $return_string = $_gender; - break; - case 'contact': - $this->ipsclass->load_language( 'lang_profile' ); - - $_type = trim( $this->ipsclass->input['contacttype'] ); - $return_string = ''; - - $types = array( 'aim' => 'aim_name', - 'msn' => 'msnname', - 'icq' => 'icq_number', - 'yahoo' => 'yahoo' ); - - if ( in_array( $_type, array_keys( $types ) ) ) - { - if ( $_type == 'icq' ) - { - if ( $value != preg_replace( "#[^0-9]#s", "", $value ) ) - { - $return_string = 'icqerror'; - } - } - - if ( ! $return_string ) - { - $value = $this->ipsclass->txt_mbsubstr( $value, 0, 100 ); - $this->ipsclass->DB->do_update( 'member_extra', array( $types[ $_type ] => $value ), 'id='.$member_id ); - $return_string = $value ? $value: $this->ipsclass->lang['no_info']; - } - } - - break; - case 'location': - if ( $value ) - { - $_v = $this->ipsclass->vars['max_location_length'] ? $this->ipsclass->vars['max_location_length']: 200; - $value = $this->ipsclass->txt_mbsubstr( $value, 0, $_v ); - $this->ipsclass->DB->do_update( 'member_extra', array( 'location' => $value ), 'id='.$member_id ); - $return_string = $value; - } - break; - case 'birthdate': - $this->ipsclass->load_language( 'lang_profile' ); - - if ( ! $pp_b_month or ! $pp_b_day ) - { - $return_string = 'dateerror'; - } - if ( ! @checkdate( $pp_b_month, $pp_b_day, $pp_b_year ) ) - { - $return_string = 'dateerror'; - } - else - { - $this->ipsclass->DB->do_update( 'members', array( 'bday_month' => intval( $pp_b_month ), - 'bday_day' => intval( $pp_b_day ), - 'bday_year' => intval( $pp_b_year ) ), 'id='.$member_id ); - - $_pp_b_month = ''; - - for( $i = 1; $i < 13; $i++ ) - { - if( $i == $pp_b_month ) - { - $_pp_b_month = $this->ipsclass->lang['M_'.$i]; - } - } - - $return_string = $_pp_b_month . '-' . $pp_b_day . '-' . $pp_b_year; - } - } - - @header( "Content-type: text/plain; charset={$this->ipsclass->vars['gb_char_set']}" ); - $this->class_ajax->print_nocache_headers(); - print $return_string; - exit(); - } - - /*-------------------------------------------------------------------------*/ - // Save Member Rating - /*-------------------------------------------------------------------------*/ - - function save_member_rate() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $rating_id = intval($this->ipsclass->input['rating']); - $rating_id = $rating_id > 5 ? 5 : $rating_id; - $rating_id = $rating_id < 0 ? 0 : $rating_id; - $member_id = intval($this->ipsclass->input['member_id']); - $member = array(); - $type = 'new'; - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! $member_id OR ! $this->ipsclass->member['id'] ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - $this->ipsclass->DB->build_query( array( 'select' => 'm.*', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.id='.$member_id, - 'add_join' => array( 0 => array( 'select' => 'me.*', - 'from' => array( 'member_extra' => 'me' ), - 'where' => 'me.id=m.id', - 'type' => 'left' ), - 1 => array( 'select' => 'pp.*', - 'from' => array( 'profile_portal' => 'pp' ), - 'where' => 'pp.pp_member_id=m.id', - 'type' => 'left' ), - 2 => array( 'select' => 'g.*', - 'from' => array( 'groups' => 'g' ), - 'where' => 'g.g_id=m.mgroup', - 'type' => 'left' ) ) ) ); - $this->ipsclass->DB->exec_query(); - - $member = $this->ipsclass->DB->fetch_row(); - - if ( ! $member['id'] ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - if ( ! $this->ipsclass->vars['pp_allow_member_rate'] ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'no_permission'; - exit(); - } - - //----------------------------------------- - // Have we already rated? - //----------------------------------------- - - $rating = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', - 'from' => 'profile_ratings', - 'where' => "rating_for_member_id={$member_id} AND rating_by_member_id=".$this->ipsclass->member['id'] ) ); - - //----------------------------------------- - // Already rated? - //----------------------------------------- - - if ( $rating['rating_id'] ) - { - //----------------------------------------- - // Do we allow re-ratings? - //----------------------------------------- - - if ( $rating_id != $rating['rating_value'] ) - { - $member['pp_rating_value'] = intval( $member['pp_rating_value'] ); - $member['pp_rating_value'] = ( $member['pp_rating_value'] + $rating_id ) - $rating['rating_value']; - - $this->ipsclass->DB->do_update( 'profile_ratings', array( 'rating_value' => $rating_id ), 'rating_id='.$rating['rating_id'] ); - - $this->ipsclass->DB->do_update( 'profile_portal', array( 'pp_rating_value' => $member['pp_rating_value'], - 'pp_rating_real' => round( $member['pp_rating_value'] / $member['pp_rating_hits'] ) ), 'pp_member_id='.$member_id ); - - $type = 'update'; - } - } - - //----------------------------------------- - // NEW RATING! - //----------------------------------------- - - else - { - $member['pp_rating_value'] = intval($member['pp_rating_value']) + $rating_id; - $member['pp_rating_hits'] = intval($member['pp_rating_hits']) + 1; - - $this->ipsclass->DB->do_insert( 'profile_ratings', array( 'rating_for_member_id' => $member_id, - 'rating_by_member_id' => $this->ipsclass->member['id'], - 'rating_value' => $rating_id, - 'rating_added' => $rating_added, - 'rating_ip_address' => $this->ipsclass->ip_address ) ); - - $this->ipsclass->DB->do_update( 'profile_portal', array( 'pp_rating_hits' => intval($member['pp_rating_hits']), - 'pp_rating_value' => intval($member['pp_rating_value']), - 'pp_rating_real' => round( $member['pp_rating_value'] / $member['pp_rating_hits'] ) ), 'pp_member_id='.$member_id ); - - - } - - $member['pp_rating_real'] = round( $member['pp_rating_value'] / $member['pp_rating_hits'] ); - - @header( "Content-type: text/plain; charset={$this->ipsclass->vars['gb_char_set']}" ); - $this->class_ajax->print_nocache_headers(); - print $member['pp_rating_value'].','.$member['pp_rating_hits'].','.$member['pp_rating_real'].','.$type; - exit(); - } - - /*-------------------------------------------------------------------------*/ - // Change a GD antispam image (if it's unreadable) - /*-------------------------------------------------------------------------*/ - - function change_gd_img() - { - $img = trim( $this->ipsclass->txt_alphanumerical_clean( $_REQUEST['img'] ) ); - - $antispam = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'reg_antispam', 'where' => "regid='" . $this->ipsclass->DB->add_slashes( $img ) . "'" ) ); - - if ( ! $antispam['regcode'] ) - { - return false; - } - - $regid = md5( uniqid(microtime()) ); - - if( $this->ipsclass->vars['bot_antispam'] == 'gd' ) - { - //----------------------------------------- - // Get 6 random chars - //----------------------------------------- - - $reg_code = strtoupper( substr( md5($regid), 0, 6 ) ); - } - else - { - //----------------------------------------- - // Set a new 6 character numerical string - //----------------------------------------- - - mt_srand ((double) microtime() * 1000000); - - $reg_code = mt_rand(100000,999999); - } - - // Clear old record first - - $this->ipsclass->DB->do_delete( 'reg_antispam', "regid='" . $this->ipsclass->DB->add_slashes( $antispam['regid'] ) . "'" ); - - // Insert into the DB - - $this->ipsclass->DB->do_insert( 'reg_antispam', array ( - 'regid' => $regid, - 'regcode' => $reg_code, - 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], - 'ctime' => time(), - ) ); - - $this->class_ajax->return_string( $regid ); - exit(); - } - - /*-------------------------------------------------------------------------*/ - // Convert RTE to STD.. or STD to RTE - /*-------------------------------------------------------------------------*/ - - function post_editorswitch() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $to_rte = intval( $_REQUEST['to_rte'] ); - $post = $this->class_ajax->convert_unicode( $_POST['Post'] ); - $post = $this->ipsclass->txt_stripslashes($post); - $post = $this->class_ajax->convert_html_entities( $post ); - - $_debug = 0; - - //----------------------------------------- - // Load BBCode - //----------------------------------------- - - require_once( ROOT_PATH . 'sources/classes/bbcode/class_bbcode_core.php' ); - require_once( ROOT_PATH . 'sources/classes/bbcode/class_bbcode.php' ); - - //----------------------------------------- - // Get the smilies from the DB - //----------------------------------------- - - if ( ! is_array( $this->ipsclass->cache['emoticons'] ) ) - { - $this->ipsclass->cache['emoticons'] = array(); - - $this->ipsclass->DB->simple_construct( array( 'select' => 'typed,image,clickable,emo_set', 'from' => 'emoticons' ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->cache['emoticons'][] = $r; - } - - @usort( $this->ipsclass->cache['emoticons'] , array( 'class_bbcode_core', 'smilie_alpha_sort' ) ); - } - - $bbcode = new class_bbcode(); - $bbcode->ipsclass =& $this->ipsclass; - $bbcode->parse_bbcode = 1; - $bbcode->parse_html = 0; - $bbcode->parse_nl2br = 1; - $bbcode->parse_smilies = 1; - - //----------------------------------------- - // Converting from STD to RTE? - //----------------------------------------- - - if ( $to_rte ) - { - $debug_string = "\n====================================================". - "\n TO RTE ".$this->ipsclass->browser['browser']. - "\n " . gmdate( 'r' ) . - "\n====================================================". - "\nORIGINAL POST\n".$post; - - //----------------------------------------- - // Ensure no slashy slashy - //----------------------------------------- - - $post = str_replace( '"','"', $post ); - $post = str_replace( "'",''', $post ); - - //----------------------------------------- - // Convert <> - //----------------------------------------- - - $post = str_replace( '<', '<', $post ); - $post = str_replace( '>', '>', $post ); - - $debug_string .= "\n====================================================". - "\n BEFORE clean_ipb_html / pre_db_parse". - "\n".$post; - "\n===================================================="; - - $post = $bbcode->clean_ipb_html( $bbcode->pre_db_parse( $post ) ); - - $debug_string .= "\n====================================================". - "\n AFTER clean_ipb_html / pre_db_parse". - "\n".$post; - "\n".$bbcode->test; - "\n===================================================="; - $debug_string .= "\n====================================================". - "\n BBCODE Debug". - "\n".$bbcode->test; - "\n===================================================="; - - //----------------------------------------- - // Fix up... - //----------------------------------------- - - if ( is_array( $this->ipsclass->skin['_macros'] ) and count( $this->ipsclass->skin['_macros'] ) ) - { - foreach( $this->ipsclass->skin['_macros'] as $row ) - { - if ( $row['macro_value'] != "" ) - { - $post = str_replace( "<{".$row['macro_value']."}>", $row['macro_replace'], $post ); - } - } - } - - $post = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $post ); - $post = str_replace( "<#EMO_DIR#>", $this->ipsclass->skin['_emodir'] , $post ); - - if ( $this->ipsclass->vars['ipb_img_url'] ) - { - $post = preg_replace( "#img\s+?src=([\"'])style_(images|avatars|emoticons)(.+?)[\"'](.+?)?".">#is", "img src=\\1".$this->ipsclass->vars['ipb_img_url']."style_\\2\\3\\1\\4>", $post ); - } - - //----------------------------------------- - // Make sure no nasty HTML entities show - //----------------------------------------- - - $post = $this->ipsclass->txt_htmlspecialchars( $post ); - - $debug_string .= "\n====================================================". - "\nSTD TO RTE CONVERTED POST\n".$post. - "\n===================================================="; - - } - //----------------------------------------- - // Converting from RTE to STD - //----------------------------------------- - - else - { - $debug_string = "\n====================================================". - "\n TO STD ".$this->ipsclass->browser['browser']. - "\n " . gmdate( 'r' ) . - "\n====================================================". - "\nORIGINAL POST\n".$post; - - require_once( ROOT_PATH . 'sources/classes/editor/class_editor.php' ); - require_once( ROOT_PATH . 'sources/classes/editor/class_editor_rte.php' ); - - //----------------------------------------- - // Ok, now, apparently, for SOME reason, IE - // strips SOME comments but not others... - // this causes font/span stuff to break. - // Let's just strip all the comments - //----------------------------------------- - - if ( $this->ipsclass->browser['browser'] == "ie" OR $this->ipsclass->browser['browser'] == "opera" ) - { - $post = preg_replace( "#<\!--(.*?)-->#is", "" , $post ); - } - - //----------------------------------------- - // IE has this thing where [center]text[/center] - // Becomes [b][center][b]text[/b][/center][/b] - //----------------------------------------- - - $rte = new class_editor_module(); - $rte->ipsclass =& $this->ipsclass; - $post = $bbcode->pre_edit_parse( $post ); - - $debug_string .= "\n====================================================". - "\n AFTER PRE_EDIT_PARSE". - "\n " . gmdate( 'r' ) . - "\n====================================================". - "\nPRE_EDIT POST\n".$post; - - $post = $rte->_rte_html_to_bbcode( $post ); - - //----------------------------------------- - // Fix up... - //----------------------------------------- - - $post = preg_replace( "/
    |
    /", "\n", $post ); - - $debug_string .= "\n====================================================". - "\nRTE TO STD CONVERTED POST\n".$post. - "\n===================================================="; - } - - if ( $_debug ) - { - $FH = @fopen( ROOT_PATH . '/cache/debug_bbcode.php', 'a+' ); - @fwrite( $FH, $debug_string ); - @fclose( $FH ); - } - - //----------------------------------------- - // Member? Store choice... - //----------------------------------------- - - if ( $this->ipsclass->member['id'] ) - { - $_choice = ( $to_rte ) ? 'rte' : 'std'; - - $this->ipsclass->DB->do_update( 'members', array( 'members_editor_choice' => $_choice ), 'id='.$this->ipsclass->member['id'] ); - } - - $post = trim( html_entity_decode($post) ); - - $this->class_ajax->print_nocache_headers(); - header( "Content-Type: text/html;charset={$this->ipsclass->vars['gb_char_set']}" ); - print $post; - exit(); - } - - /*-------------------------------------------------------------------------*/ - // Save Topic Rating - /*-------------------------------------------------------------------------*/ - - function save_topic_rate() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $ratingid = intval($this->ipsclass->input['rating']); - $ratingid = $ratingid > 5 ? 5 : $ratingid; - $ratingid = $ratingid < 0 ? 0 : $ratingid; - $topicid = intval($this->ipsclass->input['t']); - $vote_cast = array(); - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( !$topicid ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - $topic = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid='.$topicid ) ); - - if ( ! $topic['forum_id'] ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - if ( ! $this->ipsclass->forums->forum_by_id[ $topic['forum_id'] ]['forum_allow_rating'] ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'no_permission'; - exit(); - } - - if ( $topic['state'] != 'open' ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'no_permission'; - exit(); - } - - if ( intval($this->ipsclass->member['g_topic_rate_setting']) == 0 ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'no_permission'; - exit(); - } - - //----------------------------------------- - // Have we already rated? - //----------------------------------------- - - $rating = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'topic_ratings', 'where' => "rating_tid={$topicid} and rating_member_id=".$this->ipsclass->member['id'] ) ); - - //----------------------------------------- - // Still here? Load topic 'stuff' - //----------------------------------------- - - #$this->ipsclass->load_template( 'skin_topic' ); - #$this->ipsclass->load_language( 'lang_topic' ); - - //----------------------------------------- - // Already rated? - //----------------------------------------- - - if ( $rating['rating_id'] ) - { - //----------------------------------------- - // Do we allow re-ratings? - //----------------------------------------- - - if ( $this->ipsclass->member['g_topic_rate_setting'] == 2 ) - { - if ( $ratingid != $rating['rating_value'] ) - { - $new_rating = $ratingid - $rating['rating_value']; - - $this->ipsclass->DB->do_update( 'topic_ratings', array( 'rating_value' => $ratingid ), 'rating_id='.$rating['rating_id'] ); - - $this->ipsclass->DB->do_update( 'topics', array( 'topic_rating_total' => intval($topic['topic_rating_total']) + $new_rating ), 'tid='.$topicid ); - - $topic['topic_rating_total'] = intval($topic['topic_rating_total']) + $new_rating; - } - - $type = 'update'; - } - else - { - $ratingid = $rating['rating_value']; - } - } - - //----------------------------------------- - // NEW RATING! - //----------------------------------------- - - else - { - $topic['topic_rating_hits'] = intval($topic['topic_rating_hits']) + 1; - $topic['topic_rating_total'] = intval($topic['topic_rating_total']) + $ratingid; - - $this->ipsclass->DB->do_insert( 'topic_ratings', array( 'rating_tid' => $topic['tid'], - 'rating_member_id' => $this->ipsclass->member['id'], - 'rating_value' => $ratingid, - 'rating_ip_address' => $this->ipsclass->ip_address ) ); - - $this->ipsclass->DB->do_update( 'topics', array( 'topic_rating_hits' => $topic['topic_rating_hits'], - 'topic_rating_total' => $topic['topic_rating_total'] ), 'tid='.$topic['tid'] ); - - $type = 'new'; - } - - $topic['_rate_int'] = round( $topic['topic_rating_total'] / $topic['topic_rating_hits'] ); - - @header( "Content-type: text/plain; charset={$this->ipsclass->vars['gb_char_set']}" ); - $this->class_ajax->print_nocache_headers(); - print $topic['topic_rating_total'].','.$topic['topic_rating_hits'].','.$topic['_rate_int'].','.$type; - exit(); - } - - /*-------------------------------------------------------------------------*/ - // Check email address - /*-------------------------------------------------------------------------*/ - - function check_email_address() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $email = $this->ipsclass->parse_clean_value( rawurldecode( $_REQUEST['email'] ) ); - - //----------------------------------------- - // Try query... - //----------------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => "email,id", - 'from' => 'members', - 'where' => "LOWER(email)='". $this->ipsclass->DB->add_slashes( $email ) . "'", - 'limit' => array( 0,1 ) ) ); - - $this->ipsclass->DB->exec_query(); - - //----------------------------------------- - // Got any results? - //----------------------------------------- - - if ( ! $this->ipsclass->DB->get_num_rows() ) - { - //----------------------------------------- - // No illegal characters - //----------------------------------------- - - if ( preg_match( "#[\;\#\n\r\*\'\"<>&\%\!\(\)\{\}\[\]\?\\/\s]#", $email) ) - { - $this->class_ajax->return_string('invalid'); - } - - //----------------------------------------- - // Load ban filters - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'banfilters' ) ); - $this->ipsclass->DB->simple_exec(); - - while( $r = $this->ipsclass->DB->fetch_row() ) - { - $banfilters[ $r['ban_type'] ][] = $r['ban_content']; - } - - //----------------------------------------- - // Are they banned [EMAIL]? - //----------------------------------------- - - if ( is_array( $banfilters['email'] ) and count( $banfilters['email'] ) ) - { - foreach ( $banfilters['email'] as $memail ) - { - $memail = str_replace( "\*", '.*' , preg_quote($memail, "/") ); - - if ( preg_match( "/^{$memail}$/", $email ) ) - { - $this->class_ajax->return_string('banned'); - break; - } - } - } - - if( $this->ipsclass->clean_email( $email ) ) - { - $this->class_ajax->return_string('notfound'); - } - else - { - $this->class_ajax->return_string('invalid'); - } - } - else - { - $this->class_ajax->return_string('found'); - } - } - - /*-------------------------------------------------------------------------*/ - // Check display name - /*-------------------------------------------------------------------------*/ - - function check_display_name( $field='members_display_name' ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - //$name = strtolower( $this->ipsclass->parse_clean_value( trim( rawurldecode( $_REQUEST['name'] ) ) ) ); - $name = strtolower( $this->class_ajax->convert_and_make_safe( $_REQUEST['name'] ) ); - $name = str_replace("+", "+", $name ); - - $id = intval( $_REQUEST['id'] ); - - # Set member ID - $id = $this->ipsclass->member['id'] ? $this->ipsclass->member['id'] : $id; - - //----------------------------------------- - // Remove 'sneaky' spaces - //----------------------------------------- - - if ( $this->ipsclass->vars['strip_space_chr'] ) - { - // Use hexdec to convert between '0xAD' and chr - $name = str_replace( chr(160), ' ', $name ); - $name = str_replace( chr(173), ' ', $name ); - - $name = trim($name); - } - - //----------------------------------------- - // Not allowed to select another's log in name - //----------------------------------------- - - if ( $field == 'members_display_name' AND $this->ipsclass->vars['auth_dnames_nologinname'] ) - { - $check_name = $this->ipsclass->DB->build_and_exec_query( array( 'select' => "{$field}, id", - 'from' => 'members', - 'where' => "members_l_username='". $this->ipsclass->DB->add_slashes( $name ) . "'", - 'limit' => array( 0,1 ) ) ); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - if ( $id AND $check_name['id'] == $id ) - { - $this->class_ajax->return_string('notfound'); - break; - } - else - { - $this->class_ajax->return_string('found'); - break; - } - } - } - - if ( $field == 'name' AND $this->ipsclass->vars['auth_dnames_nologinname'] ) - { - $check_name = $this->ipsclass->DB->build_and_exec_query( array( 'select' => "{$field}, id", - 'from' => 'members', - 'where' => "members_l_display_name='". $this->ipsclass->DB->add_slashes( $name ) . "'", - 'limit' => array( 0,1 ) ) ); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - if ( $id AND $check_name['id'] == $id ) - { - $this->class_ajax->return_string('notfound'); - break; - } - else - { - $this->class_ajax->return_string('found'); - break; - } - } - } - - //----------------------------------------- - // Not allowed to select another's name - //----------------------------------------- - - if( $field == 'members_display_name' ) - { - $check_field = 'members_l_display_name'; - } - else - { - $check_field = 'members_l_username'; - } - - $check_name = $this->ipsclass->DB->build_and_exec_query( array( 'select' => "{$field}, id", - 'from' => 'members', - 'where' => "{$check_field}='{$name}'", - 'limit' => array( 0,1 ) ) ); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - if ( $id AND $check_name['id'] == $id ) - { - $this->class_ajax->return_string('notfound'); - break; - } - else - { - $this->class_ajax->return_string('found'); - break; - } - } - - //----------------------------------------- - // Didn't get a result from the DB - //----------------------------------------- - - else - { - //----------------------------------------- - // Load ban filters - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'banfilters' ) ); - $this->ipsclass->DB->simple_exec(); - - while( $r = $this->ipsclass->DB->fetch_row() ) - { - $banfilters[ $r['ban_type'] ][] = $r['ban_content']; - } - - //----------------------------------------- - // Are they banned [NAMES]? - //----------------------------------------- - - if ( is_array( $banfilters['name'] ) and count( $banfilters['name'] ) ) - { - foreach ( $banfilters['name'] as $n ) - { - if ( $n == "" ) - { - continue; - } - - $n = preg_replace( "/\*/", '.*' , preg_quote($n, "/") ); - - if ( preg_match( "/^{$n}$/i", $name ) ) - { - $this->class_ajax->return_string('found'); - break; - } - } - } - - $this->class_ajax->return_string('notfound'); - } - } - - /*-------------------------------------------------------------------------*/ - // Post Edit Save - /*-------------------------------------------------------------------------*/ - - function post_edit_save() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $pid = intval( $_REQUEST['p'] ); - $fid = intval( $_REQUEST['f'] ); - $tid = intval( $_REQUEST['t'] ); - $md5_check = substr( $this->ipsclass->parse_clean_value( rawurldecode( $_REQUEST['md5check'] ) ), 0, 32 ); - $attach_pids = array(); - $_POST['Post'] = $this->class_ajax->convert_unicode( $_POST['Post'] ); - $_POST['Post'] = $this->class_ajax->convert_html_entities( $_POST['Post'] ); - - $this->ipsclass->input['post_edit_reason'] = $this->class_ajax->convert_unicode( rawurldecode( $_REQUEST['post_edit_reason'] ) ); - $this->ipsclass->input['post_edit_reason'] = $this->ipsclass->parse_clean_value( $this->class_ajax->convert_html_entities( $this->ipsclass->input['post_edit_reason'] ) ); - - //----------------------------------------- - // Set things right - //----------------------------------------- - - $_POST['std_used'] = 1; - $this->ipsclass->input['Post'] = $this->ipsclass->parse_clean_value( $_POST['Post'] ); - - //----------------------------------------- - // Check MD5 - //----------------------------------------- - - if ( $md5_check != $this->ipsclass->return_md5_check() ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - //----------------------------------------- - // Check P|T|FID - //----------------------------------------- - - if ( ! $pid OR ! $tid OR ! $fid ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - //----------------------------------------- - // Load Lang - //----------------------------------------- - - $this->ipsclass->load_language( 'lang_topic' ); - - //----------------------------------------- - // Get topic - //----------------------------------------- - - $topic = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => "topics", 'where' => 'tid='.$tid ) ); - - //----------------------------------------- - // Got permission? - //----------------------------------------- - - if ( ( $topic['state'] != 'open' ) and ( ! $this->ipsclass->member['g_is_supmod'] ) ) - { - if ( $this->ipsclass->member['g_post_closed'] != 1 ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'nopermission'; - exit(); - } - } - - if ( $this->ipsclass->check_perms( $this->ipsclass->forums->forum_by_id[ $fid ]['reply_perms'] ) == FALSE ) - { - $_ok = 0; - - //----------------------------------------- - // Are we a member who started this topic - // and are editing the topic's first post? - //----------------------------------------- - - if ( $this->ipsclass->member['id'] ) - { - if ( $topic['topic_firstpost'] ) - { - $_post = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'pid, author_id, topic_id', - 'from' => 'posts', - 'where' => 'pid=' . intval( $topic['topic_firstpost'] ) ) ); - - if ( $_post['pid'] AND $_post['topic_id'] == $topic['tid'] AND $_post['author_id'] == $this->ipsclass->member['id'] ) - { - $_ok = 1; - } - } - } - - if ( ! $_ok ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'nopermission'; - exit(); - } - } - - if ( $this->ipsclass->forums->forum_by_id[ $fid ]['status'] == 0 ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'nopermission'; - exit(); - } - - if ( $this->ipsclass->member['id'] ) - { - if ( $this->ipsclass->member['restrict_post'] ) - { - if ( $this->ipsclass->member['restrict_post'] == 1 ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'nopermission'; - exit(); - } - - $post_arr = $this->ipsclass->hdl_ban_line( $this->ipsclass->member['restrict_post'] ); - - if ( time() >= $post_arr['date_end'] ) - { - //----------------------------------------- - // Update this member's profile - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'update' => 'members', - 'set' => 'restrict_post=0', - 'where' => "id=".intval($this->ipsclass->member['id']) - ) ); - - $this->ipsclass->DB->simple_exec(); - } - else - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'nopermission'; - exit(); - } - } - } - - //----------------------------------------- - // Get classes - //----------------------------------------- - - if ( ! $this->post_init ) - { - require_once( ROOT_PATH."sources/classes/post/class_post.php" ); - require_once( ROOT_PATH."sources/classes/post/class_post_edit.php" ); - - $this->post = new post_functions(); - $this->post->ipsclass =& $this->ipsclass; - $this->post->forum = $this->ipsclass->forums->forum_by_id[ $fid ]; - $this->post->main_init(); - $this->post_init = 1; - } - - //----------------------------------------- - // Make sure smilies are parsed - //----------------------------------------- - - $this->ipsclass->input['enableemo'] = $this->post->orig_post['use_emo'] ? 'yes' : ''; - $this->ipsclass->input['enablesig'] = $this->post->orig_post['use_sig'] ? 'yes' : ''; - $this->ipsclass->input['post_htmlstatus'] = $this->post->orig_post['post_htmlstate']; - $this->ipsclass->input['iconid'] = $this->post->orig_post['icon_id']; - $this->ipsclass->input['add_edit'] = ( $this->post->orig_post['append_edit'] OR !$this->ipsclass->member['g_append_edit'] ) ? 1 : 0; - - //----------------------------------------- - // check - //----------------------------------------- - - if ( ! $this->post->orig_post['post'] ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - //----------------------------------------- - // PARSE - //----------------------------------------- - - # Prevent polls from being edited - $this->post->can_add_poll = 0; - - # Prevent titles from being edited - $this->post->edit_title = 0; - - $this->post->convert_open_close_times(); - $this->post->post = $this->post->compile_post(); - - # Errors? - if ( $this->post->obj['post_errors'] ) - { - $this->post_edit_show( $this->ipsclass->lang[ $this->post->obj['post_errors'] ] ); - } - else - { - $this->post->save_post(); - } - - //----------------------------------------- - // Prep for display - //----------------------------------------- - - $raw_post = $this->post->show_post_preview( $this->post->post['post'] ) . "\n" . ''; - - //----------------------------------------- - // Showing reason for edit? - //----------------------------------------- - - if ( $this->ipsclass->member['g_is_supmod'] OR $this->post->moderator['edit_post'] ) - { - if ( $this->post->post['post_edit_reason'] ) - { - $raw_post .= "\n
    - {$this->ipsclass->lang['reason_for_edit']}: {$this->post->post['post_edit_reason']} -
    "; - } - } - - if ( ! is_object( $this->class_attach ) ) - { - //----------------------------------------- - // Grab render attach class - //----------------------------------------- - - require_once( ROOT_PATH . 'sources/classes/attach/class_attach.php' ); - $this->class_attach = new class_attach(); - $this->class_attach->ipsclass =& $this->ipsclass; - } - - $this->ipsclass->load_template( 'skin_topic' ); - $this->class_attach->type = 'post'; - $this->class_attach->init(); - - $raw_post = $this->class_attach->render_attachments( $raw_post, array( $pid => $pid ) ); - - if ( $this->post->post['append_edit'] == 1 AND $this->post->post['edit_time'] AND $this->post->post['edit_name'] ) - { - $e_time = $this->ipsclass->get_date( $this->post->post['edit_time'] , 'LONG' ); - $raw_post .= "

    ".sprintf($this->ipsclass->lang['edited_by'], $this->post->post['edit_name'], $e_time).""; - } - - foreach( $this->ipsclass->skin['_macros'] as $row ) - { - if ( $row['macro_value'] != "" ) - { - $raw_post = str_replace( "<{".$row['macro_value']."}>", $row['macro_replace'], $raw_post ); - } - } - - $raw_post = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $raw_post ); - $raw_post = str_replace( "<#EMO_DIR#>", $this->ipsclass->skin['_emodir'] , $raw_post ); - - if ( $this->ipsclass->vars['ipb_img_url'] ) - { - $raw_post = preg_replace( "#img\s+?src=([\"'])style_(images|avatars|emoticons)(.+?)[\"'](.+?)?".">#is", "img src=\\1".$this->ipsclass->vars['ipb_img_url']."style_\\2\\3\\1\\4>", $raw_post ); - } - - //----------------------------------------- - // Return plain text - //----------------------------------------- - - @header( "Content-type: text/html; charset={$this->ipsclass->vars['gb_char_set']}" ); - $this->class_ajax->print_nocache_headers(); - print $raw_post; - exit(); - } - - /*-------------------------------------------------------------------------*/ - // Post Edit Show - /*-------------------------------------------------------------------------*/ - - function post_edit_show( $error_msg = "" ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $pid = intval( $_REQUEST['p'] ); - $fid = intval( $_REQUEST['f'] ); - $tid = intval( $_REQUEST['t'] ); - $show_reason = 0; - - //----------------------------------------- - // Check P|T|FID - //----------------------------------------- - - if ( ! $pid OR ! $tid OR ! $fid ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - - //----------------------------------------- - // Get topic - //----------------------------------------- - - $topic = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => "topics", 'where' => 'tid='.$tid ) ); - - //----------------------------------------- - // Got permission? - //----------------------------------------- - - if ( ( $topic['state'] != 'open' ) and ( ! $this->ipsclass->member['g_is_supmod'] ) ) - { - if ( $this->ipsclass->member['g_post_closed'] != 1 ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'nopermission'; - exit(); - } - } - - if ( $this->ipsclass->check_perms( $this->ipsclass->forums->forum_by_id[ $fid ]['reply_perms'] ) == FALSE ) - { - $_ok = 0; - - //----------------------------------------- - // Are we a member who started this topic - // and are editing the topic's first post? - //----------------------------------------- - - if ( $this->ipsclass->member['id'] ) - { - if ( $topic['topic_firstpost'] ) - { - $_post = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'pid, author_id, topic_id', - 'from' => 'posts', - 'where' => 'pid=' . intval( $topic['topic_firstpost'] ) ) ); - - if ( $_post['pid'] AND $_post['topic_id'] == $topic['tid'] AND $_post['author_id'] == $this->ipsclass->member['id'] ) - { - $_ok = 1; - } - } - } - - if ( ! $_ok ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'nopermission'; - exit(); - } - } - - if ( $this->ipsclass->forums->forum_by_id[ $fid ]['status'] == 0 ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'nopermission'; - exit(); - } - - if ( $this->ipsclass->member['id'] ) - { - if ( $this->ipsclass->member['restrict_post'] ) - { - if ( $this->ipsclass->member['restrict_post'] == 1 ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'nopermission'; - exit(); - } - - $post_arr = $this->ipsclass->hdl_ban_line( $this->ipsclass->member['restrict_post'] ); - - if ( time() >= $post_arr['date_end'] ) - { - //----------------------------------------- - // Update this member's profile - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'update' => 'members', - 'set' => 'restrict_post=0', - 'where' => "id=".intval($this->ipsclass->member['id']) - ) ); - - $this->ipsclass->DB->simple_exec(); - } - else - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'nopermission'; - exit(); - } - } - } - - //----------------------------------------- - // Get classes - //----------------------------------------- - - if ( ! $this->post_init ) - { - require_once( ROOT_PATH."sources/classes/post/class_post.php" ); - require_once( ROOT_PATH."sources/classes/post/class_post_edit.php" ); - - $this->ipsclass->load_language( 'lang_editors' ); - - $this->post = new post_functions(); - $this->post->ipsclass =& $this->ipsclass; - $this->post->forum = $this->ipsclass->forums->forum_by_id[ $fid ]; - $this->post->main_init(); - $this->post_init = 1; - } - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! $this->post->orig_post['post'] OR ! $topic['tid'] ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'nopermission'; - exit(); - } - - //----------------------------------------- - // Convert and return plain text - //----------------------------------------- - - $raw_post = $this->post->parser->pre_edit_parse( $this->post->orig_post['post'] ); - - // Fix IE bugs - $raw_post = str_replace( "§", "&sect", $raw_post ); - - if ( strtolower( $this->ipsclass->vars['gb_char_set'] ) == 'iso-8859-1' ) - { - $raw_post = str_replace( "“", "“", $raw_post ); - $raw_post = str_replace( "”", "”", $raw_post ); - } - - //----------------------------------------- - // Allow to edit the reason? - //----------------------------------------- - - if ( $this->ipsclass->member['g_is_supmod'] ) - { - $show_reason = 1; - } - else - { - //----------------------------------------- - // Load the moderator - //----------------------------------------- - - if ( $this->ipsclass->member['id'] ) - { - if ( is_array( $this->post->moderator ) ) - { - if ( $this->post->moderator['edit_post'] ) - { - $show_reason = 1; - } - } - } - } - - //----------------------------------------- - // Show HTML - //----------------------------------------- - - $html = $this->ipsclass->compiled_templates['skin_post']->inline_edit_quick_box( $raw_post, $pid, $error_msg, $show_reason, $this->post->orig_post['post_edit_reason'] ); - - if ( $this->ipsclass->vars['ipb_img_url'] ) - { - $html = preg_replace( "#img\s+?src=([\"'])style_(images|avatars|emoticons)(.+?)[\"'](.+?)?".">#is", "img src=\\1".$this->ipsclass->vars['ipb_img_url']."style_\\2\\3\\1\\4>", $html ); - } - - $this->class_ajax->return_html( $html ); - exit(); - } - - /*-------------------------------------------------------------------------*/ - // DST Auto correction - /*-------------------------------------------------------------------------*/ - - function dst_autocorrection() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $xml = intval( $_REQUEST['xml'] ); - $md5_check = substr( $this->ipsclass->parse_clean_value( rawurldecode( $_REQUEST['md5check'] ) ), 0, 32 ); - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( $md5_check != $this->ipsclass->return_md5_check() ) - { - if ( $xml ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'error'; - exit(); - } - else - { - $this->ipsclass->boink_it( $this->ipsclass->base_url . 'act=usercp&CODE=04&dsterror=1' ); - } - } - - //----------------------------------------- - // Already using DST? - //----------------------------------------- - - if ( $this->ipsclass->member['dst_in_use'] == 1 ) - { - $this->ipsclass->DB->do_update( 'members', array( 'dst_in_use' => 0 ), 'id='.$this->ipsclass->member['id'] ); - } - else - { - $this->ipsclass->DB->do_update( 'members', array( 'dst_in_use' => 1 ), 'id='.$this->ipsclass->member['id'] ); - } - - if ( $xml ) - { - @header( "Content-type: text/plain" ); - $this->class_ajax->print_nocache_headers(); - print 'success'; - exit(); - } - else - { - $this->ipsclass->boink_it( $this->ipsclass->base_url . 'act=idx' ); - } - } - - /*-------------------------------------------------------------------------*/ - // Get new posts - /*-------------------------------------------------------------------------*/ - - function get_msg_preview() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $limit = intval( $_REQUEST['limit'] ); - - //----------------------------------------- - // Couldn't be easier.... - //----------------------------------------- - - $return = $this->ipsclass->get_new_pm_notification( $limit, TRUE ); - - header("Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}"); - $this->class_ajax->print_nocache_headers(); - print $return; - exit(); - } - - /*-------------------------------------------------------------------------*/ - // Get new posts - /*-------------------------------------------------------------------------*/ - - function save_topic() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $name = $this->ipsclass->parse_clean_value( $this->class_ajax->convert_unicode($_REQUEST['name']) ); - $type = $this->ipsclass->parse_clean_value( rawurldecode( $_REQUEST['type'] ) ); - $tid = intval( $_REQUEST['tid'] ); - $md5_check = substr( $this->ipsclass->parse_clean_value( rawurldecode( $_REQUEST['md5check'] ) ), 0, 32 ); - $can_edit = 0; - $openclose = ''; - - $name = $this->class_ajax->convert_html_entities( $name ); - - //----------------------------------------- - // Checks... - //----------------------------------------- - - if ( ! $tid OR ! $type ) - { - $this->class_ajax->return_null('-'); - exit(); - } - - if ( $md5_check != $this->ipsclass->return_md5_check() ) - { - $this->class_ajax->return_null('-'); - exit(); - } - - //----------------------------------------- - // Load topic - //----------------------------------------- - - $topic = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid='.$tid ) ); - - if ( ! $topic['tid'] ) - { - $this->class_ajax->return_null('-'); - exit(); - } - - //----------------------------------------- - // Have permission? - //----------------------------------------- - - if ( $this->ipsclass->member['g_is_supmod'] ) - { - $can_edit = 1; - } - - if ( $type == 'openclose' ) - { - if ( $name == 'close' OR $name == 'closed' ) - { - $openclose = 'closed'; - - if ( $this->ipsclass->member['_moderator'][ $topic['forum_id'] ]['close_topic'] ) - { - $can_edit = 1; - } - } - else - { - $openclose = 'open'; - - if ( $this->ipsclass->member['_moderator'][ $topic['forum_id'] ]['open_topic'] ) - { - $can_edit = 1; - } - } - } - else - { - if ( $this->ipsclass->member['_moderator'][ $topic['forum_id'] ]['edit_topic'] ) - { - $can_edit = 1; - } - } - - if ( ! $can_edit ) - { - $this->class_ajax->return_null('0'); - exit(); - } - - //----------------------------------------- - // index.php?act=xmlout&do=save-topic&type=title&tid=60591&name=test&md5check=b6417fb0cbd1e24250db348193fdb7c1 - // Alright, save it! - //----------------------------------------- - - if ( $type == 'desc' ) - { - $this->ipsclass->DB->do_update( 'topics', array( 'description' => $name ), 'tid='.$tid ); - - $this->ipsclass->DB->do_insert( 'moderator_logs', array ( - 'forum_id' => intval($topic['forum_id']), - 'topic_id' => intval($tid), - 'post_id' => intval($pid), - 'member_id' => $this->ipsclass->member['id'], - 'member_name' => $this->ipsclass->member['members_display_name'], - 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], - 'http_referer'=> htmlspecialchars($this->ipsclass->my_getenv('HTTP_REFERER')), - 'ctime' => time(), - 'topic_title' => $topic['title'], - 'action' => $this->ipsclass->lang['ajax_topicdesc'], - 'query_string'=> htmlspecialchars($this->ipsclass->my_getenv('QUERY_STRING')), - ) ); - } - else if ( $type == 'openclose' ) - { - $this->ipsclass->DB->do_update( 'topics', array( 'state' => $openclose ), 'tid='.$tid ); - - $this->ipsclass->DB->do_insert( 'moderator_logs', array ( - 'forum_id' => intval($topic['forum_id']), - 'topic_id' => intval($tid), - 'post_id' => intval($pid), - 'member_id' => $this->ipsclass->member['id'], - 'member_name' => $this->ipsclass->member['members_display_name'], - 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], - 'http_referer'=> htmlspecialchars($this->ipsclass->my_getenv('HTTP_REFERER')), - 'ctime' => time(), - 'topic_title' => $topic['title'], - 'action' => $this->ipsclass->lang['ajax_topicstate'], - 'query_string'=> htmlspecialchars($this->ipsclass->my_getenv('QUERY_STRING')), - ) ); - - $topic['state'] = $openclose; - - $last_time = $this->ipsclass->input['last_visit']; - - if ( isset($this->ipsclass->forum_read[ $topic['forum_id'] ]) AND $this->ipsclass->forum_read[ $topic['forum_id'] ] > $last_time ) - { - $last_time = $this->ipsclass->forum_read[ $topic['forum_id'] ]; - } - - $macro = $this->ipsclass->folder_icon( $topic, '', $last_time ); - - if ( is_array( $this->ipsclass->skin['_macros'] ) ) - { - foreach( $this->ipsclass->skin['_macros'] as $row ) - { - $macro = str_replace( '<{'.$row['macro_value'].'}>', $row['macro_replace'], $macro ); - } - } - - $macro = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $macro ); - $macro = str_replace( "<#EMO_DIR#>", $this->ipsclass->skin['_emodir'] , $macro ); - - if ( $this->ipsclass->vars['ipb_img_url'] ) - { - $macro = preg_replace( "#img\s+?src=([\"'])style_(images|avatars|emoticons)(.+?)[\"'](.+?)?".">#is", "img src=\\1".$this->ipsclass->vars['ipb_img_url']."style_\\2\\3\\1\\4>", $macro ); - } - - $this->class_ajax->return_string( $macro ); - exit; - } - else - { - if( trim($name) == '' OR !$name ) - { - $this->class_ajax->return_string($topic['title']); - exit(); - } - - if ($this->ipsclass->vars['etfilter_punct']) - { - $name = preg_replace( "/\?{1,}/" , "?" , $name ); - $name = preg_replace( "/(!){1,}/" , "!", $name ); - } - - if ($this->ipsclass->vars['etfilter_shout']) - { - $name = ucwords(strtolower($name)); - } - - $this->ipsclass->DB->do_update( 'topics', array( 'title' => $name ), 'tid='.$tid ); - - $this->ipsclass->DB->do_insert( 'moderator_logs', array ( - 'forum_id' => intval($topic['forum_id']), - 'topic_id' => intval($tid), - 'post_id' => intval($pid), - 'member_id' => $this->ipsclass->member['id'], - 'member_name' => $this->ipsclass->member['members_display_name'], - 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], - 'http_referer'=> htmlspecialchars($this->ipsclass->my_getenv('HTTP_REFERER')), - 'ctime' => time(), - 'topic_title' => $name, - 'action' => sprintf($this->ipsclass->lang['ajax_topictitle'],$topic['title'],$name), - 'query_string'=> htmlspecialchars($this->ipsclass->my_getenv('QUERY_STRING')), - ) ); - - if ( $topic['tid'] == $this->ipsclass->forums->forum_by_id[ $topic['forum_id'] ]['last_id'] ) - { - $this->ipsclass->DB->do_update( 'forums', array( 'last_title' => $name ), 'id='.$topic['forum_id'] ); - } - - if ( $topic['tid'] == $this->ipsclass->forums->forum_by_id[ $topic['forum_id'] ]['newest_id'] ) - { - $this->ipsclass->DB->do_update( 'forums', array( 'newest_title' => $name ), 'id='.$topic['forum_id'] ); - } - - $this->ipsclass->update_forum_cache(); - - $this->class_ajax->return_string($name); - exit(); - } - - $this->class_ajax->return_null('s'); - exit(); - - } - - /*-------------------------------------------------------------------------*/ - // Get member names - /*-------------------------------------------------------------------------*/ - - function get_member_names() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $name = $this->class_ajax->convert_and_make_safe( $_REQUEST['name'] ); - - //-------------------------------------------- - // Load extra db cache file - //-------------------------------------------- - - $this->ipsclass->DB->load_cache_file( ROOT_PATH.'sources/sql/'.SQL_DRIVER.'_extra_queries.php', 'sql_extra_queries' ); - - //----------------------------------------- - // Check length - //----------------------------------------- - - if ( strlen( $name ) < 3 ) - { - $this->class_ajax->return_null(); - } - - //----------------------------------------- - // Try query... - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'member_display_name_lookup', array( 'name' => $this->ipsclass->DB->add_slashes( $name ), 'field' => 'members_display_name' ), 'sql_extra_queries' ); - $this->ipsclass->DB->cache_exec_query(); - - //----------------------------------------- - // Got any results? - //----------------------------------------- - - if ( ! $this->ipsclass->DB->get_num_rows() ) - { - $this->class_ajax->return_null(); - } - - $names = array(); - $ids = array(); - - while( $r = $this->ipsclass->DB->fetch_row() ) - { - $names[] = '"'.$r['members_display_name'].'"'; - $ids[] = intval($r['id']); - } - - $this->class_ajax->print_nocache_headers(); - @header( "Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}" ); - print "returnSearch( '".str_replace( "'", "", $name )."', new Array(".implode( ",", $names )."), new Array(".implode( ",", $ids ).") );"; - } - - /*-------------------------------------------------------------------------*/ - // Get new posts - /*-------------------------------------------------------------------------*/ - - function get_new_messages( $return=0 ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $count = isset($_REQUEST['count']) ? intval( $_REQUEST['count'] ) : 0; - $count = $count ? $count : 5; - - $html = ""; - - $this->ipsclass->load_template( 'skin_msg' ); - $this->ipsclass->load_language( 'lang_msg' ); - - //----------------------------------------- - // Check... - //----------------------------------------- - - if ( ! $this->ipsclass->member['id'] ) - { - return $this->class_ajax->error_handler(); - } - - //----------------------------------------- - // Get message list - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'msg_get_folder_list', - array( 'mid' => $this->ipsclass->member['id'], 'vid' => 'in', 'sort' => 'mt_date DESC', 'limita' => 0, 'limitb' => $count ) ); - $this->ipsclass->DB->simple_exec(); - - if ( ! $this->ipsclass->DB->get_num_rows() ) - { - //$this->class_ajax->error_handler("No messages"); - $html .= $this->ipsclass->compiled_templates['skin_msg']->xmlout_msgs_none(); - } - else - { - //----------------------------------------- - // Start output - //----------------------------------------- - - while( $r = $this->ipsclass->DB->fetch_row() ) - { - //----------------------------------------- - // We only want 10 rows, but the 11th will - // tell us if there are more to come - //----------------------------------------- - - $r['date'] = $this->ipsclass->get_date( $r['mt_date'] , 'TINY', 0, 1 ); - $r['icon'] = $r['mt_read'] == 1 ? "" - : ""; - - $r['_mini'] = $this->ipsclass->txt_truncate( $r['mt_title'] , 30 ); - - $html .= $this->ipsclass->compiled_templates['skin_msg']->xmlout_msgs_row( $r ); - } - } - - //----------------------------------------- - // Check count... - //----------------------------------------- - - if ( ! $return ) - { - @header( "Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}" ); - $this->class_ajax->print_nocache_headers(); - print $this->ipsclass->compiled_templates['skin_msg']->xmlout_msgs_wrapper( $html ); - exit(); - } - else - { - return $this->ipsclass->compiled_templates['skin_msg']->xmlout_msgs_wrapper( $html ); - } - } - - - /*-------------------------------------------------------------------------*/ - // Get new posts - /*-------------------------------------------------------------------------*/ - - function mark_forum_as_read() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $forum_id = intval( $_REQUEST['fid'] ); - $sf = intval( $_REQUEST['sf'] ); - $forum_data = $this->ipsclass->forums->forum_by_id[ $forum_id ]; - $children = $this->ipsclass->forums->forums_get_children( $forum_data['id'] ); - $save = array(); - $delete = array(); - - //----------------------------------------- - // Check... - //----------------------------------------- - - /*if ( ! $this->ipsclass->member['id'] ) - { - return $this->class_ajax->error_handler(); - }*/ - - if ( ! $forum_id ) - { - return $this->class_ajax->error_handler(); - } - - //----------------------------------------- - // OK - do the magic!! - //----------------------------------------- - - if ( $sf ) - { - if ( isset($children) AND is_array($children) and count($children) ) - { - foreach( $children as $id ) - { - $this->ipsclass->forum_read[ $id ] = time(); - - $delete[] = $id; - - $save[ $id ] = array( 'marker_forum_id' => $id, - 'marker_member_id' => $this->ipsclass->member['id'], - 'marker_last_update' => time(), - 'marker_unread' => 0, - 'marker_last_cleared' => time() ); - } - } - } - - //----------------------------------------- - // Add in the current forum... - //----------------------------------------- - - $this->ipsclass->forum_read[ $forum_data['id'] ] = time(); - - $delete[] = $forum_data['id']; - - $save[ $forum_data['id'] ] = array( 'marker_forum_id' => $forum_data['id'], - 'marker_member_id' => $this->ipsclass->member['id'], - 'marker_last_update' => time(), - 'marker_unread' => 0, - 'marker_last_cleared' => time() ); - - //----------------------------------------- - // Reset topic markers - //----------------------------------------- - - if ( $this->ipsclass->vars['db_topic_read_cutoff'] and $this->ipsclass->member['id'] ) - { - if ( count( $delete ) ) - { - $this->ipsclass->DB->do_delete( 'topic_markers', 'marker_member_id='.$this->ipsclass->member['id'].' AND marker_forum_id IN ('.implode(',',$delete ).')' ); - - foreach( $save as $data ) - { - $this->ipsclass->DB->do_insert( 'topic_markers', $data ); - } - } - } - - //----------------------------------------- - // Reset cookie - //----------------------------------------- - - $this->ipsclass->no_print_header = 0; - $this->ipsclass->hdl_forum_read_cookie('set'); - $this->ipsclass->no_print_header = 1; - - @header( "Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}" ); - $this->class_ajax->print_nocache_headers(); - print "1"; - exit(); - } - - /*-------------------------------------------------------------------------*/ - // Get new posts - /*-------------------------------------------------------------------------*/ - - function get_new_posts( $return=0 ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $count = 0; - $st = intval( $_REQUEST['st'] ); - $next = 0; - $previous = 0; - $html = ''; - - $this->ipsclass->load_template( 'skin_search' ); - $this->ipsclass->load_language( 'lang_search' ); - - //----------------------------------------- - // Check... - //----------------------------------------- - - if ( ! $this->ipsclass->member['id'] ) - { - return $this->class_ajax->error_handler(); - } - - //----------------------------------------- - // Get search lib - //----------------------------------------- - - require_once( ROOT_PATH.'sources/action_public/search.php' ); - $this->search = new search(); - $this->search->ipsclass =& $this->ipsclass; - - //----------------------------------------- - // Do we have any forums to search in? - //----------------------------------------- - - $this->ipsclass->input['forums'] = 'all'; - $this->ipsclass->input['CODE'] = 'getnew'; - - $forums = $this->search->get_searchable_forums(); - - if ( $forums == "" ) - { - return $this->class_ajax->error_handler(); - } - - //----------------------------------------- - // Work out the "last time" - //----------------------------------------- - - $last_time = $this->ipsclass->member['last_visit']; - - if ( $this->ipsclass->member['members_markers']['board'] > $last_time ) - { - $last_time = $this->ipsclass->member['members_markers']['board']; - } - - //----------------------------------------- - // Get query - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => 't.*, t.title as topic_title', - 'from' => 'topics t', - 'where' => "t.forum_id IN($forums) AND t.last_post > {$last_time} AND t.approved=1 AND t.pinned IN (0,1)", - 'order' => "t.last_post DESC", - 'limit' => array( $st, 11 ) ) ); - $this->ipsclass->DB->simple_exec(); - - while( $r = $this->ipsclass->DB->fetch_row() ) - { - //----------------------------------------- - // We only want 10 rows, but the 11th will - // tell us if there are more to come - //----------------------------------------- - - $count++; - - if ( $count == 11 ) - { - break; - } - - $mini_title = $this->ipsclass->txt_truncate( $r['title'] , 30 ); - $mini_name = $this->ipsclass->txt_truncate( $r['last_poster_name'] , 25 ); - $date = $this->ipsclass->get_date( $r['last_post'], 'TINY', 0, 1 ); - - $html .= $this->ipsclass->compiled_templates['skin_search']->xmlout_gnp_row($r['tid'], $mini_title, $r['title'], $date ); - } - - //----------------------------------------- - // Check count... - //----------------------------------------- - - if ( $count ) - { - if ( $count > 10 ) - { - $next = $st + 10; - } - - if ( $st ) - { - $previous = $st - 10; - } - } - else - { - $html = "
    {$this->ipsclass->lang['xml_nopost']}
    "; - } - - if ( ! $return ) - { - @header( "Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}" ); - $this->class_ajax->print_nocache_headers(); - print $this->ipsclass->compiled_templates['skin_search']->xmlout_gnp_wrapper( $html, $previous, $next, $st ); - exit(); - } - else - { - return $this->ipsclass->compiled_templates['skin_search']->xmlout_gnp_wrapper( $html, $previous, $next, $st ); - } - } - - /*-------------------------------------------------------------------------*/ - // make string XML safe - /*-------------------------------------------------------------------------*/ - - function _make_safe_for_xml( $t ) - { - return $this->class_ajax->_make_safe_for_xml($t); - } - - /*-------------------------------------------------------------------------*/ - // Error handler - /*-------------------------------------------------------------------------*/ - - function error_handler() - { - return $this->class_ajax->return_null(); - } - - /*-------------------------------------------------------------------------*/ - // Return NOTHING :o - /*-------------------------------------------------------------------------*/ - - function return_null($val=0) - { - return $this->class_ajax->return_null($val); - } - - /*-------------------------------------------------------------------------*/ - // Return string - /*-------------------------------------------------------------------------*/ - - function return_string($string) - { - return $this->class_ajax->return_string($string); - } - - /*-------------------------------------------------------------------------*/ - // Print no cache headers - /*-------------------------------------------------------------------------*/ - - function print_nocache_headers() - { - return $this->class_ajax->print_nocache_headers(); - } - - /*-------------------------------------------------------------------------*/ - // Convert Ajax unicode - /*-------------------------------------------------------------------------*/ - - function convert_unicode($t) - { - return $this->class_ajax->convert_unicode($t); - } - - function convert_html_entities($t) - { - return $this->class_ajax->convert_html_entities($t); - } - - -} - + $Date: 2008-10-02 11:12:17 -0400 (Thu, 02 Oct 2008) $ +| > $Revision: 2569 $ +| > $Author: matt $ ++--------------------------------------------------------------------------- +| +| > XML OUT Functions for XmlHttpRequest functions +| > Module written by Matt Mecham +| > Date started: Friday 18th March 2005 +| +| > Module Version Number: 1.1.0 ++-------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class xmlout +{ + # Classes + var $ipsclass; + var $search; + + var $xml_output; + var $xml_header; + + var $post_init = 0; + + /** + * Post object + * + * @var object + */ + var $post; + + /* + * Ajax main class + */ + var $class_ajax; + + var $decode_charsets = array( 'iso-8859-1' => 'ISO-8859-1', + 'iso8859-1' => 'ISO-8859-1', + 'iso-8859-15' => 'ISO-8859-15', + 'iso8859-15' => 'ISO-8859-15', + 'utf-8' => 'UTF-8', + 'cp866' => 'cp866', + 'ibm866' => 'cp866', + 'cp1251' => 'windows-1251', + 'windows-1251' => 'windows-1251', + 'win-1251' => 'windows-1251', + 'cp1252' => 'windows-1252', + 'windows-1252' => 'windows-1252', + 'koi8-r' => 'KOI8-R', + 'koi8-ru' => 'KOI8-R', + 'koi8r' => 'KOI8-R', + 'big5' => 'BIG5', + 'gb2312' => 'GB2312', + 'big5-hkscs' => 'BIG5-HKSCS', + 'shift_jis' => 'Shift_JIS', + 'sjis' => 'Shift_JIS', + 'euc-jp' => 'EUC-JP', + 'eucjp' => 'EUC-JP' ); + + + /*-------------------------------------------------------------------------*/ + // Auto run + /*-------------------------------------------------------------------------*/ + + function auto_run() + { + $this->xml_header = "ipsclass->vars['gb_char_set']}\"?".'>'; + + //----------------------------------------- + // INIT + //----------------------------------------- + + if ( isset($this->ipsclass->input['j_do']) AND $this->ipsclass->input['j_do'] ) + { + $this->ipsclass->input['do'] = $this->ipsclass->input['j_do']; + } + + //----------------------------------------- + // Load ajax class + //----------------------------------------- + + require_once( KERNEL_PATH . 'class_ajax.php' ); + + $this->class_ajax = new class_ajax(); + $this->class_ajax->ipsclass =& $this->ipsclass; + $this->class_ajax->class_init(); + + //----------------------------------------- + // What shall we do? + //----------------------------------------- + + switch( $this->ipsclass->input['do'] ) + { + case 'get-new-posts': + $this->get_new_posts(); + break; + case 'get-new-msgs': + $this->get_new_messages(); + break; + case 'mark-forum': + $this->mark_forum_as_read(); + break; + case 'get-member-names': + $this->get_member_names(); + break; + case 'get-msg-preview': + $this->get_msg_preview(); + break; + case 'save-topic': + $this->save_topic(); + break; + case 'dst-autocorrection': + $this->dst_autocorrection(); + break; + case 'check-display-name': + $this->check_display_name('members_display_name'); + break; + case 'check-user-name': + $this->check_display_name('name'); + break; + case 'check-email-address': + $this->check_email_address(); + break; + + case 'post-edit-show': + $this->post_edit_show(); + break; + case 'post-edit-save': + $this->post_edit_save(); + break; + + case 'topic_rate': + $this->save_topic_rate(); + break; + + case 'member-rate': + $this->save_member_rate(); + break; + case 'profile-save-settings': + $this->profile_save_settings(); + break; + + case 'change-gd-img': + $this->change_gd_img(); + break; + + case 'post-editorswitch': + $this->post_editorswitch(); + break; + } + } + + /*-------------------------------------------------------------------------*/ + // Save profile settings + /*-------------------------------------------------------------------------*/ + + function profile_save_settings() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $member_id = intval($this->ipsclass->input['member_id']); + $member = array(); + $command = trim( $this->ipsclass->input['cmd'] ); + $value = $this->class_ajax->convert_and_make_safe( $this->ipsclass->input['value'], 0 ); + $md5_check = substr( $this->ipsclass->input['md5check'], 0, 32 ); + $return_string = ''; + $pp_b_day = intval( $this->ipsclass->input['pp_b_day'] ); + $pp_b_month = intval( $this->ipsclass->input['pp_b_month'] ); + $pp_b_year = intval( $this->ipsclass->input['pp_b_year'] ); + + //----------------------------------------- + // MD5 check + //----------------------------------------- + + if ( $md5_check != $this->ipsclass->return_md5_check() ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'error' ); + } + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( ! $member_id OR ! $this->ipsclass->member['id'] ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'error' ); + } + + if ( ! $this->ipsclass->member['g_edit_profile'] ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'error' ); + } + + //----------------------------------------- + // Load member + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => 'm.*', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.id='.$member_id, + 'add_join' => array( 0 => array( 'select' => 'me.*', + 'from' => array( 'member_extra' => 'me' ), + 'where' => 'me.id=m.id', + 'type' => 'left' ), + 1 => array( 'select' => 'pp.*', + 'from' => array( 'profile_portal' => 'pp' ), + 'where' => 'pp.pp_member_id=m.id', + 'type' => 'left' ), + 2 => array( 'select' => 'g.*', + 'from' => array( 'groups' => 'g' ), + 'where' => 'g.g_id=m.mgroup', + 'type' => 'left' ) ) ) ); + $this->ipsclass->DB->exec_query(); + + $member = $this->ipsclass->DB->fetch_row(); + + if ( ! $member['id'] ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'error' ); + } + + //----------------------------------------- + // Not the same member? + //----------------------------------------- + + if ( ! $this->ipsclass->member['g_is_supmod'] OR ( $member['mgroup'] == $this->ipsclass->vars['admin_group'] ) ) + { + if ( $member_id != $this->ipsclass->member['id'] ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'error' ); + } + } + + //----------------------------------------- + // Alright.. what are we doing? + //----------------------------------------- + + switch( $command ) + { + case 'gender': + $_gender = ( $this->ipsclass->input['pp_gender'] == 'male' ) ? 'male' : ( $this->ipsclass->input['pp_gender'] == 'female' ? 'female' : '' ); + + $this->ipsclass->DB->simple_construct( array( 'select' => 'pp_member_id', + 'from' => 'profile_portal', + 'where' => "pp_member_id=".$member_id ) ); + $this->ipsclass->DB->simple_exec(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + $this->ipsclass->DB->do_update( 'profile_portal', array( 'pp_gender' => $_gender ), 'pp_member_id='.$member_id ); + } + else + { + $this->ipsclass->DB->do_insert( 'profile_portal', array( 'pp_gender' => $_gender, + 'pp_member_id' => $member_id ) ); + } + + $return_string = $_gender; + break; + case 'contact': + $this->ipsclass->load_language( 'lang_profile' ); + + $_type = trim( $this->ipsclass->input['contacttype'] ); + $return_string = ''; + + $types = array( 'aim' => 'aim_name', + 'msn' => 'msnname', + 'icq' => 'icq_number', + 'yahoo' => 'yahoo' ); + + if ( in_array( $_type, array_keys( $types ) ) ) + { + if ( $_type == 'icq' ) + { + if ( $value != preg_replace( "#[^0-9]#s", "", $value ) ) + { + $return_string = 'icqerror'; + } + } + + if ( ! $return_string ) + { + $value = $this->ipsclass->txt_mbsubstr( $value, 0, 100 ); + $this->ipsclass->DB->do_update( 'member_extra', array( $types[ $_type ] => $value ), 'id='.$member_id ); + $return_string = $value ? $value: $this->ipsclass->lang['no_info']; + } + } + + break; + case 'location': + if( !$value ) + { + $this->ipsclass->load_language( 'lang_profile' ); + } + + $_v = $this->ipsclass->vars['max_location_length'] ? $this->ipsclass->vars['max_location_length']: 200; + $value = $this->ipsclass->txt_mbsubstr( $value, 0, $_v ); + $this->ipsclass->DB->do_update( 'member_extra', array( 'location' => $value ), 'id='.$member_id ); + $return_string = $value ? $value : $this->ipsclass->lang['m_location_unknown']; + break; + case 'birthdate': + $this->ipsclass->load_language( 'lang_profile' ); + + if( $pp_b_month OR $pp_b_day OR $pp_b_year ) + { + if ( ! $pp_b_month or ! $pp_b_day ) + { + $return_string = 'dateerror'; + } + } + + + if ( ( $pp_b_month AND $pp_b_day AND $pp_b_year ) AND ! @checkdate( $pp_b_month, $pp_b_day, $pp_b_year ) ) + { + $return_string = 'dateerror'; + } + + if( $return_string != 'dateerror' ) + { + $this->ipsclass->DB->do_update( 'members', array( 'bday_month' => intval( $pp_b_month ), + 'bday_day' => intval( $pp_b_day ), + 'bday_year' => intval( $pp_b_year ) ), 'id='.$member_id ); + + $_pp_b_month = ''; + + for( $i = 1; $i < 13; $i++ ) + { + if( $i == $pp_b_month ) + { + $_pp_b_month = $this->ipsclass->lang['M_'.$i]; + } + } + + $return_string = ( $pp_b_month AND $pp_b_day AND $pp_b_year ) ? $_pp_b_month . '-' . $pp_b_day . '-' . $pp_b_year : $this->ipsclass->lang['m_bday_unknown']; + } + } + + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( $this->ipsclass->txt_wordwrap( $return_string, 25 ) ); + } + + /*-------------------------------------------------------------------------*/ + // Save Member Rating + /*-------------------------------------------------------------------------*/ + + function save_member_rate() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $rating_id = intval($this->ipsclass->input['rating']); + $rating_id = $rating_id > 5 ? 5 : $rating_id; + $rating_id = $rating_id < 0 ? 0 : $rating_id; + $member_id = intval($this->ipsclass->input['member_id']); + $member = array(); + $type = 'new'; + $md5_check = substr( $this->ipsclass->input['md5check'], 0, 32 ); + $rating_added = time(); + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( ! $this->ipsclass->vars['pp_allow_member_rate'] ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'error' ); + } + + if ( ! $member_id OR ! $this->ipsclass->member['id'] OR $member_id == $this->ipsclass->member['id'] ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'error' ); + } + + //----------------------------------------- + // MD5 check + //----------------------------------------- + + if ( $md5_check != $this->ipsclass->return_md5_check() ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'error' ); + } + + $this->ipsclass->DB->build_query( array( 'select' => 'm.*', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.id='.$member_id, + 'add_join' => array( 0 => array( 'select' => 'me.*', + 'from' => array( 'member_extra' => 'me' ), + 'where' => 'me.id=m.id', + 'type' => 'left' ), + 1 => array( 'select' => 'pp.*', + 'from' => array( 'profile_portal' => 'pp' ), + 'where' => 'pp.pp_member_id=m.id', + 'type' => 'left' ), + 2 => array( 'select' => 'g.*', + 'from' => array( 'groups' => 'g' ), + 'where' => 'g.g_id=m.mgroup', + 'type' => 'left' ) ) ) ); + $this->ipsclass->DB->exec_query(); + + $member = $this->ipsclass->DB->fetch_row(); + + if ( ! $member['id'] ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'error' ); + } + + //----------------------------------------- + // Have we already rated? + //----------------------------------------- + + $rating = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', + 'from' => 'profile_ratings', + 'where' => "rating_for_member_id={$member_id} AND rating_by_member_id=".$this->ipsclass->member['id'] ) ); + + //----------------------------------------- + // Already rated? + //----------------------------------------- + + if ( $rating['rating_id'] ) + { + //----------------------------------------- + // Do we allow re-ratings? + //----------------------------------------- + + if ( $rating_id != $rating['rating_value'] ) + { + $member['pp_rating_value'] = intval( $member['pp_rating_value'] ); + $member['pp_rating_value'] = ( $member['pp_rating_value'] + $rating_id ) - $rating['rating_value']; + + $this->ipsclass->DB->do_update( 'profile_ratings', array( 'rating_value' => $rating_id ), 'rating_id='.$rating['rating_id'] ); + + $this->ipsclass->DB->do_update( 'profile_portal', array( 'pp_rating_value' => $member['pp_rating_value'], + 'pp_rating_real' => round( $member['pp_rating_value'] / $member['pp_rating_hits'] ) ), 'pp_member_id='.$member_id ); + + $type = 'update'; + } + } + + //----------------------------------------- + // NEW RATING! + //----------------------------------------- + + else + { + $member['pp_rating_value'] = intval($member['pp_rating_value']) + $rating_id; + $member['pp_rating_hits'] = intval($member['pp_rating_hits']) + 1; + + $this->ipsclass->DB->do_insert( 'profile_ratings', array( 'rating_for_member_id' => $member_id, + 'rating_by_member_id' => $this->ipsclass->member['id'], + 'rating_value' => $rating_id, + 'rating_added' => $rating_added, + 'rating_ip_address' => $this->ipsclass->ip_address ) ); + + $this->ipsclass->DB->do_update( 'profile_portal', array( 'pp_rating_hits' => intval($member['pp_rating_hits']), + 'pp_rating_value' => intval($member['pp_rating_value']), + 'pp_rating_real' => round( $member['pp_rating_value'] / $member['pp_rating_hits'] ) ), 'pp_member_id='.$member_id ); + + + } + + $member['pp_rating_real'] = round( $member['pp_rating_value'] / $member['pp_rating_hits'] ); + + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( $member['pp_rating_value'].','.$member['pp_rating_hits'].','.$member['pp_rating_real'].','.$type ); + } + + /*-------------------------------------------------------------------------*/ + // Change a GD antispam image (if it's unreadable) + /*-------------------------------------------------------------------------*/ + + function change_gd_img() + { + $img = trim( $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['img'] ) ); + + $this->ipsclass->load_template( 'skin_global' ); + + require_once( KERNEL_PATH . 'class_captcha.php' ); + $captchaClass = new class_captcha( $this->ipsclass, $this->ipsclass->vars['bot_antispam_type'] ); + $captchaID = trim( $captchaClass->getTemplate() ); + + $this->class_ajax->return_string( $captchaID ); + } + + /*-------------------------------------------------------------------------*/ + // Convert RTE to STD.. or STD to RTE + /*-------------------------------------------------------------------------*/ + + function post_editorswitch() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $to_rte = intval( $this->ipsclass->input['to_rte'] ); + $post = $this->class_ajax->convert_unicode( $_POST['Post'] ); + $post = $this->ipsclass->txt_stripslashes($post); + $post = $this->class_ajax->convert_html_entities( $post ); + + $_debug = 0; + + //----------------------------------------- + // Load BBCode + //----------------------------------------- + + require_once( ROOT_PATH . 'sources/classes/bbcode/class_bbcode_core.php' ); + require_once( ROOT_PATH . 'sources/classes/bbcode/class_bbcode.php' ); + + //----------------------------------------- + // Get the smilies from the DB + //----------------------------------------- + + if ( ! is_array( $this->ipsclass->cache['emoticons'] ) ) + { + $this->ipsclass->cache['emoticons'] = array(); + + $this->ipsclass->DB->simple_construct( array( 'select' => 'typed,image,clickable,emo_set', 'from' => 'emoticons' ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->cache['emoticons'][] = $r; + } + + @usort( $this->ipsclass->cache['emoticons'] , array( 'class_bbcode_core', 'smilie_alpha_sort' ) ); + } + + $bbcode = new class_bbcode(); + $bbcode->ipsclass =& $this->ipsclass; + $bbcode->parse_bbcode = 1; + $bbcode->parse_html = 0; + $bbcode->parse_nl2br = 1; + $bbcode->parse_smilies = 1; + + //----------------------------------------- + // Converting from STD to RTE? + //----------------------------------------- + + if ( $to_rte ) + { + $debug_string = "\n====================================================". + "\n TO RTE ".$this->ipsclass->browser['browser']. + "\n " . gmdate( 'r' ) . + "\n====================================================". + "\nORIGINAL POST\n".$post; + + //----------------------------------------- + // Ensure no slashy slashy + //----------------------------------------- + + $post = str_replace( '"','"', $post ); + $post = str_replace( "'",''', $post ); + + //----------------------------------------- + // Convert <> + //----------------------------------------- + + $post = str_replace( '<', '<', $post ); + $post = str_replace( '>', '>', $post ); + + $debug_string .= "\n====================================================". + "\n BEFORE clean_ipb_html / pre_db_parse". + "\n".$post; + "\n===================================================="; + + $post = $bbcode->clean_ipb_html( $bbcode->pre_db_parse( $post ) ); + + //----------------------------------------- + // Convert <> + //----------------------------------------- + + $post = str_replace( '<', '<', $post ); + $post = str_replace( '>', '>', $post ); + + $debug_string .= "\n====================================================". + "\n AFTER clean_ipb_html / pre_db_parse". + "\n".$post; + "\n".$bbcode->test; + "\n===================================================="; + $debug_string .= "\n====================================================". + "\n BBCODE Debug". + "\n".$bbcode->test; + "\n===================================================="; + + //----------------------------------------- + // Fix up... + //----------------------------------------- + + if ( is_array( $this->ipsclass->skin['_macros'] ) and count( $this->ipsclass->skin['_macros'] ) ) + { + foreach( $this->ipsclass->skin['_macros'] as $row ) + { + if ( $row['macro_value'] != "" ) + { + $post = str_replace( "<{".$row['macro_value']."}>", $row['macro_replace'], $post ); + } + } + } + + $post = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $post ); + $post = str_replace( "<#EMO_DIR#>", $this->ipsclass->skin['_emodir'] , $post ); + + if ( $this->ipsclass->vars['ipb_img_url'] ) + { + $post = preg_replace( "#img\s+?src=([\"'])style_(images|avatars|emoticons)(.+?)[\"'](.+?)?".">#is", "img src=\\1".$this->ipsclass->vars['ipb_img_url']."style_\\2\\3\\1\\4>", $post ); + } + + //----------------------------------------- + // Make sure no nasty HTML entities show + //----------------------------------------- + + $post = $this->ipsclass->txt_htmlspecialchars( $post ); + + $debug_string .= "\n====================================================". + "\nSTD TO RTE CONVERTED POST\n".$post. + "\n===================================================="; + + } + //----------------------------------------- + // Converting from RTE to STD + //----------------------------------------- + + else + { + $debug_string = "\n====================================================". + "\n TO STD ".$this->ipsclass->browser['browser']. + "\n " . gmdate( 'r' ) . + "\n====================================================". + "\nORIGINAL POST\n".$post; + + require_once( ROOT_PATH . 'sources/classes/editor/class_editor.php' ); + require_once( ROOT_PATH . 'sources/classes/editor/class_editor_rte.php' ); + + //----------------------------------------- + // Ok, now, apparently, for SOME reason, IE + // strips SOME comments but not others... + // this causes font/span stuff to break. + // Let's just strip all the comments + //----------------------------------------- + + if ( $this->ipsclass->browser['browser'] == "ie" OR $this->ipsclass->browser['browser'] == "opera" ) + { + $post = preg_replace( "#<\!--(.*?)-->#is", "" , $post ); + } + + //----------------------------------------- + // IE has this thing where [center]text[/center] + // Becomes [b][center][b]text[/b][/center][/b] + //----------------------------------------- + + $rte = new class_editor_module(); + $rte->ipsclass =& $this->ipsclass; + $post = $bbcode->pre_edit_parse( $post ); + + $debug_string .= "\n====================================================". + "\n AFTER PRE_EDIT_PARSE". + "\n " . gmdate( 'r' ) . + "\n====================================================". + "\nPRE_EDIT POST\n".$post; + + $post = $rte->_rte_html_to_bbcode( $post ); + + //----------------------------------------- + // Fix up... + //----------------------------------------- + + $post = preg_replace( "/
    |
    /", "\n", $post ); + + $debug_string .= "\n====================================================". + "\nRTE TO STD CONVERTED POST\n".$post. + "\n===================================================="; + } + + if ( $_debug ) + { + $FH = @fopen( ROOT_PATH . '/cache/debug_bbcode.php', 'a+' ); + @fwrite( $FH, $debug_string ); + @fclose( $FH ); + } + + //----------------------------------------- + // Member? Store choice... + //----------------------------------------- + + if ( $this->ipsclass->member['id'] ) + { + $_choice = ( $to_rte ) ? 'rte' : 'std'; + + $this->ipsclass->DB->do_update( 'members', array( 'members_editor_choice' => $_choice ), 'id='.$this->ipsclass->member['id'] ); + } + + $post = trim( html_entity_decode($post) ); + + $this->class_ajax->print_nocache_headers(); + header( "Content-Type: text/html;charset={$this->ipsclass->vars['gb_char_set']}" ); + print $post; + exit(); + } + + /*-------------------------------------------------------------------------*/ + // Save Topic Rating + /*-------------------------------------------------------------------------*/ + + function save_topic_rate() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $ratingid = intval($this->ipsclass->input['rating']); + $ratingid = $ratingid > 5 ? 5 : $ratingid; + $ratingid = $ratingid < 0 ? 0 : $ratingid; + $topicid = intval($this->ipsclass->input['t']); + $vote_cast = array(); + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( !$topicid ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'error' ); + } + + $topic = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid='.$topicid ) ); + + if ( ! $topic['forum_id'] ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'error' ); + } + + if ( ! $this->ipsclass->forums->forum_by_id[ $topic['forum_id'] ]['forum_allow_rating'] ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'no_permission' ); + } + + if ( $topic['state'] != 'open' ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'no_permission' ); + } + + if ( intval($this->ipsclass->member['g_topic_rate_setting']) == 0 ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'no_permission' ); + } + + //----------------------------------------- + // Have we already rated? + //----------------------------------------- + + $rating = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'topic_ratings', 'where' => "rating_tid={$topicid} and rating_member_id=".$this->ipsclass->member['id'] ) ); + + //----------------------------------------- + // Still here? Load topic 'stuff' + //----------------------------------------- + + #$this->ipsclass->load_template( 'skin_topic' ); + #$this->ipsclass->load_language( 'lang_topic' ); + + //----------------------------------------- + // Already rated? + //----------------------------------------- + + if ( $rating['rating_id'] ) + { + //----------------------------------------- + // Do we allow re-ratings? + //----------------------------------------- + + if ( $this->ipsclass->member['g_topic_rate_setting'] == 2 ) + { + if ( $ratingid != $rating['rating_value'] ) + { + $new_rating = $ratingid - $rating['rating_value']; + + $this->ipsclass->DB->do_update( 'topic_ratings', array( 'rating_value' => $ratingid ), 'rating_id='.$rating['rating_id'] ); + + $this->ipsclass->DB->do_update( 'topics', array( 'topic_rating_total' => intval($topic['topic_rating_total']) + $new_rating ), 'tid='.$topicid ); + + $topic['topic_rating_total'] = intval($topic['topic_rating_total']) + $new_rating; + } + + $type = 'update'; + } + else + { + $ratingid = $rating['rating_value']; + } + } + + //----------------------------------------- + // NEW RATING! + //----------------------------------------- + + else + { + $topic['topic_rating_hits'] = intval($topic['topic_rating_hits']) + 1; + $topic['topic_rating_total'] = intval($topic['topic_rating_total']) + $ratingid; + + $this->ipsclass->DB->do_insert( 'topic_ratings', array( 'rating_tid' => $topic['tid'], + 'rating_member_id' => $this->ipsclass->member['id'], + 'rating_value' => $ratingid, + 'rating_ip_address' => $this->ipsclass->ip_address ) ); + + $this->ipsclass->DB->do_update( 'topics', array( 'topic_rating_hits' => $topic['topic_rating_hits'], + 'topic_rating_total' => $topic['topic_rating_total'] ), 'tid='.$topic['tid'] ); + + $type = 'new'; + } + + $topic['_rate_int'] = round( $topic['topic_rating_total'] / $topic['topic_rating_hits'] ); + + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( $topic['topic_rating_total'].','.$topic['topic_rating_hits'].','.$topic['_rate_int'].','.$type ); + } + + /*-------------------------------------------------------------------------*/ + // Check email address + /*-------------------------------------------------------------------------*/ + + function check_email_address() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $email = $this->ipsclass->input['email']; + + //----------------------------------------- + // Load handler... + //----------------------------------------- + + require_once( ROOT_PATH.'sources/handlers/han_login.php' ); + $this->han_login = new han_login(); + $this->han_login->ipsclass =& $this->ipsclass; + $this->han_login->init(); + $this->han_login->email_exists_check( $email ); + + if( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'EMAIL_NOT_IN_USE' ) + { + $this->class_ajax->return_string('found'); + } + + //----------------------------------------- + // Try query... + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => "email,id", + 'from' => 'members', + 'where' => "LOWER(email)='". $this->ipsclass->DB->add_slashes( $email ) . "'", + 'limit' => array( 0,1 ) ) ); + + $this->ipsclass->DB->exec_query(); + + //----------------------------------------- + // Got any results? + //----------------------------------------- + + if ( ! $this->ipsclass->DB->get_num_rows() ) + { + //----------------------------------------- + // No illegal characters + //----------------------------------------- + + if ( preg_match( "#[\;\#\n\r\*\'\"<>&\%\!\(\)\{\}\[\]\?\\/\s]#", $email) ) + { + $this->class_ajax->return_string('invalid'); + } + + //----------------------------------------- + // Load ban filters + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'banfilters' ) ); + $this->ipsclass->DB->simple_exec(); + + while( $r = $this->ipsclass->DB->fetch_row() ) + { + $banfilters[ $r['ban_type'] ][] = $r['ban_content']; + } + + //----------------------------------------- + // Are they banned [EMAIL]? + //----------------------------------------- + + if ( is_array( $banfilters['email'] ) and count( $banfilters['email'] ) ) + { + foreach ( $banfilters['email'] as $memail ) + { + $memail = str_replace( '\*', '.*' , preg_quote($memail, "/") ); + + if ( preg_match( "/^{$memail}$/", $email ) ) + { + $this->class_ajax->return_string('banned'); + break; + } + } + } + + if( $this->ipsclass->clean_email( $email ) ) + { + $this->class_ajax->return_string('notfound'); + } + else + { + $this->class_ajax->return_string('invalid'); + } + } + else + { + $this->class_ajax->return_string('found'); + } + } + + /*-------------------------------------------------------------------------*/ + // Check display name + /*-------------------------------------------------------------------------*/ + + function check_display_name( $field='members_display_name' ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $name = strtolower( $this->class_ajax->convert_and_make_safe( $this->ipsclass->input['name'], 0 ) ); + $name = str_replace("+", "+", $name ); + + $id = intval( $this->ipsclass->input['id'] ); + + # Set member ID + $id = $this->ipsclass->member['id'] ? $this->ipsclass->member['id'] : $id; + + //----------------------------------------- + // Remove 'sneaky' spaces + //----------------------------------------- + + if ( $this->ipsclass->vars['strip_space_chr'] ) + { + // Use hexdec to convert between '0xAD' and chr + $name = str_replace( chr(160), ' ', $name ); + $name = str_replace( chr(173), ' ', $name ); + + $name = trim($name); + } + + //----------------------------------------- + // Not allowed to select another's log in name + //----------------------------------------- + + if ( $field == 'members_display_name' AND $this->ipsclass->vars['auth_dnames_nologinname'] ) + { + $check_name = $this->ipsclass->DB->build_and_exec_query( array( 'select' => "{$field}, id", + 'from' => 'members', + 'where' => "members_l_username='". $this->ipsclass->DB->add_slashes( $name ) . "'", + 'limit' => array( 0,1 ) ) ); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + if ( $id AND $check_name['id'] == $id ) + { + $this->class_ajax->return_string('notfound'); + return; + } + else + { + $this->class_ajax->return_string('found'); + return; + } + } + } + + if ( $field == 'name' AND $this->ipsclass->vars['auth_dnames_nologinname'] ) + { + $check_name = $this->ipsclass->DB->build_and_exec_query( array( 'select' => "{$field}, id", + 'from' => 'members', + 'where' => "members_l_display_name='". $this->ipsclass->DB->add_slashes( $name ) . "'", + 'limit' => array( 0,1 ) ) ); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + if ( $id AND $check_name['id'] == $id ) + { + $this->class_ajax->return_string('notfound'); + } + else + { + $this->class_ajax->return_string('found'); + } + } + } + + //----------------------------------------- + // Not allowed to select another's name + //----------------------------------------- + + if( $field == 'members_display_name' ) + { + $check_field = 'members_l_display_name'; + } + else + { + $check_field = 'members_l_username'; + } + + $check_name = $this->ipsclass->DB->build_and_exec_query( array( 'select' => "{$field}, id", + 'from' => 'members', + 'where' => "{$check_field}='". $this->ipsclass->DB->add_slashes( $name ) . "'", + 'limit' => array( 0,1 ) ) ); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + if ( $id AND $check_name['id'] == $id ) + { + $this->class_ajax->return_string('notfound'); + } + else + { + $this->class_ajax->return_string('found'); + } + } + + //----------------------------------------- + // Didn't get a result from the DB + //----------------------------------------- + + else + { + //----------------------------------------- + // Load ban filters + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'banfilters' ) ); + $this->ipsclass->DB->simple_exec(); + + while( $r = $this->ipsclass->DB->fetch_row() ) + { + $banfilters[ $r['ban_type'] ][] = $r['ban_content']; + } + + //----------------------------------------- + // Are they banned [NAMES]? + //----------------------------------------- + + if ( is_array( $banfilters['name'] ) and count( $banfilters['name'] ) ) + { + foreach ( $banfilters['name'] as $n ) + { + if ( $n == "" ) + { + continue; + } + + $n = str_replace( '\*', '.*' , preg_quote($n, "/") ); + + if ( preg_match( "/^{$n}$/i", $name ) ) + { + $this->class_ajax->return_string('found'); + break; + } + } + } + + $this->class_ajax->return_string('notfound'); + } + } + + /*-------------------------------------------------------------------------*/ + // Post Edit Save + /*-------------------------------------------------------------------------*/ + + function post_edit_save() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $pid = intval( $this->ipsclass->input['p'] ); + $fid = intval( $this->ipsclass->input['f'] ); + $tid = intval( $this->ipsclass->input['t'] ); + $md5_check = substr( $this->ipsclass->input['md5check'], 0, 32 ); + $attach_pids = array(); + + $_POST['Post'] = $this->class_ajax->convert_unicode( $_POST['Post'] ); + + $_POST['Post'] = $this->class_ajax->convert_html_entities( $_POST['Post'] ); + + $this->ipsclass->input['post_edit_reason'] = $this->class_ajax->convert_and_make_safe( $this->ipsclass->input['post_edit_reason'], 0 ); + + //----------------------------------------- + // Set things right + //----------------------------------------- + + $_POST['std_used'] = 1; + $this->ipsclass->input['Post'] = $this->ipsclass->parse_clean_value( $_POST['Post'] ); + + //----------------------------------------- + // Check MD5 + //----------------------------------------- + + if ( $md5_check != $this->ipsclass->return_md5_check() ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'error' ); + } + + //----------------------------------------- + // Check P|T|FID + //----------------------------------------- + + if ( ! $pid OR ! $tid OR ! $fid ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'error' ); + } + + //----------------------------------------- + // Load Lang + //----------------------------------------- + + $this->ipsclass->load_language( 'lang_topic' ); + + //----------------------------------------- + // Get topic + //----------------------------------------- + + $topic = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => "topics", 'where' => 'tid='.$tid ) ); + + //----------------------------------------- + // Got permission? + //----------------------------------------- + + if ( ( $topic['state'] != 'open' ) and ( ! $this->ipsclass->member['g_is_supmod'] ) ) + { + if ( $this->ipsclass->member['g_post_closed'] != 1 ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'nopermission' ); + } + } + + if ( $this->ipsclass->check_perms( $this->ipsclass->forums->forum_by_id[ $fid ]['reply_perms'] ) == FALSE ) + { + $_ok = 0; + + //----------------------------------------- + // Are we a member who started this topic + // and are editing the topic's first post? + //----------------------------------------- + + if ( $this->ipsclass->member['id'] ) + { + if ( $topic['topic_firstpost'] ) + { + $_post = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'pid, author_id, topic_id', + 'from' => 'posts', + 'where' => 'pid=' . intval( $topic['topic_firstpost'] ) ) ); + + if ( $_post['pid'] AND $_post['topic_id'] == $topic['tid'] AND $_post['author_id'] == $this->ipsclass->member['id'] ) + { + $_ok = 1; + } + } + } + + if ( ! $_ok ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'nopermission' ); + } + } + + if ( $this->ipsclass->forums->forum_by_id[ $fid ]['status'] == 0 ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'nopermission' ); + } + + if ( $this->ipsclass->member['id'] ) + { + if ( $this->ipsclass->member['restrict_post'] ) + { + if ( $this->ipsclass->member['restrict_post'] == 1 ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'nopermission' ); + } + + $post_arr = $this->ipsclass->hdl_ban_line( $this->ipsclass->member['restrict_post'] ); + + if ( time() >= $post_arr['date_end'] ) + { + //----------------------------------------- + // Update this member's profile + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'update' => 'members', + 'set' => 'restrict_post=0', + 'where' => "id=".intval($this->ipsclass->member['id']) + ) ); + + $this->ipsclass->DB->simple_exec(); + } + else + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'nopermission' ); + } + } + } + + //----------------------------------------- + // Get classes + //----------------------------------------- + + if ( ! $this->post_init ) + { + require_once( ROOT_PATH."sources/classes/post/class_post.php" ); + require_once( ROOT_PATH."sources/classes/post/class_post_edit.php" ); + + $this->post = new post_functions(); + $this->post->ipsclass =& $this->ipsclass; + $this->post->forum = $this->ipsclass->forums->forum_by_id[ $fid ]; + $this->post->main_init(); + $this->post_init = 1; + } + + //----------------------------------------- + // Make sure smilies are parsed + //----------------------------------------- + + $this->ipsclass->input['enableemo'] = $this->post->orig_post['use_emo'] ? 'yes' : ''; + $this->ipsclass->input['enablesig'] = $this->post->orig_post['use_sig'] ? 'yes' : ''; + $this->ipsclass->input['post_htmlstatus'] = $this->post->orig_post['post_htmlstate']; + $this->ipsclass->input['iconid'] = $this->post->orig_post['icon_id']; + $this->ipsclass->input['add_edit'] = ( $this->post->orig_post['append_edit'] OR !$this->ipsclass->member['g_append_edit'] ) ? 1 : 0; + + //----------------------------------------- + // check + //----------------------------------------- + + if ( ! $this->post->orig_post['post'] ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'error' ); + } + + //----------------------------------------- + // PARSE + //----------------------------------------- + + # Prevent polls from being edited + $this->post->can_add_poll = 0; + + # Prevent titles from being edited + $this->post->edit_title = 0; + + $this->post->convert_open_close_times(); + $this->post->post = $this->post->compile_post(); + + # Errors? + if ( $this->post->obj['post_errors'] ) + { + $this->post_edit_show( $this->ipsclass->lang[ $this->post->obj['post_errors'] ] ); + } + else + { + $this->post->save_post(); + } + + //----------------------------------------- + // Prep for display + //----------------------------------------- + + //$raw_post = $this->post->show_post_preview( $this->post->post['post'] ) . "\n" . ''; + $raw_post = $this->post->post['post'] . "\n" . ''; + + if ( ! is_object( $this->class_attach ) ) + { + //----------------------------------------- + // Grab render attach class + //----------------------------------------- + + require_once( ROOT_PATH . 'sources/classes/attach/class_attach.php' ); + $this->class_attach = new class_attach(); + $this->class_attach->ipsclass =& $this->ipsclass; + } + + $this->ipsclass->load_template( 'skin_topic' ); + $this->class_attach->type = 'post'; + $this->class_attach->init(); + + $raw_post = $this->class_attach->render_attachments( $raw_post, array( $pid => $pid ) ); + + if ( $this->post->post['append_edit'] == 1 AND $this->post->post['edit_time'] AND $this->post->post['edit_name'] ) + { + $e_time = $this->ipsclass->get_date( $this->post->post['edit_time'] , 'LONG' ); + $raw_post .= "

    ".sprintf($this->ipsclass->lang['edited_by'], $this->post->post['edit_name'], $e_time).""; + } + + //----------------------------------------- + // Showing reason for edit? + //----------------------------------------- + + if ( $this->ipsclass->member['g_is_supmod'] OR $this->post->moderator['edit_post'] ) + { + if ( $this->post->post['post_edit_reason'] ) + { + $raw_post .= "\n
    + {$this->ipsclass->lang['reason_for_edit']}: {$this->post->post['post_edit_reason']} +
    "; + } + } + + foreach( $this->ipsclass->skin['_macros'] as $row ) + { + if ( $row['macro_value'] != "" ) + { + $raw_post = str_replace( "<{".$row['macro_value']."}>", $row['macro_replace'], $raw_post ); + } + } + + if ( $this->ipsclass->vars['ipb_img_url'] ) + { + $raw_post = preg_replace( "#img\s+?src=([\"'])style_(images|avatars|emoticons)(.+?)[\"'](.+?)?".">#is", "img src=\\1".$this->ipsclass->vars['ipb_img_url']."style_\\2\\3\\1\\4>", $raw_post ); + } + + //----------------------------------------- + // Return plain text + //----------------------------------------- + + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_html( $raw_post ); + } + + /*-------------------------------------------------------------------------*/ + // Post Edit Show + /*-------------------------------------------------------------------------*/ + + function post_edit_show( $error_msg = "" ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $pid = intval( $this->ipsclass->input['p'] ); + $fid = intval( $this->ipsclass->input['f'] ); + $tid = intval( $this->ipsclass->input['t'] ); + $show_reason = 0; + + //----------------------------------------- + // Check P|T|FID + //----------------------------------------- + + if ( ! $pid OR ! $tid OR ! $fid ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'error' ); + } + + //----------------------------------------- + // Get topic + //----------------------------------------- + + $topic = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => "topics", 'where' => 'tid='.$tid ) ); + + //----------------------------------------- + // Got permission? + //----------------------------------------- + + if ( ( $topic['state'] != 'open' ) and ( ! $this->ipsclass->member['g_is_supmod'] ) ) + { + if ( $this->ipsclass->member['g_post_closed'] != 1 ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'nopermission' ); + } + } + + if ( $this->ipsclass->check_perms( $this->ipsclass->forums->forum_by_id[ $fid ]['reply_perms'] ) == FALSE ) + { + $_ok = 0; + + //----------------------------------------- + // Are we a member who started this topic + // and are editing the topic's first post? + //----------------------------------------- + + if ( $this->ipsclass->member['id'] ) + { + if ( $topic['topic_firstpost'] ) + { + $_post = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'pid, author_id, topic_id', + 'from' => 'posts', + 'where' => 'pid=' . intval( $topic['topic_firstpost'] ) ) ); + + if ( $_post['pid'] AND $_post['topic_id'] == $topic['tid'] AND $_post['author_id'] == $this->ipsclass->member['id'] ) + { + $_ok = 1; + } + } + } + + if ( ! $_ok ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'nopermission' ); + } + } + + if ( $this->ipsclass->forums->forum_by_id[ $fid ]['status'] == 0 ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'nopermission' ); + } + + if ( $this->ipsclass->member['id'] ) + { + if ( $this->ipsclass->member['restrict_post'] ) + { + if ( $this->ipsclass->member['restrict_post'] == 1 ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'nopermission' ); + } + + $post_arr = $this->ipsclass->hdl_ban_line( $this->ipsclass->member['restrict_post'] ); + + if ( time() >= $post_arr['date_end'] ) + { + //----------------------------------------- + // Update this member's profile + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'update' => 'members', + 'set' => 'restrict_post=0', + 'where' => "id=".intval($this->ipsclass->member['id']) + ) ); + + $this->ipsclass->DB->simple_exec(); + } + else + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'nopermission' ); + } + } + } + + //----------------------------------------- + // Get classes + //----------------------------------------- + + if ( ! $this->post_init ) + { + require_once( ROOT_PATH."sources/classes/post/class_post.php" ); + require_once( ROOT_PATH."sources/classes/post/class_post_edit.php" ); + + $this->ipsclass->load_language( 'lang_editors' ); + + $this->post = new post_functions(); + $this->post->ipsclass =& $this->ipsclass; + $this->post->forum = $this->ipsclass->forums->forum_by_id[ $fid ]; + $this->post->main_init(); + $this->post_init = 1; + } + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( ! $this->post->orig_post['post'] OR ! $topic['tid'] ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'error' ); + } + + //----------------------------------------- + // Convert and return plain text + //----------------------------------------- + + if( $_POST['Post'] ) + { + $raw_post = $_POST['Post']; + } + else + { + $this->post->parser->parse_smilies = $this->post->orig_post['use_emo']; + $this->post->parser->parse_html = ( $this->post->orig_post['post_htmlstate'] AND $this->ipsclass->forums->forum_by_id[ $fid ]['use_html'] AND $this->ipsclass->member['g_dohtml'] ) ? 1 : 0; + $this->post->parser->parse_bbcode = $this->ipsclass->forums->forum_by_id[ $fid ]['use_ibc']; + $this->post->parser->parse_nl2br = (isset($this->post->orig_post['post_htmlstate']) AND $this->post->orig_post['post_htmlstate'] == 2) ? 1 : 0; + + if( $this->post->parser->parse_html ) + { + # Make EMO_DIR safe so the ^> regex works + $this->post->orig_post['post'] = str_replace( "<#EMO_DIR#>", "<#EMO_DIR>", $this->post->orig_post['post'] ); + + # New emo + $this->post->orig_post['post'] = preg_replace( "#(\s)?<([^>]+?)emoid=\"(.+?)\"([^>]*?)".">(\s)?#is", "\\1\\3\\5", $this->post->orig_post['post'] ); + + # And convert it back again... + $this->post->orig_post['post'] = str_replace( "<#EMO_DIR>", "<#EMO_DIR#>", $this->post->orig_post['post'] ); + + $this->post->orig_post['post'] = $this->post->parser->convert_ipb_html_to_html( $this->post->orig_post['post'] ); + + $this->post->orig_post['post'] = htmlspecialchars( $this->post->orig_post['post'] ); + + if( $this->post->parser->parse_nl2br ) + { + $this->post->orig_post['post'] = str_replace( '<br>', "\n", $this->post->orig_post['post'] ); + $this->post->orig_post['post'] = str_replace( '<br />', "\n", $this->post->orig_post['post'] ); + } + } + + $raw_post = $this->post->parser->pre_edit_parse( $this->post->orig_post['post'] ); + } + + //----------------------------------------- + // Allow to edit the reason? + //----------------------------------------- + + if ( $this->ipsclass->member['g_is_supmod'] ) + { + $show_reason = 1; + } + else + { + //----------------------------------------- + // Load the moderator + //----------------------------------------- + + if ( $this->ipsclass->member['id'] ) + { + if ( is_array( $this->post->moderator ) ) + { + if ( $this->post->moderator['edit_post'] ) + { + $show_reason = 1; + } + } + } + } + + //----------------------------------------- + // Show HTML + //----------------------------------------- + + $html = $this->ipsclass->compiled_templates['skin_post']->inline_edit_quick_box( $raw_post, $pid, $error_msg, $show_reason, $this->post->orig_post['post_edit_reason'] ); + + if ( $this->ipsclass->vars['ipb_img_url'] ) + { + $html = preg_replace( "#img\s+?src=([\"'])style_(images|avatars|emoticons)(.+?)[\"'](.+?)?".">#is", "img src=\\1".$this->ipsclass->vars['ipb_img_url']."style_\\2\\3\\1\\4>", $html ); + } + + $this->class_ajax->return_html( $html ); + } + + /*-------------------------------------------------------------------------*/ + // DST Auto correction + /*-------------------------------------------------------------------------*/ + + function dst_autocorrection() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $xml = intval( $this->ipsclass->input['xml'] ); + $md5_check = substr( $this->ipsclass->input['md5check'], 0, 32 ); + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( $md5_check != $this->ipsclass->return_md5_check() ) + { + if ( $xml ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'error' ); + } + else + { + $this->ipsclass->boink_it( $this->ipsclass->base_url . 'act=usercp&CODE=04&dsterror=1' ); + } + } + + //----------------------------------------- + // Already using DST? + //----------------------------------------- + + if ( $this->ipsclass->member['dst_in_use'] == 1 ) + { + $this->ipsclass->DB->do_update( 'members', array( 'dst_in_use' => 0 ), 'id='.$this->ipsclass->member['id'] ); + } + else + { + $this->ipsclass->DB->do_update( 'members', array( 'dst_in_use' => 1 ), 'id='.$this->ipsclass->member['id'] ); + } + + if ( $xml ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( 'success' ); + } + else + { + $this->ipsclass->boink_it( $this->ipsclass->base_url . 'act=idx' ); + } + } + + /*-------------------------------------------------------------------------*/ + // Get new posts + /*-------------------------------------------------------------------------*/ + + function get_msg_preview() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $limit = intval( $this->ipsclass->input['limit'] ); + + //----------------------------------------- + // Couldn't be easier.... + //----------------------------------------- + + $return = $this->ipsclass->get_new_pm_notification( $limit, TRUE ); + + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( $return ); + } + + /*-------------------------------------------------------------------------*/ + // Get new posts + /*-------------------------------------------------------------------------*/ + + function save_topic() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $name = $this->class_ajax->convert_and_make_safe( $this->ipsclass->input['name'], 0 ); + $type = $this->ipsclass->input['type']; + $tid = intval( $this->ipsclass->input['tid'] ); + $md5_check = substr( $this->ipsclass->input['md5check'], 0, 32 ); + $can_edit = 0; + $openclose = ''; + + //$name = $this->class_ajax->convert_html_entities( $name ); + + //----------------------------------------- + // Checks... + //----------------------------------------- + + if ( ! $tid OR ! $type ) + { + $this->class_ajax->return_null('-'); + } + + if ( $md5_check != $this->ipsclass->return_md5_check() ) + { + $this->class_ajax->return_null('-'); + } + + //----------------------------------------- + // Load topic + //----------------------------------------- + + $topic = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid='.$tid ) ); + + if ( ! $topic['tid'] ) + { + $this->class_ajax->return_null('-'); + } + + //----------------------------------------- + // Have permission? + //----------------------------------------- + + if ( $this->ipsclass->member['g_is_supmod'] ) + { + $can_edit = 1; + } + + if ( $type == 'openclose' ) + { + if ( $name == 'close' OR $name == 'closed' ) + { + $openclose = 'closed'; + + if ( $this->ipsclass->member['_moderator'][ $topic['forum_id'] ]['close_topic'] ) + { + $can_edit = 1; + } + } + else + { + $openclose = 'open'; + + if ( $this->ipsclass->member['_moderator'][ $topic['forum_id'] ]['open_topic'] ) + { + $can_edit = 1; + } + } + } + else + { + if ( $this->ipsclass->member['_moderator'][ $topic['forum_id'] ]['edit_topic'] ) + { + $can_edit = 1; + } + } + + if ( ! $can_edit ) + { + $this->class_ajax->return_null('0'); + } + + //----------------------------------------- + // index.php?act=xmlout&do=save-topic&type=title&tid=60591&name=test&md5check=b6417fb0cbd1e24250db348193fdb7c1 + // Alright, save it! + //----------------------------------------- + + if ( $type == 'desc' ) + { + $this->ipsclass->DB->do_update( 'topics', array( 'description' => $name ), 'tid='.$tid ); + + $this->ipsclass->DB->do_insert( 'moderator_logs', array ( + 'forum_id' => intval($topic['forum_id']), + 'topic_id' => intval($tid), + 'post_id' => intval($pid), + 'member_id' => $this->ipsclass->member['id'], + 'member_name' => $this->ipsclass->member['members_display_name'], + 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], + 'http_referer'=> htmlspecialchars($this->ipsclass->my_getenv('HTTP_REFERER')), + 'ctime' => time(), + 'topic_title' => $topic['title'], + 'action' => $this->ipsclass->lang['ajax_topicdesc'], + 'query_string'=> htmlspecialchars($this->ipsclass->my_getenv('QUERY_STRING')), + ) ); + } + else if ( $type == 'openclose' ) + { + $this->ipsclass->DB->do_update( 'topics', array( 'state' => $openclose ), 'tid='.$tid ); + + $this->ipsclass->DB->do_insert( 'moderator_logs', array ( + 'forum_id' => intval($topic['forum_id']), + 'topic_id' => intval($tid), + 'post_id' => intval($pid), + 'member_id' => $this->ipsclass->member['id'], + 'member_name' => $this->ipsclass->member['members_display_name'], + 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], + 'http_referer'=> htmlspecialchars($this->ipsclass->my_getenv('HTTP_REFERER')), + 'ctime' => time(), + 'topic_title' => $topic['title'], + 'action' => $this->ipsclass->lang['ajax_topicstate'], + 'query_string'=> htmlspecialchars($this->ipsclass->my_getenv('QUERY_STRING')), + ) ); + + $topic['state'] = $openclose; + + $last_time = $this->ipsclass->input['last_visit']; + + if ( isset($this->ipsclass->forum_read[ $topic['forum_id'] ]) AND $this->ipsclass->forum_read[ $topic['forum_id'] ] > $last_time ) + { + $last_time = $this->ipsclass->forum_read[ $topic['forum_id'] ]; + } + + $macro = $this->ipsclass->folder_icon( $topic, '', $last_time ); + + if ( is_array( $this->ipsclass->skin['_macros'] ) ) + { + foreach( $this->ipsclass->skin['_macros'] as $row ) + { + $macro = str_replace( '<{'.$row['macro_value'].'}>', $row['macro_replace'], $macro ); + } + } + + $macro = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $macro ); + $macro = str_replace( "<#EMO_DIR#>", $this->ipsclass->skin['_emodir'] , $macro ); + + if ( $this->ipsclass->vars['ipb_img_url'] ) + { + $macro = preg_replace( "#img\s+?src=([\"'])style_(images|avatars|emoticons)(.+?)[\"'](.+?)?".">#is", "img src=\\1".$this->ipsclass->vars['ipb_img_url']."style_\\2\\3\\1\\4>", $macro ); + } + + $this->class_ajax->return_string( $macro ); + } + else + { + if( trim($name) == '' OR !$name ) + { + $this->class_ajax->return_string($topic['title']); + exit(); + } + + if ($this->ipsclass->vars['etfilter_punct']) + { + $name = preg_replace( "/\?{1,}/" , "?" , $name ); + $name = preg_replace( "/(!){1,}/" , "!", $name ); + } + + if ($this->ipsclass->vars['etfilter_shout']) + { + $name = ucwords(strtolower($name)); + } + + $this->ipsclass->DB->do_update( 'topics', array( 'title' => $name ), 'tid='.$tid ); + + $this->ipsclass->DB->do_insert( 'moderator_logs', array ( + 'forum_id' => intval($topic['forum_id']), + 'topic_id' => intval($tid), + 'post_id' => intval($pid), + 'member_id' => $this->ipsclass->member['id'], + 'member_name' => $this->ipsclass->member['members_display_name'], + 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], + 'http_referer'=> htmlspecialchars($this->ipsclass->my_getenv('HTTP_REFERER')), + 'ctime' => time(), + 'topic_title' => $name, + 'action' => sprintf($this->ipsclass->lang['ajax_topictitle'],$topic['title'],$name), + 'query_string'=> htmlspecialchars($this->ipsclass->my_getenv('QUERY_STRING')), + ) ); + + if ( $topic['tid'] == $this->ipsclass->forums->forum_by_id[ $topic['forum_id'] ]['last_id'] ) + { + $this->ipsclass->DB->do_update( 'forums', array( 'last_title' => $name ), 'id='.$topic['forum_id'] ); + } + + if ( $topic['tid'] == $this->ipsclass->forums->forum_by_id[ $topic['forum_id'] ]['newest_id'] ) + { + $this->ipsclass->DB->do_update( 'forums', array( 'newest_title' => $name ), 'id='.$topic['forum_id'] ); + } + + $this->ipsclass->update_forum_cache(); + + $this->class_ajax->return_string($name); + } + + $this->class_ajax->return_null('s'); + } + + /*-------------------------------------------------------------------------*/ + // Get member names + /*-------------------------------------------------------------------------*/ + + function get_member_names() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $name = $this->class_ajax->convert_and_make_safe( $this->ipsclass->input['name'], 0 ); + + //-------------------------------------------- + // Load extra db cache file + //-------------------------------------------- + + $this->ipsclass->DB->load_cache_file( ROOT_PATH.'sources/sql/'.SQL_DRIVER.'_extra_queries.php', 'sql_extra_queries' ); + + //----------------------------------------- + // Check length + //----------------------------------------- + + if ( strlen( $name ) < 3 ) + { + $this->class_ajax->return_null(); + } + + //----------------------------------------- + // Try query... + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'member_display_name_lookup', array( 'name' => $this->ipsclass->DB->add_slashes( $name ), 'field' => 'members_display_name' ), 'sql_extra_queries' ); + $this->ipsclass->DB->cache_exec_query(); + + //----------------------------------------- + // Got any results? + //----------------------------------------- + + if ( ! $this->ipsclass->DB->get_num_rows() ) + { + $this->class_ajax->return_null(); + } + + $names = array(); + $ids = array(); + + while( $r = $this->ipsclass->DB->fetch_row() ) + { + $names[] = '"'.$r['members_display_name'].'"'; + $ids[] = intval($r['id']); + } + + $this->class_ajax->print_nocache_headers(); + @header( "Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}" ); + print "returnSearch( '".str_replace( "'", "", $name )."', new Array(".implode( ",", $names )."), new Array(".implode( ",", $ids ).") );"; + } + + /*-------------------------------------------------------------------------*/ + // Get new posts + /*-------------------------------------------------------------------------*/ + + function get_new_messages( $return=0 ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $count = isset($this->ipsclass->input['count']) ? intval( $this->ipsclass->input['count'] ) : 0; + $count = $count ? $count : 5; + + $html = ""; + + $this->ipsclass->load_template( 'skin_msg' ); + $this->ipsclass->load_language( 'lang_msg' ); + + //----------------------------------------- + // Check... + //----------------------------------------- + + if ( ! $this->ipsclass->member['id'] ) + { + return $this->class_ajax->error_handler(); + } + + //----------------------------------------- + // Get message list + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'msg_get_folder_list', + array( 'mid' => $this->ipsclass->member['id'], 'vid' => 'in', 'sort' => 'mt_date DESC', 'limita' => 0, 'limitb' => $count ) ); + $this->ipsclass->DB->simple_exec(); + + if ( ! $this->ipsclass->DB->get_num_rows() ) + { + //$this->class_ajax->error_handler("No messages"); + $html .= $this->ipsclass->compiled_templates['skin_msg']->xmlout_msgs_none(); + } + else + { + //----------------------------------------- + // Start output + //----------------------------------------- + + while( $r = $this->ipsclass->DB->fetch_row() ) + { + //----------------------------------------- + // We only want 10 rows, but the 11th will + // tell us if there are more to come + //----------------------------------------- + + $r['date'] = $this->ipsclass->get_date( $r['mt_date'] , 'TINY', 0, 1 ); + $r['icon'] = $r['mt_read'] == 1 ? "" + : ""; + + $r['_mini'] = $this->ipsclass->txt_truncate( $r['mt_title'] , 30 ); + + $html .= $this->ipsclass->compiled_templates['skin_msg']->xmlout_msgs_row( $r ); + } + } + + //----------------------------------------- + // Check count... + //----------------------------------------- + + if ( ! $return ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( $this->ipsclass->compiled_templates['skin_msg']->xmlout_msgs_wrapper( $html ) ); + } + else + { + return $this->ipsclass->compiled_templates['skin_msg']->xmlout_msgs_wrapper( $html ); + } + } + + + /*-------------------------------------------------------------------------*/ + // Get new posts + /*-------------------------------------------------------------------------*/ + + function mark_forum_as_read() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $forum_id = intval( $this->ipsclass->input['fid'] ); + $sf = intval( $this->ipsclass->input['sf'] ); + $forum_data = $this->ipsclass->forums->forum_by_id[ $forum_id ]; + $children = $this->ipsclass->forums->forums_get_children( $forum_data['id'] ); + $save = array(); + + //----------------------------------------- + // Check... + //----------------------------------------- + + /*if ( ! $this->ipsclass->member['id'] ) + { + return $this->class_ajax->error_handler(); + }*/ + + if ( ! $forum_id ) + { + return $this->class_ajax->error_handler(); + } + + //----------------------------------------- + // OK - do the magic!! + //----------------------------------------- + + if ( $sf ) + { + if ( isset($children) AND is_array($children) and count($children) ) + { + foreach( $children as $id ) + { + $this->ipsclass->forum_read[ $id ] = time(); + + $save[ $id ] = array( 'marker_forum_id' => $id, + 'marker_member_id' => $this->ipsclass->member['id'], + 'marker_last_update' => time(), + 'marker_unread' => 0, + 'marker_last_cleared' => time() ); + } + } + } + + //----------------------------------------- + // Add in the current forum... + //----------------------------------------- + + $this->ipsclass->forum_read[ $forum_data['id'] ] = time(); + + $save[ $forum_data['id'] ] = array( 'marker_forum_id' => $forum_data['id'], + 'marker_member_id' => $this->ipsclass->member['id'], + 'marker_last_update' => time(), + 'marker_unread' => 0, + 'marker_last_cleared' => time() ); + + //----------------------------------------- + // Reset topic markers + //----------------------------------------- + + if ( $this->ipsclass->vars['db_topic_read_cutoff'] and $this->ipsclass->member['id'] ) + { + if ( count( $save ) ) + { + foreach( $save as $data ) + { + $this->ipsclass->DB->do_replace_into( 'topic_markers', $data, array('marker_member_id','marker_forum_id'), TRUE ); + } + } + } + + //----------------------------------------- + // Reset cookie + //----------------------------------------- + + $this->ipsclass->no_print_header = 0; + $this->ipsclass->hdl_forum_read_cookie('set'); + $this->ipsclass->no_print_header = 1; + + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( "1" ); + } + + /*-------------------------------------------------------------------------*/ + // Get new posts + /*-------------------------------------------------------------------------*/ + + function get_new_posts( $return=0 ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $count = 0; + $st = intval( $this->ipsclass->input['st'] ); + $next = 0; + $previous = 0; + $html = ''; + + $this->ipsclass->load_template( 'skin_search' ); + $this->ipsclass->load_language( 'lang_search' ); + + //----------------------------------------- + // Check... + //----------------------------------------- + + if ( ! $this->ipsclass->member['id'] ) + { + return $this->class_ajax->error_handler(); + } + + //----------------------------------------- + // Get search lib + //----------------------------------------- + + require_once( ROOT_PATH.'sources/action_public/search.php' ); + $this->search = new search(); + $this->search->ipsclass =& $this->ipsclass; + + //----------------------------------------- + // Do we have any forums to search in? + //----------------------------------------- + + $this->ipsclass->input['forums'] = 'all'; + $this->ipsclass->input['CODE'] = 'getnew'; + + $forums = $this->search->get_searchable_forums(); + + if ( $forums == "" ) + { + return $this->class_ajax->error_handler(); + } + + //----------------------------------------- + // Work out the "last time" + //----------------------------------------- + + $last_time = $this->ipsclass->member['last_visit']; + + if ( $this->ipsclass->member['members_markers']['board'] > $last_time ) + { + $last_time = $this->ipsclass->member['members_markers']['board']; + } + + //----------------------------------------- + // Get query + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 't.*, t.title as topic_title', + 'from' => 'topics t', + 'where' => "t.forum_id IN($forums) AND t.last_post > {$last_time} AND t.approved=1 AND t.pinned IN (0,1)", + 'order' => "t.last_post DESC", + 'limit' => array( $st, 11 ) ) ); + $this->ipsclass->DB->simple_exec(); + + while( $r = $this->ipsclass->DB->fetch_row() ) + { + //----------------------------------------- + // We only want 10 rows, but the 11th will + // tell us if there are more to come + //----------------------------------------- + + $count++; + + if ( $count == 11 ) + { + break; + } + + $mini_title = $this->ipsclass->txt_truncate( $r['title'] , 30 ); + $mini_name = $this->ipsclass->txt_truncate( $r['last_poster_name'] , 25 ); + $date = $this->ipsclass->get_date( $r['last_post'], 'TINY', 0, 1 ); + + $html .= $this->ipsclass->compiled_templates['skin_search']->xmlout_gnp_row($r['tid'], $mini_title, $r['title'], $date ); + } + + //----------------------------------------- + // Check count... + //----------------------------------------- + + if ( $count ) + { + if ( $count > 10 ) + { + $next = $st + 10; + } + + if ( $st ) + { + $previous = $st - 10; + } + } + else + { + $html = "
    {$this->ipsclass->lang['xml_nopost']}
    "; + } + + if ( ! $return ) + { + $this->class_ajax->print_nocache_headers(); + $this->class_ajax->return_string( $this->ipsclass->compiled_templates['skin_search']->xmlout_gnp_wrapper( $html, $previous, $next, $st ) ); + } + else + { + return $this->ipsclass->compiled_templates['skin_search']->xmlout_gnp_wrapper( $html, $previous, $next, $st ); + } + } + + /*-------------------------------------------------------------------------*/ + // make string XML safe + /*-------------------------------------------------------------------------*/ + + function _make_safe_for_xml( $t ) + { + return $this->class_ajax->_make_safe_for_xml($t); + } + + /*-------------------------------------------------------------------------*/ + // Error handler + /*-------------------------------------------------------------------------*/ + + function error_handler() + { + return $this->class_ajax->return_null(); + } + + /*-------------------------------------------------------------------------*/ + // Return NOTHING :o + /*-------------------------------------------------------------------------*/ + + function return_null($val=0) + { + return $this->class_ajax->return_null($val); + } + + /*-------------------------------------------------------------------------*/ + // Return string + /*-------------------------------------------------------------------------*/ + + function return_string($string) + { + return $this->class_ajax->return_string($string); + } + + /*-------------------------------------------------------------------------*/ + // Print no cache headers + /*-------------------------------------------------------------------------*/ + + function print_nocache_headers() + { + return $this->class_ajax->print_nocache_headers(); + } + + /*-------------------------------------------------------------------------*/ + // Convert Ajax unicode + /*-------------------------------------------------------------------------*/ + + function convert_unicode($t) + { + return $this->class_ajax->convert_unicode($t); + } + + function convert_html_entities($t) + { + return $this->class_ajax->convert_html_entities($t); + } + + +} + ?> \ No newline at end of file diff --git a/upload/sources/api/api_components.php b/upload/sources/api/api_components.php index 5b6e7be3..702305cd 100644 --- a/upload/sources/api/api_components.php +++ b/upload/sources/api/api_components.php @@ -2,27 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-10-26 14:14:27 -0500 (Thu, 26 Oct 2006) $ -| > $Revision: 679 $ +| > $Date: 2007-07-13 13:51:38 -0400 (Fri, 13 Jul 2007) $ +| > $Revision: 1087 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -34,25 +24,25 @@ */ /** -* API: Компонентов форума +* API: Components * -* ПРИМЕР ИСПОЛЬЗОВАНИЯ +* EXAMPLE USAGE * -* //-- ОБНОВЛЕНИЕ СУЩЕСТВУЮЩЕГО КОМПОНЕНТА --// +* //-- UPDATE EXISTING ROW --// * $api = new api_components(); -* # Опционально - если $ipsclass не передается в объект, он будет инициализирован самостоятельно +* # Optional - if $ipsclass is not passed, it'll init * $api->ipsclass =& $this->ipsclass; * $api->api_init(); * $update = array ( * 'com_version' => '1.3', * 'com_menu_data' => array( 0 => array( -* 'menu_text' => 'Название пункта меню', +* 'menu_text' => 'Link text', * 'menu_url' => 'code=showme', * 'menu_redirect' => 0, * 'menu_permbit' => 'keyhere', -* 'menu_permlang' => 'Позволяет создать что-то' ), +* 'menu_permlang' => 'Allow CREATE Something' ), * 1 => array( -* 'menu_text' => 'Название пункта меню 2', +* 'menu_text' => 'Link text 2', * 'menu_url' => 'section=tools&act=op&code=showme2', * 'menu_redirect' => 1, * 'menu_permbit' => 'add', @@ -60,23 +50,23 @@ * ) ); * * $api->acp_component_update( 'blog', $update ); -* //-- ВКЛЮЧЕНИЕ КОМПОНЕНТА --// +* //-- ENABLE A COMPONENT --// * $api->acp_component_enable( 'blog' ); * * -* ПОЛЯ КОМПОНЕНТ (СТРУКТУРА КОМПОНЕНТ) +* COMPONENT FIELDS * -* 'com_title' = Название компонента -* 'com_author' = Автор компонента -* 'com_version' = Версия компонента -* 'com_url' = Адрес сайта компонента -* 'com_menu_data' = Массив пунктов меню настроек компонента -* 'com_enabled' = Статус компонента (включен/не включен) -* 'com_safemode' = Режим работы компонента (если в safemode админы не могут изменять) -* 'com_section_key' = Уникальный ключ компонента (Ключ, соответствующий названию файла, напр-р: blog если используется blog.php) -* 'com_description' = Описание компонента -* 'com_url_uri' = URI-адрес компонента в верхнем меню форума -* 'com_url_title' = Название компонента в верхнем меню форума +* 'com_title' = Component Title +* 'com_author' = Component Author +* 'com_version' = Component Version +* 'com_url' = Component Home URL +* 'com_menu_data' = Component Menu Data Array +* 'com_enabled' = Component Enabled +* 'com_safemode' = Component Safemode (admins cannot alter) +* 'com_section_key' = Component Section (Key, must match filename. eg: blog if using blog.php) +* 'com_description' = Component Description +* 'com_url_uri' = Component Board Header URL URI +* 'com_url_title' = Component Board Header URL Title * * * @package InvisionPowerBoard @@ -105,9 +95,9 @@ if ( ! defined('IPS_API_CORE_LOADED') ) } /** -* API: Компонентов форума +* API: Components * -* Класс предоставляет все методы API для работы с компонентами форума. +* This class deals with all available components functions. * * @package InvisionPowerBoard * @subpackage APIs @@ -118,27 +108,27 @@ if ( ! defined('IPS_API_CORE_LOADED') ) class api_components extends api_core { /** - * Информация о компоненте + * Loaded component * * @var array */ var $component; /** - * Объект XML парсера + * XML Parser Object * * @var object */ var $xml; /*-------------------------------------------------------------------------*/ - // Получение информации о компоненте по его ключу (имени секции компонента) + // Get component by key /*-------------------------------------------------------------------------*/ /** - * Получает всю информацию о компоненте + * Updates a component * - * @param string Ключ компонента (напр-р: blog) - * @return void Заполняет $this->component + * @param string Component key (eg: blog) + * @return void Populates $this->component */ function get_component_by_key( $key ) { @@ -148,10 +138,10 @@ class api_components extends api_core } /*-------------------------------------------------------------------------*/ - // Создание меню + // Create menu /*-------------------------------------------------------------------------*/ /** - * Создает сериализованную строку из массива меню + * Creates serialized string from a menu array * * $menu_data [ $item_id ]['menu_text'] * $menu_data [ $item_id ]['menu_url'] @@ -160,8 +150,8 @@ class api_components extends api_core * $menu_data [ $item_id ]['menu_permlang'] * * - * @param array многоуровневый массив - * @return string сериализованный массив + * @param array multi-dimenisonal array + * @return void; */ function acp_component_create_menu_data( $menu_data ) { @@ -173,12 +163,12 @@ class api_components extends api_core /*-------------------------------------------------------------------------*/ - // Импортирование компонент из XML файла + // Import XML File /*-------------------------------------------------------------------------*/ /** - * Обновляет/добавляет компоненты из xml файла + * Updates/inserts a component from xml file * - * @param string Путь к XML файлу + * @param string Path to XML File * @return array; */ function acp_component_import( $xml_file_path ) @@ -218,7 +208,6 @@ class api_components extends api_core require_once( KERNEL_PATH.'class_xml.php' ); $this->xml = new class_xml(); - $this->xml->lite_parser = 1; //----------------------------------------- // Unpack the datafile @@ -239,11 +228,7 @@ class api_components extends api_core // Ensure [0] is populated //----------------------------------------- - $tmp = $this->xml->xml_array['componentexport']['componentgroup']['component']; - - unset($this->xml->xml_array['componentexport']['componentgroup']['component']); - - $this->xml->xml_array['componentexport']['componentgroup']['component'][0] = $tmp; + $this->xml->xml_array['componentexport']['componentgroup']['component'] = array( 0 => $this->xml->xml_array['componentexport']['componentgroup']['component'] ); } $updated = $inserted = 0; @@ -287,14 +272,13 @@ class api_components extends api_core } /*-------------------------------------------------------------------------*/ - // Добавление компонента + // Update component /*-------------------------------------------------------------------------*/ /** - * Добавляет новый компонент в систему + * Updates a component * - * @param string Ключ компонента (напр-р: блог) - * @param array Массив обновляемых полей ( должен совпадать со структурой - * компонент, см. в комментариях к этому классу ) + * @param string Component key (eg: blog) + * @param array Component fields ( must match class fields, see class docs ) * @return void; */ function acp_component_insert( $key, $fields ) @@ -386,14 +370,13 @@ class api_components extends api_core } /*-------------------------------------------------------------------------*/ - // Обновление компонента + // Update component /*-------------------------------------------------------------------------*/ /** - * Обновляет слжебную информацию компонента + * Updates a component * - * @param string Ключ компонента (напр-р: блог) - * @param array Массив обновляемых полей ( должен совпадать со структурой - * компонент, см. в комментариях к этому классу ) + * @param string Component key (eg: blog) + * @param array Component fields ( must match class fields, see class docs ) * @return void; */ function acp_component_update( $key, $fields ) @@ -492,13 +475,12 @@ class api_components extends api_core } /*-------------------------------------------------------------------------*/ - // Удаление компонента + // Remove component /*-------------------------------------------------------------------------*/ /** - * Удаляет компонент из систему [ Внимание, метод не пердоставляет - * ни каких подтверждений удаления ! ] + * Remove a component [ no confirmation screens! ] * - * @param string Ключ компонента (напр-р: blog) + * @param string Component key (eg: blog) * @return void */ function acp_component_remove( $key ) @@ -508,13 +490,12 @@ class api_components extends api_core } /*-------------------------------------------------------------------------*/ - // Включение компонента + // Enable component /*-------------------------------------------------------------------------*/ /** - * Активирует компонент - он становится доступным в пользовательской части - * форума + * Enable a component * - * @param string Ключ компонента (напр-р: blog) + * @param string Component key (eg: blog) * @return void */ function acp_component_enable( $key ) @@ -524,12 +505,12 @@ class api_components extends api_core } /*-------------------------------------------------------------------------*/ - // Отключение компонента + // Disable component /*-------------------------------------------------------------------------*/ /** - * Деактивирует компонент + * Enable a component * - * @param string Ключ компонента (напр-р: blog) + * @param string Component key (eg: blog) * @return void */ function acp_component_disable( $key ) @@ -539,10 +520,10 @@ class api_components extends api_core } /*-------------------------------------------------------------------------*/ - // Перестройка кеша компонентов + // Components Rebuild Cache /*-------------------------------------------------------------------------*/ /** - * Создает новый кеш компонентов + * Rebuild cache * * @return void */ diff --git a/upload/sources/api/api_core.php b/upload/sources/api/api_core.php index 1aed6a8c..fbb5cfe2 100644 --- a/upload/sources/api/api_core.php +++ b/upload/sources/api/api_core.php @@ -2,27 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ +| > $Date: 2007-06-26 11:58:29 -0400 (Tue, 26 Jun 2007) $ +| > $Revision: 1066 $ | > $Author: matt $ +--------------------------------------------------------------------------- | @@ -34,16 +24,17 @@ */ /** -* API: ЯДРО +* API: CORE * -* Данный класс содержит все базовые функции, а также все функции по работе -* с языками. -* Если $ipsclass не передается в объект класса, то объект ipsclass -* инициализируется автоматическию, загружаются все необходимые базовые классы -* и инициализируются их объекты (DB, converge, forums, display, session). -* Создается новое подключение к БД, загружаются все необходимые кеши. -* Вы можете управлять подключением классов через массив -* $this->load_classes[-class-] = 1; +* This class deals with all core functions. +* This class deals with all available language functions. +* If $ipsclass is passed to it, then it will skip the init +* However, if $ipsclass is not an object, it'll initialize +* the $ipsclass object, and by default load all the required +* IPB classes and init them (DB, converge, forums, display, session) +* and it'll also get a new DB connection and load settings and caches. +* You can alter which classes are loaded via the $this->load_classes[-class-] = 1; +* array * * @package InvisionPowerBoard * @subpackage APIs @@ -53,9 +44,9 @@ */ /** -* API: ЯДРО +* API: CORE * -* Класс предоставляет все базовые методы API. +* This class deals with all core functions. * * @package InvisionPowerBoard * @subpackage APIs @@ -66,7 +57,7 @@ class api_core { /** - * Объект супер-класса IPS + * IPS Class Object * * @var object */ @@ -80,30 +71,30 @@ class api_core var $init_run; /** - * Массив ошибок API + * API Error string * * @var array Errors */ var $api_error = array(); /** - * Флаг полной загрузки API + * API Load full? * * @var integer boolean */ var $full_load = 1; /** - * Корневой путь для API (где находятся файлы init.php/index.php) + * API Path to IPB root (where init.php/index.php is) * - * @var string Путь к корневой директории IPB + * @var string Path to IPB root folder */ var $path_to_ipb = '../../'; /** - * Классы для загрузки API + * API Load classes * - * @var array Классы загружаемые по умолчанию: [print,forums,converge,session] + * @var array Classes to load default: [print,forums,converge,session] */ var $load_classes = array( 'print' => 1, 'forums' => 1, @@ -111,11 +102,11 @@ class api_core 'session' => 1 ); /*-------------------------------------------------------------------------*/ - // Инициализация API + // API init /*-------------------------------------------------------------------------*/ /** - * Проверка наличия необходимого объекта ipsclass и необходимость подключения - * необходимых классов + * Determines if we have required ipsclass vars + * on hand * * @return void; */ @@ -198,18 +189,6 @@ class api_core $this->ipsclass->sess->ipsclass =& $this->ipsclass; } - //------------------------------- - // FORUMS Object? - //------------------------------- - - if ( ! is_object( $this->ipsclass->forums ) AND $this->load_classes['forums'] ) - { - require_once ROOT_PATH . "sources/classes/class_forums.php"; - - $this->ipsclass->forums = new forum_functions(); - $this->ipsclass->forums->ipsclass =& $this->ipsclass; - } - //------------------------------- // Converge Object? //------------------------------- @@ -230,29 +209,31 @@ class api_core $this->ipsclass->init_load_cache( array('rss_export', 'bbcode', 'attachtypes', 'badwords', 'emoticons', 'settings', 'group_cache', 'systemvars', 'skin_id_cache', 'languages', 'forum_cache', 'moderators', 'stats') ); } + //------------------------------- + // FORUMS Object? + //------------------------------- + + if ( ! is_object( $this->ipsclass->forums ) AND $this->load_classes['forums'] ) + { + require_once ROOT_PATH . "sources/classes/class_forums.php"; + + $this->ipsclass->forums = new forum_functions(); + $this->ipsclass->forums->ipsclass =& $this->ipsclass; + $this->ipsclass->forums->strip_invisible = 1; + $this->ipsclass->forums->forums_init(); + } + if ( ! defined('IPSCLASS_INITIATED') ) { $this->ipsclass->initiate_ipsclass(); $this->ipsclass->md5_check = $ipsclass->return_md5_check(); $this->ipsclass->parse_incoming(); - if ( ! is_object( $this->ipsclass->forums ) ) - { - $this->ipsclass->forums->ipsclass =& $this->ipsclass; - $this->ipsclass->forums->strip_invisible = 1; - $this->ipsclass->forums->forums_init(); - } - $this->ipsclass->load_skin(); } $this->init_run = 1; } - - - - - } diff --git a/upload/sources/api/api_forums.php b/upload/sources/api/api_forums.php index cbf28df3..749f16d3 100644 --- a/upload/sources/api/api_forums.php +++ b/upload/sources/api/api_forums.php @@ -2,24 +2,14 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license -+--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +--------------------------------------------------------------------------- | > $Date: 2005-10-10 14:08:54 +0100 (Mon, 10 Oct 2005) $ | > $Revision: 23 $ @@ -34,15 +24,11 @@ */ /** -* API: Форумов +* API: Forums * -* ПРИМЕР ИСПОЛЬЗОВАНИЯ +* EXAMPLE USAGE * -* $api = new api_forums(); -* # Опционально - если $ipsclass не передается в объект, он будет инициализирован самостоятельно -* $api->ipsclass =& $this->ipsclass; -* $api->api_init(); -* $jump_list = $api->return_forum_jump_option_list( array(1,3,5) ); +* To follow * * * @package InvisionPowerBoard @@ -66,9 +52,9 @@ if ( ! class_exists( 'api_core' ) ) } /** -* API: Форумов +* API: Languages * -* Класс предоставляет все методы API для получения списка форумов. +* This class deals with all available language functions. * * @package InvisionPowerBoard * @subpackage APIs @@ -87,17 +73,28 @@ class api_forums extends api_core /*-------------------------------------------------------------------------*/ - // Получение списка форумов в виде списка + // Returns a forum jump option list /*-------------------------------------------------------------------------*/ /** - * Возвращает список всех форумов БЕЗ тега SELECT - * Внимание: метод возвращает ВСЕ форумы без учета прав доступа. + * Returns a forum jump list WITHOUT the SELECT tag + * NOTE: Returns ALL forums regardless of permission as + * if viewed from the ACP. * - * @param array Массив ID выбранных форумов - * @return string HTML
    "; - + return $return; - + } - + //----------------------------------------- // Build JS for floated window //----------------------------------------- - + function build_editor_area_floated($no_buttons=0) { $return = "
    "; - + $return .= $this->html_build_editor_top(); - + $return .= "
    "; - + if ( $no_buttons == 0 ) { $return .= " - - - - - + + + + + "; } - + $return .= "
    "; - + $return .= "
    ".$this->ipsclass->adskin->form_textarea("templatebit", $html, $this->ipsclass->vars['tx'], $this->ipsclass->vars['ty'], 'none', "templatebit", $this->default_css )."
    \n"; - + $return .= "
    "; - + $return .= " "; - + $return .= $this->html_build_editor_bottom(); - - $return .= "
    "; - + + $return .= "
    "; + $this->ipsclass->html = $return; - + $this->ipsclass->admin->print_popup(); - + } - + //----------------------------------------- // Build editor preferences menus //----------------------------------------- - + function build_editor_pref_menus() { $this->menu_fontchange = ""; - + $this->menu_sizechange = ""; - + $this->menu_backchange = ""; - + $this->menu_fontcolor = ""; - + $this->menu_widthchange = ""; - + //----------------------------------------- // Not single? //----------------------------------------- - + if ( $this->type != 'single' AND $this->type != 'multiple' ) { $this->menu_highchange = ""; } else { - $this->menu_highchange = ""; } - + if ( $cookie = $this->ipsclass->my_getcookie( 'acpeditorprefs' ) ) - { + { list( $font, $size, $bg, $fc, $width, $height ) = explode( "," ,$cookie ); } else @@ -320,7 +313,7 @@ EOF; //----------------------------------------- // Decent defaults //----------------------------------------- - + $font = 'monaco'; $size = '8pt'; $bg = 'white'; @@ -328,57 +321,57 @@ EOF; $width = '100%'; $height = '300px'; } - + //----------------------------------------- // Force decent height if single //----------------------------------------- - + if ( $this->type == 'single' OR $this->type == 'multiple' ) { $height = '300px'; } - + //----------------------------------------- // Show.. //----------------------------------------- - + $this->default_css = "font-family:$font;font-size:$size;color:$fc;background-color:$bg;width:$width;height:$height;border:3px outset #555"; - + $this->menu_fontchange = preg_replace( "/(option value='".preg_quote($font)."')/" , "\\1 selected='selected'", $this->menu_fontchange ); $this->menu_sizechange = preg_replace( "/(option value='".preg_quote($size)."')/" , "\\1 selected='selected'", $this->menu_sizechange ); $this->menu_backchange = preg_replace( "/(option value='".preg_quote($bg)."')/" , "\\1 selected='selected'", $this->menu_backchange ); $this->menu_fontcolor = preg_replace( "/(option value='".preg_quote($fc)."')/" , "\\1 selected='selected'", $this->menu_fontcolor ); $this->menu_widthchange = preg_replace( "/(option value='".preg_quote($width)."')/" , "\\1 selected='selected'", $this->menu_widthchange ); $this->menu_highchange = preg_replace( "/(option value='".preg_quote($height)."')/" , "\\1 selected='selected'", $this->menu_highchange ); - - - $this->editor_prefs_dropdown = "
    Настройки редактора
    "; - + + + $this->editor_prefs_dropdown = "
    Editor Preferences
    "; + } - - + + function html_build_editor_top() { $this->build_editor_pref_menus(); - + if ( $this->type == 'single' ) { return "
    "; } - + $close_box = $this->type == 'multiple' ? "" : ''; - + return <<
    - +
    {$close_box}
    {$this->editor_prefs_dropdown}
    EOF; } - + function html_build_editor_bottom() { return <<"+ ""+ - "Шрифт"+ + "Font Family"+ "{$this->menu_fontchange}"+ ""+ ""+ - "Размер шрифта"+ + "Font Size"+ "{$this->menu_sizechange}"+ ""+ ""+ - "Цвет шрифта"+ + "Font Color"+ "{$this->menu_fontcolor}"+ ""+ ""+ - "Фон"+ + "Background"+ "{$this->menu_backchange}"+ ""+ ""+ - "Ширина"+ + "Area Width"+ "{$this->menu_widthchange}"+ ""+ ""+ - "Высота"+ + "Area Height"+ "{$this->menu_highchange}"+ ""+ ""+ ""+ - ""+ + ""+ ""+ ""+ "" @@ -421,8 +414,8 @@ EOF;
    \n
    EOF; } - - + + } diff --git a/upload/sources/lib/func_boardstats.php b/upload/sources/lib/func_boardstats.php index e8d06b5b..3458fbbe 100644 --- a/upload/sources/lib/func_boardstats.php +++ b/upload/sources/lib/func_boardstats.php @@ -2,26 +2,18 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ +| > $Date: 2007-02-14 15:17:58 -0500 (Wed, 14 Feb 2007) $ +| > $Revision: 848 $ +| > $Author: bfarber $ +--------------------------------------------------------------------------- | | > Board index functions module @@ -35,8 +27,8 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); } @@ -360,19 +352,19 @@ class func_boardstats else { $member_permission_groups = explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['g_perm_id'] ) ); - - if( isset($this->ipsclass->member['mgroup_others']) AND $this->ipsclass->member['mgroup_others'] ) - { - $this->ipsclass->member['mgroup_others'] = $this->ipsclass->clean_perm_string($this->ipsclass->member['mgroup_others']); - $mgroup_others = explode( ",", $this->ipsclass->member['mgroup_others'] ); - - if( count($mgroup_others) ) + if( isset($this->ipsclass->member['mgroup_others']) AND $this->ipsclass->member['mgroup_others'] ) { - foreach( $mgroup_others as $mgroup ) + $this->ipsclass->member['mgroup_others'] = $this->ipsclass->clean_perm_string($this->ipsclass->member['mgroup_others']); + + $mgroup_others = explode( ",", $this->ipsclass->member['mgroup_others'] ); + + if( count($mgroup_others) ) { - if( $mgroup ) + foreach( $mgroup_others as $mgroup ) { + if( $mgroup ) + { $member_permission_groups = array_merge( $member_permission_groups, explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->cache['group_cache'][$mgroup]['g_perm_id'] ) ) ); } } @@ -509,11 +501,7 @@ class func_boardstats //----------------------------------------- $c_time = ''; - $c_time_day = gmdate( 'd', $event['event_activetime'] ); - $c_time_month = $this->ipsclass->lang[ 'M_' . gmdate( 'n', $event['event_activetime'] ) ]; - $c_time_year = gmdate( 'Y', $event['event_activetime'] ); - - $c_time = $c_time_day . ' ' . $c_time_month . ' ' . $c_time_year; + $c_time = gmdate( 'j-F-y', $event['event_activetime'] ); $show_events[] = "".$event['event_title'].""; } diff --git a/upload/sources/lib/func_chat.php b/upload/sources/lib/func_chat.php index 24c21df9..882c6b89 100644 --- a/upload/sources/lib/func_chat.php +++ b/upload/sources/lib/func_chat.php @@ -1,188 +1,178 @@ - $Date: 2006-10-05 11:04:08 -0500 (Thu, 05 Oct 2006) $ -| > $Revision: 609 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > Func chgat -| > Script written by Matt Mecham -| > Date started: 1st march 2002 -| -| > DBA Checked: Tue 25th May 2004 -+-------------------------------------------------------------------------- -*/ - - -if ( ! defined( 'IN_ACP' ) ) -{ - print "

    Неверный вход

    У Вас нет доступа к директиве этого файла. Если Вы проводили обновления, убедитесь, что не забыли обновить 'admin.php'."; - exit(); -} - - - -class func_chat -{ - - var $class = ""; - var $server = ""; - var $html = ""; - - function func_chat() - { - $this->server = str_replace( 'http://', '', $this->ipsclass->vars['chat04_whodat_server_addr'] ); - } - - //----------------------------------------- - // register_class($class) - // - // Register a $this-> with this class - // - //----------------------------------------- - - function register_class() - { - // NO LONGER NEEDED - } - - //----------------------------------------- - // Print online list - //----------------------------------------- - - function get_online_list() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $member_ids = array(); - $to_load = array(); - - // Let's use the new config vars if they are available, else revert to the legacy variable names - $_hide_whoschatting = ( isset($this->ipsclass->vars['chat_hide_whoschatting']) ) ? $this->ipsclass->vars['chat_hide_whoschatting'] : $this->ipsclass->vars['chat04_hide_whoschatting']; - $_who_on = ( isset($this->ipsclass->vars['chat_who_on']) ) ? $this->ipsclass->vars['chat_who_on'] : $this->ipsclass->vars['chat04_who_on']; - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! $_who_on ) - { - return; - } - - //----------------------------------------- - // Sort and show :D - //----------------------------------------- - - if ( is_array( $this->ipsclass->cache['chatting'] ) AND count( $this->ipsclass->cache['chatting'] ) ) - { - foreach( $this->ipsclass->cache['chatting'] as $id => $data ) - { - if ( $data['updated'] < ( time() - 120 ) ) - { - continue; - } - - $to_load[ $id ] = $id; - } - } - - //----------------------------------------- - // Is this a root admin in disguise? - // Is that kinda like a diamond in the rough? - //----------------------------------------- - - $our_mgroups = array(); - - if( $this->ipsclass->member['mgroup_others'] ) - { - $our_mgroups = explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ); - } - - $our_mgroups[] = $this->ipsclass->member['mgroup']; - - //----------------------------------------- - // Got owt? - //----------------------------------------- - - if ( count($to_load) ) - { - $this->ipsclass->DB->build_query( array( 'select' => 'm.id, m.members_display_name, m.mgroup', - 'from' => array( 'members' => 'm' ), - 'where' => "m.id IN(".implode(",",$to_load).")", - 'add_join' => array( 0 => array( 'select' => 's.login_type', - 'from' => array( 'sessions' => 's' ), - 'where' => 's.member_id=m.id', - 'type' => 'left' ) ), - 'order' => 'm.members_display_name' ) ); - $this->ipsclass->DB->exec_query(); - - while ( $m = $this->ipsclass->DB->fetch_row() ) - { - $m['members_display_name'] = $this->ipsclass->make_name_formatted( $m['members_display_name'], $m['mgroup'] ); - - if( $m['login_type'] ) - { - if ( (in_array( $this->ipsclass->vars['admin_group'], $our_mgroups )) and ($this->ipsclass->vars['disable_admin_anon'] != 1) ) - { - $member_ids[] = "ipsclass->base_url}showuser={$m['id']}\">{$m['members_display_name']}"; - } - } - else - { - $member_ids[] = "ipsclass->base_url}showuser={$m['id']}\">{$m['members_display_name']}"; - } - } - } - - //----------------------------------------- - // Got owt? - //----------------------------------------- - - if ( count( $member_ids ) ) - { - $final = implode( ",\n", $member_ids ); - - $this->html = $this->ipsclass->compiled_templates['skin_boards']->whoschatting_show( intval(count($member_ids)), $final ); - } - else - { - if ( ! $_hide_whoschatting ) - { - $this->html = $this->ipsclass->compiled_templates['skin_boards']->whoschatting_empty(); - } - } - - return $this->html; - } - - - - - -} - - - + $Date: 2006-12-13 16:16:03 -0500 (Wed, 13 Dec 2006) $ +| > $Revision: 791 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > IPChat functions +| > Script written by Matt Mecham +| > Date started: 29th September 2003 +| ++-------------------------------------------------------------------------- +*/ + + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly."; + exit(); +} + + +class func_chat +{ + + var $class = ""; + var $server = ""; + var $html = ""; + + function func_chat() + { + $this->server = str_replace( 'http://', '', $this->ipsclass->vars['chat04_whodat_server_addr'] ); + } + + //----------------------------------------- + // register_class($class) + // + // Register a $this-> with this class + // + //----------------------------------------- + + function register_class() + { + // NO LONGER NEEDED + } + + //----------------------------------------- + // Print online list + //----------------------------------------- + + function get_online_list() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $member_ids = array(); + $to_load = array(); + + // Let's use the new config vars if they are available, else revert to the legacy variable names + $_hide_whoschatting = ( isset($this->ipsclass->vars['chat_hide_whoschatting']) ) ? $this->ipsclass->vars['chat_hide_whoschatting'] : $this->ipsclass->vars['chat04_hide_whoschatting']; + $_who_on = ( isset($this->ipsclass->vars['chat_who_on']) ) ? $this->ipsclass->vars['chat_who_on'] : $this->ipsclass->vars['chat04_who_on']; + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( ! $_who_on ) + { + return; + } + + //----------------------------------------- + // Sort and show :D + //----------------------------------------- + + if ( is_array( $this->ipsclass->cache['chatting'] ) AND count( $this->ipsclass->cache['chatting'] ) ) + { + foreach( $this->ipsclass->cache['chatting'] as $id => $data ) + { + if ( $data['updated'] < ( time() - 120 ) ) + { + continue; + } + + $to_load[ $id ] = $id; + } + } + + //----------------------------------------- + // Is this a root admin in disguise? + // Is that kinda like a diamond in the rough? + //----------------------------------------- + + $our_mgroups = array(); + + if( $this->ipsclass->member['mgroup_others'] ) + { + $our_mgroups = explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ); + } + + $our_mgroups[] = $this->ipsclass->member['mgroup']; + + //----------------------------------------- + // Got owt? + //----------------------------------------- + + if ( count($to_load) ) + { + $this->ipsclass->DB->build_query( array( 'select' => 'm.id, m.members_display_name, m.mgroup', + 'from' => array( 'members' => 'm' ), + 'where' => "m.id IN(".implode(",",$to_load).")", + 'add_join' => array( 0 => array( 'select' => 's.login_type', + 'from' => array( 'sessions' => 's' ), + 'where' => 's.member_id=m.id', + 'type' => 'left' ) ), + 'order' => 'm.members_display_name' ) ); + $this->ipsclass->DB->exec_query(); + + while ( $m = $this->ipsclass->DB->fetch_row() ) + { + $m['members_display_name'] = $this->ipsclass->make_name_formatted( $m['members_display_name'], $m['mgroup'] ); + + if( $m['login_type'] ) + { + if ( (in_array( $this->ipsclass->vars['admin_group'], $our_mgroups )) and ($this->ipsclass->vars['disable_admin_anon'] != 1) ) + { + $member_ids[] = "ipsclass->base_url}showuser={$m['id']}\">{$m['members_display_name']}"; + } + } + else + { + $member_ids[] = "ipsclass->base_url}showuser={$m['id']}\">{$m['members_display_name']}"; + } + } + } + + //----------------------------------------- + // Got owt? + //----------------------------------------- + + if ( count( $member_ids ) ) + { + $final = implode( ",\n", $member_ids ); + + $this->html = $this->ipsclass->compiled_templates['skin_boards']->whoschatting_show( intval(count($member_ids)), $final ); + } + else + { + if ( ! $_hide_whoschatting ) + { + $this->html = $this->ipsclass->compiled_templates['skin_boards']->whoschatting_empty(); + } + } + + return $this->html; + } + + + + + +} + + + ?> \ No newline at end of file diff --git a/upload/sources/lib/func_chat_legacy.php b/upload/sources/lib/func_chat_legacy.php index 8941756d..ca041f0a 100644 --- a/upload/sources/lib/func_chat_legacy.php +++ b/upload/sources/lib/func_chat_legacy.php @@ -2,40 +2,31 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-10-05 11:04:08 -0500 (Thu, 05 Oct 2006) $ -| > $Revision: 609 $ +| > $Date: 2007-10-11 09:36:59 -0400 (Thu, 11 Oct 2007) $ +| > $Revision: 1130 $ | > $Author: matt $ +--------------------------------------------------------------------------- | -| > Func chat +| > IPChat functions | > Script written by Matt Mecham -| > Date started: 1st march 2002 +| > Date started: 29th September 2003 | -| > DBA Checked: Tue 25th May 2004 +-------------------------------------------------------------------------- */ -if ( ! defined( 'IN_ACP' ) ) +if ( ! defined( 'IN_IPB' ) ) { - print "

    Неверный вход

    У Вас нет доступа к директиве этого файла. Если Вы проводили обновления, убедитесь, что не забыли обновить 'admin.php'."; + print "

    Incorrect access

    You cannot access this file directly."; exit(); } @@ -121,7 +112,7 @@ class chat_functions 'from' => 'members', 'where' => "members_l_username IN (\"".$name_string."\")", 'order' => 'members_display_name' ) ); - $this->ipsclass->DB->exec_query + $this->ipsclass->DB->exec_query(); while ( $m = $this->ipsclass->DB->fetch_row() ) { @@ -132,10 +123,12 @@ class chat_functions $final = implode( ",\n", $member_ids ); - $final .= '|&|'.intval(count($member_ids)); + $final .= '|&|'.intval( count($member_ids) ); } - $this->ipsclass->DB->do_update( 'cache_store', array( 'cs_value' => addslashes($final), 'cs_extra' => "{$hits_left}&{$time_is_running_out}" ), 'where' => "cs_key='chatstat'" ); + $this->ipsclass->DB->do_update( 'cache_store', + array( 'cs_value' => addslashes($final), + 'cs_extra' => "{$hits_left}&{$time_is_running_out}" ), "cs_key='chatstat'" ); $row['cs_value'] = $final; } diff --git a/upload/sources/lib/func_digest.php b/upload/sources/lib/func_digest.php index 160a47dd..3b809368 100644 --- a/upload/sources/lib/func_digest.php +++ b/upload/sources/lib/func_digest.php @@ -2,25 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-11-13 15:22:45 -0600 (Mon, 13 Nov 2006) $ -| > $Revision: 726 $ +| > $Date: 2007-12-17 18:07:20 -0500 (Mon, 17 Dec 2007) $ +| > $Revision: 1149 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -33,15 +25,14 @@ */ -if ( ! defined( 'IN_ACP' ) ) +if ( ! defined( 'IN_IPB' ) ) { - print "

    Неверный вход

    У Вас нет доступа к директиве этого файла. Если вы проводили обновления, убедитесь, что не забыли обновить 'admin.php'."; + print "

    Incorrect access

    You cannot access this file directly."; exit(); } - class func_digest { # Global @@ -106,6 +97,9 @@ class func_digest $this->email = new emailer($this->root_path); $this->email->ipsclass =& $this->ipsclass; $this->email->email_init(); + + $this->ipsclass->forums->strip_invisible = 0; + $this->ipsclass->forums->forums_init(); } /*-------------------------------------------------------------------------*/ @@ -155,13 +149,90 @@ class func_digest while( $t = $this->ipsclass->DB->fetch_row( $topic_query ) ) { + //----------------------------------------- + // Test for group permissions + //----------------------------------------- + + $mgroup_others = ""; + $temp_mgroups = array(); + $mgroup_perms = array(); + + if( $t['mgroup_others'] ) + { + $t['mgroup_others'] = $this->ipsclass->clean_perm_string( $t['mgroup_others'] ); + $temp_mgroups = explode( ",", $t['mgroup_others'] ); + + if( count($temp_mgroups) ) + { + foreach( $temp_mgroups as $other_mgroup ) + { + $mgroup_perms[] = $this->ipsclass->cache['group_cache'][ $other_mgroup ]['g_perm_id']; + } + } + + if( count($mgroup_perms) ) + { + $mgroup_others = ",".implode( ",", $mgroup_perms ).","; + } + } + + $perm_id = ( $t['org_perm_id'] ) ? $t['org_perm_id'] : $this->ipsclass->cache['group_cache'][ $t['mgroup'] ]['g_perm_id'].$mgroup_others; + + if ( $this->ipsclass->forums->forum_by_id[ $t['forum_id'] ]['read_perms'] != '*' ) + { + if ( ! preg_match("/(^|,)".str_replace( ",", '|', $perm_id )."(,|$)/", $this->ipsclass->forums->forum_by_id[ $t['forum_id'] ]['read_perms'] ) ) + { + continue; + } + } + + //----------------------------------------- + // Test for approved/approve perms + //----------------------------------------- + + if( $t['approved'] == 0 ) + { + $mod = 0; + + if( $this->ipsclass->cache['group_cache'][$t['mgroup']]['g_is_supmod'] == 1 ) + { + $mod = 1; + } + else if ( count($this->ipsclass->cache['moderators']) ) + { + $other_mgroups = array(); + + if( $t['mgroup_others'] ) + { + $other_mgroups = explode( ",", $this->ipsclass->clean_perm_string( $t['mgroup_others'] ) ); + } + + foreach( $this->ipsclass->cache['moderators'] as $moderators ) + { + if ( $moderators['member_id'] == $t['id'] or $moderators['group_id'] == $t['mgroup'] ) + { + $mod = 1; + } + else if( count($other_mgroups) AND in_array( $moderators['group_id'], $other_mgroups ) ) + { + $mod = 1; + } + } + } + + if( $mod == 0 ) + { + continue; + } + } + $main_output = ""; $others_posted = 0; if ( ! $cached[ $t['tid'] ] ) { $topic_title = $t['title']; - $forum_name = $this->ipsclass->cache['forum_cache'][ $t['forum_id'] ]['name']; + $forum_name = $this->ipsclass->forums->forum_by_id[ $t['forum_id'] ]['name']; //----------------------------------------- // Get posts... @@ -282,12 +353,50 @@ class func_digest while( $t = $this->ipsclass->DB->fetch_row( $forum_query ) ) { + //----------------------------------------- + // Test for group permissions + //----------------------------------------- + + $mgroup_others = ""; + $temp_mgroups = array(); + $mgroup_perms = array(); + + if( $t['mgroup_others'] ) + { + $t['mgroup_others'] = $this->ipsclass->clean_perm_string( $t['mgroup_others'] ); + $temp_mgroups = explode( ",", $t['mgroup_others'] ); + + if( count($temp_mgroups) ) + { + foreach( $temp_mgroups as $other_mgroup ) + { + $mgroup_perms[] = $this->ipsclass->cache['group_cache'][ $other_mgroup ]['g_perm_id']; + } + } + + if( count($mgroup_perms) ) + { + $mgroup_others = ",".implode( ",", $mgroup_perms ).","; + } + } + + $perm_id = ( $t['org_perm_id'] ) ? $t['org_perm_id'] : $this->ipsclass->cache['group_cache'][ $t['mgroup'] ]['g_perm_id'].$mgroup_others; + + if ( $this->ipsclass->forums->forum_by_id[ $t['forum_id'] ]['read_perms'] != '*' ) + { + if ( ! preg_match("/(^|,)".str_replace( ",", '|', $perm_id )."(,|$)/", $this->ipsclass->forums->forum_by_id[ $t['forum_id'] ]['read_perms'] ) ) + { + continue; + } + } + + $main_output = ""; $others_posted = 0; if ( !isset($cached[ $t['forum_id'] ]) OR !$cached[ $t['forum_id'] ] ) { - $forum_name = $this->ipsclass->cache['forum_cache'][ $t['forum_id'] ]['name']; + $forum_name = $this->ipsclass->forums->forum_by_id[ $t['forum_id'] ]['name']; //----------------------------------------- // Get topics... @@ -303,6 +412,46 @@ class func_digest while( $p = $this->ipsclass->DB->fetch_row( $topic_query ) ) { + //----------------------------------------- + // Test for approved/approve perms + //----------------------------------------- + + if( $p['approved'] == 0 ) + { + $mod = 0; + + if( $this->ipsclass->cache['group_cache'][$t['mgroup']]['g_is_supmod'] == 1 ) + { + $mod = 1; + } + else if ( count($this->ipsclass->cache['moderators']) ) + { + $other_mgroups = array(); + + if( $t['mgroup_others'] ) + { + $other_mgroups = explode( ",", $this->ipsclass->clean_perm_string( $t['mgroup_others'] ) ); + } + + foreach( $this->ipsclass->cache['moderators'] as $moderators ) + { + if ( $moderators['member_id'] == $t['id'] or $moderators['group_id'] == $t['mgroup'] ) + { + $mod = 1; + } + else if( count($other_mgroups) AND in_array( $moderators['group_id'], $other_mgroups ) ) + { + $mod = 1; + } + } + } + + if( $mod == 0 ) + { + continue; + } + } + $this->ipsclass->DB->cache_add_query( 'digest_get_forums_topics_posts', array( 'tid' => $p['tid'], ), 'sql_extra_queries' ); diff --git a/upload/sources/lib/func_mod.php b/upload/sources/lib/func_mod.php index 9ff1c153..17d79386 100644 --- a/upload/sources/lib/func_mod.php +++ b/upload/sources/lib/func_mod.php @@ -1,22 +1,15 @@ Moderator Core Functions @@ -30,12 +23,11 @@ +-------------------------------------------------------------------------- */ -if ( ! defined( 'IN_ACP' ) ) +if ( ! defined( 'IN_IPB' ) ) { - print "

    Неверный вход

    У Вас нет доступа к директиве этого файла. Если вы проводили обновления, убедитесь, что не забыли обновить 'admin.php'."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } - class func_mod { var $ipsclass; @@ -212,7 +204,7 @@ class func_mod $this->rebuild_topic($tid); } - $this->add_moderate_log("", "", "", $pid, "Удаленные сообщения с id ($pid)"); + $this->add_moderate_log("", "", "", $pid, "Deleted posts ($pid)"); return TRUE; } @@ -307,16 +299,16 @@ class func_mod $this->ipsclass->DB->force_data_type = array( 'starter_name' => 'string', 'last_poster_name' => 'string' ); - - $this->ipsclass->DB->do_update( 'topics', array( 'last_post' => $last_post['post_date'] ? $last_post['post_date'] : $first_post['post_date'], - 'last_poster_id' => $last_post['author_id'] ? $last_post['author_id'] : $first_post['author_id'], - 'last_poster_name' => $last_poster_name ? $last_poster_name : $first_poster_name, - 'topic_queuedposts' => $qpcount, - 'posts' => $pcount, - 'starter_id' => $first_post['author_id'], + + $this->ipsclass->DB->do_update( 'topics', array( 'last_post' => intval($last_post['post_date'] ? $last_post['post_date'] : $first_post['post_date']), + 'last_poster_id' => intval($last_post['author_id'] ? $last_post['author_id'] : ( $pcount > 0 ? 0 : $first_post['author_id'] )), + 'last_poster_name' => $last_poster_name ? $last_poster_name : ( $pcount > 0 ? $this->ipsclass->lang['global_guestname'] : $first_poster_name ), + 'topic_queuedposts' => intval($qpcount), + 'posts' => intval($pcount), + 'starter_id' => intval($first_post['author_id']), 'starter_name' => $first_poster_name, - 'start_date' => $first_post['post_date'], - 'topic_firstpost' => $first_post['pid'], + 'start_date' => intval($first_post['post_date']), + 'topic_firstpost' => intval($first_post['pid']), 'topic_hasattach' => intval($attach['count']) ), 'tid='.$tid ); @@ -335,7 +327,7 @@ class func_mod // the last post in a forum, best update that :D //----------------------------------------- - if ( ($this->ipsclass->forums->forums_by_id[ $last_post['forum_id'] ]['last_id'] == $tid) AND ($doforum == 1) ) + if ( ($this->ipsclass->forums->forum_by_id[ $last_post['forum_id'] ]['last_id'] == $tid) AND ($doforum == 1) ) { $tt = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'title, tid, last_post, last_poster_id, last_poster_name', 'from' => 'topics', @@ -346,10 +338,10 @@ class func_mod $dbs = array( 'last_title' => $tt['title'] ? $tt['title'] : "", - 'last_id' => $tt['tid'] ? $tt['tid'] : "", - 'last_post' => $tt['last_post'] ? $tt['last_post'] : "", + 'last_id' => $tt['tid'] ? $tt['tid'] : 0, + 'last_post' => $tt['last_post'] ? $tt['last_post'] : 0, 'last_poster_name' => $tt['last_poster_name'] ? $tt['last_poster_name'] : "", - 'last_poster_id' => $tt['last_poster_id'] ? $tt['last_poster_id'] : "", + 'last_poster_id' => $tt['last_poster_id'] ? $tt['last_poster_id'] : 0, ); $this->ipsclass->DB->force_data_type = array( 'last_poster_name' => 'string', @@ -357,14 +349,14 @@ class func_mod $this->ipsclass->DB->do_update( 'forums', $dbs, "id=".intval($this->forum['id']) ); - if ( $this->ipsclass->forums->forums_by_id[ $this->forum['id'] ]['newest_id'] == $tid ) + if ( $this->ipsclass->forums->forum_by_id[ $this->forum['id'] ]['newest_id'] == $tid ) { - $sort_key = $this->ipsclass->forums->forums_by_id[ $this->forum['id'] ]['sort_key']; + $sort_key = $this->ipsclass->forums->forum_by_id[ $this->forum['id'] ]['sort_key']; $tt = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'title, tid', 'from' => 'topics', 'where' => 'forum_id='.$this->forum['id'].' and approved=1', - 'order' => $sort_key.' desc', + 'order' => 'start_date desc', 'limit' => array( 0,1 ) ) ); @@ -972,7 +964,7 @@ class func_mod $newest_topic = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'title, tid', 'from' => 'topics', 'where' => 'forum_id='.$fid.' and approved=1', - 'order' => $sort_key.' desc', + 'order' => 'start_date desc', 'limit' => array( 0,1 ) ) ); @@ -1221,7 +1213,7 @@ class func_mod function sql_prune_create( $forum_id, $starter_id="", $topic_state="", $post_min="", $date_exp="", $ignore_pin="", $pergo=0, $limit=0 ) { - $this->ipsclass->DB->build_query( array( 'select' => 'tid', 'from' => 'topics', 'where' => 'approved=1 and forum_id='.intval($forum_id) ) ); + $this->ipsclass->DB->build_query( array( 'select' => 'tid', 'from' => 'topics', 'where' => 'forum_id='.intval($forum_id) ) ); $sql = $this->ipsclass->DB->cur_query; @@ -1331,9 +1323,9 @@ class func_mod 'ip_address' => $this->ipsclass->input['IP_ADDRESS'], 'http_referer'=> htmlspecialchars($this->ipsclass->my_getenv('HTTP_REFERER')), 'ctime' => time(), - 'topic_title' => $t_title, - 'action' => $mod_title, - 'query_string'=> htmlspecialchars($this->ipsclass->my_getenv('QUERY_STRING')), + 'topic_title' => substr( $t_title, 0, 255 ), + 'action' => substr( $mod_title, 0, 128 ), + 'query_string'=> substr( htmlspecialchars($this->ipsclass->my_getenv('QUERY_STRING')), 0, 255 ), ) ); return TRUE; } diff --git a/upload/sources/lib/func_msg.php b/upload/sources/lib/func_msg.php index 822dd5aa..4394ed68 100644 --- a/upload/sources/lib/func_msg.php +++ b/upload/sources/lib/func_msg.php @@ -1,1545 +1,1619 @@ - $Date: 2006-10-12 11:58:40 -0500 (Thu, 12 Oct 2006) $ -| > $Revision: 633 $ -| > $Author: bfarber $ -+--------------------------------------------------------------------------- -| -| > Msg Func module -| > Module written by Matt Mecham -| > Date started: 14th February 2002 -| -| > Module Version 1.0.0 -| > DBA Checked: Fri 21 May 2004 -+-------------------------------------------------------------------------- -*/ - - -if ( ! defined( 'IN_IPB' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - -class func_msg -{ - # Classes - var $ipsclass; - - # Others - var $postlib = ""; - var $class = ""; - var $output = ""; - var $can_upload = 0; - var $form_extra = ""; - var $hidden_field = ""; - var $redirect_url = ""; - var $redirect_lang= ""; - - var $jump_html = ""; - var $vid = ""; - - var $force_pm = 0; - - var $member = array(); - - function register_class( &$class ) - { - $this->class = &$class; - } - - /*-------------------------------------------------------------------------*/ - // Initiate - /*-------------------------------------------------------------------------*/ - - function init() - { - //----------------------------------------- - // Get post stuff - //----------------------------------------- - - require_once( ROOT_PATH.'sources/classes/post/class_post.php' ); - $this->postlib = new class_post(); - $this->postlib->ipsclass =& $this->ipsclass; - - $this->postlib->load_classes(); - - if ( $this->ipsclass->member['g_attach_max'] != -1 and $this->ipsclass->member['g_can_msg_attach'] ) - { - $this->can_upload = 1; - $this->form_extra = " enctype='multipart/form-data'"; - $this->hidden_field = ""; - } - - $this->postlib->can_upload = $this->can_upload; - } - - - /*-------------------------------------------------------------------------*/ - // Generate the UserCP menu - /*-------------------------------------------------------------------------*/ - - function ucp_generate_menu() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $menu_html = ""; - $component_html = ""; - $folder_links = ""; - - //----------------------------------------- - // Get all member info.. - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'generic_get_all_member', array( 'mid' => $this->ipsclass->member['id'] ) ); - $this->ipsclass->DB->cache_exec_query(); - - if ( ! $member = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->DB->do_insert( 'member_extra', array( 'id' => $this->ipsclass->member['id'] ) ); - } - else - { - $this->ipsclass->member = array_merge( $member, $this->ipsclass->member ); - } - - //----------------------------------------- - // Get enabled components - //----------------------------------------- - - if ( is_array( $this->ipsclass->cache['components'] ) and count( $this->ipsclass->cache['components'] ) ) - { - foreach( $this->ipsclass->cache['components'] as $data ) - { - $file = ROOT_PATH.'sources/components_ucp/'.$data['com_filename'].'.php'; - - if ( file_exists( $file ) ) - { - require_once( $file ); - $name = 'components_ucp_'.$data['com_filename']; - $tmp = new $name(); - $tmp->ipsclass =& $this->ipsclass; - - $component_html .= $tmp->ucp_build_menu(); - - unset($tmp); - } - } - } - - //----------------------------------------- - // Print the top button menu - //----------------------------------------- - - $menu_html = $this->ipsclass->compiled_templates['skin_msg']->Menu_bar( $component_html ); - - //----------------------------------------- - // Messenger - //----------------------------------------- - - if ( $this->ipsclass->member['g_use_pm'] ) - { - //----------------------------------------- - // Do a little set up, do a litle dance, get - // down tonight! *boogie* - //----------------------------------------- - - $this->jump_html = "\n\n"; - - return $menu_html; - } - - /*-------------------------------------------------------------------------*/ - // Send form stuff - /*-------------------------------------------------------------------------*/ - - function send_form($preview=0, $errors="") - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $_msg_id = 0; - - $this->form_mid = intval($this->ipsclass->input['MID']); - $this->form_orig_id = intval($this->ipsclass->input['MSID']); - - $_POST['Post-NS'] = isset($_POST['Post']) ? $_POST['Post'] : ''; - $_POST['Post'] = $this->ipsclass->remove_tags( $this->ipsclass->txt_raw2form( isset($_POST['Post']) ? $_POST['Post'] : '' ) ); - - //----------------------------------------- - // Fix up errors - //----------------------------------------- - - $errors = preg_replace( "/^
    /", "", $errors ); - - //----------------------------------------- - // Preview post? - //----------------------------------------- - - if ( $preview ) - { - $this->postlib->parser->parse_html = $this->ipsclass->vars['msg_allow_html']; - $this->postlib->parser->parse_nl2br = 1; - $this->postlib->parser->parse_smilies = 1; - $this->postlib->parser->parse_bbcode = $this->ipsclass->vars['msg_allow_code']; - - $old_msg = $this->postlib->han_editor->process_raw_post( 'Post-NS' ); - $old_msg = $this->postlib->parser->pre_display_parse( $this->postlib->parser->pre_db_parse( $old_msg ) ); - - $this->output .= $this->ipsclass->compiled_templates['skin_msg']->preview($old_msg); - } - - if ( $errors != "" OR $this->postlib->parser->error != "" ) - { - $errors = $errors ? $errors : $this->ipsclass->lang[$this->postlib->parser->error]; - - $this->output .= $this->ipsclass->compiled_templates['skin_msg']->pm_errors($errors); - $preview = 1; - } - - //----------------------------------------- - // Load the contacts - //----------------------------------------- - - $contacts = $this->build_contact_list(); - - $name_to_enter = ""; - $old_message = ""; - $old_title = ""; - - //----------------------------------------- - // Did we come from a button with a user ID? - //----------------------------------------- - - if ( $this->form_mid ) - { - $this->ipsclass->DB->simple_construct( array( 'select' => 'members_display_name, name, id', 'from' => 'members', 'where' => "id=".$this->form_mid ) ); - $this->ipsclass->DB->simple_exec(); - - $name = $this->ipsclass->DB->fetch_row(); - - if ($name['id']) - { - $name_to_enter = $name['members_display_name']; - } - } - else - { - $name_to_enter = isset($this->ipsclass->input['entered_name']) ? $this->ipsclass->input['entered_name'] : ''; - } - - //----------------------------------------- - // Are we quoting an old message? - //----------------------------------------- - - $footer_defaults = array( 'add_sent' => '', 'add_tracking' => '' ); - - if ( $preview or $this->class->show_form ) - { - $old_message = $_POST['Post-NS']; - $old_title = str_replace( "'", "'", str_replace( '"', '"', $this->ipsclass->txt_stripslashes($_POST['msg_title']) ) ); - - // If we preview and check these boxes, they should default to checked - $footer_defaults = array( - 'add_sent' => isset($this->ipsclass->input['add_sent']) AND $this->ipsclass->input['add_sent'] == 'yes' ? "checked='checked' " : "", - 'add_tracking' => isset($this->ipsclass->input['add_tracking']) AND $this->ipsclass->input['add_tracking'] == '1' ? "checked='checked' " : "", - ); - } - else if ( $this->form_orig_id ) - { - $this->ipsclass->DB->cache_add_query( 'msg_get_saved_msg', array( 'msgid' => $this->form_orig_id, 'mid' => $this->ipsclass->member['id'] ) ); - $this->ipsclass->DB->simple_exec(); - - $old_msg = $this->ipsclass->DB->fetch_row(); - - if( $old_msg['from_id'] ) - { - $name_to_enter = $old_msg['from_name']; - } - - if ( $old_msg['mt_title'] ) - { - if ( $this->class->edit_saved ) - { - $name_to_enter = $old_msg['members_display_name']; - $cc_text = $old_msg['msg_cc_users']; - $cc_hide = $old_msg['mt_hide_cc']; - $old_track = $old_msg['mt_tracking']; - $old_addsent = $old_msg['mt_addtosent']; - $old_title = $old_msg['mt_title']; - $old_message = $this->postlib->parser->bad_words( $this->ipsclass->my_br2nl( $old_msg['msg_post'] ) ); - $_msg_id = $old_msg['mt_msg_id']; - - if ( $this->postlib->han_editor->method == 'rte' ) - { - $_POST['tmp_for_msg_edit'] = $old_message; - - $old_message = $this->postlib->han_editor->process_raw_post( 'tmp_for_msg_edit' ); - $old_message = $this->postlib->parser->pre_display_parse( $this->postlib->parser->pre_db_parse( $old_message ) ); - - unset($_POST['tmp_for_msg_edit']); - } - - $this->class->post_key = $old_msg['msg_post_key']; - $this->ipsclass->input['OID'] = $old_msg['mt_id']; - } - else if ( isset($this->ipsclass->input['fwd']) AND $this->ipsclass->input['fwd'] == 1 ) - { - $old_title = "Fwd:".$old_msg['mt_title']; - $old_title = preg_replace( "/^(?:Fwd\:){1,}/i", "Fwd:", $old_title ); - $old_message = '[QUOTE]'.sprintf($this->ipsclass->lang['vm_forward_text'], $name['members_display_name'])."\n\n".$old_msg['msg_post'].'[/QUOTE]'."\n"; - $old_message = $this->postlib->parser->bad_words( $this->ipsclass->my_br2nl( $old_message ) ); - } - else - { - $old_title = "Re:".$old_msg['mt_title']; - $old_title = preg_replace( "/^(?:Re\:){1,}/i", "Re:", $old_title ); - $old_message = '[QUOTE]'.$old_msg['msg_post'].'[/QUOTE]'."\n"; - $old_message = $this->postlib->parser->bad_words( $this->ipsclass->my_br2nl( $old_message ) ); - } - } - - $footer_defaults = array( - 'add_sent' => isset($old_addsent) AND $old_addsent == '1' ? "checked='checked' " : "", - 'add_tracking' => isset($old_track) AND $old_track == '1' ? "checked='checked' " : "", - ); - } - - //----------------------------------------- - // PM returns - //----------------------------------------- - - if ( $this->postlib->han_editor->method == 'rte' AND $old_message AND $this->form_orig_id ) - { - $old_message = $this->ipsclass->my_nl2br( $old_message ); - } - - //----------------------------------------- - // Build up the HTML for the send form - //----------------------------------------- - - $this->output .= $this->ipsclass->compiled_templates['skin_msg']->Send_form( array ( - 'CONTACTS' => $contacts, - 'MEMBER' => $this->member, - 'N_ENTER' => $name_to_enter, - 'O_TITLE' => $old_title, - 'OID' => isset($this->ipsclass->input['OID']) ? $this->ipsclass->input['OID'] : 0, // Old unsent msg id for restoring saved msg - used to delete saved when sent - 'attach_post_key' => $this->class->post_key, - 'form_extra' => $this->form_extra, - 'upload' => $this->hidden_field, - - ) ); - - $this->ipsclass->lang['the_max_length'] = $this->ipsclass->vars['max_post_length'] * 1024; - - //----------------------------------------- - // Remove side panel - //----------------------------------------- - - $this->postlib->han_editor->remove_side_panel = 1; - - //----------------------------------------- - // Is this RTE? If so, convert BBCode - //----------------------------------------- - - if ( $this->postlib->han_editor->method == 'rte' AND $old_message ) - { - if ( $errors or $preview ) - { - $old_message = stripslashes( $old_message ); - } - - $old_message = $this->postlib->parser->convert_ipb_html_to_html( $old_message ); - } - else if ( $old_message ) - { - $old_message = $this->ipsclass->txt_stripslashes( $old_message ); - } - - $this->output .= $this->ipsclass->compiled_templates['skin_msg']->postbox_wrap( $this->postlib->han_editor->show_editor( $old_message, 'Post' ) ); - - //----------------------------------------- - // Show upload stuff? - //----------------------------------------- - - if ( $this->can_upload ) - { - $upload_field = $this->ipsclass->compiled_templates['skin_post']->Upload_field( $this->class->post_key, 'msg', $_msg_id ); - - $this->output = str_replace( '', $upload_field, $this->output ); - } - - $this->output .= $this->ipsclass->compiled_templates['skin_msg']->send_form_footer( $footer_defaults ); - - $this->class->page_title = $this->ipsclass->lang['t_welcome']; - $this->class->nav = array( "".$this->ipsclass->lang['t_title']."" ); - - //----------------------------------------- - // Do we have permission to mass PM peeps? - //----------------------------------------- - - $cc_box = ""; - $cc_formbox = ""; - - if ($this->ipsclass->member['g_max_mass_pm'] > 0) - { - $this->ipsclass->lang['carbon_copy_desc'] = sprintf( $this->ipsclass->lang['carbon_copy_desc'], $this->ipsclass->member['g_max_mass_pm'] ); - - if ( isset($_POST['carbon_copy']) or isset($cc_text) ) - { - $cc_text = isset($cc_text) ? $cc_text : $this->ipsclass->txt_htmlspecialchars($_POST['carbon_copy']); - - $cc_box = str_replace( "", "", $this->ipsclass->txt_stripslashes($cc_text) ); - } - - if ( ( isset($this->ipsclass->input['mt_hide_cc']) AND intval($this->ipsclass->input['mt_hide_cc']) == 1 ) or ( isset($cc_hide) AND $cc_hide == 1 ) ) - { - $cc_formbox = $cc_hide ? $cc_hide : intval($this->ipsclass->input['mt_hide_cc']); - - $cc_formbox = $cc_formbox == 1 ? "checked='checked' " : ""; - } - - $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_msg']->mass_pm_box($cc_box, $cc_formbox), $this->output ); - } - } - - /*-------------------------------------------------------------------------*/ - // Build contact listy poos - /*-------------------------------------------------------------------------*/ - - function build_contact_list() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $contacts = ""; - $from_contact = $this->ipsclass->input['from_contact'] ? intval($this->ipsclass->input['from_contact']) : intval($this->ipsclass->input['MID']); - $member_id = intval( $this->ipsclass->member['id'] ); - - //----------------------------------------- - // Get 'em. - //----------------------------------------- - - $this->ipsclass->DB->build_query( array( 'select' => 'pf.friends_friend_id, pf.friends_approved', - 'from' => array( 'profile_friends' => 'pf' ), - 'where' => 'pf.friends_member_id='.$member_id. ' AND pf.friends_approved=1', - 'order' => 'm.members_display_name ASC', - 'add_join' => array( 0 => array( 'select' => 'm.members_display_name', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.id=pf.friends_friend_id', - 'type' => 'left' ), - ) - ) ); - - $this->ipsclass->DB->exec_query(); - - if ( $this->ipsclass->DB->get_num_rows() ) - { - $contacts = "\n"; - } - else - { - $contacts = $this->ipsclass->lang['address_list_empty']; - } - - return $contacts; - } - - - //----------------------------------------- - // API for deleting messages - //----------------------------------------- - - function delete_messages($ids, $owner_id, $extra="") - { - //----------------------------------------- - // Basic WHERE - //----------------------------------------- - - if ( ! $extra ) - { - $extra = "mt_owner_id=$owner_id"; - } - - $id_string = ""; - - if ( is_array( $ids ) ) - { - if ( ! count($ids) ) - { - return; - } - - $id_string = 'IN ('.implode( ",", $ids ).')'; - } - else - { - if ( ! $ids ) - { - return; - } - - $id_string = '='.$ids; - } - - //----------------------------------------- - // Are these our messages? - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => 'mt_id, mt_msg_id, mt_read, mt_to_id', 'from' => 'message_topics', 'where' => "$extra AND mt_id $id_string" ) ); - $this->ipsclass->DB->simple_exec(); - - $final_ids = array(); - $final_mts = array(); - $unread = array(); - - while ( $i = $this->ipsclass->DB->fetch_row() ) - { - $final_ids[ $i['mt_id'] ] = $i['mt_msg_id']; - $final_mts[] = $i['mt_id']; - - if( $i['mt_read'] == 0 ) - { - $unread[ $i['mt_to_id'] ] = intval($unread[ $i['mt_to_id'] ]) + 1; - } - } - - //----------------------------------------- - // Delete MT topics - //----------------------------------------- - - if ( count($final_mts) ) - { - $this->ipsclass->DB->simple_construct( array( 'delete' => 'message_topics', 'where' => "mt_id IN (".implode( ',',$final_mts ).")" ) ); - $this->ipsclass->DB->simple_exec(); - } - - //----------------------------------------- - // Update delete count - //----------------------------------------- - - if ( count($final_ids) ) - { - $this->ipsclass->DB->simple_construct( array( 'update' => 'message_text', 'set' => "msg_deleted_count=msg_deleted_count+1", 'where' => "msg_id IN (".implode( ',',$final_ids ).")" ) ); - $this->ipsclass->DB->simple_exec(); - } - - //----------------------------------------- - // Update new PM notifications - //----------------------------------------- - - if ( count($unread) ) - { - foreach( $unread as $mid => $cnt ) - { - $this->ipsclass->DB->simple_construct( array( 'update' => 'members', 'set' => "new_msg=new_msg-{$cnt}, show_popup=0", 'where' => "id={$mid}" ) ); - $this->ipsclass->DB->simple_exec(); - } - } - - //----------------------------------------- - // Run through and delete dead msgs - //----------------------------------------- - - $deleted_ids = array(); - $attach_ids = array(); - - $this->ipsclass->DB->simple_construct( array( 'select' => 'msg_id', 'from' => 'message_text', 'where' => 'msg_deleted_count >= msg_sent_to_count' ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $r = $this->ipsclass->DB->fetch_row() ) - { - $deleted_ids[] = $r['msg_id']; - } - - if ( count($deleted_ids) ) - { - $this->ipsclass->DB->simple_construct( array( 'delete' => 'message_text', 'where' => "msg_id IN (".implode( ',',$deleted_ids ).")") ); - $this->ipsclass->DB->simple_exec(); - - $this->ipsclass->DB->simple_construct( array( 'select' => '*', - 'from' => 'attachments', - 'where' => "attach_rel_module='msg' AND attach_rel_id IN (".implode( ',',$deleted_ids ).")") ); - $this->ipsclass->DB->simple_exec(); - - while ( $a = $this->ipsclass->DB->fetch_row() ) - { - $attach_ids[] = $a['attach_id']; - - if ( $a['attach_location'] ) - { - @unlink( $this->ipsclass->vars['upload_dir']."/".$a['attach_location'] ); - } - if ( $a['attach_thumb_location'] ) - { - @unlink( $this->ipsclass->vars['upload_dir']."/".$a['attach_thumb_location'] ); - } - } - - if ( count($attach_ids) ) - { - $this->ipsclass->DB->simple_construct( array( 'delete' => 'attachments', 'where' => "attach_id IN (".implode( ',',$attach_ids ).")") ); - $this->ipsclass->DB->simple_exec(); - } - } - } - - /*-------------------------------------------------------------------------*/ - // Send form stuff - /*-------------------------------------------------------------------------*/ - - function send_pm( $opts=array() ) - { - //----------------------------------------- - // INIT some vars - //----------------------------------------- - - if ( ! $this->to and $this->to_by_id ) - { - //----------------------------------------- - // Just an id... - //----------------------------------------- - - $tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'name, members_display_name', 'from' => 'members', 'where' => 'id='.$this->to_by_id ) ); - - $this->to = $tmp['members_display_name']; - } - - $this->to = strtolower(str_replace( '|', '|', $this->to) ); - - $this->ipsclass->DB->cache_add_query( 'msg_get_cc_users', array( 'name_array' => array( 0 => "'".$this->to."'" ) ) ); - $this->ipsclass->DB->simple_exec(); - - if ( ! $this->send_to_member = $this->ipsclass->DB->fetch_row() ) - { - $this->error = $this->ipsclass->lang['err_no_such_member']; - return; - } - - $this->error = ""; - $this->save_only = $opts['save_only']; - $this->orig_id = $opts['orig_id']; - $this->preview = $opts['preview']; - $this->add_tracking = $opts['track']; - $this->add_sent = $opts['add_sent']; - $this->hide_cc = $opts['hide_cc']; - - $testing_parse = $this->postlib->parser->pre_db_parse( $this->msg_post ); - - if( $this->postlib->parser->error != "" ) - { - $this->error = $this->ipsclass->lang[$this->postlib->parser->error]; - return; - } - - unset($testing_parse); - - //----------------------------------------- - // Are we simply saving this for later? - //----------------------------------------- - - $this->_process_save_only(); - - if ( $this->redirect_url ) - { - return; - } - - if ( $this->force_pm != 1 ) - { - //----------------------------------------- - // Can the reciepient use the PM system? - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'msg_get_msg_poster', array( 'mid' => $this->send_to_member['id'] ) ); - $this->ipsclass->DB->simple_exec(); - - $to_msg_stats = $this->ipsclass->DB->fetch_row(); - - // Are they in a secondary group that can use pm? - - if ( $to_msg_stats['mgroup_others'] && ! $to_msg_stats['g_use_pm'] ) - { - $groups_id = explode( ',', $to_msg_stats['mgroup_others'] ); - - if ( count( $groups_id ) ) - { - foreach( $groups_id as $pid ) - { - if ( ! $this->ipsclass->cache['group_cache'][ $pid ]['g_id'] ) - { - continue; - } - - if ( $this->ipsclass->cache['group_cache'][ $pid ]['g_use_pm'] ) - { - $to_msg_stats['g_use_pm'] = 1; - break; - } - } - } - } - - if ( $to_msg_stats['g_use_pm'] != 1 OR $to_msg_stats['members_disable_pm'] ) - { - $this->ipsclass->input['MID'] = $this->send_to_member['id']; - $this->error = $this->ipsclass->lang['no_usepm_member']; - return; - } - - //----------------------------------------- - // Does the target member have enough room - // in their inbox for a new message? - //----------------------------------------- - - $to_msg_stats = $this->_get_real_allowance( $to_msg_stats ); - - if ( (($to_msg_stats['msg_total']) >= $to_msg_stats['g_max_messages']) and ($to_msg_stats['g_max_messages'] > 0) ) - { - if ( $this->ipsclass->vars['override_inbox_full'] ) - { - $override = array(); - $override = explode( ",", $this->ipsclass->vars['override_inbox_full'] ); - - $do_override = 0; - - $my_groups = array( $this->ipsclass->member['mgroup'] ); - - if( $this->ipsclass->member['mgroup_others'] ) - { - $my_other_groups = explode( ",", $this->ipsclass->member['mgroup_others'] ); - $my_groups = array_merge( $my_groups, $my_other_groups ); - } - - foreach( $my_groups as $member_group ) - { - if( in_array( $member_group, $override ) ) - { - $do_override = 1; - } - } - - if ( $do_override == 0 ) - { - $this->error = $this->ipsclass->lang['no_usepm_member_full']; - return; - } - } - else - { - $this->error = $this->ipsclass->lang['no_usepm_member_full']; - return; - } - } - - //----------------------------------------- - // Has the reciepient blocked us? - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => 'contact_id, allow_msg', 'from' => 'contacts', 'where' => "contact_id=".$this->from_member['id']." AND member_id=".$this->send_to_member['id'] ) ); - $this->ipsclass->DB->simple_exec(); - - $can_msg = $this->ipsclass->DB->fetch_row(); - - if ( (isset($can_msg['contact_id'])) and ($can_msg['allow_msg'] != 1) ) - { - if( $this->ipsclass->vars['unblockable_pm_groups'] ) - { - $unblockable = array(); - $unblockable = explode( ",", $this->ipsclass->vars['unblockable_pm_groups'] ); - - $do_override = 0; - - $my_groups = array( $this->ipsclass->member['mgroup'] ); - - if( $this->ipsclass->member['mgroup_others'] ) - { - $my_other_groups = explode( ",", $this->ipsclass->member['mgroup_others'] ); - $my_groups = array_merge( $my_groups, $my_other_groups ); - } - - foreach( $my_groups as $member_group ) - { - if( in_array( $member_group, $unblockable ) ) - { - $do_override = 1; - } - } - - if ( $do_override == 0 ) - { - $this->ipsclass->input['MID'] = $this->send_to_member['id']; - $this->error = $this->ipsclass->lang['msg_blocked']; - return; - } - } - else - { - $this->ipsclass->input['MID'] = $this->send_to_member['id']; - $this->error = $this->ipsclass->lang['msg_blocked']; - return; - } - } - - //----------------------------------------- - // Do we have enough room to store a - // saved copy? - //----------------------------------------- - - if (isset($this->ipsclass->input['add_sent']) AND $this->ipsclass->input['add_sent'] AND ($this->ipsclass->member['g_max_messages'] > 0) ) - { - if ( ($this->ipsclass->member['msg_total'] + 1) >= $this->ipsclass->member['g_max_messages'] ) - { - $this->error = $this->ipsclass->lang['max_message_from']; - return; - } - } - } - - //----------------------------------------- - // CC PM stuff - //----------------------------------------- - - $this->can_mass_pm = 0; - - if ( $this->ipsclass->member['g_max_mass_pm'] > 0 or $this->force_pm ) - { - $cc_array = $this->_process_cc(); - } - - if ( $this->error != "" ) - { - return; - } - - //----------------------------------------- - // Add our original ID - //----------------------------------------- - - $cc_array[ $this->send_to_member['id'] ] = $this->send_to_member; - - unset($to_member); - - //----------------------------------------- - // Insert the message body - //----------------------------------------- - - $count = count( $cc_array ); - - if ( $this->add_sent ) - { - // we're storing a copy locally, so - // add 1 to the "sent_to_count" - - $count++; - } - - $this->ipsclass->DB->do_insert( 'message_text', array( - 'msg_date' => time(), - 'msg_post' => $this->ipsclass->remove_tags($this->msg_post), - 'msg_cc_users' => $this->cc_users, - 'msg_sent_to_count' => $count, - 'msg_post_key' => $this->class->post_key, - 'msg_author_id' => $this->from_member['id'], - 'msg_ip_address' => $this->ipsclass->ip_address - ) ); - - - $msg_id = $this->ipsclass->DB->get_insert_id(); - - //----------------------------------------- - // Make attachments permanent - //----------------------------------------- - - $no_attachments = $this->postlib->pf_make_attachments_permanent( $this->class->post_key, $msg_id, 'msg' ); - - //----------------------------------------- - // If we have an original ID - delete it and 'move' - // attachments - //----------------------------------------- - - if ( $this->orig_id ) - { - $this->ipsclass->DB->cache_add_query( 'msg_get_saved_msg', array( 'mid' => $this->from_member['id'], 'msgid' => $this->orig_id ) ); - $this->ipsclass->DB->simple_exec(); - - if( $old = $this->ipsclass->DB->fetch_row() ) - { - //----------------------------------------- - // Update attachments - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'update' => 'attachments', 'set' => "attach_post_key='{$this->class->post_key}', attach_rel_id=$msg_id", 'where' => "attach_rel_id={$old['msg_id']} AND attach_rel_module='msg'" ) ); - $this->ipsclass->DB->simple_exec(); - - $this->ipsclass->DB->simple_construct( array( 'delete' => 'message_topics', 'where' => "mt_id={$old['mt_id']}" ) ); - $this->ipsclass->DB->simple_exec(); - - $this->ipsclass->DB->simple_construct( array ( 'update' => 'message_text', 'set' => 'msg_deleted_count=msg_deleted_count-1', 'where' => "msg_id={$old['msg_id']}" ) ); - $this->ipsclass->DB->simple_exec(); - - $no_attachments = $old['mt_hasattach']; - } - } - - //----------------------------------------- - // loop.... - //----------------------------------------- - - foreach ($cc_array as $to_member) - { - //----------------------------------------- - // Sort out tracking and pop us status - //----------------------------------------- - - $show_popup = $to_member['view_pop']; - - //----------------------------------------- - // Enter the info into the DB - // Target user side. - //----------------------------------------- - - $this->ipsclass->DB->force_data_type = array( 'mt_title' => 'string' ); - - $this->ipsclass->DB->do_insert( 'message_topics', array( - 'mt_msg_id' => $msg_id, - 'mt_date' => time(), - 'mt_title' => $this->msg_title, - 'mt_from_id' => $this->from_member['id'], - 'mt_to_id' => $to_member['id'], - 'mt_vid_folder' => 'in', - 'mt_tracking' => intval( $this->add_tracking ), - 'mt_addtosent' => intval( $this->add_sent ), - 'mt_hasattach' => intval($no_attachments), - 'mt_owner_id' => $to_member['id'], - 'mt_hide_cc' => intval( $this->hide_cc ), - ) ); - - - $mt_id = $this->ipsclass->DB->get_insert_id(); - - //----------------------------------------- - // Update profile - //----------------------------------------- - - $inbox_count = $this->_get_dir_count( $to_member['vdirs'], 'in' ); - - $new_vdir = $this->rebuild_dir_count( $to_member['id'], - "", - 'in', - $inbox_count + 1, - 'save', - "msg_total=msg_total+1,new_msg=new_msg+1,show_popup={$show_popup}" - ); - - //----------------------------------------- - // Has this member requested a PM email nofity? - //----------------------------------------- - - if ($to_member['email_pm'] == 1) - { - $to_member['language'] = $to_member['language'] == "" ? 'ru' : $to_member['language']; - - $this->postlib->email->get_template("pm_notify", $to_member['language']); - - $this->postlib->email->build_message( array( - 'NAME' => $to_member['members_display_name'], - 'POSTER' => $this->from_member['members_display_name'], - 'TITLE' => $this->msg_title, - 'LINK' => "?act=Msg&CODE=03&VID=in&MSID=$mt_id", - ) ); - - $this->ipsclass->DB->do_insert( 'mail_queue', array( 'mail_to' => $to_member['email'], 'mail_date' => time(), 'mail_subject' => $this->ipsclass->lang['pm_email_subject'], 'mail_content' => $this->postlib->email->message ) ); - - $this->ipsclass->cache['systemvars']['mail_queue'] += $count; - $this->ipsclass->update_cache( array( 'array' => 1, 'name' => 'systemvars', 'donow' => 1, 'deletefirst' => 0 ) ); - } - } - - //----------------------------------------- - // Add the data to the current members DB if we are - // adding it to our "sent items" folder - //----------------------------------------- - - if ( $this->add_sent ) - { - $sent_count = $this->_get_dir_count( $this->from_member['vdirs'], 'sent' ); - - $this->rebuild_dir_count( $this->from_member['id'], - "", - 'sent', - $sent_count + 1, - 'save', - "msg_total=msg_total+1" - ); - - $this->ipsclass->DB->do_insert( 'message_topics', array( - 'mt_msg_id' => $msg_id, - 'mt_date' => time(), - 'mt_title' => $this->msg_title, - 'mt_from_id' => $this->from_member['id'], - 'mt_to_id' => $this->send_to_member['id'], - 'mt_vid_folder' => 'sent', - 'mt_tracking' => 0, - 'mt_addtosent' => 0, - 'mt_hasattach' => intval($no_attachments), - 'mt_owner_id' => $this->from_member['id'], - 'mt_hide_cc' => $this->hide_cc, - ) ); - - } - - $this->to_by_id = ""; - $this->to = ""; - - #unset($this->postlib); - } - - - /*-------------------------------------------------------------------------*/ - // Rebuild DIR count - /*-------------------------------------------------------------------------*/ - - function rebuild_dir_count($mid, $vdir, $cur_dir, $new_count, $nosave='save', $extra="") - { - $rebuild = array(); - - if ( ! $vdir ) - { - $this->ipsclass->DB->simple_construct( array( "select" => 'vdirs', 'from' => 'member_extra', 'where' => 'id='.$mid ) ); - $this->ipsclass->DB->simple_exec(); - - $mem = $this->ipsclass->DB->fetch_row(); - - $vdir = $mem['vdirs'] ? $mem['vdirs'] : 'in:Входящие;0|sent:Отправленные;0'; - } - - foreach( explode( "|", $vdir ) as $dir ) - { - list ($id , $data) = explode( ":", $dir ); - list ($real, $count) = explode( ";", $data ); - - if ( ! $id ) - { - continue; - } - - if ( $id == $cur_dir ) - { - $count = $new_count; - $count = $count < 1 ? 0 : $count; - } - - $rebuild[$id] = $id.':'.$real.';'.intval($count); - } - - $final = implode( '|', $rebuild ); - - if ( $nosave != 'nosave' ) - { - $this->ipsclass->DB->simple_construct( array( 'update' => 'member_extra', 'set' => "vdirs='".$final."'", 'where' => 'id='.$mid ) ); - $this->ipsclass->DB->simple_exec(); - - if ( $extra ) - { - $this->ipsclass->DB->simple_construct( array( 'update' => 'members', 'set' => $extra, 'where' => 'id='.$mid ) ); - $this->ipsclass->DB->simple_exec(); - } - } - - return $final; - } - - - /*-------------------------------------------------------------------------*/ - // POST PROCESS CC - /*-------------------------------------------------------------------------*/ - - function format_cc_string($cc_users, $mid ) - { - $cc_array = array(); - $final = array(); - - $cc_array = $this->get_cc_array( $cc_users ); - - foreach( $cc_array as $id => $data ) - { - if ( $id == $mid ) - { - continue; - } - - $final[] = $this->ipsclass->make_profile_link( $data['members_display_name'], $data['id'] ); - } - - return implode( ", ", $final ); - - } - - /*-------------------------------------------------------------------------*/ - // PROCESS CC - /*-------------------------------------------------------------------------*/ - - function get_cc_array($cc_users) - { - $cc_array = array(); - - $cc_users = strtolower(str_replace( '|', '|', $cc_users) ); - - if ( $cc_users ) - { - //----------------------------------------- - // Sort out the array - //----------------------------------------- - - $cc_users = str_replace( "
    ", "
    ", $cc_users ); - $cc_users = str_replace( "

    ", "
    " , trim($cc_users) ); - $cc_users = preg_replace( "/^(
    ){1}/", "" , $cc_users ); - $cc_users = preg_replace( "/(
    ){1}$/", "" , $cc_users ); - $cc_users = preg_replace( "/
    \s+/", "," , $cc_users ); - - $temp_array = explode( "
    ", $cc_users ); - - //----------------------------------------- - // Make SQL'able - //----------------------------------------- - - if ( is_array($temp_array) and count($temp_array) > 0 ) - { - $new_array = array(); - - foreach( $temp_array as $name ) - { - $name = "'".trim(strtolower($name))."'"; - - if (in_array( $name, $new_array ) ) - { - continue; - } - - $new_array[] = $name; - } - } - - //----------------------------------------- - // SQL it - //----------------------------------------- - - if ( is_array($new_array) and count($new_array) > 0 ) - { - $array_count = count($new_array); - - $this->ipsclass->DB->cache_add_query( 'msg_get_cc_users', array( 'name_array' => $new_array ) ); - $this->ipsclass->DB->simple_exec(); - - while( $r = $this->ipsclass->DB->fetch_row() ) - { - $cc_array[$r['id']] = $r; - } - } - } - - return $cc_array; - } - - - /*-------------------------------------------------------------------------*/ - // PROCESS CC - /*-------------------------------------------------------------------------*/ - - function _process_cc() - { - $this->can_mass_pm = 1; - $cc_array = array(); - - $this->cc_users = strtolower(str_replace( '|', '|', $this->cc_users) ); - - if (isset($this->cc_users) and $this->cc_users != "") - { - //----------------------------------------- - // Sort out the array - //----------------------------------------- - - $this->cc_users = str_replace( "
    ", "
    " , trim($this->cc_users) ); - $this->cc_users = str_replace( "

    ", "
    " , trim($this->cc_users) ); - $this->cc_users = preg_replace( "#^(
    ){1}#", "" , $this->cc_users ); - $this->cc_users = preg_replace( "#(
    ){1}$#", "" , $this->cc_users ); - $this->cc_users = preg_replace( "#
    \s+#", "," , $this->cc_users ); - - $temp_array = explode( "
    ", $this->cc_users ); - - //----------------------------------------- - // Make SQL'able - //----------------------------------------- - - if ( is_array($temp_array) and count($temp_array) > 0 ) - { - $new_array = array(); - - foreach( $temp_array as $name ) - { - $name = "'".trim(strtolower($name))."'"; - - if (in_array( $name, $new_array ) ) - { - continue; - } - - $new_array[] = $name; - } - } - - //----------------------------------------- - // SQL it - //----------------------------------------- - - if ( is_array($new_array) and count($new_array) > 0 ) - { - $array_count = count($new_array); - - $this->ipsclass->DB->cache_add_query( 'msg_get_cc_users', array( 'name_array' => $new_array ) ); - $this->ipsclass->DB->simple_exec(); - - if ( ! $this->ipsclass->DB->get_num_rows() ) - { - $this->error = $this->ipsclass->lang['pme_no_cc_user']; - return; - } - else - { - while( $r = $this->ipsclass->DB->fetch_row() ) - { - $cc_array[$r['id']] = $r; - } - - //----------------------------------------- - - if ( $this->force_pm != 1 ) - { - if ( count($cc_array) > $this->ipsclass->member['g_max_mass_pm']) - { - $this->ipsclass->input['MID'] = $this->send_to_member['id']; - $this->error = $this->ipsclass->lang['pme_too_many']; - return; - } - } - - //----------------------------------------- - // Names exist? - //----------------------------------------- - - $cc_error = ""; - - if ( count($cc_array) != $array_count ) - { - foreach( $new_array as $n ) - { - $seen = 0; - - foreach( $cc_array as $cc_user ) - { - $tmp = "'".strtolower($cc_user['members_display_name'])."'"; - - if ($tmp == $n) - { - $seen = 1; - } - } - - if ($seen != 1) - { - $cc_error .= "
    ".sprintf( $this->ipsclass->lang['pme_failed_nomem'], $n, $n ); - } - } - } - - if ($cc_error != "") - { - $this->ipsclass->input['MID'] = $this->send_to_member['id']; - $this->error = $cc_error; - return; - } - - //----------------------------------------- - // Can use PM system? - //----------------------------------------- - - $cc_error = ""; - $cc_id_array = array(); - - foreach($cc_array as $cc_user) - { - if ( $cc_user['g_use_pm'] != 1 OR $cc_user['members_disable_pm'] ) - { - $cc_error .= "
    ".sprintf( $this->ipsclass->lang['pme_failed_nopm'], $cc_user['members_display_name'], $cc_user['members_display_name'] ); - } - - $cc_user = $this->_get_real_allowance($cc_user); - - if ($cc_user['g_max_messages'] > 0 and ($cc_user['msg_total'] + 1 > $cc_user['g_max_messages']) ) - { - $cc_error .= "
    ".sprintf( $this->ipsclass->lang['pme_failed_maxed'], $cc_user['members_display_name'], $cc_user['members_display_name'] ); - } - - $cc_id_array[] = $cc_user['id']; - } - - if ( $this->force_pm != 1 ) - { - if ($cc_error != "") - { - $this->ipsclass->input['MID'] = $this->send_to_member['id']; - $this->error = $cc_error; - return; - } - } - - //----------------------------------------- - // Check the block list.. - //----------------------------------------- - - $this->ipsclass->DB->cache_add_query( 'msg_get_cc_blocked', array( 'mid' => $this->from_member['id'], 'cc_array' => $cc_id_array ) ); - $this->ipsclass->DB->simple_exec(); - - while ( $c = $this->ipsclass->DB->fetch_row() ) - { - if ($c['allow_msg'] != 1) - { - $cc_error .= "
    ".sprintf( $this->ipsclass->lang['pme_failed_block'], $c['name'], $c['name'] ); - } - } - - if ( $this->force_pm != 1 ) - { - if ($cc_error != "") - { - $this->ipsclass->input['MID'] = $this->send_to_member['id']; - $this->error = $cc_error; - return; - } - } - } - } - } - - return $cc_array; - } - - /*-------------------------------------------------------------------------*/ - // SAVE stuff - /*-------------------------------------------------------------------------*/ - - function _process_save_only() - { - if ( $this->save_only ) - { - - $raw = array( - 'msg_date' => time(), - 'msg_post' => $this->ipsclass->remove_tags($this->msg_post), - 'msg_cc_users' => $this->cc_users, - 'msg_sent_to_count' => 1, - 'msg_post_key' => $this->class->post_key, - 'msg_author_id' => $this->from_member['id'] - ); - - $saved = 0; - - if ( $this->orig_id ) - { - //----------------------------------------- - // We have an OID which means that this message - // is already from the unsent folder, lets check that - // and if true, update rather than create a new unsent - // row - //----------------------------------------- - - $this->ipsclass->DB->simple_construct( array( 'select' => 'mt_id, mt_msg_id', 'from' => 'message_topics', 'where' => "mt_id=".$this->orig_id." AND mt_owner_id=".$this->from_member['id']." AND mt_vid_folder='unsent'" ) ); - $this->ipsclass->DB->simple_exec(); - - if ( $omsg = $this->ipsclass->DB->fetch_row() ) - { - $saved = 1; - - $this->ipsclass->DB->do_update( 'message_text', $raw, "msg_id=".$omsg['mt_msg_id'] ); - - //----------------------------------------- - // Make attachments permanent - //----------------------------------------- - - $no_attachments = $this->postlib->pf_make_attachments_permanent( $this->class->post_key, "", "", $omsg['mt_msg_id'] ); - - $this->ipsclass->DB->simple_construct( array( 'update' => 'message_topics', 'set' => "mt_hasattach=$no_attachments, mt_date=".time(), 'where' => 'mt_owner_id='.$this->ipsclass->member['id'].' AND mt_id='.$omsg['mt_id'] ) ); - $this->ipsclass->DB->simple_exec(); - } - } - - if ($saved == 0) - { - $this->ipsclass->DB->do_insert( 'message_text', $raw); - - $msg_id = $this->ipsclass->DB->get_insert_id(); - - //----------------------------------------- - // Make attachments permanent - //----------------------------------------- - - $no_attachments = $this->postlib->pf_make_attachments_permanent( $this->class->post_key, "", "", $msg_id ); - - $this->ipsclass->DB->do_insert( 'message_topics', array( - 'mt_msg_id' => $msg_id, - 'mt_date' => time(), - 'mt_title' => $this->msg_title, - 'mt_from_id' => $this->from_member['id'], - 'mt_to_id' => $this->send_to_member['id'], - 'mt_vid_folder' => 'unsent', - 'mt_hide_cc' => intval($this->ipsclass->input['mt_hide_cc']), - 'mt_tracking' => intval($this->ipsclass->input['add_tracking']), - 'mt_addtosent' => $this->ipsclass->input['add_sent'] == 'yes' ? 1 : 0, - 'mt_hasattach' => intval($no_attachments), - 'mt_owner_id' => $this->from_member['id'], - ) ); - } - - $this->redirect_url = "&act=Msg&CODE=01"; - $this->redirect_lang = $this->ipsclass->lang['pms_redirect']; - } - } - - /*-------------------------------------------------------------------------*/ - // Return count of current VDIR (quickly) - /*-------------------------------------------------------------------------*/ - - function _get_dir_count( $vdir, $vid ) - { - preg_match( "#(?:^|\|)$vid:.+?;(\d+)(?:\||$)#i", $vdir, $match ); - - return intval($match[1]); - } - - /*-------------------------------------------------------------------------*/ - // Get real allowance based on multi-groups - /*-------------------------------------------------------------------------*/ - - function _get_real_allowance( $member ) - { - $groups_id = explode( ',', $member['mgroup_others'] ); - - if ( count( $groups_id ) ) - { - foreach( $groups_id as $pid ) - { - if ( !isset($this->ipsclass->cache['group_cache'][ $pid ]['g_id']) OR !$this->ipsclass->cache['group_cache'][ $pid ]['g_id'] ) - { - continue; - } - - if ( $this->ipsclass->cache['group_cache'][ $pid ]['g_max_messages'] > $member['g_max_messages'] ) - { - $member['g_max_messages'] = $this->ipsclass->cache['group_cache'][ $pid ]['g_max_messages']; - } - } - } - - return $member; - } - - -} - + $Date: 2008-03-28 18:08:02 -0400 (Fri, 28 Mar 2008) $ +| > $Revision: 1232 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > Msg Func module +| > Module written by Matt Mecham +| > Date started: 14th February 2002 +| +| > Module Version 1.0.0 +| > DBA Checked: Fri 21 May 2004 ++-------------------------------------------------------------------------- +*/ + + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class func_msg +{ + # Classes + var $ipsclass; + + # Others + var $postlib = ""; + var $class = ""; + var $output = ""; + var $can_upload = 0; + var $form_extra = ""; + var $hidden_field = ""; + var $redirect_url = ""; + var $redirect_lang= ""; + + var $jump_html = ""; + var $vid = ""; + + var $force_pm = 0; + + var $member = array(); + + function register_class( &$class ) + { + $this->class = &$class; + } + + /*-------------------------------------------------------------------------*/ + // Initiate + /*-------------------------------------------------------------------------*/ + + function init() + { + //----------------------------------------- + // Get post stuff + //----------------------------------------- + + require_once( ROOT_PATH.'sources/classes/post/class_post.php' ); + $this->postlib = new class_post(); + $this->postlib->ipsclass =& $this->ipsclass; + + $this->postlib->load_classes(); + + if ( $this->ipsclass->member['g_attach_max'] != -1 and $this->ipsclass->member['g_can_msg_attach'] ) + { + $this->can_upload = 1; + $this->form_extra = " enctype='multipart/form-data'"; + $this->hidden_field = ""; + } + + $this->postlib->can_upload = $this->can_upload; + } + + + /*-------------------------------------------------------------------------*/ + // Generate the UserCP menu + /*-------------------------------------------------------------------------*/ + + function ucp_generate_menu() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $menu_html = ""; + $component_html = ""; + $folder_links = ""; + + //----------------------------------------- + // Get all member info.. + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'generic_get_all_member', array( 'mid' => $this->ipsclass->member['id'] ) ); + $this->ipsclass->DB->cache_exec_query(); + + if ( ! $member = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->DB->do_insert( 'member_extra', array( 'id' => $this->ipsclass->member['id'] ) ); + } + else + { + $this->ipsclass->member = array_merge( $member, $this->ipsclass->member ); + } + + //----------------------------------------- + // Get enabled components + //----------------------------------------- + + if ( is_array( $this->ipsclass->cache['components'] ) and count( $this->ipsclass->cache['components'] ) ) + { + foreach( $this->ipsclass->cache['components'] as $data ) + { + $file = ROOT_PATH.'sources/components_ucp/'.$data['com_filename'].'.php'; + + if ( file_exists( $file ) ) + { + require_once( $file ); + $name = 'components_ucp_'.$data['com_filename']; + $tmp = new $name(); + $tmp->ipsclass =& $this->ipsclass; + + $component_html .= $tmp->ucp_build_menu(); + + unset($tmp); + } + } + } + + //----------------------------------------- + // Print the top button menu + //----------------------------------------- + + $menu_html = $this->ipsclass->compiled_templates['skin_msg']->Menu_bar( $component_html ); + + //----------------------------------------- + // Messenger + //----------------------------------------- + + if ( $this->ipsclass->member['g_use_pm'] ) + { + //----------------------------------------- + // Do a little set up, do a litle dance, get + // down tonight! *boogie* + //----------------------------------------- + + $this->jump_html = "\n\n"; + + return $menu_html; + } + + /*-------------------------------------------------------------------------*/ + // Send form stuff + /*-------------------------------------------------------------------------*/ + + function send_form($preview=0, $errors="") + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $_msg_id = 0; + + $this->form_mid = intval($this->ipsclass->input['MID']); + $this->form_orig_id = intval($this->ipsclass->input['MSID']); + + $_POST['Post-NS'] = isset($_POST['Post']) ? $_POST['Post'] : ''; + $_POST['Post'] = $this->ipsclass->remove_tags( $this->ipsclass->txt_raw2form( isset($_POST['Post']) ? $_POST['Post'] : '' ) ); + + //----------------------------------------- + // Fix up errors + //----------------------------------------- + + $errors = preg_replace( "/^
    /", "", $errors ); + + //----------------------------------------- + // Preview post? + //----------------------------------------- + + if ( $preview ) + { + $this->postlib->parser->parse_html = $this->ipsclass->vars['msg_allow_html']; + $this->postlib->parser->parse_nl2br = 1; + $this->postlib->parser->parse_smilies = 1; + $this->postlib->parser->parse_bbcode = $this->ipsclass->vars['msg_allow_code']; + + $this->ipsclass->vars['max_emos'] = 0; + + $old_msg = $this->postlib->han_editor->process_raw_post( 'Post-NS' ); + $old_msg = $this->postlib->parser->pre_display_parse( $this->postlib->parser->pre_db_parse( $old_msg ) ); + + $this->output .= $this->ipsclass->compiled_templates['skin_msg']->preview($old_msg); + } + + if ( $errors != "" OR $this->postlib->parser->error != "" ) + { + $errors = $errors ? $errors : $this->ipsclass->lang[$this->postlib->parser->error]; + + $this->output .= $this->ipsclass->compiled_templates['skin_msg']->pm_errors($errors); + $preview = 1; + } + + //----------------------------------------- + // Load the contacts + //----------------------------------------- + + $contacts = $this->build_contact_list(); + + $name_to_enter = ""; + $old_message = ""; + $old_title = ""; + + //----------------------------------------- + // Did we come from a button with a user ID? + //----------------------------------------- + + if ( $this->form_mid ) + { + $this->ipsclass->DB->simple_construct( array( 'select' => 'members_display_name, name, id', 'from' => 'members', 'where' => "id=".$this->form_mid ) ); + $this->ipsclass->DB->simple_exec(); + + $name = $this->ipsclass->DB->fetch_row(); + + if ( $name['id'] && !( isset($this->ipsclass->input['fwd']) AND $this->ipsclass->input['fwd'] == 1 ) ) + { + $name_to_enter = $name['members_display_name']; + } + } + else + { + $name_to_enter = isset($this->ipsclass->input['entered_name']) ? $this->ipsclass->input['entered_name'] : ''; + } + + //----------------------------------------- + // Are we quoting an old message? + //----------------------------------------- + + $footer_defaults = array( 'add_sent' => '', 'add_tracking' => '' ); + + if ( $preview or $this->class->show_form ) + { + $old_message = $_POST['Post-NS']; + $old_title = str_replace( "'", "'", str_replace( '"', '"', $this->ipsclass->txt_stripslashes($_POST['msg_title']) ) ); + + // If we preview and check these boxes, they should default to checked + $footer_defaults = array( + 'add_sent' => ( isset($this->ipsclass->input['add_sent']) AND $this->ipsclass->input['add_sent'] == 'yes' ) ? "checked='checked' " : "", + 'add_tracking' => ( isset($this->ipsclass->input['add_tracking']) AND $this->ipsclass->input['add_tracking'] == '1' ) ? "checked='checked' " : "", + ); + } + else if ( $this->form_orig_id ) + { + $this->ipsclass->DB->cache_add_query( 'msg_get_saved_msg', array( 'msgid' => $this->form_orig_id, 'mid' => $this->ipsclass->member['id'] ) ); + $this->ipsclass->DB->simple_exec(); + + $old_msg = $this->ipsclass->DB->fetch_row(); + + if( $old_msg['from_id'] && !( isset($this->ipsclass->input['fwd']) AND $this->ipsclass->input['fwd'] == 1 ) ) + { + $name_to_enter = $old_msg['from_name']; + } + + if ( $old_msg['mt_title'] ) + { + if ( $this->class->edit_saved ) + { + $name_to_enter = $old_msg['members_display_name']; + $cc_text = $old_msg['msg_cc_users']; + $cc_hide = $old_msg['mt_hide_cc']; + $old_track = $old_msg['mt_tracking']; + $old_addsent = $old_msg['mt_addtosent']; + $old_title = $old_msg['mt_title']; + $old_message = $old_msg['msg_post'];//$this->postlib->parser->bad_words( $this->ipsclass->my_br2nl( $old_msg['msg_post'] ) ); + $_msg_id = $old_msg['mt_msg_id']; + + $this->class->post_key = $old_msg['msg_post_key']; + $this->ipsclass->input['OID'] = $old_msg['mt_id']; + } + else if ( isset($this->ipsclass->input['fwd']) AND $this->ipsclass->input['fwd'] == 1 ) + { + $old_title = "Fwd:".$old_msg['mt_title']; + $old_title = preg_replace( "/^(?:Fwd\:){1,}/i", "Fwd:", $old_title ); + $old_message = '[QUOTE]'.sprintf($this->ipsclass->lang['vm_forward_text'], $name['members_display_name'])."\n\n".$old_msg['msg_post'].'[/QUOTE]'."\n"; + //$old_message = $this->postlib->parser->bad_words( $this->ipsclass->my_br2nl( $old_message ) ); + } + else + { + $old_title = "Re:".$old_msg['mt_title']; + $old_title = preg_replace( "/^(?:Re\:){1,}/i", "Re:", $old_title ); + $old_message = '[QUOTE]'.$old_msg['msg_post'].'[/QUOTE]'."\n"; + //$old_message = $this->postlib->parser->bad_words( $this->ipsclass->my_br2nl( $old_message ) ); + } + } + + $footer_defaults = array( + 'add_sent' => ( isset($old_addsent) AND $old_addsent == '1' ) ? "checked='checked' " : "", + 'add_tracking' => ( isset($old_track) AND $old_track == '1' ) ? "checked='checked' " : "", + ); + } + + //----------------------------------------- + // PM returns + //----------------------------------------- + + if ( $this->postlib->han_editor->method == 'rte' AND $old_message AND $this->form_orig_id ) + { + $old_message = $this->postlib->parser->convert_ipb_html_to_html( $this->ipsclass->my_nl2br( $old_message ) ); + } + else if( $this->postlib->han_editor->method == 'std' AND $old_message AND $this->form_orig_id ) + { + $old_message = $this->postlib->parser->pre_edit_parse( $old_message ); + } + + //----------------------------------------- + // Build up the HTML for the send form + //----------------------------------------- + + $this->output .= $this->ipsclass->compiled_templates['skin_msg']->Send_form( array ( + 'CONTACTS' => $contacts, + 'MEMBER' => $this->member, + 'N_ENTER' => $name_to_enter, + 'O_TITLE' => $old_title, + 'OID' => isset($this->ipsclass->input['OID']) ? $this->ipsclass->input['OID'] : 0, // Old unsent msg id for restoring saved msg - used to delete saved when sent + 'attach_post_key' => $this->class->post_key, + 'form_extra' => $this->form_extra, + 'upload' => $this->hidden_field, + + ) ); + + $this->ipsclass->lang['the_max_length'] = $this->ipsclass->vars['max_post_length'] * 1024; + + //----------------------------------------- + // Remove side panel + //----------------------------------------- + + $this->postlib->han_editor->remove_side_panel = 1; + + //----------------------------------------- + // Is this RTE? If so, convert BBCode + //----------------------------------------- + + if ( $this->postlib->han_editor->method == 'rte' AND $old_message ) + { + if ( $errors or $preview ) + { + $old_message = stripslashes( $old_message ); + } + + $old_message = $this->postlib->parser->convert_ipb_html_to_html( $old_message ); + } + else if ( $old_message ) + { + $old_message = $this->ipsclass->txt_stripslashes( $old_message ); + } + + $this->output .= $this->ipsclass->compiled_templates['skin_msg']->postbox_wrap( $this->postlib->han_editor->show_editor( $old_message, 'Post' ) ); + + //----------------------------------------- + // Show upload stuff? + //----------------------------------------- + + if ( $this->can_upload ) + { + $upload_field = $this->ipsclass->compiled_templates['skin_post']->Upload_field( $this->class->post_key, 'msg', $_msg_id ); + + $this->output = str_replace( '', $upload_field, $this->output ); + } + + $this->output .= $this->ipsclass->compiled_templates['skin_msg']->send_form_footer( $footer_defaults ); + + $this->class->page_title = $this->ipsclass->lang['t_welcome']; + $this->class->nav = array( "".$this->ipsclass->lang['t_title']."" ); + + //----------------------------------------- + // Do we have permission to mass PM peeps? + //----------------------------------------- + + $cc_box = ""; + $cc_formbox = ""; + + if ($this->ipsclass->member['g_max_mass_pm'] > 0) + { + $this->ipsclass->lang['carbon_copy_desc'] = sprintf( $this->ipsclass->lang['carbon_copy_desc'], $this->ipsclass->member['g_max_mass_pm'] ); + + if ( isset($_POST['carbon_copy']) or isset($cc_text) ) + { + $cc_text = isset($cc_text) ? $cc_text : $this->ipsclass->txt_htmlspecialchars($_POST['carbon_copy']); + + $cc_box = str_replace( "", "", $this->ipsclass->txt_stripslashes($cc_text) ); + } + + if ( ( isset($this->ipsclass->input['mt_hide_cc']) AND intval($this->ipsclass->input['mt_hide_cc']) == 1 ) or ( isset($cc_hide) AND $cc_hide == 1 ) ) + { + $cc_formbox = $cc_hide ? $cc_hide : intval($this->ipsclass->input['mt_hide_cc']); + + $cc_formbox = $cc_formbox == 1 ? "checked='checked' " : ""; + } + + $this->output = str_replace( "", $this->ipsclass->compiled_templates['skin_msg']->mass_pm_box($cc_box, $cc_formbox), $this->output ); + } + } + + /*-------------------------------------------------------------------------*/ + // Build contact listy poos + /*-------------------------------------------------------------------------*/ + + function build_contact_list() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $contacts = ""; + $from_contact = $this->ipsclass->input['from_contact'] ? intval($this->ipsclass->input['from_contact']) : intval($this->ipsclass->input['MID']); + $member_id = intval( $this->ipsclass->member['id'] ); + + //----------------------------------------- + // Clear out from_contact for fwd + //----------------------------------------- + + if( $this->ipsclass->input['fwd'] ) + { + $from_contact = 0; + } + + //----------------------------------------- + // Get 'em. + //----------------------------------------- + + $this->ipsclass->DB->build_query( array( 'select' => 'pf.friends_friend_id, pf.friends_approved', + 'from' => array( 'profile_friends' => 'pf' ), + 'where' => 'pf.friends_member_id='.$member_id. ' AND pf.friends_approved=1', + 'order' => 'm.members_display_name ASC', + 'add_join' => array( 0 => array( 'select' => 'm.members_display_name', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.id=pf.friends_friend_id', + 'type' => 'left' ), + ) + ) ); + + $this->ipsclass->DB->exec_query(); + + if ( $this->ipsclass->DB->get_num_rows() ) + { + $contacts = "\n"; + } + else + { + $contacts = $this->ipsclass->lang['address_list_empty']; + } + + return $contacts; + } + + + //----------------------------------------- + // API for deleting messages + //----------------------------------------- + + function delete_messages($ids, $owner_id, $extra="") + { + //----------------------------------------- + // Basic WHERE + //----------------------------------------- + + if ( ! $extra ) + { + $extra = "mt_owner_id=$owner_id"; + } + + $id_string = ""; + + if ( is_array( $ids ) ) + { + if ( ! count($ids) ) + { + return; + } + + $id_string = 'IN ('.implode( ",", $ids ).')'; + } + else + { + if ( ! $ids ) + { + return; + } + + $id_string = '='.$ids; + } + + //----------------------------------------- + // Are these our messages? + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 'mt_id, mt_msg_id, mt_read, mt_owner_id', 'from' => 'message_topics', 'where' => "$extra AND mt_id $id_string" ) ); + $this->ipsclass->DB->simple_exec(); + + $final_ids = array(); + $final_mts = array(); + $unread = array(); + + while ( $i = $this->ipsclass->DB->fetch_row() ) + { + $final_ids[ $i['mt_id'] ] = $i['mt_msg_id']; + $final_mts[ $i['mt_id'] ] = $i['mt_id']; + + if( $i['mt_read'] == 0 AND $i['mt_owner_id'] > 0 ) + { + $unread[ $i['mt_owner_id'] ] = intval($unread[ $i['mt_owner_id'] ]) + 1; + } + } + + //----------------------------------------- + // Delete MT topics + //----------------------------------------- + + if ( count($final_mts) ) + { + $this->ipsclass->DB->simple_construct( array( 'delete' => 'message_topics', 'where' => "mt_id IN (".implode( ',',$final_mts ).")" ) ); + $this->ipsclass->DB->simple_exec(); + } + + //----------------------------------------- + // Update delete count + //----------------------------------------- + + if ( count($final_ids) ) + { + $this->ipsclass->DB->simple_construct( array( 'update' => 'message_text', 'set' => "msg_deleted_count=msg_deleted_count+1", 'where' => "msg_id IN (".implode( ',',$final_ids ).")" ) ); + $this->ipsclass->DB->simple_exec(); + } + + //----------------------------------------- + // Update new PM notifications + //----------------------------------------- + + if ( count($unread) ) + { + $members = array(); + + $this->ipsclass->DB->build_query( array( 'select' => 'new_msg,id', 'from' => 'members', 'where' => "id IN(" . implode( ',', array_keys($unread) ) .")" ) ); + $this->ipsclass->DB->exec_query(); + + while( $mem_pm_cnts = $this->ipsclass->DB->fetch_row() ) + { + $members[ $mem_pm_cnts['id'] ] = $mem_pm_cnts['new_msg']; + } + + foreach( $unread as $mid => $cnt ) + { + $cur = $members[ $mid ]; + + if( $cur < $cnt ) + { + $cnt = $cur; + } + + $cnt = intval($cnt); + + $this->ipsclass->DB->simple_construct( array( 'update' => 'members', 'set' => "new_msg=new_msg-{$cnt}, show_popup=0", 'where' => "id={$mid}" ) ); + $this->ipsclass->DB->simple_exec(); + } + + unset($members); + } + + //----------------------------------------- + // Run through and delete dead msgs + //----------------------------------------- + + $deleted_ids = array(); + $attach_ids = array(); + + $this->ipsclass->DB->simple_construct( array( 'select' => 'msg_id', 'from' => 'message_text', 'where' => 'msg_deleted_count >= msg_sent_to_count' ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $r = $this->ipsclass->DB->fetch_row() ) + { + $deleted_ids[] = $r['msg_id']; + } + + if ( count($deleted_ids) ) + { + $this->ipsclass->DB->simple_construct( array( 'delete' => 'message_text', 'where' => "msg_id IN (".implode( ',',$deleted_ids ).")") ); + $this->ipsclass->DB->simple_exec(); + + $this->ipsclass->DB->simple_construct( array( 'select' => '*', + 'from' => 'attachments', + 'where' => "attach_rel_module='msg' AND attach_rel_id IN (".implode( ',',$deleted_ids ).")") ); + $this->ipsclass->DB->simple_exec(); + + while ( $a = $this->ipsclass->DB->fetch_row() ) + { + $attach_ids[] = $a['attach_id']; + + if ( $a['attach_location'] ) + { + @unlink( $this->ipsclass->vars['upload_dir']."/".$a['attach_location'] ); + } + if ( $a['attach_thumb_location'] ) + { + @unlink( $this->ipsclass->vars['upload_dir']."/".$a['attach_thumb_location'] ); + } + } + + if ( count($attach_ids) ) + { + $this->ipsclass->DB->simple_construct( array( 'delete' => 'attachments', 'where' => "attach_id IN (".implode( ',',$attach_ids ).")") ); + $this->ipsclass->DB->simple_exec(); + } + } + } + + /*-------------------------------------------------------------------------*/ + // Send form stuff + /*-------------------------------------------------------------------------*/ + + function send_pm( $opts=array() ) + { + //----------------------------------------- + // INIT some vars + //----------------------------------------- + + if ( ! $this->to and $this->to_by_id ) + { + //----------------------------------------- + // Just an id... + //----------------------------------------- + + $tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'name, members_display_name', 'from' => 'members', 'where' => 'id='.$this->to_by_id ) ); + + $this->to = $tmp['members_display_name']; + } + + $this->to = strtolower(str_replace( '|', '|', $this->to) ); + + $this->ipsclass->DB->cache_add_query( 'msg_get_cc_users', array( 'name_array' => array( 0 => "'".$this->to."'" ) ) ); + $this->ipsclass->DB->simple_exec(); + + if ( ! $this->send_to_member = $this->ipsclass->DB->fetch_row() ) + { + $this->error = $this->ipsclass->lang['err_no_such_member']; + return; + } + + $this->error = ""; + $this->save_only = $opts['save_only']; + $this->orig_id = $opts['orig_id']; + $this->preview = $opts['preview']; + $this->add_tracking = $opts['track']; + $this->add_sent = $opts['add_sent']; + $this->hide_cc = $opts['hide_cc']; + + //----------------------------------------- + // Are we simply saving this for later? + //----------------------------------------- + + $this->_process_save_only(); + + if ( $this->redirect_url ) + { + return; + } + + if ( $this->force_pm != 1 ) + { + //----------------------------------------- + // Can the reciepient use the PM system? + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'msg_get_msg_poster', array( 'mid' => $this->send_to_member['id'] ) ); + $this->ipsclass->DB->simple_exec(); + + $to_msg_stats = $this->ipsclass->DB->fetch_row(); + + // Are they in a secondary group that can use pm? + + if ( $to_msg_stats['mgroup_others'] && ! $to_msg_stats['g_use_pm'] ) + { + $groups_id = explode( ',', $to_msg_stats['mgroup_others'] ); + + if ( count( $groups_id ) ) + { + foreach( $groups_id as $pid ) + { + if ( ! $this->ipsclass->cache['group_cache'][ $pid ]['g_id'] ) + { + continue; + } + + if ( $this->ipsclass->cache['group_cache'][ $pid ]['g_use_pm'] ) + { + $to_msg_stats['g_use_pm'] = 1; + break; + } + } + } + } + + if ( $to_msg_stats['g_use_pm'] != 1 OR $to_msg_stats['members_disable_pm'] ) + { + $this->ipsclass->input['MID'] = $this->send_to_member['id']; + $this->error = $this->ipsclass->lang['no_usepm_member']; + return; + } + + //----------------------------------------- + // Does the target member have enough room + // in their inbox for a new message? + //----------------------------------------- + + $to_msg_stats = $this->_get_real_allowance( $to_msg_stats ); + + if ( (($to_msg_stats['msg_total']) >= $to_msg_stats['g_max_messages']) and ($to_msg_stats['g_max_messages'] > 0) ) + { + if ( $this->ipsclass->vars['override_inbox_full'] ) + { + $override = array(); + $override = explode( ",", $this->ipsclass->vars['override_inbox_full'] ); + + $do_override = 0; + + $my_groups = array( $this->ipsclass->member['mgroup'] ); + + if( $this->ipsclass->member['mgroup_others'] ) + { + $my_other_groups = explode( ",", $this->ipsclass->member['mgroup_others'] ); + $my_groups = array_merge( $my_groups, $my_other_groups ); + } + + foreach( $my_groups as $member_group ) + { + if( in_array( $member_group, $override ) ) + { + $do_override = 1; + } + } + + if ( $do_override == 0 ) + { + $this->error = $this->ipsclass->lang['no_usepm_member_full']; + return; + } + } + else + { + $this->error = $this->ipsclass->lang['no_usepm_member_full']; + return; + } + } + + //----------------------------------------- + // Has the reciepient blocked us? + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 'contact_id, allow_msg', 'from' => 'contacts', 'where' => "contact_id=".$this->from_member['id']." AND member_id=".$this->send_to_member['id'] ) ); + $this->ipsclass->DB->simple_exec(); + + $can_msg = $this->ipsclass->DB->fetch_row(); + + if ( (isset($can_msg['contact_id'])) and ($can_msg['allow_msg'] != 1) ) + { + if( $this->ipsclass->vars['unblockable_pm_groups'] ) + { + $unblockable = array(); + $unblockable = explode( ",", $this->ipsclass->vars['unblockable_pm_groups'] ); + + $do_override = 0; + + $my_groups = array( $this->ipsclass->member['mgroup'] ); + + if( $this->ipsclass->member['mgroup_others'] ) + { + $my_other_groups = explode( ",", $this->ipsclass->member['mgroup_others'] ); + $my_groups = array_merge( $my_groups, $my_other_groups ); + } + + foreach( $my_groups as $member_group ) + { + if( in_array( $member_group, $unblockable ) ) + { + $do_override = 1; + } + } + + if ( $do_override == 0 ) + { + $this->ipsclass->input['MID'] = $this->send_to_member['id']; + $this->error = $this->ipsclass->lang['msg_blocked']; + return; + } + } + else + { + $this->ipsclass->input['MID'] = $this->send_to_member['id']; + $this->error = $this->ipsclass->lang['msg_blocked']; + return; + } + } + + //----------------------------------------- + // Do we have enough room to store a + // saved copy? + //----------------------------------------- + + if (isset($this->ipsclass->input['add_sent']) AND $this->ipsclass->input['add_sent'] AND ($this->ipsclass->member['g_max_messages'] > 0) ) + { + if ( ($this->ipsclass->member['msg_total'] + 1) >= $this->ipsclass->member['g_max_messages'] ) + { + $this->error = $this->ipsclass->lang['max_message_from']; + return; + } + } + } + + //----------------------------------------- + // CC PM stuff + //----------------------------------------- + + $this->can_mass_pm = 0; + + if ( $this->ipsclass->member['g_max_mass_pm'] > 0 or $this->force_pm ) + { + $cc_array = $this->_process_cc(); + } + + if ( $this->error != "" ) + { + return; + } + + //----------------------------------------- + // Add our original ID + //----------------------------------------- + + $cc_array[ $this->send_to_member['id'] ] = $this->send_to_member; + + unset($to_member); + + //----------------------------------------- + // Insert the message body + //----------------------------------------- + + $count = count( $cc_array ); + + if ( $this->add_sent ) + { + // we're storing a copy locally, so + // add 1 to the "sent_to_count" + + $count++; + } + + $this->ipsclass->DB->do_insert( 'message_text', array( + 'msg_date' => time(), + 'msg_post' => $this->ipsclass->remove_tags($this->msg_post), + 'msg_cc_users' => $this->cc_users, + 'msg_sent_to_count' => $count, + 'msg_post_key' => $this->class->post_key, + 'msg_author_id' => $this->from_member['id'], + 'msg_ip_address' => $this->ipsclass->ip_address + ) ); + + + $msg_id = $this->ipsclass->DB->get_insert_id(); + + //----------------------------------------- + // Make attachments permanent + //----------------------------------------- + + $no_attachments = $this->postlib->pf_make_attachments_permanent( $this->class->post_key, $msg_id, 'msg' ); + + //----------------------------------------- + // If we have an original ID - delete it and 'move' + // attachments + //----------------------------------------- + + if ( $this->orig_id ) + { + $this->ipsclass->DB->cache_add_query( 'msg_get_saved_msg', array( 'mid' => $this->from_member['id'], 'msgid' => $this->orig_id ) ); + $this->ipsclass->DB->simple_exec(); + + if( $old = $this->ipsclass->DB->fetch_row() ) + { + //----------------------------------------- + // Update attachments + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'update' => 'attachments', 'set' => "attach_post_key='{$this->class->post_key}', attach_rel_id=$msg_id", 'where' => "attach_rel_id={$old['msg_id']} AND attach_rel_module='msg'" ) ); + $this->ipsclass->DB->simple_exec(); + + $this->ipsclass->DB->simple_construct( array( 'delete' => 'message_topics', 'where' => "mt_id={$old['mt_id']}" ) ); + $this->ipsclass->DB->simple_exec(); + + $this->ipsclass->DB->simple_construct( array ( 'update' => 'message_text', 'set' => 'msg_deleted_count=msg_deleted_count-1', 'where' => "msg_id={$old['msg_id']}" ) ); + $this->ipsclass->DB->simple_exec(); + + $no_attachments = $old['mt_hasattach']; + } + } + + //----------------------------------------- + // loop.... + //----------------------------------------- + + foreach ($cc_array as $to_member) + { + //----------------------------------------- + // Sort out tracking and pop us status + //----------------------------------------- + + $show_popup = $to_member['view_pop']; + + //----------------------------------------- + // Enter the info into the DB + // Target user side. + //----------------------------------------- + + $this->ipsclass->DB->force_data_type = array( 'mt_title' => 'string' ); + + $this->ipsclass->DB->do_insert( 'message_topics', array( + 'mt_msg_id' => $msg_id, + 'mt_date' => time(), + 'mt_title' => $this->msg_title, + 'mt_from_id' => $this->from_member['id'], + 'mt_to_id' => $to_member['id'], + 'mt_vid_folder' => 'in', + 'mt_tracking' => intval( $this->add_tracking ), + 'mt_addtosent' => intval( $this->add_sent ), + 'mt_hasattach' => intval($no_attachments), + 'mt_owner_id' => $to_member['id'], + 'mt_hide_cc' => intval( $this->hide_cc ), + ) ); + + + $mt_id = $this->ipsclass->DB->get_insert_id(); + + //----------------------------------------- + // Update profile + //----------------------------------------- + + $inbox_count = $this->_get_dir_count( $to_member['vdirs'], 'in' ); + + $new_vdir = $this->rebuild_dir_count( $to_member['id'], + "", + 'in', + $inbox_count + 1, + 'save', + "msg_total=msg_total+1,new_msg=new_msg+1,show_popup={$show_popup}" + ); + + //----------------------------------------- + // Has this member requested a PM email nofity? + //----------------------------------------- + + if ($to_member['email_pm'] == 1) + { + $to_member['language'] = $to_member['language'] == "" ? $this->ipsclass->vars['default_language'] : $to_member['language']; + + $this->postlib->email->get_template("pm_notify", $to_member['language']); + + $this->postlib->email->build_message( array( + 'NAME' => $to_member['members_display_name'], + 'POSTER' => $this->from_member['members_display_name'], + 'TITLE' => $this->msg_title, + 'LINK' => "?act=Msg&CODE=03&VID=in&MSID=$mt_id", + ) ); + + $this->ipsclass->DB->do_insert( 'mail_queue', array( 'mail_to' => $to_member['email'], 'mail_date' => time(), 'mail_subject' => $this->postlib->email->lang_subject, 'mail_content' => $this->postlib->email->message ) ); + + $this->ipsclass->cache['systemvars']['mail_queue'] += $count; + $this->ipsclass->update_cache( array( 'array' => 1, 'name' => 'systemvars', 'donow' => 1, 'deletefirst' => 0 ) ); + } + } + + //----------------------------------------- + // Add the data to the current members DB if we are + // adding it to our "sent items" folder + //----------------------------------------- + + if ( $this->add_sent ) + { + $sent_count = $this->_get_dir_count( $this->from_member['vdirs'], 'sent' ); + + $this->rebuild_dir_count( $this->from_member['id'], + "", + 'sent', + $sent_count + 1, + 'save', + "msg_total=msg_total+1" + ); + + $this->ipsclass->DB->do_insert( 'message_topics', array( + 'mt_msg_id' => $msg_id, + 'mt_date' => time(), + 'mt_title' => $this->msg_title, + 'mt_from_id' => $this->from_member['id'], + 'mt_to_id' => $this->send_to_member['id'], + 'mt_vid_folder' => 'sent', + 'mt_tracking' => 0, + 'mt_addtosent' => 0, + 'mt_hasattach' => intval($no_attachments), + 'mt_owner_id' => $this->from_member['id'], + 'mt_hide_cc' => $this->hide_cc, + ) ); + + } + + $this->to_by_id = ""; + $this->to = ""; + + #unset($this->postlib); + } + + + /*-------------------------------------------------------------------------*/ + // Rebuild DIR count + /*-------------------------------------------------------------------------*/ + + function rebuild_dir_count($mid, $vdir, $cur_dir, $new_count, $nosave='save', $extra="") + { + $rebuild = array(); + + if ( ! $vdir ) + { + $this->ipsclass->DB->simple_construct( array( "select" => 'vdirs', 'from' => 'member_extra', 'where' => 'id='.$mid ) ); + $this->ipsclass->DB->simple_exec(); + + $mem = $this->ipsclass->DB->fetch_row(); + + $vdir = $mem['vdirs'] ? $mem['vdirs'] : 'in:Inbox;0|sent:Sent Items;0'; + } + + foreach( explode( "|", $vdir ) as $dir ) + { + list ($id , $data) = explode( ":", $dir ); + list ($real, $count) = explode( ";", $data ); + + if ( ! $id ) + { + continue; + } + + if ( $id == $cur_dir ) + { + $count = $new_count; + $count = $count < 1 ? 0 : $count; + } + + $rebuild[$id] = $id.':'.$real.';'.intval($count); + } + + $final = implode( '|', $rebuild ); + + if ( $nosave != 'nosave' ) + { + $this->ipsclass->DB->simple_construct( array( 'update' => 'member_extra', 'set' => "vdirs='".$final."'", 'where' => 'id='.$mid ) ); + $this->ipsclass->DB->simple_exec(); + + if ( $extra ) + { + $this->ipsclass->DB->simple_construct( array( 'update' => 'members', 'set' => $extra, 'where' => 'id='.$mid ) ); + $this->ipsclass->DB->simple_exec(); + } + } + + return $final; + } + + + /*-------------------------------------------------------------------------*/ + // POST PROCESS CC + /*-------------------------------------------------------------------------*/ + + function format_cc_string($cc_users, $mid ) + { + $cc_array = array(); + $final = array(); + + $cc_array = $this->get_cc_array( $cc_users ); + + foreach( $cc_array as $id => $data ) + { + if ( $id == $mid ) + { + continue; + } + + $final[] = $this->ipsclass->make_profile_link( $data['members_display_name'], $data['id'] ); + } + + return implode( ", ", $final ); + + } + + /*-------------------------------------------------------------------------*/ + // PROCESS CC + /*-------------------------------------------------------------------------*/ + + function get_cc_array($cc_users) + { + $cc_array = array(); + + $cc_users = strtolower(str_replace( '|', '|', $cc_users) ); + + if ( $cc_users ) + { + //----------------------------------------- + // Sort out the array + //----------------------------------------- + + $cc_users = str_replace( "
    ", "
    ", $cc_users ); + $cc_users = str_replace( "

    ", "
    " , trim($cc_users) ); + $cc_users = preg_replace( "/^(
    ){1}/", "" , $cc_users ); + $cc_users = preg_replace( "/(
    ){1}$/", "" , $cc_users ); + $cc_users = preg_replace( "/
    \s+/", "," , $cc_users ); + + $temp_array = explode( "
    ", $cc_users ); + + //----------------------------------------- + // Make SQL'able + //----------------------------------------- + + if ( is_array($temp_array) and count($temp_array) > 0 ) + { + $new_array = array(); + + foreach( $temp_array as $name ) + { + $name = "'".trim(strtolower($name))."'"; + + if (in_array( $name, $new_array ) ) + { + continue; + } + + $new_array[] = $name; + } + } + + //----------------------------------------- + // SQL it + //----------------------------------------- + + if ( is_array($new_array) and count($new_array) > 0 ) + { + $array_count = count($new_array); + + $this->ipsclass->DB->cache_add_query( 'msg_get_cc_users', array( 'name_array' => $new_array ) ); + $this->ipsclass->DB->simple_exec(); + + while( $r = $this->ipsclass->DB->fetch_row() ) + { + $cc_array[$r['id']] = $r; + } + } + } + + return $cc_array; + } + + + /*-------------------------------------------------------------------------*/ + // PROCESS CC + /*-------------------------------------------------------------------------*/ + + function _process_cc() + { + $this->can_mass_pm = 1; + $cc_array = array(); + + $this->cc_users = strtolower(str_replace( '|', '|', $this->cc_users) ); + + if (isset($this->cc_users) and $this->cc_users != "") + { + //----------------------------------------- + // Sort out the array + //----------------------------------------- + + $this->cc_users = str_replace( "
    ", "
    " , trim($this->cc_users) ); + $this->cc_users = str_replace( "

    ", "
    " , trim($this->cc_users) ); + $this->cc_users = preg_replace( "#^(
    ){1}#", "" , $this->cc_users ); + $this->cc_users = preg_replace( "#(
    ){1}$#", "" , $this->cc_users ); + $this->cc_users = preg_replace( "#
    \s+#", "," , $this->cc_users ); + + $temp_array = explode( "
    ", $this->cc_users ); + + //----------------------------------------- + // Make SQL'able + //----------------------------------------- + + if ( is_array($temp_array) and count($temp_array) > 0 ) + { + $new_array = array(); + + foreach( $temp_array as $name ) + { + $name = "'".trim(strtolower($name))."'"; + + if (in_array( $name, $new_array ) ) + { + continue; + } + + $new_array[] = $name; + } + } + + //----------------------------------------- + // SQL it + //----------------------------------------- + + if ( is_array($new_array) and count($new_array) > 0 ) + { + $array_count = count($new_array); + + $this->ipsclass->DB->cache_add_query( 'msg_get_cc_users', array( 'name_array' => $new_array ) ); + $this->ipsclass->DB->simple_exec(); + + if ( ! $this->ipsclass->DB->get_num_rows() ) + { + $this->error = $this->ipsclass->lang['pme_no_cc_user']; + return; + } + else + { + while( $r = $this->ipsclass->DB->fetch_row() ) + { + $cc_array[$r['id']] = $r; + } + + //----------------------------------------- + + if ( $this->force_pm != 1 ) + { + if ( count($cc_array) > $this->ipsclass->member['g_max_mass_pm']) + { + $this->ipsclass->input['MID'] = $this->send_to_member['id']; + $this->error = $this->ipsclass->lang['pme_too_many']; + return; + } + } + + //----------------------------------------- + // Names exist? + //----------------------------------------- + + $cc_error = ""; + + if ( count($cc_array) != $array_count ) + { + foreach( $new_array as $n ) + { + $seen = 0; + + foreach( $cc_array as $cc_user ) + { + $tmp = "'".strtolower($cc_user['members_display_name'])."'"; + + if ($tmp == $n) + { + $seen = 1; + } + } + + if ($seen != 1) + { + $cc_error .= "
    ".sprintf( $this->ipsclass->lang['pme_failed_nomem'], $n, $n ); + } + } + } + + if ($cc_error != "") + { + $this->ipsclass->input['MID'] = $this->send_to_member['id']; + $this->error = $cc_error; + return; + } + + //----------------------------------------- + // Can use PM system? + //----------------------------------------- + + $cc_error = ""; + $cc_id_array = array(); + + foreach($cc_array as $cc_user) + { + if ( $cc_user['g_use_pm'] != 1 OR $cc_user['members_disable_pm'] ) + { + $cc_error .= "
    ".sprintf( $this->ipsclass->lang['pme_failed_nopm'], $cc_user['members_display_name'], $cc_user['members_display_name'] ); + } + + $cc_user = $this->_get_real_allowance($cc_user); + + if ($cc_user['g_max_messages'] > 0 and ($cc_user['msg_total'] + 1 > $cc_user['g_max_messages']) ) + { + if ( $this->ipsclass->vars['override_inbox_full'] ) + { + $override = array(); + $override = explode( ",", $this->ipsclass->vars['override_inbox_full'] ); + + $do_override = 0; + + $my_groups = array( $this->ipsclass->member['mgroup'] ); + + if( $this->ipsclass->member['mgroup_others'] ) + { + $my_other_groups = explode( ",", $this->ipsclass->member['mgroup_others'] ); + $my_groups = array_merge( $my_groups, $my_other_groups ); + } + + foreach( $my_groups as $member_group ) + { + if( in_array( $member_group, $override ) ) + { + $do_override = 1; + } + } + + if ( $do_override == 0 ) + { + $cc_error .= "
    ".sprintf( $this->ipsclass->lang['pme_failed_maxed'], $cc_user['members_display_name'], $cc_user['members_display_name'] ); + } + } + else + { + $cc_error .= "
    ".sprintf( $this->ipsclass->lang['pme_failed_maxed'], $cc_user['members_display_name'], $cc_user['members_display_name'] ); + } + } + + $cc_id_array[] = $cc_user['id']; + } + + if ( $this->force_pm != 1 ) + { + if ($cc_error != "") + { + $this->ipsclass->input['MID'] = $this->send_to_member['id']; + $this->error = $cc_error; + return; + } + } + + //----------------------------------------- + // Check the block list.. + //----------------------------------------- + + $this->ipsclass->DB->cache_add_query( 'msg_get_cc_blocked', array( 'mid' => $this->from_member['id'], 'cc_array' => $cc_id_array ) ); + $this->ipsclass->DB->simple_exec(); + + while ( $c = $this->ipsclass->DB->fetch_row() ) + { + if ($c['allow_msg'] != 1) + { + if( $this->ipsclass->vars['unblockable_pm_groups'] ) + { + $unblockable = array(); + $unblockable = explode( ",", $this->ipsclass->vars['unblockable_pm_groups'] ); + + $do_override = 0; + + $my_groups = array( $this->ipsclass->member['mgroup'] ); + + if( $this->ipsclass->member['mgroup_others'] ) + { + $my_other_groups = explode( ",", $this->ipsclass->member['mgroup_others'] ); + $my_groups = array_merge( $my_groups, $my_other_groups ); + } + + foreach( $my_groups as $member_group ) + { + if( in_array( $member_group, $unblockable ) ) + { + $do_override = 1; + } + } + + if ( $do_override == 0 ) + { + $cc_error .= "
    ".sprintf( $this->ipsclass->lang['pme_failed_block'], $c['name'], $c['name'] ); + } + } + else + { + $cc_error .= "
    ".sprintf( $this->ipsclass->lang['pme_failed_block'], $c['name'], $c['name'] ); + } + } + } + + if ( $this->force_pm != 1 ) + { + if ($cc_error != "") + { + $this->ipsclass->input['MID'] = $this->send_to_member['id']; + $this->error = $cc_error; + return; + } + } + } + } + } + + return $cc_array; + } + + /*-------------------------------------------------------------------------*/ + // SAVE stuff + /*-------------------------------------------------------------------------*/ + + function _process_save_only() + { + if ( $this->save_only ) + { + + $raw = array( + 'msg_date' => time(), + 'msg_post' => $this->ipsclass->remove_tags($this->msg_post), + 'msg_cc_users' => $this->cc_users, + 'msg_sent_to_count' => 1, + 'msg_post_key' => $this->class->post_key, + 'msg_author_id' => $this->from_member['id'] + ); + + $saved = 0; + + if ( $this->orig_id ) + { + //----------------------------------------- + // We have an OID which means that this message + // is already from the unsent folder, lets check that + // and if true, update rather than create a new unsent + // row + //----------------------------------------- + + $this->ipsclass->DB->simple_construct( array( 'select' => 'mt_id, mt_msg_id', 'from' => 'message_topics', 'where' => "mt_id=".$this->orig_id." AND mt_owner_id=".$this->from_member['id']." AND mt_vid_folder='unsent'" ) ); + $this->ipsclass->DB->simple_exec(); + + if ( $omsg = $this->ipsclass->DB->fetch_row() ) + { + $saved = 1; + + $this->ipsclass->DB->do_update( 'message_text', $raw, "msg_id=".$omsg['mt_msg_id'] ); + + //----------------------------------------- + // Make attachments permanent + //----------------------------------------- + + $no_attachments = $this->postlib->pf_make_attachments_permanent( $this->class->post_key, "", "", $omsg['mt_msg_id'] ); + + $this->ipsclass->DB->simple_construct( array( 'update' => 'message_topics', 'set' => "mt_hasattach=$no_attachments, mt_date=".time(), 'where' => 'mt_owner_id='.$this->ipsclass->member['id'].' AND mt_id='.$omsg['mt_id'] ) ); + $this->ipsclass->DB->simple_exec(); + } + } + + if ($saved == 0) + { + $this->ipsclass->DB->do_insert( 'message_text', $raw); + + $msg_id = $this->ipsclass->DB->get_insert_id(); + + //----------------------------------------- + // Make attachments permanent + //----------------------------------------- + + $no_attachments = $this->postlib->pf_make_attachments_permanent( $this->class->post_key, "", "", $msg_id ); + + $this->ipsclass->DB->do_insert( 'message_topics', array( + 'mt_msg_id' => $msg_id, + 'mt_date' => time(), + 'mt_title' => $this->msg_title, + 'mt_from_id' => $this->from_member['id'], + 'mt_to_id' => $this->send_to_member['id'], + 'mt_vid_folder' => 'unsent', + 'mt_hide_cc' => intval($this->ipsclass->input['mt_hide_cc']), + 'mt_tracking' => intval($this->ipsclass->input['add_tracking']), + 'mt_addtosent' => $this->ipsclass->input['add_sent'] == 'yes' ? 1 : 0, + 'mt_hasattach' => intval($no_attachments), + 'mt_owner_id' => $this->from_member['id'], + ) ); + } + + $this->redirect_url = "&act=Msg&CODE=01"; + $this->redirect_lang = $this->ipsclass->lang['pms_redirect']; + } + } + + /*-------------------------------------------------------------------------*/ + // Return count of current VDIR (quickly) + /*-------------------------------------------------------------------------*/ + + function _get_dir_count( $vdir, $vid ) + { + preg_match( "#(?:^|\|)$vid:.+?;(\d+)(?:\||$)#i", $vdir, $match ); + + return intval($match[1]); + } + + /*-------------------------------------------------------------------------*/ + // Get real allowance based on multi-groups + /*-------------------------------------------------------------------------*/ + + function _get_real_allowance( $member ) + { + $groups_id = explode( ',', $member['mgroup_others'] ); + + if ( count( $groups_id ) ) + { + foreach( $groups_id as $pid ) + { + if ( !isset($this->ipsclass->cache['group_cache'][ $pid ]['g_id']) OR !$this->ipsclass->cache['group_cache'][ $pid ]['g_id'] ) + { + continue; + } + + if ( $member['g_max_messages'] > 0 AND $this->ipsclass->cache['group_cache'][ $pid ]['g_max_messages'] > $member['g_max_messages'] ) + { + $member['g_max_messages'] = $this->ipsclass->cache['group_cache'][ $pid ]['g_max_messages']; + } + else if ( $this->ipsclass->cache['group_cache'][ $pid ]['g_max_messages'] == 0 ) + { + $member['g_max_messages'] = 0; + } + } + } + + return $member; + } + + +} + ?> \ No newline at end of file diff --git a/upload/sources/lib/func_taskmanager.php b/upload/sources/lib/func_taskmanager.php index cf1763d4..07bbb358 100644 --- a/upload/sources/lib/func_taskmanager.php +++ b/upload/sources/lib/func_taskmanager.php @@ -2,25 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-11-03 16:54:54 -0600 (Fri, 03 Nov 2006) $ -| > $Revision: 709 $ +| > $Date: 2007-05-01 14:00:44 -0400 (Tue, 01 May 2007) $ +| > $Revision: 958 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -35,7 +27,7 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Неверный вход

    У Вас нет доступа к директиве этого файла. Если вы проводили обновления, убедитесь, что не забыли обновить 'admin.php'."; + print "

    Incorrect access

    You cannot access this file directly."; exit(); } @@ -78,10 +70,10 @@ class func_taskmanager function run_task() { - if ( isset( $_REQUEST['ck'] ) AND $_REQUEST['ck'] ) + if ( isset( $this->ipsclass->input['ck'] ) AND $this->ipsclass->input['ck'] ) { $this->type = 'cron'; - $this->cron_key = substr( trim(stripslashes($this->ipsclass->txt_alphanumerical_clean($_REQUEST['ck']))), 0, 32 ); + $this->cron_key = substr( trim(stripslashes($this->ipsclass->txt_alphanumerical_clean($this->ipsclass->input['ck']))), 0, 32 ); } if ( $this->type == 'internal' ) @@ -209,13 +201,7 @@ class func_taskmanager $this_task['task_next_run'] = $this->time_now + 3600; } - $cache_array = array(); - - $cache = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='systemvars'" ) ); - - $cache_array = unserialize(stripslashes($cache['cs_value'])); - - $cache_array['task_next_run'] = $this_task['task_next_run']; + $this->ipsclass->cache['systemvars']['task_next_run'] = $this_task['task_next_run']; $this->ipsclass->update_cache( array( 'array' => 1, 'name' => 'systemvars', 'donow' => 1, 'deletefirst' => 0 ) ); } diff --git a/upload/sources/lib/func_topic_linear.php b/upload/sources/lib/func_topic_linear.php index 5af49c7c..064f4055 100644 --- a/upload/sources/lib/func_topic_linear.php +++ b/upload/sources/lib/func_topic_linear.php @@ -2,26 +2,18 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-10-03 06:14:55 -0500 (Tue, 03 Oct 2006) $ -| > $Revision: 596 $ -| > $Author: matt $ +| > $Date: 2007-05-02 17:29:35 -0400 (Wed, 02 May 2007) $ +| > $Revision: 959 $ +| > $Author: bfarber $ +--------------------------------------------------------------------------- | | > Topic display module @@ -36,8 +28,8 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); } class topic_display @@ -53,7 +45,6 @@ class topic_display var $topic = array(); var $mod_action = array(); var $poll_html = ""; - var $parser = ""; var $mimetypes = ""; var $nav_extra = ""; var $read_array = array(); @@ -200,7 +191,7 @@ class topic_display { $queued_query_bit = ''; - if ( $this->ipsclass->input['modfilter'] == 'invisible_posts' ) + if ( isset($this->ipsclass->input['modfilter']) AND $this->ipsclass->input['modfilter'] == 'invisible_posts' ) { $queued_query_bit = ' and queued=1'; } @@ -418,7 +409,6 @@ class topic_display { $this->output .= $this->ipsclass->compiled_templates['skin_topic']->topic_end_first_post( array( 'TOPIC' => $this->topic, 'FORUM' => $this->forum ) ); } - } //----------------------------------------- @@ -426,7 +416,6 @@ class topic_display //----------------------------------------- $this->output .= $this->ipsclass->compiled_templates['skin_topic']->TableFooter( array( 'TOPIC' => $this->topic, 'FORUM' => $this->forum ), 0, $this->ipsclass->return_md5_check() ); - } } diff --git a/upload/sources/lib/func_topic_threaded.php b/upload/sources/lib/func_topic_threaded.php index 14021efd..125be385 100644 --- a/upload/sources/lib/func_topic_threaded.php +++ b/upload/sources/lib/func_topic_threaded.php @@ -2,25 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-10-26 12:58:53 -0500 (Thu, 26 Oct 2006) $ -| > $Revision: 678 $ +| > $Date: 2008-04-23 15:02:02 -0400 (Wed, 23 Apr 2008) $ +| > $Revision: 1254 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -36,8 +28,8 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); } class topic_display @@ -52,7 +44,6 @@ class topic_display var $topic = array(); var $mod_action = array(); var $poll_html = ""; - var $parser = ""; var $mimetypes = ""; var $nav_extra = ""; var $mod_panel_html = ""; @@ -307,6 +298,8 @@ class topic_display $poster = $return['poster']; $row = $return['row']; + $this->output .= $this->ipsclass->compiled_templates['skin_topic']->RenderRow( $row, $poster ); + //----------------------------------------- // Are we giving this bloke a good ignoring? //----------------------------------------- @@ -323,8 +316,6 @@ class topic_display } } - $this->output .= $this->ipsclass->compiled_templates['skin_topic']->RenderRow( $row, $poster ); - if ( ! $this->printed and $num_rows > 1 ) { $this->output .= $this->ipsclass->compiled_templates['skin_topic']->topic_end_first_post( array( 'TOPIC' => $this->topic, 'FORUM' => $this->forum ), 1 ); @@ -415,13 +406,13 @@ class topic_display if ( $this->structured_pids[ $post['post_parent'] ][$last_id] == $post['pid'] ) { - $this->depth_guide[ $depth ] = ''; - $post['depthguide'] .= ''; + $this->depth_guide[ $depth ] = ''; + $post['depthguide'] .= '-'; } else { - $this->depth_guide[ $depth ] = ''; - $post['depthguide'] .= ''; + $this->depth_guide[ $depth ] = '|'; + $post['depthguide'] .= '-'; } } @@ -429,8 +420,15 @@ class topic_display { if ( $this->ipsclass->vars['post_showtext_notitle'] ) { - $post_text = $this->lib->parser->strip_all_tags( $post['post'] ); - + require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" ); + $this->lib->parser = new parse_bbcode(); + $this->lib->parser->ipsclass = $this->ipsclass; + $this->lib->parser->allow_update_caches = 1; + + $this->lib->parser->bypass_badwords = intval($this->ipsclass->member['g_bypass_badwords']); + + $post_text = $this->lib->parser->strip_all_tags( strip_tags( $this->ipsclass->my_br2nl( $post['post'] ) ) ); + if ( strlen($post_text) > 50 ) { $post['post_title'] = substr( $post_text, 0, 50 ).'...'; @@ -457,11 +455,11 @@ class topic_display $post['formatted_date'] = $this->ipsclass->get_date( $post['post_date'], 'LONG' ); - $post['new_post'] = ''; + $post['new_post'] = '-'; if ( $post['post_date'] > $this->lib->last_read_tid ) { - $post['new_post'] = ''; + $post['new_post'] = '-'; } //$post['post_debug'] = "{ID: {$post['pid']}} Last Array Index: $last_id - Last id in tree{$this->structured_pids[ $post['post_parent'] ][$last_id]}, DEPTH: $depth, [parent: {$post['post_parent']}]"; diff --git a/upload/sources/lib/func_usercp.php b/upload/sources/lib/func_usercp.php index 85a316d5..62401f7d 100644 --- a/upload/sources/lib/func_usercp.php +++ b/upload/sources/lib/func_usercp.php @@ -2,26 +2,18 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-11-28 09:41:42 -0600 (Tue, 28 Nov 2006) $ -| > $Revision: 743 $ -| > $Author: matt $ +| > $Date: 2008-04-21 17:32:17 -0400 (Mon, 21 Apr 2008) $ +| > $Revision: 1249 $ +| > $Author: bfarber $ +--------------------------------------------------------------------------- | | > UserCP functions library @@ -33,9 +25,9 @@ +-------------------------------------------------------------------------- */ -if ( ! defined( 'IN_ACP' ) ) +if ( ! defined( 'IN_IPB' ) ) { - print "

    Неверный вход

    У Вас нет доступа к директиве этого файла. Если вы проводили обновления, убедитесь, что не забыли обновить 'admin.php'."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -149,7 +141,7 @@ class func_usercp if ( ! $this->ipsclass->member['vdirs'] ) { - $this->ipsclass->member['vdirs'] = "in:Входящие|sent:Отправленные"; + $this->ipsclass->member['vdirs'] = "in:{$this->ipsclass->lang['account_inbox']}|sent:{$this->ipsclass->lang['account_sent']}"; } foreach( explode( "|", $this->ipsclass->member['vdirs'] ) as $dir ) @@ -247,7 +239,7 @@ class func_usercp // Passy check //----------------------------------------- - if ( isset($forum['password']) AND $forum['password'] != "" ) + if ( ! in_array( $this->ipsclass->member['mgroup'], explode(",", $forum['password_override']) ) AND ( isset($forum['password']) AND $forum['password'] != "" ) ) { if ( $this->ipsclass->forums->forums_compare_password( $forum['id'] ) != TRUE ) { @@ -291,6 +283,15 @@ class func_usercp } else { + //----------------------------------------- + // Auth check + //----------------------------------------- + + if ( $this->ipsclass->input['auth_key'] != $this->class->md5_check ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'del_post') ); + } + //----------------------------------------- // Method.. //----------------------------------------- @@ -323,7 +324,6 @@ class func_usercp if ( $method == 'forum' ) { - $this->ipsclass->DB->do_insert( 'forum_tracker', array ( 'member_id' => $this->ipsclass->member['id'], 'forum_id' => $fid, @@ -394,13 +394,6 @@ class func_usercp $photo = $this->lib_upload_photo(); - if ( $photo['status'] == 'fail' ) - { - $this->ipsclass->load_language( 'lang_profile' ); - $this->class->photo( $this->ipsclass->lang[ 'pp_' . $photo['error'] ] ); - return; - } - //----------------------------------------- // Save... //----------------------------------------- @@ -414,26 +407,33 @@ class func_usercp { # Update... $this->ipsclass->DB->do_update( 'profile_portal', array( 'pp_main_photo' => $photo['final_location'], - 'pp_main_width' => $photo['final_width'], - 'pp_main_height' => $photo['final_height'], + 'pp_main_width' => intval($photo['final_width']), + 'pp_main_height' => intval($photo['final_height']), 'pp_thumb_photo' => $photo['t_final_location'], - 'pp_thumb_width' => $photo['t_final_width'], - 'pp_thumb_height' => $photo['t_final_height'], + 'pp_thumb_width' => intval($photo['t_final_width']), + 'pp_thumb_height' => intval($photo['t_final_height']), ), 'pp_member_id='.$member_id ); } else { # Insert $this->ipsclass->DB->do_insert( 'profile_portal', array( 'pp_main_photo' => $photo['final_location'], - 'pp_main_width' => $photo['final_width'], - 'pp_main_height' => $photo['final_height'], + 'pp_main_width' => intval($photo['final_width']), + 'pp_main_height' => intval($photo['final_height']), 'pp_thumb_photo' => $photo['t_final_location'], - 'pp_thumb_width' => $photo['t_final_width'], - 'pp_thumb_height' => $photo['t_final_height'], + 'pp_thumb_width' => intval($photo['t_final_width']), + 'pp_thumb_height' => intval($photo['t_final_height']), 'pp_member_id' => $member_id, ) ); } + if ( $photo['status'] == 'fail' ) + { + $this->ipsclass->load_language( 'lang_profile' ); + $this->class->photo( $this->ipsclass->lang[ 'pp_' . $photo['error'] ] ); + return; + } + $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['photo_c_up'], "act=UserCP&CODE=photo" ); } @@ -489,7 +489,7 @@ class func_usercp // Already a dir? //----------------------------------------- - if ( ! file_exists( $upload_path . "/profile" ) ) + if ( ! is_dir( $upload_path . "/profile" ) ) { if ( @mkdir( $upload_path . "/profile", 0777 ) ) { @@ -499,13 +499,18 @@ class func_usercp $upload_path .= "/profile"; $upload_dir = "profile/"; } + else + { + $upload_dir = ""; + } } else { # Set path and dir correct - $upload_dir = ""; + $upload_path .= "/profile"; + $upload_dir = "profile/"; } - + //----------------------------------------- // Deleting the photo? //----------------------------------------- @@ -522,21 +527,21 @@ class func_usercp if ( $this->ipsclass->DB->get_num_rows() ) { $this->ipsclass->DB->do_update( 'profile_portal', array( 'pp_main_photo' => '', - 'pp_main_width' => '', - 'pp_main_height' => '', + 'pp_main_width' => 0, + 'pp_main_height' => 0, 'pp_thumb_photo' => '', - 'pp_thumb_width' => '', - 'pp_thumb_height' => '', + 'pp_thumb_width' => 0, + 'pp_thumb_height' => 0, ), 'pp_member_id='.$member_id ); } else { $this->ipsclass->DB->do_insert( 'profile_portal', array( 'pp_main_photo' => '', - 'pp_main_width' => '', - 'pp_main_height' => '', + 'pp_main_width' => 0, + 'pp_main_height' => 0, 'pp_thumb_photo' => '', - 'pp_thumb_width' => '', - 'pp_thumb_height' => '', + 'pp_thumb_width' => 0, + 'pp_thumb_height' => 0, 'pp_member_id' => $member_id ) ); } @@ -608,7 +613,7 @@ class func_usercp //----------------------------------------- $upload->upload_process(); - + //----------------------------------------- // Error? //----------------------------------------- @@ -1623,7 +1628,7 @@ class func_usercp foreach ( array('day','month','year') as $v ) { - if (!empty($this->ipsclass->input[$v])) + if ( ! empty($this->ipsclass->input[$v] ) ) { $c_cnt++; } @@ -1633,25 +1638,25 @@ class func_usercp { $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'calendar_not_all' ) ); } - else if( ($c_cnt > 0) and ($c_cnt == 3) ) - { - //----------------------------------------- - // Make sure it's a legal date - //----------------------------------------- - - $_year = $this->ipsclass->input['year'] ? $this->ipsclass->input['year'] : 1999; - - if ( ! checkdate( $this->ipsclass->input['month'], $this->ipsclass->input['day'], $_year ) ) - { - $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'ucp_birthday_legal_date' ) ); - } - } + else if( ($c_cnt > 0) and ($c_cnt == 3) ) + { + //----------------------------------------- + // Make sure it's a legal date + //----------------------------------------- + + $_year = $this->ipsclass->input['year'] ? $this->ipsclass->input['year'] : 1999; + + if ( ! checkdate( $this->ipsclass->input['month'], $this->ipsclass->input['day'], $_year ) ) + { + $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'ucp_birthday_legal_date' ) ); + } + } if ( ! preg_match( "#^http://#", $this->ipsclass->input['WebSite'] ) ) { $this->ipsclass->input['WebSite'] = 'http://'.$this->ipsclass->input['WebSite']; - } - + } + //----------------------------------------- // Start off our array //----------------------------------------- @@ -1670,7 +1675,7 @@ class func_usercp 'location' => $this->class->parser->bad_words( $this->ipsclass->input['Location'] ), 'interests' => $this->class->parser->bad_words( $this->ipsclass->input['Interests'] ), ); - + $_gender = $this->ipsclass->input['gender'] == 'male' ? 'male' : ( $this->ipsclass->input['gender'] == 'female' ? 'female' : '' ); //----------------------------------------- @@ -1693,7 +1698,16 @@ class func_usercp $this->ipsclass->DB->do_update( 'member_extra', $bet, 'id='.$this->ipsclass->member['id'] ); - $this->ipsclass->DB->do_update( 'profile_portal', array( 'pp_gender' => $_gender ), 'pp_member_id=' . $this->ipsclass->member['id'] ); + $check = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'pp_member_id', 'from' => 'profile_portal', 'where' => 'pp_member_id=' . $this->ipsclass->member['id'] ) ); + + if( $check['pp_member_id'] ) + { + $this->ipsclass->DB->do_update( 'profile_portal', array( 'pp_gender' => $_gender ), 'pp_member_id=' . $this->ipsclass->member['id'] ); + } + else + { + $this->ipsclass->DB->do_insert( 'profile_portal', array( 'pp_gender' => $_gender, 'pp_member_id' => $this->ipsclass->member['id'] ) ); + } //----------------------------------------- // Save the profile stuffy wuffy @@ -1803,7 +1817,7 @@ class func_usercp $this->class->parser->parse_bbcode = intval($this->ipsclass->vars['sig_allow_ibc']); $this->class->parser->parsing_signature = 1; - $this->ipsclass->input['Post'] = $this->class->parser->bad_words( $this->class->parser->pre_db_parse( $this->ipsclass->input['Post'] ) ); + $this->ipsclass->input['Post'] = $this->class->parser->bad_words( $this->class->parser->pre_display_parse( $this->class->parser->pre_db_parse( $this->ipsclass->input['Post'] ) ) ); if ($this->class->parser->error != "") { diff --git a/upload/sources/lib/index.html b/upload/sources/lib/index.html index 250b1f72..af2fbe79 100644 --- a/upload/sources/lib/index.html +++ b/upload/sources/lib/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/sources/lib/post_parser.php b/upload/sources/lib/post_parser.php index efe75966..4d2beb76 100644 --- a/upload/sources/lib/post_parser.php +++ b/upload/sources/lib/post_parser.php @@ -2,24 +2,16 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ +| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ | > $Revision: 567 $ | > $Author: matt $ +--------------------------------------------------------------------------- @@ -32,9 +24,9 @@ +-------------------------------------------------------------------------- */ -if ( ! defined( 'IN_ACP' ) ) +if ( ! defined( 'IN_IPB' ) ) { - print "

    Неверный вход

    У Вас нет доступа к директиве этого файла. Если вы проводили обновления, убедитесь, что не забыли обновить 'admin.php'."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -867,8 +859,8 @@ class post_parser { global $ibforums; $used = array( - 'quote' => array( 'title' => 'Цитата', 'css_top' => 'quotetop' , 'css_main' => 'quotemain' ), - 'code' => array( 'title' => 'Код' , 'css_top' => 'codetop' , 'css_main' => 'codemain' ), + 'quote' => array( 'title' => 'QUOTE', 'css_top' => 'quotetop' , 'css_main' => 'quotemain' ), + 'code' => array( 'title' => 'CODE' , 'css_top' => 'codetop' , 'css_main' => 'codemain' ), 'sql' => array( 'title' => 'SQL' , 'css_top' => 'sqltop' , 'css_main' => 'sqlmain' ), 'html' => array( 'title' => 'HTML' , 'css_top' => 'htmltop' , 'css_main' => 'htmlmain' ) ); diff --git a/upload/sources/lib/search_mysql_ftext.php b/upload/sources/lib/search_mysql_ftext.php index 7a483ca9..34ae914d 100644 --- a/upload/sources/lib/search_mysql_ftext.php +++ b/upload/sources/lib/search_mysql_ftext.php @@ -2,25 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-11-22 12:58:39 -0600 (Wed, 22 Nov 2006) $ -| > $Revision: 739 $ +| > $Date: 2007-12-28 17:06:51 -0500 (Fri, 28 Dec 2007) $ +| > $Revision: 1152 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -32,16 +24,14 @@ +-------------------------------------------------------------------------- */ -if ( ! defined( 'IN_ACP' ) ) +if ( ! defined( 'IN_IPB' ) ) { - print "

    Неверный вход

    У Вас нет доступа к директиве этого файла. Если Вы проводили обновления, убедитесь, что не забыли обновить 'admin.php'."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } class search_lib extends Search { - - var $parser = ""; var $is = ""; var $resultlimit = ""; @@ -93,7 +83,7 @@ class search_lib extends Search { $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'search_word_short', 'EXTRA' => $this->ipsclass->vars['min_search_word']) ); } - else if ( strlen(trim($keywords)) > 100 ) + else if ( $this->ipsclass->txt_mb_strlen(trim($keywords)) > 100 ) { $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'search_word_long', 'EXTRA' => 100) ); } @@ -155,6 +145,12 @@ class search_lib extends Search { $approved = 'and p.queued IN (0,1)'; } + + //----------------------------------------- + // bad magic quotes - bad + //----------------------------------------- + + $check_keywords = $this->ipsclass->DB->add_slashes( $check_keywords ); //----------------------------------------- // How many results? @@ -196,7 +192,7 @@ class search_lib extends Search if ( $this->ipsclass->input['sortby'] != "relevant" ) { - $cache .= " ORDER BY p.post_date DESC"; + $cache .= " ORDER BY p.post_date {$this->is->sort_order}"; } $unique_id = md5(uniqid(microtime(),1)); @@ -351,12 +347,6 @@ class search_lib extends Search $row['class2'] = "row1"; $row['classposts'] = "row2"; - $this->topics->parser->parse_html = ( $this->ipsclass->forums->forum_by_id[$row['forum_id']]['use_html'] and $this->ipsclass->cache['group_cache'][ $row['mgroup'] ]['g_dohtml'] and $row['post_htmlstate'] ) ? 1 : 0; - $this->topics->parser->parse_wordwrap = $this->ipsclass->vars['post_wordwrap']; - $this->topics->parser->parse_nl2br = $row['post_htmlstate'] == 2 ? 1 : 0; - - $row['post'] = $this->topics->parser->pre_display_parse( $row['post'] ); - if ( $this->ipsclass->input['highlite'] ) { $row['post'] = $this->ipsclass->content_search_highlight( $row['post'], $this->ipsclass->input['highlite'] ); @@ -365,15 +355,15 @@ class search_lib extends Search $row['forum_name'] = $this->ipsclass->forums->forum_by_id[ $row['forum_id'] ]['name']; $this->output .= $this->ipsclass->compiled_templates['skin_search']->RenderPostRow($row, $member); - - //----------------------------------------- - // Add in attachments? + + //----------------------------------------- + // Add in attachments? // Sucks we have to do this inside the loop // however we have to check forum view perms - //----------------------------------------- - - if ( count( $attach_pids ) ) - { + //----------------------------------------- + + if ( count( $attach_pids ) ) + { if ( ! is_object( $this->class_attach ) ) { //----------------------------------------- @@ -396,8 +386,8 @@ class search_lib extends Search $this->output = $this->class_attach->render_attachments( $this->output, $attach_pids ); } } - - $this->output .= $this->ipsclass->compiled_templates['skin_search']->end_results_table(array( 'SHOW_PAGES' => $this->links ) , 1 ); + + $this->output .= $this->ipsclass->compiled_templates['skin_search']->end_results_table( array( 'SHOW_PAGES' => $this->links ), 1 ); $this->ipsclass->print->add_output("$this->output"); $this->ipsclass->print->do_output( array( 'TITLE' => $this->ipsclass->lang['g_simple_title'], 'JS' => 0, NAV => array( $this->ipsclass->lang['g_simple_title'] ) ) ); @@ -414,6 +404,10 @@ class search_lib extends Search function do_main_search() { + //----------------------------------------- + + $forums = $this->is->get_searchable_forums(); + //----------------------------------------- // Invisible topic-approval permissions? //----------------------------------------- @@ -427,24 +421,36 @@ class search_lib extends Search { if( $v['member_id'] == $this->ipsclass->member['id'] AND $v['post_q'] ) { - $my_invisible_forums_p[] = $v['forum_id']; + if( in_array( $v['forum_id'], $this->is->searchable_forums ) ) + { + $my_invisible_forums_p[] = $v['forum_id']; + } } if( $v['member_id'] == $this->ipsclass->member['id'] AND $v['topic_q'] ) { - $my_invisible_forums_t[] = $v['forum_id']; + if( in_array( $v['forum_id'], $this->is->searchable_forums ) ) + { + $my_invisible_forums_t[] = $v['forum_id']; + } } if( $v['is_group'] && ( $v['group_id'] == $this->ipsclass->member['mgroup'] OR in_array( $v['group_id'], explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ) ) ) && $v['post_q'] ) { - $my_invisible_forums_p[] = $v['forum_id']; + if( in_array( $v['forum_id'], $this->is->searchable_forums ) ) + { + $my_invisible_forums_p[] = $v['forum_id']; + } } if( $v['is_group'] && ( $v['group_id'] == $this->ipsclass->member['mgroup'] OR in_array( $v['group_id'], explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ) ) ) && $v['topic_q'] ) { - $my_invisible_forums_t[] = $v['forum_id']; + if( in_array( $v['forum_id'], $this->is->searchable_forums ) ) + { + $my_invisible_forums_t[] = $v['forum_id']; + } } } } @@ -571,10 +577,6 @@ class search_lib extends Search $this->is->search_in = 'titles'; } - //----------------------------------------- - - $forums = $this->is->get_searchable_forums(); - //----------------------------------------- // Do we have any forums to search in? //----------------------------------------- @@ -719,7 +721,7 @@ class search_lib extends Search $t_forum_query = $this->ipsclass->member['g_is_supmod'] ? "t.forum_id IN ($forums)" : ( count($my_invisible_forums_t) ? "( (t.forum_id IN ($forums) AND t.approved=1) OR t.forum_id IN(" . implode( ",", $my_invisible_forums_t ) . ") )" : - "t.forum_id IN ($forums)" ); + "t.forum_id IN ($forums) AND t.approved=1" ); if( $this->ipsclass->member['g_is_supmod'] ) { @@ -756,6 +758,12 @@ class search_lib extends Search { $p_forum_query = "(t.forum_id IN ($forums) AND t.approved=1 AND p.queued=0)"; } + + //----------------------------------------- + // bad magic quotes - bad + //----------------------------------------- + + $keywords = $this->ipsclass->DB->add_slashes( $keywords ); if ($type != 'nameonly') { @@ -765,6 +773,7 @@ class search_lib extends Search FROM ".SQL_PREFIX."topics t WHERE $topics_datecut $t_forum_query $topics_name AND MATCH(title) AGAINST ('".trim($keywords)."' $boolean) + ORDER BY t.last_post {$this->is->sort_order} LIMIT {$this->resultlimit}"; @@ -773,6 +782,7 @@ class search_lib extends Search LEFT JOIN ".SQL_PREFIX."topics t ON ( p.topic_id=t.tid ) WHERE $posts_datecut $p_forum_query $posts_name AND MATCH(post) AGAINST ('".trim($keywords)."' $boolean) + ORDER BY p.post_date {$this->is->sort_order} LIMIT {$this->resultlimit}"; } else @@ -788,6 +798,7 @@ class search_lib extends Search p.topic_id={$this->is->topic_id} AND $posts_datecut $p_forum_query $posts_name AND MATCH(post) AGAINST ('".trim($keywords)."' $boolean) + ORDER BY p.post_date {$this->is->sort_order} LIMIT {$this->resultlimit}"; } } @@ -798,6 +809,7 @@ class search_lib extends Search FROM ".SQL_PREFIX."topics t WHERE $topics_datecut $t_forum_query $topics_name + ORDER BY t.last_post {$this->is->sort_order} LIMIT {$this->resultlimit}"; $posts_query = "SELECT p.pid, p.queued, t.approved, t.forum_id @@ -805,6 +817,7 @@ class search_lib extends Search LEFT JOIN ".SQL_PREFIX."topics t ON ( p.topic_id=t.tid ) WHERE $posts_datecut $p_forum_query $posts_name + ORDER BY p.post_date {$this->is->sort_order} LIMIT {$this->resultlimit}"; } //print $topics_query."
    ".$posts_query; exit(); @@ -830,7 +843,7 @@ class search_lib extends Search if ( ! $this->is->topic_search_only ) { $this->ipsclass->DB->query($topics_query); - + $total_t = $this->ipsclass->DB->get_num_rows(); while ($row = $this->ipsclass->DB->fetch_row() ) @@ -881,63 +894,66 @@ class search_lib extends Search // PID: Get 'em //----------------------------------------- - $this->ipsclass->DB->query($posts_query); - - $total_p = $this->ipsclass->DB->get_num_rows(); - - while ($row = $this->ipsclass->DB->fetch_row() ) + if( $this->is->search_in != 'titles' ) { - /*if( $row['queued'] ) + $this->ipsclass->DB->query($posts_query); + + $total_p = $this->ipsclass->DB->get_num_rows(); + + while ($row = $this->ipsclass->DB->fetch_row() ) { - if( !$this->ipsclass->member['g_is_supmod'] ) + /*if( $row['queued'] ) { - if( !in_array( $row['forum_id'], $my_invisible_forums_p ) ) + if( !$this->ipsclass->member['g_is_supmod'] ) { - continue; + if( !in_array( $row['forum_id'], $my_invisible_forums_p ) ) + { + continue; + } } } + + if( !$row['approved'] ) + { + if( !$this->ipsclass->member['g_is_supmod'] ) + { + if( !in_array( $row['forum_id'], $my_invisible_forums_t ) ) + { + continue; + } + } + }*/ + + //$post_tmp[ $row['pid'] ] = $row['pid']; + $post_array[ $row['pid'] ] = $row['pid']; } - if( !$row['approved'] ) - { - if( !$this->ipsclass->member['g_is_supmod'] ) - { - if( !in_array( $row['forum_id'], $my_invisible_forums_t ) ) - { - continue; - } - } - }*/ - - //$post_tmp[ $row['pid'] ] = $row['pid']; - $post_array[ $row['pid'] ] = $row['pid']; - } - - $this->ipsclass->DB->free_result(); - - if( $total_p == $this->resultlimit ) - { - $more = 1; - } - - //----------------------------------------- - // PID Sort 'em - //----------------------------------------- - - /*krsort( $post_tmp ); - - foreach( $post_tmp as $id => $pid ) - { - $p_cnt++; - - if ( $p_cnt > $this->resultlimit ) + $this->ipsclass->DB->free_result(); + + if( $total_p == $this->resultlimit ) { $more = 1; - break; } - - $post_array[ $pid ] = $pid; - }*/ + + //----------------------------------------- + // PID Sort 'em + //----------------------------------------- + + /*krsort( $post_tmp ); + + foreach( $post_tmp as $id => $pid ) + { + $p_cnt++; + + if ( $p_cnt > $this->resultlimit ) + { + $more = 1; + break; + } + + $post_array[ $pid ] = $pid; + }*/ + } //----------------------------------------- @@ -974,7 +990,7 @@ class search_lib extends Search 'post_id' => $posts, 'topic_max' => intval( count( $topic_array ) ), 'post_max' => intval( count( $post_array ) ), - 'keywords' => str_replace( '"', "", $keywords ), + 'keywords' => str_replace( '"', "", str_replace( '\\\\', '\\', $keywords ) ), 'query_cache' => $more, ); diff --git a/upload/sources/lib/search_mysql_man.php b/upload/sources/lib/search_mysql_man.php index 388fad81..a277a689 100644 --- a/upload/sources/lib/search_mysql_man.php +++ b/upload/sources/lib/search_mysql_man.php @@ -2,25 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-11-22 12:58:39 -0600 (Wed, 22 Nov 2006) $ -| > $Revision: 739 $ +| > $Date: 2008-04-23 15:02:02 -0400 (Wed, 23 Apr 2008) $ +| > $Revision: 1254 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -32,15 +24,14 @@ +-------------------------------------------------------------------------- */ -if ( ! defined( 'IN_ACP' ) ) +if ( ! defined( 'IN_IPB' ) ) { - print "

    Неверный вход

    У Вас нет доступа к директиве этого файла. Если Вы проводили обновления, убедитесь, что не забыли обновить 'admin.php'."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } class search_lib extends Search { - var $parser = ""; var $is = ""; var $resultlimit = ""; @@ -54,6 +45,12 @@ class search_lib extends Search $this->resultlimit = $this->is->resultlimit; } + + function do_simple_search() + { + return $this->do_main_search(); + } + //----------------------------------------- // Main Board Search-e-me-doo-daa //----------------------------------------- @@ -240,7 +237,7 @@ class search_lib extends Search } - if ( strlen(trim($keywords)) > 100 ) + if ( $this->ipsclass->txt_mb_strlen(trim($keywords)) > 100 ) { $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'search_word_long', 'EXTRA' => 100) ); } @@ -302,31 +299,43 @@ class search_lib extends Search { if( $v['member_id'] == $this->ipsclass->member['id'] AND $v['post_q'] ) { - $my_invisible_forums_p[] = $v['forum_id']; + if( in_array( $v['forum_id'], $this->is->searchable_forums ) ) + { + $my_invisible_forums_p[] = $v['forum_id']; + } } if( $v['member_id'] == $this->ipsclass->member['id'] AND $v['topic_q'] ) { - $my_invisible_forums_t[] = $v['forum_id']; + if( in_array( $v['forum_id'], $this->is->searchable_forums ) ) + { + $my_invisible_forums_t[] = $v['forum_id']; + } } if( $v['is_group'] && ( $v['group_id'] == $this->ipsclass->member['mgroup'] OR in_array( $v['group_id'], explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ) ) ) && $v['post_q'] ) { - $my_invisible_forums_p[] = $v['forum_id']; + if( in_array( $v['forum_id'], $this->is->searchable_forums ) ) + { + $my_invisible_forums_p[] = $v['forum_id']; + } } if( $v['is_group'] && ( $v['group_id'] == $this->ipsclass->member['mgroup'] OR in_array( $v['group_id'], explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ) ) ) && $v['topic_q'] ) { - $my_invisible_forums_t[] = $v['forum_id']; + if( in_array( $v['forum_id'], $this->is->searchable_forums ) ) + { + $my_invisible_forums_t[] = $v['forum_id']; + } } } } $t_forum_query = $this->ipsclass->member['g_is_supmod'] ? "t.forum_id IN ($forums)" : ( count($my_invisible_forums_t) ? "( (t.forum_id IN ($forums) AND t.approved=1) OR t.forum_id IN(" . implode( ",", $my_invisible_forums_t ) . ") )" : - "t.forum_id IN ($forums)" ); + "( t.forum_id IN ($forums) AND t.approved=1)" ); if( $this->ipsclass->member['g_is_supmod'] ) { @@ -379,6 +388,7 @@ class search_lib extends Search FROM ".SQL_PREFIX."topics t WHERE {$topic_filter}{$topics_datecut} $t_forum_query $topics_name AND ($title_like) + ORDER BY t.last_post {$this->is->sort_order} LIMIT {$this->resultlimit}"; @@ -387,6 +397,7 @@ class search_lib extends Search LEFT JOIN ".SQL_PREFIX."topics t on (t.tid=p.topic_id) WHERE {$topic_filter}{$posts_datecut} $p_forum_query $posts_name AND ($post_like) + ORDER BY p.post_date {$this->is->sort_order} LIMIT {$this->resultlimit}"; } else @@ -395,6 +406,7 @@ class search_lib extends Search FROM ".SQL_PREFIX."topics t WHERE $topics_datecut $t_forum_query $topics_name + ORDER BY t.last_post {$this->is->sort_order} LIMIT {$this->resultlimit}"; @@ -404,6 +416,7 @@ class search_lib extends Search WHERE $posts_datecut $p_forum_query AND p.queued=0 $posts_name + ORDER BY p.post_date {$this->is->sort_order} LIMIT {$this->resultlimit}"; } @@ -421,14 +434,14 @@ class search_lib extends Search //----------------------------------------- $this->ipsclass->DB->query($topics_query); - + $topic_max_hits = $this->ipsclass->DB->get_num_rows(); - + if( $topic_max_hits == $this->resultlimit ) - { + { $more = 1; } - + while ($row = $this->ipsclass->DB->fetch_row() ) { /*if( !$row['approved'] ) @@ -461,7 +474,7 @@ class search_lib extends Search $this->ipsclass->DB->query($posts_query); $post_max_hits = $this->ipsclass->DB->get_num_rows(); - + if( $post_max_hits == $this->resultlimit ) { $more = 1; diff --git a/upload/sources/lib/skin_info.php b/upload/sources/lib/skin_info.php index 686c3bc0..bc4a77cf 100644 --- a/upload/sources/lib/skin_info.php +++ b/upload/sources/lib/skin_info.php @@ -1,209 +1,217 @@ "Содержание страницы", -'TABLE, TR, TD' => "Таблица по умолчанию", -'a:link, a:visited, a:active' => "Ссылка по умолчанию", -'a:hover' => "Ссылка по умолчанию при наведении курсора", -'.googlebottom, .googlebottom a:link, .googlebottom a:visited, .googlebottom a:active' => "Результаты простого поиска: темный", -'.googlish, .googlish a:link, .googlish a:visited, .googlish a:active' => "Результаты простого поиска: ссылка на тему", -'.googlesmall, .googlesmall a:link, .googlesmall a:active, .googlesmall a:visited' => "Результаты простого поиска: маленький текст", -'option.sub' => "Форма поиска: меню выбора форумов: цвет подкатегории", -'.caldate' => "Календарь: дата", -'#ucpmenu' => "Личные данные пользователя: цвет меню", -'#ucpcontent' => "Личные данные пользователя: цвет шрифта", -'#logostrip' => "Верхняя часть форума: полоса с логотипом", -'#submenu' => "Верхняя часть форума: полоса с иконками", -'#submenu a:link, #submenu a:visited, #submenu a:active' => "Верхняя часть форума: полоска с иконками - цвет ссылок полосы с иконками", -'#userlinks' => "Верхняя часть форума: меню пользователя", -'.activeuserstrip' => 'Форумы и топики: активные пользователи', -'.tablesubheader' => 'Глобально: подзаголовок', -'.pformleft' => 'Глобально: левая колонка', -'.pformleftw' => 'Глобально: ширина левой колонки', -'.pformright' => 'Глобально: правая колонка', -'.post1' => 'Просмотр сообщений: альтернативный цвет #1', -'.post2' => 'Просмотр сообщений: альтернативный цвет #2', -'.postlinksbar' => 'Просмотр сообщений: подписка на тему и другие ссылки', -'.row1' => 'Глобально: альтернативная строка #1', -'.row2' => 'Глобально: альтернативная строка #2', -'.row3' => 'Глобально: альтернативная строка #3', -'.row4' => 'Глобально: альтернативная строка #4', -'.darkrow1' => 'Глобально: альтернативная темная строка #1', -'.darkrow2' => 'Глобально: альтернативная темная строка #2', -'.darkrow3' => 'Глобально: альтернативная темная строка #3', -'.hlight' => 'Персональные сообщения: входящие — выбранная строка', -'.dlight' => 'Персональные сообщения: входящие — невыбранная строка', -'.tablesubheader' => 'Глобально: подзаголовок (меньший)', -'.tablesubheader a:link, .tablesubheader a:visited, .tablesubheader a:active' =>'Глобально: ссылки подзаголовка (меньшего)', -'.maintitle' => 'Глобально: заголовок главной таблицы', -'.maintitle a:link, .maintitle a:visited, .maintitle a:active' => 'Глобально: ссылки заголовка главной таблицы', -'.plainborder' => 'Глобально: альтернативная таблица #1', -'.tableborder' => 'Глобально: цвет фона между ячейками таблицы', -'.tablefill' => 'Глобально: альтернативная таблица #2', -'.tablepad' => 'Глобально: альтернативная таблица #3', -'.desc' => 'Просмотр форума: информация о последнем сообщении', -'.signature' => 'Просмотр сообщений: подпись', -'.normalname' => 'Просмотр сообщений: имя пользователя (зарегистрированное)', -'.unreg' => 'Просмотр сообщений: незарегистрированное имя', -'.searchlite' => 'Глобально: цвет подсветки ключевых слов поиска', -'#QUOTE' => 'Блок цитаты', -'#CODE' => 'Блок программного кода', +'BODY' => "Web Page Body", +'TABLE, TR, TD' => "Default table", +'a:link, a:visited, a:active' => "Default link", +'a:hover' => "Default link hover", +'.googlebottom, .googlebottom a:link, .googlebottom a:visited, .googlebottom a:active' => "Simple Search Results: Dark", +'.googlish, .googlish a:link, .googlish a:visited, .googlish a:active' => "Simple Search Results: Topic Link", +'.googlesmall, .googlesmall a:link, .googlesmall a:active, .googlesmall a:visited' => "Simple Search Results: Small Text", +'option.sub' => "Search Form: Select forums box: subcat colour", +'.caldate' => "Calendar: Date", +'#ucpmenu' => "User CP: Menu colour", +'#ucpcontent' => "User CP: Content colour", +'#logostrip' => "Board Header: Logo Strip", +'#submenu' => "Board Header: Icon Strip", +'#submenu a:link, #submenu a:visited, #submenu a:active' => "Board Header: Icon Strip link colours", +'#userlinks' => "Board Header: Member Bar", +'.activeuserstrip' => 'Forums & Topics: Active users bar', +'.tablesubheader' => 'Global: Sub heading', +'.pformleft' => 'Global: left side table cell', +'.pformleftw' => 'Global: left side table cell wide', +'.pformright' => 'Global: right side table cell', +'.post1' => 'Post View: Alt colour #1', +'.post2' => 'Post View: Alt colour #2', +'.postlinksbar' => 'Post View: Track topic, etc links', +'.row1' => 'Global: Alt row #1', +'.row2' => 'Global: Alt row #2', +'.row3' => 'Global: Alt row #3', +'.row4' => 'Global: Alt row #4', +'.darkrow1' => 'Global: Alt dark row #1', +'.darkrow2' => 'Global: Alt dark row #2', +'.darkrow3' => 'Global: Alt dark row #3', +'.hlight' => 'Msgr: Inbox row selected', +'.dlight' => 'Msgr: Inbox row not selected', +'.tablesubheader' => 'Global: Sub heading (minor)', +'.tablesubheader a:link, .tablesubheader a:visited, .tablesubheader a:active' =>'Global: Sub heading (minor) Links', +'.maintitle' => 'Global: Main table heading', +'.maintitle a:link, .maintitle a:visited, .maintitle a:active' => 'Global: Main table heading Links', +'.plainborder' => 'Global: Table alt #1', +'.tableborder' => 'Global: Table cellspacing colour', +'.tablefill' => 'Global: Table alt #2', +'.tablepad' => 'Global: Table alt #3', +'.desc' => 'Forum View: Last post info', +'.signature' => 'Post View: Signature', +'.normalname' => 'Post View: Member name (reg)', +'.unreg' => 'Post View: Unreg name', +'.searchlite' => 'Global: Search highlighting', +'#QUOTE' => 'Quote Box', +'#CODE' => 'Code Box', ); $skin_names = array( 'skin_boards' => array( - 'skin_boards (главная страница) ', - 'Элементы главной страницы форума (отображает все форумы и подфорумы), такие, как ссылки на форумы, блок активных пользователей, статистика, именинники и последние события календаря.', + 'Board Index', + 'Elements for the board index listing (shows you all the forums and is the first page you see when visiting the board) such as + forum link HTML, active user overview HTML, board statistics overview HTML, today\'s birthdays overview HTML', 'act=idx' ), - + 'skin_buddy' => array( - 'skin_buddy (помощник)', - 'Элементы окна «Помощник» включая ссылки и форму поиска.', + 'MyAssistant', + 'Elements for the myAssistant feature, including links and search boxes', 'act=buddy', ), + 'skin_bugtracker'=> array( + 'BugTracker', + 'Elements for the IPB BugTracker', + '' + ), 'skin_calendar'=> array( - 'skin_calendar (календарь)', - 'Элементы календаря, включая просмотр самого календаря, дней календаря и конкретных событий.', + 'Calendar', + 'Elements for the calendar, including calendar view, view events', 'act=calendar' ), + 'skin_chatpara'=> array( + 'Parachat', + 'Elements for the Parachat Chat Room', + '' + ), + 'skin_chatsigma'=> array( + 'SigmaChat', + 'Elements for the SigmaChat Chat Room', + '' + ), 'skin_editors' => array( - 'skin_editors (редактор сообщений)', - 'Элементы стандартного и rich text редакторов, используемых для создания сообщений.', + 'Post / PM Editor', + 'Elements from the standard and rich text editors used when creating a new PM or post.', '', ), - 'skin_emails' => array( - 'skin_emails (контакты пользователя)', - 'Элементы различных форм контактов, такие как e-mail и жалоба пользователя на некорректное сообщение.', + 'skin_emails' => array( + 'Member Contact', + 'Elements from various contact methods, such as email form and report post to moderator form', '', ), 'skin_forum' => array( - 'skin_forum (просмотр конкретного форума)', - 'Элементы отображения конкретного форума (список тем и опросов), включая свои правила выбранного форума и т.д.', + 'Forum Index', + 'Elements for forum view (list all topics in forum). Includes forum log in window, forum rules', 'act=SF&f=1', ), 'skin_global' => array( - 'skin_global (глобальные шаблоны)', - 'Различные глобальные элементы форума — верхняя (логотип с ссылками) и нижняя часть всех страниц форума, промежуточная страница переадресации, страница описания ошибки форума и т.д.', + 'All Global HTML', + 'Various HTML elements such as board header, redirect page, error page', ), - 'skin_help' => array( - 'skin_help (помощь)', - 'Элементы раздела «Помощь».', + 'skin_help' => array( + 'Help', + 'Elements for the help screen, including search boxes and view help files', 'act=help' ), 'skin_legends' => array( - 'skin_legends (вспомогательные страницы)', - 'Элементы различных вспомогательных страниц типа страницы со всеми смайликами, описанием BB кодов форума и т.д.', + 'Board Legends', + 'Elements for the "view all emoticons" windows, and the "Find User"', 'act=legends' ), 'skin_login' => array( - 'skin_login (вход в форум)', - 'Элементы авторизации пользователя для входа на форум.', + 'Log In', + 'Elements for the log in form', 'act=Login' ), 'skin_mlist' => array( - 'skin_mlist (список пользователей)', - 'Все элементы списка всех пользователей форума.', + 'Member List', + 'Elements for the member list views', 'act=Members' ), 'skin_mod' => array( - 'skin_mod (функции модератора)', - 'Элементы для работы модераторов, такие как удаление тему, редактирование тему и т.д.', + 'Moderator Function', + 'Elements for the moderator tools such as delete topic, edit topic and the moderator CP', ), 'skin_msg' => array( - 'skin_msg (личные сообщения)', - 'Элементы личных сообщений, такие как входящие сообщения, написание новых личных сообщений, архивирование и т.д.', + 'Messenger', + 'Elements for the messenger, such as view inbox, view message, archive messages, etc', 'act=Msg', ), 'skin_online' => array ( - 'skin_online (список активных пользователей)', - 'Все элементы отображения раздела активных пользователей.', + 'Online List', + 'Elements for the "Show all online users" link', 'act=Online', ), 'skin_poll' => array ( - 'skin_poll (просмотр опросов)', - 'Элементы просмотра опросов, включая результаты опроса и т.д.', + 'View Poll', + 'Elements for the poll view, includes vote form and vote results', ), 'skin_post' => array( - 'skin_post (публикация сообщений)', - 'Элементы публикации сообщений, открытие темы и т.д.', + 'Post Screen', + 'Elements for the post screens such as new topic, reply to topic, quote post, edit post, some messenger new PM sections, some calender new event', ), 'skin_printpage'=> array( - 'skin_printpage (версия темы для печати)', - 'Все элементы версии темы для печати.', + 'Printable Topic', + 'Elements for displaying the "printable topic" page', ), 'skin_profile' => array( - 'skin_profile (просмотр профиля)', - 'Элементы просмотра профиля пользователей, данные, фотография и т.д.', + 'Profile View', + 'Elements for viewing a members profile', 'showuser=1', ), 'skin_register' => array( - 'skin_register (регистрация)', - 'Элементы страниц регистрации, активации учетной записи и т.д.', + 'Register', + 'Elements for the register form, validate account form and COPPA forms', 'act=Reg', ), 'skin_search' => array( - 'skin_search (поиск)', - 'Элементы формы поиска и результатыпоиска...', + 'Search', + 'Elements for the search forum and the results view', 'act=Search', ), 'skin_stats' => array( - 'skin_stats (статистика)', - 'Элементы различных функций, таких как вывод администраторов и модераторов форума, активных тем и т.д.', + 'Statistics', + 'Elements for various functions such as "View Moderating Team", "View todays top 10 posts", "View Active Topics"', 'act=Stats', ), 'skin_topic' => array( - 'skin_topic (просмотр темы)', - 'Элементы просмотра темы, такие как просмотр сообщений, прикрепленные файлы, форма быстрого ответа и т.д.', + 'Topic View', + 'Elements for the topic view screen, such as post view, inline attachment view, etc.', 'showtopic=1' ), - + 'skin_modcp' => array( - 'skin_modcp (панель управления модератора)', - 'Элементы секций панели управления для модератора.', + 'Mod CP', + 'Elements for the moderators control panel sections.', 'act=ModCP', ), - + 'skin_portal' => array( - 'skin_portal (портал)', - 'Все элементы портала для IPB.', + 'IPB Portal', + 'Elements for IPB Portal.', ), - - + + 'skin_ucp' => array( - 'skin_ucp (личные данные пользователя)', - 'Элементы личных данных пользователя, такие как редактирование профиля, настроек форума, подпись, аватар и т.д.', + 'User Control Panel', + 'Elements for the user control panel, such as the menu (also used in Messenger Views), edit profile, edit signature, edit avatar, etc.', 'act=UserCP', ), - - + + 'skin_subscriptions' => array( - 'skin_subscriptions (менеджер подписок)', - 'Элементы менеджера подписок.', + 'Subscriptions Manager', + 'Elements for the subscription manager.', ) ); diff --git a/upload/sources/lib/tar.php b/upload/sources/lib/tar.php index fa25869c..0b142c6c 100644 --- a/upload/sources/lib/tar.php +++ b/upload/sources/lib/tar.php @@ -2,26 +2,18 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-10-03 06:14:55 -0500 (Tue, 03 Oct 2006) $ -| > $Revision: 596 $ -| > $Author: matt $ +| > $Date: 2007-09-17 18:06:06 -0400 (Mon, 17 Sep 2007) $ +| > $Revision: 1106 $ +| > $Author: bfarber $ +--------------------------------------------------------------------------- | | > Tar creation and extraction module @@ -66,14 +58,14 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Неверный вход

    У Вас нет доступа к директиве этого файла. Если Вы проводили обновления, убедитесь, что не забыли обновить 'admin.php'."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } class tar { var $tar_header_length = '512'; - var $tar_unpack_header = 'a100filename/a8mode/a8uid/a8gid/a12size/a12mtime/a8chksum/a1typeflag/a100linkname/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor/a155/prefix'; + var $tar_unpack_header = 'a100filename/a8mode/a8uid/a8gid/a12size/a12mtime/a8chksum/a1typeflag/a100linkname/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor/a155prefix'; var $tar_pack_header = 'A100 A8 A8 A8 A12 A12 A8 A1 A100 A6 A2 A32 A32 A8 A8 A155'; var $current_dir = ""; var $unpack_dir = ""; diff --git a/upload/sources/loginauth/convert/auth.php b/upload/sources/loginauth/convert/auth.php index 9d8a3153..c67c22f3 100644 --- a/upload/sources/loginauth/convert/auth.php +++ b/upload/sources/loginauth/convert/auth.php @@ -1,24 +1,15 @@ LOG IN MODULE: Converted Board Modules @@ -66,19 +57,19 @@ class login_method extends login_core var $member; var $ipsclass; var $password_field = 'conv_password'; - + /*-------------------------------------------------------------------------*/ // Constructor /*-------------------------------------------------------------------------*/ - + function login_method() { } - + /*-------------------------------------------------------------------------*/ // Authentication /*-------------------------------------------------------------------------*/ - + function authenticate( $username, $password ) { // Check if we have actually converted. @@ -87,17 +78,17 @@ class login_method extends login_core $this->return_code = "WRONG_AUTH"; return; } - + // Check for old or new system if(! $this->ipsclass->DB->field_exists('conv_password', 'members') ) { $this->password_field = 'legacy_password'; } - + $this->_load_member( $username ); - + $login_handler_code = end(explode("_", $this->ipsclass->vars['conv_chosen'])); - + switch($login_handler_code) { case 'vb3': @@ -114,15 +105,24 @@ class login_method extends login_core case 'yabbse': $this->authenticate_smf( $username, $password ); break; + case 'yabb20': + $this->authenticate_yabb20( $username, $password ); case 'ubbt5': $this->authenticate_ubbthreads5( $username, $password ); break; case 'snitz': $this->authenticate_snitz( $username, $password ); break; - case 'punbb': - $this->authenticate_punbb( $username, $password ); - break; + case 'punbb': + $this->authenticate_punbb( $username, $password ); + break; + case 'dcforumplus': + $this->authenticate_dcforum( $username, $password ); + break; + case 'wwwthreads': + $this->authenticate_wwwthreads( $username, $password ); + case 'simpleforum': + $this->authenticate_simpleforum( $username, $password ); default: $this->return_code = "WRONG_AUTH"; return; @@ -130,15 +130,37 @@ class login_method extends login_core return; } - /*-------------------------------------------------------------------------*/ - // Authentication for punBB - /*-------------------------------------------------------------------------*/ - - function authenticate_punbb( $username, $password ) + /*-------------------------------------------------------------------------*/ + // Authentication for DCForum+ + /*-------------------------------------------------------------------------*/ + + function authenticate_dcforum( $username, $password ) + { + $current_password = $this->member[ $this->password_field ]; + $crypted_password = crypt( $password, substr($current_password, 0, 2) ); + $single_md5_pass = md5( $password ); + + if ($current_password == $crypted_password) + { + $this->_clean_convert_data( $single_md5_pass ); + $this->return_code = "SUCCESS"; + } + else + { + $this->return_code = "WRONG_AUTH"; + } + return; + } + + /*-------------------------------------------------------------------------*/ + // Authentication for punBB + /*-------------------------------------------------------------------------*/ + + function authenticate_punbb( $username, $password ) { $success = false; $single_md5_pass = md5( $password ); - + if (function_exists('sha1')) { if(sha1($password) == $this->member[ $this->password_field ]) @@ -160,105 +182,104 @@ class login_method extends login_core $success = true; } } - + if( $success ) { $this->_clean_convert_data( $single_md5_pass ); $this->return_code = "SUCCESS"; return; } - + $this->return_code = "WRONG_AUTH"; return; } - + /*-------------------------------------------------------------------------*/ // Authentication for Snitz /*-------------------------------------------------------------------------*/ - + function authenticate_snitz( $username, $password ) { require_once('./sources/loginauth/convert/auth_sha256.php'); $sha = new auth_sha256(); - + if ( $this->member['misc']) { $sha256_password = $sha->SHA256( $password ); $single_md5_pass = md5( $password ); - + if ( $sha256_password == $this->member['misc'] ) - { + { $this->_clean_convert_data( $single_md5_pass ); - + $this->return_code = 'SUCCESS'; return; } } $this->return_code = 'WRONG_AUTH'; } - + /*-------------------------------------------------------------------------*/ // Authentication for vB3 /*-------------------------------------------------------------------------*/ - + function authenticate_vb3( $username, $password ) { if ( $this->member['misc']) { $single_md5_pass = md5( $password ); - + $decr = md5( $single_md5_pass . $this->member['misc'] ); - + if ( $decr == $this->member[ $this->password_field ] ) - { + { $this->_clean_convert_data( $single_md5_pass ); - + $this->return_code = 'SUCCESS'; return; } - + } $this->return_code = 'WRONG_AUTH'; } - - + /*-------------------------------------------------------------------------*/ // Authentication for iB3.1 /*-------------------------------------------------------------------------*/ - + function authenticate_ib31( $username, $password ) { $decr = md5( $password . $username ); $single_md5_pass = md5( $password ); - + if ( $decr == $this->member[ $this->password_field ] ) - { + { $this->_clean_convert_data( $single_md5_pass ); - + $this->return_code = "SUCCESS"; return; } - + $this->return_code = "WRONG_AUTH"; } /*-------------------------------------------------------------------------*/ // Authentication for SMF 1.1 /*-------------------------------------------------------------------------*/ - + function authenticate_smf11( $username, $password ) { $single_md5_pass = md5($password); - + if($this->member['misc']) { $username_low = strtolower($username); - + $sha1_password = sha1($username_low . $password); - + $success = false; - + if($sha1_password == $this->member[ $this->password_field ]) { $success = true; @@ -266,7 +287,7 @@ class login_method extends login_core else { $this->authenticate_smf( $username, $password ); - + if($this->return_code == "SUCCESS") { $success = true; @@ -278,25 +299,24 @@ class login_method extends login_core $this->return_code = "SUCCESS"; return; } - + $this->return_code = "WRONG_AUTH"; return; } } - - + /*-------------------------------------------------------------------------*/ // Authentication for SMF / YABB.SE /*-------------------------------------------------------------------------*/ - + function authenticate_smf( $username, $password ) { if($this->member['misc']) { $single_md5_pass = md5( $password ); - + $success = false; - + if ( crypt( $password, substr( $password,0,2 ) ) == $this->member[ $this->password_field ] ) { $success = true; @@ -309,29 +329,29 @@ class login_method extends login_core { $success = true; } - + if( $success ) { $this->_clean_convert_data( $single_md5_pass ); $this->return_code = "SUCCESS"; return; } - + } $this->return_code = "WRONG_AUTH"; return; } - + //*-------------------------------------------------------------------------*/ // Authentication for UBB.Threads 5 //*-------------------------------------------------------------------------*/ - + function authenticate_ubbthreads5( $username, $password ) { $single_md5_pass = md5( $password ); - + $success = false; - + if(crypt($password, $this->member[ $this->password_field ]) == $this->member[ $this->password_field ]) { $success = true; @@ -340,43 +360,140 @@ class login_method extends login_core { $success = true; } - + if( $success ) { $this->_clean_convert_data( $single_md5_pass ); $this->return_code = "SUCCESS"; return; } - + $this->return_code = "WRONG_AUTH"; return; } - + + //*-------------------------------------------------------------------------*/ + // Authentication for WWWThreads + //*-------------------------------------------------------------------------*/ + + function authenticate_wwwthreads( $username, $password ) + { + $single_md5_pass = md5( $password ); + + if ( $this->member['misc']) + { + $sha1_in_db = (strlen($db_password_hash) == 40) ? true : false; + $sha1_available = (function_exists('sha1') || function_exists('mhash')) ? true : false; + + if ( function_exists('sha1') ) { + $form_password_hash = sha1($str); + } else if (function_exists('mhash')) { + $form_password_hash = bin2hex(mhash(MHASH_SHA1, $str)); + } else { + $form_password_hash = md5($str); + } + + if ($sha1_in_db && $sha1_available && $db_password_hash == $form_password_hash) { + $authorized = true; + } else if (!$sha1_in_db && $db_password_hash == md5($form_password)) { + $authorized = true; + } + + if( $authorized ) + { + $this->_clean_convert_data( $single_md5_pass ); + $this->return_code = "SUCCESS"; + return; + } + } + + $this->return_code = "WRONG_AUTH"; + return; + } + + /*-------------------------------------------------------------------------*/ + // Authentication for YABB2.0 + /*-------------------------------------------------------------------------*/ + + function authenticate_yabb20( $username, $password ) + { + + $myhash = rtrim(base64_encode(pack("H*",md5($password))),"="); + + $single_md5_pass = md5( $password ); + + $success = false; + + if ( $myhash == $this->member[ $this->password_field ] ) + { + $success = true; + } + + if( $success ) + { + $this->_clean_convert_data( $single_md5_pass ); + $this->return_code = "SUCCESS"; + return; + } + + $this->return_code = "WRONG_AUTH"; + return; + } + + /*-------------------------------------------------------------------------*/ + // Authentication for Simple Forum + /*-------------------------------------------------------------------------*/ + + function authenticate_simpleforum( $username, $password ) + { + + $myhash = crypt($password, 'SiMpLeFoRuM'); + + $single_md5_pass = md5( $password ); + + $success = false; + + if ( $myhash == $this->member[ $this->password_field ] ) + { + $success = true; + } + + if( $success ) + { + $this->_clean_convert_data( $single_md5_pass ); + $this->return_code = "SUCCESS"; + return; + } + + $this->return_code = "WRONG_AUTH"; + return; + } + /*-------------------------------------------------------------------------*/ // Utility Functions /*-------------------------------------------------------------------------*/ - + /*-------------------------------------------------------------------------*/ // Load member from DB /*-------------------------------------------------------------------------*/ - + function _load_member( $username ) { $this->member = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'members', 'where' => "name='" . $username . "'" ) ); } - + /*-------------------------------------------------------------------------*/ // Clean-Up The Converted Data /*-------------------------------------------------------------------------*/ - + function _clean_convert_data( $new_pass ) { $clear_pass_field = "," . $this->password_field . "=''"; $this->ipsclass->DB->query("UPDATE ibf_members SET misc='' {$clear_pass_field} WHERE id={$this->member['id']}"); $this->ipsclass->converge->converge_update_password( $new_pass, $this->member['email'] ); } - - function _md5_hmac($data, $key) + + function _md5_hmac($data, $key) { if (strlen($key) > 64) $key = pack('H*', md5($key)); diff --git a/upload/sources/loginauth/convert/auth_sha256.php b/upload/sources/loginauth/convert/auth_sha256.php index b49b7cce..0f35fc96 100644 --- a/upload/sources/loginauth/convert/auth_sha256.php +++ b/upload/sources/loginauth/convert/auth_sha256.php @@ -1,25 +1,16 @@ LOG IN MODULE: Snitz @@ -254,4 +245,5 @@ class auth_sha256 return $lWordArray; } } + ?> \ No newline at end of file diff --git a/upload/sources/loginauth/convert/index.html b/upload/sources/loginauth/convert/index.html index 250b1f72..b49fc27d 100644 --- a/upload/sources/loginauth/convert/index.html +++ b/upload/sources/loginauth/convert/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/sources/loginauth/external/auth.php b/upload/sources/loginauth/external/auth.php index 5992389d..1b545a41 100644 --- a/upload/sources/loginauth/external/auth.php +++ b/upload/sources/loginauth/external/auth.php @@ -1,24 +1,15 @@ LOG IN MODULE: EXTERNAL DB (IPB AUTH) @@ -45,7 +36,7 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -53,24 +44,24 @@ class login_method extends login_core { # Globals var $ipsclass; - - + + /*-------------------------------------------------------------------------*/ // Constructor /*-------------------------------------------------------------------------*/ - + function login_method() { - + } - + /*-------------------------------------------------------------------------*/ // Compare passwords // $password is the plain text password // $remote_member is the DB row from the remote DB table // Return TRUE or FALSE /*-------------------------------------------------------------------------*/ - + function _compare_passwords( $password, $remote_member ) { if ( md5($password) == $remote_member[ REMOTE_FIELD_PASS ] ) @@ -82,58 +73,58 @@ class login_method extends login_core return FALSE; } } - + /*-------------------------------------------------------------------------*/ // Authentication /*-------------------------------------------------------------------------*/ - + function authenticate( $username, $password ) { if( $this->is_admin_auth AND $this->login_method['login_type'] == 'passthrough' ) { // Try local first, so as to not block locally created admins $this->admin_auth_local( $username, $password ); - + if ( $this->return_code == 'SUCCESS' ) { return; } } - + /*-------------------------------------------------------------------------*/ // SET UP: Edit DB details to suit /*-------------------------------------------------------------------------*/ - + define( 'REMOTE_DB_SERVER' , $this->login_conf['REMOTE_DB_SERVER'] ); define( 'REMOTE_DB_PORT' , $this->login_conf['REMOTE_DB_PORT'] ); define( 'REMOTE_DB_DATABASE', $this->login_conf['REMOTE_DB_DATABASE'] ); define( 'REMOTE_DB_USER' , $this->login_conf['REMOTE_DB_USER'] ); define( 'REMOTE_DB_PASS' , $this->login_conf['REMOTE_DB_PASS'] ); - + /*-------------------------------------------------------------------------*/ // SET UP: Edit these DB tables to suit /*-------------------------------------------------------------------------*/ - + define( 'REMOTE_TABLE_NAME' , $this->login_conf['REMOTE_TABLE_NAME'] ); define( 'REMOTE_FIELD_NAME' , $this->login_conf['REMOTE_FIELD_NAME'] ); define( 'REMOTE_FIELD_PASS' , $this->login_conf['REMOTE_FIELD_PASS'] ); define( 'REMOTE_EXTRA_QUERY' , $this->login_conf['REMOTE_EXTRA_QUERY'] ); define( 'REMOTE_TABLE_PREFIX', $this->login_conf['REMOTE_TABLE_PREFIX'] ); - + //----------------------------------------- // GET DB object //----------------------------------------- - + if ( ! class_exists( 'db_main' ) ) - { + { require_once( KERNEL_PATH.'class_db.php' ); require_once( KERNEL_PATH.'class_db_'.$this->ipsclass->vars['sql_driver'].".php" ); } - + $classname = "db_driver_".$this->ipsclass->vars['sql_driver']; - + $RDB = new $classname; - + $RDB->obj['sql_database'] = REMOTE_DB_DATABASE; $RDB->obj['sql_user'] = REMOTE_DB_USER; $RDB->obj['sql_pass'] = REMOTE_DB_PASS; @@ -141,52 +132,57 @@ class login_method extends login_core $RDB->obj['sql_tbl_prefix'] = REMOTE_TABLE_PREFIX; $RDB->obj['use_shutdown'] = 0; $RDB->obj['force_new_connection'] = 1; - + //-------------------------------- // Get a DB connection //-------------------------------- - + $RDB->connect(); - + //----------------------------------------- // Get member from remote DB //----------------------------------------- - + $remote_member = $RDB->build_and_exec_query( array( 'select' => '*', 'from' => REMOTE_TABLE_NAME, - 'where' => REMOTE_FIELD_NAME.'="'.addslashes($username).'" '.REMOTE_EXTRA_QUERY ) ); - + 'where' => REMOTE_FIELD_NAME."='".$RDB->add_slashes($username)."' ".REMOTE_EXTRA_QUERY ) ); + $RDB->close_db(); - + //----------------------------------------- // Check //----------------------------------------- - + if ( ! $remote_member[ REMOTE_FIELD_NAME ] ) { $this->return_code = 'NO_USER'; return; } - + //----------------------------------------- // Check password //----------------------------------------- + + $password = html_entity_decode($password, ENT_QUOTES); + $html_entities = array("!", "$", "\"); + $replacement_char = array("!", "$", "\\"); + $password = str_replace($html_entities, $replacement_char, $password); if ( ! $this->_compare_passwords( $password, $remote_member ) ) { $this->return_code = 'WRONG_AUTH'; return; } - + //----------------------------------------- // Still here? Then we have a username // and matching password.. so get local member // and see if there's a match.. if not, create // one! //----------------------------------------- - + $this->_load_member( $username ); - + if ( $this->member['id'] ) { $this->return_code = 'SUCCESS'; @@ -197,7 +193,7 @@ class login_method extends login_core //----------------------------------------- // Got no member - but auth passed - create? //----------------------------------------- - + if ( $this->allow_create ) { $this->create_local_member( $username, $password ); @@ -209,16 +205,16 @@ class login_method extends login_core } } } - + /*-------------------------------------------------------------------------*/ // Load member from DB /*-------------------------------------------------------------------------*/ - + function _load_member( $username ) { $this->ipsclass->DB->cache_add_query( 'login_getmember', array( 'username' => strtolower($username) ) ); $this->ipsclass->DB->cache_exec_query(); - + $this->member = $this->ipsclass->DB->fetch_row(); } } diff --git a/upload/sources/loginauth/external/index.html b/upload/sources/loginauth/external/index.html index 250b1f72..af2fbe79 100644 --- a/upload/sources/loginauth/external/index.html +++ b/upload/sources/loginauth/external/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/sources/loginauth/index.html b/upload/sources/loginauth/index.html index 250b1f72..af2fbe79 100644 --- a/upload/sources/loginauth/index.html +++ b/upload/sources/loginauth/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/sources/loginauth/internal/auth.php b/upload/sources/loginauth/internal/auth.php index 6b801e78..001be61e 100644 --- a/upload/sources/loginauth/internal/auth.php +++ b/upload/sources/loginauth/internal/auth.php @@ -1,24 +1,15 @@ LOG IN MODULE: INTERNAL (IPB AUTH) @@ -62,7 +53,7 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } diff --git a/upload/sources/loginauth/internal/index.html b/upload/sources/loginauth/internal/index.html index 250b1f72..af2fbe79 100644 --- a/upload/sources/loginauth/internal/index.html +++ b/upload/sources/loginauth/internal/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/sources/loginauth/ipconverge/auth.php b/upload/sources/loginauth/ipconverge/auth.php index 289a2bbd..bb971283 100644 --- a/upload/sources/loginauth/ipconverge/auth.php +++ b/upload/sources/loginauth/ipconverge/auth.php @@ -1,24 +1,15 @@ LOG IN MODULE: INTERNAL (IPB AUTH) @@ -62,7 +53,7 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -84,16 +75,7 @@ class login_method extends login_core var $is_admin_auth = 0; var $api_server; - - /*-------------------------------------------------------------------------*/ - // Constructor - /*-------------------------------------------------------------------------*/ - - function login_method() - { - - } /*-------------------------------------------------------------------------*/ // Authentication @@ -106,6 +88,7 @@ class login_method extends login_core //----------------------------------------- $md5_once_pass = md5( $password ); + $external_data = ''; //----------------------------------------- // ADMIN log in? @@ -115,7 +98,7 @@ class login_method extends login_core { // Try local first, so as to not block locally created admins $this->admin_auth_local( $username, $password ); - + if ( $this->return_code == 'SUCCESS' ) { return; @@ -172,12 +155,38 @@ class login_method extends login_core $this->return_code = 'WRONG_AUTH'; return; } + else if( $this->api_server->params['response'] != 'SUCCESS' ) + { + $this->return_code = 'WRONG_AUTH'; + return; + } + + if( $this->api_server->params['extra_data'] ) + { + $external_data = unserialize( base64_decode( $this->api_server->params['extra_data'] ) ); + } //----------------------------------------- // Get member... //----------------------------------------- - $this->ipsclass->DB->build_query( array( + $this->_load_member( $username ); + + if ( !$this->member['id'] ) + { + //----------------------------------------- + // Got no member - but auth passed - create? + //----------------------------------------- + + if ( $this->allow_create ) + { + $this->tmp_display = 'cvg_' . rand(); + + $this->create_local_member( $username, $password, $username ); + } + } + + /*$this->ipsclass->DB->build_query( array( 'select' => 'm.*', 'from' => array( 'members' => 'm' ), 'where' => "email='".strtolower($username)."'", @@ -191,11 +200,338 @@ class login_method extends login_core $this->ipsclass->DB->exec_query(); - $this->member = $this->ipsclass->DB->fetch_row(); + $this->member = $this->ipsclass->DB->fetch_row();*/ $this->return_code = $this->api_server->params['response']; return; + } + + /*-------------------------------------------------------------------------*/ + // Load member from DB + /*-------------------------------------------------------------------------*/ + + function _load_member( $username ) + { + $this->member = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'id, name, joined, members_display_name, members_created_remote, email, mgroup, mgroup_others, member_login_key, member_login_key_expire, ip_address, login_anonymous', + 'from' => 'members', + 'where' => "email='" . strtolower($username) . "'" + ) ); + + if( is_array( $this->member ) ) + { + $this->member = array_merge( $this->member, $this->ipsclass->cache['group_cache'][ $this->member['mgroup'] ] ); + } + } + + + /*-------------------------------------------------------------------------*/ + // User Exists Check + /*-------------------------------------------------------------------------*/ + + function email_exists_check( $username ) + { + //----------------------------------------- + // Get product ID and code from API + //----------------------------------------- + $converge = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', + 'from' => 'converge_local', + 'where' => 'converge_active=1' ) ); + + if ( ! $converge['converge_api_code'] ) + { + $this->return_code = 'WRONG_AUTH'; + return; + } + + //----------------------------------------- + // Auth against converge... + //----------------------------------------- + + if ( ! is_object( $this->api_server ) ) + { + require_once( KERNEL_PATH . 'class_api_server.php' ); + $this->api_server = new class_api_server(); + } + + $request = array( 'auth_key' => $converge['converge_api_code'], + 'product_id' => $converge['converge_product_id'], + 'email_address' => $username, + ); + + $url = $converge['converge_url'] . '/converge_master/converge_server.php'; + + //----------------------------------------- + // Send request + //----------------------------------------- + + $this->api_server->auth_user = $converge['converge_http_user']; + $this->api_server->auth_pass = $converge['converge_http_pass']; + + $this->api_server->api_send_request( $url, 'convergeCheckEmail', $request ); + + //----------------------------------------- + // Handle errors... + //----------------------------------------- + + if ( count( $this->api_server->errors ) ) + { + $this->return_code = 'WRONG_AUTH'; + return; + } + + $this->return_code = $this->api_server->params['response']; + return; + } + + + /*-------------------------------------------------------------------------*/ + // Change Email + /*-------------------------------------------------------------------------*/ + + function change_email( $old_email, $new_email ) + { + //----------------------------------------- + // Get product ID and code from API + //----------------------------------------- + + $converge = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', + 'from' => 'converge_local', + 'where' => 'converge_active=1' ) ); + + if ( ! $converge['converge_api_code'] ) + { + $this->return_code = 'WRONG_AUTH'; + return; + } + + //----------------------------------------- + // Auth against converge... + //----------------------------------------- + + if ( ! is_object( $this->api_server ) ) + { + require_once( KERNEL_PATH . 'class_api_server.php' ); + $this->api_server = new class_api_server(); + } + + $request = array( 'auth_key' => $converge['converge_api_code'], + 'product_id' => $converge['converge_product_id'], + 'email_address' => $new_email, + ); + + $url = $converge['converge_url'] . '/converge_master/converge_server.php'; + + //----------------------------------------- + // Send request + //----------------------------------------- + + $this->api_server->auth_user = $converge['converge_http_user']; + $this->api_server->auth_pass = $converge['converge_http_pass']; + + $this->api_server->api_send_request( $url, 'convergeCheckEmail', $request ); + + //----------------------------------------- + // Handle errors... + //----------------------------------------- + + if ( count( $this->api_server->errors ) ) + { + $this->return_code = 'WRONG_AUTH'; + return; + } + + if( $this->api_server->params['response'] == 'EMAIL_NOT_IN_USE' ) + { + //----------------------------------------- + // Change email + //----------------------------------------- + + $request = array( 'auth_key' => $converge['converge_api_code'], + 'product_id' => $converge['converge_product_id'], + 'old_email_address' => $old_email, + 'new_email_address' => $new_email, + ); + + $url = $converge['converge_url'] . '/converge_master/converge_server.php'; + + //----------------------------------------- + // Send request + //----------------------------------------- + + $this->api_server->api_send_request( $url, 'convergeChangeEmail', $request ); + + //----------------------------------------- + // Handle errors... + //----------------------------------------- + + if ( count( $this->api_server->errors ) ) + { + $this->return_code = 'WRONG_AUTH'; + return; + } + } + + $this->return_code = $this->api_server->params['response']; + return; + } + + + /*-------------------------------------------------------------------------*/ + // Change Password + /*-------------------------------------------------------------------------*/ + + function change_pass( $email, $new_pass ) + { + //----------------------------------------- + // Get product ID and code from API + //----------------------------------------- + + $converge = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', + 'from' => 'converge_local', + 'where' => 'converge_active=1' ) ); + + if ( ! $converge['converge_api_code'] ) + { + $this->return_code = 'WRONG_AUTH'; + return; + } + + //----------------------------------------- + // Auth against converge... + //----------------------------------------- + + if ( ! is_object( $this->api_server ) ) + { + require_once( KERNEL_PATH . 'class_api_server.php' ); + $this->api_server = new class_api_server(); + } + + $request = array( 'auth_key' => $converge['converge_api_code'], + 'product_id' => $converge['converge_product_id'], + 'email_address' => $email, + 'md5_once_password' => $new_pass, + ); + + $url = $converge['converge_url'] . '/converge_master/converge_server.php'; + + //----------------------------------------- + // Send request + //----------------------------------------- + + $this->api_server->auth_user = $converge['converge_http_user']; + $this->api_server->auth_pass = $converge['converge_http_pass']; + + $this->api_server->api_send_request( $url, 'convergeChangePassword', $request ); + + //----------------------------------------- + // Handle errors... + //----------------------------------------- + + if ( count( $this->api_server->errors ) ) + { + $this->return_code = 'WRONG_AUTH'; + return; + } + + $this->return_code = $this->api_server->params['response']; + return; + } + + /*-------------------------------------------------------------------------*/ + // Create Account + /*-------------------------------------------------------------------------*/ + + function create_account( $member=array() ) + { + if( !is_array( $member ) ) + { + $this->return_code = 'FAIL'; + return; + } + + //----------------------------------------- + // Get product ID and code from API + //----------------------------------------- + + $converge = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', + 'from' => 'converge_local', + 'where' => 'converge_active=1' ) ); + + if ( ! $converge['converge_api_code'] ) + { + $this->return_code = 'WRONG_AUTH'; + return; + } + + //----------------------------------------- + // Auth against converge... + //----------------------------------------- + + if ( ! is_object( $this->api_server ) ) + { + require_once( KERNEL_PATH . 'class_api_server.php' ); + $this->api_server = new class_api_server(); + } + + $request = array( 'auth_key' => $converge['converge_api_code'], + 'product_id' => $converge['converge_product_id'], + 'email_address' => $member['email'], + ); + + $url = $converge['converge_url'] . '/converge_master/converge_server.php'; + + //----------------------------------------- + // Send request + //----------------------------------------- + + $this->api_server->auth_user = $converge['converge_http_user']; + $this->api_server->auth_pass = $converge['converge_http_pass']; + + $this->api_server->api_send_request( $url, 'convergeCheckEmail', $request ); + + //----------------------------------------- + // Handle errors... + //----------------------------------------- + + if ( count( $this->api_server->errors ) ) + { + $this->return_code = 'WRONG_AUTH'; + return; + } + + if( $this->api_server->params['response'] == 'EMAIL_NOT_IN_USE' ) + { + $request = array( 'auth_key' => $converge['converge_api_code'], + 'product_id' => $converge['converge_product_id'], + 'email_address' => $member['email'], + 'md5_once_password' => md5( $member['password'] ), + 'ip_address' => $member['ip_address'], + 'unix_join_date' => $member['joined'] + ); + + $url = $converge['converge_url'] . '/converge_master/converge_server.php'; + + //----------------------------------------- + // Send request + //----------------------------------------- + + $this->api_server->api_send_request( $url, 'convergeAddMember', $request ); + + //----------------------------------------- + // Handle errors... + //----------------------------------------- + + if ( count( $this->api_server->errors ) ) + { + $this->return_details = implode( '
    ', $this->api_server->errors ); + $this->return_code = $this->api_server->params['response']; + return; + } + } + + $this->return_code = $this->api_server->params['response']; + return; } } diff --git a/upload/sources/loginauth/ipconverge/index.html b/upload/sources/loginauth/ipconverge/index.html index 250b1f72..af2fbe79 100644 --- a/upload/sources/loginauth/ipconverge/index.html +++ b/upload/sources/loginauth/ipconverge/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/sources/loginauth/ldap/auth.php b/upload/sources/loginauth/ldap/auth.php index b4efab53..30ad1e03 100644 --- a/upload/sources/loginauth/ldap/auth.php +++ b/upload/sources/loginauth/ldap/auth.php @@ -1,24 +1,15 @@ LOG IN MODULE: LDAP (ACTIVE DIRECTORY) @@ -62,7 +53,7 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -288,9 +279,18 @@ class login_method extends login_core // Server version //----------------------------------------- - if ( $this->login_conf['ldap_port'] ) + if ( $this->login_conf['ldap_server_version'] ) { - ldap_set_option($this->connection_id, LDAP_OPT_PROTOCOL_VERSION, 3); + @ldap_set_option($this->connection_id, LDAP_OPT_PROTOCOL_VERSION, $this->login_conf['ldap_server_version']); + } + + //----------------------------------------- + // Win2K3 AD with root DN + //----------------------------------------- + + if ( $this->login_conf['ldap_opt_referrals'] ) + { + @ldap_set_option($this->connection_id, LDAP_OPT_REFERRALS, true); } //----------------------------------------- @@ -299,13 +299,13 @@ class login_method extends login_core if ( $this->login_conf['ldap_server_username'] AND $this->login_conf['ldap_server_password'] ) { - $this->bind_id = ldap_bind( $this->connection_id, $this->login_conf['ldap_server_username'], $this->login_conf['ldap_server_password'] ); + $this->bind_id = @ldap_bind( $this->connection_id, $this->login_conf['ldap_server_username'], $this->login_conf['ldap_server_password'] ); } else { # Anonymous bind - $this->bind_id = ldap_bind( $this->connection_id ); + $this->bind_id = @ldap_bind( $this->connection_id ); } if ( ! $this->bind_id ) diff --git a/upload/sources/loginauth/ldap/conf.php b/upload/sources/loginauth/ldap/conf.php index 852a42f2..219f19d5 100644 --- a/upload/sources/loginauth/ldap/conf.php +++ b/upload/sources/loginauth/ldap/conf.php @@ -74,6 +74,15 @@ $LOGIN_CONF['ldap_filter'] = ''; */ $LOGIN_CONF['ldap_server_version'] = 3; +/** +* LDAP_OPT_REFERRALS +* If using Win2K3 Active Directory, and using a root dn as your base dn, +* this must be set to 1. +* +* OPTIONS: 1 = yes, 0 = no +*/ +$LOGIN_CONF['ldap_opt_referrals'] = 0; + /** * LDAP USERNAME SUFFIX * If you're using Active Directory, you may need to use an account suffix diff --git a/upload/sources/loginauth/ldap/index.html b/upload/sources/loginauth/ldap/index.html index 250b1f72..af2fbe79 100644 --- a/upload/sources/loginauth/ldap/index.html +++ b/upload/sources/loginauth/ldap/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/sources/loginauth/login_core.php b/upload/sources/loginauth/login_core.php index 99404c3c..f46429be 100644 --- a/upload/sources/loginauth/login_core.php +++ b/upload/sources/loginauth/login_core.php @@ -1,24 +1,15 @@ LOG IN MODULE: INTERNAL (IPB AUTH) @@ -33,7 +24,7 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -43,14 +34,16 @@ class login_core var $ipsclass; # Returns - var $auth_errors = array(); - var $return_code = ""; - var $member = array(); + var $auth_errors = array(); + var $return_code = ""; + var $member = array(); # Input - var $is_admin_auth = 0; + var $is_admin_auth = 0; - var $account_unlock = 0; + var $account_unlock = 0; + + var $tmp_display = ''; /*-------------------------------------------------------------------------*/ // Authorize against local DB: @@ -92,6 +85,7 @@ class login_core $failed_count = 0; $total_failed = 0; $thisip_failed = 0; + $non_expired_att = array(); if( is_array($failed_attempts) AND count($failed_attempts) ) { @@ -124,11 +118,12 @@ class login_core continue; } + $non_expired_att[] = $entry; $failed_count++; } - sort($failed_attempts); - $oldest_entry = array_shift( $failed_attempts ); + sort($non_expired_att); + $oldest_entry = array_shift( $non_expired_att ); list($oldest,) = explode( "-", $oldest_entry ); } @@ -193,6 +188,7 @@ class login_core $failed_count = 0; $total_failed = 0; $thisip_failed = 0; + $non_expired_att = array(); if( is_array($failed_attempts) AND count($failed_attempts) ) { @@ -225,11 +221,12 @@ class login_core continue; } + $non_expired_att[] = $entry; $failed_count++; } - - sort($failed_attempts); - $oldest_entry = array_shift( $failed_attempts ); + + sort($non_expired_att); + $oldest_entry = array_shift( $non_expired_att ); list($oldest,) = explode( "-", $oldest_entry ); } @@ -271,6 +268,7 @@ class login_core $failed_count = 0; $total_failed = 0; + $non_expired_att = array(); foreach( $failed_logins as $entry ) { @@ -295,17 +293,21 @@ class login_core } $failed_count++; + $non_expired_att[] = $entry; } - $this->ipsclass->DB->do_update( "members", array( 'failed_logins' => implode( ",", $failed_logins ), + if( $this->member['id'] ) + { + $this->ipsclass->DB->do_update( "members", array( 'failed_logins' => implode( ",", $failed_logins ), 'failed_login_count' => $total_failed ), "id=".$this->member['id'] ); + } if( $failed_count >= $this->ipsclass->vars['ipb_bruteforce_attempts'] ) { if( $this->ipsclass->vars['ipb_bruteforce_unlock'] ) { - sort($failed_attempts); - $oldest_entry = array_shift( $failed_attempts ); + sort($non_expired_att); + $oldest_entry = array_shift( $non_expired_att ); list($oldest,) = explode( "-", $oldest_entry ); $this->account_unlock = $oldest; @@ -391,6 +393,12 @@ class login_core 'subs_pkg_chosen' => 0 ); + if( $this->tmp_display ) + { + $member['members_display_name'] = $this->tmp_display; + $member['members_l_display_name'] = strtolower($this->tmp_display); + } + //----------------------------------------- // Insert: CONVERGE //----------------------------------------- @@ -426,7 +434,7 @@ class login_core // Insert: MEMBER EXTRA //----------------------------------------- - $this->ipsclass->DB->do_insert( 'member_extra', array( 'id' => $member_id, 'vdirs' => 'in:Входящие|sent:Отправленные' ) ); + $this->ipsclass->DB->do_insert( 'member_extra', array( 'id' => $member_id, 'vdirs' => "in:{$this->ipsclass->lang['account_inbox']}|sent:{$this->ipsclass->lang['account_sent']}" ) ); //----------------------------------------- // Insert into the custom profile fields DB @@ -502,7 +510,7 @@ class login_core if ( $this->ipsclass->vars['ipbli_usertype'] == 'username' ) { - $this->member = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'm.id, m.name, m.members_display_name, m.members_created_remote, m.email, m.mgroup, m.member_login_key, m.member_login_key_expire, m.ip_address, m.login_anonymous, m.failed_logins, m.failed_login_count, m.joined, m.mgroup_others, m.org_perm_id', + $this->member = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'm.*', 'from' => array( 'members' => 'm' ), 'where' => "m.members_l_username='". $username ."' and m.members_created_remote=0", 'add_join' => array( 0 => array( 'select' => 'g.*', @@ -526,6 +534,7 @@ class login_core $failed_count = 0; $total_failed = 0; $thisip_failed = 0; + $non_expired_att = array(); if( is_array($failed_attempts) AND count($failed_attempts) ) { @@ -559,10 +568,11 @@ class login_core } $failed_count++; + $non_expired_att[] = $entry; } - sort($failed_attempts); - $oldest_entry = array_shift( $failed_attempts ); + sort($non_expired_att); + $oldest_entry = array_shift( $non_expired_att ); list($oldest,) = explode( "-", $oldest_entry ); } @@ -621,6 +631,12 @@ class login_core $this->member = $this->ipsclass->DB->fetch_row(); + if( !$this->member['id'] ) + { + $this->return_code = 'NO_USER'; + return; + } + if( $this->ipsclass->vars['ipb_bruteforce_attempts'] > 0 ) { $failed_attempts = explode( ",", $this->ipsclass->clean_perm_string( $this->member['failed_logins'] ) ); @@ -731,8 +747,11 @@ class login_core $failed_count++; } - $this->ipsclass->DB->do_update( "members", array( 'failed_logins' => implode( ",", $failed_logins ), + if( $this->member['id'] ) + { + $this->ipsclass->DB->do_update( "members", array( 'failed_logins' => implode( ",", $failed_logins ), 'failed_login_count' => $total_failed ), "id=".$this->member['id'] ); + } if( $failed_count >= $this->ipsclass->vars['ipb_bruteforce_attempts'] ) { diff --git a/upload/sources/portal_plugins/calendar-cfg.php b/upload/sources/portal_plugins/calendar-cfg.php index debc3f9f..3e15b199 100644 --- a/upload/sources/portal_plugins/calendar-cfg.php +++ b/upload/sources/portal_plugins/calendar-cfg.php @@ -2,26 +2,16 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ +| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ | > $Revision: 567 $ | > $Author: matt $ +--------------------------------------------------------------------------- @@ -46,13 +36,13 @@ $PORTAL_CONFIG = array(); * Main plug in title * */ -$PORTAL_CONFIG['pc_title'] = 'Календарь форума'; +$PORTAL_CONFIG['pc_title'] = 'Invision Power Board Calendar'; /** * Plug in mini description * */ -$PORTAL_CONFIG['pc_desc'] = "Вывод мини-календаря на текущий месяц"; +$PORTAL_CONFIG['pc_desc'] = "Displays a mini calendar for the current month"; /** * Keyword for settings. This is the keyword @@ -81,7 +71,7 @@ $PORTAL_CONFIG['pc_settings_keyword'] = ""; * * @param array[ TAG ] = array( FUNCTION NAME, DESCRIPTION ); */ -$PORTAL_CONFIG['pc_exportable_tags']['calendar_show_current_month'] = array( 'calendar_show_current_month', 'Вывести блок с календарем на текущий месяц' ); +$PORTAL_CONFIG['pc_exportable_tags']['calendar_show_current_month'] = array( 'calendar_show_current_month', 'Shows a calendar for the current month' ); //$PORTAL_CONFIG['pc_exportable_tags']['__another_tag'] = array( '__another_function', '__another_Description' ); //$PORTAL_CONFIG['pc_exportable_tags']['__another_tag'] = array( '__another_function', '__another_Description' ); diff --git a/upload/sources/portal_plugins/calendar.php b/upload/sources/portal_plugins/calendar.php index 70c38e4e..496ba595 100644 --- a/upload/sources/portal_plugins/calendar.php +++ b/upload/sources/portal_plugins/calendar.php @@ -1,234 +1,238 @@ - $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ -+--------------------------------------------------------------------------- -| -| > PORTAL PLUG IN MODULE: CALENDAR -| > Module written by Matt Mecham -| > Date started: Tuesday 2nd August 2005 (15:52) -+-------------------------------------------------------------------------- -*/ - -/** -* Portal Plug In Module -* -* Portal Calendar functions -* -* @package InvisionPowerBoard -* @subpackage PortalPlugIn -* @author Matt Mecham -* @copyright Invision Power Services, Inc. -* @version 2.1 -*/ - -/** -* Portal Plug In Module -* -* Portal Blog functions -* Each class name MUST be in the format of: -* ppi_{file_name_minus_dot_php} -* -* @package InvisionPowerBoard -* @subpackage PortalPlugIn -* @author Matt Mecham -* @copyright Invision Power Services, Inc. -* @version 2.1 -*/ - -if ( ! defined( 'IN_IPB' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - -class ppi_calendar -{ - /** - * IPS Global object - * - * @var string - */ - var $ipsclass; - - /** - * Array of portal objects including: - * good_forum, bad_forum - * - * @var array - */ - var $portal_object = array(); - - /*-------------------------------------------------------------------------*/ - // INIT - /*-------------------------------------------------------------------------*/ - /** - * This function must be available always - * Add any set up here, such as loading language and skins, etc - * - */ - function init() - { - } - - /*-------------------------------------------------------------------------*/ - // MAIN FUNCTION - /*-------------------------------------------------------------------------*/ - /** - * Main function - * - * @return VOID - */ - function calendar_show_current_month() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - //----------------------------------------- - // Grab calendar class - //----------------------------------------- - - require_once( ROOT_PATH . 'sources/action_public/calendar.php' ); - $calendar = new calendar(); - $calendar->ipsclass =& $this->ipsclass; - - //----------------------------------------- - // Load lang and templs - //----------------------------------------- - - $this->ipsclass->load_language('lang_calendar'); - $this->ipsclass->load_template('skin_calendar'); - - //----------------------------------------- - // DO some set up - //----------------------------------------- - - $calendar->calendar_id = 1; // CHANGE TO DEFAULT? - - if( ! count( $this->ipsclass->cache['calendars'] ) ) - { - $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'cal_calendars', 'order' => 'cal_position ASC' ) ); - $this->ipsclass->DB->exec_query(); - - while( $cal = $this->ipsclass->DB->fetch_row() ) - { - $this->ipsclass->cache['calendars'][ $cal['cal_id'] ] = $cal; - } - } - - if ( count( $this->ipsclass->cache['calendars'] ) AND is_array( $this->ipsclass->cache['calendars'] ) ) - { - foreach( $this->ipsclass->cache['calendars'] as $cal_id => $cal ) - { - $selected = ""; - $perms = unserialize( $cal['cal_permissions'] ); - - //----------------------------------------- - // Got a perm? - //----------------------------------------- - - if ( $this->ipsclass->check_perms( $perms['perm_read'] ) != TRUE ) - { - continue; - } - - if ( $cal['cal_id'] == $this->calendar_id ) - { - $calendar->calendar = array_merge( $cal, $perms); - $selected = " selected='selected'"; - } - - $calendar->calendar_cache[ $cal['cal_id'] ] = array_merge( $cal, $perms); - } - } - - if( ! $calendar->calendar ) - { - if( count( $calendar->calendar_cache ) ) - { - $tmp_resort = $calendar->calendar_cache; - ksort($tmp_resort); - reset($tmp_resort); - $default_calid = key( $tmp_resort ); - $calendar->calendar_id = $default_calid; - $calendar->calendar = $tmp_resort[ $default_calid ]; - unset( $tmp_resort ); - } - } - - $calendar->calendar = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', - 'from' => 'cal_calendars', - 'where' => 'cal_id='.$calendar->calendar_id ) ); - - $calendar->calendar = array_merge( unserialize( $calendar->calendar['cal_permissions'] ), $calendar->calendar ); - - if ( $this->ipsclass->check_perms($calendar->calendar['perm_read']) != TRUE ) - { - return ''; - } - - //----------------------------------------- - // Finally, build up the lang arrays - //----------------------------------------- - - $calendar->month_words = array( $this->ipsclass->lang['M_1'] , $this->ipsclass->lang['M_2'] , $this->ipsclass->lang['M_3'] , - $this->ipsclass->lang['M_4'] , $this->ipsclass->lang['M_5'] , $this->ipsclass->lang['M_6'] , - $this->ipsclass->lang['M_7'] , $this->ipsclass->lang['M_8'] , $this->ipsclass->lang['M_9'] , - $this->ipsclass->lang['M_10'], $this->ipsclass->lang['M_11'], $this->ipsclass->lang['M_12'] ); - - $calendar->day_words = array( $this->ipsclass->lang['D_0'], $this->ipsclass->lang['D_1'], $this->ipsclass->lang['D_2'], - $this->ipsclass->lang['D_3'], $this->ipsclass->lang['D_4'], $this->ipsclass->lang['D_5'], - $this->ipsclass->lang['D_6'] ); - - //----------------------------------------- - // What now? - //----------------------------------------- - - $a = explode( ',', gmdate( 'Y,n,j,G,i,s', time() + $this->ipsclass->get_time_offset() ) ); - - $now_date = array( - 'year' => $a[0], - 'mon' => $a[1], - 'mday' => $a[2], - 'hours' => $a[3], - 'minutes' => $a[4], - 'seconds' => $a[5] - ); - - $content = $calendar->get_mini_calendar( $now_date['mon'], $now_date['year'] ); - - return $this->ipsclass->compiled_templates['skin_portal']->tmpl_calendar_wrap( $content ); - } - - - - - - - -} - + $Date: 2007-06-29 15:38:25 -0400 (Fri, 29 Jun 2007) $ +| > $Revision: 1078 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > PORTAL PLUG IN MODULE: CALENDAR +| > Module written by Matt Mecham +| > Date started: Tuesday 2nd August 2005 (15:52) ++-------------------------------------------------------------------------- +*/ + +/** +* Portal Plug In Module +* +* Portal Calendar functions +* +* @package InvisionPowerBoard +* @subpackage PortalPlugIn +* @author Matt Mecham +* @copyright Invision Power Services, Inc. +* @version 2.1 +*/ + +/** +* Portal Plug In Module +* +* Portal Blog functions +* Each class name MUST be in the format of: +* ppi_{file_name_minus_dot_php} +* +* @package InvisionPowerBoard +* @subpackage PortalPlugIn +* @author Matt Mecham +* @copyright Invision Power Services, Inc. +* @version 2.1 +*/ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class ppi_calendar +{ + /** + * IPS Global object + * + * @var string + */ + var $ipsclass; + + /** + * Array of portal objects including: + * good_forum, bad_forum + * + * @var array + */ + var $portal_object = array(); + + /*-------------------------------------------------------------------------*/ + // INIT + /*-------------------------------------------------------------------------*/ + /** + * This function must be available always + * Add any set up here, such as loading language and skins, etc + * + */ + function init() + { + } + + /*-------------------------------------------------------------------------*/ + // MAIN FUNCTION + /*-------------------------------------------------------------------------*/ + /** + * Main function + * + * @return VOID + */ + function calendar_show_current_month() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + //----------------------------------------- + // Grab calendar class + //----------------------------------------- + + require_once( ROOT_PATH . 'sources/action_public/calendar.php' ); + $calendar = new calendar(); + $calendar->ipsclass =& $this->ipsclass; + + //----------------------------------------- + // Load lang and templs + //----------------------------------------- + + $this->ipsclass->load_language('lang_calendar'); + $this->ipsclass->load_template('skin_calendar'); + + //----------------------------------------- + // DO some set up + //----------------------------------------- + + $calendar->calendar_id = 1; // CHANGE TO DEFAULT? + + if( ! count( $this->ipsclass->cache['calendars'] ) ) + { + $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'cal_calendars', 'order' => 'cal_position ASC' ) ); + $this->ipsclass->DB->exec_query(); + + while( $cal = $this->ipsclass->DB->fetch_row() ) + { + $this->ipsclass->cache['calendars'][ $cal['cal_id'] ] = $cal; + } + } + + if ( count( $this->ipsclass->cache['calendars'] ) AND is_array( $this->ipsclass->cache['calendars'] ) ) + { + foreach( $this->ipsclass->cache['calendars'] as $cal_id => $cal ) + { + $selected = ""; + $perms = unserialize( $cal['cal_permissions'] ); + + //----------------------------------------- + // Got a perm? + //----------------------------------------- + + if ( $this->ipsclass->check_perms( $perms['perm_read'] ) != TRUE ) + { + continue; + } + + if ( $cal['cal_id'] == $this->calendar_id ) + { + $calendar->calendar = array_merge( $cal, $perms); + $selected = " selected='selected'"; + } + + $calendar->calendar_cache[ $cal['cal_id'] ] = array_merge( $cal, $perms); + } + } + + if( ! $calendar->calendar ) + { + if( count( $calendar->calendar_cache ) ) + { + $tmp_resort = $calendar->calendar_cache; + ksort($tmp_resort); + reset($tmp_resort); + $default_calid = key( $tmp_resort ); + $calendar->calendar_id = $default_calid; + $calendar->calendar = $tmp_resort[ $default_calid ]; + unset( $tmp_resort ); + } + } + + if( !is_array($calendar->calendar) OR !count($calendar->calendar) ) + { + return''; + } + + $calendar->calendar = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', + 'from' => 'cal_calendars', + 'where' => 'cal_id='.$calendar->calendar_id ) ); + + $calendar->calendar = array_merge( unserialize( $calendar->calendar['cal_permissions'] ), $calendar->calendar ); + + if ( $this->ipsclass->check_perms($calendar->calendar['perm_read']) != TRUE ) + { + return ''; + } + + //----------------------------------------- + // Finally, build up the lang arrays + //----------------------------------------- + + $calendar->month_words = array( $this->ipsclass->lang['M_1'] , $this->ipsclass->lang['M_2'] , $this->ipsclass->lang['M_3'] , + $this->ipsclass->lang['M_4'] , $this->ipsclass->lang['M_5'] , $this->ipsclass->lang['M_6'] , + $this->ipsclass->lang['M_7'] , $this->ipsclass->lang['M_8'] , $this->ipsclass->lang['M_9'] , + $this->ipsclass->lang['M_10'], $this->ipsclass->lang['M_11'], $this->ipsclass->lang['M_12'] ); + + if( !$this->ipsclass->vars['ipb_calendar_mon'] ) + { + $calendar->day_words = array( $this->ipsclass->lang['D_0'], $this->ipsclass->lang['D_1'], $this->ipsclass->lang['D_2'], + $this->ipsclass->lang['D_3'], $this->ipsclass->lang['D_4'], $this->ipsclass->lang['D_5'], + $this->ipsclass->lang['D_6'] ); + } + else + { + $calendar->day_words = array( $this->ipsclass->lang['D_1'], $this->ipsclass->lang['D_2'], $this->ipsclass->lang['D_3'], + $this->ipsclass->lang['D_4'], $this->ipsclass->lang['D_5'], $this->ipsclass->lang['D_6'], + $this->ipsclass->lang['D_0'] ); + } + + //----------------------------------------- + // What now? + //----------------------------------------- + + $a = explode( ',', gmdate( 'Y,n,j,G,i,s', time() + $this->ipsclass->get_time_offset() ) ); + + $now_date = array( + 'year' => $a[0], + 'mon' => $a[1], + 'mday' => $a[2], + 'hours' => $a[3], + 'minutes' => $a[4], + 'seconds' => $a[5] + ); + + $content = $calendar->get_mini_calendar( $now_date['mon'], $now_date['year'] ); + + return $this->ipsclass->compiled_templates['skin_portal']->tmpl_calendar_wrap( $content ); + } + + + + + + + +} + ?> \ No newline at end of file diff --git a/upload/sources/portal_plugins/index.html b/upload/sources/portal_plugins/index.html index 250b1f72..b49fc27d 100644 --- a/upload/sources/portal_plugins/index.html +++ b/upload/sources/portal_plugins/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/sources/portal_plugins/online_users-cfg.php b/upload/sources/portal_plugins/online_users-cfg.php index a9b26fc1..43f7fd0c 100644 --- a/upload/sources/portal_plugins/online_users-cfg.php +++ b/upload/sources/portal_plugins/online_users-cfg.php @@ -2,26 +2,16 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ +| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ | > $Revision: 567 $ | > $Author: matt $ +--------------------------------------------------------------------------- @@ -46,13 +36,13 @@ $PORTAL_CONFIG = array(); * Main plug in title * */ -$PORTAL_CONFIG['pc_title'] = 'Пользователи в он-лайн'; +$PORTAL_CONFIG['pc_title'] = 'Invision Power Board Online Users'; /** * Plug in mini description * */ -$PORTAL_CONFIG['pc_desc'] = "Вывод числа пользователей и их имен, находящихся в он-лайн"; +$PORTAL_CONFIG['pc_desc'] = "Shows the current name and number of online users"; /** * Keyword for settings. This is the keyword @@ -81,7 +71,7 @@ $PORTAL_CONFIG['pc_settings_keyword'] = ""; * * @param array[ TAG ] = array( FUNCTION NAME, DESCRIPTION ); */ -$PORTAL_CONFIG['pc_exportable_tags']['online_users_show'] = array( 'online_users_show', 'Вывести блок пользователей в он-лайн' ); +$PORTAL_CONFIG['pc_exportable_tags']['online_users_show'] = array( 'online_users_show', 'Shows the online users' ); ?> \ No newline at end of file diff --git a/upload/sources/portal_plugins/online_users.php b/upload/sources/portal_plugins/online_users.php index a44e8002..7f22ce3e 100644 --- a/upload/sources/portal_plugins/online_users.php +++ b/upload/sources/portal_plugins/online_users.php @@ -2,26 +2,16 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ +| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ | > $Revision: 567 $ | > $Author: matt $ +--------------------------------------------------------------------------- @@ -60,7 +50,7 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } diff --git a/upload/sources/portal_plugins/poll-cfg.php b/upload/sources/portal_plugins/poll-cfg.php index f60b14f1..7383590b 100644 --- a/upload/sources/portal_plugins/poll-cfg.php +++ b/upload/sources/portal_plugins/poll-cfg.php @@ -2,26 +2,16 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ +| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ | > $Revision: 567 $ | > $Author: matt $ +--------------------------------------------------------------------------- @@ -46,13 +36,13 @@ $PORTAL_CONFIG = array(); * Main plug in title * */ -$PORTAL_CONFIG['pc_title'] = 'Опрос с форума'; +$PORTAL_CONFIG['pc_title'] = 'Invision Power Board Poll'; /** * Plug in mini description * */ -$PORTAL_CONFIG['pc_desc'] = "Выводит выбранный с форума опрос на портале"; +$PORTAL_CONFIG['pc_desc'] = "Shows the selected poll"; /** * Keyword for settings. This is the keyword @@ -81,7 +71,7 @@ $PORTAL_CONFIG['pc_settings_keyword'] = "portal_poll"; * * @param array[ TAG ] = array( FUNCTION NAME, DESCRIPTION ); */ -$PORTAL_CONFIG['pc_exportable_tags']['poll_show_poll'] = array( 'poll_show_poll', 'Вывести блок с опросом' ); +$PORTAL_CONFIG['pc_exportable_tags']['poll_show_poll'] = array( 'poll_show_poll', 'Shows the request poll' ); ?> \ No newline at end of file diff --git a/upload/sources/portal_plugins/poll.php b/upload/sources/portal_plugins/poll.php index 9833e0cb..a0f0f65b 100644 --- a/upload/sources/portal_plugins/poll.php +++ b/upload/sources/portal_plugins/poll.php @@ -2,26 +2,16 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ +| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ | > $Revision: 567 $ | > $Author: matt $ +--------------------------------------------------------------------------- @@ -60,7 +50,7 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } diff --git a/upload/sources/portal_plugins/recent_topics-cfg.php b/upload/sources/portal_plugins/recent_topics-cfg.php index 24c33892..b938f92d 100644 --- a/upload/sources/portal_plugins/recent_topics-cfg.php +++ b/upload/sources/portal_plugins/recent_topics-cfg.php @@ -2,26 +2,16 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ +| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ | > $Revision: 567 $ | > $Author: matt $ +--------------------------------------------------------------------------- @@ -46,13 +36,13 @@ $PORTAL_CONFIG = array(); * Main plug in title * */ -$PORTAL_CONFIG['pc_title'] = 'Последние темы с форума'; +$PORTAL_CONFIG['pc_title'] = 'Invision Power Board Recent Topics'; /** * Plug in mini description * */ -$PORTAL_CONFIG['pc_desc'] = "Выводит последние темы с первым сообщением из них"; +$PORTAL_CONFIG['pc_desc'] = "Shows IPB recent topics with topic's first post"; /** * Keyword for settings. This is the keyword @@ -81,7 +71,7 @@ $PORTAL_CONFIG['pc_settings_keyword'] = "portal_recent_topics"; * * @param array[ TAG ] = array( FUNCTION NAME, DESCRIPTION ); */ -$PORTAL_CONFIG['pc_exportable_tags']['recent_topics_last_x'] = array( 'recent_topics_last_x' , 'Вывести блок с последними темами из определенных форумов' ); -$PORTAL_CONFIG['pc_exportable_tags']['recent_topics_discussions_last_x'] = array( 'recent_topics_discussions_last_x', 'Вывести блок с последними темами из всех форумов' ); +$PORTAL_CONFIG['pc_exportable_tags']['recent_topics_last_x'] = array( 'recent_topics_last_x' , 'Shows the last X topics with full post from the selected forums' ); +$PORTAL_CONFIG['pc_exportable_tags']['recent_topics_discussions_last_x'] = array( 'recent_topics_discussions_last_x', 'Shows the last X topic titles from ALL viewable forums' ); ?> \ No newline at end of file diff --git a/upload/sources/portal_plugins/recent_topics.php b/upload/sources/portal_plugins/recent_topics.php index 74b8ff36..5f1af1cb 100644 --- a/upload/sources/portal_plugins/recent_topics.php +++ b/upload/sources/portal_plugins/recent_topics.php @@ -2,28 +2,18 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ +| > $Date: 2008-04-23 15:02:02 -0400 (Wed, 23 Apr 2008) $ +| > $Revision: 1254 $ +| > $Author: bfarber $ +--------------------------------------------------------------------------- | | > PORTAL PLUG IN MODULE: Recent topics @@ -62,7 +52,7 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -71,7 +61,7 @@ class ppi_recent_topics /** * IPS Global object * - * @var string + * @var object */ var $ipsclass; @@ -83,6 +73,15 @@ class ppi_recent_topics */ var $portal_object = array(); + /** + * Maximum number of days to check: + * limits resource usage. Set to 0 + * for no days restriction. + * + * @var int + */ + var $max_days = 20; + /*-------------------------------------------------------------------------*/ // INIT /*-------------------------------------------------------------------------*/ @@ -116,10 +115,12 @@ class ppi_recent_topics { return; } + + $time_restrict = $this->max_days ? " AND start_date > " . ( time() - 60 * 60 * 24 * $this->max_days ) : ''; $this->ipsclass->DB->simple_construct( array( 'select' => 'tid, title, posts, starter_id as member_id, starter_name as member_name, start_date as post_date, views', 'from' => 'topics', - 'where' => "$qe approved=1 and state != 'closed' and (moved_to is null or moved_to = '')", + 'where' => "$qe approved=1 and state != 'closed' and (moved_to is null or moved_to = '')" . $time_restrict, 'order' => 'start_date DESC', 'limit' => array( 0, $limit ) ) ); $this->ipsclass->DB->simple_exec(); @@ -172,6 +173,13 @@ class ppi_recent_topics $this->ipsclass->vars['recent_topics_article_forum'] = ','.$this->ipsclass->vars['recent_topics_article_forum']; } + $time_restrict = $this->max_days ? " AND t.start_date > " . ( time() - 60 * 60 * 24 * $this->max_days * 2 ) : ''; + + if( $time_restrict ) + { + $qe .= $time_restrict; + } + $this->ipsclass->DB->cache_add_query( 'portal_get_monster_bitch', array( 'csite_article_forum' => $this->ipsclass->vars['recent_topics_article_forum'], 'qe' => $qe, 'limit' => $limit ) ); $outer = $this->ipsclass->DB->cache_exec_query(); @@ -199,6 +207,12 @@ class ppi_recent_topics $entry['posts'] = $this->ipsclass->do_number_format(intval($entry['posts'])); $entry['views'] = $this->ipsclass->do_number_format($entry['views']); + if( !$entry['author_id'] ) + { + $entry['member_name'] = $this->ipsclass->vars['guest_name_pre'] . $entry['author_name'] . $this->ipsclass->vars['guest_name_suf']; + $entry['member_id'] = 0; + } + //----------------------------------------- // LINKS //----------------------------------------- @@ -241,28 +255,38 @@ class ppi_recent_topics //----------------------------------------- $attach_pids[ $entry['pid'] ] = $entry['pid']; - - //----------------------------------------- - // Format posts - //----------------------------------------- - - $this->portal_object['parser']->parse_html = ( $this->ipsclass->cache['forum_cache'][ $entry['forum_id'] ]['use_html'] and $entry['post_htmlstate'] ) ? 1 : 0; - $this->portal_object['parser']->parse_wordwrap = $this->ipsclass->vars['post_wordwrap']; - $this->portal_object['parser']->parse_nl2br = $entry['post_htmlstate'] == 2 ? 1 : 0; - - $entry['post'] = $this->portal_object['parser']->pre_display_parse( $entry['post'] ); //----------------------------------------- // Avatar //----------------------------------------- - $entry['avatar'] = $this->ipsclass->get_avatar( $entry['avatar_location'], 1, $entry['avatar_size'], $entry['avatar_type'] ); + $entry['avatar'] = $this->ipsclass->get_avatar( $entry['avatar_location'], $this->ipsclass->member['view_avs'], $entry['avatar_size'], $entry['avatar_type'] ); if ( $entry['avatar'] ) { $entry['avatar'] = $this->ipsclass->compiled_templates['skin_portal']->tmpl_wrap_avatar( $entry['avatar'] ); } + if ( $this->ipsclass->check_perms($this->ipsclass->forums->forum_by_id[ $entry['forum_id'] ]['download_perms']) === FALSE ) + { + $this->ipsclass->vars['show_img_upload'] = 0; + } + + //----------------------------------------- + // View image... + //----------------------------------------- + + if ( ! $this->ipsclass->member['view_img'] ) + { + //----------------------------------------- + // unconvert smilies first, or it looks a bit crap. + //----------------------------------------- + + $entry['post'] = preg_replace( "#.+?#", "\\1" , $entry['post'] ); + + $entry['post'] = preg_replace( "//", "(IMG:\\1) ", $entry['post'] ); + } + $html .= $this->ipsclass->compiled_templates['skin_portal']->tmpl_articles_row($entry, $bottom_string, $top_string); } diff --git a/upload/sources/sql/index.html b/upload/sources/sql/index.html index 250b1f72..af2fbe79 100644 --- a/upload/sources/sql/index.html +++ b/upload/sources/sql/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/sources/sql/mysql_admin_queries.php b/upload/sources/sql/mysql_admin_queries.php index b94ed48e..db279dcb 100644 --- a/upload/sources/sql/mysql_admin_queries.php +++ b/upload/sources/sql/mysql_admin_queries.php @@ -2,26 +2,18 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-11-20 13:46:59 -0600 (Mon, 20 Nov 2006) $ -| > $Revision: 736 $ -| > $Author: bfarber $ +| > $Date: 2007-03-01 11:52:54 -0500 (Thu, 01 Mar 2007) $ +| > $Revision: 866 $ +| > $Author: matt $ +--------------------------------------------------------------------------- | | > MySQL ADMIN DB Queries abstraction module @@ -34,8 +26,8 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); } class sql_queries extends db_driver_mysql @@ -274,7 +266,7 @@ class sql_queries extends db_driver_mysql WHERE m.id IN(".implode( ",",$a['ids'] ).")"; } - + function member_search_form_one( $a ) { return "SELECT m.*, me.*, m.id as memid, pp.* @@ -491,12 +483,14 @@ class sql_queries extends db_driver_mysql ORDER BY group_name, theorder DESC"; } + # CHANGED IPB 2.2.3 function cache_templates_bits( $a ) { return "SELECT *, INSTR(',{$a['id']}{$a['parent_in']},{$a['root']},' , CONCAT(',',set_id,',') ) as theorder FROM ".SQL_PREFIX."skin_templates - WHERE set_id IN ({$a['id']}{$a['parent_in']},{$a['root']}) AND group_name='{$a['group']}' + WHERE set_id IN ({$a['id']}{$a['parent_in']},{$a['root']}) + AND ( group_name='{$a['group']}' OR group_names_secondary LIKE '%,{$a['group']},%' ) ORDER BY func_name,theorder DESC"; } diff --git a/upload/sources/sql/mysql_api_queries.php b/upload/sources/sql/mysql_api_queries.php index 3d1fb54d..f3b2a21f 100644 --- a/upload/sources/sql/mysql_api_queries.php +++ b/upload/sources/sql/mysql_api_queries.php @@ -2,22 +2,14 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +--------------------------------------------------------------------------- | > $Date: 2006-05-24 17:31:43 -0400 (Wed, 24 May 2006) $ | > $Revision: 276 $ @@ -34,7 +26,7 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } diff --git a/upload/sources/sql/mysql_extra_queries.php b/upload/sources/sql/mysql_extra_queries.php index dc037d64..1937368e 100644 --- a/upload/sources/sql/mysql_extra_queries.php +++ b/upload/sources/sql/mysql_extra_queries.php @@ -2,25 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-11-20 13:46:59 -0600 (Mon, 20 Nov 2006) $ -| > $Revision: 736 $ +| > $Date: 2007-12-17 18:07:20 -0500 (Mon, 17 Dec 2007) $ +| > $Revision: 1149 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -34,7 +26,7 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -105,7 +97,7 @@ class sql_extra_queries extends db_driver_mysql function digest_get_topics( $a ) { - return "SELECT tr.trid, tr.topic_id, tr.member_id as trmid, m.members_display_name, m.email, m.id, m.email_full, m.language, m.last_activity, t.title, t.* + return "SELECT tr.trid, tr.topic_id, tr.member_id as trmid, m.mgroup, m.mgroup_others, m.org_perm_id, m.members_display_name, m.email, m.id, m.email_full, m.language, m.last_activity, t.title, t.* FROM ".SQL_PREFIX."tracker tr LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=tr.topic_id) LEFT JOIN ".SQL_PREFIX."members m ON (m.id=tr.member_id) @@ -128,7 +120,7 @@ class sql_extra_queries extends db_driver_mysql function digest_get_forums( $a ) { - return "SELECT ft.*, m.members_display_name, m.id, m.email, m.language + return "SELECT ft.*, m.members_display_name, m.mgroup, m.mgroup_others, m.org_perm_id, m.id, m.email, m.language FROM ".SQL_PREFIX."forum_tracker ft LEFT JOIN ".SQL_PREFIX."members m ON (m.id=ft.member_id) WHERE ft.forum_track_type='{$a['type']}'"; diff --git a/upload/sources/sql/mysql_queries.php b/upload/sources/sql/mysql_queries.php index 4d02695f..282a619e 100644 --- a/upload/sources/sql/mysql_queries.php +++ b/upload/sources/sql/mysql_queries.php @@ -1,802 +1,794 @@ - $Date: 2006-11-20 13:46:59 -0600 (Mon, 20 Nov 2006) $ -| > $Revision: 736 $ -| > $Author: bfarber $ -+--------------------------------------------------------------------------- -| -| > MySQL DB Queries abstraction module -| > Module written by Matt Mecham -| > Date started: 26th November 2003 -| -| > Module Version Number: 1.0.0 -+-------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_IPB' ) ) -{ - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); -} - -class sql_queries extends db_driver_mysql -{ - - var $db = ""; - var $tbl = ""; - - /*========================================================================*/ - // Set up... - /*========================================================================*/ - - function sql_queries( &$obj ) - { - $this->db = &$obj; - - if ( ! isset($this->db->obj['sql_tbl_prefix']) ) - { - $this->db->obj['sql_tbl_prefix'] = SQL_PREFIX; - } - - $this->tbl = $this->db->obj['sql_tbl_prefix']; - } - - /*========================================================================*/ - - # NEW: 2.2 - function calendar_get_events( $a ) - { - return "SELECT * - FROM ".SQL_PREFIX."cal_events - WHERE event_calendar_id={$a['calendar_id']} AND {$a['approved']} - AND ( (event_unix_to >= {$a['timenow']} AND event_unix_from <= {$a['timethen']} ) - OR ( event_unix_to=0 AND event_unix_from >= {$a['timenow']} AND event_unix_from <= {$a['timethen']} ) - OR ( event_recurring=3 AND FROM_UNIXTIME(event_unix_from,'%c') IN ({$a['month']}) AND event_unix_to <= {$a['timethen']} ) )"; - } - - function calendar_get_events_cache( $a ) - { - return "SELECT * - FROM ".SQL_PREFIX."cal_events - WHERE {$a['extra']} event_approved=1 - AND ( (event_unix_to >= {$a['timenow']} AND event_unix_from <= {$a['timethen']} ) - OR ( event_unix_to=0 AND event_unix_from >= {$a['timenow']} AND event_unix_from <= {$a['timethen']} ) - OR ( event_recurring=3 AND FROM_UNIXTIME(event_unix_from,'%c')={$a['month']} AND event_unix_to <= {$a['timethen']} ) )"; - } - - function session_get_count( $a ) - { - $to_return = ""; - - $to_return = "SELECT COUNT(*) as total_sessions - FROM ".SQL_PREFIX."sessions s - WHERE s.running_time > {$a['time']} {$a['db_mem']}"; - - if( $a['remove_anon'] ) - { - $to_return .= " AND s.login_type <> 1"; - } - - if( $a['remove_spiders'] ) - { - $to_return .= " AND RIGHT(s.id, 8) != '_session'"; - } - - return $to_return; - } - - function session_get_sessions( $a ) - { - $to_return = ""; - - $to_return = "SELECT * - FROM ".SQL_PREFIX."sessions s - WHERE s.running_time > {$a['time']} {$a['db_mem']}"; - - if( $a['remove_anon'] ) - { - $to_return .= " AND s.login_type <> 1"; - } - - if( $a['remove_spiders'] ) - { - $to_return .= " AND RIGHT(s.id, 8) != '_session'"; - } - - $to_return .= " ORDER BY {$a['db_key']} {$a['db_order']} LIMIT {$a['start']}, {$a['finish']}"; - - return $to_return; - } - - - # NEW: 2.1 (a5) - function general_get_by_display_name( $a ) - { - return "SELECT id, members_display_name, name, email, mgroup, member_login_key, ip_address, login_anonymous - FROM ".SQL_PREFIX."members - WHERE members_l_display_name='{$a['members_display_name']}'"; - } - - - function forums_get_replied_topics( $a ) - { - return "SELECT COUNT(DISTINCT(p.topic_id)) as max - FROM ".SQL_PREFIX."topics t - LEFT JOIN ".SQL_PREFIX."posts p ON (p.topic_id=t.tid) - WHERE t.forum_id={$a['fid']} AND p.author_id={$a['mid']} AND p.new_topic=0 - {$a['approved']} {$a['prune_filter']}"; - } - - function forums_get_replied_topics_actual( $a ) - { - return "SELECT DISTINCT(p.author_id), t.* - FROM ".SQL_PREFIX."topics t - LEFT JOIN ".SQL_PREFIX."posts p ON (p.topic_id=t.tid AND p.author_id={$a['mid']}) - WHERE t.forum_id={$a['fid']} AND {$a['query']} AND p.new_topic=0 - ORDER BY t.pinned desc,{$a['topic_sort']} {$a['sort_key']} {$a['r_sort_by']} - LIMIT {$a['limit_a']}, {$a['limit_b']}"; - } - - function topics_check_for_mod( $a ) - { - # topics.php - - return "SELECT * - FROM ".SQL_PREFIX."moderators - WHERE forum_id={$a['fid']} AND (member_id={$a['mid']} OR (is_group=1 AND group_id IN({$a['gid']})))"; - } - - - function topics_get_posts( $a ) - { - # topics.php - - return "SELECT p.*, pp.*, - m.id,m.name,m.mgroup,m.email,m.joined,m.posts, m.last_visit, m.last_activity,m.login_anonymous,m.title,m.hide_email, m.warn_level, m.warn_lastwarn, - me.msnname,me.aim_name,me.icq_number,me.signature, me.website,me.yahoo,me.location, me.avatar_location, me.avatar_type, me.avatar_size, m.members_display_name - FROM ".SQL_PREFIX."posts p - LEFT JOIN ".SQL_PREFIX."members m ON (m.id=p.author_id) - LEFT JOIN ".SQL_PREFIX."profile_portal pp ON (m.id=pp.pp_member_id) - LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=m.id) - WHERE p.pid IN(".implode(',', $a['pids']).") - ORDER BY {$a['scol']} {$a['sord']}"; - } - - function topics_get_posts_with_join( $a ) - { - # topics.php - - return "SELECT p.*, pp.*, - m.id,m.name,m.mgroup,m.email,m.joined,m.posts, m.last_visit, m.last_activity,m.login_anonymous,m.title,m.hide_email, m.warn_level, m.warn_lastwarn, - me.msnname,me.aim_name,me.icq_number,me.signature, me.website,me.yahoo,me.location, me.avatar_location, me.avatar_type, me.avatar_size, m.members_display_name, - pc.* - FROM ".SQL_PREFIX."posts p - LEFT JOIN ".SQL_PREFIX."members m ON (m.id=p.author_id) - LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=m.id) - LEFT JOIN ".SQL_PREFIX."pfields_content pc ON (pc.member_id=p.author_id) - LEFT JOIN ".SQL_PREFIX."profile_portal pp ON (m.id=pp.pp_member_id) - WHERE p.pid IN(".implode(',', $a['pids']).") - ORDER BY {$a['scol']} {$a['sord']}"; - } - - function topics_get_active_users( $a ) - { - # topics.php - - return "SELECT s.member_id, s.member_name, s.member_group, s.id, s.login_type, s.location, s.running_time - FROM ".SQL_PREFIX."sessions s - WHERE s.location_1_type='topic' AND s.location_1_id={$a['tid']} - AND s.running_time > {$a['time']} AND s.in_error=0"; - } - - # Deleted - function topics_replace_topic_read( $a ) - { - # topics.php - # Not got REPLACE INTO? Use delete from .. where, then insert into ... set... - - return "REPLACE INTO ".SQL_PREFIX."topics_read - SET read_tid={$a['tid']},read_mid={$a['mid']},read_date={$a['date']}"; - } - - - function post_topic_tracker( $a ) - { - #post - - return "SELECT tr.trid, tr.topic_id, tr.last_sent, m.members_display_name, m.email, m.id, m.email_full, m.language, m.org_perm_id, m.mgroup, m.mgroup_others, m.last_activity, t.title, t.forum_id, t.approved - FROM ".SQL_PREFIX."tracker tr - LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=tr.topic_id) - LEFT JOIN ".SQL_PREFIX."members m ON (m.id=tr.member_id) - WHERE tr.topic_id='{$a['tid']}' AND m.id <> {$a['mid']} - AND ( ( tr.topic_track_type='delayed' AND m.last_activity < {$a['last_post']} ) OR tr.topic_track_type='immediate' )"; - - } - - #REMOVED - /*function post_forum_tracker( $a ) - { - #post - - return "SELECT tr.frid, m.name, m.email, m.id, m.language, m.last_activity, m.org_perm_id, g.g_perm_id - FROM ".SQL_PREFIX."forum_tracker tr,".SQL_PREFIX."members m, ".SQL_PREFIX."groups g - WHERE tr.forum_id={$a['fid']} - AND tr.member_id=m.id - AND m.mgroup=g.g_id - AND m.id <> {$a['mid']} - AND ( ( tr.forum_track_type='delayed' AND m.last_activity < {$a['last_post']} ) OR tr.forum_track_type='immediate' )"; - }*/ - - - function post_get_quoted( $a ) - { - return "SELECT p.*,t.forum_id - FROM ".SQL_PREFIX."posts p - LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=p.topic_id) - WHERE pid IN (".implode(",", $a['quoted_pids']).")"; - - } - - function msg_get_msg_poster( $a ) - { - return "SELECT m.*, g.* - FROM ".SQL_PREFIX."members m - LEFT JOIN ".SQL_PREFIX."groups g ON (g.g_id=m.mgroup) - WHERE m.id={$a['mid']}"; - } - - - function msg_get_msg_to_show( $a ) - { - return "SELECT m.id,m.name,m.members_disable_pm,m.mgroup,m.email,m.joined,m.posts, m.last_visit, m.last_activity,m.login_anonymous,m.title,m.hide_email, m.warn_level, m.warn_lastwarn, - g.g_id, g.g_title, g.g_icon, g.g_dohtml, m.members_display_name, - me.msnname,me.aim_name,me.icq_number,me.signature, me.website,me.yahoo,me.location, me.avatar_location, me.avatar_type, me.avatar_size, - mt.*, msg.*, pp.* - FROM ".SQL_PREFIX."message_topics mt - LEFT JOIN ".SQL_PREFIX."message_text msg ON (msg.msg_id=mt.mt_msg_id) - LEFT JOIN ".SQL_PREFIX."members m ON (m.id=mt.mt_from_id) - LEFT JOIN ".SQL_PREFIX."groups g ON (g.g_id=m.mgroup) - LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=m.id) - LEFT JOIN ".SQL_PREFIX."profile_portal pp ON (m.id=pp.pp_member_id) - WHERE mt.mt_id={$a['msgid']} AND mt.mt_owner_id={$a['mid']}"; - } - - function msg_get_saved_msg( $a ) - { - return "SELECT m.id, m.name, m.members_display_name, m.members_disable_pm, mt.*, msg.*, mm.id as from_id, mm.members_display_name as from_name - FROM ".SQL_PREFIX."message_topics mt - LEFT JOIN ".SQL_PREFIX."message_text msg ON (msg.msg_id=mt.mt_msg_id) - LEFT JOIN ".SQL_PREFIX."members m ON (m.id=mt.mt_to_id) - LEFT JOIN ".SQL_PREFIX."members mm ON (mm.id=mt.mt_from_id) - WHERE mt.mt_id={$a['msgid']} AND mt.mt_owner_id={$a['mid']}"; - } - - #IPB 2.1: Changed m.members_display_name AND LOWER(m.members_display_name) - function msg_get_cc_users( $a ) - { - - return "SELECT m.mgroup_others, m.id, m.name, m.members_disable_pm, m.members_display_name, m.msg_total, m.view_pop, m.email_pm, m.language, m.email, me.vdirs, g.g_max_messages, g.g_use_pm - FROM ".SQL_PREFIX."members m - INNER JOIN ".SQL_PREFIX."groups g ON (g.g_id=m.mgroup) - LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=m.id) - WHERE m.members_l_display_name IN (".implode(",",$a['name_array']).")"; - } - - function msg_get_cc_blocked( $a ) - { - - return "SELECT m.name, m.members_display_name, m.members_disable_pm, c.allow_msg - FROM ".SQL_PREFIX."members m - LEFT JOIN ".SQL_PREFIX."contacts c ON (c.member_id=m.id) - WHERE c.contact_id={$a['mid']} AND c.member_id IN (".implode(",",$a['cc_array']).")"; - } - - # Changed: mem.members_display_name as from_name - function msg_get_sent_list( $a ) - { - return "SELECT mem.members_display_name as from_name, mem.id as from_id, mt.*, msg.msg_id, msg.msg_cc_users - FROM ".SQL_PREFIX."message_topics mt - LEFT JOIN ".SQL_PREFIX."members mem ON ( mem.id=mt.mt_to_id ) - LEFT JOIN ".SQL_PREFIX."message_text msg ON ( msg.msg_id=mt.mt_msg_id ) - WHERE mt.mt_owner_id={$a['mid']} AND (mt.mt_from_id={$a['mid']} OR mt.mt_to_id={$a['mid']}) AND mt.mt_vid_folder='{$a['vid']}' - ORDER BY {$a['sort']} - LIMIT {$a['limita']}, {$a['limitb']}"; - } - - # Changed: mem.members_display_name as from_name - function msg_get_folder_list( $a ) - { - return "SELECT mt.*,mem.members_display_name as from_name, mem.id as from_id - FROM ".SQL_PREFIX."message_topics mt - LEFT JOIN ".SQL_PREFIX."members mem ON ( mem.id=mt.mt_from_id ) - WHERE mt.mt_owner_id={$a['mid']} AND mt.mt_to_id={$a['mid']} AND mt.mt_vid_folder='{$a['vid']}' - ORDER BY {$a['sort']} - LIMIT {$a['limita']}, {$a['limitb']}"; - } - - # Changed: mp.members_display_name as to_name - function msg_get_tracking( $a ) - { - return "SELECT msg.*, mt.*, mp.members_display_name as to_name, mp.id as memid - FROM ".SQL_PREFIX."message_topics mt - LEFT JOIN ".SQL_PREFIX."message_text msg ON ( msg.msg_id= mt.mt_msg_id ) - LEFT JOIN ".SQL_PREFIX."members mp ON (mp.id=mt.mt_to_id) - WHERE mt.mt_from_id={$a['mid']} AND mt.mt_tracking=1 - ORDER BY mt.mt_date DESC"; - - } - - # Updated (msg_get_new_pm_notification) in v2.1 [changed LIMIT ADDED m.members_display_name ] - function msg_get_new_pm_notification( $a ) - { - return "SELECT m.id,m.name,m.mgroup,m.email,m.joined,m.posts, m.last_visit, m.last_activity, - m.warn_level, m.warn_lastwarn, m.members_display_name, - me.*, - g.g_id, g.g_title, g.g_icon, g.g_dohtml, mt.*, msg.* - FROM ".SQL_PREFIX."message_topics mt - LEFT JOIN ".SQL_PREFIX."message_text msg ON (msg.msg_id=mt.mt_msg_id) - LEFT JOIN ".SQL_PREFIX."members m ON (m.id=mt.mt_from_id) - LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=mt.mt_from_id) - LEFT JOIN ".SQL_PREFIX."groups g ON (g.g_id=m.mgroup) - WHERE mt.mt_owner_id={$a['mid']} AND mt.mt_vid_folder='in' - ORDER BY mt_date DESC - LIMIT {$a['limit_a']},1"; - } - - function ucp_tracker_prune( $a ) - { - return "SELECT tr.trid - FROM ".SQL_PREFIX."tracker tr - LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=tr.topic_id) - WHERE t.last_post < {$a['time']}"; - } - # Changed - function profile_get_all( $a ) - { - return "SELECT m.*, me.*, s.location_1_id, s.location_2_id, s.location_1_type, s.location_2_type, s.running_time, s.location as sesslocation, p.* - FROM ".SQL_PREFIX."members m - LEFT JOIN ".SQL_PREFIX."member_extra me ON ( me.id=m.id ) - LEFT JOIN ".SQL_PREFIX."sessions s ON (s.member_id=m.id) - LEFT JOIN ".SQL_PREFIX."profile_portal p ON (p.pp_member_id=m.id) - WHERE m.id={$a['mid']}"; - } - - function profile_get_favourite( $a ) - { - return "SELECT t.forum_id, COUNT(p.author_id) as f_posts - FROM ".SQL_PREFIX."posts p - LEFT JOIN ".SQL_PREFIX."topics t ON ( t.tid=p.topic_id AND t.forum_id IN (".implode(",",$a['fid_array']).") ) - WHERE p.author_id={$a['mid']} AND t.tid IS NOT NULL - GROUP BY t.forum_id - ORDER BY f_posts DESC"; - } - - function usercp_get_attachments( $a ) - { - return "SELECT a.*, t.*, p.topic_id - FROM ".SQL_PREFIX."attachments a - LEFT JOIN ".SQL_PREFIX."posts p ON ( p.pid=a.attach_rel_id ) - LEFT JOIN ".SQL_PREFIX."topics t ON ( t.tid=p.topic_id ) - WHERE a.attach_member_id={$a['mid']} AND a.attach_rel_module='post' - ORDER BY {$a['order']} - LIMIT {$a['limit_a']}, {$a['limit_b']}"; - } - - function usercp_get_to_delete( $a ) - { - return "SELECT a.*, p.topic_id, p.pid - FROM ".SQL_PREFIX."attachments a - LEFT JOIN ".SQL_PREFIX."posts p ON ( p.pid=a.attach_rel_id ) - WHERE a.attach_id IN (".implode(",",$a['aid_array']).") AND a.attach_rel_module='post' - AND attach_member_id={$a['mid']}"; - } - - - - function stats_get_all_members( $a ) - { - return "SELECT m.*, me.* - FROM ".SQL_PREFIX."members m - LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=m.id) - WHERE m.id IN(".implode(',', $a['member_ids']).") - ORDER BY m.members_l_display_name"; - } - - function stats_get_all_members_groups( $a ) - { - return "SELECT m.*, me.* - FROM ".SQL_PREFIX."members m - LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=m.id) - WHERE m.mgroup IN (".implode( ',', $a['group_ids'] ).") - ORDER BY m.members_l_display_name"; - } - - function stats_get_todays_posters( $a ) - { - return "SELECT COUNT(*) as tpost, m.id, m.name, m.members_display_name, m.joined, m.posts - FROM ".SQL_PREFIX."posts p - LEFT JOIN ".SQL_PREFIX."members m ON (m.id=p.author_id ) - LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=p.topic_id) - WHERE t.forum_id in(".implode(",", $a['ids']).") and p.post_date > {$a['time_low']} - GROUP BY p.author_id - ORDER BY tpost DESC - LIMIT 0,20"; - } - - - # Changed: added m.members_display_name - function ucp_get_all_announcements( $a ) - { - return "SELECT a.*, m.id, m.name, m.members_display_name - FROM ".SQL_PREFIX."announcements a - LEFT JOIN ".SQL_PREFIX."members m on (m.id=a.announce_member_id) - ORDER BY a.announce_end DESC"; - } - - function ucp_get_all_announcements_byid( $a ) - { - return "SELECT a.*, pp.*, m.*, me.* - FROM ".SQL_PREFIX."announcements a - LEFT JOIN ".SQL_PREFIX."members m on (m.id=a.announce_member_id) - LEFT JOIN ".SQL_PREFIX."profile_portal pp ON (m.id=pp.pp_member_id) - LEFT JOIN ".SQL_PREFIX."member_extra me on (me.id=m.id) - WHERE a.announce_id={$a['id']}"; - } - - function ucp_get_forum_tracker( $a ) - { - return "SELECT t.*, f.* - FROM ".SQL_PREFIX."forum_tracker t - LEFT JOIN ".SQL_PREFIX."forums f ON (f.id=t.forum_id) - WHERE t.member_id={$a['mid']} - ORDER BY f.position"; - } - - function ucp_get_topic_tracker( $a ) - { - return "SELECT s.topic_track_type, s.trid, s.member_id, s.topic_id, s.last_sent, s.start_date as track_started, t.*, f.id as forum_id, f.name as forum_name - FROM ".SQL_PREFIX."tracker s - LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=s.topic_id) - LEFT JOIN ".SQL_PREFIX."forums f ON (f.id=t.forum_id) - WHERE s.member_id={$a['mid']} {$a['date_query']} - ORDER BY f.id, t.last_post DESC"; - } - - # Changed, removed group stuff - function mlist_count( $a ) - { - # Attempt to optimize on the fly... - - $query_bit_1 = ''; - $query_bit_2 = ''; - - if ( strstr( $a['query'], 'p.field_' ) ) - { - $query_bit_2 = "LEFT JOIN ".SQL_PREFIX."pfields_content p ON (p.member_id=m.id)"; - } - - if ( strstr( $a['query'], 'me.' ) ) - { - $query_bit_1 = "LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=m.id)"; - } - - if ( strstr( $a['query'], 'pp.' ) ) - { - $query_bit_3 = "LEFT JOIN ".SQL_PREFIX."profile_portal pp ON (m.id=pp.pp_member_id)"; - } - - if ( $a['query'] ) - { - $a['query'] = 'WHERE '.$a['query']; - } - - return "SELECT COUNT(*) as total_members FROM ".SQL_PREFIX."members m - {$query_bit_1} - {$query_bit_2} - {$query_bit_3} - {$a['query']}"; - } - - # Changed, removed group stuff - function mlist_get_members( $a ) - { - if ( $a['query'] ) - { - $a['query'] = 'WHERE '.$a['query']; - } - - if ( $a['sort'] == 'pp_profile_views' ) - { - $a['sort'] = 'pp.' . $a['sort']; - } - else - { - $a['sort'] = 'm.' . $a['sort']; - } - - return "SELECT m.*,me.*,p.*,pp.* - FROM ".SQL_PREFIX."members m - LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=m.id) - LEFT JOIN ".SQL_PREFIX."pfields_content p ON (p.member_id=m.id) - LEFT JOIN ".SQL_PREFIX."profile_portal pp ON (m.id=pp.pp_member_id) - {$a['query']} - ORDER BY {$a['sort']} {$a['order']} - LIMIT {$a['limit_a']}, {$a['limit_b']}"; - } - - function buddy_posts_last_visit( $a ) - { - return "SELECT COUNT(*) as posts - FROM ".SQL_PREFIX."posts p - LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=p.topic_id and t.forum_id IN({$a['forum_string']})) - WHERE p.queued=0 AND p.post_date > {$a['last_visit']}"; - } - - function generic_get_all_member( $a ) - { - return "SELECT g.*, m.*, me.*, p.* - FROM ".SQL_PREFIX."members m - LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=m.id) - LEFT JOIN ".SQL_PREFIX."groups g ON (g.g_id=m.mgroup) - LEFT JOIN ".SQL_PREFIX."profile_portal p ON (m.id=p.pp_member_id) - WHERE m.id={$a['mid']}"; - } - - function moderate_get_topics( $a ) - { - return "SELECT p.*,t.forum_id - FROM ".SQL_PREFIX."posts p - LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=p.topic_id) - WHERE pid IN (".implode(",", $a['pids']).")"; - } - - function moderate_concat_title( $a ) - { - return "UPDATE ".SQL_PREFIX."topics - SET title=CONCAT('{$a['pre']}', title, '{$a['end']}') - WHERE tid IN(".implode( ",", $a['tids'] ).")"; - } - - # UPDATE 2.1 - function mod_func_get_last_post( $a ) - { - return "SELECT p.post_date, p.topic_id, p.author_id, p.author_name, p.pid, t.forum_id, m.id, m.members_display_name - FROM ".SQL_PREFIX."posts p - LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=p.topic_id) - LEFT JOIN ".SQL_PREFIX."members m ON (m.id=p.author_id) - WHERE topic_id={$a['tid']} and queued=0 - ORDER BY {$a['orderby']} DESC - LIMIT 0,1"; - } - - function mod_func_get_attach_count( $a ) - { - return "SELECT COUNT(*) as count - FROM ".SQL_PREFIX."attachments a - LEFT JOIN ".SQL_PREFIX."posts p on (p.pid=a.attach_rel_id) - WHERE p.topic_id={$a['tid']} AND a.attach_rel_module='post'"; - - } - - function mod_func_get_topic_tracker( $a ) - { - return "SELECT tr.*, m.id, m.mgroup, m.org_perm_id, t.tid, t.forum_id, g.g_id, g.g_perm_id - FROM ".SQL_PREFIX."tracker tr - LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=tr.topic_id) - LEFT JOIN ".SQL_PREFIX."members m on (m.id=tr.member_id) - LEFT JOIN ".SQL_PREFIX."groups g on (g.g_id=m.mgroup) - WHERE tr.topic_id".$a['tid']; - } - - function search_get_all_user_count( $a ) - { - return "SELECT count(*) as count - FROM ".SQL_PREFIX."posts p - LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=p.topic_id AND t.approved=1) - WHERE p.queued=0 AND t.forum_id IN({$a['forums']}) AND p.author_id={$a['mid']}"; - } - - function search_get_all_user_query( $a ) - { - return "SELECT p.*, t.*, t.posts as topic_posts, t.title as topic_title, m.*, me.*, pp.* - FROM ".SQL_PREFIX."posts p - LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=p.topic_id AND t.approved=1) - LEFT JOIN ".SQL_PREFIX."members m ON (m.id=p.author_id) - LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=p.author_id) - LEFT JOIN ".SQL_PREFIX."profile_portal pp ON (m.id=pp.pp_member_id) - WHERE p.queued=0 AND t.forum_id IN({$a['forums']}) AND p.author_id={$a['mid']} - ORDER BY post_date DESC"; - } - - function search_get_last_ten( $a ) - { - return "SELECT p.*, t.*, t.posts as topic_posts, t.title as topic_title, m.*, me.* - FROM ".SQL_PREFIX."posts p - LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=p.topic_id) - LEFT JOIN ".SQL_PREFIX."members m ON (m.id=p.author_id) - LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=p.author_id) - WHERE p.queued=0 AND t.forum_id IN({$a['forums']}) AND p.author_id={$a['mid']} - ORDER BY post_date DESC - LIMIT 0,10"; - } - - - function poll_get_poll_with_topic( $a ) - { - return "SELECT f.allow_pollbump, t.*, p.pid as poll_id,p.choices,p.starter_id,p.votes - FROM ".SQL_PREFIX."polls p - LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=p.tid) - LEFT JOIN ".SQL_PREFIX."forums f ON (f.id=t.forum_id) - WHERE t.tid={$a['tid']}"; - } - - /** - * contact_member_report_get_mods - * Changed: 2.1.0.BETA4 - * Added: m.members_disable_pm - * - */ - function contact_member_report_get_mods( $a ) - { - return "SELECT m.id, m.members_display_name as name, m.members_disable_pm, m.email, m.mgroup, moderator.member_id, moderator.group_id - FROM ".SQL_PREFIX."moderators moderator - LEFT JOIN ".SQL_PREFIX."members m ON (m.id=moderator.member_id OR m.mgroup=moderator.group_id) - WHERE moderator.forum_id={$a['fid']}"; - } - - /** - * contact_member_report_get_cpaccess - * Changed: 2.1.0.BETA4 - * Added: m.members_disable_pm - * - */ - function contact_member_report_get_cpaccess( $a ) - { - return "SELECT m.id, m.members_display_name as name, m.email, m.members_disable_pm - FROM ".SQL_PREFIX."members m - LEFT JOIN ".SQL_PREFIX."groups g ON (g.g_id=m.mgroup) - WHERE g.g_access_cp=1"; - } - - /** - * contact_member_report_get_supmod - * Changed: 2.1.0.BETA4 - * Added: m.members_disable_pm - * - */ - function contact_member_report_get_supmod( $a ) - { - return "SELECT m.id, m.members_display_name as name, m.email, m.members_disable_pm - FROM ".SQL_PREFIX."members m - LEFT JOIN ".SQL_PREFIX."groups g ON (g.g_id=m.mgroup) - WHERE g.g_is_supmod=1"; - } - - - - function print_page_get_members( $a ) - { - return "SELECT g.*, m.* - FROM ".SQL_PREFIX."members m - LEFT JOIN ".SQL_PREFIX."groups g ON (g.g_id=m.mgroup) - WHERE m.id IN ({$a['mem_ids']})"; - } - - function stats_who_posted( $a ) - { - return "SELECT COUNT(p.pid) as pcount, p.author_id, m.members_display_name as author_name - FROM ".SQL_PREFIX."posts p - LEFT JOIN ".SQL_PREFIX."members m ON (m.id=p.author_id) - WHERE p.topic_id={$a['tid']} AND p.queued=0 - GROUP BY p.author_id - ORDER BY pcount DESC"; - } - - function warn_get_data( $a ) - { - return "SELECT l.*, p.id as punisher_id, p.members_display_name as punisher_name - FROM ".SQL_PREFIX."warn_logs l - LEFT JOIN ".SQL_PREFIX."members p ON ( p.id=l.wlog_addedby ) - WHERE l.wlog_mid={$a['mid']} - ORDER BY l.wlog_date DESC - LIMIT {$a['limit_a']}, {$a['limit_b']}"; - } - - function warn_get_forum( $a ) - { - return "SELECT t.tid, t.title, f.id, f.name - FROM ".SQL_PREFIX."topics t - LEFT JOIN ".SQL_PREFIX."forums f ON (f.id=t.forum_id) - WHERE t.tid={$a['tid']}"; - } - - function portal_get_poll_join( $a ) - { - return "SELECT t.tid, t.title, t.state, t.last_vote, p.*, v.member_id as member_voted - FROM ".SQL_PREFIX."topics t - LEFT JOIN ".SQL_PREFIX."polls p ON (p.tid=t.tid) - LEFT JOIN ".SQL_PREFIX."voters v ON (v.member_id={$a['mid']} and v.tid=t.tid) - WHERE t.tid={$a['tid']}"; - } - - function portal_get_monster_bitch( $a ) - { - return "SELECT t.*, p.*, me.avatar_location, m.view_avs, me.avatar_size, me.avatar_type, - m.id as member_id, m.members_display_name as member_name, m.mgroup - FROM ".SQL_PREFIX."topics t - LEFT JOIN ".SQL_PREFIX."members m ON (m.id=t.starter_id) - LEFT JOIN ".SQL_PREFIX."member_extra me on (me.id=m.id) - LEFT JOIN ".SQL_PREFIX."posts p ON (p.pid=t.topic_firstpost) - WHERE t.forum_id IN (-1{$a['csite_article_forum']}) {$a['qe']} - AND t.approved=1 AND (t.moved_to IS NULL or t.moved_to='') - ORDER BY t.pinned DESC, t.start_date DESC - LIMIT 0,{$a['limit']}"; - } - - function help_search( $a ) - { - return "SELECT id, title, description - FROM ".SQL_PREFIX."faq - WHERE LOWER(title) LIKE '%{$a['search_string']}%' or LOWER(text) LIKE '%{$a['search_string']}%' - ORDER BY title"; - } - - #-- NEW FOR RC1 --# - - function login_getmember( $a ) - { - return "SELECT id, name, members_display_name, members_created_remote, email, mgroup, member_login_key, ip_address, login_anonymous - FROM ".SQL_PREFIX."members - WHERE members_l_username='{$a['username']}'"; - } - - - - function post_get_topic_review( $a ) - { - return "SELECT p.*, m.members_display_name, m.mgroup - FROM ".SQL_PREFIX."posts p - LEFT JOIN ".SQL_PREFIX."members m ON (m.id=p.author_id) - WHERE topic_id={$a['tid']} and queued=0 - ORDER BY pid DESC - LIMIT 0,10"; - } - - # REMOVED - /*function post_forum_tracker_all( $a ) - { - #post - - return "SELECT m.name, m.email, m.id, m.language, m.last_activity, m.org_perm_id, g.g_perm_id - FROM ".SQL_PREFIX."members m, ".SQL_PREFIX."groups g - WHERE m.mgroup IN ({$a['groups']}) - AND m.mgroup=g.g_id - AND m.id <> {$a['mid']} - AND m.allow_admin_mails=1 - AND m.last_activity < {$a['last_post']}"; - }*/ - - -} // end class - - + $Date: 2008-04-29 17:14:34 -0400 (Tue, 29 Apr 2008) $ +| > $Revision: 1269 $ +| > $Author: bfarber $ ++--------------------------------------------------------------------------- +| +| > MySQL DB Queries abstraction module +| > Module written by Matt Mecham +| > Date started: 26th November 2003 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class sql_queries extends db_driver_mysql +{ + + var $db = ""; + var $tbl = ""; + + /*========================================================================*/ + // Set up... + /*========================================================================*/ + + function sql_queries( &$obj ) + { + $this->db = &$obj; + + if ( ! isset($this->db->obj['sql_tbl_prefix']) ) + { + $this->db->obj['sql_tbl_prefix'] = SQL_PREFIX; + } + + $this->tbl = $this->db->obj['sql_tbl_prefix']; + } + + /*========================================================================*/ + + # NEW: 2.2 + function calendar_get_events( $a ) + { + return "SELECT * + FROM ".SQL_PREFIX."cal_events + WHERE event_calendar_id={$a['calendar_id']} AND {$a['approved']} + AND ( (event_unix_to >= {$a['timenow']} AND event_unix_from <= {$a['timethen']} ) + OR ( event_unix_to=0 AND event_unix_from >= {$a['timenow']} AND event_unix_from <= {$a['timethen']} ) + OR ( event_recurring=3 AND FROM_UNIXTIME(event_unix_from,'%c') IN ({$a['month']}) AND event_unix_to <= {$a['timethen']} ) )"; + } + + function calendar_get_events_cache( $a ) + { + return "SELECT * + FROM ".SQL_PREFIX."cal_events + WHERE {$a['extra']} event_approved=1 + AND ( (event_unix_to >= {$a['timenow']} AND event_unix_from <= {$a['timethen']} ) + OR ( event_unix_to=0 AND event_unix_from >= {$a['timenow']} AND event_unix_from <= {$a['timethen']} ) + OR ( event_recurring=3 AND FROM_UNIXTIME(event_unix_from,'%c')={$a['month']} AND event_unix_to <= {$a['timethen']} ) )"; + } + + function session_get_count( $a ) + { + $to_return = ""; + + $to_return = "SELECT COUNT(*) as total_sessions + FROM ".SQL_PREFIX."sessions s + WHERE s.running_time > {$a['time']} {$a['db_mem']}"; + + if( $a['remove_anon'] ) + { + $to_return .= " AND s.login_type <> 1"; + } + + if( $a['remove_spiders'] ) + { + $to_return .= " AND RIGHT(s.id, 8) != '_session'"; + } + + return $to_return; + } + + function session_get_sessions( $a ) + { + $to_return = ""; + + $to_return = "SELECT * + FROM ".SQL_PREFIX."sessions s + WHERE s.running_time > {$a['time']} {$a['db_mem']}"; + + if( $a['remove_anon'] ) + { + $to_return .= " AND s.login_type <> 1"; + } + + if( $a['remove_spiders'] ) + { + $to_return .= " AND RIGHT(s.id, 8) != '_session'"; + } + + $to_return .= " ORDER BY {$a['db_key']} {$a['db_order']} LIMIT {$a['start']}, {$a['finish']}"; + + return $to_return; + } + + + # NEW: 2.1 (a5) + function general_get_by_display_name( $a ) + { + return "SELECT id, members_display_name, name, email, mgroup, member_login_key, ip_address, login_anonymous + FROM ".SQL_PREFIX."members + WHERE members_l_display_name='{$a['members_display_name']}'"; + } + + + function forums_get_replied_topics( $a ) + { + return "SELECT COUNT(DISTINCT(p.topic_id)) as max + FROM ".SQL_PREFIX."topics t + LEFT JOIN ".SQL_PREFIX."posts p ON (p.topic_id=t.tid) + WHERE t.forum_id={$a['fid']} AND p.author_id={$a['mid']} AND p.new_topic=0 + {$a['approved']} {$a['prune_filter']}"; + } + + function forums_get_replied_topics_actual( $a ) + { + return "SELECT DISTINCT(p.author_id), t.* + FROM ".SQL_PREFIX."topics t + LEFT JOIN ".SQL_PREFIX."posts p ON (p.topic_id=t.tid AND p.author_id={$a['mid']}) + WHERE t.forum_id={$a['fid']} AND {$a['query']} AND p.new_topic=0 + ORDER BY t.pinned desc,{$a['topic_sort']} {$a['sort_key']} {$a['r_sort_by']} + LIMIT {$a['limit_a']}, {$a['limit_b']}"; + } + + function topics_check_for_mod( $a ) + { + # topics.php + + return "SELECT * + FROM ".SQL_PREFIX."moderators + WHERE forum_id={$a['fid']} AND (member_id={$a['mid']} OR (is_group=1 AND group_id IN({$a['gid']})))"; + } + + + function topics_get_posts( $a ) + { + # topics.php + + return "SELECT p.*, pp.*, + m.id,m.name,m.mgroup,m.email,m.joined,m.posts, m.last_visit, m.last_activity,m.login_anonymous,m.title,m.hide_email, m.warn_level, m.warn_lastwarn, + me.msnname,me.aim_name,me.icq_number,me.signature, me.website,me.yahoo,me.location, me.avatar_location, me.avatar_type, me.avatar_size, m.members_display_name, m.members_cache, m.has_blog, m.has_gallery + FROM ".SQL_PREFIX."posts p + LEFT JOIN ".SQL_PREFIX."members m ON (m.id=p.author_id) + LEFT JOIN ".SQL_PREFIX."profile_portal pp ON (m.id=pp.pp_member_id) + LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=m.id) + WHERE p.pid IN(".implode(',', $a['pids']).") + ORDER BY {$a['scol']} {$a['sord']}"; + } + + function topics_get_posts_with_join( $a ) + { + # topics.php + + return "SELECT p.*, pp.*, + m.id,m.name,m.mgroup,m.email,m.joined,m.posts, m.last_visit, m.last_activity,m.login_anonymous,m.title,m.hide_email, m.warn_level, m.warn_lastwarn, + me.msnname,me.aim_name,me.icq_number,me.signature, me.website,me.yahoo,me.location, me.avatar_location, me.avatar_type, me.avatar_size, m.members_display_name, m.members_cache, m.has_blog, m.has_gallery, + pc.* + FROM ".SQL_PREFIX."posts p + LEFT JOIN ".SQL_PREFIX."members m ON (m.id=p.author_id) + LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=m.id) + LEFT JOIN ".SQL_PREFIX."pfields_content pc ON (pc.member_id=p.author_id) + LEFT JOIN ".SQL_PREFIX."profile_portal pp ON (m.id=pp.pp_member_id) + WHERE p.pid IN(".implode(',', $a['pids']).") + ORDER BY {$a['scol']} {$a['sord']}"; + } + + function topics_get_active_users( $a ) + { + # topics.php + + return "SELECT s.member_id, s.member_name, s.member_group, s.id, s.login_type, s.location, s.running_time + FROM ".SQL_PREFIX."sessions s + WHERE s.location_1_type='topic' AND s.location_1_id={$a['tid']} + AND s.running_time > {$a['time']} AND s.in_error=0"; + } + + # Deleted + function topics_replace_topic_read( $a ) + { + # topics.php + # Not got REPLACE INTO? Use delete from .. where, then insert into ... set... + + return "REPLACE INTO ".SQL_PREFIX."topics_read + SET read_tid={$a['tid']},read_mid={$a['mid']},read_date={$a['date']}"; + } + + + function post_topic_tracker( $a ) + { + #post + + return "SELECT tr.trid, tr.topic_id, tr.last_sent, m.members_display_name, m.email, m.id, m.email_full, m.language, m.org_perm_id, m.mgroup, m.mgroup_others, m.last_activity, t.title, t.forum_id, t.approved + FROM ".SQL_PREFIX."tracker tr + LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=tr.topic_id) + LEFT JOIN ".SQL_PREFIX."members m ON (m.id=tr.member_id) + WHERE tr.topic_id='{$a['tid']}' AND m.id <> {$a['mid']} + AND ( ( tr.topic_track_type='delayed' AND m.last_activity < {$a['last_post']} ) OR tr.topic_track_type='immediate' )"; + + } + + #REMOVED + /*function post_forum_tracker( $a ) + { + #post + + return "SELECT tr.frid, m.name, m.email, m.id, m.language, m.last_activity, m.org_perm_id, g.g_perm_id + FROM ".SQL_PREFIX."forum_tracker tr,".SQL_PREFIX."members m, ".SQL_PREFIX."groups g + WHERE tr.forum_id={$a['fid']} + AND tr.member_id=m.id + AND m.mgroup=g.g_id + AND m.id <> {$a['mid']} + AND ( ( tr.forum_track_type='delayed' AND m.last_activity < {$a['last_post']} ) OR tr.forum_track_type='immediate' )"; + }*/ + + + function post_get_quoted( $a ) + { + return "SELECT p.*,t.forum_id + FROM ".SQL_PREFIX."posts p + LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=p.topic_id) + WHERE pid IN (".implode(",", $a['quoted_pids']).")"; + + } + + function msg_get_msg_poster( $a ) + { + return "SELECT m.*, g.* + FROM ".SQL_PREFIX."members m + LEFT JOIN ".SQL_PREFIX."groups g ON (g.g_id=m.mgroup) + WHERE m.id={$a['mid']}"; + } + + + function msg_get_msg_to_show( $a ) + { + return "SELECT m.id,m.name,m.members_disable_pm,m.mgroup,m.email,m.joined,m.posts, m.last_visit, m.last_activity,m.login_anonymous,m.title,m.hide_email, m.warn_level, m.warn_lastwarn, + g.g_id, g.g_title, g.g_icon, g.g_dohtml, m.members_display_name, m.members_cache, m.has_blog, m.has_gallery, + me.msnname,me.aim_name,me.icq_number,me.signature, me.website,me.yahoo,me.location, me.avatar_location, me.avatar_type, me.avatar_size, + mt.*, msg.*, pp.* + FROM ".SQL_PREFIX."message_topics mt + LEFT JOIN ".SQL_PREFIX."message_text msg ON (msg.msg_id=mt.mt_msg_id) + LEFT JOIN ".SQL_PREFIX."members m ON (m.id=mt.mt_from_id) + LEFT JOIN ".SQL_PREFIX."groups g ON (g.g_id=m.mgroup) + LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=m.id) + LEFT JOIN ".SQL_PREFIX."profile_portal pp ON (m.id=pp.pp_member_id) + WHERE mt.mt_id={$a['msgid']} AND mt.mt_owner_id={$a['mid']}"; + } + + function msg_get_saved_msg( $a ) + { + return "SELECT m.id, m.name, m.members_display_name, m.members_disable_pm, mt.*, msg.*, mm.id as from_id, mm.members_display_name as from_name + FROM ".SQL_PREFIX."message_topics mt + LEFT JOIN ".SQL_PREFIX."message_text msg ON (msg.msg_id=mt.mt_msg_id) + LEFT JOIN ".SQL_PREFIX."members m ON (m.id=mt.mt_to_id) + LEFT JOIN ".SQL_PREFIX."members mm ON (mm.id=mt.mt_from_id) + WHERE mt.mt_id={$a['msgid']} AND mt.mt_owner_id={$a['mid']}"; + } + + #IPB 2.1: Changed m.members_display_name AND LOWER(m.members_display_name) + function msg_get_cc_users( $a ) + { + return "SELECT m.mgroup_others, m.id, m.name, m.members_disable_pm, m.members_display_name, m.msg_total, m.view_pop, m.email_pm, m.language, m.email, me.vdirs, g.g_max_messages, g.g_use_pm + FROM ".SQL_PREFIX."members m + INNER JOIN ".SQL_PREFIX."groups g ON (g.g_id=m.mgroup) + LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=m.id) + WHERE m.members_l_display_name IN (".implode(",",$a['name_array']).")"; + } + + function msg_get_cc_blocked( $a ) + { + + return "SELECT m.name, m.members_display_name, m.members_disable_pm, c.allow_msg + FROM ".SQL_PREFIX."members m + LEFT JOIN ".SQL_PREFIX."contacts c ON (c.member_id=m.id) + WHERE c.contact_id={$a['mid']} AND c.member_id IN (".implode(",",$a['cc_array']).")"; + } + + # Changed: mem.members_display_name as from_name + function msg_get_sent_list( $a ) + { + return "SELECT mem.members_display_name as from_name, mem.id as from_id, mt.*, msg.msg_id, msg.msg_cc_users + FROM ".SQL_PREFIX."message_topics mt + LEFT JOIN ".SQL_PREFIX."members mem ON ( mem.id=mt.mt_to_id ) + LEFT JOIN ".SQL_PREFIX."message_text msg ON ( msg.msg_id=mt.mt_msg_id ) + WHERE mt.mt_owner_id={$a['mid']} AND (mt.mt_from_id={$a['mid']} OR mt.mt_to_id={$a['mid']}) AND mt.mt_vid_folder='{$a['vid']}' + ORDER BY {$a['sort']} + LIMIT {$a['limita']}, {$a['limitb']}"; + } + + # Changed: mem.members_display_name as from_name + function msg_get_folder_list( $a ) + { + return "SELECT mt.*,mem.members_display_name as from_name, mem.id as from_id + FROM ".SQL_PREFIX."message_topics mt + LEFT JOIN ".SQL_PREFIX."members mem ON ( mem.id=mt.mt_from_id ) + WHERE mt.mt_owner_id={$a['mid']} AND (mt.mt_from_id={$a['mid']} OR mt.mt_to_id={$a['mid']}) AND mt.mt_vid_folder='{$a['vid']}' + ORDER BY {$a['sort']} + LIMIT {$a['limita']}, {$a['limitb']}"; + } + + # Changed: mp.members_display_name as to_name + function msg_get_tracking( $a ) + { + return "SELECT msg.*, mt.*, mp.members_display_name as to_name, mp.id as memid + FROM ".SQL_PREFIX."message_topics mt + LEFT JOIN ".SQL_PREFIX."message_text msg ON ( msg.msg_id= mt.mt_msg_id ) + LEFT JOIN ".SQL_PREFIX."members mp ON (mp.id=mt.mt_to_id) + WHERE mt.mt_from_id={$a['mid']} AND mt.mt_tracking=1 + ORDER BY mt.mt_date DESC"; + + } + + # Updated (msg_get_new_pm_notification) in v2.1 [changed LIMIT ADDED m.members_display_name ] + function msg_get_new_pm_notification( $a ) + { + return "SELECT m.id,m.name,m.mgroup,m.email,m.joined,m.posts, m.last_visit, m.last_activity, + m.warn_level, m.warn_lastwarn, m.members_display_name, + me.*, + g.g_id, g.g_title, g.g_icon, g.g_dohtml, mt.*, msg.* + FROM ".SQL_PREFIX."message_topics mt + LEFT JOIN ".SQL_PREFIX."message_text msg ON (msg.msg_id=mt.mt_msg_id) + LEFT JOIN ".SQL_PREFIX."members m ON (m.id=mt.mt_from_id) + LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=mt.mt_from_id) + LEFT JOIN ".SQL_PREFIX."groups g ON (g.g_id=m.mgroup) + WHERE mt.mt_owner_id={$a['mid']} AND mt.mt_vid_folder='in' + ORDER BY mt_date DESC + LIMIT {$a['limit_a']},1"; + } + + function ucp_tracker_prune( $a ) + { + return "SELECT tr.trid + FROM ".SQL_PREFIX."tracker tr + LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=tr.topic_id) + WHERE t.last_post < {$a['time']}"; + } + # Changed + function profile_get_all( $a ) + { + return "SELECT m.*, me.*, s.location_1_id, s.location_2_id, s.location_1_type, s.location_2_type, s.running_time, s.location as sesslocation, p.* + FROM ".SQL_PREFIX."members m + LEFT JOIN ".SQL_PREFIX."member_extra me ON ( me.id=m.id ) + LEFT JOIN ".SQL_PREFIX."sessions s ON (s.member_id=m.id) + LEFT JOIN ".SQL_PREFIX."profile_portal p ON (p.pp_member_id=m.id) + WHERE m.id={$a['mid']}"; + } + + function profile_get_favourite( $a ) + { + return "SELECT t.forum_id, COUNT(p.author_id) as f_posts + FROM ".SQL_PREFIX."posts p + LEFT JOIN ".SQL_PREFIX."topics t ON ( t.tid=p.topic_id AND t.forum_id IN (".implode(",",$a['fid_array']).") ) + WHERE p.author_id={$a['mid']} AND t.tid IS NOT NULL + GROUP BY t.forum_id + ORDER BY f_posts DESC"; + } + + function usercp_get_attachments( $a ) + { + return "SELECT a.*, t.*, p.topic_id + FROM ".SQL_PREFIX."attachments a + LEFT JOIN ".SQL_PREFIX."posts p ON ( p.pid=a.attach_rel_id ) + LEFT JOIN ".SQL_PREFIX."topics t ON ( t.tid=p.topic_id ) + WHERE a.attach_member_id={$a['mid']} AND a.attach_rel_module IN( 'post', 'msg' ) + ORDER BY {$a['order']} + LIMIT {$a['limit_a']}, {$a['limit_b']}"; + } + + function usercp_get_to_delete( $a ) + { + return "SELECT a.*, p.topic_id, p.pid, mt.mt_id + FROM ".SQL_PREFIX."attachments a + LEFT JOIN ".SQL_PREFIX."posts p ON ( p.pid=a.attach_rel_id AND a.attach_rel_module='post' ) + LEFT JOIN ".SQL_PREFIX."message_topics mt ON ( mt.mt_msg_id=a.attach_rel_id AND a.attach_rel_module='msg' ) + WHERE a.attach_id IN (".implode(",",$a['aid_array']).") AND a.attach_rel_module IN( 'post', 'msg' ) AND attach_member_id={$a['mid']}"; + } + + + + function stats_get_all_members( $a ) + { + return "SELECT m.*, me.* + FROM ".SQL_PREFIX."members m + LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=m.id) + WHERE m.id IN(".implode(',', $a['member_ids']).") + ORDER BY m.members_l_display_name"; + } + + function stats_get_all_members_groups( $a ) + { + return "SELECT m.*, me.* + FROM ".SQL_PREFIX."members m + LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=m.id) + WHERE m.mgroup IN (".implode( ',', $a['group_ids'] ).") + ORDER BY m.members_l_display_name"; + } + + function stats_get_todays_posters( $a ) + { + return "SELECT COUNT(*) as tpost, m.id, m.name, m.members_display_name, m.joined, m.posts + FROM ".SQL_PREFIX."posts p + LEFT JOIN ".SQL_PREFIX."members m ON (m.id=p.author_id ) + LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=p.topic_id) + WHERE t.forum_id in(".implode(",", $a['ids']).") and p.post_date > {$a['time_low']} + GROUP BY p.author_id + ORDER BY tpost DESC + LIMIT 0,20"; + } + + + # Changed: added m.members_display_name + function ucp_get_all_announcements( $a ) + { + return "SELECT a.*, m.id, m.name, m.members_display_name + FROM ".SQL_PREFIX."announcements a + LEFT JOIN ".SQL_PREFIX."members m on (m.id=a.announce_member_id) + ORDER BY a.announce_end DESC"; + } + + function ucp_get_all_announcements_byid( $a ) + { + return "SELECT a.*, pp.*, m.*, me.* + FROM ".SQL_PREFIX."announcements a + LEFT JOIN ".SQL_PREFIX."members m on (m.id=a.announce_member_id) + LEFT JOIN ".SQL_PREFIX."profile_portal pp ON (m.id=pp.pp_member_id) + LEFT JOIN ".SQL_PREFIX."member_extra me on (me.id=m.id) + WHERE a.announce_id={$a['id']}"; + } + + function ucp_get_forum_tracker( $a ) + { + return "SELECT t.*, f.* + FROM ".SQL_PREFIX."forum_tracker t + LEFT JOIN ".SQL_PREFIX."forums f ON (f.id=t.forum_id) + WHERE t.member_id={$a['mid']} + ORDER BY f.position"; + } + + function ucp_get_topic_tracker( $a ) + { + return "SELECT s.topic_track_type, s.trid, s.member_id, s.topic_id, s.last_sent, s.start_date as track_started, t.*, f.id as forum_id, f.name as forum_name + FROM ".SQL_PREFIX."tracker s + LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=s.topic_id) + LEFT JOIN ".SQL_PREFIX."forums f ON (f.id=t.forum_id) + WHERE s.member_id={$a['mid']} {$a['date_query']} + ORDER BY f.id, t.last_post DESC"; + } + + # Changed, removed group stuff + function mlist_count( $a ) + { + # Attempt to optimize on the fly... + + $query_bit_1 = ''; + $query_bit_2 = ''; + + if ( strstr( $a['query'], 'p.field_' ) ) + { + $query_bit_2 = "LEFT JOIN ".SQL_PREFIX."pfields_content p ON (p.member_id=m.id)"; + } + + if ( strstr( $a['query'], 'me.' ) ) + { + $query_bit_1 = "LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=m.id)"; + } + + if ( strstr( $a['query'], 'pp.' ) ) + { + $query_bit_3 = "LEFT JOIN ".SQL_PREFIX."profile_portal pp ON (m.id=pp.pp_member_id)"; + } + + if ( $a['query'] ) + { + $a['query'] = 'WHERE '.$a['query']; + } + + return "SELECT COUNT(*) as total_members FROM ".SQL_PREFIX."members m + {$query_bit_1} + {$query_bit_2} + {$query_bit_3} + {$a['query']}"; + } + + # Changed, removed group stuff + function mlist_get_members( $a ) + { + if ( $a['query'] ) + { + $a['query'] = 'WHERE '.$a['query']; + } + + if ( $a['sort'] == 'pp_profile_views' ) + { + $a['sort'] = 'pp.' . $a['sort']; + $q_extra = ''; + } + else + { + $a['sort'] = 'm.' . $a['sort']; + } + + return "SELECT m.*,me.*,p.*,pp.* + FROM ".SQL_PREFIX."members m + LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=m.id) + LEFT JOIN ".SQL_PREFIX."pfields_content p ON (p.member_id=m.id) + LEFT JOIN ".SQL_PREFIX."profile_portal pp ON (m.id=pp.pp_member_id) + {$a['query']} + ORDER BY {$a['sort']} {$a['order']} + LIMIT {$a['limit_a']}, {$a['limit_b']}"; + } + + function buddy_posts_last_visit( $a ) + { + return "SELECT COUNT(*) as posts + FROM ".SQL_PREFIX."posts p + LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=p.topic_id and t.forum_id IN({$a['forum_string']})) + WHERE p.queued=0 AND p.post_date > {$a['last_visit']}"; + } + + function generic_get_all_member( $a ) + { + return "SELECT g.*, m.*, me.*, p.* + FROM ".SQL_PREFIX."members m + LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=m.id) + LEFT JOIN ".SQL_PREFIX."groups g ON (g.g_id=m.mgroup) + LEFT JOIN ".SQL_PREFIX."profile_portal p ON (m.id=p.pp_member_id) + WHERE m.id={$a['mid']}"; + } + + function moderate_get_topics( $a ) + { + return "SELECT p.*,t.forum_id + FROM ".SQL_PREFIX."posts p + LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=p.topic_id) + WHERE pid IN (".implode(",", $a['pids']).")"; + } + + function moderate_concat_title( $a ) + { + return "UPDATE ".SQL_PREFIX."topics + SET title=CONCAT('{$a['pre']}', title, '{$a['end']}') + WHERE tid IN(".implode( ",", $a['tids'] ).")"; + } + + # UPDATE 2.1 + function mod_func_get_last_post( $a ) + { + return "SELECT p.post_date, p.topic_id, p.author_id, p.author_name, p.pid, t.forum_id, m.id, m.members_display_name + FROM ".SQL_PREFIX."posts p + LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=p.topic_id) + LEFT JOIN ".SQL_PREFIX."members m ON (m.id=p.author_id) + WHERE topic_id={$a['tid']} and queued=0 + ORDER BY {$a['orderby']} DESC + LIMIT 0,1"; + } + + function mod_func_get_attach_count( $a ) + { + return "SELECT COUNT(*) as count + FROM ".SQL_PREFIX."attachments a + LEFT JOIN ".SQL_PREFIX."posts p on (p.pid=a.attach_rel_id) + WHERE p.topic_id={$a['tid']} AND a.attach_rel_module='post'"; + + } + + function mod_func_get_topic_tracker( $a ) + { + return "SELECT tr.*, m.id, m.mgroup, m.org_perm_id, t.tid, t.forum_id, g.g_id, g.g_perm_id + FROM ".SQL_PREFIX."tracker tr + LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=tr.topic_id) + LEFT JOIN ".SQL_PREFIX."members m on (m.id=tr.member_id) + LEFT JOIN ".SQL_PREFIX."groups g on (g.g_id=m.mgroup) + WHERE tr.topic_id".$a['tid']; + } + + function search_get_all_user_count( $a ) + { + return "SELECT count(*) as count + FROM ".SQL_PREFIX."posts p + LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=p.topic_id) + WHERE t.approved=1 AND t.forum_id IN({$a['forums']}) AND p.queued=0 AND p.author_id={$a['mid']}"; + } + + function search_get_all_user_query( $a ) + { + return "SELECT p.*, t.*, t.posts as topic_posts, t.title as topic_title, m.*, me.*, pp.* + FROM ".SQL_PREFIX."posts p + LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=p.topic_id) + LEFT JOIN ".SQL_PREFIX."members m ON (m.id=p.author_id) + LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=p.author_id) + LEFT JOIN ".SQL_PREFIX."profile_portal pp ON (m.id=pp.pp_member_id) + WHERE t.approved=1 AND t.forum_id IN({$a['forums']}) AND p.queued=0 AND p.author_id={$a['mid']} + ORDER BY post_date DESC"; + } + + function search_get_last_ten( $a ) + { + return "SELECT p.*, t.*, t.posts as topic_posts, t.title as topic_title, m.*, me.* + FROM ".SQL_PREFIX."posts p + LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=p.topic_id) + LEFT JOIN ".SQL_PREFIX."members m ON (m.id=p.author_id) + LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=p.author_id) + WHERE p.queued=0 AND t.forum_id IN({$a['forums']}) AND p.author_id={$a['mid']} + ORDER BY post_date DESC + LIMIT 0,10"; + } + + + function poll_get_poll_with_topic( $a ) + { + return "SELECT f.allow_pollbump, t.*, p.pid as poll_id,p.choices,p.starter_id,p.votes + FROM ".SQL_PREFIX."polls p + LEFT JOIN ".SQL_PREFIX."topics t ON (t.tid=p.tid) + LEFT JOIN ".SQL_PREFIX."forums f ON (f.id=t.forum_id) + WHERE t.tid={$a['tid']}"; + } + + /** + * contact_member_report_get_mods + * Changed: 2.1.0.BETA4 + * Added: m.members_disable_pm + * + */ + function contact_member_report_get_mods( $a ) + { + return "SELECT m.id, m.members_display_name as name, m.members_disable_pm, m.email, m.mgroup, moderator.member_id, moderator.group_id + FROM ".SQL_PREFIX."moderators moderator + LEFT JOIN ".SQL_PREFIX."members m ON (m.id=moderator.member_id OR m.mgroup=moderator.group_id) + WHERE moderator.forum_id={$a['fid']}"; + } + + /** + * contact_member_report_get_cpaccess + * Changed: 2.1.0.BETA4 + * Added: m.members_disable_pm + * + */ + function contact_member_report_get_cpaccess( $a ) + { + return "SELECT m.id, m.members_display_name as name, m.email, m.members_disable_pm + FROM ".SQL_PREFIX."members m + LEFT JOIN ".SQL_PREFIX."groups g ON (g.g_id=m.mgroup) + WHERE g.g_access_cp=1"; + } + + /** + * contact_member_report_get_supmod + * Changed: 2.1.0.BETA4 + * Added: m.members_disable_pm + * + */ + function contact_member_report_get_supmod( $a ) + { + return "SELECT m.id, m.members_display_name as name, m.email, m.members_disable_pm + FROM ".SQL_PREFIX."members m + LEFT JOIN ".SQL_PREFIX."groups g ON (g.g_id=m.mgroup) + WHERE g.g_is_supmod=1"; + } + + + + function print_page_get_members( $a ) + { + return "SELECT g.*, m.* + FROM ".SQL_PREFIX."members m + LEFT JOIN ".SQL_PREFIX."groups g ON (g.g_id=m.mgroup) + WHERE m.id IN ({$a['mem_ids']})"; + } + + function stats_who_posted( $a ) + { + return "SELECT COUNT(p.pid) as pcount, p.author_id, m.members_display_name as author_name + FROM ".SQL_PREFIX."posts p + LEFT JOIN ".SQL_PREFIX."members m ON (m.id=p.author_id) + WHERE p.topic_id={$a['tid']} AND p.queued=0 + GROUP BY p.author_id + ORDER BY pcount DESC"; + } + + function warn_get_data( $a ) + { + return "SELECT l.*, p.id as punisher_id, p.members_display_name as punisher_name + FROM ".SQL_PREFIX."warn_logs l + LEFT JOIN ".SQL_PREFIX."members p ON ( p.id=l.wlog_addedby ) + WHERE l.wlog_mid={$a['mid']} + ORDER BY l.wlog_date DESC + LIMIT {$a['limit_a']}, {$a['limit_b']}"; + } + + function warn_get_forum( $a ) + { + return "SELECT t.tid, t.title, f.id, f.name + FROM ".SQL_PREFIX."topics t + LEFT JOIN ".SQL_PREFIX."forums f ON (f.id=t.forum_id) + WHERE t.tid={$a['tid']}"; + } + + function portal_get_poll_join( $a ) + { + return "SELECT t.tid, t.title, t.state, t.last_vote, p.*, v.member_id as member_voted + FROM ".SQL_PREFIX."topics t + LEFT JOIN ".SQL_PREFIX."polls p ON (p.tid=t.tid) + LEFT JOIN ".SQL_PREFIX."voters v ON (v.member_id={$a['mid']} and v.tid=t.tid) + WHERE t.tid={$a['tid']}"; + } + + function portal_get_monster_bitch( $a ) + { + return "SELECT t.*, p.*, me.avatar_location, m.view_avs, me.avatar_size, me.avatar_type, + m.id as member_id, m.members_display_name as member_name, m.mgroup + FROM ".SQL_PREFIX."topics t + LEFT JOIN ".SQL_PREFIX."members m ON (m.id=t.starter_id) + LEFT JOIN ".SQL_PREFIX."member_extra me on (me.id=m.id) + LEFT JOIN ".SQL_PREFIX."posts p ON (p.pid=t.topic_firstpost) + WHERE t.forum_id IN (-1{$a['csite_article_forum']}) {$a['qe']} + AND t.approved=1 AND (t.moved_to IS NULL or t.moved_to='') + ORDER BY t.pinned DESC, t.start_date DESC + LIMIT 0,{$a['limit']}"; + } + + function help_search( $a ) + { + return "SELECT id, title, description + FROM ".SQL_PREFIX."faq + WHERE LOWER(title) LIKE '%{$a['search_string']}%' or LOWER(text) LIKE '%{$a['search_string']}%' + ORDER BY title"; + } + + #-- NEW FOR RC1 --# + + function login_getmember( $a ) + { + return "SELECT id, name, members_display_name, members_created_remote, email, mgroup, member_login_key, ip_address, login_anonymous + FROM ".SQL_PREFIX."members + WHERE members_l_username='{$a['username']}'"; + } + + + + function post_get_topic_review( $a ) + { + return "SELECT p.*, m.members_display_name, m.mgroup + FROM ".SQL_PREFIX."posts p + LEFT JOIN ".SQL_PREFIX."members m ON (m.id=p.author_id) + WHERE topic_id={$a['tid']} and queued=0 + ORDER BY pid DESC + LIMIT 0,10"; + } + + # REMOVED + /*function post_forum_tracker_all( $a ) + { + #post + + return "SELECT m.name, m.email, m.id, m.language, m.last_activity, m.org_perm_id, g.g_perm_id + FROM ".SQL_PREFIX."members m, ".SQL_PREFIX."groups g + WHERE m.mgroup IN ({$a['groups']}) + AND m.mgroup=g.g_id + AND m.id <> {$a['mid']} + AND m.allow_admin_mails=1 + AND m.last_activity < {$a['last_post']}"; + }*/ + + +} // end class + + ?> \ No newline at end of file diff --git a/upload/sources/sql/mysql_subsm_queries.php b/upload/sources/sql/mysql_subsm_queries.php index e848a325..150c0605 100644 --- a/upload/sources/sql/mysql_subsm_queries.php +++ b/upload/sources/sql/mysql_subsm_queries.php @@ -2,25 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-11-20 13:46:59 -0600 (Mon, 20 Nov 2006) $ -| > $Revision: 736 $ +| > $Date: 2007-07-31 17:52:07 -0400 (Tue, 31 Jul 2007) $ +| > $Revision: 1094 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | @@ -35,7 +27,7 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; exit(); } @@ -93,7 +85,7 @@ class sql_subsm_queries extends db_driver_mysql { return "SELECT COUNT(*) as total, subtrans_sub_id FROM ".SQL_PREFIX."subscription_trans - WHERE subtrans_end_date < {$a['time']} AND subtrans_state != 'expired' + WHERE subtrans_end_date < {$a['time']} OR subtrans_state = 'expired' GROUP BY subtrans_sub_id"; } diff --git a/upload/sources/tasks/announcements.php b/upload/sources/tasks/announcements.php index 17eccbea..75f0983c 100644 --- a/upload/sources/tasks/announcements.php +++ b/upload/sources/tasks/announcements.php @@ -2,26 +2,16 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ +| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ | > $Revision: 567 $ | > $Author: matt $ +--------------------------------------------------------------------------- @@ -40,8 +30,8 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); } class task_item @@ -71,7 +61,7 @@ class task_item // Log to log table - modify but dont delete //----------------------------------------- - $this->class->append_task_log( $this->task, 'Объявления обновлены' ); + $this->class->append_task_log( $this->task, 'Announcements updated' ); //----------------------------------------- // Unlock Task: DO NOT MODIFY! diff --git a/upload/sources/tasks/bulkmail.php b/upload/sources/tasks/bulkmail.php index 6b9f07c8..b62d94f7 100644 --- a/upload/sources/tasks/bulkmail.php +++ b/upload/sources/tasks/bulkmail.php @@ -2,26 +2,16 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ +| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ | > $Revision: 567 $ | > $Author: matt $ +--------------------------------------------------------------------------- @@ -40,8 +30,8 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); } class task_item diff --git a/upload/sources/tasks/calendarevents.php b/upload/sources/tasks/calendarevents.php index 671899bb..018629ec 100644 --- a/upload/sources/tasks/calendarevents.php +++ b/upload/sources/tasks/calendarevents.php @@ -2,26 +2,16 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ +| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ | > $Revision: 567 $ | > $Author: matt $ +--------------------------------------------------------------------------- @@ -40,8 +30,8 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); } class task_item @@ -74,7 +64,7 @@ class task_item if ( ! $this->restrict_log ) { - $this->class->append_task_log( $this->task, "Пересоздан кеш календаря" ); + $this->class->append_task_log( $this->task, "Calendar recached" ); } //----------------------------------------- diff --git a/upload/sources/tasks/cleanout.php b/upload/sources/tasks/cleanout.php index 2cab4eed..6b927738 100644 --- a/upload/sources/tasks/cleanout.php +++ b/upload/sources/tasks/cleanout.php @@ -2,26 +2,16 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ +| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ | > $Revision: 567 $ | > $Author: matt $ +--------------------------------------------------------------------------- @@ -40,8 +30,8 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); } class task_item @@ -85,7 +75,7 @@ class task_item // Log to log table - modify but dont delete //----------------------------------------- - $this->class->append_task_log( $this->task, 'Старые сессии, защитные регистрационные коды, временные результаты поиска удалены' ); + $this->class->append_task_log( $this->task, 'Old reg_images, sessions and search results removed' ); //----------------------------------------- // Unlock Task: DO NOT MODIFY! diff --git a/upload/sources/tasks/dailycleanout.php b/upload/sources/tasks/dailycleanout.php index a7061e6e..c14c81ff 100644 --- a/upload/sources/tasks/dailycleanout.php +++ b/upload/sources/tasks/dailycleanout.php @@ -2,27 +2,17 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ +| > $Date: 2007-06-27 08:24:02 -0400 (Wed, 27 Jun 2007) $ +| > $Revision: 1071 $ | > $Author: matt $ +--------------------------------------------------------------------------- | @@ -40,8 +30,8 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); } class task_item @@ -131,11 +121,24 @@ class task_item $this->ipsclass->DB->simple_exec(); } + //----------------------------------------- + // Remove old XML-RPC logs... + //----------------------------------------- + + if ( $this->ipsclass->vars['xmlrpc_log_expire'] > 0 ) + { + $time = time() - ( $this->ipsclass->vars['xmlrpc_log_expire'] * 86400 ); + + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'api_log', 'where' => "api_log_date < $time" ) ); + + $xmlrpc_logs_deleted = $this->ipsclass->DB->get_affected_rows(); + } + //----------------------------------------- // Log to log table - modify but dont delete //----------------------------------------- - $this->class->append_task_log( $this->task, "Удалено: $_attach_count потерянных прикрепленных файлов, $deleted закончившихся подписок на темы и {$topics_deleted} старых меток прочтения тем" ); + $this->class->append_task_log( $this->task, "$xmlrpc_logs_deleted XML-RPC logs removed, $_attach_count orphaned attachments removed, $deleted subscriptions pruned and {$topics_deleted} db read topic entries deleted" ); //----------------------------------------- // Unlock Task: DO NOT MODIFY! diff --git a/upload/sources/tasks/dailydigest.php b/upload/sources/tasks/dailydigest.php index fa8e4e68..555feaa0 100644 --- a/upload/sources/tasks/dailydigest.php +++ b/upload/sources/tasks/dailydigest.php @@ -2,26 +2,16 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ +| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ | > $Revision: 567 $ | > $Author: matt $ +--------------------------------------------------------------------------- @@ -40,8 +30,8 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); } class task_item @@ -78,7 +68,7 @@ class task_item // Log to log table - modify but dont delete //----------------------------------------- - $this->class->append_task_log( $this->task, 'Ежедневная рассылка тем и обзора форума' ); + $this->class->append_task_log( $this->task, 'Daily Topic & Forum Digest Sent' ); //----------------------------------------- // Unlock Task: DO NOT MODIFY! diff --git a/upload/sources/tasks/doexpiresubs.php b/upload/sources/tasks/doexpiresubs.php index 185b3477..4c50f26d 100644 --- a/upload/sources/tasks/doexpiresubs.php +++ b/upload/sources/tasks/doexpiresubs.php @@ -2,26 +2,16 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ +| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ | > $Revision: 567 $ | > $Author: matt $ +--------------------------------------------------------------------------- @@ -40,8 +30,8 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); } class task_item @@ -119,7 +109,7 @@ class task_item // Unlock Task: DO NOT MODIFY! //----------------------------------------- - $this->class->append_task_log( $this->task, "Заврешено " . intval(count($expire_ids))." платных подписок" ); + $this->class->append_task_log( $this->task, intval(count($expire_ids))." members unsubscribed" ); $this->class->unlock_task( $this->task ); } diff --git a/upload/sources/tasks/expiresubs.php b/upload/sources/tasks/expiresubs.php index 32814ad3..dc7b6be4 100644 --- a/upload/sources/tasks/expiresubs.php +++ b/upload/sources/tasks/expiresubs.php @@ -2,28 +2,18 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ +| > $Date: 2007-12-27 14:33:11 -0500 (Thu, 27 Dec 2007) $ +| > $Revision: 1151 $ +| > $Author: bfarber $ +--------------------------------------------------------------------------- | | > TASK SCRIPT: Test @@ -40,8 +30,8 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); } class task_item @@ -104,16 +94,26 @@ class task_item $this->ipsclass->DB->build_query( array( 'select' => 'st.subtrans_sub_id, st.subtrans_member_id', 'from' => array( 'subscription_trans' => 'st' ), 'where' => 'st.subtrans_member_id IN ('.implode( ",", $ids ) . ") AND st.subtrans_state='paid'", - 'add_join' => array( 0 => array( 'select' => 's.sub_title', + 'add_join' => array( + 0 => array( 'select' => 's.sub_title', 'from' => array( 'subscriptions' => 's' ), 'where' => 's.sub_id=st.subtrans_sub_id', - 'type' => 'left' ) ) ) ); + 'type' => 'left' + ), + 1 => array( 'select' => 'se.subextra_recurring', + 'from' => array( 'subscription_extra' => 'se' ), + 'where' => 'se.subextra_sub_id=s.sub_id', + 'type' => 'left' + ), + ) + ) ); $this->ipsclass->DB->exec_query(); while( $r = $this->ipsclass->DB->fetch_row() ) { $members[ $r['subtrans_member_id'] ]['sub_title'] = $r['sub_title']; + $members[ $r['subtrans_member_id'] ]['subextra_recurring'] = $r['subextra_recurring']; } //----------------------------------------- @@ -122,7 +122,15 @@ class task_item foreach( $members as $member ) { - $this->email->get_template("subscription_expires"); + if( $member['subextra_recurring'] ) + { + $this->email->get_template("subscription_expires_recurring"); + } + else + { + $this->email->get_template("subscription_expires"); + } + $this->email->build_message( array( 'PACKAGE' => $member['sub_title'], 'EXPIRES' => $this->ipsclass->get_date( $member['sub_end'], 'DATE' ), @@ -138,7 +146,7 @@ class task_item // Log to log table - modify but dont delete //----------------------------------------- - $this->class->append_task_log( $this->task, '' . intval(count($ids)) . '' ); + $this->class->append_task_log( $this->task, intval(count($ids)).' Members sent an expiration email' ); //----------------------------------------- // Unlock Task: DO NOT MODIFY! diff --git a/upload/sources/tasks/index.html b/upload/sources/tasks/index.html index 250b1f72..af2fbe79 100644 --- a/upload/sources/tasks/index.html +++ b/upload/sources/tasks/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/sources/tasks/logprune.php b/upload/sources/tasks/logprune.php index 8936f071..43eefee9 100644 --- a/upload/sources/tasks/logprune.php +++ b/upload/sources/tasks/logprune.php @@ -2,24 +2,14 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license -+--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +--------------------------------------------------------------------------- | > $Date: 2006-05-24 13:53:54 -0400 (Wed, 24 May 2006) $ | > $Revision: 275 $ @@ -40,8 +30,8 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); } class task_item @@ -146,7 +136,7 @@ class task_item // Log to log table - modify but dont delete //----------------------------------------- - $this->class->append_task_log( $this->task, 'Журналы сообщений очищены' ); + $this->class->append_task_log( $this->task, 'Log tables pruned' ); //----------------------------------------- // Unlock Task: DO NOT MODIFY! @@ -154,7 +144,7 @@ class task_item $this->class->unlock_task( $this->task ); } - + /*-------------------------------------------------------------------------*/ // register_class // LEAVE ALONE diff --git a/upload/sources/tasks/rebuildstats.php b/upload/sources/tasks/rebuildstats.php index caf7cab1..eedba7db 100644 --- a/upload/sources/tasks/rebuildstats.php +++ b/upload/sources/tasks/rebuildstats.php @@ -2,26 +2,16 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ +| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ | > $Revision: 567 $ | > $Author: matt $ +--------------------------------------------------------------------------- @@ -40,8 +30,8 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); } class task_item @@ -116,7 +106,7 @@ class task_item // Log to log table - modify but dont delete //----------------------------------------- - $this->class->append_task_log( $this->task, 'Статистика пересчитана' ); + $this->class->append_task_log( $this->task, 'Statistics rebuilt' ); //----------------------------------------- // Unlock Task: DO NOT MODIFY! diff --git a/upload/sources/tasks/removevalidating.php b/upload/sources/tasks/removevalidating.php index bf380d46..8f2ad0e1 100644 --- a/upload/sources/tasks/removevalidating.php +++ b/upload/sources/tasks/removevalidating.php @@ -2,24 +2,14 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license -+--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +--------------------------------------------------------------------------- | > $Date: 2005-10-10 09:08:54 -0400 (Mon, 10 Oct 2005) $ | > $Revision: 23 $ @@ -40,8 +30,8 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); } class task_item @@ -57,8 +47,9 @@ class task_item function run_task() { - $mids = array(); - $vids = array(); + $mids = array(); + $vids = array(); + $emails = array(); // If enabled, remove validating new_reg members & entries from members table @@ -69,7 +60,7 @@ class task_item $this->ipsclass->DB->build_query( array( 'select' => 'v.vid, v.member_id', 'from' => array( 'validating' => 'v' ), 'where' => 'v.new_reg=1 AND v.coppa_user<>1 AND v.entry_date < '.$less_than.' AND v.lost_pass<>1', - 'add_join' => array( 0 => array( 'select' => 'm.posts, m.mgroup', + 'add_join' => array( 0 => array( 'select' => 'm.posts, m.mgroup, m.email', 'from' => array( 'members' => 'm' ), 'where' => 'm.id=v.member_id', 'type' => 'left' @@ -81,17 +72,18 @@ class task_item while( $i = $this->ipsclass->DB->fetch_row($outer) ) { if( $i['mgroup'] != $this->ipsclass->vars['auth_group'] ) - { + { // No longer validating? - $this->ipsclass->DB->do_delete( 'validating', "v.vid='{$i['vid']}'" ); + $this->ipsclass->DB->do_delete( 'validating', "vid='{$i['vid']}'" ); continue; } if ( intval($i['posts']) < 1 ) { - $mids[] = $i['member_id']; - $vids[] = "'".$i['vid']."'"; + $mids[] = $i['member_id']; + $emails[ $i['member_id'] ] = $i['email']; + $vids[] = "'".$i['vid']."'"; } } @@ -99,11 +91,24 @@ class task_item if ( count($mids) > 0 ) { - $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'members_converge', 'where' => "converge_id IN(".implode(",",$mids).")" ) ); + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'members_converge', 'where' => "converge_email IN('".implode("','",$emails)."')" ) ); $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'members' , 'where' => "id IN(".implode(",",$mids).")" ) ); $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'member_extra' , 'where' => "id IN(".implode(",",$mids).")" ) ); $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'pfields_content' , 'where' => "member_id IN(".implode(",",$mids).")" ) ); $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'validating' , 'where' => "vid IN(".implode(",",$vids).")" ) ); + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'message_text' , 'where' => "msg_author_id IN(".implode( ",",$mids ).")" ) ); + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'message_topics' , 'where' => "mt_owner_id IN(".implode( ",",$mids ).")" ) ); + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'contacts' , 'where' => "member_id IN(".implode( ",",$mids ).") or contact_id IN(".implode( ",",$mids ).")" ) ); + $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'warn_logs' , 'where' => "wlog_mid IN(".implode( ",",$mids ).")" ) ); + $this->ipsclass->DB->do_update( 'profile_comments', array( 'comment_by_member_id' => 0 ), "comment_by_member_id IN(".implode( ",",$mids ).")" ); + $this->ipsclass->DB->do_update( 'profile_ratings', array( 'rating_by_member_id' => 0 ), "rating_by_member_id IN(".implode( ",",$mids ).")" ); + $this->ipsclass->DB->do_delete( 'profile_comments', "comment_for_member_id IN(".implode( ",",$mids ).")" ); + $this->ipsclass->DB->do_delete( 'profile_ratings', "rating_for_member_id IN(".implode( ",",$mids ).")" ); + + $this->ipsclass->DB->do_delete( 'profile_portal', "pp_member_id IN(".implode( ",",$mids ).")" ); + $this->ipsclass->DB->do_delete( 'profile_friends', "friends_member_id IN(".implode( ",",$mids ).")" ); + $this->ipsclass->DB->do_delete( 'profile_friends', "friends_friend_id IN(".implode( ",",$mids ).")" ); + if ( USE_MODULES == 1 ) { @@ -120,7 +125,7 @@ class task_item // Log to log table - modify but dont delete //----------------------------------------- - $this->class->append_task_log( $this->task, 'Удалено '.count($mids).' не подтвердивших регистрацию пользователей' ); + $this->class->append_task_log( $this->task, count($mids).' old validating members pruned' ); } //----------------------------------------- diff --git a/upload/sources/tasks/rssimport.php b/upload/sources/tasks/rssimport.php index 2714ddfc..e26fc3bb 100644 --- a/upload/sources/tasks/rssimport.php +++ b/upload/sources/tasks/rssimport.php @@ -2,28 +2,18 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ -| > $Revision: 567 $ -| > $Author: matt $ +| > $Date: 2007-03-15 10:54:50 -0400 (Thu, 15 Mar 2007) $ +| > $Revision: 879 $ +| > $Author: bfarber $ +--------------------------------------------------------------------------- | | > TASK SCRIPT: Update Views @@ -40,15 +30,19 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); } class task_item { - var $class = ""; - var $root_path = ""; - var $task = ""; + var $class; + var $root_path = ""; + var $task; + + # I've actually seen a site with over 200 RSS imports + # When they run all at once, it times out, locks the task, and that's that + var $limit = 10; /*-------------------------------------------------------------------------*/ // Our 'auto_run' function @@ -71,7 +65,12 @@ class task_item // 30 mins is RSS friendly. //----------------------------------------- - $this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'rss_import', 'where' => 'rss_import_enabled=1 AND rss_import_last_import <= '.$t_minus_30 ) ); + $this->ipsclass->DB->build_query( array( 'select' => '*', + 'from' => 'rss_import', + 'where' => 'rss_import_enabled=1 AND rss_import_last_import <= '.$t_minus_30, + 'order' => 'rss_import_last_import ASC', + 'limit' => array( $this->limit ) + ) ); $rss_main_query = $this->ipsclass->DB->exec_query(); if ( $this->ipsclass->DB->get_num_rows( $rss_main_query ) ) @@ -107,7 +106,7 @@ class task_item // Log to log table - modify but dont delete //----------------------------------------- - $this->class->append_task_log( $this->task, 'Выполнено импортирование RSS потоков ('. count($feeds_to_update) .')' ); + $this->class->append_task_log( $this->task, 'RSS Import completed ('. count($feeds_to_update) .')' ); //----------------------------------------- // Unlock Task: DO NOT MODIFY! diff --git a/upload/sources/tasks/update_profile_views.php b/upload/sources/tasks/update_profile_views.php index e2efebcf..595afb10 100644 --- a/upload/sources/tasks/update_profile_views.php +++ b/upload/sources/tasks/update_profile_views.php @@ -2,24 +2,14 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license -+--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) +--------------------------------------------------------------------------- | > $Date: 2006-05-24 18:53:54 +0100 (Wed, 24 May 2006) $ | > $Revision: 275 $ @@ -40,8 +30,8 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); } class task_item @@ -93,7 +83,7 @@ class task_item // Log to log table - modify but dont delete //----------------------------------------- - $this->class->append_task_log( $this->task, 'Обновлены счетчики просмотров профилей' ); + $this->class->append_task_log( $this->task, 'Profile views counter updated' ); } //----------------------------------------- diff --git a/upload/sources/tasks/updateviews.php b/upload/sources/tasks/updateviews.php index a1f9499e..f1df9dfe 100644 --- a/upload/sources/tasks/updateviews.php +++ b/upload/sources/tasks/updateviews.php @@ -2,26 +2,16 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ +| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ | > $Revision: 567 $ | > $Author: matt $ +--------------------------------------------------------------------------- @@ -40,8 +30,8 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); } class task_item @@ -100,7 +90,7 @@ class task_item // Log to log table - modify but dont delete //----------------------------------------- - $this->class->append_task_log( $this->task, 'Обновлены счетчики просмотров тем' ); + $this->class->append_task_log( $this->task, 'Topic views counter updated' ); } //----------------------------------------- diff --git a/upload/sources/tasks/weeklydigest.php b/upload/sources/tasks/weeklydigest.php index 669117c0..25354bf3 100644 --- a/upload/sources/tasks/weeklydigest.php +++ b/upload/sources/tasks/weeklydigest.php @@ -2,26 +2,16 @@ /* +-------------------------------------------------------------------------- -| Invision Power Board 2.2.2 +| Invision Power Board | ============================================= | by Matthew Mecham | (c) 2001 - 2006 Invision Power Services, Inc. | http://www.invisionpower.com | ============================================= | Web: http://www.invisionboard.com -| http://www.ibresource.ru/products/invisionpowerboard/ -| Time: Monday 05th of March 2007 10:10:54 PM -| Release: e3790216629e5a2aaf37070b32237f06 | Licence Info: http://www.invisionboard.com/?license -| http://www.ibresource.ru/license +--------------------------------------------------------------------------- -| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE! -+--------------------------------------------------------------------------- -| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ! -| Права на ПО принадлежат Invision Power Services -| Права на перевод IBResource (http://www.ibresource.ru) -+--------------------------------------------------------------------------- -| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $ +| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $ | > $Revision: 567 $ | > $Author: matt $ +--------------------------------------------------------------------------- @@ -40,8 +30,8 @@ if ( ! defined( 'IN_IPB' ) ) { - print "

    Некорректный адрес

    Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы."; - exit(); + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); } class task_item @@ -78,7 +68,7 @@ class task_item // Log to log table - modify but dont delete //----------------------------------------- - $this->class->append_task_log( $this->task, 'Созданы рассылки (ежедневная и еженедельная)' ); + $this->class->append_task_log( $this->task, 'Weekly Topic & Forum Digest Sent' ); //----------------------------------------- // Unlock Task: DO NOT MODIFY! diff --git a/upload/style_avatars/IPB_Community_Pack/Thumbs.db b/upload/style_avatars/IPB_Community_Pack/Thumbs.db deleted file mode 100644 index bc3acf4cb4dc985fcf64b2eb2f0f21ed2e3b6fd9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 66048 zcmeF(2Ut^Ix+wfm1e7LH1Svs^C{?lJOn}wUXTNXlarG_y$OMUm;W068*PDOu&zvC=aB%U zz!~6lpP%km3g9eo4xj|6fYW`=3dXbmI0PVczy*LFU;r3_i-0h|46p!~05(7bUINd*9 zVC)S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S$I&bVv^P_8%`GYtM9GdNH zWp`!oQW)%^V^U?jfET!2md^eG8!GfCdeQcV5RWlkv<7;a?+f4Ag7C8^z4;;m>RdFz z;zbMWj)@PkP}GGQY4rgn9lyI2HDogWOTbgCv8U1fz4_a0^vP<;EUc#O+KX|CSgbw9 znR(n(T*9-a**^3~qt9K^i;vHYRG1Ppz3$2`eU=1wkxjHAaa;?d%PCG>9{J z<%V$*oqWDeX_S7yWRkl|r$;bAd`ap$tJ9)Hd-Ek|CPC8;i;4APX}{UBU;+0CJx^xM z)wZL3Q4xV|`-@hNOr%1>mp!Bv!sRJUt2*Z+nz&&yoyL)S+MQ0aO8ALy`QivCNrfM@ z35n;^OSMJA!17P{{8fJvJ2*a$(->ya=}#1@GvX_iZ<5oLTsY-bBg|xX@%m%m3aXcQ o_;G&gD|c7@{#JVEFV_3-yz_tZFgO9P#oub(|4AnP|F>rT4=J4aQvd(} diff --git a/upload/style_avatars/IPB_Community_Pack/index.html b/upload/style_avatars/IPB_Community_Pack/index.html new file mode 100644 index 00000000..b49fc27d --- /dev/null +++ b/upload/style_avatars/IPB_Community_Pack/index.html @@ -0,0 +1 @@ + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/style_avatars/Smiley_Avatars/Thumbs.db b/upload/style_avatars/Smiley_Avatars/Thumbs.db deleted file mode 100644 index 1797336fd0f25e6996473d8419d706289d7c3241..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10240 zcmeHtcT^PJmT!?HN^S%ZTO}z;GKvi-N(K>-ERB+zD3TgzKv0k<0-vBnMWW=;mPgS?ink{+U^Gchz2X!am`*_o;L0>^k2E*yi6?oLvC^ zM9KgaKqAuvr~X4a1sFczzY!|{uz`V-IEhRq|2+`^z~H~=e~<=_!M>i@j|wy(HOMp| zpV*uhWIB-PL1qA%5o9KiPlL=1G7HGy5cr$zPs*S0zvzF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Y?o4(v;cUzd0>ppu@o+ax}2bk@GN z4A=f$E4p4iT3f%8$%U&816?#K(TZacS=B6&M3035`qc*C_u0@9wDVjk_U6Ud?OYbZA!@}s*%;7 zWOT-awO$J&r9IZiXxTOfH&QJ3LG4Co%m4gP zMSbVwkJSKvf7>#)tmQWa!)C5BALNe@?m`^xgRWmkboQFK9rXx|qAy(!X8t2*#WLe+ zxG-G}8EE#uA-a|?v$5!DP1$N+!id?Ay)+KGOF0Qe9oEbXZ{W_e0;9Xv$|RZ`19??n zO+ENFSl3h$K@Gax$6Yo0@6ar2b%YrINGF=%R>3`5$s8&1$G8sYyUULT9X6TkP=XA& zsl~ny&0d9H8iNJpuGda6P05vH^zXaxD@bb9!KAy`?znf<*wel`1*!i=vF-fG782IJ z@LD@DPP5l5<9gol;*VTm&gL5e$zR6gEcdDku#hh!hKasIJpyTSels&! Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/style_avatars/Thumbs.db b/upload/style_avatars/Thumbs.db deleted file mode 100644 index 9ca39205c7abf57aff6dcda7cae7c42288099c9b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12800 zcmeI2c|4WdyTG@3p7ur}ge@}5lyWFCB?)C75@8b}LfGbciVQ_KG8IYY4B44ODqG0R zRzfy=6SfTdu6=%|^Ev-{5C}N@A>Yvm?18@0gPX?=paf6> zNcWruKntJ)FaSvRm=Tmr0A>IS089Z08vqJ`0XP68Jx)*_`1SZZ8jAmyT{VJufFEzj zVTdNg9h6=We{kpiyl{dU^KIZL{@}8Z0v|J?S2r0+@09RAlx6?mnm;;C2_Yx@);_8H zBmHmZ>3?->8W1~RwH@Rd7zL+qC;vjp3OwLnZT}#s|I4p!9QzAx{a30a`$;~Tv~K^b z{oFvegmeKA(zPTXPP!-m-TEi_2a*r?qxDbnAtWF0ZT)kBW0F5O3rZfqApkFc55NyN z3=jYa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n-X=z)I<$h-s7Ncq{w%^3 zw}Et9ExG5PCP0r+*Y)>ZUkU#A0?D`d@%TH z6x$E3u~=knusTgHWA+q!d?>Ha_~@w>2AHiK5z>0?@y3ovd@kkl2G?YQmQ)Rl`abt3 znfPZb!b;g!n9}SI4WGRGkeP#8H<@83uPU#d;W>{U3SYY#6&>$J8>TQQIV|F>4Ugr` z3G4bfLh@N?l+}G$(jiB&<7Wd`O$Xd=R5L_nh?NKq_yi@h6MXS%ohaHs0}o6xrRxZi zhRe zyj6UjJf__46ua0gS(mPe1fTMil?Hzch0d9x$m;nO4nQEh1HK|G~sWZ50xxliT6~^l~lk;+q z&a-n0u?V}?R_rRhl;N19U!3Y$2vVL&9$&qHo5g3wJh_UNc2m%KUBH*?VYNi=mC_2M zWb+r|v7=@a@S%U@d*mPzM}&l3-whhrSJ?08<3^Vs=5}wGDPxdkS+WS2)Rs%(czlJS zh~AfW{&Y%%Df6AflOHqGIFV=~q_U)4Izp|wB0=R6qF{2A5Un3Kg<&Z0#?q!DQhBp! z`dYn?Zy4X_E%+!M!Ox*$jZ>Rb4KF3YE^?ljPj;^}hR4}Vtud>-chXe$v&MDmPAEoe z@CYh+UKI;Z_;gx6C!@s{_sP*^Nrd(i;`z<}=H!3IdJphrg=$bSGiDb4!; diff --git a/upload/style_avatars/index.html b/upload/style_avatars/index.html index 250b1f72..af2fbe79 100644 --- a/upload/style_avatars/index.html +++ b/upload/style_avatars/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/style_captcha/captcha_backgrounds/captcha1.jpg b/upload/style_captcha/captcha_backgrounds/captcha1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e5c132539dae7a0756469f2cd3715c94a2700253 GIT binary patch literal 2279 zcmY+92{_by7svlIe=|nb86wLly9^Uk_U+oqjAoEBmc)pN!f=JGC9;m}iZM+ZTlNwv zac!ZHH4(Q3aSLVM6nE~_+jHON{rsNioZs{Po^zgaIMbX3K;)>koizY~0sw{k0L~hK zv<&wNya+%59smIBxza~K$c%E{+ZUj8auowIk2m?V72IB!i9vB?<12_WC z%LR@=@a@^NhYum}6QLi7{0ju+;eo^90tkcvN=QHmCHBJ+L;m!U|4kyl(!V|b_u+H` zNCaR6^n(y207XJTB!u$^a0!4wAOQFy`~n8&fq=Yx00II)VE>c3F37!_yECr{z+DCk zh46sCnjip_2Pp@_v{3S*aI@1mF;e+nb0oJO1b!awu%FE z%A|fx)wS=u9s6i%-IrPu{H^=}-j&{&Hetw^*QFRjN% zd#Euz_&R$c?ikw=H)LAIOFI?t*R3ds-T20KsX<(_W*1AGOx}|4CbXU=rfH~-xfkwD z6;8ukXPL$i`5#E2oa)t0*wL1?{rd#%NT_$n=Op{`W;u09HK?@4%GgRth!N{><+>83=-$*m?}V)1|+ryU$%dY%U;~H7XAIe3H{N~?-7rlv4c0> z?k`|hJ=8$QnFc?s7I==c>+d2vGcNRRMXk)}Ti$!-V69hN>w(KM`nXtoepzK#bT+Tj z;Mti;$u^k}v~ZOgK0yRp}wY(Q^8Ff&ke z*T4@+7G#|_scbR{wrq~{A*NxDT71pu&eWj%Egu@QnsqSpg$+tW$jbkUEtWMXm6qT9 zoBzu8ma40FgRPPv9c^6r)qKNWHThZenI*iVNidyc1LR4&HR$!Jg(g-|iXN$--8>QA zkI!+d%aJl14hT%3eBOQCZ=cqYe?t|v5rs(P%-CmN0jtO2;Fn_+7 zAnUpoiSanxDC8HhXDW4AzZ=v1469+rQe=KPmZh09&I=JME#FvE&TuM3FuxE?gvDn( zr<4kGC@zJ`1fbD52~>jEr3MicNgHXckX5Dl(-(V%U0u?ex2e zolL774XSvWhjfPve9;e{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qv`(ucYv1y literal 0 HcmV?d00001 diff --git a/upload/style_captcha/captcha_backgrounds/captcha2.jpg b/upload/style_captcha/captcha_backgrounds/captcha2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..84b2d7122cb2120e9f58bae067fb751e196d7d02 GIT binary patch literal 3105 zcmY+92{_d67RP_HlObcxnqkJ4C6lyRXB1 zJ=qf3X>6&4tP#q7)xFPs?)|*a^PcxP-*e7;zPlfH#{phr10w?f1O@3j0HZ(<6lk{*hywsH1oVf!P5%Ogfgx}N2;k%Z0U+4_2z!-#OTgd=fP)tR z?U?{Wp?h9nf4V>@Fa$tD)%aj|62KRrVlUi1b>5cu&K(Y<8ulqqvWaPQYW_kRZN z)&AvA7Zj}qfPKsqDW;8!TnIOF^iTNl(Y#SUy%-UDk;s zj`=81b~H`MtzUi5sW7akKHE}VB4LSga)&lM=YNaEzHQ_2c3`=oEYrlSzSFjoqZ>8?WlDFrIzngG5oJ9a{(qDI?|wDZ;2lBs3e4;zd}%*$J3jlrxlFxE()uYq1j+6qsX zl6d4+QD@UZeoaQmv!StxmAnhH3%HRY-r4Z-Y;FJBS{X%@SpyE;jExZoHK@Km+7xyp5wM`{Qygku%FlZ&ISX;zFg$= zuw0DL?aBRl4R;Kba7~R?ajh@z7SI)=Cciw4?A_S~M5o78J2G$quzM*(N!)d!->L1^ zEe#mV{&y2)4$eG+mRALW9SUhFv7aC!!g40#jRr!G?b3e_o?v&^YAA6(J8(=`Vx~-r zzoi)x0IUu!Gqf7*bCDF_R$pBI<&0O06sh+vt~XZZFPPZ1rJBO?Oe85%>&kB0-uox- z%*A9yR|!n}OBZtM|Dz?cV8xvt(RY&?e8D~cx8Mp1sW^TnMIvgQv2PkVHnS zNTSAL)N`nK2mA$ir|WIPf8sg*&GinC*m6?D@E`@Rj)?Ps_*un zqQzUw$;Ru_)hLl_gP}g%If&&!TJ+)|( z>iNPXo=cDjrUxv2+R)QT#>Q$(qC|-GGSojKK~vO;5+SsjjhabXepuE^@*E0cWw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9Phskkg|F!ywnqN`mH;5+hpTg5AZ&TPiWAPBdXau6tF%a@@P*bR#91SFdIk+%3S(RJfL25Vr`L#Uei(Y;2HjCPRzM>qZJQDRTY)yV(3

    2Wo zGgFI6uAV4zjsii-RiCtMep(ibkqcqg3b3^BU7^V{o(0YUU+h6{Ae*hLM((1iZF8Yk z`bPJ}n(y4mEVfIV*tyH5sQ@D{zT22}8nX}dI#;_xPKHr+sT%7%&*6)+q^OL;mq)u5 zz}%hz>25J1^BY}J4yb*B#pYb^&|94!>xKszL0I(hv9ZP6Ys$4Uj{8CiB|;BGtT~o^ z8`=fbvpMAvs$)CH+1Y1yf$Wy$EGIQv_CoonS&r^RT@Ds28wCB8%$|Sdp|N^4AxLh@ z`hafTcz(n3&Zp%TR{8LDRrvfW(;#~-&43N}a@->31vs9z%e3mXm|aolR-FmVDRX%L z*-pZPbDtl{IK=8XkiLI_nWx~TsT-jD;<%Q>qOI^?ZCEOZzJh=a4?nQ1i`*m1#jv;-Q F{V!QIV*3C9 literal 0 HcmV?d00001 diff --git a/upload/style_captcha/captcha_backgrounds/captcha3.jpg b/upload/style_captcha/captcha_backgrounds/captcha3.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fbbeb44c07f30ea3b617ee3d427ff1e47a4c2a3b GIT binary patch literal 3343 zcmY+Ec{tQ<7sr3&H^cBq#uiD*E;}KzX5W_?W6v^{Y?D2E$u4`g!ibQ43q#gaQr5DJ znURbVVLT}+qIo^f^Iq@rxv%R!_jS(oJ?DG=xoHcuWq{RK-$);T&;fwQ@d0RC075qm z;};1)04M+eCda95fJNKmy1OUfF?5`P(8xd{0Mh-%@eRU25QM>?AP9xg!~TLEPS0=* zJsi%+#Kgo1XZ{AFz!ecP2_j;Gdw3U4SooL}7YDu;EDipP_W zfk6M;7=oZX56VH=w58UR&JY1 zC}_wkjTKa#e`Z?U6+H;y&e33d`gY!vlkXFh7&3y`?^12ftPJ|B;0X`x7dIyfcVtA& z$FbTB_4^xtHQzw*Un#h-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!vn)k%f$=b#4YghPsr37VTVweQ+U`=sq#pI>KtpIg|b-s=uY=IUDs zTH#uLaFYh$qHY!rW>`!+x=aZ@{5I~2$q${O0fAFI)c`nj2=!xJH_tq#y7PRB+bFlXS%h7`(QvmoHYGLvrAX*^Z=Swx z_qnQhj>wa{ElYlN`&mA}18{9Fv)=7796|h}zp{Iyw^bhBd*S@BIZe;4gg+m4VoRfS z&A_8>KuQ{>lr1Va-;>b`RhWBP^@9c|h3eKclT1R*`{bLqZ981e8gCNGKeYyT9gzoL pj5o@=nwD~vSgMrpDm-qSL~PYYwVVcN#6m+ys@f1X62(s={tMrb^r-*< literal 0 HcmV?d00001 diff --git a/upload/style_captcha/captcha_backgrounds/captcha4.jpg b/upload/style_captcha/captcha_backgrounds/captcha4.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0f658224840f94f099927e792c2e41b906151aaf GIT binary patch literal 3004 zcmY+Fc{tSDAIHD5GWN0F5(yK^K9-DqU$YFV8ChyXmQjR4MuaTcjU{Bs)Zl6?AzL)L zh!$I7tXUf)x?SbQPxG7Zy}$cBzt=g>`JCtTKIeSi=a2Io_7r;&5VEtfwE{q30Py8B zfV~MIEg}d(Q2+>l0svsoNo@fFroLA$UIKi3IT;Xp21o=T;Gb|t2n+&&z+g}a1PX)0 zegfx)b8&!kb0c_oco5utex`BmWLU|Ac?{ z{NIG#3m~}x17HvWLIPkU2!aH$`+yVxfPgq1#4-9e99Iw!n2VcppPy-t`ad{^!5{$6 z#VrJYICp@6Igb98L0||JK*Ek`2%CzCx?BjA6@$lDYRcs_J|F#H_8F_q#i{sL8BX}; zG!PODIVLOu)i8CrAS=pd0DPPUU?cj%6kVC@}M(4I5q|YYlyBMe?O-GF{}oxD!T^Op%*!j<3gT zif2m?U;pAr$;G#lHPO3_=tSaV> z#yVqfeyRBDYf}{8H8o|=yZL3|t(_Bfgpu`NjOb=MBR+U>S$Rnbxg=mBh{q3EsxF3R z;pOGhjFXNIC{{kIC_tF+~l!xQK?O|x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^n10-UQh)cprl=XxIWxr#=&|~FaJZlZzG9|a>l;%{mIjx<(wAHl(xn) z9J(+;`;O@NKf~B;>Y~8qebIx7zcubey65NAF6^N1-7)noOL0w&xESk05C&m95^oVx zxB%iS<8Plxsnr?w{5nE* literal 0 HcmV?d00001 diff --git a/upload/style_captcha/captcha_backgrounds/captcha7.jpg b/upload/style_captcha/captcha_backgrounds/captcha7.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1ac3e7252b9c4f21a51ea45ae1c50154ffee0c07 GIT binary patch literal 6286 zcmY*d1yIyo*Z(g|BOOY&G%A83(!DghzycD2bhEV5(jvJmNJ;D>tO(L2jkMBT(kvw) zC7`@K&-Z=r%=bGp_uM(Zd(NCQbLZT+p1%G8P-&<_Q~?kk0NC6JaJ>sqEBm}~4gf#^ zJ^%okH>Q1nLczw}+7_^ByRm?-=YR+RjQ0<2Mlb;w3??AJ2ZQkm2nqfHAu%D*4G4*e zNk~aaNr-R#3yOb0^AxT#B*F(1-_!>JKm<3;|Jeb65bq{sA`n1K z1%Pg9z{4lN!zTn0+$;dyFw`^z04L!CS_OSBI;$`-dLmEmHV?r7+z21kDzkIeZc9pUI`{qaN&RG$=twJ&h9NYt4>KLPwNrjkeir%X~x(2?-aZW)wfjj5>58X>F=+C#6x$vB(Qz95;It^LB zqY6DN(@hYHGF&ZS3yp-xd+QaI)?Zj%@T&9#TBBBVzM8-IrrRLR93IM%;#?;mSo6b# z>4kQO!aG*&vbfo3S84h|jfr@NG@jR{nJ{xfiFT-DQ>;rZO`+fMctBqo!Gu)tL$UMH z$}}2en7(;jbm#FXYX|w@C$!OdnSm=B>llfa%rCoZ;{D@%kv>NGs>@et3l=;xN#qJS z*-umlm&_giS~8|0qilf6xp`}OXI9M}D+2aXMgvr3*uOwHA%iclxmw)hgp zhbGxbq|~fZw6|q2j_FpH`+^XBBO;wM?EX*#=&Uq z$JwQ_-tx3*JvNDTp6hIThW@-3`3>ykaKm&)Lff3v1y2SVvhDg0q%B95R*+p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rSFt&qv+Gw_x_HAUit)md)>6x zc;=9~VE=YOLOW*wX@17v^l^EwFU#ter5tzA`#Fiz??X$?m9LEc_>C_u{Piwdd^TmW z6wo*DvoJ7yST5l)aqVBriS+kDGV38T*FdXvYwKj4>(uhm@YGTVe<6ExljyU$qZ&{4 zs->q*?#{17f6r;0PpS9^o>Q=8<`34LQOcRqxV_j7K2mGE*oRM@7&YPiTQ<1|{B)=1 zm3UmrD|dzFpnEt=>{3)>W1aPuW>t_R`b&DvZkCYmS#V>0#TCEzL#Onw6URFhx=3AC zTRE@ovf1)}U)}Nku=CSauRn?V*T5mH+;X{er+$48rDE<*VfnIdwYj_|WdCH(*sZqa Z9GW%REb;5ic4(f(&y<&Zk6q<@=0CeYu^#{c literal 0 HcmV?d00001 diff --git a/upload/style_captcha/captcha_backgrounds/captcha8.jpg b/upload/style_captcha/captcha_backgrounds/captcha8.jpg new file mode 100644 index 0000000000000000000000000000000000000000..53485adb9b2c62452d52b0e302ca547ae7b7935f GIT binary patch literal 7701 zcmY+JbyO5g^!JxqkxnTIVF?M5P6?6jP7zod7G$MEN>Dl$mX>aoZUjVNNvTCTlwClY zMN;bZ`Mq(@`T z5)wWnA|iT7Nb*0B{RhSW0|yTu9|#1J5E7D5k&%#5(fp^-Q2vij`M(Xt|1tkB=KmYq ze+5ty0%QThcsP^*TuK}~N}T%vKn?(ahw~r*68+!&%jy9hE)F3M0QW!T|GNLpBf!N6 z;s72{0B~{sZ2=F50EkaO@K49V#iOLce?mL2h9CBX%qsH(y%MjrmDaGWcGuH{#-uo^ZM7bs>4O(C*4_fA)pQ`C-Q6Y z7E)`xi9WkZL*&3$@S^V zl(Mj9DK1-TTDs@^>7}6|(k*Yux(6JGkY_<=Vq}fh0?ke(|#GQkY%6D8wi&*{W==n3UX3+ADVb4B@BD z*BdlNM?3`N3eu&wWtoZMSFEh;I=U&iy9@hWlKPf5xlGbpZA(qf06+CTh1wGzuE8CS1yfXMf&;5aYNK%c@<4vvkJ4NU9h%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#39|_l2y!{mMuLLYy85=BRu z@-cO)#!{}Z)mOsBbGTx8X=P^j zj`!~!tEVnMUuDT1S=xZ&qcn_W+Motfz$MqC-f=y6)<-g~_^gGqdikaL@YL<*fu(?z7#q^*iU_i^~vS z>>trDbtzc;#nMw$?@4)`MKv^mq{aV)Q>r%~tF!6ebvqce?z(IdXsNrtjw*SP7^*9D z^d>2}|Kk-anS8=s^lVV55GOA$d%XkM(zM^4eG|;&qPNpy`Fb?=D|h<9hh* z$Xwn7OiH@~m`rDuOk^sr>JA`scPSU_M)7Y4B=J9Pggj%7dEI4_Vfm(K&%3kx?k?T_ zuA)mFV|x#%2_@cDKj|T#lY8E^c^Dj8Zk>}>+qK*UhXkG1miJ6FF;{MH%E`~EES$?- zt)H`=*Z-9mT<`Fe0}jqM&+UmdF5O)RB62>Ge=_b6`wH>g2z8y`?R_ZM_OD>o(a;gq z=7{V)Ge=|uqACsl?(`mO-l-;v?92_Fy-8{4eYUmgdk>hB@vduw9`*nG-O~Bc#tqio zlp{Z%6uh0rzEAIp2_0Npt{oS*bZlL2f%Jx!8w9y3Dl&ZwM*KP@4pQyF?w8#IkU{4M zsCxh$?s5+h-25#)5ng2umDj)IJInF&U0S{qd)8f7j&N^L^y?O^E!?f0=P@==9FsvI#P8=6lp-@$YhRF+X3h rYdOU7iYAnGr}8W*rA>Ed|IlOcZQHGUh}`IVi$HH)px2P${o?-ul548| literal 0 HcmV?d00001 diff --git a/upload/style_captcha/captcha_backgrounds/captcha9.jpg b/upload/style_captcha/captcha_backgrounds/captcha9.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ff6442091309f3da43c4677150f55f75aeb9b8cc GIT binary patch literal 3712 zcmY+G2T;?^)`$NgbSa@DD!oWml&T^fX&UKGK&k|gP7s2CQdA%Wq6A-huL9CRx^(Hi zBoI(ggP}<8`Ox>fcji7jvuEf0_MAPtvopJ-8PXyE(bdw?0zhN{;CS8u5)ok1@ON+v z1V8{e004UDu62Mx)zQ=5323JP*Cn4E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G}F2cA5ThMXCOEQVpqBObi-5MpvdH*&@3m4(7yW4mXsL&?YgLD8UAdS`QVM> z6+N*sz3%a*n&w;=8CTfpeT`wALlU5CuR=F)kw35!QkyH+;Qry&Bj5P%zt_6&;GSR_ zFr%Ti^rF;_ilQwZwNmd9?#+`m8z_fwvCb6OpQXo5XOqaEZ)gqgDJ-B$4$9{u%WdsD z-qXPS)@V!iEhS@v4n^^E>SxNU797x?ovTw2gQlnhp596WR-@{-AA^3fHzb;GDH~8| z^uEtr*Hsgtx@P(HlFEW+LG}fe$JNZK$+Apsf3POA4kTbEkX&gKfd){RGD rjJnIGtskO#&hv!IlK{`jomRF7lT*DJK`QAPxYN*XkrNWYM4J6SlDYeX literal 0 HcmV?d00001 diff --git a/upload/style_captcha/captcha_backgrounds/index.html b/upload/style_captcha/captcha_backgrounds/index.html new file mode 100644 index 00000000..b49fc27d --- /dev/null +++ b/upload/style_captcha/captcha_backgrounds/index.html @@ -0,0 +1 @@ + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/style_captcha/captcha_fonts/bboron.ttf b/upload/style_captcha/captcha_fonts/bboron.ttf new file mode 100644 index 0000000000000000000000000000000000000000..c326b0fc1ee1800e20dbba853c1a0c66763d9199 GIT binary patch literal 32480 zcmeIbd3;<)l`md(*WULb`F5{0A6&-BZY&+`4Ad#Ju}| zgc!T74cEQXClAc0o?UT@u`6z8OncMx`Lof-oZh<_bN&YR8xPMPIeA0+OIvXL46c1g zPFy@Jo%-fifM6G6qlb?kI(Z=$dKP7!-^7@H>(QA5hrSxwn?d=9sQjbI&|j2a!u7kU zyrU=2UicsHbiI|aJ-FuIIX-iG*7bAe-HgptG3M?$F*kjHxvqXAV^dGy{xc^JT$tyY zyb<5WHH*$3I63pj8{Yp*+_N#}`1<_ZnX`Y~|MQ0#+jkauRr9B3=D+d2&%O!t`SAQ2 zyzBVYfa1kpETP)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H#`n!`#$PD=T2K;8$i2wiq literal 0 HcmV?d00001 diff --git a/upload/style_captcha/captcha_fonts/davis.ttf b/upload/style_captcha/captcha_fonts/davis.ttf new file mode 100644 index 0000000000000000000000000000000000000000..6b5ab07d3dccfe6257c5be6e2ef9b4a578f1edc7 GIT binary patch literal 37784 zcmeFaXSgKEStc5hnGxx;D$9HCjz6dD@u#}`wD;amch9t)X{YWUFEKJmBO!wjLNG`m zfdoigv64XMf-qVkU1>oNTnR0n#avdv!UHT1?1Iot-#0R=PM;P%NXy+H_XkzyRApsm zWk!787w=~yicmsGko1W{KC}1WRP$A5?)*nW-tiXfJ+g1pu0tau-}BS>{HOTbedOA? zoA3Om59}l4&K*MdHy(N7PT}0UA3BQ*WN^H6@#dv#uWNmFFFtGd9JzG$>5J7ryZmu{ zemfy&uU3yj3BDz47vebLT(zJx}}^A>S*$-@S|->k#+i$N#@BEp4Z3){6CD>TjVyGByzPs4y-v>K z%qi~*7x7*o6Zl`nx1JzZ@cjbWgtKmvr}3>T|igs;BPlv4)lsJSI^}mS{eotGZg|-*SL0sbs z?sXO0+t#)Yc=r~q--d5r^JwL_;t=*tlP>9i2D6~9cx_>if7Qdd-iE<;33tDYHVEnn zs@%an#HZcp!4ufJ4N8>oxq(kjQ1t-zUBa1HJvs@h-N5I0oUxuO4e#6|I9G7_%78je zoF!V@MvIzWy98g>fA3%8=F4#J@|`<3=clHwUAXq}g`N)lHQ%~HwapT&> z8`sZYn7VW4;#6UxuzK!^E4K@qZrptO)|E?_?-Ux3j1*?(=6VxzvxP%9t`&Aae(UDt zrwhG_!j@YXE5)>k$q^{ zb|B4mjMxG>ik6D4LpZhvpZDSY09v;lWBedqMJvTM#W=l&tzi!ZH3fYxc{I7Tu78I- zeu!2ItQPGT+fU>BkK=tekVEuYP(j@PAnv!zqtziui@2+hA8}W4)JMg0*cx(t0#p&G zDSG$_S~J9kA#z^FQGuMIZGv(`r15z>JbKfUJV6m(@o`M5`8kh@LY73YhM$LLp7*XIdMEl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IiE-X^RpuEZHXEE4bge zrme?#1`qOcTZ{Mxj;V{bHuW-|=Ots)ynU5MW2P);Q}59hA(5+Vy5`r!@JNEe`Pv#y~k1V75O*+ax7HoPV)3WM|9ea;$XhsSy2!+(C~3_gl)FjXgb;9(nBS zGZm9*rb&pRMHX_iIJ2YWDbjW%g)(v@PZY$$=j6)YZy8LlT9HdYe^2j@TubOxqjvla z$?Z3XRLK%aZ^$*P_O4ta##91BxkK# z&+zyRgf?<>+MY_y!tl&755hpn`_-k2hj=P|ieL?)_*4gKRYaY}A6=o5InD&^k0gu@r2UbjC?D19) zc#&?4N$zT~r(#cakjb9j95A zswt@lSfljP_E^5Fn&n#XzBDrQ|Kyt3Cq7m$8xWP%B0Dpzws<0vTPRTa~Ddd{KBR=(7$nCcvb1f_kfsycs2Rx5i4Axnw5Fyta z1ok*+us+OWa*H8yOMCYG^Pb1uqb}{ewf9jy@+Wux?s?sc&iS|BUK@8mZ~PXVzg~Xd z!|yW6Xf#grOeD`pn3M9R9eZ|<_4gz3^}jvuS^CM6cck9me)})}%p;8-e3H*{N_X3r ze(XmU7JiT~WW4h`Z+^$yhMJyQ==omkdG_7kkKd0=&%WpE2mB&`W$#lx4PSfw`o5zP udm72J9Dd<1mFjz+`aes2&7YXR*5ehWC*_LIUcZmTJ?N6T&c12ip8o~Mb^AB~ literal 0 HcmV?d00001 diff --git a/upload/style_captcha/captcha_fonts/hockey.ttf b/upload/style_captcha/captcha_fonts/hockey.ttf new file mode 100644 index 0000000000000000000000000000000000000000..ce7da93179f61b49637d834af1042f91df100f6f GIT binary patch literal 46560 zcma&Pcc3I$SvOqgoH~_r?3{1+&H3J*nR{pMov^bxCpH1Ik+AG8VckX2!m0#G1{4ge zfaD~Ipu!8tOB4`ZBP!{|gfFimit_m(JKyiA>Yf>pKfbBy+uhYw)pefud%`)bFhx;( z^$q`mW4@u#*zx$-_@f_woWJ|;icqmbQ9c}9@#*RF z>AyYQ5wn8EYbc!d;vdct@#(H|qd1Pwzb|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2p__dt0_`*tls~BOcK~Y1jR!jag zu8E(R&h;5s#mq~;!zN#cb03`VryXC1`wX~mq8;B-^XW~-v%QACcA&48yTR6>8FKg@P7C_ zLn#^Iw!uf{3R}^P#7|FB^KNP$qUL${JxT3*sJ#V#pJK_U;dvHmW%S;Pbe|*L9{3-I z|JO+KbIt!WRF*;IJ*e!5!X_vjp~eY3Og3YhpH?z+m5<^7B>cC)`weO>qL$26zE7>Y zskI!w(g$9H&sq4KhsVdVexW17gHSnv6#JkeGpqNYa>nL;5h@a+JqndOpzszo4-vn} zoM49bXyR$bz8<2)2ej;0$afO?j^Q6fz85vx9?(8=1=<)Cp0m-OgHJD1WDd9tw8w3< zr$H+-tWTM{n_jyMUv(Y}l`%s4`uk`{dVpx>EqI DR^-_V literal 0 HcmV?d00001 diff --git a/upload/style_captcha/captcha_fonts/index.html b/upload/style_captcha/captcha_fonts/index.html index 250b1f72..af2fbe79 100644 --- a/upload/style_captcha/captcha_fonts/index.html +++ b/upload/style_captcha/captcha_fonts/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/style_captcha/captcha_fonts/px10.ttf b/upload/style_captcha/captcha_fonts/px10.ttf new file mode 100644 index 0000000000000000000000000000000000000000..e19ffca10324fb60e4027c1f8b7c30db5d2c665e GIT binary patch literal 29480 zcmeHw328<=uOhfBpXdoO>ap5F#hWg(bf9z|ox(KQXiP`$Amo!`X)) zyyx(-UoQ@R49812o<4d0_~P#z`-6rMr+!ZeH+k~$rTXH9uKy)O;ji)g#OcK|=YM+g z%MalATR1MCnSb*1=^fwxRUwK$BgFkLojrB_iG|(|{5K&U{Uaf~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l?Pr5na4)a-t(?Lz+dyB+dn38kP`|!9gEW zj`x92DTf^j!yaU2hC=aB#4nJ+p(vGq41HnVlZQdXA^Ln&@Q4aW8~S9<5Q;%)7ZiAc zDSw1f3%d~`EEV3U&=(7_?8}H6`pEm_QF2J%I`oA@5jg@8X$}X1W@47*E97~~^hLRc zh(q|DNtVvVRWLY{KE~R}<{fb=CBm#}R0qehE9(dM z@ks7F>l9S5e((;^7jT7y*Zfo&PQm*=Pe=;Kdm|P4d{K8W5{Mi6xRa=)!HD#rIizo4 z6OKqYDn}q{+AH({Y0d$8bg20lGs`5i$xWyGGc^Q-3VneXn1G%jMQ!;-<_i!Ybia#v zhz~OyhQ2U-77iy-38M63Bwj-eP(&>+E8?s|U$jhLK4fVW|)PrV;3BUtrjWN@M zLP#C#+!1DLC`dM0 zRwjZsoZ~CLSX8(j`iO@@iX - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/style_emoticons/default/closedeyes.gif b/upload/style_emoticons/default/closedeyes.gif deleted file mode 100644 index aa1d95e86d9f050aa23d3e5cd15f7254d69a2570..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 472 zcmV;}0Vn=PNk%w1VH5xq0M$PL|M4sAwE*0d0tE#H`|1Pty#SSZ3Z0D$bYlho#j) z;;jJx=py&l24q47-`2EUOA#{oG9`;4q+lH# z6$If?6Ln~r38LaCHdL~Q4FC`^I*`pIrfLvZ2Xb=}b{z>27zG9^Lk%H<0E7&8hYJ${ zA$~s!fi?pX5d$3q2?+xj5*Ld?6h1eR0|S(?BN#ImClo>|I)ir|z=tCmw;(FJ9yOqo zz=jD65+*sutUfN1!KH{Z0Rk|(KY%*S&Xv&|C@G9TjwLjuhY%wR8Ybu{nL~gj8xZpI z8d?MZk#3!kH#{a}*suUqiwhtG^ypIr41x(03KR(N0tAQ;Y>rH+f+GN~6kNPS`9VU# Ok|ryltej~i2mm|PhrNOT diff --git a/upload/style_emoticons/default/glare.gif b/upload/style_emoticons/default/glare.gif deleted file mode 100644 index dc3092440ca69e0e1207d6a8c6bdc1b9a57d8aba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 468 zcmV;_0W1DTNk%w1VH5xq0M$PL>9qj=^DN}20iBKu|MW80p$KqY1%iTt|L7&&-roQ0 zD)G7j#Kgq^&!4ZE8T;=>L9?ho|D0Ihis_tyrAUkm^0BH6JH|LhsTtq=e66#wui+Q1I~?;?wf zi~s-sA^8LW002J#EC2ui02BZe000K@z@KnPEEpG2dP_(;bg>i~-I9*JPlFhrAZK110Mu~b$1AP6%i{#Bp`w+kSYq1Di9kB zAbvjw13CmMbPAImhY%J3ib4`Db98ohqz$G51rkCUEpvsiq$4F400J7fG&^;#9?1wN z6d|<3KN2uFyUDSp04Nx?KY$scyob!r4kn8~2_O$09*_v)6u=G+DVp5_>kSBy5b@a# zHO>inlVigJ2oOp%%Z6e`pCVukY^YE{#sUEtRj@fSrOJ&305F(H;loRmA0!SeX>tI{ K$(Kfg0027=t;Ik9 diff --git a/upload/style_emoticons/default/index.html b/upload/style_emoticons/default/index.html index 250b1f72..b49fc27d 100644 --- a/upload/style_emoticons/default/index.html +++ b/upload/style_emoticons/default/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/style_emoticons/default/ninja.gif b/upload/style_emoticons/default/ninja.gif deleted file mode 100644 index d422a25552c3d272f9dc23098ace09a92e37c010..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 481 zcmV<70UrKGNk%w1VH5xq0M$PL92^|~@+RZs<32t<`r8#wPEI;HI_j+eOiWDw=Oa*1 zQ2**C^UVM$DJfJ`RR8QL@5um1M@QYpv2s1BnSXI)%vN_ diff --git a/upload/style_emoticons/default/wink.gif b/upload/style_emoticons/default/wink.gif index 0ce4964ae9e9c4796a7802a71375a026e6e65c33..639f10a7a787331f2df63939277d651e9999dd1f 100644 GIT binary patch delta 58 zcmV-A0LA~f1-J#U0s$fou8|VDi3z}x3+>Ds=fD>4^7D9RJLJ6<*{2Q7sub9#4U;4R Q>j4du5CWqG4Fv)KJM^I!eEDs=fD>4^7D9RJLJ6<*{2H4sub9#3X>!O Q>j4Ur5CWqG3IzfHJM&`~ZU6uP diff --git a/upload/style_emoticons/index.html b/upload/style_emoticons/index.html index 250b1f72..af2fbe79 100644 --- a/upload/style_emoticons/index.html +++ b/upload/style_emoticons/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/style_images/1/cal_addevent.gif b/upload/style_images/1/cal_addevent.gif index 40a456e9de5415a431398b9f27b985b12064a7c6..1d7b6b87ba062c50208f0e2703f9745ea8f2493d 100644 GIT binary patch delta 1979 zcmV;s2SoVR6vGdHM@dFFIbm4<8vyqJ0FtK2N^!DDZmu#}mqBKrM{=<|WTJ(g!(@7& zT8YO)Z>>RWsy=9@I%cF^j?zYSvsHe*LT#%IE@?n(svJ6PTZ+jTIdM;Wx=eVsN_e+R zcC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`1g-#mm9Mbu!7d=^ok1z&UL@-+EUgtKOqw>h%1GfXufe)Nq z1{KmGy3GqGY_8c@Vo+4X+!V^{*v#1$rcvBq$iU8G#mv~s#h50{s?ixAR+=8VD3X~~ zbZUO+l0~y7gmU>U-&D)M#ly^1>a}KHOlZoQ6$vTaorOm@d(&Cm;&)G5$97tXdsU2&n3%7xuYiDnA^8LV00000 zEC2ui0CNBf000C3c)HyFFv>}*y*TU5yZ>O=0l;7?g`gM*Km=)V2(lrlb9@wq;Tt^y zYtggqen;P8$ot6zubPi1i&a%n7;i_r&ZY{$Vt^tj$WIudunrhXyMbYSkOvC^6=1j{ zKo4&PWPXARba?|ji2;3e1$#;aLM&`}eM)SRertPSV`YjnE@nP!WN&+WoSkfSJ}wIa z0If=7iFHdXwka==wt!A9n7ux7vrtnm0*p#63u1A_P&{UJ124bjn+UE_z%QA7rR>PQkZ nN|Ka00UM3lcF7EzPR&GcptF!d9;sNfN{~UM0!6JC5&!@@mQ$mX diff --git a/upload/style_images/1/folder_attach_images/index.html b/upload/style_images/1/folder_attach_images/index.html index 250b1f72..af2fbe79 100644 --- a/upload/style_images/1/folder_attach_images/index.html +++ b/upload/style_images/1/folder_attach_images/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/style_images/1/folder_editor_images/css_rte.css b/upload/style_images/1/folder_editor_images/css_rte.css index a442a49e..392aa49b 100644 --- a/upload/style_images/1/folder_editor_images/css_rte.css +++ b/upload/style_images/1/folder_editor_images/css_rte.css @@ -5,7 +5,7 @@ .rte-cb-bg { background-color: #E5E6F1; - background-image: url('rte-cb-top-bg.gif'); + background-image: url("rte-cb-top-bg.gif"); background-repeat: repeat-x; border-bottom: 1px solid #555; letter-spacing: 0; @@ -19,7 +19,7 @@ .rte-buttonbar { background-color: #DCE7FC; - background-image: url('rte_tile.gif'); + background-image: url("rte_tile.gif"); background-repeat: repeat-x; border: 1px solid #555; letter-spacing: 0; @@ -70,7 +70,7 @@ font-size: 11px; overflow: hidden; background-color: #FFFFFF; - background-image: url('rte-dd-bg.gif'); + background-image: url("rte-dd-bg.gif"); background-repeat: no-repeat; width:auto; } @@ -150,7 +150,7 @@ font-weight: bold; background-color: #E5E6F1; color: #000000; - background-image: url('rte_tile.gif'); + background-image: url("rte_tile.gif"); background-repeat: repeat-x; padding:4px; margin: 0px; @@ -210,7 +210,7 @@ font-size: 11px; overflow: hidden; background-color: #FFFFFF; - background-image: url('rte-dd-bg.gif'); + background-image: url("rte-dd-bg.gif"); background-repeat: no-repeat; width:auto; } @@ -230,7 +230,7 @@ .attach-parentdiv { background-color: #DCE7FC; - background-image: url('rte_tile.gif'); + background-image: url("rte_tile.gif"); background-repeat: repeat-x; border: 1px solid #555; letter-spacing: 0; diff --git a/upload/style_images/1/folder_editor_images/index.html b/upload/style_images/1/folder_editor_images/index.html index 250b1f72..af2fbe79 100644 --- a/upload/style_images/1/folder_editor_images/index.html +++ b/upload/style_images/1/folder_editor_images/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/style_images/1/folder_js_skin/index.html b/upload/style_images/1/folder_js_skin/index.html index 250b1f72..af2fbe79 100644 --- a/upload/style_images/1/folder_js_skin/index.html +++ b/upload/style_images/1/folder_js_skin/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/style_images/1/folder_js_skin/ips_menu_html.js b/upload/style_images/1/folder_js_skin/ips_menu_html.js index 1cd17157..7494b148 100644 --- a/upload/style_images/1/folder_js_skin/ips_menu_html.js +++ b/upload/style_images/1/folder_js_skin/ips_menu_html.js @@ -45,7 +45,7 @@ function menu_build_menu(cid, menuinput, complexmenu) if ( len > 0 ) { - for( var i in menuinput ) + for( var i=0; i< menuinput.length; i++ ) { t = parseInt(i) + 1; diff --git a/upload/style_images/1/folder_mime_types/index.html b/upload/style_images/1/folder_mime_types/index.html index 250b1f72..af2fbe79 100644 --- a/upload/style_images/1/folder_mime_types/index.html +++ b/upload/style_images/1/folder_mime_types/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/style_images/1/folder_post_icons/index.html b/upload/style_images/1/folder_post_icons/index.html index 250b1f72..af2fbe79 100644 --- a/upload/style_images/1/folder_post_icons/index.html +++ b/upload/style_images/1/folder_post_icons/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/style_images/1/folder_profile_portal/index.html b/upload/style_images/1/folder_profile_portal/index.html index 250b1f72..af2fbe79 100644 --- a/upload/style_images/1/folder_profile_portal/index.html +++ b/upload/style_images/1/folder_profile_portal/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/style_images/1/folder_team_icons/index.html b/upload/style_images/1/folder_team_icons/index.html index 250b1f72..af2fbe79 100644 --- a/upload/style_images/1/folder_team_icons/index.html +++ b/upload/style_images/1/folder_team_icons/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/style_images/1/folder_topic_view/index.html b/upload/style_images/1/folder_topic_view/index.html index 250b1f72..af2fbe79 100644 --- a/upload/style_images/1/folder_topic_view/index.html +++ b/upload/style_images/1/folder_topic_view/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/style_images/1/index.html b/upload/style_images/1/index.html index 250b1f72..af2fbe79 100644 --- a/upload/style_images/1/index.html +++ b/upload/style_images/1/index.html @@ -1,10 +1 @@ - - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/style_images/1/login-button.gif b/upload/style_images/1/login-button.gif index 9ada4c6db48357a8280d207219e65110a14582fb..850a496381c6b47454b56925dd0c6a73ee99196a 100644 GIT binary patch delta 880 zcmV-$1CRX53Can7M@dFFIbj|E6#(}D09u5^WtG-rkua9hV2sUOh{$M~+Hj`l zZldGr@Al*B@!sa{@$~re_4)Ai`tI}jJ7}gaRg*bnp*>@wUw56l$J|bJwKZLvgqy)O zU!JbM*G6urVTHD9pWtJX(^!VZS$V41;O*e&?^%b(l&j2tVUp5oh_*3Qk4flDmbS z!fcATNOZHWzu3IW-!oQ`ZjHN1cC>J%=R<9*7&&oukGN=?+>4#LKxwC5j?P|<%{N_| zdzisLW~6R^qvdU)<2q%d9SspRSL%GTyxjm&JK zsOdszqG^S*JY}Ti>+))y-e;NGLu;yNn%i4?tjg8qQhT^WY^%xCnATN&yxipM2P$U&|NpbG0WtxT4FeT_At+eD;F7_E2ooy2#9)B}ffX=G zoJg^v#flXMVxq*cqsNaRKVl+?sglW)C{wCTiK!r_Nibu|oJn&gCWDwP>DG(`s#x%9Aw(mrSF0LWyEc!a zOj`1TKve;lF=NQ& zsEMExC$4PBgaHtv%^P%N7Em>SYu6ewy&%-X>kA;6G<^6F`$v)20jeGtK3vKa2Xx%1 z$+W0MrWr9}%*a$?2=N0q$zUSDox2YjnXEW}rxB8A3kL@dWXM3zfk}4)H%GuhlAwM9 zKP=XW@G3$Kiw-V$L4N90)XsKonfOF+l_oOpt{aElgNp3wE60AObhl zkc1wA3}E5_L?p5V2q4&S2oxTeKmrLScreC^Cf)>r3OBSN$&Ww=Dddnqw)6lDXw>nO Gp9CvBd%5fY delta 833 zcmV-H1HSyq3Can7M@dFFIbj|E6#(}D00${$(%a^Rx%E?dxmA6=YnRq{uklxbz*&RC zYo6a@k?<8`g?UyaRksp|j#|J>y6*Wc>m>GI_2^55q0)ZOS_ zcAi3Qt8Jm;a;WL!=HyeR*1+^Yn5o5+&EvHI$xb& zj?R;*%JTI2PI0F}Xr{^3|-cxz5I%A-5r|CUoqQuYOZJ^*?ippY@)@YpETZ_s;W}rrHsG_yg zPkgz)&EdL#$J=<5yi0esO?I`GtR)D`pZ>-DK=XQ{}J!qy=fx$dyrEH72 zX_?to zfWOPv=ZT}pK53>=f4+6B?(+5dXPVn%hPcqK1J01ZdpIv7^V100;soK(eIClPFIDC5KPXth-LcJ2ggNG0~CO{z~wd>CXV8enX^g_!7Fe+?J z;6p~N*q;&Nf69$}2#$^#6I?9O^F_vyxpIFh7)+S(A1q;Zz(^5g0t+jJ3IA+BxdD>O zlvfCeG2z397J0T{uKbgMX$Egjo95zWLX#P1CKQsQ`t;8PxO3-5abu4iCP60j@qt5k z?v)vSw0Xe1Idec%CdiqSWkMMzMw~ZaS%HQL2jIgye{SHg=82&|c;ZyqkVd@tl@v&b z7$Tv*{SHd}pbMuLO3GCkOct&06ULB1}Wr_K(_P% L3~1Exlb-}DFR!4| diff --git a/upload/style_images/1/nophoto.gif b/upload/style_images/1/nophoto.gif index 51915b475360bee84d356eebae102f3a2778ce8a..d71bda544b1ec4cd37aa93bef15fe320c32f4fbc 100644 GIT binary patch delta 3191 zcmV--42bi!8Q2+rM@dFFIblx#PXPA-0D+y%ai-{Rq~&Ck)}FZEUW2~f}-6cahcO!jLfIT?v}FLd#B=Sp5T_R*JqmCVwT-fdc1R{=v;})UX9RprsRRC;8=md zaiQU6nA~1}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{Fc|TVe*q3b-h`YzV4;O?(8Zm1biHw*g&F)~!5J^u zAmSeY_+kMNB9QpPKX%w*!wWBjXn`kZG-6{08CdX7k3U*q;)nqFm_Z^tYV%4YA6m$n z1W-ar#b~5;M_OrALv%;r${4)!tU3Bs33KLuk1rzc7a|b1rPQY0N$ReAB zhTUnHM6$?I@Q*nER3L2yO3Xun6V>*CNCl5z@sAT}2yrb16bNvw6;@R64+ZX~(ap7J zpy4hB5nLV(Lr}8D|ENO?#1K>k$2UbNAoS1*h@r3; zL=)XXaGSug^aiag@edYKr1G>bu59py6#p#kTq#f2P{RgYlMT%PVUOLl0$%^Kgw}v0 zUDY$T?mGe|_y9=} zg_uwRHO&+QMm-+@WBdoZl!J>2(s1*E4?p|>MhR?`@PP|1d{9CsA0UB^^WK9mz6ro% z?+g-bxbQmyRmq?RILY9n|Ni{<@BjY*44?o9NWlITWd=>q#5yE#j%wWFfe?(K1Sd$r z3R>`j7|h@UYchjNG(ioR_{AVbLc$W7@Pr#F$qZH~kXpbY9TAD43};9~gG{6%0RaFz D3RR2k diff --git a/upload/style_images/1/p_email.gif b/upload/style_images/1/p_email.gif index cd5c0a959e530ffa9fe550fe09f6f068a156342a..efa19ea0d7b7fab0e0dd2b45a64f8f2cc5bf6c31 100644 GIT binary patch delta 1452 zcmV;d1ylOG45kc!M@dFFIblKo6#(}D09u5^Sb)G?h{$7+(Pfp^V2sUcp5JJi+HRub zaHi*Tsp~svrk;NQUy#yBZLBX@`S*z)!HSck@Lqvc$DtzneaScb<;ad>m*yvV+!(NWgRD8R{(BhJ)$ue1&QGmZ%ipxN3sW@Sv zyvpA{YNtG8qS)Z=Ibok+lG1vPut038I$@u{&EJuw#%P<|hMKuVY^FbErA2J4pR&$G zajz~+e?o4oyvg2FgTZpB>ek-s*Wc?qVV-80**s={q&Hrih@!_fU7JR5t*pG&L29V2 zz1C2Eys*LALTI9%vCdO_yH|xL0LTagOqU2zZ(WAK4N_VvuH*dDY z*kza3Y>K#Qo!(S>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^NwW386vSPsw*voeS z7g)aHurToe0vZU19u$T^m<5x*1Hc-XOxZw)SH3(+@a03&l0=&^h#7*xmjob{4S*%U zx;23fpL|v5;Va6HFO)dQUL~i3FAi2*695~axbXl##`yA}YB`PoZTR@g(4j*HUz|=I z4*<4+_wNO^?0@I+Rf>@>CyGXeD&mX8gb5^kA({lfz|L8{4(Q*1AXOt@SM;HR3Y%aN z$p$I-B7z9Mq%gx1{2j1U35!%Az=arQA&M`iD4_!#bD_{h40wEif-j(aa07-H?gR%E zIUpe8jCwpm0VaR60tN*XOhAeau~d@DC4``&#*8xVBx^+tW%!Z6lTW%Zh!GYbaR($c zm@$O_b6DU;Ag*{pg#}PPxl;omXhDlDY_{pOEtkmaWc{smheA%#^CjQ*D<{b+x+3+%{jH zU7I^-rb%?P@$~pCyX{LLa!A5hkVUW>(yf3#RfEAYS(ig_u0U+5JY%0;j?Q3`(ME5s^7QycZ?0R1#&W3XN_4V%j<9c}nATN&yui)g z2P$U&|NoOw0=$!80w0qN0~LQCC|JONmcfGv6Dm~5V1WXG6>3SGNU@^DixVphtQD)H z$B!UGiu72EU@ciFQ>t9avSrFz1#7{YNwcQSn>cCKGFWSt&!0ep3LW}$C#_nok}7S* zq5+FBt*oGE&;Wu33lOMUU8>Y*tpH%d26$s@lBp&)?%1+*fl!|dYcGGm*(4UMR{?nQ z3aDfYl^+kbRLz*-;Y@}OF=BMcfI=@`uLmMaKH$VwqAGSW;E*Gw%?Dd6Uc6Xg>%)%8 z2fPkg&3b?aTM`O!+JlLXr&SVcX>j4v)IEpP11R=s7A*>aF8#P4Gp)F)U;z)%Q?!*Kd zY9Qd^i)L(a$r6b0@WciiSfU9fIh1h(5jH$>#fvWP#78KNe3ECtl1n0?#R-St0YxT^ zgmD5Xq751EM%#r4LuYP06U-_548XQ diff --git a/upload/style_images/1/p_im.gif b/upload/style_images/1/p_im.gif index 3319bb29cbe3f6e7cf6927675414b52f83d38bf4..7a0469ef6c93199a9f3cdec967ec3c2528651035 100644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!hE++B>#Q+&O=$=+d+(ME2l zQG2^PXQXGC*~HM|T8hg`aIZ>lt#72|&DiKzhQ~f-qeX73u)^E&^!YYgmdVuRPky~X zWTHT2qEUIcT8YU&Yp7m}%1v~$Uy#!A^!Tm4)ohBmZ;!m!;Ortvhe>j>hMvRL-Ri;4 z-({86Y@p#+fWTRb$wFD1iOF4kuSamIHC&oNY^q6e zuRCa^YoFj}n%Y2Ur&fi2zOL@3qkIz74o1c(`1P%E{E^MQp4{Z?8gXsYr3Jp0UnMdb+Q_*jkCmV35#Rg~e;0;8=*rbExV@ zZ>&7>_^hurXa>ym#mVE@b?eZi*y#i2i!%Vo27(7KGUiMec=__d3v*^n z5#hnPtioI&4#9 zj%LK7Lle7*q7NK{)TjVt1a#RY5C0`6rgA)Z*<}eC=u-g!73h;en;Cr3#Vl@?fTo%R zIP!%MYY5RrHU!+cCY$;QvxYvd++ijGkR{-#qh$D(oPT6I>L>{m=rh496X-)hr_p%Y zDFq~8s_7h<*rv}nc9=Rr0;{C|qw1@cK2-=l3*?%s6iZ|=#DDM%k;M{H=$fktAn4=5 zvih*{L~Csv@_{}eh=8m<9~={dJ~4byi#|PEbL|HUh|q&RPkfMU451kN)DFrhF~Gd^ z4nPI4RMcB<2PUYh4;!tq5zY(xn9u>g`n&)O7y66>4j(w+FbTph44?@PpipCqI{I)C zNWD*0A`LA9lx(s9M)+sM$tRD%LIW_vtj``Wmy(JM4X`kR%MHkoL>Uc?L&rN&oC5~W zG6(?1DNzW5iXIJ=k;KVQaq^5C=oFy!)=1=l1{ygavGv#msF1=iHl%%tKH_wsixQ92 zfINZ|kg diff --git a/upload/style_images/1/p_mq_remove.gif b/upload/style_images/1/p_mq_remove.gif index dd84453851187a4209ab90a146ef0872982cfd59..5cb431cfd2366e77ee337b4fb17062f1db6219b3 100644 GIT binary patch delta 1470 zcmV;v1ws1d45|!&M@dFFIblTr6#(}D0M=z?+GuFsYirSCW6fY-$X#8NFE8ZD$;Vh& z|I7fhO--gdJOA#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Y|mX?!&zCoQBj~dIniKXo;Wzb&EKa$K%tPHhaw{F z*x1luVA5e>u|`I%Mn>LhYN|v;wrgvkIy%FKhR4%?cbNvc0T zxK2*RSy`-GTk+%L*srgoLqoj6(&}?_wP9h}W@dy_T)9zEu}DbTXJ_eha`^J{y;M|) zBO|#?OnW{=zj1M+Iy$>kQ_$P%sX{`pNlBd)I5?(6M5sMItz2Bo*5>hdckXp{la&H^ zlfVK7lMMq6e@Xxq000R807X#Pa6y~Fg9sBUT*$DY!-p3(P!Nb?o5hP5Giuz(v7^V2 z7;y~TmaU}8lPFWFT*X+NOSY_l6buwFe-MzCLE98))uvTIS8bzF3iuR> zTUV_B5KGi9E9-SzfWwFrD_$G`L)5y6Ty;9F1Za6M;h5e2Hap! z00!J-fMo_$SfNXnElgQu0h~}VLm4wz0Z9R3T6rZmxs<_86_G?)Kw$~wndcTBZJ}qL zEOfw)1%+6^O$UZnaj2mkun_2=mOx_~HVZ3!++%8eAANwG-{+_+EzxZKnLh8El$vWhY^&_D~jH4GpN z4RBoIOeWlD0S32E1=2?%03@vN!VEY3f5Hk4L>w_Uu0;HYFg!G{!V3>Kz=IiIG%yD% z#|Qz%6CLvaz!OjiF-Z@gH1LHP3qLiDAa4vqz|K7P?6c1Rz@SMEL`TC-G9{EUh9oGc z07JqssDQ!`T&U3lFFPD@#127AO~4Lvs4##ib;QBN4?RC60vW$FP|e$L$1V5VQF3E~ zNF|HVt@qx1$3hJh31RHgiZP@ZLe1fbC$9M7hXddX3e_+!`Q(%*9uo=7gh7TI$e04s d=b(rFkw_$zE|4Bqbn?*Zthc^;L=y!B06QOF$F2YX diff --git a/upload/style_images/1/p_msn.gif b/upload/style_images/1/p_msn.gif index c1ba768538b0569d07e16a188ce8901c430cdf8d..be5347d0342e66b61f10f462e6013a86944b0291 100644 GIT binary patch delta 1083 zcmV-B1jPHD3Z4poM@dFFIbkCJ6#(}D0OacOSb)H5p5JAa)?kdyFIAIhn%Z56$YYVw z-sSFEgv8U^=0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#(neZ0WU-UljX|NsA!F#^Vu4FeT_BP3YhV3)yz2oow)=wLwt zfggBDoJg^v#fuX^4CIBYqsNaRLyGjsiy*IDC{wCj$+BfiUIlsGnn|;!&6_xB@-oOv zm(QO-g9;t`bLTEz0FnZz)Ib1;9H(Fjfa56#2mt~bG|dX2X@f^fjq)l$wm_pKy-xga z1f>@wOFK?~^y;-^#atk!?A9?;R;+=)23)j2)k}qnUKmN&rC8ZaK z7&urN7i3#(fad{5UARE&0wqz?50TjLs+W&4y*BuN`UoFh2z0Rn(hq22CBqO8y_`&e z5lPJ&G`%w9$xq@9{0xPtx6>lL5MUqyA@ni<552(9$|b#oFhLuMD45^`pD?H(83*pv zLlvtqAfgDpP{7Fy6m(%iFCxs)iw7o9K_Ufi^g%(1n25;0PFcjlhXO#(B7q@e$l`@2 zU`U{T$Q%*`LWe4PNRR>^naCk!5kM-i6Ba?Z!UO~mjPODQTAXpm2!x~(${vh>Qb8JG zR?tBQ6%ZjOm=Np~fen+eVauO@1}f;FgxUhr12+sJ$rpZXQp=-|Mk?u~l9u!UA~)DT diV}8UDF^@n diff --git a/upload/style_images/1/p_offline.gif b/upload/style_images/1/p_offline.gif index c1d2851297591f39622af0cba1f1721a528839b2..82978f0b8a94a4c7950702138eb28c3724b16ed2 100644 GIT binary patch delta 689 zcmV;i0#5yq2CoKxM@dFFIbkCJ6#(V{0Ndj0+TiKa+T+#S<>2P;)Z65=o~O;&=+D~e zw4bQa-0REM=g`~h-Q(=m+~u&Cq2TB6+~e%tfGY%xu&nz-R98E*38%E&C1iu*XOK~o2ZMFrL47o(9G4;+T+j8*VWtPl$)iN zou{U*ySKi_rmwus#?Q^v-O^55p~ z;^^_w*Wlt5>GIOp;o;}-q=b#x;OWZN=8>48k>PujjR6&Z3K$;!zCNk|wDCj}lzR7f5UNvIUj%f?m(;o>PtG!IigI}{ihQ|>kZ?(RVj;sxIW z`T9vAQx-&j7N!URU|@=g2`C~=d0-+0jw1R7d`m*HVgL&lmQY!8!GM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P@fuY=8S;Vs|^5X-P#~403mAtWoknLY4GQnl`Opm18&TBZ{7uEI{zg2tM902pNB<_-G6iLHL*>1gu$b5)2p9~6fd(&&^uYt^CABEtuK$jFjj6*cnTr)%x1q1*)-r10d diff --git a/upload/style_images/1/p_quote.gif b/upload/style_images/1/p_quote.gif index e01d2331fb6cd3fe09b119521437b1422441a620..1ef40be2aef56a47c75a57d2e9579fcd9249be57 100644 GIT binary patch delta 1392 zcmV-$1&{j14eSelM@dFFIbl8k6#(}D0C1+~ZldFBp5JJi+GUm2W0BEdjLlkv#9fHU zSb)GgXr?b!lSpl>%h%_|(&NI;;4@p9|L&^E)8xt2<hH)5bXXQay2<~nAi&)Vv1 zpy6SZ)j4FM$kO9!g|lFg&{u@RI$)n}jk`;7vdY%x%GT$9YlybU)8on1xD zTbVUnnn-rFKxd|5lGACN-E5%ZQ*D>y>G3~irDd1c`tg>}HqOIAESKSe8s}qgsi`MRKrRi_1lAtF67(*Wc@)vd>n3zg2|8 zc96P;nz_f*<5-2oRC=&IXr{~7<~LoML2ar-YNk(A(=;iOFM?)etglw#3*(Y^FPBrbu&tur5r0I$@n%eXnecxl41gIA5LD z;Os9{kUV6e!Oq`$jnATO3$pS=^@B$r^@B$r^@B$Q*4Fe5-J^&Q} z00{p8Gc<7U0Gh#r2oow?$gp9<2M!ttlo73>#fum-YTU@NqeU45qcs~zvZTqAC{wCj zNirJ2XwG8FoJq5$&6_xL%8XVp8nd53g9;r=w5ZXeK%*Iq_N=MXr%D2K!!qchgezAdD;6w&2r*(r2(@Zm&``UA1~3uBG>mw@&1l+@-X|ZyjP$Os4v|~4>-AHpA!C(W}u?I z|A#P5f*=XgAfShEX%e9IOiYtndn0MbLQwxhM>VR1z zO{6dZW)rNkqhu3sV&epVlrX|Z6VpU71r{`}IM@JCLP?7&F~&$olu=eN%>}$n14}9w zOjAJxzgQ5aA9x(0hn5#Gp-Lodl7R@8P%2eQGy>$Ar!iG}XGtP@>dC=0BpeZl4X2PW zjR=e~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VQ=5JXvxMCK)JFU03${KkW-nmiVg3wIeNEY#u^wk zoK1M=hl+sD?_!e%QsWbhcWY_@0WEujifyY~cdjgXfbruo06cgAAjWay7yg)vLl^|kF-L)6NNB?!VvsWogANYyAAXV%pyG;k z@CQI0E3T*sBbBW1j*XCLqstL1Nbyb{bZ`U0JAW;-@D2z=ws6H2Mj{#83rDo#3y(em z8Ka7l9iZiwSh$GAmRm+MiEOdCkVqLXxPZeuKY)=8Ht(>&!aE;)5N8uj%vt9&K4A$@Qx17 zjspv^6?hW_1Qk>OK@PE0@XiU^=AbOI&gu|{uL(RA0WZ}U;I6xeV5Zq2@4EX84Mu3N z!#iWBQblZBAc95)5R?!K4H;~*?-;>kK!3wK1!wTczwa1PLIy?zJaEC3)N8;~;B=CT z0wj~1go{a(OfoCEkTAFpiIqL z0K!MlIP1)ZA}TBJR3V_?63zl#FYv~qZ*Qj_MO*0?`FZ}QwiPXdH W9uzWxC{{e={PWN|6wyQh0RTIMDp%P6 diff --git a/upload/style_images/1/p_unpin.gif b/upload/style_images/1/p_unpin.gif index 18424d21459be3de15dfcf6c13696ff805e65e53..5660d2dd71d373a702247bd0a6e0960a49ae9caa 100644 GIT binary patch literal 1553 zcmd6m`#%#10KnIXC08CfkGw7CR2~x{+`Ns6@^)nNn#Z>0RX8znUWJ)w5La9gZte575Dw&`}6mguPe;O(h6w@Py&1f0FqjF0`UwSWdre; z8(P2$&K-#;6A?r35ILOHhr{4HlUs? za0DAj0?#Y0KkV@YG`=Oiakc$-VQ>)#S;jMhXL+K^nUgDixo@yd;=`k3XDp4uU5Ts` zSo!A_Hn9fT%RXr@!pf#!jtJ*OyXhtL8z_ofLVHBzyYH{xb;MBblGklxns27`#MCZA z<60oWH35ZeXkxm+V`vu0dN~MM z&!fOMhv}Ns5%Y8@zCq-X`qJycpbPeecTx)^uqv@-%ML|$h#>_PjNKy)h_?^1q( zT<3&#*W^wI4Am7!^-S-FW10{|o@+{XSaz33VrL5N)BW}XpY;A;`#z&<1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Of1W|(kH9!GG1G-N$z$IN!FopxrOaB7%TaXe(^fip%{PR9Q zkq!l0;PJxnR3+jG7O2>x|Niy_GC&~w3!nf8NWcOb@PGy+iWL0d3M?c*7vQ*u1Sd$r z3R>`j7|fssH@HEXOkshPI0iIUA(9fB@PsJ52uY^!!9)Op8@T8LL}p0C8rl#c5}`;y G0029@^ox}M diff --git a/upload/style_images/1/p_up.gif b/upload/style_images/1/p_up.gif index b4258c0bb71b294be38951e6d11d35aa24ed20de..ed9217faec33e26984e678460eae06590b3cc879 100644 GIT binary patch delta 1233 zcmV;?1TOox1^NnqM@dFFIbkvY6#(}D0Q1m0c9+YAuHuKW<#?LTf~($ur`vj+(M@lt zf27!apw(D+sm<8v^XaF)J^wZz+frrXEUA3#?090XN9-S*XPI5_=agxM>tKeRNven({ zSa_>pfw5zMg|}XNtY?R|h_mQwjlY?$&9=qcUVgFQ=kaNZxnzQ|qqfpvgtvsQ;$DHX zV1u-1jJ}Gr>Wa1Mg|X&#p3;P^;b4KXWQDl6#@%Cquw;n3bezx7+v|;^#$tiAPHv!M zgtu>wz%%+=Z>- zWrw+UoY11R(s`lOi?-{CwCMBp`i{Eqbd|`Axb1V3#)YZdn8EVI(cwB*hmrA|k^vZ# zjR6gRG5{3-00{p8Auw?8K$yXU2oow?$WY+}2Mh#y7)G(8#fum-YTP)?!@yy|LW&$o zvZTqAD1!|nI1HG}moQ_>oJq4Luwey<{o2X1r_Y~2g9`mM%;2zINRuX25=V*Br%K-FOc^6DkfgU7H2 z!+7-AOQ6(+U5F7oF+^$Ciauv3m_WS3L>fAT?;hC9SxAk)007qz!udd=Bo_YcvS2|= zi6(9A>`F4{uqacjUz9#@SAlQeFhGC?5PBF07{3ENxs+j7gebRmSyB|KM20KPBShGL zWu?|{-**#;{})eVIPu~%##bU`M#HWOh+Mt@q{n>)`&D*rc`;u6T>}6DNCFWEAaGuR zM34|5fN)H(O9yzM@gO9bIM{)Mh)p2HA`2RDR{wQiI|#DN4jerB z!7H-NL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hN^oVa-6UkM~Rf5#SOt*A^{Tg;JUlA*BBKm*GhawQ3VP$I%ISAMC15H95L zWthv1=|V44CaF{*$rK=G0Z~X1Ol(a)DMb`>&e;bjX(ocnGMl*Y2MZc31Hup_C_2R$ zh$_mcqkYP$)Ec79Lcpd3fN|%Op9TX4r=(tj!ZIT~qQo*v5Yhu1ep~6w@vSXAY0Svp?B0(-81mFe?5}W}<91?VKgSFUd z%dNM|5~~z1u;9^&0PN~e*1PZO!0x>4T0%nxA(UW724>7kqsvanss^du(agr@{vI-e*hu*1OWg5 z001li0000p015yA1*RY%j$~<`Xo?QW0I;suI1Mn@GHvU5eUHDNh*fAMimn-h=2-fg zOy|xCeNv@>qoP>YCIHRHk|B10$>Z|5j5deUOHo2WuPeTehkpNX^Y?y#ePDuv00(n+ z2?qcId3+86jgNqmj(?GpKA4gs1c`S9BMX!c3!jdA|TDjav^qr$>Z|5j5deUOA#VLuP45ahkpNX^Y?y#ePDuv5C(I0 z2nG-Vd3+85jgNqmj(?GpOqh}o00W740{{>W3X~2C4Wy=ksjH{1rLd|Zo^uGIBeH$2 sBD<)xue`y(y(6}{B(lc7rp&L;%fTc72csqp1=G6PC)wM+-6J6YJJ!r+VgLXD diff --git a/upload/style_images/1/rate2.gif b/upload/style_images/1/rate2.gif index 54b99b944c41412d096922b4971dd01ec72576e2..dc370d1c6ae01da19c0bd47c4c76419619e88c41 100644 GIT binary patch delta 170 zcmV;b09F6L0;mEEM@dFFIbkyZ3IN0ckql%?0RR9304x9i001)p3IG5FrJx{=WNDsg ziW-a|u&xNd?Wj14aOdK#<2ImA#vrtcHI`9XyCrarXU++g{-jZ$px7`Hx{U4D3l@>O zCr1K|e2)SEg@FzLm6wN_mWG)l1&w(HqNEI_A_$ib2qUbRudA)Ir==yMxFoTzCB3$^ YgTbe&xv3|t#I(x-$|}&&(kUSTJ4Pi%MgRZ+ delta 193 zcmV;y06zby0>1(bM@dFFIbkyZ3IN0akql%?0000004x9i001)p3IG5FydWfwWNDsg ziW-aov91We?Wi~kbm!u(<2ImA#vrtcHI`9XyCrarXU++g{-jYLq}VVLx{U4D3x<)p zCteVYe2)+Sg@FzLm6wN_mWG)k2L+9J1qTqLr3|MK3ka7E2n(*Tn6tI9xT2({sJwfu vzqy0E#Im#^uYbrTs;wl?!^*J6)XgNz)*}Z4)7;)C3j)a{-$kc@ke0s)7E3;~#$ ziJc+|k`4(YqkN{Kq^bf0nhXRZubZ+YsHG*it*dyvu7R;7w8AE%zpKas$0x70!^JAn J)6^#+06QalIv4-| delta 176 zcmZ3*w4aH`-P6s&GSQfUi{S{vM4l9N1`yBz5g;)J);$U;eJPpqGP<<-m^QBC*#Fkz z{Gx*r6DCfVdaPJ!PSylFDDvAu&04y6sR{#J2 diff --git a/upload/style_images/1/rate4.gif b/upload/style_images/1/rate4.gif index 3eb4a97e748605bbc52528bc6daef1f5696d1cd6..ad292424b396a2bab68048047f458eb91b8f6ae2 100644 GIT binary patch delta 169 zcmV;a09OCB0;U3xa83aL0000i00000GXM$z00pBUAdX~do@k0P4g;{R2*2$(&vK0e z0wVA}n?unW>WnO+D_K<1lt>`KhnW5V!v|5Jbzr&M?zao}X2V24k-ivE00DA!4grRU zd5ed5ij0wq27rSI1|tiN4hx%|pCX)jq5!0Go+AU7gaaj{swAkv&E|juP6m6%*)LxB_RMiBY{Gd delta 183 zcmV;o07(C)0<;2WnO+D_K<1lt>`KhnW5#!v|5Jbzr&M?zao}X2V2Ck-ivS5CL*^4grRU zd5ed5ij0wq27rSI1|kg$jSdS95S*T%qMdoAqo|<(1DAvY03)iOp_`|*v$&?0pMg|5(1|0?<0EscMG#Z@nT)o#KImzR}JeIn< zCVferlkT13oXfbq$Yye}@AL23(-|k0DA_eMNUpU@=Y9Fr`rW%_s?EC+4NjK-tf*>W rtP8KMZ4#|(7wK+pjOuSm@9CH*UOB08*5o-eXH1n^w0Mb_AcHjkzY;Zg delta 153 zcmcb@_=u6m-P6s&GSQfUi(xavL>?0p1`yBz5g;)JmVSYgo~!p-Bqwn^n#WRi*Q770 zbJD$2oO2ns7uifM_I>_6dpgI&5+xso7Rj}C>AWw$TEBa@Ot97Qu7Spbud%iD)lHQx zb#0AxLY+0;%~4G~4SmABlO{|RX`3;5*0id*&5P#r&t_aUZG|}NYO%E|d)5gFGFSru D#+y6T diff --git a/upload/style_images/1/t_addpoll.gif b/upload/style_images/1/t_addpoll.gif index 9643cc90a38375e7aa8be23f33c35ca2c1a02ec8..13a7f1078e208deba4033eda898bc8b32b53296e 100644 GIT binary patch delta 1902 zcmV-!2a)*B6ZZ~(M@dFFIbm4<8vyqJ06J!*6Eka5f58_yaxz($Qhd8SWTHA`qJ^Eq zc#^zimDRh*-CvK+ufNzpY^p(Pt3GI^T8hd`ceX!ks&c65T7<-1h{$G_*Z-NBVvo>Y zjLc+{)NrNdZldF9n%n>AnQNZk-{XQr*$ng7fHHejBAHC~^WqjW|-LJ>+@@$;K|hFJ7c0^mD}Fl z-aKZcQh>i!gTi5v(KA|@=kr?C$bDXr)hgx&|g;Scb%Vn85}oUqoxAE>)3nrsqX* zuV$Cnz02Tkjk{@wv{{G7ScJb%dAMPNwLogANp!JXiporKuuOKdu)*3+dA6Xk&&$%@ zLTaghYMtIYoOu0$=)?xoJMc1H(#7$ zmDp2$xJ-GtS%kw(dbv(}x>th1R)NMwZm1MCa2YyrGg_HefV@3srTF>!JZ7cx^!T#5 z#I(D`Kx(LLqU1qqsab@?HC>z5-s@$1pGI`EJ!qz6lG9j$!Bl&@Q+c>-nATQ)zJ<7x z`T`(-SpXXV00{p8{|Ou@aEp)-2oowyC}a!4hY%x5oJg^vMIrt&YTU?Ch{cZ}Ly8m_ z!rw=KAx5fPNf8Q*7BKqB?Dxf_MSovr>fFh*r_Y~2eZpwL!le?9{ubH9fMH@%q)?+u zol2Fel9&GSY2E5&X;X>*ylfpywyfE+Xw#;D^#{}6y|-||czrlxgg}2_;OgDWx3Ay7 zfC2l9>Cc|w!*b>ltb13^;m438OP)-*a%F!q{ngvd8I9tBjQ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xKSfBha}feOP(%@H6!A(Z zL%%$b7c?93G7bVXt+YT)!;AyXF~7Wq7yl#xN6RooC&Sp&Z1gP(8*wR+xaFeb&De0m z&B8x9=%Ggr|FD2J3oLy95dhxQRMUY0d-tt?1kB_R$}RsKQ_3WB=fF4Nc}LDg;dD>F z_cD#{fP4tx{DaBv{{VoD?9sWPzLsZ$ z3kpYuFu+MT>ep|-3qkzz0~%=j@J|r_8wddZw~7q(k03$F-wz}JjUPB58vi560RkA2 z{0(G+|HGgDB2Woq3;-MD_(v-~V87_3;DoHW#K_R53`=z3g|TP=Elx@-T=&!~hNh@refrzyl8;K_HMw0tpO&ib(9mKd@*;5)=`K zPbk1U+@XLMh(L;|s3B=0;SUqI(FA-@A=)m%hd0{sj(A)G6O=#(GAMxwgHVDPcCdpc z1d<6$aHAgwS;!^mQ3=*)Km(S51xLuE350Az6XL)~Lhhgdy!b~1Fu4Ow#sQHgc;p5g z!30`xV*?zRMLX;uK!Fb=^O>Xp z1S&+Zk7`!)4bFIjHMhylZhG^Z;0&iYxk(CDoPrGFOs8WCVG43+gB|>cr#$CL&wASP zp7_kCKKIEi&wbh@5yKb<0)F9@f*SOo2u)~5!19ko6ao;Ch=frlO3{j1^rApPic$gs F06V(hH3a|w diff --git a/upload/style_images/1/t_new.gif b/upload/style_images/1/t_new.gif index 0952e1865f6a9a98186449f8c487309717f1f9de..49f6ac595382c7db57844f212464ea176d04c15d 100644 GIT binary patch delta 1939 zcmV;E2WY@*~oW~De@n_P;^ zg`L7vfxvf?yJUKwRDQl)jmuEs^7Z*SWTH4? zplhGt+@=!-fxe*$<^h_)8s^LtNs1{%GTyvd#pKQpm3z+z0BcBZLegO)>3=Em8;D4 z_W1Jj`S0@eufW;<{{LNmvB=ZoXq($+mexXPq^`by*H3r4&DQ00rs-sq)LxFwmaWdb z%HO@q-%E0}HC&paw$m|Hkv3nQZ=~frW1?=2yJ3a4Ux~~3`TYC){AZflKxCdlX{dUZ zz*&gLN^i1Fb+`s6UulK2?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J2qij1z(_};Mil<=fi$N{&1zcn zn$!Hj8HOPOJGcQ5(zJpZ&hQ6uo&gYK2!qSEZa9M#xDX679Dxp80Kzp|F#lA^{D(~!VEW=hkV+VrM4&8bdz%F~|u^rtwD3@6Otk6b)J zA4pBAQkTj()TTQ1sZfooRHsVSrQ(GY1{jA41n`xvdiASd4J%i|@()sQ!V#ko#ZlJE Q*0#F!t!qunQUU@1J8xrEy8r+H diff --git a/upload/style_images/1/t_newimage.gif b/upload/style_images/1/t_newimage.gif index c8ad423f9d584c72a25b2065f00ed2643bfe17e9..2897b4b1226159daf441bb66a4b330a050346eda 100644 GIT binary patch delta 2101 zcmV-52+H@S5WEn7M@dFFIbm4<8vyqJ0LrP0#;T2GnAqK{i++B8HC~)td#%8zlSXi^ z^7Z*NT$`1w&FaXhL20HKIdSH~qW|KgqPElQ@ALK3wrQH%yvpC%x}!pFtwCz2{r&#> z)sKjx$1+)#lc>r?ZmB+Krq|%??aZw-O>S$R-`3viMsu=%dY8cKzl*!c-Z^BV?Z~P) zVxU!n!F8wVt-aMbVV+@;(bTex;dbmw=vT>&8 zY@p#-h{sKOxj$*AI%TACsOfN}=5C_nFjtj3XQo< fHU;OFyRkJMz7)Ml60Vvo?| z>G5BT%y4sgoIz`;|M0VRkh*K2;nb^z z=E9$U)3lnSx75I)i}JdM?XiQspo`?elxlyX?!l1n%#hZ$plF-iPjaZrqlaCL%f6$K z?%S#}TbW>v&OBqG>&mR_%&zg(kT_eG`q`h`t%v^Hmv5xy?8m5Llhe@G;!bD_Ij`_=t%hKLr zl+)X@ky3%cSc1X9yO_qembeL# z`T`(-SpXXV00{p8{|OXGK#!b*YZ5A4cuZ!repU00NJ#ws} zC!@)eC{fC(0nsFZ8gf#~oM|#c4>}V1A*%6jp3k2^f&Qz3sGrfJNRujE%CxD|q!Q@# zu!-ek4Szi$bb4ih0RtZ@tPmkGVctJ~S3|0QUCXwu+qWUH-1K*^ZVRmQARq}+s%x-Z zKCDbAd$vX0!-x|rUd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xPgD50SD}ZL>>O& z2OnT#1uLi^8kix4A~;ZlaDW3E{!xb|h!BM;{Kp1XxPe{dVFZ4ESV11J(Ft6za2XJ! zkQM)iNW>x<@rX!F02tCB3>kpo6qNwO1?0et4QyZuOGH8um6!%3AR!H4z{WSY7=M+0`SIDCt_sGXS`cV!L5P>cLpo2o{z!4QF!X56g zg+RVxkAM`x8{Qy)0$30N3y}nXBPj_10Ehqrawq}>bRdE|K%fX$kb({_xku_C;sBrE zhb(7F%Uas}Os6{6xz4%#BLhqpFa#oW0+o8&^Pc$3XFsGu J1C@XP06W#hFI)fs diff --git a/upload/style_images/1/t_options.gif b/upload/style_images/1/t_options.gif index 5ef65657a7b6409ced1229b98110b20579da91ea..9d0546467432e0b6441e1c2e9ce82f879bf5b8fd 100644 GIT binary patch delta 1917 zcmV-@2ZH#q4vY_fM@dFFIbm4<8vyqJ0B@w_NprC{VxX|X+d^)vufNzAIdU>tmnu<> zS%<|FGiyd~t!A0od6m9pm)2vG(_DsMdY?&cuS0CA zl&Z^HdaU*K`2PO?OLDbHb+o<9;BcnpUy#pfg|jtWn(y-UyUE^QfwMqrsr&o+J6Gb*Aaa)8k5SvIZt$L2avUjk}Yn%ZQ@KL~W~Kg|=Uf!)k}NPkFdNYpFVA zqj9F^nYrLwipgD#%s*(RWR=xIZK^|Us#%1@RDZreWS&xbwor4bB1C#$bC+qH-By6S z_xJaIScJbwbg|Ia;yYoUPI0GEdbw+fw^Dn)Q+>Q@f1)r|k~LS7FIkl`Q;$Mvq-&nu z$+#96gF^eq2d`jaZ`S{qqx;HTbDXtobvSfLvO7>Xr(}Er?R=kw7bPUW~5(> z%spqNe3`;+jJZ>Oz^%R2L2Id6iO5@u%2b2GJ!hno&H^WYA^8LV00000EC2ui09gPV z000R80RIUbD6kI_69^M3Oo*fp!G{ndN}NcsqD3VBGHTq&5sAf*AVZ22Xu{t|eL>Poh(*|TWVs#WU`roVe|C>oFr@q|JAHLVH$0(lY zZw&0)xO3~?&AWGR*8b=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`IWu#n- z%R6ME@$~qU<^m^w000000000000000000000000000000A^8LV00000EC2ui09gPV z000R80PhJLC@_f&1_%=>Oz0vB!G{ndN}NcsqD2?>GHTq&(S^m2AVZ22$iUu5dkjXZ zTuJdp1`rC>oFr@maz9=zAE!6=?+ z4-D+vxO3}&-p#vrZ`StM2_JsM^XI!qhAUsryt(t|(4hk-K)w2t*%IwNsm{H-_v(W5 zJpTwcfdGaE57MV^fW85S^AFg^hcDkfeGJusAK1VDnnpCAHFei0{1s^6f&0zE$r$&v zL5>>}MDS1qFWeKs1QFizf`l)0At8kpPSDJU6YvLroB}AKXwL^M&h~~QCd9Z17qz5l z?r|;cXkk{1TgUFXDf^p z`lpwFz$M_QqhN~pkO^DGGs8BJbn@t?oOYVPAjnYR#V}q_5rQlb+{1w{9NYszs}SV> zkVC2*&>BLjue!R6tFGqoC~yV@8*HQtcxKF2Ghk9jFTytK?6bi>5`q(37_fyCSinKS zJtP=F!aWpxOMwnLY)itn+}!gExZ?JKg&N?0>L4s|1=L$Fv9nP+Ln(7eV(-5I2W;;b zL4+^_IzxnDL^2iJb3p+Y+*3is704h%!xuCh1RxYgY=p!V%U~~X1C(5HFkspf%R|!G z!%P`#m@M*6YptaV{Xrv2ATufq%C|j3p_St4v^F=1u+;fN+v=DQ`JsSwH!96G3{g4oIfBzHB z-FXWn#4&&yvNdo4B%b(+EsEf{JAd!eE4m@K95`L`U015%1;J^w} zIH0=f_ppMB1L=TcI_jz`v&rmuD1KRg5B31yyYKk^F8uJs7jL{Upm>wY4mJc}MGGph z000Xrv|z&yIArh2J%s=R%_)&kZ~YF_gtCnIR{VY$6n|VY&-?Q%q0tiX*Khy*_~)aKQ;g4yFif zpvE0EL5~ue@PsH#p$b>X!WO#lg(qxF7!+}fRe0hmILx6AcX*Yo+#?J{XaW=tdJvQ% P8u5roJmOG_5)c48!cvh6 diff --git a/upload/style_images/1/t_poll.gif b/upload/style_images/1/t_poll.gif index a0b0aae186b9280bc53a1bb7d7416657d2628207..f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v zfeKV;LLhzsfFqL7g)MA@5}i~42(}T*LZl)Uh4{w`g1G`d$U+t)aKsq@0RTmeU;)a6 zB_;;>9V}S$n$3{M8@9>KZH}WE*9@mPvCsuZIA8@}07DeKfq^1`VFlapfC(-Tig!8y z4F5={KJzL6jw!St3Sj8K9!3BLDU47G>0Ch(mT(R%K!6eIzyTO=-~dJ(0SuU^945f9 zfQ^penl%^!EYb;!3(R6151>FgLy?MWvIZFbxPnY)O4FL!^rke$0v{&PgbZu}0?u#& zIWoY8F6eX;LRf_f2=Na>AmOP@CB#pmu!j(g0}GIFK@DUegBl>9r{36u3}lK06RbiA zli&kZL-11wY#{`Ecq=4kDub#DK?ose0Tk*Q0wFZPpEG66DK>zOeHiwzh)t|w7t7ej zCe{!yFvMXYD_O@{_Oh78ENgBNjSlGJv!D&FXh%!h(wbJZ5U2qJK%3gtp7yn{jcsfx z(~4(7_~Qs9;D>H^%iG@i_P4+du5gD-+~OLSxO(|V3EIJf4S?mj(2cHir`r{=2&5Ia WI0Z10!rktA_q*Wb?oyf(5CA(%R+Gs9 diff --git a/upload/style_images/1/t_qr.gif b/upload/style_images/1/t_qr.gif index aea5c244f903e526782c8035122f5c32865ae22a..ff9859952d145147bfb2a9539b4bad188fa2cc19 100644 GIT binary patch delta 1964 zcmV;d2UGZt60{G0M@dFFIbm4<8vyqJ05@KoJY=FoY^5kphDC6$L1&_qsmr{|-(Qc; zVS=<)fWAj?uS0IFD^id+VxV1pu0d+3W|-JfdACGut7LkgIANYyhsGBuEsIb@Q>HC~hkjQ_W1exJ7c2C)#l07<;c_H-rn9!cC~4Tv}=jC z%GTz}*5_`2jl1aW_Ev+!ptI2N^!QI-is_xC$xqdR7$U5Uw4ez;J7%O_jmtY{rE8zx3N2}8n%b?s)~>$Sp|sI*r|4pp*hX%sRf51yai>9V zuUmSoWtP@um)2#M*AzBz89H%EbFt9Z;_~(R`1$&&&G=Y>!Bl&@Q+c>-nATQ)zJ<7x z`T`(-SpXXV00{p8{|Ou@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^gG|^}01)DY(un}0yn+onBK#7X6|-3J;D{ua zXyS?V$lwSAj>v%GizPOQ#*7j6RDuFU2+$1+tF)30D(`F(+BRSSFyoOkPQXAKX@pQi z1WYm+fgWfqU_=@b)T0NKR3t+MmRm*%CX^A(7-pGAHn_r?2-s!K69K?L$`s+yu!{)p z2oRb)o@}t@pDRFtL=Xar5`r8N$+5r+MqKg_6%{Oi=mi%bs^|rYRxs(BlKyi6pbf4e zDlT@_a?J}Oz%a!*sk{=500D&mh71l>h-xbWd;GHu5=iWk!yW(Zk?S1`xS-BImjpq? z0>A=t!xH}x3&=mG4EyUpfQZU0wzjU(pc~+3U>7H}_|OVG0)QfbCYn6)O=uqAkOjE( zMvwp|l(rK=1aJKF!w>(wvA_iV_Pfpk{r>O|kZ=giAnY%_ZZz1&#u@Mw z)W<&!H4Y9~Y-}K#?u|QWYS9>3}DIASU)g>0SjPlf&ohq!N5OxR57+Mef*O^19|*o%s)|( zokiMxjGYG*ZTFGDKYg_S%>dSFG#JC+WQ^q2SsXnx00M(I-asHTupveyku;D(APo@l zPaRmi9T5?A{1b>Tn%9wq3UHTRLFh!3&U)i9H0Z$WPLN?c8GPiP`vwL;(@6;w1W&;; zqHHkx@ilz#j~5@Pph6=5(1FDR(SQAqAP>;-&j;H7lMeNC2$Dz&&i~VdAlj>-JuKQk zaJ&Nznj!!E^v@3f7+(;e|NdVTS^pLd_&^E-Vh1lYAp|Fo!awYQh#90H2|PH4`Rrgm zC@9blkeCQ0DEN;Q*ntQXlmh)4bcPa|@PsDJ001(;gG#ut5TdJVOk$A&En1;RIVSLm9dN$1$AX1m!5h7_{(49Vo*LbaVkF{(%S= zxBwCVpo9w!AqgGGq6=F%K^Mr_oJJg=82ZShCO65+PI~f_pbTXuQD6c@SR#{_K!gcU zAWD5SXAqyLz&>V4%Uas - - - -Ошибка русской версии Invision Power Board - -

    Ошибка русской версии Invision Power Board

    -Вы попали на несуществующую страницу!
    Пожалуйста нажмите на кнопочку «Назад» в вашем браузере для возвращения на предыдущую страницу.
    - - \ No newline at end of file + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/upgrade/core/actions/done.php b/upload/upgrade/core/actions/done.php index 82784bf0..cacf3e65 100644 --- a/upload/upgrade/core/actions/done.php +++ b/upload/upgrade/core/actions/done.php @@ -1,30 +1,4 @@ install->ipsclass->input['mysql_codepage']) AND $this->install->ipsclass->input['mysql_codepage'] != 'none' ) - { - $this->install->saved_data['mysql_codepage'] = $this->install->ipsclass->input['mysql_codepage']; - } - /* Page Output */ $this->install->template->append( $this->install->template->eula_page( nl2br($this->install->product_license) ) ); $this->install->template->next_action = '?p=install'; diff --git a/upload/upgrade/core/actions/index.html b/upload/upgrade/core/actions/index.html new file mode 100644 index 00000000..b49fc27d --- /dev/null +++ b/upload/upgrade/core/actions/index.html @@ -0,0 +1 @@ + Invision Power Board - Bulletin Board System

    403: Invision Power Board -> Forbidden


    You have reached this Page in error, please use your back button to return to Invision Board.
    Invision Power Board \ No newline at end of file diff --git a/upload/upgrade/core/actions/install.php b/upload/upgrade/core/actions/install.php index df868262..5f5e609b 100644 --- a/upload/upgrade/core/actions/install.php +++ b/upload/upgrade/core/actions/install.php @@ -1,30 +1,4 @@ install->saved_data['helpfile'] = intval($this->install->ipsclass->input['helpfile']) ? intval($this->install->ipsclass->input['helpfile']) : $this->install->saved_data['helpfile']; $this->install->saved_data['man'] = intval($this->install->ipsclass->input['man']) ? intval($this->install->ipsclass->input['man']) : $this->install->saved_data['man']; - if ( isset($this->install->saved_data['mysql_codepage']) AND !isset($this->install->ipsclass->vars['mysql_codepage']) ) { - $this->install->ipsclass->DB->obj['mysql_codepage'] = $this->install->saved_data['mysql_codepage']; - } - /* Switch */ switch( $this->install->ipsclass->input['sub'] ) { @@ -144,11 +113,6 @@ class action_install */ function install_sql() { - if ( $this->install->saved_data['mysql_codepage'] AND !isset($this->install->ipsclass->vars['mysql_codepage']) ) - { - $output = $this->install->write_codepage_configuration(); - } - if ( $this->install->current_upgrade AND $this->install->current_upgrade < 20000 ) { // Jump right to the finish routine for 1.x @@ -169,14 +133,6 @@ class action_install require_once ( INS_ROOT_PATH.'installfiles/upg_'.$this->install->current_upgrade.'/'.strtolower($this->install->ipsclass->vars['sql_driver']).'_updates.php' ); } - if ( file_exists( INS_ROOT_PATH.'sql/'.$this->install->ipsclass->vars['sql_driver'].'_install.php' ) ) - { - require_once( INS_ROOT_PATH.'sql/'.$this->install->ipsclass->vars['sql_driver'].'_install.php' ); - - $extra_install = new install_extra(); - $extra_install->ipsclass =& $this->install->ipsclass; - } - // Create/Alter tables if ( count( $SQL ) > 0 ) { @@ -191,15 +147,11 @@ class action_install $q = str_replace( "<%time%>", time(), $q ); - if ( preg_match("/CREATE TABLE (\S+) \(/", $q) ) + if( $this->install->ipsclass->vars['mysql_tbl_type'] ) { - //----------------------------------- - // Pass to handler - //----------------------------------- - - if ( $extra_install AND method_exists( $extra_install, 'process_query_create' ) ) + if( preg_match( "/^create table(.+?)/i", $q ) ) { - $q = $extra_install->process_query_create( $q ); + $q = preg_replace( "/^(.+?)\);$/is", "\\1) TYPE={$this->install->ipsclass->vars['mysql_tbl_type']};", $q ); } } @@ -222,7 +174,7 @@ class action_install } } - $message[] = "Выполнено $this->sqlcount запросов..."; + $message[] = $this->sqlcount." queries run..."; } else { @@ -235,11 +187,11 @@ class action_install if ( count( $this->install->error ) > 0 ) { - $this->install->message = count($message) ? implode( "
    ", $message ) : "Продолжаем обновление"; + $this->install->message = count($message) ? implode( "
    ", $message ) : "Proceeding with update"; $this->install->template->warning( array_merge( array( $this->install->message ), - array( 'Проблемы при обновлении до '.$this->install->versions[ $this->install->current_upgrade ]. ' (' . $this->install->current_upgrade . ')' ), - array( "Ошибок: ".count($this->install->error).'' ), + array( 'Error in upgrade '.$this->install->versions[ $this->install->current_upgrade ]. ' (' . $this->install->current_upgrade . ')' ), + array( "".count($this->install->error).' errors found' ), $this->install->error ) ); $this->install->template->in_error = 1; @@ -250,14 +202,14 @@ class action_install if( $this->install->saved_data['man'] AND $output ) { - $output = "

    Для продолжения обновления необходимо выполнить следующие MySQL запросы:


    ".nl2br(htmlspecialchars($output)).'
    '; + $output = "

    Please run these queries in your MySQL database before continuing..


    ".nl2br(htmlspecialchars($output)); $this->install->template->next_action = '?p=install&sub=finish'; $this->install->template->append( $output ); } else { - $output[] = count($message) ? implode( "
    ", $message ) : "Нет запросов, настроек для импортирования...

    Продолжаем обновление"; + $output[] = count($message) ? implode( "
    ", $message ) : "No queries, settings, or permissions to import...

    Proceeding with update"; $this->install->template->next_action = '?p=install&sub=finish'; $this->install->template->append( $this->install->template->install_page_refresh( $output ) ); $this->install->template->hide_next = 1; @@ -304,7 +256,7 @@ class action_install // Run it //------------------------------- - $settings->settings_do_import( 1, 1 ); + $settings->settings_do_import( 1 ); $message[] = $this->install->ipsclass->main_msg; @@ -320,11 +272,11 @@ class action_install if ( count( $this->install->error ) > 0 ) { - $this->install->message = count($message) ? implode( "
    ", $message ) : "Продолжаем обновление"; + $this->install->message = count($message) ? implode( "
    ", $message ) : "Proceeding with update"; $this->install->template->warning( array_merge( array( $this->install->message ), - array( 'Проблемы при обновлении до '.$this->install->versions[ $this->install->current_upgrade ]. ' (' . $this->install->current_upgrade . ')' ), - array( "Ошибок: ".count($this->install->error).'' ), + array( 'Error in upgrade '.$this->install->versions[ $this->install->current_upgrade ]. ' (' . $this->install->current_upgrade . ')' ), + array( "".count($this->install->error).' errors found' ), $this->install->error ) ); $this->install->template->in_error = 1; @@ -333,7 +285,7 @@ class action_install return; } - $output[] = count($message) ? implode( "
    ", $message ) : "Нет настроек для импортирования...

    Продолжаем обновление"; + $output[] = count($message) ? implode( "
    ", $message ) : "No settings to import...

    Proceeding with update"; $this->install->template->next_action = '?p=install&sub=acpperms'; $this->install->template->append( $this->install->template->install_page_refresh( $output ) ); $this->install->template->hide_next = 1; @@ -372,7 +324,7 @@ class action_install $api->add_task(); - $message[] = $api->error ? "Не удалось обновить список задач планировщика. Воспользуйтесь интсрументом обновления задач в АЦ." : "Обновление списка задач планировщика..."; + $message[] = $api->error ? "Could not rebuild tasks. Please rebuild tasks in the ACP from the Task Manager page" : "Rebuilt Tasks from XML..."; //------------------------------- // Load module... @@ -399,7 +351,7 @@ class action_install //----------------------------------------- // Install FAQ //----------------------------------------- - $message[] = "Обновление разделов помощи..."; + $message[] = "Updating FAQ information..."; $xml = new class_xml(); $xml->lite_parser = 1; @@ -443,13 +395,81 @@ class action_install } } + //----------------------------------------- + // XML: Help Information + //----------------------------------------- + + $message[] = "Inserting ACP help files..."; + + $keys = array(); + + $this->install->ipsclass->DB->build_query( array( 'select' => 'page_key', 'from' => 'acp_help' ) ); + $this->install->ipsclass->DB->exec_query(); + + while( $r = $this->install->ipsclass->DB->fetch_row() ) + { + $keys[] = $r['page_key']; + } + + $xml = new class_xml(); + $xml->lite_parser = 1; + + $content = implode( "", file( ROOT_PATH . 'resources/help_sections.xml' ) ); + $xml->xml_parse_document( $content ); + + foreach( $xml->xml_array['helpsectionsexport']['helpsectionsgroup']['helpsections'] as $id => $entry ) + { + $newrow = array( + 'is_setting' => 0, + 'page_key' => $entry['key']['VALUE'], + 'help_title' => $entry['title']['VALUE'], + 'help_body' => $entry['helptext']['VALUE'], + ); + + if( in_array( $newrow['page_key'], $keys ) ) + { + $this->install->ipsclass->DB->do_update( 'acp_help', $newrow, "page_key='{$newrow['page_key']}'" ); + } + else + { + $this->install->ipsclass->DB->do_insert( 'acp_help', $newrow ); + } + } + + $xml = new class_xml(); + $xml->lite_parser = 1; + + $content = implode( "", file( ROOT_PATH . 'resources/help_settings.xml' ) ); + $xml->xml_parse_document( $content ); + + foreach( $xml->xml_array['helpsettingsexport']['helpsettingsgroup']['helpsettings'] as $id => $entry ) + { + $newrow = array( + 'is_setting' => 1, + 'page_key' => $entry['key']['VALUE'], + 'help_title' => $entry['title']['VALUE'], + 'help_body' => $entry['helptext']['VALUE'], + 'help_mouseover'=> $entry['mouseover']['VALUE'], + ); + + if( in_array( $newrow['page_key'], $keys ) ) + { + $this->install->ipsclass->DB->do_update( 'acp_help', $newrow, "page_key='{$newrow['page_key']}'" ); + } + else + { + $this->install->ipsclass->DB->do_insert( 'acp_help', $newrow ); + } + } + + if ( count( $this->install->error ) > 0 ) { - $this->install->message = count($message) ? implode( "
    ", $message ) : "Продолжаем обновление"; + $this->install->message = count($message) ? implode( "
    ", $message ) : "Proceeding with update"; $this->install->template->warning( array_merge( array( $this->install->message ), - array( 'Проблемы при обновлении до '.$this->install->versions[ $this->install->current_upgrade ]. ' (' . $this->install->current_upgrade . ')' ), - array( "Ошибок: ".count($this->install->error).'' ), + array( 'Error in upgrade '.$this->install->versions[ $this->install->current_upgrade ]. ' (' . $this->install->current_upgrade . ')' ), + array( "".count($this->install->error).' errors found' ), $this->install->error ) ); $this->install->template->in_error = 1; @@ -475,28 +495,28 @@ class action_install { $continue = 0; - $upg_file = INS_ROOT_PATH.'installfiles/upg_'.$this->install->current_upgrade.'/version_upgrade.php'; + if ( $this->install->current_upgrade < 20000 ) + { + $driver = $this->install->ipsclass->vars['sql_driver'] ? trim(strtolower($this->install->ipsclass->vars['sql_driver'])) : 'mysql'; + + $upg_file = INS_ROOT_PATH.'installfiles/upg_'.$this->install->current_upgrade.'/version_upgrade_' . $driver . '.php'; + } + else + { + $upg_file = INS_ROOT_PATH.'installfiles/upg_'.$this->install->current_upgrade.'/version_upgrade.php'; + } if ( file_exists( $upg_file ) ) { require_once( $upg_file ); - - if ( file_exists( INS_ROOT_PATH.'sql/'.$this->install->ipsclass->vars['sql_driver'].'_install.php' ) ) - { - require_once( INS_ROOT_PATH.'sql/'.$this->install->ipsclass->vars['sql_driver'].'_install.php' ); - - $this->install->extra_install = new install_extra(); - $this->install->extra_install->ipsclass =& $this->install->ipsclass; - } - $upgrade = new version_upgrade( $this->install ); $result = $upgrade->auto_run(); if ( count( $this->install->error ) > 0 ) { $this->install->template->warning( array_merge( array( $this->install->message ), - array( 'Проблемы при обновлении до '.$this->install->versions[ $this->install->current_upgrade ]. ' (' . $this->install->current_upgrade . ')' ), - array( "Ошибок: ".count($this->install->error).'' ), + array( 'Error in upgrade '.$this->install->versions[ $this->install->current_upgrade ]. ' (' . $this->install->current_upgrade . ')' ), + array( "".count($this->install->error).' errors found' ), $this->install->error ) ); $this->install->template->in_error = 1; @@ -550,7 +570,7 @@ class action_install $output[] = $this->install->message; } - $output[] = "Успешно завершено обновление до версии {$this->install->versions[ $this->install->current_upgrade ]}"; + $output[] = "Succesfully upgraded to version {$this->install->versions[ $this->install->current_upgrade ]}"; } else { @@ -565,7 +585,7 @@ class action_install } else { - $output[] = "Продолжаем обновление..."; + $output[] = "Proceeding with update..."; } $continue = 1; @@ -585,7 +605,7 @@ class action_install 'upgrade_mid' => $this->install->saved_data['mid'], ) ); - $output[] = "Успешно завершено обновление до версии {$this->install->versions[ $this->install->current_upgrade ]}"; + $output[] = "Succesfully upgraded to version {$this->install->versions[ $this->install->current_upgrade ]}"; } } @@ -650,25 +670,83 @@ class action_install //------------------------------- require_once( ROOT_PATH . "sources/lib/admin_skin.php" ); - $this->install->ipsclass->skin_acp = 'IPB2_Standard'; - $this->install->ipsclass->skin_acp_url = $this->install->ipsclass->vars['board_url']."/skin_acp/".$this->install->ipsclass->skin_acp; + $this->install->ipsclass->skin_acp = 'IPB2_Standard'; + $this->install->ipsclass->skin_acp_url = $this->install->ipsclass->vars['board_url'] . "/skin_acp/" . $this->install->ipsclass->skin_acp; $this->install->ipsclass->adskin = new admin_skin(); $this->install->ipsclass->adskin->ipsclass =& $this->install->ipsclass; $this->install->ipsclass->adskin->init_admin_skin(); + //----------------------------------------- + // Fixing something? + //----------------------------------------- + + $queries_to_run = array(); + + foreach( $this->install->ipsclass->input as $k => $v ) + { + if( preg_match( "/^query(\d+)$/", $k, $matches ) ) + { + $queries_to_run[] = $v; + } + } + + if( isset($this->install->ipsclass->input['query']) AND $this->install->ipsclass->input['query'] ) + { + $queries_to_run[] = $this->install->ipsclass->input['query']; + } + + if( count($queries_to_run) > 0 ) + { + foreach( $queries_to_run as $the_query ) + { + $sql = trim( urldecode( base64_decode($the_query) ) ); + + if ( preg_match( "/^(DROP|FLUSH)/i", trim($sql) ) ) + { + $this->install->ipsclass->main_msg = "Sorry, those queries are not allowed for your safety"; + + continue; + } + else if ( preg_match( "/^(DELETE|UPDATE|TRUNCATE)/i", preg_replace( "#\s{1,}#s", "", $sql ) ) and preg_match( "/admin_login_logs/i", preg_replace( "#\s{1,}#s", "", $sql ) ) ) + { + $this->install->ipsclass->main_msg = "Sorry, those queries are not allowed for your safety"; + + continue; + } + else + { + $this->install->ipsclass->DB->return_die = 1; + + $this->install->ipsclass->DB->query($sql,1); + + if( $this->install->ipsclass->DB->error != "" ) + { + $this->install->ipsclass->main_msg .= "SQL Error
    {$this->install->ipsclass->DB->error}
    "; + } + else + { + $this->install->ipsclass->main_msg .= "Query: ".htmlspecialchars($sql)."
    Executed Successfully
    "; + } + + $this->install->ipsclass->DB->error = ""; + $this->install->ipsclass->DB->failed = 0; + } + } + } + //------------------------------- // Load module... //------------------------------- + + require_once( KERNEL_PATH . 'db_lib/' . strtolower($this->install->ipsclass->vars['sql_driver']) . '_tools.php' ); + require_once( ROOT_PATH . 'install/sql/' . strtolower($this->install->ipsclass->vars['sql_driver']) . '_tables.php' ); - require_once( ROOT_PATH."sources/action_admin/sql_{$this->install->ipsclass->vars['sql_driver']}.php" ); - - $this->sql_driver = new ad_sql_module(); - $this->sql_driver->ipsclass =& $this->install->ipsclass; + $db_tools = new db_tools( $this->install->ipsclass ); $output = array(); - $output = $this->sql_driver->db_table_diag( 0 ); - + $output = $db_tools->db_table_diag( $TABLE ); +#print_r($output); $our_output = " @@ -169,7 +168,7 @@ echo <<
    -

    Инструмент обновления Invision Power Services

    +

    Welcome to the IPB Upgrader

    @@ -196,7 +195,7 @@ echo <<
    -

    Обновление {$this->product_name}

    +

    {$this->product_name} Upgrade

    @@ -211,7 +210,7 @@ echo <<
    - +
    @@ -222,19 +221,19 @@ if( ! $this->hide_next ) if( $this->next_action == 'disabled' ) { echo << + EOF; } else if( $this->in_error == 1 ) { echo << + EOF; } else { echo << + EOF; } } @@ -248,7 +247,7 @@ echo <<
    @@ -285,28 +284,28 @@ $output .= <<
    - Вас приветствует мастер обновления {$this->product_name}. Он поможет вам обновить установленный продукт до последней версии. + Welcome to the upgrade routine for {$this->product_name}. This wizard will guide you through the upgrade process.

    {$extra} -

    Обязательная проверка — авторизация

    - Для работы с мастером вам необходимо войти в систему под учетной записью с правами администратора.
    +

    Verification Required - Please Log In

    + You must log in with your forums administrative log in details to access the upgrade system.

    - - +
    Ваш + Your Forum EOF; if( $this->ipsclass->login_type == 'username' ) { $output .= <<
    Ваш пароль:Your Forum Password:
    @@ -335,13 +334,13 @@ return <<
    - Вас приветствует мастер обновления {$this->product_name}. Он поможет вам обновить установленный продукт до последней версии. + Welcome to the upgrader for {$this->product_name}. This wizard will guide you through the upgrade process.

    -

    Информация

    - Текущая версия: $current_version.
    - Мастер осуществит $summary
    +

    Upgrade summary

    + Current version: $current_version.
    + This script will: $summary

    EOF; @@ -364,7 +363,7 @@ check_eula = function() } else { - alert( 'Вы должны принять пользовательское соглашение, прежде чем продолжить обновление' ); + alert( 'You must agree to the license before continuing' ); return false; } } @@ -373,13 +372,13 @@ document.getElementById( 'install-form' ).onsubmit = check_eula; -Пожалуйста прочитайте и примите пользовательское соглашение.

    +Please read and agree to the End User License Agreement before continuing.

    $eula
    - Я принимаю + I agree to the license agreement EOF; @@ -395,15 +394,16 @@ EOF; $output = << -Мастер собрал все данные и готов начать обновление {$this->product_name}. Нажмите Запустить обновление для запуска автоматического процесса обновления продукта!

    +The upgrader is now ready to complete the upgrade of your {$this->product_name}. Click Start to +begin the automatic process!