<?php

$aPathInfo = pathinfo(__FILE__);
require_once ($aPathInfo['dirname'] . '/../../../inc/header.inc.php');

if ('7.1.0' != ($site['ver'] . '.' . $site['build']))
    die("Incorrect Dolphin version. This script can be run only for Dolphin 7.1.0\n");

$aFolders = array (
'doc',
'media/images/promo',
'modules/boonex/ads/templates/base/scripts',
'modules/boonex/ads/templates/tmpl_uni',
'modules/boonex/ads/updates',
'modules/boonex/articles/templates/tmpl_uni',
'modules/boonex/blogs/templates/tmpl_uni',
'modules/boonex/board/templates/tmpl_uni',
'modules/boonex/data_migration',
'modules/boonex/desktop/templates/tmpl_uni',
'modules/boonex/facebook_connect/js',
'modules/boonex/facebook_connect/templates/base/css',
'modules/boonex/facebook_connect/templates/base/images',
'modules/boonex/facebook_connect/templates/tmpl_uni',
'modules/boonex/feedback/templates/tmpl_uni',
'modules/boonex/files/templates/tmpl_uni',
'modules/boonex/map_profiles',
'modules/boonex/membership/templates/base/images',
'modules/boonex/membership/templates/tmpl_uni',
'modules/boonex/messenger/templates/base/images',
'modules/boonex/messenger/templates/tmpl_uni',
'modules/boonex/news/templates/tmpl_uni',
'modules/boonex/open_social',
'modules/boonex/pageac/templates/base/images/icons',
'modules/boonex/payment/templates/tmpl_uni',
'modules/boonex/photos/templates/tmpl_uni',
'modules/boonex/poll/templates/tmpl_uni',
'modules/boonex/profile_customize/templates/base/images',
'modules/boonex/profile_customize/templates/tmpl_uni',
'modules/boonex/profile_customize/updates',
'modules/boonex/shoutbox/templates/tmpl_uni',
'modules/boonex/simple_messenger/templates/tmpl_uni',
'modules/boonex/sites/js',
'modules/boonex/sites/templates/tmpl_uni',
'modules/boonex/sites/updates',
'modules/boonex/smtpmailer/templates',
'modules/boonex/sounds/templates/tmpl_uni',
'modules/boonex/spy/templates/base/images',
'modules/boonex/spy/templates/tmpl_uni',
'modules/boonex/videos/templates/tmpl_uni',
'modules/boonex/wall/templates/base/images',
'modules/boonex/wall/templates/tmpl_uni',
'modules/boonex/zipcodesearch/templates',
'plugins/cooliris',
'plugins/jquery/langs',
'plugins/tiny_mce/plugins/autosave/images',
'plugins/tiny_mce/plugins/media/img',
'plugins/tiny_mce/plugins/pagebreak/css',
'plugins/tiny_mce/plugins/pagebreak/img',
'plugins/tiny_mce/plugins/safari',
'plugins/tiny_mce/plugins/spellchecker/classes',
'plugins/tiny_mce/plugins/spellchecker/includes',
'simg',
);

$aFiles = array (
'404.html',
'administration/css_file.php',
'administration/js/page_builder_tiny.js',
'administration/manage_subscribers.php',
'administration/templates/base/boonex_promo.html',
'administration/templates/base/dashboard.html',
'administration/templates/base/dashboard_content.html',
'administration/templates/base/dashboard_content_cache.html',
'administration/templates/base/dashboard_content_info.html',
'administration/templates/base/images/admin_login_admin_logo.png',
'administration/templates/base/images/admin_login_button.png',
'administration/templates/base/images/admin_login_input.png',
'administration/templates/base/images/admin_login_input_long.png',
'administration/templates/base/images/block_item_in_bg.gif',
'administration/templates/base/images/bn_footer.png',
'administration/templates/base/images/bn_header.png',
'administration/templates/base/images/boonex-logo-footer.png',
'administration/templates/base/images/bottom_bord.gif',
'administration/templates/base/images/bx-promo-cont.png',
'administration/templates/base/images/bx-promo-head.png',
'administration/templates/base/images/bx-promo-tail.png',
'administration/templates/base/images/col_cont.gif',
'administration/templates/base/images/head_bg.gif',
'administration/templates/base/images/head_ti_left.gif',
'administration/templates/base/images/head_ti_right.gif',
'administration/templates/base/images/header_bg.png',
'administration/templates/base/images/icons/dashboard_admin.png',
'administration/templates/base/images/icons/dashboard_bx_400days.png',
'administration/templates/base/images/icons/dashboard_bx_90days.png',
'administration/templates/base/images/icons/dashboard_bx_premium.png',
'administration/templates/base/images/icons/dashboard_bx_prime.png',
'administration/templates/base/images/icons/dashboard_bx_unlim.png',
'administration/templates/base/images/icons/dashboard_cache.png',
'administration/templates/base/images/icons/dashboard_info.png',
'administration/templates/base/images/icons/dashboard_mails.png',
'administration/templates/base/images/icons/dashboard_users.png',
'administration/templates/base/images/icons/mm_builders.png',
'administration/templates/base/images/icons/mm_extensions.png',
'administration/templates/base/images/icons/mm_settings.png',
'administration/templates/base/images/icons/mm_tools.png',
'administration/templates/base/images/icons/mm_users.png',
'administration/templates/base/images/icons/mmi_admin_password.gif',
'administration/templates/base/images/icons/mmi_advanced_settings.gif',
'administration/templates/base/images/icons/mmi_antispam.png',
'administration/templates/base/images/icons/mmi_banners.gif',
'administration/templates/base/images/icons/mmi_basic_settings.gif',
'administration/templates/base/images/icons/mmi_categories_settings.gif',
'administration/templates/base/images/icons/mmi_css_styles.gif',
'administration/templates/base/images/icons/mmi_database_backup.gif',
'administration/templates/base/images/icons/mmi_database_prunning.gif',
'administration/templates/base/images/icons/mmi_email_templates.gif',
'administration/templates/base/images/icons/mmi_flash_apps.gif',
'administration/templates/base/images/icons/mmi_host_tools.gif',
'administration/templates/base/images/icons/mmi_ip_blacklist.gif',
'administration/templates/base/images/icons/mmi_languages_settings.gif',
'administration/templates/base/images/icons/mmi_mass_mailer.gif',
'administration/templates/base/images/icons/mmi_member_menu_builder.gif',
'administration/templates/base/images/icons/mmi_members.gif',
'administration/templates/base/images/icons/mmi_membership_levels.gif',
'administration/templates/base/images/icons/mmi_meta_tags.gif',
'administration/templates/base/images/icons/mmi_mobile_builder.png',
'administration/templates/base/images/icons/mmi_moderation_settings.gif',
'administration/templates/base/images/icons/mmi_modules.gif',
'administration/templates/base/images/icons/mmi_navigation_menu_builder.gif',
'administration/templates/base/images/icons/mmi_pages_blocks_builder.gif',
'administration/templates/base/images/icons/mmi_permalinks.gif',
'administration/templates/base/images/icons/mmi_predefined_values.gif',
'administration/templates/base/images/icons/mmi_privacy_settings.gif',
'administration/templates/base/images/icons/mmi_profile_fields_builder.gif',
'administration/templates/base/images/icons/mmi_tags_settings.gif',
'administration/templates/base/images/icons/mmi_watermark.png',
'administration/templates/base/images/icons/pm_qlinks_item.png',
'administration/templates/base/images/icons/tm_boonex_news.png',
'administration/templates/base/images/icons/tm_dashboard.png',
'administration/templates/base/images/icons/tm_docs.png',
'administration/templates/base/images/icons/tm_extensions.png',
'administration/templates/base/images/icons/tm_home.png',
'administration/templates/base/images/icons/tm_logout.png',
'administration/templates/base/images/icons/tm_menu_builder.png',
'administration/templates/base/images/mm_item_bg.png',
'administration/templates/base/images/swap.gif',
'administration/templates/base/images/swap_item_bg.gif',
'administration/templates/base/images/tab_active_bg.gif',
'administration/templates/base/images/tab_active_bg_r.gif',
'administration/templates/base/images/tab_bg.gif',
'administration/templates/base/images/title.png',
'administration/templates/base/images/tm_item_active_bg.png',
'administration/templates/base/images/top_head_bg.gif',
'administration/templates/base/images/unity_logo.png',
'administration/templates/base/popup_form_wrapper.html',
'administration/templates/base/promo.html',
'administration/templates/base/promo_images.html',
'administration/templates/base/top_block_select.html',
'inc/js/jquery.dolTopMenu.js',
'inc/js/pngfix.js',
'last_icon.txt',
'media/images/big_logo.png',
'modules/boonex/ads/ads_get_member_menu_list.php',
'modules/boonex/ads/templates/base/add_manage_popup.html',
'modules/boonex/ads/templates/base/images/icons/action_block.png',
'modules/boonex/ads/templates/base/images/icons/action_send.png',
'modules/boonex/ads/templates/base/images/icons/back.png',
'modules/boonex/ads/templates/base/images/icons/bx_aboutus.png',
'modules/boonex/ads/templates/base/images/icons/bx_ads.png',
'modules/boonex/ads/templates/base/images/icons/bx_contactus.png',
'modules/boonex/ads/templates/base/images/icons/bx_groups.png',
'modules/boonex/ads/templates/base/images/icons/bx_music.png',
'modules/boonex/ads/templates/base/images/icons/bx_news.png',
'modules/boonex/ads/templates/base/images/icons/bx_privacy.png',
'modules/boonex/ads/templates/base/images/icons/bx_search.png',
'modules/boonex/ads/templates/base/images/icons/clock.png',
'modules/boonex/ads/templates/base/images/icons/cool.gif',
'modules/boonex/ads/templates/base/images/icons/edit.png',
'modules/boonex/ads/templates/base/images/icons/folder_small.png',
'modules/boonex/ads/templates/base/images/icons/group_no_pic.gif',
'modules/boonex/ads/templates/base/images/icons/left_arrow.gif',
'modules/boonex/ads/templates/base/images/icons/next.png',
'modules/boonex/ads/templates/base/images/icons/right_arrow.gif',
'modules/boonex/ads/templates/base/images/icons/rss.png',
'modules/boonex/ads/templates/base/images/icons/wall_post_icon.png',
'modules/boonex/ads/templates/base/unit_subject_block.html',
'modules/boonex/articles/templates/base/images/icons/action_subscribe.png',
'modules/boonex/articles/templates/base/images/icons/site_articles.png',
'modules/boonex/articles/templates/base/images/icons/top_menu_icon.png',
'modules/boonex/avatar/templates/base/images/icons/cross_circle_frame.png',
'modules/boonex/avatar/templates/base/images/icons/tick_circle_frame.png',
'modules/boonex/avatar/templates/base/images/icons/tick_circle_frame_couple.png',
'modules/boonex/avatar/templates/base/images/icons/wall_post_icon.png',
'modules/boonex/blogs/templates/base/images/icons/action_block.png',
'modules/boonex/blogs/templates/base/images/icons/action_fave.png',
'modules/boonex/blogs/templates/base/images/icons/action_report.png',
'modules/boonex/blogs/templates/base/images/icons/back.png',
'modules/boonex/blogs/templates/base/images/icons/blogpost.png',
'modules/boonex/blogs/templates/base/images/icons/bx_blogs.png',
'modules/boonex/blogs/templates/base/images/icons/categ_add.png',
'modules/boonex/blogs/templates/base/images/icons/clock.png',
'modules/boonex/blogs/templates/base/images/icons/comments.png',
'modules/boonex/blogs/templates/base/images/icons/description_edit.png',
'modules/boonex/blogs/templates/base/images/icons/folder_small.png',
'modules/boonex/blogs/templates/base/images/icons/next.png',
'modules/boonex/blogs/templates/base/images/icons/post_featured.png',
'modules/boonex/blogs/templates/base/images/icons/post_new.png',
'modules/boonex/blogs/templates/base/images/icons/rss.png',
'modules/boonex/blogs/templates/base/images/icons/tgs.png',
'modules/boonex/board/templates/base/images/icons/bx_boards.png',
'modules/boonex/events/templates/base/images/icons/action_block.png',
'modules/boonex/events/templates/base/images/icons/action_manage_fans.png',
'modules/boonex/events/templates/base/images/icons/action_share.png',
'modules/boonex/events/templates/base/images/icons/action_upload_files.png',
'modules/boonex/events/templates/base/images/icons/action_upload_photos.png',
'modules/boonex/events/templates/base/images/icons/action_upload_sounds.png',
'modules/boonex/events/templates/base/images/icons/action_upload_videos.png',
'modules/boonex/events/templates/base/images/icons/bx_events.png',
'modules/boonex/events/templates/base/images/icons/calendar_add.png',
'modules/boonex/events/templates/base/images/icons/edit.png',
'modules/boonex/events/templates/base/images/icons/group_add.png',
'modules/boonex/events/templates/base/images/icons/key.png',
'modules/boonex/events/templates/base/images/icons/participant.png',
'modules/boonex/events/templates/base/images/icons/user_add.png',
'modules/boonex/events/templates/base/images/icons/wall_post_icon.png',
'modules/boonex/feedback/templates/base/images/icons/action_subscribe.png',
'modules/boonex/feedback/templates/base/images/icons/top_menu_icon.png',
'modules/boonex/files/templates/base/images/icons/bx_files.png',
'modules/boonex/files/templates/base/images/icons/folder.png',
'modules/boonex/files/templates/base/images/icons/member_menu_sub.png',
'modules/boonex/files/templates/base/images/icons/shf.png',
'modules/boonex/files/templates/base/images/icons/wall_post_icon.png',
'modules/boonex/files/templates/base/sites_set_box.html',
'modules/boonex/forum/layout/base/icons/admin.gif',
'modules/boonex/forum/layout/base/icons/basic.gif',
'modules/boonex/forum/layout/base/icons/special.gif',
'modules/boonex/forum/layout/base/img/a.gif',
'modules/boonex/forum/layout/base/img/author_bg.gif',
'modules/boonex/forum/layout/base/img/btn_icon_cancel.gif',
'modules/boonex/forum/layout/base/img/btn_icon_down.gif',
'modules/boonex/forum/layout/base/img/btn_icon_submit.gif',
'modules/boonex/forum/layout/base/img/btn_icon_up.gif',
'modules/boonex/forum/layout/base/img/button_bg.gif',
'modules/boonex/forum/layout/base/img/colexp.png',
'modules/boonex/forum/layout/base/img/colexp2.gif',
'modules/boonex/forum/layout/base/img/forum.png',
'modules/boonex/forum/layout/base/img/forum_new.gif',
'modules/boonex/forum/layout/base/img/gr.png',
'modules/boonex/forum/layout/base/img/header_bg.gif',
'modules/boonex/forum/layout/base/img/input_bg.gif',
'modules/boonex/forum/layout/base/img/live_bg.gif',
'modules/boonex/forum/layout/base/img/live_top.gif',
'modules/boonex/forum/layout/base/img/loading_bg.gif',
'modules/boonex/forum/layout/base/img/report.png',
'modules/boonex/forum/layout/base/img/report_gray.png',
'modules/boonex/forum/layout/base/img/stranger.png',
'modules/boonex/forum/layout/base/img/sys_pgt_first.png',
'modules/boonex/forum/layout/base/img/sys_pgt_last.png',
'modules/boonex/forum/layout/base/img/sys_pgt_next.png',
'modules/boonex/forum/layout/base/img/sys_pgt_prev.png',
'modules/boonex/forum/layout/base/img/top_bg.gif',
'modules/boonex/forum/layout/base/img/topic.png',
'modules/boonex/forum/layout/base/img/topic_bg.gif',
'modules/boonex/forum/layout/base/img/topic_lock.png',
'modules/boonex/forum/layout/base/img/topic_lock_new.png',
'modules/boonex/forum/layout/base/img/topic_new.png',
'modules/boonex/forum/layout/base/img/topic_sticky.png',
'modules/boonex/forum/layout/base/img/topic_sticky_new.png',
'modules/boonex/forum/layout/base/img/vote_good.png',
'modules/boonex/forum/layout/base/img/vote_good_gray.png',
'modules/boonex/forum/member_menu.php',
'modules/boonex/forum/templates/base/images/icons/bx_forums.png',
'modules/boonex/forum/templates/base/images/icons/orca.gif',
'modules/boonex/groups/templates/base/images/icons/action_add_to_featured.png',
'modules/boonex/groups/templates/base/images/icons/action_block.png',
'modules/boonex/groups/templates/base/images/icons/action_manage_fans.png',
'modules/boonex/groups/templates/base/images/icons/action_share.png',
'modules/boonex/groups/templates/base/images/icons/action_upload_files.png',
'modules/boonex/groups/templates/base/images/icons/action_upload_photos.png',
'modules/boonex/groups/templates/base/images/icons/action_upload_sounds.png',
'modules/boonex/groups/templates/base/images/icons/action_upload_videos.png',
'modules/boonex/groups/templates/base/images/icons/bx_groups.png',
'modules/boonex/groups/templates/base/images/icons/edit.png',
'modules/boonex/groups/templates/base/images/icons/group_add.png',
'modules/boonex/groups/templates/base/images/icons/group_create.png',
'modules/boonex/groups/templates/base/images/icons/key.png',
'modules/boonex/groups/templates/base/images/icons/user_add.png',
'modules/boonex/groups/templates/base/images/icons/wall_post_icon.png',
'modules/boonex/groups/templates/base/pending_approval_plank.html',
'modules/boonex/news/templates/base/images/icons/action_subscribe.png',
'modules/boonex/news/templates/base/images/icons/site_news.gif',
'modules/boonex/news/templates/base/images/icons/top_menu_icon.png',
'modules/boonex/pageac/js/ui.tabs.js',
'modules/boonex/pageac/templates/base/images/tabs.png',
'modules/boonex/payment/templates/base/images/close.gif',
'modules/boonex/payment/templates/base/images/icons/add_to_cart.png',
'modules/boonex/payment/templates/base/images/icons/amenu_item.gif',
'modules/boonex/payment/templates/base/images/icons/tbar_item_cart.png',
'modules/boonex/photos/templates/base/album_preview.html',
'modules/boonex/photos/templates/base/images/icons/bx_pictures.png',
'modules/boonex/photos/templates/base/images/icons/member_menu_sub.png',
'modules/boonex/photos/templates/base/images/icons/phs.png',
'modules/boonex/photos/templates/base/images/icons/wall_post_icon.png',
'modules/boonex/photos/templates/base/rate_object.html',
'modules/boonex/photos/templates/base/sites_set_box.html',
'modules/boonex/photos/templates/base/wall_post.html',
'modules/boonex/photos/templates/base/wall_post_private.html',
'modules/boonex/poll/templates/base/images/icons/b_side.png',
'modules/boonex/poll/templates/base/images/icons/bx_polls.png',
'modules/boonex/poll/templates/base/images/icons/l_b_corner.png',
'modules/boonex/poll/templates/base/images/icons/l_m_side.png',
'modules/boonex/poll/templates/base/images/icons/l_t_corner.png',
'modules/boonex/poll/templates/base/images/icons/member_menu_sub_polls.png',
'modules/boonex/poll/templates/base/images/icons/pls.png',
'modules/boonex/poll/templates/base/images/icons/poll_down.png',
'modules/boonex/poll/templates/base/images/icons/poll_up.png',
'modules/boonex/poll/templates/base/images/icons/r_b_corner.png',
'modules/boonex/poll/templates/base/images/icons/r_m_side.png',
'modules/boonex/poll/templates/base/images/icons/r_t_corner.png',
'modules/boonex/poll/templates/base/images/icons/t_side.png',
'modules/boonex/poll/templates/base/images/poll_res_fill.png',
'modules/boonex/profile_customize/templates/base/close_button.html',
'modules/boonex/profile_customize/templates/base/top_block_select.html',
'modules/boonex/profiler/log/profiler.log',
'modules/boonex/shoutbox/templates/base/images/icons/delete.png',
'modules/boonex/shoutbox/templates/base/images/icons/lock.png',
'modules/boonex/simple_messenger/templates/base/images/icons/message.png',
'modules/boonex/simple_messenger/templates/base/images/icons/messenger.png',
'modules/boonex/simple_messenger/templates/base/images/icons/video_messenger.png',
'modules/boonex/sites/templates/base/block_info.html',
'modules/boonex/sites/templates/base/css/site.css',
'modules/boonex/sites/templates/base/css/unit_short.css',
'modules/boonex/sites/templates/base/images/icons/action_block.png',
'modules/boonex/sites/templates/base/images/icons/action_share.png',
'modules/boonex/sites/templates/base/images/icons/bx_sites.png',
'modules/boonex/sites/templates/base/images/icons/calendar_add.png',
'modules/boonex/sites/templates/base/images/icons/edit.png',
'modules/boonex/sites/templates/base/images/icons/site_add.png',
'modules/boonex/sites/templates/base/images/icons/tgs.gif',
'modules/boonex/sites/templates/base/images/icons/wall_post_icon.png',
'modules/boonex/sites/templates/base/images/op40.png',
'modules/boonex/sites/templates/base/share_popup.html',
'modules/boonex/sites/templates/base/thumb200.html',
'modules/boonex/sites/templates/base/view_site.html',
'modules/boonex/sounds/templates/base/images/icons/bx_music.png',
'modules/boonex/sounds/templates/base/images/icons/member_menu_sub.png',
'modules/boonex/sounds/templates/base/images/icons/music_beam.png',
'modules/boonex/sounds/templates/base/images/icons/wall_post_icon.png',
'modules/boonex/sounds/templates/base/sites_set_box.html',
'modules/boonex/sounds/templates/base/wall_post.html',
'modules/boonex/sounds/templates/base/wall_post_private.html',
'modules/boonex/spy/classes/BxSpyProfilesActivity.php',
'modules/boonex/spy/classes/BxSpyResponse.php',
'modules/boonex/store/templates/base/images/icons/action_block.png',
'modules/boonex/store/templates/base/images/icons/action_share.png',
'modules/boonex/store/templates/base/images/icons/bx_store.png',
'modules/boonex/store/templates/base/images/icons/edit.png',
'modules/boonex/store/templates/base/images/icons/wall_post_icon.png',
'modules/boonex/store/templates/base/images/op40.png',
'modules/boonex/store/templates/base/pending_approval_plank.html',
'modules/boonex/videos/templates/base/album_preview.html',
'modules/boonex/videos/templates/base/images/icons/bx_videos.png',
'modules/boonex/videos/templates/base/images/icons/member_menu_sub.png',
'modules/boonex/videos/templates/base/images/icons/pvi.png',
'modules/boonex/videos/templates/base/images/icons/wall_post_icon.png',
'modules/boonex/videos/templates/base/sites_set_box.html',
'modules/boonex/videos/templates/base/wall_post.html',
'modules/boonex/videos/templates/base/wall_post_private.html',
'plugins/jquery/jquery-ui.js',
'plugins/jquery/jquery.dynDateTime.js',
'plugins/jquery/themes/calendar-blue.css',
'plugins/jquery/themes/ui.core.css',
'plugins/jquery/themes/ui.datepicker.css',
'plugins/jquery/themes/ui.theme.css',
'plugins/jquery/ui.core.js',
'plugins/jquery/ui.datepicker-ru.js',
'plugins/jquery/ui.datepicker.js',
'plugins/jquery/ui.draggable.js',
'plugins/jquery/ui.slider.js',
'plugins/jquery/ui.sortable.js',
'plugins/jquery/ui.tabs.js',
'plugins/tiny_mce/plugins/media/css/content.css',
'templates/base/account_control_member_status.html',
'templates/base/css/about_us.css',
'templates/base/css/alert.css',
'templates/base/css/all_members.css',
'templates/base/css/browseMedia.css',
'templates/base/css/BxCustomProfileMenu.css',
'templates/base/css/change_status.css',
'templates/base/css/checkout.css',
'templates/base/css/communicator.css',
'templates/base/css/contact.css',
'templates/base/css/faq.css',
'templates/base/css/forgot.css',
'templates/base/css/inst_permissions.css',
'templates/base/css/links.css',
'templates/base/css/pageable_items.css',
'templates/base/css/privacy.css',
'templates/base/css/profile_activate.css',
'templates/base/css/profile_customize.css',
'templates/base/css/qsearch.css',
'templates/base/css/tellfriend.css',
'templates/base/css/terms_of_use.css',
'templates/base/css/tiny_mce.css',
'templates/base/entry_view_block_images.html',
'templates/base/images/ActiveCutting.gif',
'templates/base/images/bc_bg.png',
'templates/base/images/bc_bg_close.png',
'templates/base/images/bc_bg_open.png',
'templates/base/images/bc_divider.png',
'templates/base/images/body_backgr.gif',
'templates/base/images/bubble_ls.png',
'templates/base/images/bubble_ms.png',
'templates/base/images/bubble_rs.png',
'templates/base/images/bullet.gif',
'templates/base/images/button1_bg.png',
'templates/base/images/button_bg.png',
'templates/base/images/buttons_uni.png',
'templates/base/images/dbTmLeft.png',
'templates/base/images/dbTmRight.png',
'templates/base/images/footer_part.png',
'templates/base/images/form_area_corners.png',
'templates/base/images/form_area_wrap.png',
'templates/base/images/form_text_wrap.png',
'templates/base/images/h_menu_bg.png',
'templates/base/images/head_cutting.gif',
'templates/base/images/icons/_dbtopmenu_left.gif',
'templates/base/images/icons/_dbtopmenu_right.gif',
'templates/base/images/icons/action_block.png',
'templates/base/images/icons/action_broadcast.png',
'templates/base/images/icons/action_download.gif',
'templates/base/images/icons/action_download.png',
'templates/base/images/icons/action_email.png',
'templates/base/images/icons/action_fave.png',
'templates/base/images/icons/action_fave_small.gif',
'templates/base/images/icons/action_friends.png',
'templates/base/images/icons/action_greet.png',
'templates/base/images/icons/action_greet_small.gif',
'templates/base/images/icons/action_im_small.gif',
'templates/base/images/icons/action_music.png',
'templates/base/images/icons/action_photos.png',
'templates/base/images/icons/action_report.png',
'templates/base/images/icons/action_send_small.gif',
'templates/base/images/icons/action_share.png',
'templates/base/images/icons/action_subscribe.png',
'templates/base/images/icons/add_comment.gif',
'templates/base/images/icons/addtocart.gif',
'templates/base/images/icons/arrowleft.gif',
'templates/base/images/icons/arrowright.gif',
'templates/base/images/icons/ars.gif',
'templates/base/images/icons/artic_fldr.gif',
'templates/base/images/icons/artic_papr.gif',
'templates/base/images/icons/audio.jpg',
'templates/base/images/icons/bx_aboutus.png',
'templates/base/images/icons/bx_articles.png',
'templates/base/images/icons/bx_boards.png',
'templates/base/images/icons/bx_chat.png',
'templates/base/images/icons/bx_contactus.png',
'templates/base/images/icons/bx_ecards.png',
'templates/base/images/icons/bx_faq.png',
'templates/base/images/icons/bx_feedback.png',
'templates/base/images/icons/bx_forgotpassword.png',
'templates/base/images/icons/bx_home.png',
'templates/base/images/icons/bx_invitefriend.png',
'templates/base/images/icons/bx_links.png',
'templates/base/images/icons/bx_logout.png',
'templates/base/images/icons/bx_myaccount.png',
'templates/base/images/icons/bx_myfriends.png',
'templates/base/images/icons/bx_mymail.png',
'templates/base/images/icons/bx_mypresence.png',
'templates/base/images/icons/bx_n_about_us.png',
'templates/base/images/icons/bx_n_calendar.png',
'templates/base/images/icons/bx_n_categories.png',
'templates/base/images/icons/bx_n_help.png',
'templates/base/images/icons/bx_n_join.png',
'templates/base/images/icons/bx_n_mail_write.png',
'templates/base/images/icons/bx_n_membership.png',
'templates/base/images/icons/bx_n_pedit.png',
'templates/base/images/icons/bx_n_profile_close.png',
'templates/base/images/icons/bx_n_profile_info.png',
'templates/base/images/icons/bx_n_profile_top.png',
'templates/base/images/icons/bx_n_search.png',
'templates/base/images/icons/bx_n_search_comm.png',
'templates/base/images/icons/bx_n_spy.png',
'templates/base/images/icons/bx_n_tags.png',
'templates/base/images/icons/bx_news.png',
'templates/base/images/icons/bx_people.png',
'templates/base/images/icons/bx_pictures.png',
'templates/base/images/icons/bx_privacy.png',
'templates/base/images/icons/bx_profile.png',
'templates/base/images/icons/bx_search.png',
'templates/base/images/icons/bx_settings.png',
'templates/base/images/icons/bx_terms.png',
'templates/base/images/icons/categ_add.png',
'templates/base/images/icons/categ_delete.png',
'templates/base/images/icons/categ_edit.png',
'templates/base/images/icons/close.png',
'templates/base/images/icons/cmt-bln-bl.png',
'templates/base/images/icons/cmt-bln-bm.png',
'templates/base/images/icons/cmt-bln-br.png',
'templates/base/images/icons/cmt-bln-ml.png',
'templates/base/images/icons/cmt-bln-mr.png',
'templates/base/images/icons/cmt-bln-tl.png',
'templates/base/images/icons/cmt-bln-tm.png',
'templates/base/images/icons/cmt-bln-tr.png',
'templates/base/images/icons/cmt-delete.png',
'templates/base/images/icons/cmt-edit.png',
'templates/base/images/icons/cmt-female.gif',
'templates/base/images/icons/cmt-frm-bln-bl.png',
'templates/base/images/icons/cmt-frm-bln-bm.png',
'templates/base/images/icons/cmt-frm-bln-br.png',
'templates/base/images/icons/cmt-frm-bln-ml.png',
'templates/base/images/icons/cmt-frm-bln-mr.png',
'templates/base/images/icons/cmt-frm-bln-tl.png',
'templates/base/images/icons/cmt-frm-bln-tm.png',
'templates/base/images/icons/cmt-frm-bln-tr.png',
'templates/base/images/icons/cmt-male.gif',
'templates/base/images/icons/cmt-rate.png',
'templates/base/images/icons/cmt-reply-bln-bl.png',
'templates/base/images/icons/cmt-reply-bln-bm.png',
'templates/base/images/icons/cmt-reply-bln-br.png',
'templates/base/images/icons/cmt-reply-bln-ml.png',
'templates/base/images/icons/cmt-reply-bln-mr.png',
'templates/base/images/icons/cmt-reply-bln-tl.png',
'templates/base/images/icons/cmt-reply-bln-tm.png',
'templates/base/images/icons/cmt-reply-bln-tr.png',
'templates/base/images/icons/cmt-reply-record.png',
'templates/base/images/icons/cmt-reply-write.png',
'templates/base/images/icons/cmt-reply.png',
'templates/base/images/icons/cmt-show-hide.png',
'templates/base/images/icons/convert.gif',
'templates/base/images/icons/cool.gif',
'templates/base/images/icons/current_mes.gif',
'templates/base/images/icons/current_mes.png',
'templates/base/images/icons/current_mes2.gif',
'templates/base/images/icons/dashboard.png',
'templates/base/images/icons/delete.gif',
'templates/base/images/icons/desc_more.gif',
'templates/base/images/icons/description_edit.png',
'templates/base/images/icons/dots.gif',
'templates/base/images/icons/edit.png',
'templates/base/images/icons/eye.png',
'templates/base/images/icons/faq.gif',
'templates/base/images/icons/folder.png',
'templates/base/images/icons/folder_add.png',
'templates/base/images/icons/folder_small.png',
'templates/base/images/icons/fr_lst.gif',
'templates/base/images/icons/globe_green.png',
'templates/base/images/icons/icon_greeting.png',
'templates/base/images/icons/icon_letter.png',
'templates/base/images/icons/icon_yellow.gif',
'templates/base/images/icons/image_link.png',
'templates/base/images/icons/in.gif',
'templates/base/images/icons/inbox.gif',
'templates/base/images/icons/inbox.png',
'templates/base/images/icons/invite.jpg',
'templates/base/images/icons/kiss.gif',
'templates/base/images/icons/left_arrow.gif',
'templates/base/images/icons/links.gif',
'templates/base/images/icons/lock.gif',
'templates/base/images/icons/lock32.gif',
'templates/base/images/icons/mailbox_contacts32.png',
'templates/base/images/icons/mailbox_inbox32.png',
'templates/base/images/icons/mailbox_sent32.png',
'templates/base/images/icons/mailbox_trash32.png',
'templates/base/images/icons/mailbox_write32.png',
'templates/base/images/icons/mails.png',
'templates/base/images/icons/mbs.png',
'templates/base/images/icons/mbs_online.png',
'templates/base/images/icons/media_rate_bg.jpg',
'templates/base/images/icons/member_menu_admin.png',
'templates/base/images/icons/member_menu_devider.png',
'templates/base/images/icons/memeber_menu_dashboard.png',
'templates/base/images/icons/memeber_menu_friends.png',
'templates/base/images/icons/memeber_menu_logout.png',
'templates/base/images/icons/memeber_menu_mail.png',
'templates/base/images/icons/memeber_menu_profile.png',
'templates/base/images/icons/memeber_menu_settings.png',
'templates/base/images/icons/memeber_menu_sub_activity.png',
'templates/base/images/icons/memeber_menu_sub_compose.png',
'templates/base/images/icons/memeber_menu_sub_contacted.png',
'templates/base/images/icons/memeber_menu_sub_customize.png',
'templates/base/images/icons/memeber_menu_sub_fr_request.png',
'templates/base/images/icons/memeber_menu_sub_inbox.png',
'templates/base/images/icons/memeber_menu_sub_info.png',
'templates/base/images/icons/memeber_menu_sub_membership.png',
'templates/base/images/icons/memeber_menu_sub_sent.png',
'templates/base/images/icons/memeber_menu_sub_trash.png',
'templates/base/images/icons/memeber_menu_sub_unregister.png',
'templates/base/images/icons/memeber_menu_translate.png',
'templates/base/images/icons/more_down.png',
'templates/base/images/icons/new.gif',
'templates/base/images/icons/news.gif',
'templates/base/images/icons/next32.png',
'templates/base/images/icons/not_readed.gif',
'templates/base/images/icons/offline.gif',
'templates/base/images/icons/onl.png',
'templates/base/images/icons/online.gif',
'templates/base/images/icons/out.gif',
'templates/base/images/icons/outbox.gif',
'templates/base/images/icons/palette.png',
'templates/base/images/icons/photo.jpg',
'templates/base/images/icons/pic_not_avail_45.gif',
'templates/base/images/icons/pollSubmit.gif',
'templates/base/images/icons/post_link.png',
'templates/base/images/icons/post_music.png',
'templates/base/images/icons/post_new.png',
'templates/base/images/icons/post_photo.png',
'templates/base/images/icons/post_video.png',
'templates/base/images/icons/prev32.png',
'templates/base/images/icons/prim.png',
'templates/base/images/icons/ps_view_block.png',
'templates/base/images/icons/pts.png',
'templates/base/images/icons/readed.gif',
'templates/base/images/icons/reduce.png',
'templates/base/images/icons/reload.png',
'templates/base/images/icons/right_arrow.gif',
'templates/base/images/icons/scale_bg.gif',
'templates/base/images/icons/scale_index_1.gif',
'templates/base/images/icons/scale_index_2.gif',
'templates/base/images/icons/scroll.gif',
'templates/base/images/icons/scroll_f.gif',
'templates/base/images/icons/scroll_priv.gif',
'templates/base/images/icons/sign.gif',
'templates/base/images/icons/sort_down.gif',
'templates/base/images/icons/sort_up.gif',
'templates/base/images/icons/star__plus.png',
'templates/base/images/icons/status_away.png',
'templates/base/images/icons/status_busy.png',
'templates/base/images/icons/status_offline.png',
'templates/base/images/icons/status_online.png',
'templates/base/images/icons/status_text.png',
'templates/base/images/icons/sys-status-offline.png',
'templates/base/images/icons/sys-status-online.png',
'templates/base/images/icons/sys_pgt_reload.png',
'templates/base/images/icons/sys_status_away.png',
'templates/base/images/icons/sys_status_busy.png',
'templates/base/images/icons/sys_status_offline.png',
'templates/base/images/icons/sys_status_online.png',
'templates/base/images/icons/tag.png',
'templates/base/images/icons/tag_small.png',
'templates/base/images/icons/tgs.png',
'templates/base/images/icons/tm_item_languages.png',
'templates/base/images/icons/tm_item_more.png',
'templates/base/images/icons/tm_item_search.png',
'templates/base/images/icons/tm_item_templates.png',
'templates/base/images/icons/tm_sitem_down.gif',
'templates/base/images/icons/tm_sitem_right.gif',
'templates/base/images/icons/toggle_down.png',
'templates/base/images/icons/toggle_right.png',
'templates/base/images/icons/toggle_up.png',
'templates/base/images/icons/us.gif',
'templates/base/images/icons/user.png',
'templates/base/images/icons/video.jpg',
'templates/base/images/icons/view_profile.png',
'templates/base/images/icons/write_message.gif',
'templates/base/images/icons/yuk.gif',
'templates/base/images/loading_bg.png',
'templates/base/images/media_tab_active.png',
'templates/base/images/media_tab_hover.png',
'templates/base/images/media_tab_passive.png',
'templates/base/images/member_menu_desc_bl.png',
'templates/base/images/member_menu_desc_bm.png',
'templates/base/images/member_menu_desc_br.png',
'templates/base/images/member_menu_desc_l.png',
'templates/base/images/member_menu_desc_r.png',
'templates/base/images/member_menu_desc_tl.png',
'templates/base/images/member_menu_desc_tm.png',
'templates/base/images/member_menu_desc_tr.png',
'templates/base/images/mini_extra_menu_bg.png',
'templates/base/images/mini_sp_op_gr.png',
'templates/base/images/msgbox_bd.gif',
'templates/base/images/msgbox_cor_lb.png',
'templates/base/images/msgbox_cor_lt.png',
'templates/base/images/msgbox_cor_rb.png',
'templates/base/images/msgbox_cor_rt.png',
'templates/base/images/nl.png',
'templates/base/images/notify_bl.png',
'templates/base/images/notify_bm.png',
'templates/base/images/notify_br.png',
'templates/base/images/notify_l.png',
'templates/base/images/notify_m.png',
'templates/base/images/notify_r.png',
'templates/base/images/notify_tl.png',
'templates/base/images/notify_tm.png',
'templates/base/images/notify_tr.png',
'templates/base/images/op40.png',
'templates/base/images/op80.png',
'templates/base/images/op_cor_bl.png',
'templates/base/images/op_cor_br.png',
'templates/base/images/op_cor_tl.png',
'templates/base/images/op_cor_tr.png',
'templates/base/images/opSplash.png',
'templates/base/images/slider_trigger_bg.gif',
'templates/base/images/sys_notification_bg.png',
'templates/base/images/tab_cutting.gif',
'templates/base/images/tab_cutting_h.gif',
'templates/base/images/textarea_bg.gif',
'templates/base/images/tm_bg.png',
'templates/base/images/tm_cm_bg.png',
'templates/base/images/tm_cm_item_center_act.png',
'templates/base/images/tm_cm_item_left_act.png',
'templates/base/images/tm_cm_item_right_act.png',
'templates/base/images/tm_item_left.png',
'templates/base/images/tm_item_left_act.png',
'templates/base/images/tm_item_right.png',
'templates/base/images/tm_item_right_act.png',
'templates/base/images/tm_sitem_act.png',
'templates/base/images/tm_sitem_search_bg.png',
'templates/base/images/tm_smenu_bg.png',
'templates/base/images/tm_smenu_bottom.png',
'templates/base/images/tm_smenu_sitem_act.png',
'templates/base/images/top_menu_popup_bg.png',
'templates/base/images/top_tab_cutting.gif',
'templates/base/images/topMenuBg.gif',
'templates/base/images/vote_star_active_16.png',
'templates/base/images/vote_star_active_32.png',
'templates/base/images/vote_star_gray_16.png',
'templates/base/images/vote_star_gray_32.png',
'templates/base/images/vote_star_null.gif',
'templates/base/mail_box_top_section.html',
'templates/base/member_mail_notify_box.html',
'templates/base/pageable_items.html',
'templates/base/qsearch_row.html',
'templates/base/searchrow.html',
'templates/base/top_block.html',
'templates/tmpl_uni/css/about_us.css',
'templates/tmpl_uni/css/alert.css',
'templates/tmpl_uni/css/all_members.css',
'templates/tmpl_uni/css/anchor.css',
'templates/tmpl_uni/css/browse.css',
'templates/tmpl_uni/css/browseMedia.css',
'templates/tmpl_uni/css/BxCustomProfileMenu.css',
'templates/tmpl_uni/css/calendar.css',
'templates/tmpl_uni/css/categories.css',
'templates/tmpl_uni/css/checkout.css',
'templates/tmpl_uni/css/cmts.css',
'templates/tmpl_uni/css/common.css',
'templates/tmpl_uni/css/communicator.css',
'templates/tmpl_uni/css/communicator_page.css',
'templates/tmpl_uni/css/contact.css',
'templates/tmpl_uni/css/entry_view.css',
'templates/tmpl_uni/css/explanation.css',
'templates/tmpl_uni/css/faq.css',
'templates/tmpl_uni/css/forgot.css',
'templates/tmpl_uni/css/forms_adv.css',
'templates/tmpl_uni/css/forms_extra.css',
'templates/tmpl_uni/css/general.css',
'templates/tmpl_uni/css/index.css',
'templates/tmpl_uni/css/index.html',
'templates/tmpl_uni/css/inst_permissions.css',
'templates/tmpl_uni/css/inviter.css',
'templates/tmpl_uni/css/join.css',
'templates/tmpl_uni/css/links.css',
'templates/tmpl_uni/css/login_form.css',
'templates/tmpl_uni/css/mail.css',
'templates/tmpl_uni/css/member_panel.css',
'templates/tmpl_uni/css/notifications.css',
'templates/tmpl_uni/css/pageable_items.css',
'templates/tmpl_uni/css/pedit.css',
'templates/tmpl_uni/css/privacy.css',
'templates/tmpl_uni/css/privacy_settings.css',
'templates/tmpl_uni/css/profile_customize.css',
'templates/tmpl_uni/css/profile_view.css',
'templates/tmpl_uni/css/qsearch.css',
'templates/tmpl_uni/css/rate_object.css',
'templates/tmpl_uni/css/result.css',
'templates/tmpl_uni/css/search.css',
'templates/tmpl_uni/css/searchKeyword.css',
'templates/tmpl_uni/css/subscription.css',
'templates/tmpl_uni/css/tags.css',
'templates/tmpl_uni/css/tellfriend.css',
'templates/tmpl_uni/css/terms_of_use.css',
'templates/tmpl_uni/css/tiny_mce.css',
'templates/tmpl_uni/css/top_menu.css',
'templates/tmpl_uni/css/unit_fan.css',
'templates/tmpl_uni/css/upload_media_comm.css',
'templates/tmpl_uni/images/loading.gif',
'templates/tmpl_uni/images/menu_pt.gif',
'templates/tmpl_uni/images/menu_pt_h.gif',
'templates/tmpl_uni/images/music.png',
'templates/tmpl_uni/images/spacer.gif',
);

if (!function_exists('bx_rrmdir')) {

    function bx_rrmdir($directory)
{
    if (substr($directory,-1) == "/")
        $directory = substr($directory,0,-1);

    if (!file_exists($directory) || !is_dir($directory))
        return false;
    elseif (!is_readable($directory))
        return false;

    if (!($directoryHandle = opendir($directory)))
        return false;

    while ($contents = readdir($directoryHandle)) {
        if ($contents != '.' && $contents != '..') {
            $path = $directory . "/" . $contents;

            if (is_dir($path))
                bx_rrmdir($path);
            else
                unlink($path);
        }
    }

    closedir($directoryHandle);

    if (!rmdir($directory))
        return false;

    return true;
}

}

$iDeletedFolders = 0;
$iDeletedFiles = 0;

# delete unused folders
foreach ($aFolders as $sFolder) {
    if (!file_exists(BX_DIRECTORY_PATH_ROOT . $sFolder))
        continue;

    if (!bx_rrmdir(BX_DIRECTORY_PATH_ROOT . $sFolder))
        echo "ERROR folder deletion, delete manually: $sFolder\n";
    else
        ++$iDeletedFolders;
}

# delete unused files
foreach ($aFiles as $sFile) {
    if (!file_exists(BX_DIRECTORY_PATH_ROOT . $sFile))
        continue;

    if (!@unlink(BX_DIRECTORY_PATH_ROOT . $sFile))
        echo "ERROR file deletion, delete manually: $sFile\n";
    else
        ++$iDeletedFiles;
}

echo "\nOperation results:\n";
echo "\t$iDeletedFolders folders were deleted\n";
echo "\t$iDeletedFiles files were deleted\n";
